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 {
16
16
*
17
17
* コード内だと、"mouse"が指定されていた場合があった。詳細は不明
18
18
*/
19
- source ?: string ;
19
+ source ?: "mouse" ;
20
20
}
21
21
22
22
/** カーソル操作クラス */
23
- export declare class Cursor extends BaseStore {
23
+ export declare class Cursor extends BaseStore <
24
+ { source : "mouse" | undefined } | "focusTextInput" | "scroll" | undefined
25
+ > {
24
26
constructor ( ) ;
25
27
26
28
/** カーソルの位置を初期化し、editorからカーソルを外す */
@@ -44,7 +46,10 @@ export declare class Cursor extends BaseStore {
44
46
/** popup menuを消す */
45
47
hidePopupMenu ( ) : void ;
46
48
47
- /** #text-inputにカーソルをfocusし、同時にカーソルを表示する */
49
+ /** #text-inputにカーソルをfocusし、同時にカーソルを表示する
50
+ *
51
+ * このとき、`event: "focusTextInput"`が発行される
52
+ */
48
53
focus ( ) : void ;
49
54
50
55
/** #text-inputからfocusを外す。カーソルの表示状態は変えない */
@@ -143,8 +148,11 @@ export declare class Cursor extends BaseStore {
143
148
private sync ( ) : void ;
144
149
private syncNow ( ) : void ;
145
150
private updateTemporalHorizontalPoint ( ) : number ;
151
+ /** scrollされたときに発火される
152
+ *
153
+ * このとき`event: "source"`が発行される
154
+ */
146
155
private emitScroll ( ) : void ;
147
- emitChange ( event : string ) : void ;
148
156
149
157
private data : Position ;
150
158
private temporalHorizontalPoint : number ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export interface Range {
10
10
end : Position ;
11
11
}
12
12
13
- export declare class Selection extends BaseStore {
13
+ export declare class Selection extends BaseStore < undefined > {
14
14
constructor ( ) ;
15
15
16
16
/** 現在のページ本文を取得する */
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ export type {
2
2
BaseLine ,
3
3
Line ,
4
4
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" ;
6
6
export type {
7
7
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" ;
9
9
export * from "https://esm.sh/@progfay/[email protected] " ;
You can’t perform that action at this time.
0 commit comments