@tradecanvas/chart 1.71.0 → 1.72.1
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.
- package/dist/LayoutSession-DO4bYkUi.cjs +2 -0
- package/dist/LayoutSession-DO4bYkUi.cjs.map +1 -0
- package/dist/{LayoutSession-BOQCN6yY.js → LayoutSession-qRYG8GTD.js} +539 -552
- package/dist/LayoutSession-qRYG8GTD.js.map +1 -0
- package/dist/WidgetCommandPalette-CeCLHPy1.js +177 -0
- package/dist/WidgetCommandPalette-CeCLHPy1.js.map +1 -0
- package/dist/WidgetCommandPalette-ZZNbWwCZ.cjs +2 -0
- package/dist/WidgetCommandPalette-ZZNbWwCZ.cjs.map +1 -0
- package/dist/WidgetDrawingSettings-BeW8fX7r.js +474 -0
- package/dist/WidgetDrawingSettings-BeW8fX7r.js.map +1 -0
- package/dist/WidgetDrawingSettings-Cyl2u_u8.cjs +2 -0
- package/dist/WidgetDrawingSettings-Cyl2u_u8.cjs.map +1 -0
- package/dist/WidgetGoToDate-BNdngHlg.cjs +2 -0
- package/dist/WidgetGoToDate-BNdngHlg.cjs.map +1 -0
- package/dist/WidgetGoToDate-hcDtezRm.js +191 -0
- package/dist/WidgetGoToDate-hcDtezRm.js.map +1 -0
- package/dist/WidgetHotkeySheet-1lRFSdvt.js +416 -0
- package/dist/WidgetHotkeySheet-1lRFSdvt.js.map +1 -0
- package/dist/WidgetHotkeySheet-y5LWKSG6.cjs +2 -0
- package/dist/WidgetHotkeySheet-y5LWKSG6.cjs.map +1 -0
- package/dist/WidgetIndicatorPicker-CGvZ5kYd.js +245 -0
- package/dist/WidgetIndicatorPicker-CGvZ5kYd.js.map +1 -0
- package/dist/WidgetIndicatorPicker-DuKJFPRC.cjs +2 -0
- package/dist/WidgetIndicatorPicker-DuKJFPRC.cjs.map +1 -0
- package/dist/WidgetIndicatorSettings-C7vpco6e.cjs +2 -0
- package/dist/WidgetIndicatorSettings-C7vpco6e.cjs.map +1 -0
- package/dist/WidgetIndicatorSettings-dDkqzzYo.js +326 -0
- package/dist/WidgetIndicatorSettings-dDkqzzYo.js.map +1 -0
- package/dist/WidgetSettings-D7Pq42zW.cjs +2 -0
- package/dist/WidgetSettings-D7Pq42zW.cjs.map +1 -0
- package/dist/WidgetSettings-eOo93L7Z.js +546 -0
- package/dist/WidgetSettings-eOo93L7Z.js.map +1 -0
- package/dist/WidgetSymbolSearch-C4OR42nZ.cjs +2 -0
- package/dist/WidgetSymbolSearch-C4OR42nZ.cjs.map +1 -0
- package/dist/WidgetSymbolSearch-CvPpjIwa.js +580 -0
- package/dist/WidgetSymbolSearch-CvPpjIwa.js.map +1 -0
- package/dist/focusTrap-Br9Zfje0.js +27 -0
- package/dist/focusTrap-Br9Zfje0.js.map +1 -0
- package/dist/focusTrap-DrhhmG0V.cjs +2 -0
- package/dist/focusTrap-DrhhmG0V.cjs.map +1 -0
- package/dist/i18n-C2nQBZTY.cjs +2 -0
- package/dist/i18n-C2nQBZTY.cjs.map +1 -0
- package/dist/{i18n-DUmd4Z_r.js → i18n-C5v6Tzp1.js} +3 -1
- package/dist/i18n-C5v6Tzp1.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/indicatorInputWords-Bd9Pt6qp.js +25 -0
- package/dist/indicatorInputWords-Bd9Pt6qp.js.map +1 -0
- package/dist/indicatorInputWords-CTA4IcJR.cjs +2 -0
- package/dist/indicatorInputWords-CTA4IcJR.cjs.map +1 -0
- package/dist/indicatorLabel-BNZvaOcl.cjs +2 -0
- package/dist/indicatorLabel-BNZvaOcl.cjs.map +1 -0
- package/dist/indicatorLabel-Sbegyhp2.js +17 -0
- package/dist/indicatorLabel-Sbegyhp2.js.map +1 -0
- package/dist/indicatorSettingsTabs-B0liE3ST.cjs +2 -0
- package/dist/indicatorSettingsTabs-B0liE3ST.cjs.map +1 -0
- package/dist/indicatorSettingsTabs-XcgMdbLp.js +161 -0
- package/dist/indicatorSettingsTabs-XcgMdbLp.js.map +1 -0
- package/dist/monthView-B-CieFDJ.cjs +2 -0
- package/dist/monthView-B-CieFDJ.cjs.map +1 -0
- package/dist/monthView-N8yDaTqZ.js +198 -0
- package/dist/monthView-N8yDaTqZ.js.map +1 -0
- package/dist/platformKeys-B82-j1Fs.cjs +2 -0
- package/dist/platformKeys-B82-j1Fs.cjs.map +1 -0
- package/dist/platformKeys-Dd1qOCjF.js +5 -0
- package/dist/platformKeys-Dd1qOCjF.js.map +1 -0
- package/dist/settingsControls-DIjzCFHI.js +379 -0
- package/dist/settingsControls-DIjzCFHI.js.map +1 -0
- package/dist/settingsControls-Tn8_vJJv.cjs +2 -0
- package/dist/settingsControls-Tn8_vJJv.cjs.map +1 -0
- package/dist/symbolCatalog-CA1fpz3s.js +90 -0
- package/dist/symbolCatalog-CA1fpz3s.js.map +1 -0
- package/dist/symbolCatalog-Dx1YnZgm.cjs +2 -0
- package/dist/symbolCatalog-Dx1YnZgm.cjs.map +1 -0
- package/dist/widget/ChartWidget.d.ts +102 -582
- package/dist/widget/ChartWidget.d.ts.map +1 -1
- package/dist/widget/WidgetAlerts.d.ts +35 -0
- package/dist/widget/WidgetAlerts.d.ts.map +1 -0
- package/dist/widget/WidgetChartSettings.d.ts +194 -0
- package/dist/widget/WidgetChartSettings.d.ts.map +1 -0
- package/dist/widget/WidgetCommands.d.ts +54 -0
- package/dist/widget/WidgetCommands.d.ts.map +1 -0
- package/dist/widget/WidgetCompares.d.ts +140 -0
- package/dist/widget/WidgetCompares.d.ts.map +1 -0
- package/dist/widget/WidgetDockArea.d.ts +89 -0
- package/dist/widget/WidgetDockArea.d.ts.map +1 -0
- package/dist/widget/WidgetDrawingEdit.d.ts +73 -0
- package/dist/widget/WidgetDrawingEdit.d.ts.map +1 -0
- package/dist/widget/WidgetGoToDate.d.ts +1 -14
- package/dist/widget/WidgetGoToDate.d.ts.map +1 -1
- package/dist/widget/WidgetIndicatorSettings.d.ts.map +1 -1
- package/dist/widget/WidgetIntervals.d.ts +66 -0
- package/dist/widget/WidgetIntervals.d.ts.map +1 -0
- package/dist/widget/WidgetLayouts.d.ts +85 -0
- package/dist/widget/WidgetLayouts.d.ts.map +1 -0
- package/dist/widget/WidgetLegendView.d.ts +54 -0
- package/dist/widget/WidgetLegendView.d.ts.map +1 -0
- package/dist/widget/WidgetMenus.d.ts +79 -0
- package/dist/widget/WidgetMenus.d.ts.map +1 -0
- package/dist/widget/WidgetReplay.d.ts +199 -0
- package/dist/widget/WidgetReplay.d.ts.map +1 -0
- package/dist/widget/WidgetTrading.d.ts +48 -0
- package/dist/widget/WidgetTrading.d.ts.map +1 -0
- package/dist/widget/WidgetWatchlists.d.ts +77 -0
- package/dist/widget/WidgetWatchlists.d.ts.map +1 -0
- package/dist/widget/drawingSettingsTabs.d.ts +2 -19
- package/dist/widget/drawingSettingsTabs.d.ts.map +1 -1
- package/dist/widget/drawingText.d.ts +24 -0
- package/dist/widget/drawingText.d.ts.map +1 -0
- package/dist/widget/index.cjs +22 -23
- package/dist/widget/index.cjs.map +1 -1
- package/dist/widget/index.js +6193 -9868
- package/dist/widget/index.js.map +1 -1
- package/dist/widget/keyTarget.d.ts +4 -0
- package/dist/widget/keyTarget.d.ts.map +1 -1
- package/dist/widget/lazyPart.d.ts +47 -0
- package/dist/widget/lazyPart.d.ts.map +1 -0
- package/dist/widget/locales/ar.d.ts.map +1 -1
- package/dist/widget/locales/cs.d.ts.map +1 -1
- package/dist/widget/locales/da.d.ts.map +1 -1
- package/dist/widget/locales/de.d.ts.map +1 -1
- package/dist/widget/locales/el.d.ts.map +1 -1
- package/dist/widget/locales/en.d.ts +1 -0
- package/dist/widget/locales/en.d.ts.map +1 -1
- package/dist/widget/locales/es.d.ts.map +1 -1
- package/dist/widget/locales/et.d.ts.map +1 -1
- package/dist/widget/locales/fa.d.ts.map +1 -1
- package/dist/widget/locales/fr.d.ts.map +1 -1
- package/dist/widget/locales/he.d.ts.map +1 -1
- package/dist/widget/locales/hu.d.ts.map +1 -1
- package/dist/widget/locales/id.d.ts.map +1 -1
- package/dist/widget/locales/index.cjs +1 -1
- package/dist/widget/locales/index.cjs.map +1 -1
- package/dist/widget/locales/index.js +29 -1
- package/dist/widget/locales/index.js.map +1 -1
- package/dist/widget/locales/it.d.ts.map +1 -1
- package/dist/widget/locales/ja.d.ts.map +1 -1
- package/dist/widget/locales/ko.d.ts.map +1 -1
- package/dist/widget/locales/ms.d.ts.map +1 -1
- package/dist/widget/locales/nb.d.ts.map +1 -1
- package/dist/widget/locales/nl.d.ts.map +1 -1
- package/dist/widget/locales/pl.d.ts.map +1 -1
- package/dist/widget/locales/pt.d.ts.map +1 -1
- package/dist/widget/locales/ro.d.ts.map +1 -1
- package/dist/widget/locales/ru.d.ts.map +1 -1
- package/dist/widget/locales/sk.d.ts.map +1 -1
- package/dist/widget/locales/sv.d.ts.map +1 -1
- package/dist/widget/locales/th.d.ts.map +1 -1
- package/dist/widget/locales/tr.d.ts.map +1 -1
- package/dist/widget/locales/vi.d.ts.map +1 -1
- package/dist/widget/locales/zh.d.ts.map +1 -1
- package/dist/widget/locales/zhHant.d.ts.map +1 -1
- package/dist/widget/pageEnv.d.ts +5 -0
- package/dist/widget/pageEnv.d.ts.map +1 -0
- package/dist/widget/signals.d.ts +41 -0
- package/dist/widget/signals.d.ts.map +1 -0
- package/dist/widget/wallTime.d.ts +15 -0
- package/dist/widget/wallTime.d.ts.map +1 -0
- package/dist/widget/widgetDialogs.d.ts +17 -0
- package/dist/widget/widgetDialogs.d.ts.map +1 -0
- package/dist/widgetFeatures-BM6u0u74.js +186 -0
- package/dist/widgetFeatures-BM6u0u74.js.map +1 -0
- package/dist/widgetFeatures-BZ8OVPN2.cjs +3 -0
- package/dist/widgetFeatures-BZ8OVPN2.cjs.map +1 -0
- package/dist/widgetLocales-BPK5i0Ok.cjs +2 -0
- package/dist/widgetLocales-BPK5i0Ok.cjs.map +1 -0
- package/dist/widgetLocales-DgTR8JSu.js +838 -0
- package/dist/widgetLocales-DgTR8JSu.js.map +1 -0
- package/package.json +3 -3
- package/dist/LayoutSession-BOQCN6yY.js.map +0 -1
- package/dist/LayoutSession-RF8OqOXy.cjs +0 -2
- package/dist/LayoutSession-RF8OqOXy.cjs.map +0 -1
- package/dist/i18n-BsstZ9md.cjs +0 -2
- package/dist/i18n-BsstZ9md.cjs.map +0 -1
- package/dist/i18n-DUmd4Z_r.js.map +0 -1
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
import { i as e, n as t } from "./focusTrap-Br9Zfje0.js";
|
|
2
|
+
import { n, t as r } from "./platformKeys-Dd1qOCjF.js";
|
|
3
|
+
//#region src/widget/WidgetHotkeySheet.ts
|
|
4
|
+
var i = 229, a = {
|
|
5
|
+
"Search & navigation": "hotkeys.group.searchNavigation",
|
|
6
|
+
"Chart manipulation": "hotkeys.group.chartManipulation",
|
|
7
|
+
"Touch (mobile / tablet)": "hotkeys.group.touch",
|
|
8
|
+
Keyboard: "hotkeys.group.keyboard",
|
|
9
|
+
"Bar replay": "toolbar.replay",
|
|
10
|
+
Drawing: "hotkeys.group.drawing",
|
|
11
|
+
More: "hotkeys.group.more"
|
|
12
|
+
}, o = r, s = [
|
|
13
|
+
{
|
|
14
|
+
title: "Search & navigation",
|
|
15
|
+
entries: [
|
|
16
|
+
{
|
|
17
|
+
keys: [o, "K"],
|
|
18
|
+
label: "hotkeys.commandPalette",
|
|
19
|
+
feature: "hotkeys.commandPalette"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
keys: [o, "P"],
|
|
23
|
+
label: "hotkeys.symbolSearch",
|
|
24
|
+
feature: "hotkeys.symbolSearch"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
keys: ["Alt", "G"],
|
|
28
|
+
label: "hotkeys.goToDate",
|
|
29
|
+
feature: "hotkeys.goToDate"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
keys: ["Alt", "I"],
|
|
33
|
+
label: "hotkeys.invertScale",
|
|
34
|
+
feature: "hotkeys.invertScale"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
keys: ["Alt", "R"],
|
|
38
|
+
label: "chartMenu.resetView",
|
|
39
|
+
feature: "hotkeys.resetView"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
keys: [o, "S"],
|
|
43
|
+
label: "hotkeys.saveLayout",
|
|
44
|
+
feature: "hotkeys.save"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
keys: ["0–9"],
|
|
48
|
+
label: "hotkeys.typeInterval",
|
|
49
|
+
feature: "intervalTyping"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
keys: ["A–Z"],
|
|
53
|
+
label: "hotkeys.typeSymbol",
|
|
54
|
+
feature: "symbolTyping"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
keys: ["?"],
|
|
58
|
+
label: "hotkeys.showSheet",
|
|
59
|
+
feature: "hotkeys.help"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
title: "Chart manipulation",
|
|
65
|
+
entries: [
|
|
66
|
+
{
|
|
67
|
+
keys: ["key.drag"],
|
|
68
|
+
label: "hotkeys.pan"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
keys: [o, "key.drag"],
|
|
72
|
+
label: "hotkeys.boxSelect"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
keys: [o, "key.click"],
|
|
76
|
+
label: "hotkeys.toggleSelect"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
keys: ["Shift", "key.drag"],
|
|
80
|
+
label: "hotkeys.measure"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
keys: ["key.drag", "key.priceAxis"],
|
|
84
|
+
label: "hotkeys.scalePrice"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
keys: ["key.drag", "key.timeAxis"],
|
|
88
|
+
label: "hotkeys.zoomTime"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
keys: ["key.doubleClick", "key.priceAxis"],
|
|
92
|
+
label: "hotkeys.autoScale"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
keys: ["key.doubleClick", "key.timeAxis"],
|
|
96
|
+
label: "hotkeys.fit"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
keys: ["key.scroll"],
|
|
100
|
+
label: "hotkeys.zoomCursor"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
title: "Touch (mobile / tablet)",
|
|
106
|
+
entries: [
|
|
107
|
+
{
|
|
108
|
+
keys: ["key.oneFinger", "key.drag"],
|
|
109
|
+
label: "hotkeys.touchPan"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
keys: ["key.twoFingers", "key.pinch"],
|
|
113
|
+
label: "hotkeys.pinch"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
keys: ["key.longPress"],
|
|
117
|
+
label: "hotkeys.longPress"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
keys: ["key.drag", "key.axisStrip"],
|
|
121
|
+
label: "hotkeys.touchAxis"
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
title: "Keyboard",
|
|
127
|
+
entries: [
|
|
128
|
+
{
|
|
129
|
+
keys: ["←", "→"],
|
|
130
|
+
label: "hotkeys.panBar"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
keys: ["+", "−"],
|
|
134
|
+
label: "hotkeys.zoomInOut"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
keys: ["Home"],
|
|
138
|
+
label: "hotkeys.toStart"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
keys: ["End"],
|
|
142
|
+
label: "hotkeys.toEnd"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
keys: ["Space"],
|
|
146
|
+
label: "hotkeys.fit"
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
title: "Bar replay",
|
|
152
|
+
entries: [
|
|
153
|
+
{
|
|
154
|
+
keys: [
|
|
155
|
+
"Shift",
|
|
156
|
+
"←",
|
|
157
|
+
"→"
|
|
158
|
+
],
|
|
159
|
+
label: "hotkeys.replayStep",
|
|
160
|
+
feature: "replay"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
keys: ["Space"],
|
|
164
|
+
label: "hotkeys.replayPlay",
|
|
165
|
+
feature: "replay"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
keys: ["Esc"],
|
|
169
|
+
label: "hotkeys.replayCancel",
|
|
170
|
+
feature: "replay"
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
title: "Drawing",
|
|
176
|
+
entries: [
|
|
177
|
+
{
|
|
178
|
+
keys: [o, "Z"],
|
|
179
|
+
label: "hotkeys.undo"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
keys: [
|
|
183
|
+
o,
|
|
184
|
+
"Shift",
|
|
185
|
+
"Z"
|
|
186
|
+
],
|
|
187
|
+
label: "hotkeys.redo"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
keys: ["Esc"],
|
|
191
|
+
label: "hotkeys.cancelDrawing"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
keys: [o, "C"],
|
|
195
|
+
label: "hotkeys.copy"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
keys: [o, "V"],
|
|
199
|
+
label: "hotkeys.paste"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
keys: ["key.rightClick"],
|
|
203
|
+
label: "hotkeys.drawingMenu"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
keys: ["key.doubleClick"],
|
|
207
|
+
label: "hotkeys.drawingSettings"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
keys: [o, "G"],
|
|
211
|
+
label: "hotkeys.group"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
keys: [
|
|
215
|
+
o,
|
|
216
|
+
"Shift",
|
|
217
|
+
"G"
|
|
218
|
+
],
|
|
219
|
+
label: "hotkeys.ungroup"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
keys: [
|
|
223
|
+
o,
|
|
224
|
+
"]",
|
|
225
|
+
"["
|
|
226
|
+
],
|
|
227
|
+
label: "hotkeys.orderStep"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
keys: [
|
|
231
|
+
o,
|
|
232
|
+
"Shift",
|
|
233
|
+
"]",
|
|
234
|
+
"["
|
|
235
|
+
],
|
|
236
|
+
label: "hotkeys.orderEnd"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
keys: ["Enter"],
|
|
240
|
+
label: "hotkeys.finishPath"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
keys: [o, "key.drag"],
|
|
244
|
+
label: "hotkeys.copyDrag"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
keys: ["Shift"],
|
|
248
|
+
label: "hotkeys.keepAngle"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
keys: [o],
|
|
252
|
+
label: "hotkeys.flipMagnet"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
keys: [
|
|
256
|
+
"←",
|
|
257
|
+
"→",
|
|
258
|
+
"↑",
|
|
259
|
+
"↓"
|
|
260
|
+
],
|
|
261
|
+
label: "hotkeys.nudge"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
keys: ["Alt", "T"],
|
|
265
|
+
label: "tool.trendLine",
|
|
266
|
+
feature: "hotkeys.tools"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
keys: ["Alt", "H"],
|
|
270
|
+
label: "tool.horizontalLine",
|
|
271
|
+
feature: "hotkeys.tools"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
keys: ["Alt", "J"],
|
|
275
|
+
label: "tool.horizontalRay",
|
|
276
|
+
feature: "hotkeys.tools"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
keys: ["Alt", "V"],
|
|
280
|
+
label: "tool.verticalLine",
|
|
281
|
+
feature: "hotkeys.tools"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
keys: ["Alt", "C"],
|
|
285
|
+
label: "tool.crossLine",
|
|
286
|
+
feature: "hotkeys.tools"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
keys: ["Alt", "F"],
|
|
290
|
+
label: "tool.fibRetracement",
|
|
291
|
+
feature: "hotkeys.tools"
|
|
292
|
+
}
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
], c = 0, l = class {
|
|
296
|
+
backdrop = null;
|
|
297
|
+
bodyEl = null;
|
|
298
|
+
searchEl = null;
|
|
299
|
+
liveEl = null;
|
|
300
|
+
groups = [];
|
|
301
|
+
returnFocus = null;
|
|
302
|
+
uid = ++c;
|
|
303
|
+
constructor(e, t, n = () => document.body) {
|
|
304
|
+
this.callbacks = e, this.t = t, this.host = n;
|
|
305
|
+
}
|
|
306
|
+
open(e = {}) {
|
|
307
|
+
if (this.backdrop) return;
|
|
308
|
+
this.returnFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
309
|
+
let t = e.isOn ?? (() => !0), n = new Set((e.extra ?? []).map((e) => e.keys.join("+").toLowerCase()));
|
|
310
|
+
this.groups = s.map((e) => ({
|
|
311
|
+
title: e.title,
|
|
312
|
+
entries: e.entries.filter((e) => (!e.feature || t(e.feature)) && !n.has(e.keys.join("+").toLowerCase()))
|
|
313
|
+
})).filter((e) => e.entries.length > 0), e.extra && e.extra.length > 0 && this.groups.push({
|
|
314
|
+
title: "More",
|
|
315
|
+
entries: [...e.extra]
|
|
316
|
+
}), this.build(t("hotkeys.help")), this.render(), this.searchEl?.focus();
|
|
317
|
+
}
|
|
318
|
+
close() {
|
|
319
|
+
if (!this.backdrop) return;
|
|
320
|
+
this.backdrop.remove(), this.backdrop = this.bodyEl = this.searchEl = this.liveEl = null, this.callbacks.onClose();
|
|
321
|
+
let e = this.returnFocus;
|
|
322
|
+
this.returnFocus = null, e?.isConnected && e.focus();
|
|
323
|
+
}
|
|
324
|
+
isOpen() {
|
|
325
|
+
return this.backdrop !== null;
|
|
326
|
+
}
|
|
327
|
+
destroy() {
|
|
328
|
+
this.close();
|
|
329
|
+
}
|
|
330
|
+
build(n) {
|
|
331
|
+
let r = document.createElement("div");
|
|
332
|
+
r.className = "tcw-modal-backdrop";
|
|
333
|
+
let a = !1;
|
|
334
|
+
r.addEventListener("pointerdown", (e) => {
|
|
335
|
+
a = e.target === r;
|
|
336
|
+
}), r.addEventListener("click", (e) => {
|
|
337
|
+
e.target === r && a && this.close(), a = !1;
|
|
338
|
+
});
|
|
339
|
+
let o = document.createElement("div");
|
|
340
|
+
o.className = "tcw-modal tcw-hotkey-sheet", o.setAttribute("role", "dialog"), o.setAttribute("aria-modal", "true"), o.setAttribute("aria-labelledby", `tcw-hotkey-title-${this.uid}`), o.tabIndex = -1, o.addEventListener("keydown", (e) => {
|
|
341
|
+
if (e.stopPropagation(), e.key === "Escape" && !e.isComposing && e.keyCode !== i) {
|
|
342
|
+
e.preventDefault(), this.close();
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
t(e, o);
|
|
346
|
+
});
|
|
347
|
+
let s = document.createElement("div");
|
|
348
|
+
s.className = "tcw-modal-header";
|
|
349
|
+
let c = document.createElement("h3");
|
|
350
|
+
c.id = `tcw-hotkey-title-${this.uid}`, c.textContent = this.t("hotkeys.title");
|
|
351
|
+
let l = document.createElement("button");
|
|
352
|
+
l.type = "button", l.className = "tcw-modal-close", l.setAttribute("aria-label", this.t("hotkeys.close")), l.innerHTML = e("x", 16), l.addEventListener("click", () => this.close()), s.append(c, l);
|
|
353
|
+
let u = document.createElement("label");
|
|
354
|
+
u.className = "tcw-ss-search tcw-hotkey-search", u.innerHTML = e("search", 16);
|
|
355
|
+
let d = document.createElement("input");
|
|
356
|
+
d.type = "search", d.placeholder = this.t("hotkeys.search"), d.setAttribute("aria-label", this.t("hotkeys.search")), d.autocomplete = "off", d.spellcheck = !1, d.addEventListener("input", () => this.render()), u.appendChild(d);
|
|
357
|
+
let f = document.createElement("div");
|
|
358
|
+
f.className = "tcw-hotkey-body";
|
|
359
|
+
let p = document.createElement("div");
|
|
360
|
+
if (p.className = "tcw-hotkey-live tcw-visually-hidden", p.setAttribute("aria-live", "polite"), o.append(s, u, f, p), n) {
|
|
361
|
+
let e = document.createElement("div");
|
|
362
|
+
e.className = "tcw-hotkey-foot", e.textContent = this.t("hotkeys.footer"), o.appendChild(e);
|
|
363
|
+
}
|
|
364
|
+
r.appendChild(o), this.host().appendChild(r), this.backdrop = r, this.bodyEl = f, this.searchEl = d, this.liveEl = p;
|
|
365
|
+
}
|
|
366
|
+
render() {
|
|
367
|
+
let e = this.bodyEl;
|
|
368
|
+
if (!e) return;
|
|
369
|
+
let t = n((this.searchEl?.value ?? "").trim()), r = [];
|
|
370
|
+
for (let e of this.groups) {
|
|
371
|
+
let n = t ? e.entries.filter((e) => this.matches(e, t)) : e.entries;
|
|
372
|
+
if (n.length === 0) continue;
|
|
373
|
+
let i = document.createElement("section");
|
|
374
|
+
i.className = "tcw-hotkey-group";
|
|
375
|
+
let o = document.createElement("div");
|
|
376
|
+
o.className = "tcw-hotkey-heading";
|
|
377
|
+
let s = a[e.title];
|
|
378
|
+
o.textContent = s ? this.t(s) : e.title, i.append(o, ...n.map((e) => this.row(e))), r.push(i);
|
|
379
|
+
}
|
|
380
|
+
if (this.liveEl && (this.liveEl.textContent = r.length === 0 ? this.t("hotkeys.noMatch") : ""), r.length === 0) {
|
|
381
|
+
let t = document.createElement("div");
|
|
382
|
+
t.className = "tcw-hotkey-empty", t.textContent = this.t("hotkeys.noMatch"), e.replaceChildren(t);
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
let i = document.createElement("div");
|
|
386
|
+
i.className = "tcw-hotkey-columns", i.append(...r), e.replaceChildren(i);
|
|
387
|
+
}
|
|
388
|
+
label(e) {
|
|
389
|
+
return "text" in e ? e.text : this.t(e.label);
|
|
390
|
+
}
|
|
391
|
+
keyText(e) {
|
|
392
|
+
return e.startsWith("key.") ? this.t(e) : e;
|
|
393
|
+
}
|
|
394
|
+
matches(e, t) {
|
|
395
|
+
return n(this.label(e)).includes(t) ? !0 : n(e.keys.map((e) => this.keyText(e)).join("+")).includes(t);
|
|
396
|
+
}
|
|
397
|
+
row(e) {
|
|
398
|
+
let t = document.createElement("div");
|
|
399
|
+
t.className = "tcw-hotkey-row";
|
|
400
|
+
let n = document.createElement("span");
|
|
401
|
+
n.className = "tcw-hotkey-label", n.textContent = this.label(e);
|
|
402
|
+
let r = document.createElement("span");
|
|
403
|
+
return r.className = "tcw-hotkey-keys", r.dir = "ltr", e.keys.forEach((e, t) => {
|
|
404
|
+
if (t > 0) {
|
|
405
|
+
let e = document.createElement("span");
|
|
406
|
+
e.className = "tcw-hotkey-sep", e.textContent = "+", r.appendChild(e);
|
|
407
|
+
}
|
|
408
|
+
let n = e.startsWith("key."), i = document.createElement(n ? "span" : "kbd");
|
|
409
|
+
i.className = n ? "tcw-hotkey-gesture" : "tcw-hotkey-key", i.textContent = this.keyText(e), r.appendChild(i);
|
|
410
|
+
}), t.append(n, r), t;
|
|
411
|
+
}
|
|
412
|
+
};
|
|
413
|
+
//#endregion
|
|
414
|
+
export { l as WidgetHotkeySheet };
|
|
415
|
+
|
|
416
|
+
//# sourceMappingURL=WidgetHotkeySheet-1lRFSdvt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetHotkeySheet-1lRFSdvt.js","names":[],"sources":["../src/widget/WidgetHotkeySheet.ts"],"sourcesContent":["import type { MessageKey, Translator } from './i18n.js';\nimport type { WidgetFeature } from './widgetFeatures.js';\nimport { createIcon } from './icons.js';\nimport { keepTabInside } from './focusTrap.js';\nimport { MOD_KEY, searchForm } from './platformKeys.js';\n\n/**\n * Keyboard-shortcut reference sheet. Bound to `?` (and `Shift+/`). Surfaces\n * shortcuts so users discover the widget's hidden interaction model — a\n * premium-feel detail polished desktop tools all ship.\n */\nexport interface HotkeySheetCallbacks {\n onClose: () => void;\n}\n\n/** The key code a browser gives a key an input method takes. */\nconst IME_KEY_CODE = 229;\n\n// Group titles translate via this lookup; individual shortcut labels (and\n// the `keys` badges) stay English for now — see README \"Widget i18n\".\nconst GROUP_TITLE_KEYS: Record<string, MessageKey> = {\n 'Search & navigation': 'hotkeys.group.searchNavigation',\n 'Chart manipulation': 'hotkeys.group.chartManipulation',\n 'Touch (mobile / tablet)': 'hotkeys.group.touch',\n 'Keyboard': 'hotkeys.group.keyboard',\n 'Bar replay': 'toolbar.replay',\n 'Drawing': 'hotkeys.group.drawing',\n 'More': 'hotkeys.group.more',\n};\n\ninterface HotkeyEntry {\n keys: string[];\n label: string;\n /** The switch it goes with: left out of the sheet while that is off. */\n feature?: WidgetFeature;\n}\n\n/** A shortcut of the host's, shown as it was given. */\nexport interface HostHotkeyEntry {\n keys: string[];\n text: string;\n}\n\n/** What else the sheet shows: the switches that are on, and the host's shortcuts. */\nexport interface HotkeySheetOptions {\n isOn?: (feature: WidgetFeature) => boolean;\n extra?: readonly HostHotkeyEntry[];\n}\n\ninterface HotkeyGroup {\n title: string;\n entries: HotkeyEntry[];\n}\n\nconst mod = MOD_KEY;\n\nconst GROUPS: HotkeyGroup[] = [\n {\n title: 'Search & navigation',\n entries: [\n { keys: [mod, 'K'], label: 'hotkeys.commandPalette', feature: 'hotkeys.commandPalette' },\n { keys: [mod, 'P'], label: 'hotkeys.symbolSearch', feature: 'hotkeys.symbolSearch' },\n { keys: ['Alt', 'G'], label: 'hotkeys.goToDate', feature: 'hotkeys.goToDate' },\n { keys: ['Alt', 'I'], label: 'hotkeys.invertScale', feature: 'hotkeys.invertScale' },\n { keys: ['Alt', 'R'], label: 'chartMenu.resetView', feature: 'hotkeys.resetView' },\n { keys: [mod, 'S'], label: 'hotkeys.saveLayout', feature: 'hotkeys.save' },\n { keys: ['0–9'], label: 'hotkeys.typeInterval', feature: 'intervalTyping' },\n { keys: ['A–Z'], label: 'hotkeys.typeSymbol', feature: 'symbolTyping' },\n { keys: ['?'], label: 'hotkeys.showSheet', feature: 'hotkeys.help' },\n ],\n },\n {\n title: 'Chart manipulation',\n entries: [\n { keys: ['key.drag'], label: 'hotkeys.pan' },\n { keys: [mod, 'key.drag'], label: 'hotkeys.boxSelect' },\n { keys: [mod, 'key.click'], label: 'hotkeys.toggleSelect' },\n { keys: ['Shift', 'key.drag'], label: 'hotkeys.measure' },\n { keys: ['key.drag', 'key.priceAxis'], label: 'hotkeys.scalePrice' },\n { keys: ['key.drag', 'key.timeAxis'], label: 'hotkeys.zoomTime' },\n { keys: ['key.doubleClick', 'key.priceAxis'], label: 'hotkeys.autoScale' },\n { keys: ['key.doubleClick', 'key.timeAxis'], label: 'hotkeys.fit' },\n { keys: ['key.scroll'], label: 'hotkeys.zoomCursor' },\n ],\n },\n {\n title: 'Touch (mobile / tablet)',\n entries: [\n { keys: ['key.oneFinger', 'key.drag'], label: 'hotkeys.touchPan' },\n { keys: ['key.twoFingers', 'key.pinch'], label: 'hotkeys.pinch' },\n { keys: ['key.longPress'], label: 'hotkeys.longPress' },\n { keys: ['key.drag', 'key.axisStrip'], label: 'hotkeys.touchAxis' },\n ],\n },\n {\n title: 'Keyboard',\n entries: [\n { keys: ['←', '→'], label: 'hotkeys.panBar' },\n { keys: ['+', '−'], label: 'hotkeys.zoomInOut' },\n { keys: ['Home'], label: 'hotkeys.toStart' },\n { keys: ['End'], label: 'hotkeys.toEnd' },\n { keys: ['Space'], label: 'hotkeys.fit' },\n ],\n },\n {\n title: 'Bar replay',\n entries: [\n { keys: ['Shift', '←', '→'], label: 'hotkeys.replayStep', feature: 'replay' },\n // Outside a replay, Space fits the chart (above).\n { keys: ['Space'], label: 'hotkeys.replayPlay', feature: 'replay' },\n { keys: ['Esc'], label: 'hotkeys.replayCancel', feature: 'replay' },\n ],\n },\n {\n title: 'Drawing',\n entries: [\n { keys: [mod, 'Z'], label: 'hotkeys.undo' },\n { keys: [mod, 'Shift', 'Z'], label: 'hotkeys.redo' },\n { keys: ['Esc'], label: 'hotkeys.cancelDrawing' },\n { keys: [mod, 'C'], label: 'hotkeys.copy' },\n { keys: [mod, 'V'], label: 'hotkeys.paste' },\n { keys: ['key.rightClick'], label: 'hotkeys.drawingMenu' },\n { keys: ['key.doubleClick'], label: 'hotkeys.drawingSettings' },\n { keys: [mod, 'G'], label: 'hotkeys.group' },\n { keys: [mod, 'Shift', 'G'], label: 'hotkeys.ungroup' },\n { keys: [mod, ']', '['], label: 'hotkeys.orderStep' },\n { keys: [mod, 'Shift', ']', '['], label: 'hotkeys.orderEnd' },\n { keys: ['Enter'], label: 'hotkeys.finishPath' },\n { keys: [mod, 'key.drag'], label: 'hotkeys.copyDrag' },\n { keys: ['Shift'], label: 'hotkeys.keepAngle' },\n { keys: [mod], label: 'hotkeys.flipMagnet' },\n { keys: ['←', '→', '↑', '↓'], label: 'hotkeys.nudge' },\n { keys: ['Alt', 'T'], label: 'tool.trendLine', feature: 'hotkeys.tools' },\n { keys: ['Alt', 'H'], label: 'tool.horizontalLine', feature: 'hotkeys.tools' },\n { keys: ['Alt', 'J'], label: 'tool.horizontalRay', feature: 'hotkeys.tools' },\n { keys: ['Alt', 'V'], label: 'tool.verticalLine', feature: 'hotkeys.tools' },\n { keys: ['Alt', 'C'], label: 'tool.crossLine', feature: 'hotkeys.tools' },\n { keys: ['Alt', 'F'], label: 'tool.fibRetracement', feature: 'hotkeys.tools' },\n ],\n },\n];\n\nlet sheetSeq = 0;\n\n/**\n * The shortcut sheet: what each key does, by group, searchable by the words\n * or by the keys (\"alt+g\"). A gesture (drag, double-click) is written as\n * words, a key as a key. The keys switched off are left out; the host's\n * shortcuts come last, in place of a built-in one on the same keys.\n */\nexport class WidgetHotkeySheet {\n private backdrop: HTMLDivElement | null = null;\n private bodyEl: HTMLDivElement | null = null;\n private searchEl: HTMLInputElement | null = null;\n /** Says \"No shortcuts match\" to a screen reader. */\n private liveEl: HTMLDivElement | null = null;\n private groups: { title: string; entries: (HotkeyEntry | HostHotkeyEntry)[] }[] = [];\n private returnFocus: HTMLElement | null = null;\n private readonly uid = ++sheetSeq;\n\n /** Where the overlay mounts (the widget's portal: themed, and inside it when fullscreen). */\n constructor(\n private readonly callbacks: HotkeySheetCallbacks,\n private readonly t: Translator,\n private readonly host: () => HTMLElement = () => document.body,\n ) {}\n\n open(options: HotkeySheetOptions = {}): void {\n if (this.backdrop) return;\n this.returnFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null;\n const isOn = options.isOn ?? (() => true);\n // The widget's own, less those switched off (a whole group goes when all its keys do).\n // A host's shortcut on the same keys replaces the built-in one.\n const replaced = new Set((options.extra ?? []).map((e) => e.keys.join('+').toLowerCase()));\n this.groups = GROUPS\n .map((group) => ({\n title: group.title,\n entries: group.entries.filter((e) => (!e.feature || isOn(e.feature)) && !replaced.has(e.keys.join('+').toLowerCase())) as (HotkeyEntry | HostHotkeyEntry)[],\n }))\n .filter((group) => group.entries.length > 0);\n if (options.extra && options.extra.length > 0) this.groups.push({ title: 'More', entries: [...options.extra] });\n this.build(isOn('hotkeys.help'));\n this.render();\n this.searchEl?.focus();\n }\n\n close(): void {\n if (!this.backdrop) return;\n this.backdrop.remove();\n this.backdrop = this.bodyEl = this.searchEl = this.liveEl = null;\n this.callbacks.onClose();\n const back = this.returnFocus;\n this.returnFocus = null;\n if (back?.isConnected) back.focus();\n }\n\n isOpen(): boolean {\n return this.backdrop !== null;\n }\n\n destroy(): void {\n this.close();\n }\n\n /** The sheet; `withFoot` says how to open it again (while its key is on). */\n private build(withFoot: boolean): void {\n const backdrop = document.createElement('div');\n backdrop.className = 'tcw-modal-backdrop';\n // A press that starts in the sheet and ends on the backdrop doesn't close it.\n let pressedBackdrop = false;\n backdrop.addEventListener('pointerdown', (e) => {\n pressedBackdrop = e.target === backdrop;\n });\n backdrop.addEventListener('click', (e) => {\n if (e.target === backdrop && pressedBackdrop) this.close();\n pressedBackdrop = false;\n });\n\n const modal = document.createElement('div');\n modal.className = 'tcw-modal tcw-hotkey-sheet';\n modal.setAttribute('role', 'dialog');\n modal.setAttribute('aria-modal', 'true');\n modal.setAttribute('aria-labelledby', `tcw-hotkey-title-${this.uid}`);\n modal.tabIndex = -1;\n modal.addEventListener('keydown', (e) => {\n e.stopPropagation(); // keys here must not drive chart shortcuts\n // An input method's Escape ends what it composes; the sheet stays.\n if (e.key === 'Escape' && !e.isComposing && e.keyCode !== IME_KEY_CODE) {\n e.preventDefault();\n this.close();\n return;\n }\n keepTabInside(e, modal);\n });\n\n const header = document.createElement('div');\n header.className = 'tcw-modal-header';\n const title = document.createElement('h3');\n title.id = `tcw-hotkey-title-${this.uid}`;\n title.textContent = this.t('hotkeys.title');\n const closeBtn = document.createElement('button');\n closeBtn.type = 'button';\n closeBtn.className = 'tcw-modal-close';\n closeBtn.setAttribute('aria-label', this.t('hotkeys.close'));\n closeBtn.innerHTML = createIcon('x', 16);\n closeBtn.addEventListener('click', () => this.close());\n header.append(title, closeBtn);\n\n const search = document.createElement('label');\n search.className = 'tcw-ss-search tcw-hotkey-search';\n search.innerHTML = createIcon('search', 16);\n const input = document.createElement('input');\n input.type = 'search';\n input.placeholder = this.t('hotkeys.search');\n input.setAttribute('aria-label', this.t('hotkeys.search'));\n input.autocomplete = 'off';\n input.spellcheck = false;\n input.addEventListener('input', () => this.render());\n search.appendChild(input);\n\n const body = document.createElement('div');\n body.className = 'tcw-hotkey-body';\n\n const live = document.createElement('div');\n live.className = 'tcw-hotkey-live tcw-visually-hidden';\n live.setAttribute('aria-live', 'polite');\n\n modal.append(header, search, body, live);\n if (withFoot) {\n const foot = document.createElement('div');\n foot.className = 'tcw-hotkey-foot';\n foot.textContent = this.t('hotkeys.footer');\n modal.appendChild(foot);\n }\n backdrop.appendChild(modal);\n this.host().appendChild(backdrop);\n this.backdrop = backdrop;\n this.bodyEl = body;\n this.searchEl = input;\n this.liveEl = live;\n }\n\n /** The groups and their shortcuts that match what is typed. */\n private render(): void {\n const body = this.bodyEl;\n if (!body) return;\n const query = searchForm((this.searchEl?.value ?? '').trim());\n const sections: HTMLElement[] = [];\n for (const group of this.groups) {\n const entries = query ? group.entries.filter((e) => this.matches(e, query)) : group.entries;\n if (entries.length === 0) continue;\n const section = document.createElement('section');\n section.className = 'tcw-hotkey-group';\n const heading = document.createElement('div');\n heading.className = 'tcw-hotkey-heading';\n const titleKey = GROUP_TITLE_KEYS[group.title];\n heading.textContent = titleKey ? this.t(titleKey) : group.title;\n section.append(heading, ...entries.map((entry) => this.row(entry)));\n sections.push(section);\n }\n if (this.liveEl) this.liveEl.textContent = sections.length === 0 ? this.t('hotkeys.noMatch') : '';\n if (sections.length === 0) {\n const empty = document.createElement('div');\n empty.className = 'tcw-hotkey-empty';\n empty.textContent = this.t('hotkeys.noMatch');\n body.replaceChildren(empty);\n return;\n }\n // In columns inside the box that scrolls, as tall as they are: columns on a box of a fixed height\n // lay what doesn't fit in more columns to the side, out of sight and out of reach of the scroll.\n const columns = document.createElement('div');\n columns.className = 'tcw-hotkey-columns';\n columns.append(...sections);\n body.replaceChildren(columns);\n }\n\n private label(entry: HotkeyEntry | HostHotkeyEntry): string {\n return 'text' in entry ? entry.text : this.t(entry.label as MessageKey);\n }\n\n /** A key's words: its own, or a gesture's in the widget's language. */\n private keyText(key: string): string {\n return key.startsWith('key.') ? this.t(key as MessageKey) : key;\n }\n\n /** What it does, or its keys written as \"alt+g\", holds the query. */\n private matches(entry: HotkeyEntry | HostHotkeyEntry, query: string): boolean {\n if (searchForm(this.label(entry)).includes(query)) return true;\n return searchForm(entry.keys.map((k) => this.keyText(k)).join('+')).includes(query);\n }\n\n /** What it does, then its keys: a key as a key, a gesture as words. */\n private row(entry: HotkeyEntry | HostHotkeyEntry): HTMLDivElement {\n const row = document.createElement('div');\n row.className = 'tcw-hotkey-row';\n const label = document.createElement('span');\n label.className = 'tcw-hotkey-label';\n label.textContent = this.label(entry);\n const keys = document.createElement('span');\n keys.className = 'tcw-hotkey-keys';\n // A combination reads left to right in any widget: Ctrl + K, never K + Ctrl.\n keys.dir = 'ltr';\n entry.keys.forEach((key, i) => {\n if (i > 0) {\n const plus = document.createElement('span');\n plus.className = 'tcw-hotkey-sep';\n plus.textContent = '+';\n keys.appendChild(plus);\n }\n const gesture = key.startsWith('key.');\n const el = document.createElement(gesture ? 'span' : 'kbd');\n el.className = gesture ? 'tcw-hotkey-gesture' : 'tcw-hotkey-key';\n el.textContent = this.keyText(key);\n keys.appendChild(el);\n });\n row.append(label, keys);\n return row;\n }\n}\n"],"mappings":";;;AAgBA,IAAM,IAAe,KAIf,IAA+C;CACnD,uBAAuB;CACvB,sBAAsB;CACtB,2BAA2B;CAC3B,UAAY;CACZ,cAAc;CACd,SAAW;CACX,MAAQ;CACT,EA0BK,IAAM,GAEN,IAAwB;CAC5B;EACE,OAAO;EACP,SAAS;GACP;IAAE,MAAM,CAAC,GAAK,IAAI;IAAE,OAAO;IAA0B,SAAS;IAA0B;GACxF;IAAE,MAAM,CAAC,GAAK,IAAI;IAAE,OAAO;IAAwB,SAAS;IAAwB;GACpF;IAAE,MAAM,CAAC,OAAO,IAAI;IAAE,OAAO;IAAoB,SAAS;IAAoB;GAC9E;IAAE,MAAM,CAAC,OAAO,IAAI;IAAE,OAAO;IAAuB,SAAS;IAAuB;GACpF;IAAE,MAAM,CAAC,OAAO,IAAI;IAAE,OAAO;IAAuB,SAAS;IAAqB;GAClF;IAAE,MAAM,CAAC,GAAK,IAAI;IAAE,OAAO;IAAsB,SAAS;IAAgB;GAC1E;IAAE,MAAM,CAAC,MAAM;IAAE,OAAO;IAAwB,SAAS;IAAkB;GAC3E;IAAE,MAAM,CAAC,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cAAc,MAAM;AACzC,IAAI,YAAY;EAChB,IAAM,IAAQ,SAAS,cAAc,OAAO;AAE5C,EADA,EAAM,YAAY,oBAClB,EAAM,cAAc,KAAK,MAAM,EAAM;EACrC,IAAM,IAAO,SAAS,cAAc,OAAO;AAkB3C,SAjBA,EAAK,YAAY,mBAEjB,EAAK,MAAM,OACX,EAAM,KAAK,SAAS,GAAK,MAAM;AAC7B,OAAI,IAAI,GAAG;IACT,IAAM,IAAO,SAAS,cAAc,OAAO;AAG3C,IAFA,EAAK,YAAY,kBACjB,EAAK,cAAc,KACnB,EAAK,YAAY,EAAK;;GAExB,IAAM,IAAU,EAAI,WAAW,OAAO,EAChC,IAAK,SAAS,cAAc,IAAU,SAAS,MAAM;AAG3D,GAFA,EAAG,YAAY,IAAU,uBAAuB,kBAChD,EAAG,cAAc,KAAK,QAAQ,EAAI,EAClC,EAAK,YAAY,EAAG;IACpB,EACF,EAAI,OAAO,GAAO,EAAK,EAChB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require(`./focusTrap-DrhhmG0V.cjs`),t=require(`./platformKeys-B82-j1Fs.cjs`);var n=229,r={"Search & navigation":`hotkeys.group.searchNavigation`,"Chart manipulation":`hotkeys.group.chartManipulation`,"Touch (mobile / tablet)":`hotkeys.group.touch`,Keyboard:`hotkeys.group.keyboard`,"Bar replay":`toolbar.replay`,Drawing:`hotkeys.group.drawing`,More:`hotkeys.group.more`},i=t.t,a=[{title:`Search & navigation`,entries:[{keys:[i,`K`],label:`hotkeys.commandPalette`,feature:`hotkeys.commandPalette`},{keys:[i,`P`],label:`hotkeys.symbolSearch`,feature:`hotkeys.symbolSearch`},{keys:[`Alt`,`G`],label:`hotkeys.goToDate`,feature:`hotkeys.goToDate`},{keys:[`Alt`,`I`],label:`hotkeys.invertScale`,feature:`hotkeys.invertScale`},{keys:[`Alt`,`R`],label:`chartMenu.resetView`,feature:`hotkeys.resetView`},{keys:[i,`S`],label:`hotkeys.saveLayout`,feature:`hotkeys.save`},{keys:[`0–9`],label:`hotkeys.typeInterval`,feature:`intervalTyping`},{keys:[`A–Z`],label:`hotkeys.typeSymbol`,feature:`symbolTyping`},{keys:[`?`],label:`hotkeys.showSheet`,feature:`hotkeys.help`}]},{title:`Chart manipulation`,entries:[{keys:[`key.drag`],label:`hotkeys.pan`},{keys:[i,`key.drag`],label:`hotkeys.boxSelect`},{keys:[i,`key.click`],label:`hotkeys.toggleSelect`},{keys:[`Shift`,`key.drag`],label:`hotkeys.measure`},{keys:[`key.drag`,`key.priceAxis`],label:`hotkeys.scalePrice`},{keys:[`key.drag`,`key.timeAxis`],label:`hotkeys.zoomTime`},{keys:[`key.doubleClick`,`key.priceAxis`],label:`hotkeys.autoScale`},{keys:[`key.doubleClick`,`key.timeAxis`],label:`hotkeys.fit`},{keys:[`key.scroll`],label:`hotkeys.zoomCursor`}]},{title:`Touch (mobile / tablet)`,entries:[{keys:[`key.oneFinger`,`key.drag`],label:`hotkeys.touchPan`},{keys:[`key.twoFingers`,`key.pinch`],label:`hotkeys.pinch`},{keys:[`key.longPress`],label:`hotkeys.longPress`},{keys:[`key.drag`,`key.axisStrip`],label:`hotkeys.touchAxis`}]},{title:`Keyboard`,entries:[{keys:[`←`,`→`],label:`hotkeys.panBar`},{keys:[`+`,`−`],label:`hotkeys.zoomInOut`},{keys:[`Home`],label:`hotkeys.toStart`},{keys:[`End`],label:`hotkeys.toEnd`},{keys:[`Space`],label:`hotkeys.fit`}]},{title:`Bar replay`,entries:[{keys:[`Shift`,`←`,`→`],label:`hotkeys.replayStep`,feature:`replay`},{keys:[`Space`],label:`hotkeys.replayPlay`,feature:`replay`},{keys:[`Esc`],label:`hotkeys.replayCancel`,feature:`replay`}]},{title:`Drawing`,entries:[{keys:[i,`Z`],label:`hotkeys.undo`},{keys:[i,`Shift`,`Z`],label:`hotkeys.redo`},{keys:[`Esc`],label:`hotkeys.cancelDrawing`},{keys:[i,`C`],label:`hotkeys.copy`},{keys:[i,`V`],label:`hotkeys.paste`},{keys:[`key.rightClick`],label:`hotkeys.drawingMenu`},{keys:[`key.doubleClick`],label:`hotkeys.drawingSettings`},{keys:[i,`G`],label:`hotkeys.group`},{keys:[i,`Shift`,`G`],label:`hotkeys.ungroup`},{keys:[i,`]`,`[`],label:`hotkeys.orderStep`},{keys:[i,`Shift`,`]`,`[`],label:`hotkeys.orderEnd`},{keys:[`Enter`],label:`hotkeys.finishPath`},{keys:[i,`key.drag`],label:`hotkeys.copyDrag`},{keys:[`Shift`],label:`hotkeys.keepAngle`},{keys:[i],label:`hotkeys.flipMagnet`},{keys:[`←`,`→`,`↑`,`↓`],label:`hotkeys.nudge`},{keys:[`Alt`,`T`],label:`tool.trendLine`,feature:`hotkeys.tools`},{keys:[`Alt`,`H`],label:`tool.horizontalLine`,feature:`hotkeys.tools`},{keys:[`Alt`,`J`],label:`tool.horizontalRay`,feature:`hotkeys.tools`},{keys:[`Alt`,`V`],label:`tool.verticalLine`,feature:`hotkeys.tools`},{keys:[`Alt`,`C`],label:`tool.crossLine`,feature:`hotkeys.tools`},{keys:[`Alt`,`F`],label:`tool.fibRetracement`,feature:`hotkeys.tools`}]}],o=0,s=class{backdrop=null;bodyEl=null;searchEl=null;liveEl=null;groups=[];returnFocus=null;uid=++o;constructor(e,t,n=()=>document.body){this.callbacks=e,this.t=t,this.host=n}open(e={}){if(this.backdrop)return;this.returnFocus=document.activeElement instanceof HTMLElement?document.activeElement:null;let t=e.isOn??(()=>!0),n=new Set((e.extra??[]).map(e=>e.keys.join(`+`).toLowerCase()));this.groups=a.map(e=>({title:e.title,entries:e.entries.filter(e=>(!e.feature||t(e.feature))&&!n.has(e.keys.join(`+`).toLowerCase()))})).filter(e=>e.entries.length>0),e.extra&&e.extra.length>0&&this.groups.push({title:`More`,entries:[...e.extra]}),this.build(t(`hotkeys.help`)),this.render(),this.searchEl?.focus()}close(){if(!this.backdrop)return;this.backdrop.remove(),this.backdrop=this.bodyEl=this.searchEl=this.liveEl=null,this.callbacks.onClose();let e=this.returnFocus;this.returnFocus=null,e?.isConnected&&e.focus()}isOpen(){return this.backdrop!==null}destroy(){this.close()}build(t){let r=document.createElement(`div`);r.className=`tcw-modal-backdrop`;let i=!1;r.addEventListener(`pointerdown`,e=>{i=e.target===r}),r.addEventListener(`click`,e=>{e.target===r&&i&&this.close(),i=!1});let a=document.createElement(`div`);a.className=`tcw-modal tcw-hotkey-sheet`,a.setAttribute(`role`,`dialog`),a.setAttribute(`aria-modal`,`true`),a.setAttribute(`aria-labelledby`,`tcw-hotkey-title-${this.uid}`),a.tabIndex=-1,a.addEventListener(`keydown`,t=>{if(t.stopPropagation(),t.key===`Escape`&&!t.isComposing&&t.keyCode!==n){t.preventDefault(),this.close();return}e.n(t,a)});let o=document.createElement(`div`);o.className=`tcw-modal-header`;let s=document.createElement(`h3`);s.id=`tcw-hotkey-title-${this.uid}`,s.textContent=this.t(`hotkeys.title`);let c=document.createElement(`button`);c.type=`button`,c.className=`tcw-modal-close`,c.setAttribute(`aria-label`,this.t(`hotkeys.close`)),c.innerHTML=e.i(`x`,16),c.addEventListener(`click`,()=>this.close()),o.append(s,c);let l=document.createElement(`label`);l.className=`tcw-ss-search tcw-hotkey-search`,l.innerHTML=e.i(`search`,16);let u=document.createElement(`input`);u.type=`search`,u.placeholder=this.t(`hotkeys.search`),u.setAttribute(`aria-label`,this.t(`hotkeys.search`)),u.autocomplete=`off`,u.spellcheck=!1,u.addEventListener(`input`,()=>this.render()),l.appendChild(u);let d=document.createElement(`div`);d.className=`tcw-hotkey-body`;let f=document.createElement(`div`);if(f.className=`tcw-hotkey-live tcw-visually-hidden`,f.setAttribute(`aria-live`,`polite`),a.append(o,l,d,f),t){let e=document.createElement(`div`);e.className=`tcw-hotkey-foot`,e.textContent=this.t(`hotkeys.footer`),a.appendChild(e)}r.appendChild(a),this.host().appendChild(r),this.backdrop=r,this.bodyEl=d,this.searchEl=u,this.liveEl=f}render(){let e=this.bodyEl;if(!e)return;let n=t.n((this.searchEl?.value??``).trim()),i=[];for(let e of this.groups){let t=n?e.entries.filter(e=>this.matches(e,n)):e.entries;if(t.length===0)continue;let a=document.createElement(`section`);a.className=`tcw-hotkey-group`;let o=document.createElement(`div`);o.className=`tcw-hotkey-heading`;let s=r[e.title];o.textContent=s?this.t(s):e.title,a.append(o,...t.map(e=>this.row(e))),i.push(a)}if(this.liveEl&&(this.liveEl.textContent=i.length===0?this.t(`hotkeys.noMatch`):``),i.length===0){let t=document.createElement(`div`);t.className=`tcw-hotkey-empty`,t.textContent=this.t(`hotkeys.noMatch`),e.replaceChildren(t);return}let a=document.createElement(`div`);a.className=`tcw-hotkey-columns`,a.append(...i),e.replaceChildren(a)}label(e){return`text`in e?e.text:this.t(e.label)}keyText(e){return e.startsWith(`key.`)?this.t(e):e}matches(e,n){return t.n(this.label(e)).includes(n)?!0:t.n(e.keys.map(e=>this.keyText(e)).join(`+`)).includes(n)}row(e){let t=document.createElement(`div`);t.className=`tcw-hotkey-row`;let n=document.createElement(`span`);n.className=`tcw-hotkey-label`,n.textContent=this.label(e);let r=document.createElement(`span`);return r.className=`tcw-hotkey-keys`,r.dir=`ltr`,e.keys.forEach((e,t)=>{if(t>0){let e=document.createElement(`span`);e.className=`tcw-hotkey-sep`,e.textContent=`+`,r.appendChild(e)}let n=e.startsWith(`key.`),i=document.createElement(n?`span`:`kbd`);i.className=n?`tcw-hotkey-gesture`:`tcw-hotkey-key`,i.textContent=this.keyText(e),r.appendChild(i)}),t.append(n,r),t}};exports.WidgetHotkeySheet=s;
|
|
2
|
+
//# sourceMappingURL=WidgetHotkeySheet-y5LWKSG6.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetHotkeySheet-y5LWKSG6.cjs","names":[],"sources":["../src/widget/WidgetHotkeySheet.ts"],"sourcesContent":["import type { MessageKey, Translator } from './i18n.js';\nimport type { WidgetFeature } from './widgetFeatures.js';\nimport { createIcon } from './icons.js';\nimport { keepTabInside } from './focusTrap.js';\nimport { MOD_KEY, searchForm } from './platformKeys.js';\n\n/**\n * Keyboard-shortcut reference sheet. Bound to `?` (and `Shift+/`). Surfaces\n * shortcuts so users discover the widget's hidden interaction model — a\n * premium-feel detail polished desktop tools all ship.\n */\nexport interface HotkeySheetCallbacks {\n onClose: () => void;\n}\n\n/** The key code a browser gives a key an input method takes. */\nconst IME_KEY_CODE = 229;\n\n// Group titles translate via this lookup; individual shortcut labels (and\n// the `keys` badges) stay English for now — see README \"Widget i18n\".\nconst GROUP_TITLE_KEYS: Record<string, MessageKey> = {\n 'Search & navigation': 'hotkeys.group.searchNavigation',\n 'Chart manipulation': 'hotkeys.group.chartManipulation',\n 'Touch (mobile / tablet)': 'hotkeys.group.touch',\n 'Keyboard': 'hotkeys.group.keyboard',\n 'Bar replay': 'toolbar.replay',\n 'Drawing': 'hotkeys.group.drawing',\n 'More': 'hotkeys.group.more',\n};\n\ninterface HotkeyEntry {\n keys: string[];\n label: string;\n /** The switch it goes with: left out of the sheet while that is off. */\n feature?: WidgetFeature;\n}\n\n/** A shortcut of the host's, shown as it was given. */\nexport interface HostHotkeyEntry {\n keys: string[];\n text: string;\n}\n\n/** What else the sheet shows: the switches that are on, and the host's shortcuts. */\nexport interface HotkeySheetOptions {\n isOn?: (feature: WidgetFeature) => boolean;\n extra?: readonly HostHotkeyEntry[];\n}\n\ninterface HotkeyGroup {\n title: string;\n entries: HotkeyEntry[];\n}\n\nconst mod = MOD_KEY;\n\nconst GROUPS: HotkeyGroup[] = [\n {\n title: 'Search & navigation',\n entries: [\n { keys: [mod, 'K'], label: 'hotkeys.commandPalette', feature: 'hotkeys.commandPalette' },\n { keys: [mod, 'P'], label: 'hotkeys.symbolSearch', feature: 'hotkeys.symbolSearch' },\n { keys: ['Alt', 'G'], label: 'hotkeys.goToDate', feature: 'hotkeys.goToDate' },\n { keys: ['Alt', 'I'], label: 'hotkeys.invertScale', feature: 'hotkeys.invertScale' },\n { keys: ['Alt', 'R'], label: 'chartMenu.resetView', feature: 'hotkeys.resetView' },\n { keys: [mod, 'S'], label: 'hotkeys.saveLayout', feature: 'hotkeys.save' },\n { keys: ['0–9'], label: 'hotkeys.typeInterval', feature: 'intervalTyping' },\n { keys: ['A–Z'], label: 'hotkeys.typeSymbol', feature: 'symbolTyping' },\n { keys: ['?'], label: 'hotkeys.showSheet', feature: 'hotkeys.help' },\n ],\n },\n {\n title: 'Chart manipulation',\n entries: [\n { keys: ['key.drag'], label: 'hotkeys.pan' },\n { keys: [mod, 'key.drag'], label: 'hotkeys.boxSelect' },\n { keys: [mod, 'key.click'], label: 'hotkeys.toggleSelect' },\n { keys: ['Shift', 'key.drag'], label: 'hotkeys.measure' },\n { keys: ['key.drag', 'key.priceAxis'], label: 'hotkeys.scalePrice' },\n { keys: ['key.drag', 'key.timeAxis'], label: 'hotkeys.zoomTime' },\n { keys: ['key.doubleClick', 'key.priceAxis'], label: 'hotkeys.autoScale' },\n { keys: ['key.doubleClick', 'key.timeAxis'], label: 'hotkeys.fit' },\n { keys: ['key.scroll'], label: 'hotkeys.zoomCursor' },\n ],\n },\n {\n title: 'Touch (mobile / tablet)',\n entries: [\n { keys: ['key.oneFinger', 'key.drag'], label: 'hotkeys.touchPan' },\n { keys: ['key.twoFingers', 'key.pinch'], label: 'hotkeys.pinch' },\n { keys: ['key.longPress'], label: 'hotkeys.longPress' },\n { keys: ['key.drag', 'key.axisStrip'], label: 'hotkeys.touchAxis' },\n ],\n },\n {\n title: 'Keyboard',\n entries: [\n { keys: ['←', '→'], label: 'hotkeys.panBar' },\n { keys: ['+', '−'], label: 'hotkeys.zoomInOut' },\n { keys: ['Home'], label: 'hotkeys.toStart' },\n { keys: ['End'], label: 'hotkeys.toEnd' },\n { keys: ['Space'], label: 'hotkeys.fit' },\n ],\n },\n {\n title: 'Bar replay',\n entries: [\n { keys: ['Shift', '←', '→'], label: 'hotkeys.replayStep', feature: 'replay' },\n // Outside a replay, Space fits the chart (above).\n { keys: ['Space'], label: 'hotkeys.replayPlay', feature: 'replay' },\n { keys: ['Esc'], label: 'hotkeys.replayCancel', feature: 'replay' },\n ],\n },\n {\n title: 'Drawing',\n entries: [\n { keys: [mod, 'Z'], label: 'hotkeys.undo' },\n { keys: [mod, 'Shift', 'Z'], label: 'hotkeys.redo' },\n { keys: ['Esc'], label: 'hotkeys.cancelDrawing' },\n { keys: [mod, 'C'], label: 'hotkeys.copy' },\n { keys: [mod, 'V'], label: 'hotkeys.paste' },\n { keys: ['key.rightClick'], label: 'hotkeys.drawingMenu' },\n { keys: ['key.doubleClick'], label: 'hotkeys.drawingSettings' },\n { keys: [mod, 'G'], label: 'hotkeys.group' },\n { keys: [mod, 'Shift', 'G'], label: 'hotkeys.ungroup' },\n { keys: [mod, ']', '['], label: 'hotkeys.orderStep' },\n { keys: [mod, 'Shift', ']', '['], label: 'hotkeys.orderEnd' },\n { keys: ['Enter'], label: 'hotkeys.finishPath' },\n { keys: [mod, 'key.drag'], label: 'hotkeys.copyDrag' },\n { keys: ['Shift'], label: 'hotkeys.keepAngle' },\n { keys: [mod], label: 'hotkeys.flipMagnet' },\n { keys: ['←', '→', '↑', '↓'], label: 'hotkeys.nudge' },\n { keys: ['Alt', 'T'], label: 'tool.trendLine', feature: 'hotkeys.tools' },\n { keys: ['Alt', 'H'], label: 'tool.horizontalLine', feature: 'hotkeys.tools' },\n { keys: ['Alt', 'J'], label: 'tool.horizontalRay', feature: 'hotkeys.tools' },\n { keys: ['Alt', 'V'], label: 'tool.verticalLine', feature: 'hotkeys.tools' },\n { keys: ['Alt', 'C'], label: 'tool.crossLine', feature: 'hotkeys.tools' },\n { keys: ['Alt', 'F'], label: 'tool.fibRetracement', feature: 'hotkeys.tools' },\n ],\n },\n];\n\nlet sheetSeq = 0;\n\n/**\n * The shortcut sheet: what each key does, by group, searchable by the words\n * or by the keys (\"alt+g\"). A gesture (drag, double-click) is written as\n * words, a key as a key. The keys switched off are left out; the host's\n * shortcuts come last, in place of a built-in one on the same keys.\n */\nexport class WidgetHotkeySheet {\n private backdrop: HTMLDivElement | null = null;\n private bodyEl: HTMLDivElement | null = null;\n private searchEl: HTMLInputElement | null = null;\n /** Says \"No shortcuts match\" to a screen reader. */\n private liveEl: HTMLDivElement | null = null;\n private groups: { title: string; entries: (HotkeyEntry | HostHotkeyEntry)[] }[] = [];\n private returnFocus: HTMLElement | null = null;\n private readonly uid = ++sheetSeq;\n\n /** Where the overlay mounts (the widget's portal: themed, and inside it when fullscreen). */\n constructor(\n private readonly callbacks: HotkeySheetCallbacks,\n private readonly t: Translator,\n private readonly host: () => HTMLElement = () => document.body,\n ) {}\n\n open(options: HotkeySheetOptions = {}): void {\n if (this.backdrop) return;\n this.returnFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null;\n const isOn = options.isOn ?? (() => true);\n // The widget's own, less those switched off (a whole group goes when all its keys do).\n // A host's shortcut on the same keys replaces the built-in one.\n const replaced = new Set((options.extra ?? []).map((e) => e.keys.join('+').toLowerCase()));\n this.groups = GROUPS\n .map((group) => ({\n title: group.title,\n entries: group.entries.filter((e) => (!e.feature || isOn(e.feature)) && !replaced.has(e.keys.join('+').toLowerCase())) as (HotkeyEntry | HostHotkeyEntry)[],\n }))\n .filter((group) => group.entries.length > 0);\n if (options.extra && options.extra.length > 0) this.groups.push({ title: 'More', entries: [...options.extra] });\n this.build(isOn('hotkeys.help'));\n this.render();\n this.searchEl?.focus();\n }\n\n close(): void {\n if (!this.backdrop) return;\n this.backdrop.remove();\n this.backdrop = this.bodyEl = this.searchEl = this.liveEl = null;\n this.callbacks.onClose();\n const back = this.returnFocus;\n this.returnFocus = null;\n if (back?.isConnected) back.focus();\n }\n\n isOpen(): boolean {\n return this.backdrop !== null;\n }\n\n destroy(): void {\n this.close();\n }\n\n /** The sheet; `withFoot` says how to open it again (while its key is on). */\n private build(withFoot: boolean): void {\n const backdrop = document.createElement('div');\n backdrop.className = 'tcw-modal-backdrop';\n // A press that starts in the sheet and ends on the backdrop doesn't close it.\n let pressedBackdrop = false;\n backdrop.addEventListener('pointerdown', (e) => {\n pressedBackdrop = e.target === backdrop;\n });\n backdrop.addEventListener('click', (e) => {\n if (e.target === backdrop && pressedBackdrop) this.close();\n pressedBackdrop = false;\n });\n\n const modal = document.createElement('div');\n modal.className = 'tcw-modal tcw-hotkey-sheet';\n modal.setAttribute('role', 'dialog');\n modal.setAttribute('aria-modal', 'true');\n modal.setAttribute('aria-labelledby', `tcw-hotkey-title-${this.uid}`);\n modal.tabIndex = -1;\n modal.addEventListener('keydown', (e) => {\n e.stopPropagation(); // keys here must not drive chart shortcuts\n // An input method's Escape ends what it composes; the sheet stays.\n if (e.key === 'Escape' && !e.isComposing && e.keyCode !== IME_KEY_CODE) {\n e.preventDefault();\n this.close();\n return;\n }\n keepTabInside(e, modal);\n });\n\n const header = document.createElement('div');\n header.className = 'tcw-modal-header';\n const title = document.createElement('h3');\n title.id = `tcw-hotkey-title-${this.uid}`;\n title.textContent = this.t('hotkeys.title');\n const closeBtn = document.createElement('button');\n closeBtn.type = 'button';\n closeBtn.className = 'tcw-modal-close';\n closeBtn.setAttribute('aria-label', this.t('hotkeys.close'));\n closeBtn.innerHTML = createIcon('x', 16);\n closeBtn.addEventListener('click', () => this.close());\n header.append(title, closeBtn);\n\n const search = document.createElement('label');\n search.className = 'tcw-ss-search tcw-hotkey-search';\n search.innerHTML = createIcon('search', 16);\n const input = document.createElement('input');\n input.type = 'search';\n input.placeholder = this.t('hotkeys.search');\n input.setAttribute('aria-label', this.t('hotkeys.search'));\n input.autocomplete = 'off';\n input.spellcheck = false;\n input.addEventListener('input', () => this.render());\n search.appendChild(input);\n\n const body = document.createElement('div');\n body.className = 'tcw-hotkey-body';\n\n const live = document.createElement('div');\n live.className = 'tcw-hotkey-live tcw-visually-hidden';\n live.setAttribute('aria-live', 'polite');\n\n modal.append(header, search, body, live);\n if (withFoot) {\n const foot = document.createElement('div');\n foot.className = 'tcw-hotkey-foot';\n foot.textContent = this.t('hotkeys.footer');\n modal.appendChild(foot);\n }\n backdrop.appendChild(modal);\n this.host().appendChild(backdrop);\n this.backdrop = backdrop;\n this.bodyEl = body;\n this.searchEl = input;\n this.liveEl = live;\n }\n\n /** The groups and their shortcuts that match what is typed. */\n private render(): void {\n const body = this.bodyEl;\n if (!body) return;\n const query = searchForm((this.searchEl?.value ?? '').trim());\n const sections: HTMLElement[] = [];\n for (const group of this.groups) {\n const entries = query ? group.entries.filter((e) => this.matches(e, query)) : group.entries;\n if (entries.length === 0) continue;\n const section = document.createElement('section');\n section.className = 'tcw-hotkey-group';\n const heading = document.createElement('div');\n heading.className = 'tcw-hotkey-heading';\n const titleKey = GROUP_TITLE_KEYS[group.title];\n heading.textContent = titleKey ? this.t(titleKey) : group.title;\n section.append(heading, ...entries.map((entry) => this.row(entry)));\n sections.push(section);\n }\n if (this.liveEl) this.liveEl.textContent = sections.length === 0 ? this.t('hotkeys.noMatch') : '';\n if (sections.length === 0) {\n const empty = document.createElement('div');\n empty.className = 'tcw-hotkey-empty';\n empty.textContent = this.t('hotkeys.noMatch');\n body.replaceChildren(empty);\n return;\n }\n // In columns inside the box that scrolls, as tall as they are: columns on a box of a fixed height\n // lay what doesn't fit in more columns to the side, out of sight and out of reach of the scroll.\n const columns = document.createElement('div');\n columns.className = 'tcw-hotkey-columns';\n columns.append(...sections);\n body.replaceChildren(columns);\n }\n\n private label(entry: HotkeyEntry | HostHotkeyEntry): string {\n return 'text' in entry ? entry.text : this.t(entry.label as MessageKey);\n }\n\n /** A key's words: its own, or a gesture's in the widget's language. */\n private keyText(key: string): string {\n return key.startsWith('key.') ? this.t(key as MessageKey) : key;\n }\n\n /** What it does, or its keys written as \"alt+g\", holds the query. */\n private matches(entry: HotkeyEntry | HostHotkeyEntry, query: string): boolean {\n if (searchForm(this.label(entry)).includes(query)) return true;\n return searchForm(entry.keys.map((k) => this.keyText(k)).join('+')).includes(query);\n }\n\n /** What it does, then its keys: a key as a key, a gesture as words. */\n private row(entry: HotkeyEntry | HostHotkeyEntry): HTMLDivElement {\n const row = document.createElement('div');\n row.className = 'tcw-hotkey-row';\n const label = document.createElement('span');\n label.className = 'tcw-hotkey-label';\n label.textContent = this.label(entry);\n const keys = document.createElement('span');\n keys.className = 'tcw-hotkey-keys';\n // A combination reads left to right in any widget: Ctrl + K, never K + Ctrl.\n keys.dir = 'ltr';\n entry.keys.forEach((key, i) => {\n if (i > 0) {\n const plus = document.createElement('span');\n plus.className = 'tcw-hotkey-sep';\n plus.textContent = '+';\n keys.appendChild(plus);\n }\n const gesture = key.startsWith('key.');\n const el = document.createElement(gesture ? 'span' : 'kbd');\n el.className = gesture ? 'tcw-hotkey-gesture' : 'tcw-hotkey-key';\n el.textContent = this.keyText(key);\n keys.appendChild(el);\n });\n row.append(label, keys);\n return row;\n }\n}\n"],"mappings":"qFAgBA,IAAM,EAAe,IAIf,EAA+C,CACnD,sBAAuB,iCACvB,qBAAsB,kCACtB,0BAA2B,sBAC3B,SAAY,yBACZ,aAAc,iBACd,QAAW,wBACX,KAAQ,qBACT,CA0BK,EAAM,EAAA,EAEN,EAAwB,CAC5B,CACE,MAAO,sBACP,QAAS,CACP,CAAE,KAAM,CAAC,EAAK,IAAI,CAAE,MAAO,yBAA0B,QAAS,yBAA0B,CACxF,CAAE,KAAM,CAAC,EAAK,IAAI,CAAE,MAAO,uBAAwB,QAAS,uBAAwB,CACpF,CAAE,KAAM,CAAC,MAAO,IAAI,CAAE,MAAO,mBAAoB,QAAS,mBAAoB,CAC9E,CAAE,KAAM,CAAC,MAAO,IAAI,CAAE,MAAO,sBAAuB,QAAS,sBAAuB,CACpF,CAAE,KAAM,CAAC,MAAO,IAAI,CAAE,MAAO,sBAAuB,QAAS,oBAAqB,CAClF,CAAE,KAAM,CAAC,EAAK,IAAI,CAAE,MAAO,qBAAsB,QAAS,eAAgB,CAC1E,CAAE,KAAM,CAAC,MAAM,CAAE,MAAO,uBAAwB,QAAS,iBAAkB,CAC3E,CAAE,KAAM,CAAC,MAAM,CAAE,MAAO,qBAAsB,QAAS,eAAgB,CACvE,CAAE,KAAM,CAAC,IAAI,C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