open-grid 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/dist/ExportProgressView-9Kt1SQxv.js +48 -0
  3. package/dist/ExportProgressView-B59uHIwt.cjs +48 -0
  4. package/dist/LcpMergeOrderer-BdUtV67j.js +114 -0
  5. package/dist/LcpMergeOrderer-C_ANVkGk.cjs +113 -0
  6. package/dist/OpenGrid-BUYQs1_w.cjs +9806 -0
  7. package/dist/OpenGrid-BmagF0yo.js +9819 -0
  8. package/dist/XlsxChannel-DOeHeP7h.cjs +95 -0
  9. package/dist/XlsxChannel-DdaiytFR.js +95 -0
  10. package/dist/XlsxWorkbookWriter-BTNtZ80J.js +199 -0
  11. package/dist/XlsxWorkbookWriter-_u5stfg4.cjs +198 -0
  12. package/dist/{index-Brnev66-.js → index-B9_g5Eg3.js} +2 -2
  13. package/dist/{index-B_e5BXnW.cjs → index-CnyumyPV.cjs} +2 -2
  14. package/dist/open-grid-a11y.cjs +216 -0
  15. package/dist/open-grid-a11y.js +219 -0
  16. package/dist/open-grid-base.css +9 -0
  17. package/dist/open-grid-header.css +6 -15
  18. package/dist/open-grid-react.cjs +1 -1
  19. package/dist/open-grid-react.js +1 -1
  20. package/dist/open-grid-vue.cjs +1 -1
  21. package/dist/open-grid-vue.js +1 -1
  22. package/dist/open-grid.cjs +5 -2
  23. package/dist/open-grid.js +6 -3
  24. package/dist/sinks-BWkWQexV.js +149 -0
  25. package/dist/sinks-DPK0VxYG.cjs +143 -0
  26. package/dist/types/a11y/index.d.ts +37 -0
  27. package/dist/types/core/CFRenderBridge.d.ts +5 -1
  28. package/dist/types/core/CellEditManager.d.ts +26 -2
  29. package/dist/types/core/CellEventHandler.d.ts +6 -2
  30. package/dist/types/core/ColumnLayout.d.ts +11 -3
  31. package/dist/types/core/DataLayer.d.ts +48 -1
  32. package/dist/types/core/DetailManager.d.ts +43 -2
  33. package/dist/types/core/ExportManager.d.ts +26 -6
  34. package/dist/types/core/FindBarManager.d.ts +6 -2
  35. package/dist/types/core/FlatRowModel.d.ts +69 -3
  36. package/dist/types/core/FooterManager.d.ts +43 -1
  37. package/dist/types/core/FormulaController.d.ts +4 -4
  38. package/dist/types/core/GridComposer.d.ts +11 -1
  39. package/dist/types/core/GridRenderer.d.ts +84 -19
  40. package/dist/types/core/GroupTreeManager.d.ts +6 -4
  41. package/dist/types/core/KeyboardManager.d.ts +3 -2
  42. package/dist/types/core/MergeEngine.d.ts +45 -5
  43. package/dist/types/core/MutationService.d.ts +14 -17
  44. package/dist/types/core/OpenGrid.d.ts +350 -12
  45. package/dist/types/core/OrgChart.d.ts +24 -0
  46. package/dist/types/core/RangeSelectionManager.d.ts +23 -2
  47. package/dist/types/core/RenderController.d.ts +126 -8
  48. package/dist/types/core/RowDragDrop.d.ts +2 -0
  49. package/dist/types/core/SortFilterManager.d.ts +18 -2
  50. package/dist/types/core/VirtualScroll.d.ts +12 -0
  51. package/dist/types/core/WorksheetManager.d.ts +2 -2
  52. package/dist/types/core/a11y/KeyboardInteractionModel.d.ts +321 -20
  53. package/dist/types/core/a11y/LiveRegionController.d.ts +229 -27
  54. package/dist/types/core/a11y/VisualEquivRegistry.d.ts +199 -14
  55. package/dist/types/core/appearance/TextureRegistry.d.ts +10 -0
  56. package/dist/types/core/cf/CFRule.d.ts +145 -22
  57. package/dist/types/core/coordinate/CellTextPolicy.d.ts +58 -0
  58. package/dist/types/core/coordinate/ColumnGeometry.d.ts +60 -0
  59. package/dist/types/core/coordinate/ColumnWindow.d.ts +40 -0
  60. package/dist/types/core/coordinate/ColumnWindowPolicy.d.ts +89 -0
  61. package/dist/types/core/coordinate/ExtraColumns.d.ts +39 -0
  62. package/dist/types/core/coordinate/RangeRectCalculator.d.ts +35 -0
  63. package/dist/types/core/coordinate/ViewportHeightJudge.d.ts +28 -0
  64. package/dist/types/core/coordinate/geometryPorts.d.ts +250 -0
  65. package/dist/types/core/coordinate/ports.d.ts +5 -0
  66. package/dist/types/core/domain/footer/FooterValues.d.ts +50 -0
  67. package/dist/types/core/domain/footer/ports.d.ts +31 -0
  68. package/dist/types/core/domain/render/RenderPlanner.d.ts +17 -0
  69. package/dist/types/core/domain/render/RenderRequest.d.ts +91 -0
  70. package/dist/types/core/domain/render/ports.d.ts +169 -0
  71. package/dist/types/core/domain/resize/ResizeGesture.d.ts +25 -0
  72. package/dist/types/core/domain/resize/ResizeHitZone.d.ts +23 -0
  73. package/dist/types/core/domain/resize/ports.d.ts +64 -0
  74. package/dist/types/core/domain/sort/ComparisonOrderer.d.ts +11 -0
  75. package/dist/types/core/domain/sort/LcpMergeOrderer.d.ts +15 -0
  76. package/dist/types/core/domain/sort/RankIndex.d.ts +74 -0
  77. package/dist/types/core/domain/sort/SortCostEstimate.d.ts +36 -0
  78. package/dist/types/core/domain/sort/SortKeyColumn.d.ts +89 -0
  79. package/dist/types/core/domain/sort/SortKeyStore.d.ts +34 -0
  80. package/dist/types/core/domain/sort/Sorter.d.ts +54 -0
  81. package/dist/types/core/domain/sort/SyncSortRunner.d.ts +9 -0
  82. package/dist/types/core/domain/sort/commonPrefix.d.ts +5 -0
  83. package/dist/types/core/domain/sort/ports.d.ts +140 -0
  84. package/dist/types/core/export/ExportProgressView.d.ts +28 -0
  85. package/dist/types/core/export/channels/XlsxChannel.d.ts +29 -0
  86. package/dist/types/core/export/channels/XlsxWorkbookWriter.d.ts +17 -0
  87. package/dist/types/core/export/index.d.ts +2 -0
  88. package/dist/types/core/export/sinks.d.ts +81 -0
  89. package/dist/types/core/host/archCheck.d.ts +16 -1
  90. package/dist/types/core/i18n/locales/en.d.ts +6 -0
  91. package/dist/types/core/i18n/locales/ko.d.ts +6 -0
  92. package/dist/types/core/i18n/types.d.ts +8 -0
  93. package/dist/types/core/render/FooterView.d.ts +121 -0
  94. package/dist/types/core/render/GeometryApplier.d.ts +55 -0
  95. package/dist/types/core/render/HorizontalReveal.d.ts +26 -0
  96. package/dist/types/core/render/RangeOverlayAdapter.d.ts +10 -0
  97. package/dist/types/core/render/RenderScheduler.d.ts +225 -0
  98. package/dist/types/core/render/ResizeSinkAdapter.d.ts +35 -0
  99. package/dist/types/core/render/ScrollFollower.d.ts +34 -0
  100. package/dist/types/core/render/ScrollObserver.d.ts +47 -0
  101. package/dist/types/core/render/ScrollbarGutter.d.ts +19 -0
  102. package/dist/types/core/render/body/BodyEventRouter.d.ts +58 -0
  103. package/dist/types/core/render/body/BodyRowSet.d.ts +28 -0
  104. package/dist/types/core/render/body/BodyView.d.ts +185 -0
  105. package/dist/types/core/render/body/CellLocator.d.ts +36 -0
  106. package/dist/types/core/render/body/CellRegistry.d.ts +24 -0
  107. package/dist/types/core/render/body/ColumnPaintPlan.d.ts +19 -0
  108. package/dist/types/core/render/body/ExtraCellPainters.d.ts +20 -0
  109. package/dist/types/core/render/body/rows/BodyRowContext.d.ts +138 -0
  110. package/dist/types/core/render/body/rows/DataRowPainter.d.ts +58 -0
  111. package/dist/types/core/render/body/rows/DetailRowPainter.d.ts +24 -0
  112. package/dist/types/core/render/body/rows/GroupRowPainter.d.ts +32 -0
  113. package/dist/types/core/render/body/rows/RowPainterTable.d.ts +24 -0
  114. package/dist/types/core/render/body/rows/WindowLayout.d.ts +38 -0
  115. package/dist/types/core/render/dom.d.ts +10 -0
  116. package/dist/types/core/render/header/HeaderSortIndicator.d.ts +39 -0
  117. package/dist/types/core/render/header/HeaderView.d.ts +84 -0
  118. package/dist/types/core/render/header/ResizeHandleBinder.d.ts +110 -0
  119. package/dist/types/core/render/ports.d.ts +218 -0
  120. package/dist/types/core/renderers/CellRenderer.d.ts +7 -0
  121. package/dist/types/core/types.d.ts +572 -22
  122. package/dist/types/index.d.ts +31 -1
  123. package/dist/types/vue/OpenGrid.vue.d.ts +2 -2
  124. package/package.json +8 -9
  125. package/dist/OpenGrid-DgZtbVD0.cjs +0 -7390
  126. package/dist/OpenGrid-E11B7Xa7.js +0 -7403
@@ -1,63 +1,364 @@
1
- /** 상호작용 모드(단일 모델). 키 라우팅이 모드에 따라 분기. / Interaction mode; routing branches on it. */
1
+ /**
2
+ * 지금 그리드가 어떤 상태로 키를 받는지. `nav`=셀 사이 이동, `edit`=셀 편집 중, `selectExtend`=범위 넓히기.
3
+ *
4
+ * What state the grid is in when it receives a key. `nav` = moving between cells, `edit` = editing a cell, `selectExtend` = extending a range.
5
+ *
6
+ * グリッドがいまどの状態でキーを受けているか。`nav`=セル間の移動、`edit`=セル編集中、`selectExtend`=範囲の拡張。
7
+ *
8
+ * 表格当前以什么状态接收按键。`nav`=在单元格之间移动,`edit`=正在编辑单元格,`selectExtend`=扩展范围。
9
+ */
2
10
  export type InteractionMode = 'nav' | 'edit' | 'selectExtend';
3
- /** 정규화 키 이벤트(헤드리스 — DOM KeyboardEvent 아님). 호스트 어댑터가 어댑팅. / Normalized key event (headless). */
11
+ /**
12
+ * 키 입력 한 번. DOM 의 `KeyboardEvent` 를 몰라도 되게 필요한 것만 담았다. `KeyboardEvent` 에서 만들 때는 `strokeFromEvent(e)` 를 쓴다.
13
+ *
14
+ * One key press, holding only what is needed so the model does not depend on the DOM `KeyboardEvent`. Build it from a `KeyboardEvent` with `strokeFromEvent(e)`.
15
+ *
16
+ * キー入力 1 回。DOM の `KeyboardEvent` を知らなくてよいよう、必要なものだけを持ちます。`KeyboardEvent` から作るときは `strokeFromEvent(e)` を使います。
17
+ *
18
+ * 一次按键。只包含需要的内容,使模型不依赖 DOM 的 `KeyboardEvent`。从 `KeyboardEvent` 构造时请用 `strokeFromEvent(e)`。
19
+ */
4
20
  export interface KeyStroke {
5
- /** 'ArrowDown' | 'Enter' | 'F2' | 'a' … (DOM `KeyboardEvent.key`). */
21
+ /**
22
+ * 눌린 키 이름(`KeyboardEvent.key` 와 같다). 예: 'ArrowDown'·'Enter'·'F2'·'a'.
23
+ *
24
+ * The key name (same as `KeyboardEvent.key`), e.g. 'ArrowDown', 'Enter', 'F2', 'a'.
25
+ *
26
+ * 押されたキーの名前(`KeyboardEvent.key` と同じ)。例: 'ArrowDown'・'Enter'・'F2'・'a'。
27
+ *
28
+ * 按下的键名(与 `KeyboardEvent.key` 相同)。例如 'ArrowDown'、'Enter'、'F2'、'a'。
29
+ */
6
30
  readonly key: string;
7
31
  readonly ctrl: boolean;
8
32
  readonly shift: boolean;
9
33
  readonly alt: boolean;
10
34
  readonly meta: boolean;
11
- /** IME 조합 중(가드 — 조합 중 커밋 금지). / Mid-IME-composition (guard: no commit while composing). */
35
+ /**
36
+ * 한글·일본어 입력기로 글자를 조합하는 중인지. 조합 중의 Enter 는 확정용이라 명령으로 보내지 않는다.
37
+ *
38
+ * Whether an IME (Korean, Japanese, …) is still composing. Enter during composition confirms the text, so it is not routed to a command.
39
+ *
40
+ * IME で文字を組み立てている最中かどうか。組み立て中の Enter は確定用なので、コマンドには送りません。
41
+ *
42
+ * 是否正在用输入法组字。组字中的 Enter 用于确认文字,因此不会转给命令。
43
+ */
12
44
  readonly isComposing: boolean;
13
45
  }
14
- /** 키 바인딩 = (모드, 키패턴) → 커맨드 의도. 등록소가 충돌을 감지. / A keybinding; the registry detects conflicts. */
46
+ /**
47
+ * 단축키 하나: 어떤 모드에서 어떤 키를 누르면 어떤 명령을 뜻하는지.
48
+ *
49
+ * One shortcut: in which mode, which key, means which command.
50
+ *
51
+ * ショートカット 1 つ: どのモードでどのキーを押すと、どのコマンドを意味するか。
52
+ *
53
+ * 一个快捷键:在哪种模式下按哪个键,表示哪个命令。
54
+ */
15
55
  export interface KeyBinding {
56
+ /**
57
+ * 이 단축키가 먹는 모드. `'*'` 면 모든 모드.
58
+ *
59
+ * The mode this shortcut applies in; `'*'` for every mode.
60
+ *
61
+ * このショートカットが効くモード。`'*'` ならすべてのモード。
62
+ *
63
+ * 该快捷键生效的模式;`'*'` 表示所有模式。
64
+ */
16
65
  readonly mode: InteractionMode | '*';
17
- /** 'Ctrl+C' | 'ArrowDown' | 'Shift+ArrowDown'(수정자 순서 무관 — 정규화됨). / Pattern (modifier order-independent). */
66
+ /**
67
+ * 키 모양. 예: 'Ctrl+C'·'ArrowDown'·'Shift+ArrowDown'. 수정자 순서·대소문자는 상관없다.
68
+ *
69
+ * The key pattern, e.g. 'Ctrl+C', 'ArrowDown', 'Shift+ArrowDown'. Modifier order and case do not matter.
70
+ *
71
+ * キーの形。例: 'Ctrl+C'・'ArrowDown'・'Shift+ArrowDown'。修飾キーの順番や大文字小文字は問いません。
72
+ *
73
+ * 按键的形式,例如 'Ctrl+C'、'ArrowDown'、'Shift+ArrowDown'。修饰键顺序和大小写无关。
74
+ */
18
75
  readonly pattern: string;
19
- /** DD-09 ICommand 로 라우팅(직접 변이 금지). / Routed to a DD-09 ICommand. */
76
+ /**
77
+ * 이 키가 뜻하는 명령 이름. 모델은 이름만 돌려주고, 실제 동작은 호출하는 쪽이 한다.
78
+ *
79
+ * The name of the command this key means. The model only returns the name; the caller performs the action.
80
+ *
81
+ * このキーが意味するコマンドの名前。モデルは名前を返すだけで、実際の動作は呼び出し側が行います。
82
+ *
83
+ * 该键表示的命令名称。模型只返回名称,实际动作由调用方执行。
84
+ */
20
85
  readonly commandId: string;
21
- /** 단축키 힌트/도움말(i18n 메시지 키). / Shortcut hint/help (i18n message key). */
86
+ /**
87
+ * 도움말에 보일 설명(메시지 키 또는 글).
88
+ *
89
+ * A description to show in help (a message key or text).
90
+ *
91
+ * ヘルプに表示する説明(メッセージキーまたは文)。
92
+ *
93
+ * 显示在帮助中的说明(消息键或文字)。
94
+ */
22
95
  readonly label?: string;
23
96
  }
24
- /** 수정자를 고정 순서(Ctrl+Alt+Shift+Meta)로 정렬해 정규 패턴 문자열 생성. / Canonicalize a pattern string. */
97
+ /**
98
+ * 키 모양 글을 한 가지 표기로 맞춘다(수정자 순서 Ctrl+Alt+Shift+Meta, 키는 소문자). 두 표기가 같은 키인지 비교할 때 쓴다.
99
+ *
100
+ * Normalizes a key-pattern string to one spelling (modifiers in Ctrl+Alt+Shift+Meta order, key in lower case). Use it to compare whether two spellings mean the same key.
101
+ *
102
+ * キーの形の文字列を一つの表記にそろえます(修飾キーは Ctrl+Alt+Shift+Meta の順、キーは小文字)。二つの表記が同じキーかを比べるときに使います。
103
+ *
104
+ * 把按键形式的字符串统一成一种写法(修饰键按 Ctrl+Alt+Shift+Meta 顺序,键为小写)。用于比较两种写法是否是同一个键。
105
+ *
106
+ * @param pattern - 키 모양 글(예: `shift+ctrl+c`)
107
+ *
108
+ * Key-pattern string (e.g. `shift+ctrl+c`)
109
+ *
110
+ * キーの形の文字列(例: `shift+ctrl+c`)
111
+ *
112
+ * 按键形式字符串(例如 `shift+ctrl+c`)
113
+ *
114
+ * @returns 맞춘 글(예: `Ctrl+Shift+c`)
115
+ *
116
+ * The normalized string (e.g. `Ctrl+Shift+c`)
117
+ *
118
+ * そろえた文字列(例: `Ctrl+Shift+c`)
119
+ *
120
+ * 统一后的字符串(例如 `Ctrl+Shift+c`)
121
+ */
25
122
  export declare function normalizePattern(pattern: string): string;
26
- /** KeyStroke → 정규 패턴 문자열. / KeyStroke → canonical pattern string. */
123
+ /**
124
+ * 키 입력 한 번을 `normalizePattern` 과 같은 표기로 바꾼다.
125
+ *
126
+ * Converts one key press into the same spelling `normalizePattern` produces.
127
+ *
128
+ * キー入力 1 回を `normalizePattern` と同じ表記に変えます。
129
+ *
130
+ * 把一次按键转换成与 `normalizePattern` 相同的写法。
131
+ *
132
+ * @param k - 키 입력
133
+ *
134
+ * The key press
135
+ *
136
+ * キー入力
137
+ *
138
+ * 按键
139
+ *
140
+ * @returns 맞춘 글
141
+ *
142
+ * The normalized string
143
+ *
144
+ * そろえた文字列
145
+ *
146
+ * 统一后的字符串
147
+ */
27
148
  export declare function strokeToPattern(k: KeyStroke): string;
28
149
  /**
29
- * 키보드 인터랙션 모델 — 모드·등록소·충돌·IME 가드·파리티 계측(REQ-T9-829).
30
- * / Keyboard interaction model — mode, registry, conflicts, IME guard, parity metrics.
150
+ * `strokeFromEvent` 가 받는 키 이벤트 모양. DOM `KeyboardEvent` 가 그대로 맞는다.
151
+ *
152
+ * The key-event shape `strokeFromEvent` accepts; a DOM `KeyboardEvent` fits as is.
153
+ *
154
+ * `strokeFromEvent` が受け取るキーイベントの形。DOM の `KeyboardEvent` がそのまま当てはまります。
155
+ *
156
+ * `strokeFromEvent` 接收的按键事件形状;DOM 的 `KeyboardEvent` 可直接使用。
157
+ */
158
+ export interface KeyEventLike {
159
+ readonly key: string;
160
+ readonly ctrlKey: boolean;
161
+ readonly shiftKey: boolean;
162
+ readonly altKey: boolean;
163
+ readonly metaKey: boolean;
164
+ readonly isComposing?: boolean;
165
+ }
166
+ /**
167
+ * 키보드 이벤트(`KeyboardEvent`)를 모델이 받는 `KeyStroke` 로 바꾼다.
168
+ *
169
+ * Converts a keyboard event (`KeyboardEvent`) into the `KeyStroke` the model takes.
170
+ *
171
+ * キーボードイベント(`KeyboardEvent`)を、モデルが受け取る `KeyStroke` に変えます。
172
+ *
173
+ * 把键盘事件(`KeyboardEvent`)转换成模型接收的 `KeyStroke`。
174
+ *
175
+ * @param e - 키보드 이벤트
176
+ *
177
+ * The keyboard event
178
+ *
179
+ * キーボードイベント
180
+ *
181
+ * 键盘事件
182
+ *
183
+ * @returns 키 입력
184
+ *
185
+ * The key press
186
+ *
187
+ * キー入力
188
+ *
189
+ * 按键
190
+ *
191
+ * @example
192
+ * gridHost.addEventListener('keydown', (e) => {
193
+ * const command = keys.resolve(keys.mode(), strokeFromEvent(e));
194
+ * if (command) run(command);
195
+ * });
196
+ */
197
+ export declare function strokeFromEvent(e: KeyEventLike): KeyStroke;
198
+ /**
199
+ * 단축키 표. 키 입력을 받아 그 키가 뜻하는 명령 이름을 돌려준다(모드별 단축키·모든 모드 단축키·IME 조합 중 Enter 무시).
200
+ * 마우스로 할 수 있는 명령을 선언해 두면 키보드로 못 하는 명령이 무엇인지도 알려 준다.
201
+ *
202
+ * A shortcut table. Given a key press it returns the name of the command that key means (per-mode shortcuts, all-mode shortcuts, Enter ignored while an IME is composing).
203
+ * If you declare the commands reachable by mouse, it also tells you which ones have no keyboard way.
204
+ *
205
+ * ショートカット表。キー入力を受け取り、そのキーが意味するコマンド名を返します(モード別ショートカット・全モード共通ショートカット・IME 組み立て中の Enter は無視)。
206
+ * マウスでできるコマンドを宣言しておけば、キーボードでできないコマンドが何かも教えてくれます。
207
+ *
208
+ * 快捷键表。接收按键并返回该键表示的命令名称(按模式的快捷键、所有模式通用的快捷键、输入法组字中的 Enter 会被忽略)。
209
+ * 如果声明了鼠标可以执行的命令,它还会告诉你哪些命令无法用键盘完成。
210
+ *
211
+ * @example
212
+ * const keys = new KeyboardInteractionModel();
213
+ * keys.register({ mode: 'nav', pattern: 'S', commandId: 'sort' });
214
+ * keys.register({ mode: '*', pattern: 'Ctrl+C', commandId: 'copy' });
215
+ * keys.resolve('nav', strokeFromEvent(event)); // 'sort' | 'copy' | null
31
216
  */
32
217
  export declare class KeyboardInteractionModel {
33
218
  /** 저장 키 = `${mode}|${normalizedPattern}`. / Storage key = `${mode}|${normalizedPattern}`. */
34
219
  private _bindings;
35
- /** 마우스로 도달 가능한 커맨드 인벤토리(파리티 분모). / Mouse-reachable command inventory (parity denominator). */
220
+ /** 마우스로 할 수 있다고 알린 명령들(parityReport 의 전체 수). / Commands declared as mouse-reachable (the total in parityReport). */
36
221
  private _mouseCommands;
37
222
  private _mode;
38
- /** 바인딩 등록. 같은 (mode,pattern) 충돌 시 기존을 정직 반환(덮어쓰지 않음). / Register; returns any conflict. */
223
+ /**
224
+ * 단축키를 등록한다. 같은 모드·같은 키가 이미 있으면 덮어쓰지 않고 그 기존 것을 `conflict` 로 돌려준다.
225
+ *
226
+ * Registers a shortcut. If the same mode and key already exist it does not overwrite; it returns the existing one as `conflict`.
227
+ *
228
+ * ショートカットを登録します。同じモード・同じキーがすでにあれば上書きせず、その既存のものを `conflict` として返します。
229
+ *
230
+ * 注册快捷键。如果已有相同模式、相同键,不会覆盖,而是把已有的作为 `conflict` 返回。
231
+ *
232
+ * @param b - 단축키
233
+ *
234
+ * The shortcut
235
+ *
236
+ * ショートカット
237
+ *
238
+ * 快捷键
239
+ *
240
+ * @returns 충돌이 없으면 `{}`, 있으면 `{ conflict }`
241
+ *
242
+ * `{}` when there is no conflict, otherwise `{ conflict }`
243
+ *
244
+ * 衝突がなければ `{}`、あれば `{ conflict }`
245
+ *
246
+ * 没有冲突时为 `{}`,否则为 `{ conflict }`
247
+ */
39
248
  register(b: KeyBinding): {
40
249
  conflict?: KeyBinding;
41
250
  };
42
- /** 마우스로 도달 가능한 커맨드를 파리티 인벤토리에 선언. / Declare a mouse-reachable command for the parity inventory. */
251
+ /**
252
+ * 마우스로 할 수 있는 명령을 알려 둔다. `parityReport()` 가 키보드로 못 하는 명령을 찾을 때 이 목록과 비교한다.
253
+ *
254
+ * Declares a command that can be done with the mouse. `parityReport()` compares against this list to find commands with no keyboard way.
255
+ *
256
+ * マウスでできるコマンドを知らせておきます。`parityReport()` はキーボードでできないコマンドを探すとき、この一覧と比べます。
257
+ *
258
+ * 声明一个可以用鼠标执行的命令。`parityReport()` 查找无法用键盘完成的命令时会与这个列表比较。
259
+ *
260
+ * @param commandId - 명령 이름
261
+ *
262
+ * Command name
263
+ *
264
+ * コマンド名
265
+ *
266
+ * 命令名称
267
+ */
43
268
  declareMouseCommand(commandId: string): void;
44
269
  /**
45
- * 키 → commandId 라우팅. 모드 전용 바인딩 우선, 없으면 `'*'`(전 모드). IME 조합 중 커밋 소거.
46
- * / Route a key to a commandId. Mode-specific first, then `'*'`. Suppress commit during IME.
270
+ * 키 입력이 뜻하는 명령 이름을 찾는다. 그 모드 전용 단축키를 먼저 보고, 없으면 모든 모드(`'*'`) 단축키를 본다. IME 조합 중의 Enter 는 `null`.
271
+ *
272
+ * Finds the command a key press means. It checks shortcuts for that mode first, then all-mode (`'*'`) shortcuts. Enter while an IME is composing gives `null`.
273
+ *
274
+ * キー入力が意味するコマンド名を探します。そのモード専用のショートカットを先に見て、なければ全モード(`'*'`)のショートカットを見ます。IME 組み立て中の Enter は `null`。
275
+ *
276
+ * 查找按键表示的命令名称。先看该模式专用的快捷键,没有再看所有模式(`'*'`)的快捷键。输入法组字中的 Enter 返回 `null`。
277
+ *
278
+ * @param mode - 지금 모드
279
+ *
280
+ * The current mode
281
+ *
282
+ * 現在のモード
283
+ *
284
+ * 当前模式
285
+ *
286
+ * @param k - 키 입력(`strokeFromEvent(e)` 로 만든다)
287
+ *
288
+ * The key press (build it with `strokeFromEvent(e)`)
289
+ *
290
+ * キー入力(`strokeFromEvent(e)` で作ります)
291
+ *
292
+ * 按键(用 `strokeFromEvent(e)` 构造)
293
+ *
294
+ * @returns 명령 이름, 없으면 `null`
295
+ *
296
+ * The command name, or `null`
297
+ *
298
+ * コマンド名、なければ `null`
299
+ *
300
+ * 命令名称,没有则为 `null`
47
301
  */
48
302
  resolve(mode: InteractionMode, k: KeyStroke): string | null;
303
+ /**
304
+ * 지금 모드를 돌려준다.
305
+ *
306
+ * Returns the current mode.
307
+ *
308
+ * 現在のモードを返します。
309
+ *
310
+ * 返回当前模式。
311
+ */
49
312
  mode(): InteractionMode;
313
+ /**
314
+ * 모드를 바꾼다(예: 편집을 시작하면 `edit`).
315
+ *
316
+ * Changes the mode (e.g. `edit` when editing starts).
317
+ *
318
+ * モードを変えます(例: 編集を始めたら `edit`)。
319
+ *
320
+ * 切换模式(例如开始编辑时设为 `edit`)。
321
+ *
322
+ * @param m - 새 모드
323
+ *
324
+ * The new mode
325
+ *
326
+ * 新しいモード
327
+ *
328
+ * 新模式
329
+ */
50
330
  setMode(m: InteractionMode): void;
51
331
  /**
52
- * 마우스 인벤토리 대비 키보드 도달 커버리지(파리티 게이트 계측, REQ-T9-829 AC).
53
- * / Keyboard-reach coverage vs the mouse inventory (parity gate; REQ-T9-829 AC).
332
+ * `declareMouseCommand` 로 알린 명령 가운데 단축키가 없는 것을 알려 준다. 「마우스 없이 모든 기능을 쓸 수 있나」를 재는 데 쓴다.
333
+ *
334
+ * Reports which commands declared with `declareMouseCommand` have no shortcut — a measure of whether everything can be done without a mouse.
335
+ *
336
+ * `declareMouseCommand` で知らせたコマンドのうち、ショートカットがないものを教えます。「マウスなしですべての機能を使えるか」を測るのに使います。
337
+ *
338
+ * 报告用 `declareMouseCommand` 声明的命令中哪些没有快捷键,用来衡量「不用鼠标能否使用全部功能」。
339
+ *
340
+ * @returns `mouseOnly`=단축키 없는 명령, `covered`/`total`=단축키 있는 수/전체 수
341
+ *
342
+ * `mouseOnly` = commands without a shortcut; `covered`/`total` = count with a shortcut / all
343
+ *
344
+ * `mouseOnly`=ショートカットのないコマンド、`covered`/`total`=ショートカットのある数/全体の数
345
+ *
346
+ * `mouseOnly`=没有快捷键的命令;`covered`/`total`=有快捷键的数量/总数
54
347
  */
55
348
  parityReport(): {
56
349
  mouseOnly: string[];
57
350
  covered: number;
58
351
  total: number;
59
352
  };
60
- /** 등록된 바인딩 수. / Number of registered bindings. */
353
+ /**
354
+ * 등록된 단축키 수.
355
+ *
356
+ * Number of registered shortcuts.
357
+ *
358
+ * 登録されたショートカットの数。
359
+ *
360
+ * 已注册的快捷键数量。
361
+ */
61
362
  size(): number;
62
363
  private _guardIme;
63
364
  private _storeKey;