File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,13 @@ export interface SetPositionOptions {
1616 *
1717 * コード内だと、"mouse"が指定されていた場合があった。詳細は不明
1818 */
19- source ?: string ;
19+ source ?: "mouse" ;
2020}
2121
2222/** カーソル操作クラス */
23- export declare class Cursor extends BaseStore {
23+ export declare class Cursor extends BaseStore <
24+ { source : "mouse" | undefined } | "focusTextInput" | "scroll" | undefined
25+ > {
2426 constructor ( ) ;
2527
2628 /** カーソルの位置を初期化し、editorからカーソルを外す */
@@ -44,7 +46,10 @@ export declare class Cursor extends BaseStore {
4446 /** popup menuを消す */
4547 hidePopupMenu ( ) : void ;
4648
47- /** #text-inputにカーソルをfocusし、同時にカーソルを表示する */
49+ /** #text-inputにカーソルをfocusし、同時にカーソルを表示する
50+ *
51+ * このとき、`event: "focusTextInput"`が発行される
52+ */
4853 focus ( ) : void ;
4954
5055 /** #text-inputからfocusを外す。カーソルの表示状態は変えない */
@@ -143,8 +148,11 @@ export declare class Cursor extends BaseStore {
143148 private sync ( ) : void ;
144149 private syncNow ( ) : void ;
145150 private updateTemporalHorizontalPoint ( ) : number ;
151+ /** scrollされたときに発火される
152+ *
153+ * このとき`event: "source"`が発行される
154+ */
146155 private emitScroll ( ) : void ;
147- emitChange ( event : string ) : void ;
148156
149157 private data : Position ;
150158 private temporalHorizontalPoint : number ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export interface Range {
1010 end : Position ;
1111}
1212
13- export declare class Selection extends BaseStore {
13+ export declare class Selection extends BaseStore < undefined > {
1414 constructor ( ) ;
1515
1616 /** 現在のページ本文を取得する */
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ export type {
22 BaseLine ,
33 Line ,
44 Scrapbox ,
5- } from "https://raw.githubusercontent.com/scrapbox-jp/types/0.3.8 /userscript.ts" ;
5+ } from "https://raw.githubusercontent.com/scrapbox-jp/types/0.4.2 /userscript.ts" ;
66export type {
77 BaseStore ,
8- } from "https://raw.githubusercontent.com/scrapbox-jp/types/0.3.8 /baseStore.ts" ;
8+ } from "https://raw.githubusercontent.com/scrapbox-jp/types/0.4.2 /baseStore.ts" ;
99export * from "https://esm.sh/@progfay/scrapbox-parser@8.1.0" ;
You can’t perform that action at this time.
0 commit comments