@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,966 @@
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) below the pill. */
495
+ .cd-shell[data-cd-shell-host="web"] .cd-shell-problems {
496
+ bottom: calc(var(--cd-shell-rand) + 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(var(--cd-shell-rand) + 20px + var(--cd-shell-luecke));
655
+ }
656
+
657
+ .cd-shell[data-cd-shell-host="web"][data-problems="shown"] .cd-shell-legend {
658
+ --modeler-shell-legend-bottom: calc(
659
+ var(--cd-shell-rand) + 20px + var(--cd-shell-luecke) + var(--cd-shell-zeile) + var(--cd-shell-luecke)
660
+ );
661
+ }
662
+
663
+ .cd-shell[data-palette="second-row"] .cd-shell-legend {
664
+ --modeler-shell-legend-top: calc(var(--cd-shell-frei) + var(--cd-shell-zeile) + var(--cd-shell-rand));
665
+ }
666
+
667
+ /* Too narrow to sit beside the zoom panel: above the bottom row. */
668
+ @container cd-shell (max-width: 440px) {
669
+ .cd-shell-legend {
670
+ --modeler-shell-legend-min-bottom: calc(
671
+ var(--cd-shell-rand) + var(--cd-shell-zeile) + var(--cd-shell-luecke)
672
+ );
673
+ }
674
+ }
675
+
676
+ .cd-shell-legend-header {
677
+ display: flex;
678
+ align-items: center;
679
+ justify-content: space-between;
680
+ gap: var(--cd-shell-luecke);
681
+ margin: 0 -4px 4px 0;
682
+ }
683
+
684
+ .cd-shell-legend-title {
685
+ margin: 0;
686
+ font-size: 13px;
687
+ font-weight: 600;
688
+ line-height: 1.5;
689
+ }
690
+
691
+ .cd-shell-legend-close {
692
+ box-sizing: border-box;
693
+ display: grid;
694
+ flex: none;
695
+ place-items: center;
696
+ width: 28px;
697
+ height: 28px;
698
+ margin: 0;
699
+ padding: 0;
700
+ color: var(--cd-ui-text);
701
+ background: transparent;
702
+ border: 0;
703
+ border-radius: var(--cd-radius-sm);
704
+ cursor: pointer;
705
+ transition:
706
+ background-color var(--cd-motion-fast) var(--cd-ease),
707
+ color var(--cd-motion-fast) var(--cd-ease);
708
+ }
709
+
710
+ .cd-shell-legend-close:hover {
711
+ color: var(--cd-ui-interaktion);
712
+ background: var(--cd-ui-hover);
713
+ }
714
+
715
+ .cd-shell-legend-body {
716
+ display: flex;
717
+ flex-direction: column;
718
+ gap: 4px;
719
+ }
720
+
721
+ .cd-shell-legend-row {
722
+ display: flex;
723
+ align-items: center;
724
+ gap: var(--cd-shell-luecke);
725
+ min-height: 24px;
726
+ color: var(--cd-ui-text);
727
+ font-size: 13px;
728
+ line-height: 1.5;
729
+ }
730
+
731
+ .cd-shell-legend-preview {
732
+ display: inline-grid;
733
+ flex: none;
734
+ place-items: center;
735
+ width: 24px;
736
+ height: 24px;
737
+ }
738
+
739
+ /* 4px margin plus the body's 4px gap: 8px before and after (guide §5.10). */
740
+ .cd-shell-legend-separator {
741
+ flex: none;
742
+ height: 1px;
743
+ margin: 4px 0;
744
+ background: var(--cd-ui-linie);
745
+ border: 0;
746
+ }
747
+
748
+ /* ---- Inspector (guide §5.11) ---------------------------------------------------------------- */
749
+
750
+ .cd-shell-inspector {
751
+ position: absolute;
752
+ top: var(--cd-shell-frei);
753
+ right: var(--cd-shell-rand);
754
+ z-index: var(--cd-shell-ebene-inspector);
755
+ box-sizing: border-box;
756
+ width: var(--cd-shell-inspector-breite);
757
+ max-height: calc(100cqh - 2 * var(--cd-shell-frei));
758
+ overflow-y: auto;
759
+ overscroll-behavior: contain;
760
+ margin: 0;
761
+ padding: 16px;
762
+ color: var(--cd-ui-text);
763
+ background: var(--cd-ui-flaeche-hoch);
764
+ border: 1px solid var(--cd-ui-linie);
765
+ border-radius: var(--cd-radius-lg);
766
+ box-shadow: var(--cd-shadow-2);
767
+ animation: cd-shell-drop-in var(--cd-motion-fast) var(--cd-ease-out);
768
+ }
769
+
770
+ /* Narrow: a bottom sheet; the islands it would half cover step aside meanwhile. */
771
+ @container cd-shell (max-width: 760px) {
772
+ .cd-shell-inspector {
773
+ top: auto;
774
+ left: var(--cd-shell-rand);
775
+ bottom: var(--cd-shell-rand);
776
+ width: auto;
777
+ max-height: 45cqh;
778
+ animation: cd-shell-rise-in var(--cd-motion-base) var(--cd-ease-out);
779
+ }
780
+
781
+ .cd-shell[data-inspector="open"] :is(.cd-shell-zoom, .cd-shell-problems, .cd-shell-legend) {
782
+ visibility: hidden;
783
+ }
784
+
785
+ .cd-shell-status {
786
+ top: calc(var(--cd-shell-frei) + var(--cd-shell-zeile) + var(--cd-shell-rand));
787
+ }
788
+
789
+ .cd-shell-hint {
790
+ top: var(--cd-shell-einpassen-oben-schmal);
791
+ }
792
+
793
+ .cd-shell-legend {
794
+ --modeler-shell-legend-top: calc(var(--cd-shell-frei) + var(--cd-shell-zeile) + var(--cd-shell-rand));
795
+ }
796
+ }
797
+
798
+ /* ---- Motion (guide §5.14, §7) --------------------------------------------------------------- */
799
+
800
+ @keyframes cd-shell-drop-in {
801
+ from {
802
+ opacity: 0;
803
+ transform: translateY(-4px);
804
+ }
805
+ }
806
+
807
+ @keyframes cd-shell-rise-in {
808
+ from {
809
+ opacity: 0;
810
+ transform: translateY(8px);
811
+ }
812
+ }
813
+
814
+ @media (prefers-reduced-motion: reduce) {
815
+ .cd-shell,
816
+ .cd-shell *,
817
+ .cd-shell *::before,
818
+ .cd-shell *::after {
819
+ animation-duration: 0.001ms !important;
820
+ animation-iteration-count: 1 !important;
821
+ transition-duration: 0.001ms !important;
822
+ }
823
+ }
824
+
825
+ /* The host asks for it although the OS does not: VS Code's workbench.reduceMotion. */
826
+ html.cd-shell-reduce-motion .cd-shell,
827
+ html.cd-shell-reduce-motion .cd-shell *,
828
+ html.cd-shell-reduce-motion .cd-shell *::before,
829
+ html.cd-shell-reduce-motion .cd-shell *::after {
830
+ animation-duration: 0.001ms !important;
831
+ animation-iteration-count: 1 !important;
832
+ transition-duration: 0.001ms !important;
833
+ }
834
+
835
+ /* One frame of a mode switch: no colour fades (guide §7). */
836
+ html.cd-shell-no-transition,
837
+ html.cd-shell-no-transition *,
838
+ html.cd-shell-no-transition *::before,
839
+ html.cd-shell-no-transition *::after {
840
+ transition: none !important;
841
+ }
842
+
843
+ /* ---- High contrast (guide §5.3): no shadows, 3px focus -------------------------------------- */
844
+
845
+ .cd-shell:is([data-cd-kontrast="hoch"], [data-cd-kontrast="hoch"] *)
846
+ :is(.cd-shell-island, .cd-shell-menu, .cd-shell-tooltip, .cd-shell-status, .cd-shell-inspector) {
847
+ box-shadow: none;
848
+ }
849
+
850
+ .cd-shell:is([data-cd-kontrast="hoch"], [data-cd-kontrast="hoch"] *)
851
+ :is(
852
+ .cd-shell-menu-trigger,
853
+ .cd-shell-target,
854
+ .cd-shell-menu-item,
855
+ .cd-shell-problems,
856
+ .cd-shell-legend-close,
857
+ .cd-shell-hint-action
858
+ ):focus-visible {
859
+ outline-width: 3px;
860
+ }
861
+
862
+ .cd-shell:is([data-cd-kontrast="hoch"], [data-cd-kontrast="hoch"] *)
863
+ :is(.cd-shell-menu-item, .cd-shell-zoom .cd-shell-target):focus-visible {
864
+ outline-offset: -3px;
865
+ }
866
+
867
+ .cd-shell:is([data-cd-kontrast="hoch"], [data-cd-kontrast="hoch"] *)
868
+ .cd-shell-canvas
869
+ .djs-container
870
+ > svg:focus-visible {
871
+ outline-width: 3px;
872
+ outline-offset: -3px;
873
+ }
874
+
875
+ /* ---- Forced colours (guide §5.14): nothing disappears --------------------------------------- */
876
+
877
+ @media (forced-colors: active) {
878
+ .cd-shell :is(.cd-shell-island, .cd-shell-menu, .cd-shell-tooltip, .cd-shell-status, .cd-shell-inspector) {
879
+ border-color: CanvasText;
880
+ }
881
+
882
+ .cd-shell-status::before,
883
+ .cd-shell :is(.cd-shell-menu-separator, .cd-shell-zoom-separator, .cd-shell-legend-separator) {
884
+ forced-color-adjust: none;
885
+ background: CanvasText;
886
+ }
887
+
888
+ .cd-shell
889
+ :is(
890
+ .cd-shell-menu-trigger,
891
+ .cd-shell-target,
892
+ .cd-shell-menu-item,
893
+ .cd-shell-problems,
894
+ .cd-shell-legend-close,
895
+ .cd-shell-hint-action
896
+ ):focus-visible {
897
+ outline-color: Highlight;
898
+ }
899
+
900
+ .cd-shell :is(.cd-shell-menu-trigger, .cd-shell-target)[aria-pressed="true"] {
901
+ forced-color-adjust: none;
902
+ box-shadow: inset 0 0 0 2px Highlight;
903
+ }
904
+
905
+ .cd-shell .cd-shell-canvas .djs-container > svg:focus-visible {
906
+ outline-color: Highlight;
907
+ }
908
+
909
+ .cd-shell :is(.cd-shell-target, .cd-shell-menu-item)[aria-disabled="true"] {
910
+ color: GrayText;
911
+ }
912
+ }
913
+
914
+ /* ---- Own document (ide, web): nothing of the host's webview styling shows (guide §13.5) ---- */
915
+
916
+ /* Unlayered on purpose: VS Code's defaults sit in @layer vscode-default and lose to it. */
917
+ html.cd-shell-document,
918
+ html.cd-shell-document body {
919
+ height: 100%;
920
+ margin: 0;
921
+ padding: 0;
922
+ overflow: hidden;
923
+ color: var(--cd-ui-text);
924
+ font: 400 13px/1.5 var(--modeler-shell-font);
925
+ background: var(--cd-ui-grund);
926
+ }
927
+
928
+ html.cd-shell-document {
929
+ scrollbar-color: var(--cd-ui-kontur) transparent;
930
+ }
931
+
932
+ /* Zero specificity: the chrome's own rules (the readout's 600, a hint button's weight) must win. */
933
+ :where(html.cd-shell-document) :where(button, input, select, textarea) {
934
+ font: inherit;
935
+ color: inherit;
936
+ }
937
+
938
+ html.cd-shell-document code {
939
+ padding: 0;
940
+ color: inherit;
941
+ font-family: var(--modeler-shell-font-mono);
942
+ font-size: inherit;
943
+ background: transparent;
944
+ border-radius: 0;
945
+ }
946
+
947
+ html.cd-shell-document a,
948
+ html.cd-shell-document a:hover,
949
+ html.cd-shell-document a:visited {
950
+ color: var(--cd-ui-link);
951
+ }
952
+
953
+ /* VS Code rings a:focus, input:focus … with its own colour, also for a mouse focus. */
954
+ html.cd-shell-document :where(a, input, select, textarea):focus {
955
+ outline: none;
956
+ }
957
+
958
+ html.cd-shell-document :where(a, input, select, textarea, button, summary):focus-visible {
959
+ outline: 2px solid var(--cd-ui-fokus);
960
+ outline-offset: 2px;
961
+ }
962
+
963
+ html.cd-shell-document[data-cd-kontrast="hoch"]
964
+ :where(a, input, select, textarea, button, summary):focus-visible {
965
+ outline-width: 3px;
966
+ }