@miragon/modeler-shell 0.0.0-stage → 0.1.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/API.md +1902 -0
  2. package/LICENSE +21 -0
  3. package/README.md +435 -2
  4. package/THIRD_PARTY_NOTICES.md +52 -0
  5. package/dist/appearance-D3FUcbu6.d.cts +53 -0
  6. package/dist/appearance-D3FUcbu6.d.ts +53 -0
  7. package/dist/chunk-5JSZ4VGA.js +551 -0
  8. package/dist/chunk-5JSZ4VGA.js.map +1 -0
  9. package/dist/chunk-6LQOFACK.js +1576 -0
  10. package/dist/chunk-6LQOFACK.js.map +1 -0
  11. package/dist/chunk-N4QXFF3A.js +23 -0
  12. package/dist/chunk-N4QXFF3A.js.map +1 -0
  13. package/dist/chunk-RJRFR6N3.js +136 -0
  14. package/dist/chunk-RJRFR6N3.js.map +1 -0
  15. package/dist/core.cjs +619 -0
  16. package/dist/core.cjs.map +1 -0
  17. package/dist/core.d.cts +171 -0
  18. package/dist/core.d.ts +171 -0
  19. package/dist/core.js +91 -0
  20. package/dist/core.js.map +1 -0
  21. package/dist/diagram-js.cjs +1115 -0
  22. package/dist/diagram-js.cjs.map +1 -0
  23. package/dist/diagram-js.d.cts +163 -0
  24. package/dist/diagram-js.d.ts +163 -0
  25. package/dist/diagram-js.js +867 -0
  26. package/dist/diagram-js.js.map +1 -0
  27. package/dist/index.cjs +2175 -0
  28. package/dist/index.cjs.map +1 -0
  29. package/dist/index.d.cts +20 -0
  30. package/dist/index.d.ts +20 -0
  31. package/dist/index.js +103 -0
  32. package/dist/index.js.map +1 -0
  33. package/dist/keymap-CObQE6q6.d.cts +151 -0
  34. package/dist/keymap-DORzHnK-.d.ts +151 -0
  35. package/dist/protocol-DhYBakWL.d.cts +15 -0
  36. package/dist/protocol-IeW8bf4f.d.ts +15 -0
  37. package/dist/shell.css +914 -0
  38. package/dist/testing-vscode-stub.cjs +332 -0
  39. package/dist/testing-vscode-stub.cjs.map +1 -0
  40. package/dist/testing-vscode-stub.d.cts +65 -0
  41. package/dist/testing-vscode-stub.d.ts +65 -0
  42. package/dist/testing-vscode-stub.js +154 -0
  43. package/dist/testing-vscode-stub.js.map +1 -0
  44. package/dist/testing.cjs +2364 -0
  45. package/dist/testing.cjs.map +1 -0
  46. package/dist/testing.d.cts +165 -0
  47. package/dist/testing.d.ts +165 -0
  48. package/dist/testing.js +2297 -0
  49. package/dist/testing.js.map +1 -0
  50. package/dist/types-B6NfkiUG.d.cts +66 -0
  51. package/dist/types-B6NfkiUG.d.ts +66 -0
  52. package/dist/types-DnZn9CPw.d.ts +284 -0
  53. package/dist/types-OuFlqZp0.d.cts +284 -0
  54. package/dist/vscode-extension.cjs +215 -0
  55. package/dist/vscode-extension.cjs.map +1 -0
  56. package/dist/vscode-extension.d.cts +103 -0
  57. package/dist/vscode-extension.d.ts +103 -0
  58. package/dist/vscode-extension.js +24 -0
  59. package/dist/vscode-extension.js.map +1 -0
  60. package/dist/vscode-webview.cjs +2198 -0
  61. package/dist/vscode-webview.cjs.map +1 -0
  62. package/dist/vscode-webview.d.cts +82 -0
  63. package/dist/vscode-webview.d.ts +82 -0
  64. package/dist/vscode-webview.js +250 -0
  65. package/dist/vscode-webview.js.map +1 -0
  66. package/package.json +145 -4
  67. package/src/core/appearance.ts +104 -0
  68. package/src/core/fit.ts +205 -0
  69. package/src/core/index.ts +84 -0
  70. package/src/core/keymap.ts +275 -0
  71. package/src/core/layout.ts +69 -0
  72. package/src/core/messages.ts +88 -0
  73. package/src/core/sizes.ts +85 -0
  74. package/src/core/types.ts +84 -0
  75. package/src/core/zoom.ts +74 -0
  76. package/src/core.ts +2 -0
  77. package/src/diagram-js/connect.ts +75 -0
  78. package/src/diagram-js/index.ts +16 -0
  79. package/src/diagram-js/module.ts +20 -0
  80. package/src/diagram-js/palette-skin.ts +267 -0
  81. package/src/diagram-js/palette.css +269 -0
  82. package/src/diagram-js/service.ts +240 -0
  83. package/src/diagram-js/types.ts +67 -0
  84. package/src/diagram-js/viewport.ts +564 -0
  85. package/src/diagram-js.ts +2 -0
  86. package/src/dom/element.ts +51 -0
  87. package/src/dom/hint.ts +51 -0
  88. package/src/dom/icons.ts +309 -0
  89. package/src/dom/index.ts +29 -0
  90. package/src/dom/inspector.ts +35 -0
  91. package/src/dom/keys.ts +59 -0
  92. package/src/dom/ledger.ts +87 -0
  93. package/src/dom/legend.ts +85 -0
  94. package/src/dom/menu.ts +393 -0
  95. package/src/dom/mount.ts +461 -0
  96. package/src/dom/problems.ts +72 -0
  97. package/src/dom/shell-dom.css +966 -0
  98. package/src/dom/status.ts +72 -0
  99. package/src/dom/tooltip.ts +237 -0
  100. package/src/dom/types.ts +277 -0
  101. package/src/dom/zoom-panel.ts +154 -0
  102. package/src/index.ts +3 -0
  103. package/src/shell.css +6 -0
  104. package/src/testing/cases.ts +1012 -0
  105. package/src/testing/checks.ts +832 -0
  106. package/src/testing/facts.ts +587 -0
  107. package/src/testing/geometry.ts +472 -0
  108. package/src/testing/harness.ts +138 -0
  109. package/src/testing/index.ts +15 -0
  110. package/src/testing/page-tools.ts +434 -0
  111. package/src/testing/page.ts +17 -0
  112. package/src/testing/vscode-stub.ts +237 -0
  113. package/src/testing-vscode-stub.ts +2 -0
  114. package/src/testing.ts +2 -0
  115. package/src/vscode/extension/html.ts +107 -0
  116. package/src/vscode/extension/index.ts +8 -0
  117. package/src/vscode/extension/reveal.ts +9 -0
  118. package/src/vscode/extension/theme-bridge.ts +85 -0
  119. package/src/vscode/extension/types.ts +36 -0
  120. package/src/vscode/protocol.ts +31 -0
  121. package/src/vscode/webview/appearance.ts +141 -0
  122. package/src/vscode/webview/index.ts +8 -0
  123. package/src/vscode/webview/mount.ts +76 -0
  124. package/src/vscode/webview/state.ts +116 -0
  125. package/src/vscode-extension.ts +2 -0
  126. package/src/vscode-webview.ts +2 -0
@@ -0,0 +1,151 @@
1
+ import { c as ShellHost } from './types-B6NfkiUG.cjs';
2
+
3
+ /**
4
+ * Every text the shell shows or announces, in one table (guide §2, shared terms). English by
5
+ * default; a localized modeler overrides the whole table in its language, numbers arrive already
6
+ * formatted through `Intl` in that language.
7
+ */
8
+ interface ShellMessages {
9
+ /** Menu trigger `aria-label` and tooltip, dropdown `aria-label`. */
10
+ menu: string;
11
+ /** Palette `aria-label`. */
12
+ tools: string;
13
+ /** `aria-label` of the focusable canvas `<svg>` (`role="application"`); a modeler names its notation. */
14
+ canvas: string;
15
+ /** Zoom panel `aria-label`. */
16
+ zoom: string;
17
+ zoomOut: string;
18
+ zoomIn: string;
19
+ /** Tooltip of the readout, e.g. `(percent) => "Zoom to " + percent` with percent "100%". */
20
+ zoomToActual(percent: string): string;
21
+ /** `aria-label` of the readout: "Zoom to 100% (now 86%)". */
22
+ zoomToActualNow(percent: string, now: string): string;
23
+ fit: string;
24
+ /** Legend title and the Model-group checkbox. */
25
+ legend: string;
26
+ closeLegend: string;
27
+ /** Pill text: "1 problem", "2 problems". */
28
+ problems(count: number, formattedCount: string): string;
29
+ /** Pill `aria-label`: "2 problems, 1 error", "2 problems, no errors". */
30
+ problemsLabel(count: number, errors: number, formattedCount: string, formattedErrors: string): string;
31
+ /** Pill tooltip in the IDE host. */
32
+ showProblems: string;
33
+ /** Empty-file hint (guide §13.5). */
34
+ emptyHint: string;
35
+ insertExample: string;
36
+ /** Status box for an invalid file; `diagram` names the notation ("Event Storming board"). */
37
+ invalidFile(diagram: string): string;
38
+ /** Key names in shortcut chips outside macOS (German: Strg, Umschalt, Plus, Minus). */
39
+ keyNames: {
40
+ ctrl: string;
41
+ shift: string;
42
+ plus: string;
43
+ minus: string;
44
+ };
45
+ }
46
+ /** Every key optional; an `undefined` value keeps the default (a conditional override). */
47
+ type ShellMessageOverrides = {
48
+ [Key in Exclude<keyof ShellMessages, "keyNames">]?: ShellMessages[Key] | undefined;
49
+ } & {
50
+ keyNames?: {
51
+ [Key in keyof ShellMessages["keyNames"]]?: string | undefined;
52
+ } | undefined;
53
+ };
54
+ declare const defaultMessages: ShellMessages;
55
+ /** `defaultMessages` with `overrides` applied (`keyNames` merged key by key). */
56
+ declare function resolveMessages(overrides?: ShellMessageOverrides | undefined): ShellMessages;
57
+
58
+ /** The only keys the chrome handles (guide §5.8). */
59
+ type ChromeKey = "zoomIn" | "zoomOut" | "zoomToActual" | "fit";
60
+ /** The `KeyboardEvent` fields the keymap reads. */
61
+ interface KeyLike {
62
+ key: string;
63
+ code: string;
64
+ metaKey: boolean;
65
+ ctrlKey: boolean;
66
+ shiftKey: boolean;
67
+ altKey: boolean;
68
+ isComposing?: boolean | undefined;
69
+ }
70
+ /**
71
+ * Which chrome key `event` is, ignoring where it was pressed:
72
+ * - `zoomIn`: Cmd/Ctrl + `+` or `=` (by `key`, with or without Shift), or `NumpadAdd` (by `code`);
73
+ * - `zoomOut`: Cmd/Ctrl + `-` or `_`, or `NumpadSubtract`;
74
+ * - `zoomToActual`: Cmd/Ctrl + `0`, or `Numpad0` (also with NumLock off);
75
+ * - `fit`: Shift + `Digit1` (by `code`, every layout) without Cmd, Ctrl or Alt.
76
+ * Cmd/Ctrl is `metaKey || ctrlKey` on every platform; nothing matches with `altKey` (AltGr).
77
+ */
78
+ declare function matchChromeKey(event: KeyLike): ChromeKey | undefined;
79
+ /**
80
+ * Cmd/Ctrl + Z, Cmd/Ctrl + Shift + Z or Cmd/Ctrl + Y, without Alt (by `key`, `code` as fallback).
81
+ * Cmd/Ctrl + Shift + Y is not redo (VS Code toggles its Debug Console with it).
82
+ */
83
+ declare function isUndoRedoKey(event: KeyLike): boolean;
84
+ /** A text field: every input, select list and editable text (label editor, inspector, dialogs). */
85
+ declare const TEXT_FIELD_SELECTOR = "input, textarea, select, [contenteditable]:not([contenteditable='false'])";
86
+ /** Where a key was pressed, as the shell's one `keydown` listener sees it. */
87
+ interface KeyContext {
88
+ host: ShellHost;
89
+ /** The event target matches `TEXT_FIELD_SELECTOR` or is `isContentEditable`. */
90
+ inTextField: boolean;
91
+ /** The shell's menu dropdown is open. */
92
+ menuOpen: boolean;
93
+ /** A popover or dialog (`[role="dialog"]`, modal or not) is open. */
94
+ dialogOpen: boolean;
95
+ /** A modal dialog (`[role="dialog"][aria-modal="true"]`) is open: chrome keys do not act. */
96
+ modalOpen: boolean;
97
+ /** `event.defaultPrevented` when the listener ran: the canvas (or the modeler) handled the key. */
98
+ defaultPrevented: boolean;
99
+ }
100
+ type KeyAction = ChromeKey | "closeMenu";
101
+ interface KeyDecision {
102
+ /** What the shell executes; `undefined` = nothing. */
103
+ action?: KeyAction;
104
+ preventDefault: boolean;
105
+ stopPropagation: boolean;
106
+ }
107
+ /**
108
+ * The key rules of guide §5.8 and §13.5 in one place:
109
+ * 1. Escape with the menu open: `closeMenu`, prevented; in the IDE host stopped whenever the menu
110
+ * or a dialog/popover is open. During IME composition Escape belongs to the IME: no `closeMenu`.
111
+ * 2. Zoom keys: executed and prevented unless composing, in a text field or with a modal dialog;
112
+ * in the IDE host always stopped, also when not executed (VS Code must never zoom the window).
113
+ * 3. Shift+1: `fit` under the same conditions; otherwise untouched (it types "!").
114
+ * 4. IDE host, text field, undo/redo key: stopped only (the field keeps its native undo).
115
+ * 5. IDE host, `defaultPrevented`: stopped (the canvas handled it; VS Code must not run it again).
116
+ * Everything else passes untouched. `stopPropagation` is only ever true in the IDE host.
117
+ */
118
+ declare function decideKey(event: KeyLike, context: KeyContext): KeyDecision;
119
+ /** The keyboard the user sits at; decides the shortcut labels (guide §5.8). */
120
+ type Platform = "mac" | "other";
121
+ /** The `navigator` fields `detectPlatform` reads. */
122
+ interface NavigatorLike {
123
+ platform?: string | undefined;
124
+ userAgentData?: {
125
+ platform?: string | undefined;
126
+ } | undefined;
127
+ }
128
+ /**
129
+ * `mac` when `userAgentData.platform ?? platform` matches `/mac/i`, else `other`; `other` without a
130
+ * navigator. Read it in the webview or page itself, never from the extension host (VS Code Remote).
131
+ */
132
+ declare function detectPlatform(navigator?: NavigatorLike | undefined): Platform;
133
+ /**
134
+ * The tooltip chip text: macOS `⌘+`, `⌘−` (U+2212), `⌘0`, `⇧1`; elsewhere `Ctrl+Plus`,
135
+ * `Ctrl+Minus`, `Ctrl+0`, `Shift+1` with the key names of the messages table.
136
+ */
137
+ declare function shortcutLabel(key: ChromeKey, platform: Platform, keyNames: ShellMessages["keyNames"]): string;
138
+ /**
139
+ * The `aria-keyshortcuts` value (WAI-ARIA names): zoom in `Meta+= Meta+Plus`, zoom out `Meta+-`,
140
+ * 100 % `Meta+0`, fit `Shift+1`; outside macOS `Control` instead of `Meta`.
141
+ */
142
+ declare function ariaKeyShortcuts(key: ChromeKey, platform: Platform): string;
143
+ /**
144
+ * The `aria-keyshortcuts` value (WAI-ARIA names, guide §5.6) for a shortcut chip label: `"L"` →
145
+ * `"L"`, `"⇧L"` → `"Shift+L"`, `"⌘⇧Z"` → `"Meta+Shift+Z"`, `"Ctrl+Shift+E"` → `"Control+Shift+E"`,
146
+ * `"Del"` → `"Delete"`, `"Ctrl++"` → `"Control+Plus"`. `undefined` for a label that is not one key
147
+ * combination (`"G then D"`, `"1–9"`, empty).
148
+ */
149
+ declare function ariaKeyShortcutsFromLabel(label: string): string | undefined;
150
+
151
+ export { type ChromeKey as C, type KeyAction as K, type NavigatorLike as N, type Platform as P, type ShellMessageOverrides as S, TEXT_FIELD_SELECTOR as T, type KeyContext as a, type KeyDecision as b, type KeyLike as c, type ShellMessages as d, ariaKeyShortcuts as e, ariaKeyShortcutsFromLabel as f, decideKey as g, defaultMessages as h, detectPlatform as i, isUndoRedoKey as j, matchChromeKey as m, resolveMessages as r, shortcutLabel as s };
@@ -0,0 +1,151 @@
1
+ import { c as ShellHost } from './types-B6NfkiUG.js';
2
+
3
+ /**
4
+ * Every text the shell shows or announces, in one table (guide §2, shared terms). English by
5
+ * default; a localized modeler overrides the whole table in its language, numbers arrive already
6
+ * formatted through `Intl` in that language.
7
+ */
8
+ interface ShellMessages {
9
+ /** Menu trigger `aria-label` and tooltip, dropdown `aria-label`. */
10
+ menu: string;
11
+ /** Palette `aria-label`. */
12
+ tools: string;
13
+ /** `aria-label` of the focusable canvas `<svg>` (`role="application"`); a modeler names its notation. */
14
+ canvas: string;
15
+ /** Zoom panel `aria-label`. */
16
+ zoom: string;
17
+ zoomOut: string;
18
+ zoomIn: string;
19
+ /** Tooltip of the readout, e.g. `(percent) => "Zoom to " + percent` with percent "100%". */
20
+ zoomToActual(percent: string): string;
21
+ /** `aria-label` of the readout: "Zoom to 100% (now 86%)". */
22
+ zoomToActualNow(percent: string, now: string): string;
23
+ fit: string;
24
+ /** Legend title and the Model-group checkbox. */
25
+ legend: string;
26
+ closeLegend: string;
27
+ /** Pill text: "1 problem", "2 problems". */
28
+ problems(count: number, formattedCount: string): string;
29
+ /** Pill `aria-label`: "2 problems, 1 error", "2 problems, no errors". */
30
+ problemsLabel(count: number, errors: number, formattedCount: string, formattedErrors: string): string;
31
+ /** Pill tooltip in the IDE host. */
32
+ showProblems: string;
33
+ /** Empty-file hint (guide §13.5). */
34
+ emptyHint: string;
35
+ insertExample: string;
36
+ /** Status box for an invalid file; `diagram` names the notation ("Event Storming board"). */
37
+ invalidFile(diagram: string): string;
38
+ /** Key names in shortcut chips outside macOS (German: Strg, Umschalt, Plus, Minus). */
39
+ keyNames: {
40
+ ctrl: string;
41
+ shift: string;
42
+ plus: string;
43
+ minus: string;
44
+ };
45
+ }
46
+ /** Every key optional; an `undefined` value keeps the default (a conditional override). */
47
+ type ShellMessageOverrides = {
48
+ [Key in Exclude<keyof ShellMessages, "keyNames">]?: ShellMessages[Key] | undefined;
49
+ } & {
50
+ keyNames?: {
51
+ [Key in keyof ShellMessages["keyNames"]]?: string | undefined;
52
+ } | undefined;
53
+ };
54
+ declare const defaultMessages: ShellMessages;
55
+ /** `defaultMessages` with `overrides` applied (`keyNames` merged key by key). */
56
+ declare function resolveMessages(overrides?: ShellMessageOverrides | undefined): ShellMessages;
57
+
58
+ /** The only keys the chrome handles (guide §5.8). */
59
+ type ChromeKey = "zoomIn" | "zoomOut" | "zoomToActual" | "fit";
60
+ /** The `KeyboardEvent` fields the keymap reads. */
61
+ interface KeyLike {
62
+ key: string;
63
+ code: string;
64
+ metaKey: boolean;
65
+ ctrlKey: boolean;
66
+ shiftKey: boolean;
67
+ altKey: boolean;
68
+ isComposing?: boolean | undefined;
69
+ }
70
+ /**
71
+ * Which chrome key `event` is, ignoring where it was pressed:
72
+ * - `zoomIn`: Cmd/Ctrl + `+` or `=` (by `key`, with or without Shift), or `NumpadAdd` (by `code`);
73
+ * - `zoomOut`: Cmd/Ctrl + `-` or `_`, or `NumpadSubtract`;
74
+ * - `zoomToActual`: Cmd/Ctrl + `0`, or `Numpad0` (also with NumLock off);
75
+ * - `fit`: Shift + `Digit1` (by `code`, every layout) without Cmd, Ctrl or Alt.
76
+ * Cmd/Ctrl is `metaKey || ctrlKey` on every platform; nothing matches with `altKey` (AltGr).
77
+ */
78
+ declare function matchChromeKey(event: KeyLike): ChromeKey | undefined;
79
+ /**
80
+ * Cmd/Ctrl + Z, Cmd/Ctrl + Shift + Z or Cmd/Ctrl + Y, without Alt (by `key`, `code` as fallback).
81
+ * Cmd/Ctrl + Shift + Y is not redo (VS Code toggles its Debug Console with it).
82
+ */
83
+ declare function isUndoRedoKey(event: KeyLike): boolean;
84
+ /** A text field: every input, select list and editable text (label editor, inspector, dialogs). */
85
+ declare const TEXT_FIELD_SELECTOR = "input, textarea, select, [contenteditable]:not([contenteditable='false'])";
86
+ /** Where a key was pressed, as the shell's one `keydown` listener sees it. */
87
+ interface KeyContext {
88
+ host: ShellHost;
89
+ /** The event target matches `TEXT_FIELD_SELECTOR` or is `isContentEditable`. */
90
+ inTextField: boolean;
91
+ /** The shell's menu dropdown is open. */
92
+ menuOpen: boolean;
93
+ /** A popover or dialog (`[role="dialog"]`, modal or not) is open. */
94
+ dialogOpen: boolean;
95
+ /** A modal dialog (`[role="dialog"][aria-modal="true"]`) is open: chrome keys do not act. */
96
+ modalOpen: boolean;
97
+ /** `event.defaultPrevented` when the listener ran: the canvas (or the modeler) handled the key. */
98
+ defaultPrevented: boolean;
99
+ }
100
+ type KeyAction = ChromeKey | "closeMenu";
101
+ interface KeyDecision {
102
+ /** What the shell executes; `undefined` = nothing. */
103
+ action?: KeyAction;
104
+ preventDefault: boolean;
105
+ stopPropagation: boolean;
106
+ }
107
+ /**
108
+ * The key rules of guide §5.8 and §13.5 in one place:
109
+ * 1. Escape with the menu open: `closeMenu`, prevented; in the IDE host stopped whenever the menu
110
+ * or a dialog/popover is open. During IME composition Escape belongs to the IME: no `closeMenu`.
111
+ * 2. Zoom keys: executed and prevented unless composing, in a text field or with a modal dialog;
112
+ * in the IDE host always stopped, also when not executed (VS Code must never zoom the window).
113
+ * 3. Shift+1: `fit` under the same conditions; otherwise untouched (it types "!").
114
+ * 4. IDE host, text field, undo/redo key: stopped only (the field keeps its native undo).
115
+ * 5. IDE host, `defaultPrevented`: stopped (the canvas handled it; VS Code must not run it again).
116
+ * Everything else passes untouched. `stopPropagation` is only ever true in the IDE host.
117
+ */
118
+ declare function decideKey(event: KeyLike, context: KeyContext): KeyDecision;
119
+ /** The keyboard the user sits at; decides the shortcut labels (guide §5.8). */
120
+ type Platform = "mac" | "other";
121
+ /** The `navigator` fields `detectPlatform` reads. */
122
+ interface NavigatorLike {
123
+ platform?: string | undefined;
124
+ userAgentData?: {
125
+ platform?: string | undefined;
126
+ } | undefined;
127
+ }
128
+ /**
129
+ * `mac` when `userAgentData.platform ?? platform` matches `/mac/i`, else `other`; `other` without a
130
+ * navigator. Read it in the webview or page itself, never from the extension host (VS Code Remote).
131
+ */
132
+ declare function detectPlatform(navigator?: NavigatorLike | undefined): Platform;
133
+ /**
134
+ * The tooltip chip text: macOS `⌘+`, `⌘−` (U+2212), `⌘0`, `⇧1`; elsewhere `Ctrl+Plus`,
135
+ * `Ctrl+Minus`, `Ctrl+0`, `Shift+1` with the key names of the messages table.
136
+ */
137
+ declare function shortcutLabel(key: ChromeKey, platform: Platform, keyNames: ShellMessages["keyNames"]): string;
138
+ /**
139
+ * The `aria-keyshortcuts` value (WAI-ARIA names): zoom in `Meta+= Meta+Plus`, zoom out `Meta+-`,
140
+ * 100 % `Meta+0`, fit `Shift+1`; outside macOS `Control` instead of `Meta`.
141
+ */
142
+ declare function ariaKeyShortcuts(key: ChromeKey, platform: Platform): string;
143
+ /**
144
+ * The `aria-keyshortcuts` value (WAI-ARIA names, guide §5.6) for a shortcut chip label: `"L"` →
145
+ * `"L"`, `"⇧L"` → `"Shift+L"`, `"⌘⇧Z"` → `"Meta+Shift+Z"`, `"Ctrl+Shift+E"` → `"Control+Shift+E"`,
146
+ * `"Del"` → `"Delete"`, `"Ctrl++"` → `"Control+Plus"`. `undefined` for a label that is not one key
147
+ * combination (`"G then D"`, `"1–9"`, empty).
148
+ */
149
+ declare function ariaKeyShortcutsFromLabel(label: string): string | undefined;
150
+
151
+ export { type ChromeKey as C, type KeyAction as K, type NavigatorLike as N, type Platform as P, type ShellMessageOverrides as S, TEXT_FIELD_SELECTOR as T, type KeyContext as a, type KeyDecision as b, type KeyLike as c, type ShellMessages as d, ariaKeyShortcuts as e, ariaKeyShortcutsFromLabel as f, decideKey as g, defaultMessages as h, detectPlatform as i, isUndoRedoKey as j, matchChromeKey as m, resolveMessages as r, shortcutLabel as s };
@@ -0,0 +1,15 @@
1
+ import { A as Appearance } from './appearance-D3FUcbu6.cjs';
2
+
3
+ /** The one message the theme bridge posts to the webview. */
4
+ declare const APPEARANCE_MESSAGE_TYPE = "modelerShell.appearance";
5
+ interface AppearanceMessage {
6
+ type: typeof APPEARANCE_MESSAGE_TYPE;
7
+ /** Already resolved against the modeler's themes. */
8
+ appearance: Appearance;
9
+ }
10
+ /** A plain, JSON-safe message (no `kontrast: undefined` key). */
11
+ declare function appearanceMessage(appearance: Appearance): AppearanceMessage;
12
+ /** Type guard for `MessageEvent.data` in the webview. */
13
+ declare function isAppearanceMessage(value: unknown): value is AppearanceMessage;
14
+
15
+ export { APPEARANCE_MESSAGE_TYPE as A, type AppearanceMessage as a, appearanceMessage as b, isAppearanceMessage as i };
@@ -0,0 +1,15 @@
1
+ import { A as Appearance } from './appearance-D3FUcbu6.js';
2
+
3
+ /** The one message the theme bridge posts to the webview. */
4
+ declare const APPEARANCE_MESSAGE_TYPE = "modelerShell.appearance";
5
+ interface AppearanceMessage {
6
+ type: typeof APPEARANCE_MESSAGE_TYPE;
7
+ /** Already resolved against the modeler's themes. */
8
+ appearance: Appearance;
9
+ }
10
+ /** A plain, JSON-safe message (no `kontrast: undefined` key). */
11
+ declare function appearanceMessage(appearance: Appearance): AppearanceMessage;
12
+ /** Type guard for `MessageEvent.data` in the webview. */
13
+ declare function isAppearanceMessage(value: unknown): value is AppearanceMessage;
14
+
15
+ export { APPEARANCE_MESSAGE_TYPE as A, type AppearanceMessage as a, appearanceMessage as b, isAppearanceMessage as i };