@miragon/modeler-shell 0.0.0-stage → 0.2.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 (147) hide show
  1. package/API.md +2869 -0
  2. package/LICENSE +21 -0
  3. package/README.md +566 -2
  4. package/THIRD_PARTY_NOTICES.md +52 -0
  5. package/dist/appearance-BBaM_4bD.d.ts +323 -0
  6. package/dist/appearance-D3FUcbu6.d.cts +53 -0
  7. package/dist/appearance-D3FUcbu6.d.ts +53 -0
  8. package/dist/appearance-XX3JC3pI.d.cts +323 -0
  9. package/dist/chunk-66HCSJNY.js +2792 -0
  10. package/dist/chunk-66HCSJNY.js.map +1 -0
  11. package/dist/chunk-KYDG5DMX.js +136 -0
  12. package/dist/chunk-KYDG5DMX.js.map +1 -0
  13. package/dist/chunk-N4QXFF3A.js +23 -0
  14. package/dist/chunk-N4QXFF3A.js.map +1 -0
  15. package/dist/chunk-OADW3GPA.js +785 -0
  16. package/dist/chunk-OADW3GPA.js.map +1 -0
  17. package/dist/core.cjs +873 -0
  18. package/dist/core.cjs.map +1 -0
  19. package/dist/core.d.cts +246 -0
  20. package/dist/core.d.ts +246 -0
  21. package/dist/core.js +131 -0
  22. package/dist/core.js.map +1 -0
  23. package/dist/diagram-js.cjs +1147 -0
  24. package/dist/diagram-js.cjs.map +1 -0
  25. package/dist/diagram-js.d.cts +170 -0
  26. package/dist/diagram-js.d.ts +170 -0
  27. package/dist/diagram-js.js +879 -0
  28. package/dist/diagram-js.js.map +1 -0
  29. package/dist/index.cjs +3632 -0
  30. package/dist/index.cjs.map +1 -0
  31. package/dist/index.d.cts +29 -0
  32. package/dist/index.d.ts +29 -0
  33. package/dist/index.js +143 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/protocol-DhYBakWL.d.cts +15 -0
  36. package/dist/protocol-IeW8bf4f.d.ts +15 -0
  37. package/dist/shell.css +1603 -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 +4663 -0
  45. package/dist/testing.cjs.map +1 -0
  46. package/dist/testing.d.cts +231 -0
  47. package/dist/testing.d.ts +231 -0
  48. package/dist/testing.js +4483 -0
  49. package/dist/testing.js.map +1 -0
  50. package/dist/toasts-Bp0REqdq.d.cts +142 -0
  51. package/dist/toasts-Bp0REqdq.d.ts +142 -0
  52. package/dist/types-CnRrINRs.d.cts +445 -0
  53. package/dist/types-PuDZczzy.d.ts +445 -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 +3561 -0
  61. package/dist/vscode-webview.cjs.map +1 -0
  62. package/dist/vscode-webview.d.cts +84 -0
  63. package/dist/vscode-webview.d.ts +84 -0
  64. package/dist/vscode-webview.js +259 -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/feedback/appearance.ts +141 -0
  69. package/src/core/feedback/problems.ts +23 -0
  70. package/src/core/feedback/toasts.ts +118 -0
  71. package/src/core/fit.ts +220 -0
  72. package/src/core/index.ts +127 -0
  73. package/src/core/keymap.ts +295 -0
  74. package/src/core/layout.ts +69 -0
  75. package/src/core/messages.ts +159 -0
  76. package/src/core/sizes.ts +85 -0
  77. package/src/core/types.ts +106 -0
  78. package/src/core/web-chrome/bottom-row.ts +37 -0
  79. package/src/core/web-chrome/drop.ts +78 -0
  80. package/src/core/web-chrome/top-row.ts +66 -0
  81. package/src/core/zoom.ts +74 -0
  82. package/src/core.ts +2 -0
  83. package/src/diagram-js/connect.ts +75 -0
  84. package/src/diagram-js/index.ts +16 -0
  85. package/src/diagram-js/module.ts +20 -0
  86. package/src/diagram-js/palette-skin.ts +267 -0
  87. package/src/diagram-js/palette.css +269 -0
  88. package/src/diagram-js/service.ts +243 -0
  89. package/src/diagram-js/types.ts +67 -0
  90. package/src/diagram-js/viewport.ts +583 -0
  91. package/src/diagram-js.ts +2 -0
  92. package/src/dom/buttons.css +124 -0
  93. package/src/dom/element.ts +51 -0
  94. package/src/dom/feedback/appearance.ts +184 -0
  95. package/src/dom/feedback/feedback.css +435 -0
  96. package/src/dom/feedback/problems-popover.ts +287 -0
  97. package/src/dom/feedback/toasts.ts +431 -0
  98. package/src/dom/hint.ts +51 -0
  99. package/src/dom/icons.ts +309 -0
  100. package/src/dom/index.ts +42 -0
  101. package/src/dom/inspector.ts +35 -0
  102. package/src/dom/keys.ts +67 -0
  103. package/src/dom/ledger.ts +87 -0
  104. package/src/dom/legend.ts +85 -0
  105. package/src/dom/menu.ts +404 -0
  106. package/src/dom/mount.ts +731 -0
  107. package/src/dom/problems.ts +73 -0
  108. package/src/dom/shell-dom.css +969 -0
  109. package/src/dom/status.ts +72 -0
  110. package/src/dom/tooltip.ts +237 -0
  111. package/src/dom/types.ts +459 -0
  112. package/src/dom/web/drop-zone.ts +181 -0
  113. package/src/dom/web/empty-state.ts +144 -0
  114. package/src/dom/web/legal.ts +75 -0
  115. package/src/dom/web/menu-groups.ts +69 -0
  116. package/src/dom/web/primary.ts +124 -0
  117. package/src/dom/web/web.css +386 -0
  118. package/src/dom/zoom-panel.ts +154 -0
  119. package/src/index.ts +3 -0
  120. package/src/shell.css +9 -0
  121. package/src/testing/case-tools.ts +164 -0
  122. package/src/testing/cases.ts +1077 -0
  123. package/src/testing/checks.ts +868 -0
  124. package/src/testing/facts.ts +641 -0
  125. package/src/testing/geometry.ts +652 -0
  126. package/src/testing/harness.ts +187 -0
  127. package/src/testing/index.ts +19 -0
  128. package/src/testing/page-tools.ts +457 -0
  129. package/src/testing/page.ts +27 -0
  130. package/src/testing/vscode-stub.ts +237 -0
  131. package/src/testing/web-cases.ts +913 -0
  132. package/src/testing/web-checks.ts +1049 -0
  133. package/src/testing/web-facts.ts +713 -0
  134. package/src/testing-vscode-stub.ts +2 -0
  135. package/src/testing.ts +2 -0
  136. package/src/vscode/extension/html.ts +107 -0
  137. package/src/vscode/extension/index.ts +8 -0
  138. package/src/vscode/extension/reveal.ts +9 -0
  139. package/src/vscode/extension/theme-bridge.ts +85 -0
  140. package/src/vscode/extension/types.ts +36 -0
  141. package/src/vscode/protocol.ts +31 -0
  142. package/src/vscode/webview/appearance.ts +141 -0
  143. package/src/vscode/webview/index.ts +8 -0
  144. package/src/vscode/webview/mount.ts +88 -0
  145. package/src/vscode/webview/state.ts +116 -0
  146. package/src/vscode-extension.ts +2 -0
  147. package/src/vscode-webview.ts +2 -0
@@ -0,0 +1,969 @@
1
+ /*
2
+ * Chrome of @miragon/modeler-shell (owned by src/dom): shell root, canvas slot, islands, menu,
3
+ * tooltip, zoom panel, problems pill, status box, empty-file hint, legend, inspector, layers,
4
+ * focus, high contrast, forced colours, reduced motion and the own-document reset
5
+ * (html.cd-shell-document). Colours only from var(--cd-ui-*), sizes from var(--cd-shell-*).
6
+ *
7
+ * Breakpoints are container queries on the shell root with literal values: custom properties are
8
+ * not allowed in container conditions (760 = --cd-shell-schmal, 440 = --cd-shell-sehr-schmal).
9
+ * Private helper properties are named --modeler-shell-*, never --cd-*, so they cannot shadow a
10
+ * future design-system token.
11
+ */
12
+
13
+ /* ---- Root and canvas slot (guide §5.1, §5.13) ----------------------------------------------- */
14
+
15
+ .cd-shell,
16
+ html.cd-shell-document {
17
+ --modeler-shell-font:
18
+ "Geist Variable", "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
19
+ --modeler-shell-font-mono: "Geist Mono Variable", "Geist Mono", ui-monospace, monospace;
20
+ }
21
+
22
+ .cd-shell {
23
+ position: relative;
24
+ overflow: hidden;
25
+ container: cd-shell / size;
26
+ isolation: isolate;
27
+ color: var(--cd-ui-text);
28
+ font: 400 13px/1.5 var(--modeler-shell-font);
29
+ -webkit-font-smoothing: antialiased;
30
+ }
31
+
32
+ /* An own document sizes the root from the page; a foreign page sizes it explicitly. */
33
+ :where(html.cd-shell-document body > .cd-shell) {
34
+ height: 100%;
35
+ }
36
+
37
+ /*
38
+ * The slot's layout must win over a renderer's own container class (Event Storming's
39
+ * .event-storming-container sets position: relative); its paint must not, so the renderer's paper
40
+ * (a dot grid, a dark board) shows.
41
+ */
42
+ .cd-shell > .cd-shell-canvas {
43
+ position: absolute;
44
+ inset: 0;
45
+ z-index: 0;
46
+ isolation: isolate;
47
+ overflow: hidden;
48
+ }
49
+
50
+ :where(.cd-shell-canvas) {
51
+ background-color: var(--cd-ui-grund);
52
+ }
53
+
54
+ /* Buttons and fields show the chrome font, not the browser's control font (13.33px). */
55
+ :where(.cd-shell) :where(button, input, select, textarea) {
56
+ font: inherit;
57
+ color: inherit;
58
+ }
59
+
60
+ /*
61
+ * The chrome's own islands, controls and texts take nothing from a foreign page's element rules
62
+ * (button { text-transform: uppercase }, p { font-size: 18px }, section { font-family: serif }):
63
+ * class specificity beats them, and every component rule below comes later and sets its own size
64
+ * and weight (guide §5.1, §5.14).
65
+ */
66
+ :where(.cd-shell)
67
+ :is(
68
+ .cd-shell-layer,
69
+ .cd-shell-island,
70
+ .cd-shell-menu,
71
+ .cd-shell-menu-group,
72
+ .cd-shell-status,
73
+ .cd-shell-hint,
74
+ .cd-shell-inspector,
75
+ .cd-shell-legend-header,
76
+ .cd-shell-legend-body,
77
+ .cd-shell-tooltip,
78
+ .cd-shell-menu-trigger,
79
+ .cd-shell-target,
80
+ .cd-shell-menu-item,
81
+ .cd-shell-menu-item-label,
82
+ .cd-shell-menu-shortcut,
83
+ .cd-shell-menu-heading,
84
+ .cd-shell-problems,
85
+ .cd-shell-problems-text,
86
+ .cd-shell-legend-close,
87
+ .cd-shell-legend-title,
88
+ .cd-shell-hint-text,
89
+ .cd-shell-hint-action,
90
+ .cd-shell-status-text,
91
+ .cd-shell-tooltip-label,
92
+ .cd-shell-kbd
93
+ ) {
94
+ color: inherit;
95
+ font: inherit;
96
+ letter-spacing: normal;
97
+ word-spacing: normal;
98
+ text-transform: none;
99
+ text-indent: 0;
100
+ text-shadow: none;
101
+ }
102
+
103
+ .cd-shell-layer {
104
+ position: absolute;
105
+ inset: 0;
106
+ z-index: var(--cd-shell-ebene-aufklapper);
107
+ pointer-events: none;
108
+ }
109
+
110
+ .cd-shell
111
+ :is(
112
+ .cd-shell-island,
113
+ .cd-shell-status,
114
+ .cd-shell-hint,
115
+ .cd-shell-inspector,
116
+ .cd-shell-menu,
117
+ .cd-shell-tooltip,
118
+ .cd-shell-kbd
119
+ )[hidden] {
120
+ display: none;
121
+ }
122
+
123
+ /* ---- Glass islands (guide §5.3, §6) --------------------------------------------------------- */
124
+
125
+ .cd-shell-island {
126
+ position: absolute;
127
+ z-index: var(--cd-shell-ebene-inseln);
128
+ box-sizing: border-box;
129
+ margin: 0;
130
+ color: var(--cd-ui-text);
131
+ background: color-mix(in srgb, var(--cd-ui-flaeche-hoch) var(--cd-ui-chrome-deckkraft), transparent);
132
+ -webkit-backdrop-filter: blur(8px);
133
+ backdrop-filter: blur(8px);
134
+ border: 1px solid var(--cd-ui-linie);
135
+ border-radius: var(--cd-radius-md);
136
+ box-shadow: var(--cd-shadow-1);
137
+ user-select: none;
138
+ -webkit-user-select: none;
139
+ }
140
+
141
+ .cd-shell
142
+ :is(
143
+ .cd-shell-menu-trigger,
144
+ .cd-shell-target,
145
+ .cd-shell-menu-item-icon,
146
+ .cd-shell-menu-item-end,
147
+ .cd-shell-problems-icon,
148
+ .cd-shell-status-icon,
149
+ .cd-shell-legend-close
150
+ )
151
+ svg {
152
+ display: block;
153
+ flex: none;
154
+ }
155
+
156
+ /* ---- Focus (guide §5.14, §8) ---------------------------------------------------------------- */
157
+
158
+ .cd-shell
159
+ :is(
160
+ .cd-shell-menu-trigger,
161
+ .cd-shell-target,
162
+ .cd-shell-menu-item,
163
+ .cd-shell-problems,
164
+ .cd-shell-legend-close,
165
+ .cd-shell-hint-action
166
+ ):focus {
167
+ outline: none;
168
+ }
169
+
170
+ .cd-shell
171
+ :is(
172
+ .cd-shell-menu-trigger,
173
+ .cd-shell-target,
174
+ .cd-shell-menu-item,
175
+ .cd-shell-problems,
176
+ .cd-shell-legend-close,
177
+ .cd-shell-hint-action
178
+ ):focus-visible {
179
+ outline: 2px solid var(--cd-ui-fokus);
180
+ outline-offset: 2px;
181
+ }
182
+
183
+ /* Dense containers: inside, or the container cuts the ring off and the neighbour covers it. */
184
+ .cd-shell :is(.cd-shell-menu-item, .cd-shell-zoom .cd-shell-target):focus-visible {
185
+ outline-offset: -2px;
186
+ }
187
+
188
+ /*
189
+ * The canvas <svg> is a tab stop (guide §5.14) and fills the slot, which clips: its ring lies inside.
190
+ * diagram-js leaves it the browser's own ring.
191
+ */
192
+ .cd-shell-canvas .djs-container > svg:focus {
193
+ outline: none;
194
+ }
195
+
196
+ .cd-shell-canvas .djs-container > svg:focus-visible {
197
+ outline: 2px solid var(--cd-ui-fokus);
198
+ outline-offset: -2px;
199
+ }
200
+
201
+ /* ---- Menu trigger and dropdown (guide §5.4) ------------------------------------------------- */
202
+
203
+ .cd-shell-menu-trigger {
204
+ top: var(--cd-shell-rand);
205
+ left: var(--cd-shell-rand);
206
+ z-index: var(--cd-shell-ebene-reihe);
207
+ display: grid;
208
+ place-items: center;
209
+ width: var(--cd-shell-zeile);
210
+ height: var(--cd-shell-zeile);
211
+ padding: 0;
212
+ cursor: pointer;
213
+ transition:
214
+ background-color var(--cd-motion-fast) var(--cd-ease),
215
+ color var(--cd-motion-fast) var(--cd-ease);
216
+ }
217
+
218
+ .cd-shell-menu-trigger:hover,
219
+ .cd-shell-menu-trigger:active,
220
+ .cd-shell-menu-trigger[aria-expanded="true"] {
221
+ color: var(--cd-ui-interaktion);
222
+ background: var(--cd-ui-hover);
223
+ }
224
+
225
+ .cd-shell-menu {
226
+ position: absolute;
227
+ top: calc(var(--cd-shell-rand) + var(--cd-shell-zeile) + var(--cd-shell-luecke));
228
+ left: var(--cd-shell-rand);
229
+ box-sizing: border-box;
230
+ display: flex;
231
+ flex-direction: column;
232
+ min-width: min(var(--cd-shell-menue-breite), 100cqw - 2 * var(--cd-shell-rand));
233
+ max-width: min(320px, 100cqw - 2 * var(--cd-shell-rand));
234
+ max-height: calc(100cqh - 72px);
235
+ overflow-y: auto;
236
+ overscroll-behavior: contain;
237
+ margin: 0;
238
+ padding: 6px;
239
+ color: var(--cd-ui-text);
240
+ background: var(--cd-ui-flaeche-hoch);
241
+ border: 1px solid var(--cd-ui-linie);
242
+ border-radius: var(--cd-radius-md);
243
+ box-shadow: var(--cd-shadow-3);
244
+ pointer-events: auto;
245
+ user-select: none;
246
+ -webkit-user-select: none;
247
+ animation: cd-shell-drop-in var(--cd-motion-fast) var(--cd-ease-out);
248
+ }
249
+
250
+ .cd-shell-menu-item {
251
+ box-sizing: border-box;
252
+ display: flex;
253
+ flex: none;
254
+ align-items: center;
255
+ gap: 12px;
256
+ width: 100%;
257
+ min-height: var(--cd-shell-eintrag);
258
+ margin: 0;
259
+ padding: 8px 12px;
260
+ color: var(--cd-ui-text);
261
+ font: inherit;
262
+ font-size: 13px;
263
+ font-weight: 400;
264
+ line-height: 1.5;
265
+ text-align: left;
266
+ background: transparent;
267
+ border: 0;
268
+ border-radius: var(--cd-radius-sm);
269
+ cursor: pointer;
270
+ transition: background-color var(--cd-motion-fast) var(--cd-ease);
271
+ }
272
+
273
+ .cd-shell-menu-item:hover,
274
+ .cd-shell-menu-item:focus-visible {
275
+ background: var(--cd-ui-hover);
276
+ }
277
+
278
+ /* The icon column keeps its 16px without an icon, so every label lines up. */
279
+ .cd-shell-menu-item-icon {
280
+ display: grid;
281
+ flex: none;
282
+ place-items: center;
283
+ width: 16px;
284
+ height: 16px;
285
+ }
286
+
287
+ .cd-shell-menu-item-label {
288
+ flex: 1 1 auto;
289
+ min-width: 0;
290
+ }
291
+
292
+ .cd-shell-menu-item-end {
293
+ display: flex;
294
+ flex: none;
295
+ align-items: center;
296
+ margin-left: auto;
297
+ }
298
+
299
+ .cd-shell-menu-shortcut {
300
+ color: var(--cd-ui-text-leise);
301
+ font-family: var(--modeler-shell-font-mono);
302
+ font-size: 13px;
303
+ }
304
+
305
+ .cd-shell-menu-check {
306
+ color: var(--cd-ui-text);
307
+ }
308
+
309
+ /* Unchecked keeps the mark's width, so the dropdown does not change size when it toggles. */
310
+ .cd-shell-menu-item[aria-checked="false"] .cd-shell-menu-check {
311
+ visibility: hidden;
312
+ }
313
+
314
+ .cd-shell-menu-item[data-danger] .cd-shell-menu-item-icon {
315
+ color: var(--cd-ui-danger);
316
+ }
317
+
318
+ .cd-shell-menu-item[aria-disabled="true"] {
319
+ color: var(--cd-ui-text-leise);
320
+ cursor: not-allowed;
321
+ }
322
+
323
+ .cd-shell-menu-item[aria-disabled="true"]:hover,
324
+ .cd-shell-menu-item[aria-disabled="true"]:focus-visible {
325
+ background: transparent;
326
+ }
327
+
328
+ .cd-shell-menu-item[aria-disabled="true"] :is(.cd-shell-menu-item-icon, .cd-shell-menu-check) {
329
+ color: inherit;
330
+ }
331
+
332
+ .cd-shell-menu-separator {
333
+ flex: none;
334
+ height: 1px;
335
+ margin: 4px 8px;
336
+ background: var(--cd-ui-linie);
337
+ }
338
+
339
+ .cd-shell-menu-group {
340
+ display: flex;
341
+ flex: none;
342
+ flex-direction: column;
343
+ }
344
+
345
+ .cd-shell-menu-heading {
346
+ padding: 8px 12px 4px;
347
+ color: var(--cd-ui-text-leise);
348
+ font-size: 13px;
349
+ font-weight: 600;
350
+ line-height: 1.5;
351
+ }
352
+
353
+ /* ---- Tooltip and shortcut chip (guide §5.6) ------------------------------------------------- */
354
+
355
+ .cd-shell-tooltip {
356
+ position: absolute;
357
+ top: 0;
358
+ left: 0;
359
+ box-sizing: border-box;
360
+ width: max-content;
361
+ max-width: min(280px, 100cqw - 2 * var(--cd-shell-rand));
362
+ margin: 0;
363
+ padding: 3px 8px;
364
+ color: var(--cd-ui-text);
365
+ font: 400 13px/20px var(--modeler-shell-font);
366
+ white-space: normal;
367
+ background: var(--cd-ui-flaeche-hoch);
368
+ border: 1px solid var(--cd-ui-linie);
369
+ border-radius: var(--cd-radius-sm);
370
+ box-shadow: var(--cd-shadow-2);
371
+ pointer-events: none;
372
+ user-select: none;
373
+ -webkit-user-select: none;
374
+ }
375
+
376
+ .cd-shell-tooltip .cd-shell-kbd {
377
+ margin-left: 6px;
378
+ }
379
+
380
+ /* Every property set, so no host style (VS Code colours kbd, adds a shadow) leaks through. */
381
+ .cd-shell-kbd,
382
+ html.cd-shell-document kbd {
383
+ display: inline;
384
+ margin: 0;
385
+ padding: 1px 6px;
386
+ color: var(--cd-ui-text-leise);
387
+ font: 400 13px/16px var(--modeler-shell-font-mono);
388
+ text-shadow: none;
389
+ vertical-align: baseline;
390
+ background: var(--cd-ui-grund);
391
+ border: 1px solid var(--cd-ui-linie);
392
+ border-radius: var(--cd-radius-sm);
393
+ box-shadow: none;
394
+ }
395
+
396
+ /* ---- Zoom panel (guide §5.8) ---------------------------------------------------------------- */
397
+
398
+ .cd-shell-zoom {
399
+ right: var(--cd-shell-rand);
400
+ bottom: var(--cd-shell-rand);
401
+ display: flex;
402
+ align-items: center;
403
+ gap: 2px;
404
+ height: var(--cd-shell-zeile);
405
+ padding: 3px;
406
+ }
407
+
408
+ .cd-shell-target {
409
+ box-sizing: border-box;
410
+ display: inline-grid;
411
+ flex: none;
412
+ place-items: center;
413
+ width: var(--cd-shell-ziel);
414
+ height: var(--cd-shell-ziel);
415
+ margin: 0;
416
+ padding: 0;
417
+ color: var(--cd-ui-text);
418
+ background: transparent;
419
+ border: 0;
420
+ border-radius: var(--cd-radius-sm);
421
+ cursor: pointer;
422
+ transition:
423
+ background-color var(--cd-motion-fast) var(--cd-ease),
424
+ color var(--cd-motion-fast) var(--cd-ease);
425
+ }
426
+
427
+ .cd-shell-target:hover {
428
+ color: var(--cd-ui-interaktion);
429
+ background: var(--cd-ui-hover);
430
+ }
431
+
432
+ .cd-shell-zoom-readout {
433
+ width: auto;
434
+ min-width: 56px;
435
+ padding: 0 4px;
436
+ font-size: 13px;
437
+ font-weight: 600;
438
+ font-variant-numeric: tabular-nums;
439
+ line-height: 1;
440
+ white-space: nowrap;
441
+ }
442
+
443
+ .cd-shell-zoom-readout:hover {
444
+ color: var(--cd-ui-text);
445
+ }
446
+
447
+ /* Disabled is opaque and neutral, never through opacity (guide §8). */
448
+ .cd-shell-target[aria-disabled="true"],
449
+ .cd-shell-target[aria-disabled="true"]:hover {
450
+ color: var(--cd-ui-text-leise);
451
+ background: transparent;
452
+ cursor: not-allowed;
453
+ }
454
+
455
+ .cd-shell-zoom-separator {
456
+ flex: none;
457
+ align-self: stretch;
458
+ width: 1px;
459
+ margin: 4px 2px;
460
+ background: var(--cd-ui-linie);
461
+ }
462
+
463
+ /* ---- Problems pill (guide §5.10) ------------------------------------------------------------ */
464
+
465
+ .cd-shell-problems {
466
+ left: var(--cd-shell-rand);
467
+ bottom: var(--cd-shell-rand);
468
+ display: inline-flex;
469
+ align-items: center;
470
+ gap: var(--cd-shell-luecke);
471
+ height: var(--cd-shell-zeile);
472
+ padding: 0 16px;
473
+ font: inherit;
474
+ font-size: 13px;
475
+ line-height: 1.5;
476
+ white-space: nowrap;
477
+ border-radius: var(--cd-radius-pill);
478
+ cursor: pointer;
479
+ transition: background-color var(--cd-motion-fast) var(--cd-ease);
480
+ }
481
+
482
+ .cd-shell-problems:hover {
483
+ background: var(--cd-ui-hover);
484
+ }
485
+
486
+ .cd-shell-problems[data-severity="danger"] .cd-shell-problems-icon {
487
+ color: var(--cd-ui-danger);
488
+ }
489
+
490
+ .cd-shell-problems[data-severity="warning"] .cd-shell-problems-icon {
491
+ color: var(--cd-ui-warning);
492
+ }
493
+
494
+ /* The web app keeps its legal line (20px, more where it wraps) below the pill. */
495
+ .cd-shell[data-cd-shell-host="web"] .cd-shell-problems {
496
+ bottom: calc(var(--cd-shell-rand) + var(--modeler-shell-legal-height, 20px) + var(--cd-shell-luecke));
497
+ }
498
+
499
+ /* ---- Status box under the palette (guide §5.12) --------------------------------------------- */
500
+
501
+ .cd-shell-status {
502
+ position: absolute;
503
+ top: var(--cd-shell-frei);
504
+ left: 50%;
505
+ translate: -50% 0;
506
+ z-index: var(--cd-shell-ebene-inseln);
507
+ box-sizing: border-box;
508
+ display: flex;
509
+ align-items: flex-start;
510
+ gap: var(--cd-shell-luecke);
511
+ width: max-content;
512
+ max-width: min(560px, 100cqw - 2 * var(--cd-shell-rand));
513
+ margin: 0;
514
+ padding: 12px 16px;
515
+ overflow: hidden;
516
+ color: var(--cd-ui-text);
517
+ font-size: 13px;
518
+ line-height: 1.5;
519
+ background: var(--cd-ui-danger-flaeche);
520
+ border: 1px solid var(--cd-ui-danger);
521
+ border-radius: var(--cd-radius-md);
522
+ box-shadow: var(--cd-shadow-2);
523
+ user-select: none;
524
+ -webkit-user-select: none;
525
+ animation: cd-shell-drop-in var(--cd-motion-base) var(--cd-ease-out);
526
+ }
527
+
528
+ /* Its own element: a border-left would follow the radius and bend into a crescent. */
529
+ .cd-shell-status::before {
530
+ content: "";
531
+ position: absolute;
532
+ top: 0;
533
+ bottom: 0;
534
+ left: 0;
535
+ width: 4px;
536
+ background: var(--cd-ui-danger);
537
+ }
538
+
539
+ .cd-shell-status-icon {
540
+ flex: none;
541
+ margin-top: 2px;
542
+ color: var(--cd-ui-danger);
543
+ }
544
+
545
+ .cd-shell-status-text {
546
+ margin: 0;
547
+ }
548
+
549
+ .cd-shell-status[data-severity="warning"] {
550
+ background: var(--cd-ui-warning-flaeche);
551
+ border-color: var(--cd-ui-warning);
552
+ }
553
+
554
+ .cd-shell-status[data-severity="warning"]::before {
555
+ background: var(--cd-ui-warning);
556
+ }
557
+
558
+ .cd-shell-status[data-severity="warning"] .cd-shell-status-icon {
559
+ color: var(--cd-ui-warning);
560
+ }
561
+
562
+ .cd-shell[data-palette="second-row"] .cd-shell-status {
563
+ top: calc(var(--cd-shell-frei) + var(--cd-shell-zeile) + var(--cd-shell-rand));
564
+ }
565
+
566
+ /* With the side inspector open: centred in the strip to its left. */
567
+ @container cd-shell (width > 760px) {
568
+ .cd-shell[data-inspector="open"] .cd-shell-status {
569
+ left: calc((100cqw - var(--cd-shell-inspector-breite) - var(--cd-shell-rand)) / 2);
570
+ max-width: min(560px, 100cqw - var(--cd-shell-inspector-breite) - 3 * var(--cd-shell-rand));
571
+ }
572
+ }
573
+
574
+ /* ---- Empty-file hint (guide §13.5) ---------------------------------------------------------- */
575
+
576
+ /* Centred in the free rectangle of the fit; the script sets the exact insets of what is open. */
577
+ .cd-shell-hint {
578
+ position: absolute;
579
+ inset: var(--cd-shell-einpassen-oben) var(--cd-shell-einpassen-seite) var(--cd-shell-einpassen-unten);
580
+ z-index: var(--cd-shell-ebene-inseln);
581
+ display: flex;
582
+ flex-direction: column;
583
+ align-items: center;
584
+ justify-content: center;
585
+ gap: 12px;
586
+ text-align: center;
587
+ pointer-events: none;
588
+ user-select: none;
589
+ -webkit-user-select: none;
590
+ }
591
+
592
+ .cd-shell[data-palette="second-row"] .cd-shell-hint {
593
+ top: var(--cd-shell-einpassen-oben-schmal);
594
+ }
595
+
596
+ .cd-shell-hint-text {
597
+ margin: 0;
598
+ color: var(--cd-ui-text-leise);
599
+ font-size: 13px;
600
+ line-height: 1.5;
601
+ }
602
+
603
+ .cd-shell-hint-action {
604
+ box-sizing: border-box;
605
+ display: inline-flex;
606
+ align-items: center;
607
+ justify-content: center;
608
+ height: var(--cd-shell-eintrag);
609
+ margin: 0;
610
+ padding: 0 16px;
611
+ color: var(--cd-ui-text);
612
+ font: inherit;
613
+ font-size: 13px;
614
+ font-weight: 600;
615
+ line-height: 1;
616
+ white-space: nowrap;
617
+ background: transparent;
618
+ border: 1px solid transparent;
619
+ border-radius: var(--cd-radius-md);
620
+ cursor: pointer;
621
+ pointer-events: auto;
622
+ transition: background-color var(--cd-motion-fast) var(--cd-ease);
623
+ }
624
+
625
+ .cd-shell-hint-action:hover {
626
+ background: var(--cd-ui-hover);
627
+ }
628
+
629
+ /* ---- Legend (guide §5.10) ------------------------------------------------------------------- */
630
+
631
+ .cd-shell-legend {
632
+ --modeler-shell-legend-bottom: var(--cd-shell-rand);
633
+ --modeler-shell-legend-min-bottom: 0px;
634
+ --modeler-shell-legend-top: var(--cd-shell-frei);
635
+ left: var(--cd-shell-rand);
636
+ bottom: max(var(--modeler-shell-legend-bottom), var(--modeler-shell-legend-min-bottom));
637
+ min-width: 184px;
638
+ max-height: calc(
639
+ 100cqh - var(--modeler-shell-legend-top) -
640
+ max(var(--modeler-shell-legend-bottom), var(--modeler-shell-legend-min-bottom)) - var(--cd-shell-rand)
641
+ );
642
+ overflow-y: auto;
643
+ overscroll-behavior: contain;
644
+ padding: 8px 12px 12px 16px;
645
+ box-shadow: var(--cd-shadow-2);
646
+ animation: cd-shell-rise-in var(--cd-motion-base) var(--cd-ease-out);
647
+ }
648
+
649
+ .cd-shell[data-problems="shown"] .cd-shell-legend {
650
+ --modeler-shell-legend-bottom: calc(var(--cd-shell-rand) + var(--cd-shell-zeile) + var(--cd-shell-luecke));
651
+ }
652
+
653
+ .cd-shell[data-cd-shell-host="web"] .cd-shell-legend {
654
+ --modeler-shell-legend-bottom: calc(
655
+ var(--cd-shell-rand) + var(--modeler-shell-legal-height, 20px) + var(--cd-shell-luecke)
656
+ );
657
+ }
658
+
659
+ .cd-shell[data-cd-shell-host="web"][data-problems="shown"] .cd-shell-legend {
660
+ --modeler-shell-legend-bottom: calc(
661
+ var(--cd-shell-rand) + var(--modeler-shell-legal-height, 20px) + var(--cd-shell-luecke) +
662
+ var(--cd-shell-zeile) + var(--cd-shell-luecke)
663
+ );
664
+ }
665
+
666
+ .cd-shell[data-palette="second-row"] .cd-shell-legend {
667
+ --modeler-shell-legend-top: calc(var(--cd-shell-frei) + var(--cd-shell-zeile) + var(--cd-shell-rand));
668
+ }
669
+
670
+ /* Too narrow to sit beside the zoom panel: above the bottom row. */
671
+ @container cd-shell (max-width: 440px) {
672
+ .cd-shell-legend {
673
+ --modeler-shell-legend-min-bottom: calc(
674
+ var(--cd-shell-rand) + var(--cd-shell-zeile) + var(--cd-shell-luecke)
675
+ );
676
+ }
677
+ }
678
+
679
+ .cd-shell-legend-header {
680
+ display: flex;
681
+ align-items: center;
682
+ justify-content: space-between;
683
+ gap: var(--cd-shell-luecke);
684
+ margin: 0 -4px 4px 0;
685
+ }
686
+
687
+ .cd-shell-legend-title {
688
+ margin: 0;
689
+ font-size: 13px;
690
+ font-weight: 600;
691
+ line-height: 1.5;
692
+ }
693
+
694
+ .cd-shell-legend-close {
695
+ box-sizing: border-box;
696
+ display: grid;
697
+ flex: none;
698
+ place-items: center;
699
+ width: 28px;
700
+ height: 28px;
701
+ margin: 0;
702
+ padding: 0;
703
+ color: var(--cd-ui-text);
704
+ background: transparent;
705
+ border: 0;
706
+ border-radius: var(--cd-radius-sm);
707
+ cursor: pointer;
708
+ transition:
709
+ background-color var(--cd-motion-fast) var(--cd-ease),
710
+ color var(--cd-motion-fast) var(--cd-ease);
711
+ }
712
+
713
+ .cd-shell-legend-close:hover {
714
+ color: var(--cd-ui-interaktion);
715
+ background: var(--cd-ui-hover);
716
+ }
717
+
718
+ .cd-shell-legend-body {
719
+ display: flex;
720
+ flex-direction: column;
721
+ gap: 4px;
722
+ }
723
+
724
+ .cd-shell-legend-row {
725
+ display: flex;
726
+ align-items: center;
727
+ gap: var(--cd-shell-luecke);
728
+ min-height: 24px;
729
+ color: var(--cd-ui-text);
730
+ font-size: 13px;
731
+ line-height: 1.5;
732
+ }
733
+
734
+ .cd-shell-legend-preview {
735
+ display: inline-grid;
736
+ flex: none;
737
+ place-items: center;
738
+ width: 24px;
739
+ height: 24px;
740
+ }
741
+
742
+ /* 4px margin plus the body's 4px gap: 8px before and after (guide §5.10). */
743
+ .cd-shell-legend-separator {
744
+ flex: none;
745
+ height: 1px;
746
+ margin: 4px 0;
747
+ background: var(--cd-ui-linie);
748
+ border: 0;
749
+ }
750
+
751
+ /* ---- Inspector (guide §5.11) ---------------------------------------------------------------- */
752
+
753
+ .cd-shell-inspector {
754
+ position: absolute;
755
+ top: var(--cd-shell-frei);
756
+ right: var(--cd-shell-rand);
757
+ z-index: var(--cd-shell-ebene-inspector);
758
+ box-sizing: border-box;
759
+ width: var(--cd-shell-inspector-breite);
760
+ max-height: calc(100cqh - 2 * var(--cd-shell-frei));
761
+ overflow-y: auto;
762
+ overscroll-behavior: contain;
763
+ margin: 0;
764
+ padding: 16px;
765
+ color: var(--cd-ui-text);
766
+ background: var(--cd-ui-flaeche-hoch);
767
+ border: 1px solid var(--cd-ui-linie);
768
+ border-radius: var(--cd-radius-lg);
769
+ box-shadow: var(--cd-shadow-2);
770
+ animation: cd-shell-drop-in var(--cd-motion-fast) var(--cd-ease-out);
771
+ }
772
+
773
+ /* Narrow: a bottom sheet; the islands it would half cover step aside meanwhile. */
774
+ @container cd-shell (max-width: 760px) {
775
+ .cd-shell-inspector {
776
+ top: auto;
777
+ left: var(--cd-shell-rand);
778
+ bottom: var(--cd-shell-rand);
779
+ width: auto;
780
+ max-height: 45cqh;
781
+ animation: cd-shell-rise-in var(--cd-motion-base) var(--cd-ease-out);
782
+ }
783
+
784
+ .cd-shell[data-inspector="open"] :is(.cd-shell-zoom, .cd-shell-problems, .cd-shell-legend) {
785
+ visibility: hidden;
786
+ }
787
+
788
+ .cd-shell-status {
789
+ top: calc(var(--cd-shell-frei) + var(--cd-shell-zeile) + var(--cd-shell-rand));
790
+ }
791
+
792
+ .cd-shell-hint {
793
+ top: var(--cd-shell-einpassen-oben-schmal);
794
+ }
795
+
796
+ .cd-shell-legend {
797
+ --modeler-shell-legend-top: calc(var(--cd-shell-frei) + var(--cd-shell-zeile) + var(--cd-shell-rand));
798
+ }
799
+ }
800
+
801
+ /* ---- Motion (guide §5.14, §7) --------------------------------------------------------------- */
802
+
803
+ @keyframes cd-shell-drop-in {
804
+ from {
805
+ opacity: 0;
806
+ transform: translateY(-4px);
807
+ }
808
+ }
809
+
810
+ @keyframes cd-shell-rise-in {
811
+ from {
812
+ opacity: 0;
813
+ transform: translateY(8px);
814
+ }
815
+ }
816
+
817
+ @media (prefers-reduced-motion: reduce) {
818
+ .cd-shell,
819
+ .cd-shell *,
820
+ .cd-shell *::before,
821
+ .cd-shell *::after {
822
+ animation-duration: 0.001ms !important;
823
+ animation-iteration-count: 1 !important;
824
+ transition-duration: 0.001ms !important;
825
+ }
826
+ }
827
+
828
+ /* The host asks for it although the OS does not: VS Code's workbench.reduceMotion. */
829
+ html.cd-shell-reduce-motion .cd-shell,
830
+ html.cd-shell-reduce-motion .cd-shell *,
831
+ html.cd-shell-reduce-motion .cd-shell *::before,
832
+ html.cd-shell-reduce-motion .cd-shell *::after {
833
+ animation-duration: 0.001ms !important;
834
+ animation-iteration-count: 1 !important;
835
+ transition-duration: 0.001ms !important;
836
+ }
837
+
838
+ /* One frame of a mode switch: no colour fades (guide §7). */
839
+ html.cd-shell-no-transition,
840
+ html.cd-shell-no-transition *,
841
+ html.cd-shell-no-transition *::before,
842
+ html.cd-shell-no-transition *::after {
843
+ transition: none !important;
844
+ }
845
+
846
+ /* ---- High contrast (guide §5.3): no shadows, 3px focus -------------------------------------- */
847
+
848
+ .cd-shell:is([data-cd-kontrast="hoch"], [data-cd-kontrast="hoch"] *)
849
+ :is(.cd-shell-island, .cd-shell-menu, .cd-shell-tooltip, .cd-shell-status, .cd-shell-inspector) {
850
+ box-shadow: none;
851
+ }
852
+
853
+ .cd-shell:is([data-cd-kontrast="hoch"], [data-cd-kontrast="hoch"] *)
854
+ :is(
855
+ .cd-shell-menu-trigger,
856
+ .cd-shell-target,
857
+ .cd-shell-menu-item,
858
+ .cd-shell-problems,
859
+ .cd-shell-legend-close,
860
+ .cd-shell-hint-action
861
+ ):focus-visible {
862
+ outline-width: 3px;
863
+ }
864
+
865
+ .cd-shell:is([data-cd-kontrast="hoch"], [data-cd-kontrast="hoch"] *)
866
+ :is(.cd-shell-menu-item, .cd-shell-zoom .cd-shell-target):focus-visible {
867
+ outline-offset: -3px;
868
+ }
869
+
870
+ .cd-shell:is([data-cd-kontrast="hoch"], [data-cd-kontrast="hoch"] *)
871
+ .cd-shell-canvas
872
+ .djs-container
873
+ > svg:focus-visible {
874
+ outline-width: 3px;
875
+ outline-offset: -3px;
876
+ }
877
+
878
+ /* ---- Forced colours (guide §5.14): nothing disappears --------------------------------------- */
879
+
880
+ @media (forced-colors: active) {
881
+ .cd-shell :is(.cd-shell-island, .cd-shell-menu, .cd-shell-tooltip, .cd-shell-status, .cd-shell-inspector) {
882
+ border-color: CanvasText;
883
+ }
884
+
885
+ .cd-shell-status::before,
886
+ .cd-shell :is(.cd-shell-menu-separator, .cd-shell-zoom-separator, .cd-shell-legend-separator) {
887
+ forced-color-adjust: none;
888
+ background: CanvasText;
889
+ }
890
+
891
+ .cd-shell
892
+ :is(
893
+ .cd-shell-menu-trigger,
894
+ .cd-shell-target,
895
+ .cd-shell-menu-item,
896
+ .cd-shell-problems,
897
+ .cd-shell-legend-close,
898
+ .cd-shell-hint-action
899
+ ):focus-visible {
900
+ outline-color: Highlight;
901
+ }
902
+
903
+ .cd-shell :is(.cd-shell-menu-trigger, .cd-shell-target)[aria-pressed="true"] {
904
+ forced-color-adjust: none;
905
+ box-shadow: inset 0 0 0 2px Highlight;
906
+ }
907
+
908
+ .cd-shell .cd-shell-canvas .djs-container > svg:focus-visible {
909
+ outline-color: Highlight;
910
+ }
911
+
912
+ .cd-shell :is(.cd-shell-target, .cd-shell-menu-item)[aria-disabled="true"] {
913
+ color: GrayText;
914
+ }
915
+ }
916
+
917
+ /* ---- Own document (ide, web): nothing of the host's webview styling shows (guide §13.5) ---- */
918
+
919
+ /* Unlayered on purpose: VS Code's defaults sit in @layer vscode-default and lose to it. */
920
+ html.cd-shell-document,
921
+ html.cd-shell-document body {
922
+ height: 100%;
923
+ margin: 0;
924
+ padding: 0;
925
+ overflow: hidden;
926
+ color: var(--cd-ui-text);
927
+ font: 400 13px/1.5 var(--modeler-shell-font);
928
+ background: var(--cd-ui-grund);
929
+ }
930
+
931
+ html.cd-shell-document {
932
+ scrollbar-color: var(--cd-ui-kontur) transparent;
933
+ }
934
+
935
+ /* Zero specificity: the chrome's own rules (the readout's 600, a hint button's weight) must win. */
936
+ :where(html.cd-shell-document) :where(button, input, select, textarea) {
937
+ font: inherit;
938
+ color: inherit;
939
+ }
940
+
941
+ html.cd-shell-document code {
942
+ padding: 0;
943
+ color: inherit;
944
+ font-family: var(--modeler-shell-font-mono);
945
+ font-size: inherit;
946
+ background: transparent;
947
+ border-radius: 0;
948
+ }
949
+
950
+ html.cd-shell-document a,
951
+ html.cd-shell-document a:hover,
952
+ html.cd-shell-document a:visited {
953
+ color: var(--cd-ui-link);
954
+ }
955
+
956
+ /* VS Code rings a:focus, input:focus … with its own colour, also for a mouse focus. */
957
+ html.cd-shell-document :where(a, input, select, textarea):focus {
958
+ outline: none;
959
+ }
960
+
961
+ html.cd-shell-document :where(a, input, select, textarea, button, summary):focus-visible {
962
+ outline: 2px solid var(--cd-ui-fokus);
963
+ outline-offset: 2px;
964
+ }
965
+
966
+ html.cd-shell-document[data-cd-kontrast="hoch"]
967
+ :where(a, input, select, textarea, button, summary):focus-visible {
968
+ outline-width: 3px;
969
+ }