@kition/kit-editor 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 (67) hide show
  1. package/README.md +103 -2
  2. package/dist/LICENSE +177 -0
  3. package/dist/THIRD_PARTY_NOTICES +28 -0
  4. package/dist/assets/kitEngine.worker-Bb4qhbsX.js +13038 -0
  5. package/dist/chunks/workspaceTree-CpJ2i9hy.js +23 -0
  6. package/dist/index.js +6434 -0
  7. package/dist/styles.css +807 -0
  8. package/dist/types/src/CommandDialog.d.ts +22 -0
  9. package/dist/types/src/CommentsPanel.d.ts +45 -0
  10. package/dist/types/src/CustomizeDialog.d.ts +32 -0
  11. package/dist/types/src/HostButtons.d.ts +11 -0
  12. package/dist/types/src/RenderFailure.d.ts +7 -0
  13. package/dist/types/src/TextSink.d.ts +6 -0
  14. package/dist/types/src/brand.d.ts +2 -0
  15. package/dist/types/src/catalogMenus.d.ts +27 -0
  16. package/dist/types/src/chart.d.ts +138 -0
  17. package/dist/types/src/conflicts.d.ts +12 -0
  18. package/dist/types/src/drawing.d.ts +83 -0
  19. package/dist/types/src/editor.d.ts +544 -0
  20. package/dist/types/src/engine/KitCanvas.d.ts +70 -0
  21. package/dist/types/src/engine/createKitFile.d.ts +12 -0
  22. package/dist/types/src/engine/decorations.d.ts +14 -0
  23. package/dist/types/src/engine/engineOverlays.d.ts +197 -0
  24. package/dist/types/src/engine/engineTools.d.ts +116 -0
  25. package/dist/types/src/engine/kitDraft.d.ts +70 -0
  26. package/dist/types/src/engine/kitEngine.d.ts +370 -0
  27. package/dist/types/src/engine/kitEngine.worker.d.ts +30 -0
  28. package/dist/types/src/engine/kitHost.d.ts +41 -0
  29. package/dist/types/src/engine/kitModel.d.ts +32 -0
  30. package/dist/types/src/engine/kitModelRunner.d.ts +99 -0
  31. package/dist/types/src/engine/kitModule.d.ts +173 -0
  32. package/dist/types/src/engine/kitShortcuts.d.ts +32 -0
  33. package/dist/types/src/engine/kitTools.d.ts +79 -0
  34. package/dist/types/src/engine/lentFiles.d.ts +29 -0
  35. package/dist/types/src/engine/rasterViewport.d.ts +178 -0
  36. package/dist/types/src/engine/readOnly.d.ts +78 -0
  37. package/dist/types/src/engine/refusal.d.ts +39 -0
  38. package/dist/types/src/engine/replica.d.ts +23 -0
  39. package/dist/types/src/engine/useKitDocument.d.ts +154 -0
  40. package/dist/types/src/engine/workerRelay.d.ts +62 -0
  41. package/dist/types/src/files.d.ts +74 -0
  42. package/dist/types/src/frame/EditorFrame.d.ts +74 -0
  43. package/dist/types/src/frame/FocusBar.d.ts +10 -0
  44. package/dist/types/src/frame/MenuNodes.d.ts +20 -0
  45. package/dist/types/src/frame/MenuRibbon.d.ts +8 -0
  46. package/dist/types/src/frame/ModeButton.d.ts +7 -0
  47. package/dist/types/src/frame/menus.d.ts +64 -0
  48. package/dist/types/src/frame/modes.d.ts +51 -0
  49. package/dist/types/src/frame/useFrameLayout.d.ts +34 -0
  50. package/dist/types/src/host.d.ts +127 -0
  51. package/dist/types/src/index.d.ts +84 -0
  52. package/dist/types/src/ink.d.ts +26 -0
  53. package/dist/types/src/lease.d.ts +53 -0
  54. package/dist/types/src/oneInFlight.d.ts +7 -0
  55. package/dist/types/src/phrases.d.ts +25 -0
  56. package/dist/types/src/presence.d.ts +79 -0
  57. package/dist/types/src/strings.d.ts +6 -0
  58. package/dist/types/src/toolIcons.d.ts +32 -0
  59. package/dist/types/src/uiCatalog.d.ts +59 -0
  60. package/dist/types/src/uiConfig.d.ts +53 -0
  61. package/dist/types/src/uiContext.d.ts +65 -0
  62. package/dist/types/src/uiStore.d.ts +20 -0
  63. package/dist/types/src/useCommentAnchors.d.ts +29 -0
  64. package/dist/types/src/useKitSession.d.ts +115 -0
  65. package/dist/types/src/workspaceTree.d.ts +5 -0
  66. package/dist/workspaceTree.js +1 -0
  67. package/package.json +43 -3
@@ -0,0 +1,807 @@
1
+ /*
2
+ * @kition/kit-editor: the editor shell's own styles (frame, tabs, tool rail, canvas, customize
3
+ * dialog). The shared components' styles and the theme tokens come from Kition Tessera, imported
4
+ * first; every color, radius, font, and shadow comes from the Kit UI protocol's theme tokens
5
+ * (Kition platform docs/platform/reference/ui-protocol.md, section 4), whose defaults are
6
+ * Kition's, so a kit UI opened on its own looks as it does in Kition.
7
+ */
8
+ @import '@kition/tessera-ui/styles.css';
9
+
10
+ html,
11
+ body,
12
+ #root {
13
+ height: 100%;
14
+ margin: 0;
15
+ }
16
+
17
+ body {
18
+ font-family: var(--kit-font-sans);
19
+ font-size: 13px;
20
+ color: var(--kit-text);
21
+ background: var(--kit-surface);
22
+ -webkit-font-smoothing: antialiased;
23
+ overflow: hidden;
24
+ user-select: none;
25
+ }
26
+
27
+ .kui-app {
28
+ position: relative;
29
+ display: flex;
30
+ flex-direction: column;
31
+ height: 100%;
32
+ min-height: 0;
33
+ background: var(--kit-surface);
34
+ }
35
+
36
+ .kui-row {
37
+ display: flex;
38
+ min-height: 0;
39
+ flex: 1;
40
+ }
41
+
42
+ .kui-muted {
43
+ color: var(--kit-text-muted);
44
+ }
45
+
46
+ /* Ribbon */
47
+
48
+ /*
49
+ * A flat Office-style ribbon: the tab strip on the muted surface, then the active tab's groups on
50
+ * one full-width white panel.
51
+ */
52
+ .kui-ribbon-tabs {
53
+ display: flex;
54
+ align-items: flex-end;
55
+ align-self: stretch;
56
+ gap: 2px;
57
+ flex: 1;
58
+ min-width: 0;
59
+ overflow-x: auto;
60
+ scrollbar-width: none;
61
+ }
62
+
63
+ .kui-ribbon-tabs::-webkit-scrollbar {
64
+ display: none;
65
+ }
66
+
67
+ .kui-ribbon-tab {
68
+ flex: none;
69
+ height: 30px;
70
+ padding: 0 10px;
71
+ border: 0;
72
+ border-bottom: var(--kui-tab-underline) solid transparent;
73
+ background: transparent;
74
+ color: var(--kit-text-muted);
75
+ cursor: pointer;
76
+ white-space: nowrap;
77
+ }
78
+
79
+ .kui-ribbon-tab:hover {
80
+ color: var(--kit-text);
81
+ }
82
+
83
+ /* The selected tab in the kit's brand (standard U5b), as Word and WPS color "Home". */
84
+ .kui-ribbon-tab[aria-selected='true'] {
85
+ border-bottom-color: var(--kit-primary);
86
+ color: var(--kit-primary);
87
+ font-weight: var(--kui-tab-selected-weight);
88
+ }
89
+
90
+ /* The document actions, centered in the strip in both shells (ribbon and app bar). */
91
+ .kui-ribbon-end {
92
+ flex: none;
93
+ align-self: center;
94
+ margin-left: 12px;
95
+ display: flex;
96
+ align-items: center;
97
+ gap: 6px;
98
+ }
99
+
100
+ .kui-ribbon-body {
101
+ background: var(--kit-surface);
102
+ border-bottom: 1px solid var(--kit-border);
103
+ }
104
+
105
+ .kui-ribbon-panel {
106
+ display: flex;
107
+ align-items: stretch;
108
+ gap: 2px;
109
+ height: 94px;
110
+ padding: 4px 8px 0;
111
+ overflow-x: auto;
112
+ overflow-y: hidden;
113
+ scrollbar-width: none;
114
+ }
115
+
116
+ .kui-ribbon-panel::-webkit-scrollbar {
117
+ display: none;
118
+ }
119
+
120
+ .kui-canvas-region {
121
+ position: relative;
122
+ flex: 1;
123
+ min-width: 0;
124
+ min-height: 0;
125
+ background: var(--kit-canvas);
126
+ }
127
+
128
+ /* The document canvas (KitCanvas): the surface fills the region, the overlay sits over it. */
129
+
130
+ .kui-canvas {
131
+ position: relative;
132
+ width: 100%;
133
+ height: 100%;
134
+ overflow: hidden;
135
+ }
136
+
137
+ .kui-canvas-surface,
138
+ .kui-canvas-overlay {
139
+ position: absolute;
140
+ inset: 0;
141
+ width: 100%;
142
+ height: 100%;
143
+ }
144
+
145
+ .kui-canvas-surface {
146
+ touch-action: none;
147
+ user-select: none;
148
+ outline: none;
149
+ }
150
+
151
+ .kui-canvas-overlay {
152
+ pointer-events: none;
153
+ }
154
+
155
+ .kui-render-failure {
156
+ position: absolute;
157
+ top: 12px;
158
+ left: 12px;
159
+ right: 12px;
160
+ display: flex;
161
+ align-items: center;
162
+ justify-content: space-between;
163
+ gap: 12px;
164
+ padding: 12px;
165
+ border: 1px solid var(--kit-border);
166
+ border-radius: 12px;
167
+ background: var(--kit-surface);
168
+ color: var(--kit-text);
169
+ overflow-wrap: anywhere;
170
+ }
171
+
172
+ /* The hidden field that takes typed text, so input methods compose (UI-K6). */
173
+ .kui-text-sink {
174
+ position: absolute;
175
+ width: 1px;
176
+ height: 1px;
177
+ padding: 0;
178
+ border: 0;
179
+ opacity: 0;
180
+ pointer-events: none;
181
+ resize: none;
182
+ overflow: hidden;
183
+ }
184
+
185
+ /* Editor shell: messages in the document area, generated command tabs. */
186
+
187
+ .kui-message {
188
+ display: flex;
189
+ flex-direction: column;
190
+ align-items: center;
191
+ justify-content: center;
192
+ gap: 6px;
193
+ height: 100%;
194
+ }
195
+
196
+ .kui-alone {
197
+ display: flex;
198
+ align-items: center;
199
+ justify-content: center;
200
+ height: 100%;
201
+ color: var(--kit-text-muted);
202
+ }
203
+
204
+ .kui-command-grid {
205
+ display: grid;
206
+ grid-auto-flow: column;
207
+ grid-template-rows: repeat(3, var(--kui-ribbon-row));
208
+ align-items: center;
209
+ gap: 1px 4px;
210
+ }
211
+
212
+ /* In Single line's row a menu tab's primary commands sit in the row itself, not in a three-row grid
213
+ (whose first and last rows the row would cut off). */
214
+ .kui-line-inline .kui-command-grid {
215
+ display: contents;
216
+ }
217
+
218
+ /* A form field in a ribbon row (font name, size). */
219
+ .kui-ribbon-field {
220
+ height: var(--kui-ribbon-row);
221
+ padding: 0 6px;
222
+ border: 1px solid var(--kit-border);
223
+ border-radius: var(--kit-radius-control);
224
+ background: var(--kit-surface);
225
+ outline: none;
226
+ }
227
+
228
+ .kui-ribbon-field:focus {
229
+ border-color: var(--kit-primary);
230
+ }
231
+
232
+ /* A gallery of choices in the ribbon (styles, themes). */
233
+ .kui-gallery {
234
+ display: flex;
235
+ gap: 4px;
236
+ align-items: stretch;
237
+ height: 60px;
238
+ overflow: hidden;
239
+ }
240
+
241
+ .kui-gallery-item {
242
+ display: flex;
243
+ flex-direction: column;
244
+ justify-content: center;
245
+ min-width: 68px;
246
+ max-width: 92px;
247
+ padding: 4px 8px;
248
+ border: 1px solid var(--kit-border);
249
+ border-radius: var(--kit-radius-control);
250
+ background: var(--kit-surface);
251
+ cursor: pointer;
252
+ overflow: hidden;
253
+ white-space: nowrap;
254
+ text-overflow: ellipsis;
255
+ text-align: left;
256
+ }
257
+
258
+ .kui-gallery-item:hover {
259
+ border-color: var(--kit-primary);
260
+ }
261
+
262
+ .kui-gallery-item[aria-pressed='true'] {
263
+ border-color: var(--kit-primary);
264
+ box-shadow: 0 0 0 1px var(--kit-primary);
265
+ }
266
+
267
+ /* A bar under the ribbon (find and replace). */
268
+ .kui-bar {
269
+ display: flex;
270
+ align-items: center;
271
+ gap: 6px;
272
+ flex: none;
273
+ height: 38px;
274
+ padding: 0 12px;
275
+ border-bottom: 1px solid var(--kit-border);
276
+ background: var(--kit-surface);
277
+ }
278
+
279
+ .kui-param-grid {
280
+ display: grid;
281
+ grid-template-columns: auto 1fr;
282
+ gap: 8px 12px;
283
+ align-items: center;
284
+ }
285
+
286
+ /* Menus, the options bar, the tool rail. */
287
+
288
+ /* The bar takes the top bar's free width; more menus than it holds scroll (OverflowStrip). */
289
+ .kui-menu-nav {
290
+ display: flex;
291
+ flex: 1;
292
+ min-width: 0;
293
+ align-self: stretch;
294
+ }
295
+
296
+ .kui-menu-strip {
297
+ --kui-strip-fade: var(--kit-surface-muted);
298
+ display: flex;
299
+ flex: 1;
300
+ }
301
+
302
+ .kui-menu-strip .kui-ribbon-scroll {
303
+ height: 28px;
304
+ margin-top: -14px;
305
+ }
306
+
307
+ .kui-menu-bar {
308
+ display: flex;
309
+ align-items: center;
310
+ gap: 1px;
311
+ flex: 1;
312
+ min-width: 0;
313
+ overflow-x: auto;
314
+ scrollbar-width: none;
315
+ }
316
+
317
+ .kui-menu-bar::-webkit-scrollbar {
318
+ display: none;
319
+ }
320
+
321
+ .kui-menu-bar-item {
322
+ flex: none;
323
+ height: 28px;
324
+ padding: 0 9px;
325
+ border: 0;
326
+ border-radius: var(--kit-radius-control);
327
+ background: transparent;
328
+ color: var(--kit-text);
329
+ cursor: pointer;
330
+ white-space: nowrap;
331
+ }
332
+
333
+ .kui-menu-bar-item:hover,
334
+ .kui-menu-bar-item[aria-expanded='true'] {
335
+ background: var(--kit-primary-soft);
336
+ }
337
+
338
+ .kui-submenu-popover {
339
+ z-index: 51;
340
+ }
341
+
342
+ .kui-options-strip {
343
+ flex: none;
344
+ border-bottom: 1px solid var(--kit-border);
345
+ background: var(--kit-surface);
346
+ }
347
+
348
+ .kui-options-bar {
349
+ display: flex;
350
+ align-items: center;
351
+ gap: 8px;
352
+ height: 40px;
353
+ padding: 0 12px;
354
+ overflow-x: auto;
355
+ overflow-y: hidden;
356
+ scrollbar-width: none;
357
+ white-space: nowrap;
358
+ }
359
+
360
+ /* Fields keep their width and scroll with the bar, rather than squeezing (no specificity: a kit's own rule wins). */
361
+ :where(.kui-options-bar > *) {
362
+ flex: none;
363
+ }
364
+
365
+ .kui-options-strip .kui-ribbon-scroll {
366
+ height: 28px;
367
+ margin-top: -14px;
368
+ }
369
+
370
+ /* WebKit (the desktop app's WKWebView) ignores scrollbar-width. */
371
+ .kui-options-bar::-webkit-scrollbar {
372
+ display: none;
373
+ }
374
+
375
+ /* Tool icons show their duotone accents in the rail and its flyouts (Tessera docs/icon-style.md). */
376
+ .kui-tool-rail,
377
+ .kui-tool-flyout {
378
+ --tessera-icon-accent-opacity: 0.25;
379
+ }
380
+
381
+ .kui-tool-rail {
382
+ display: flex;
383
+ flex-direction: column;
384
+ align-items: center;
385
+ gap: 2px;
386
+ flex: none;
387
+ width: 44px;
388
+ padding: 8px 0;
389
+ border-right: 1px solid var(--kit-border);
390
+ background: var(--kit-surface-muted);
391
+ overflow-y: auto;
392
+ scrollbar-width: none;
393
+ }
394
+
395
+ .kui-tool-rail[data-columns='2'] {
396
+ width: 78px;
397
+ }
398
+
399
+ /* The rail's one or two columns toggle (Photoshop's chevrons at the toolbar's head). */
400
+ .kui-tool-rail-columns {
401
+ display: inline-flex;
402
+ align-items: center;
403
+ justify-content: center;
404
+ flex: none;
405
+ width: 28px;
406
+ height: 14px;
407
+ margin-bottom: 4px;
408
+ padding: 0;
409
+ border: 0;
410
+ border-radius: var(--kit-radius-control);
411
+ background: transparent;
412
+ color: var(--kit-text-muted);
413
+ cursor: pointer;
414
+ }
415
+
416
+ .kui-tool-rail-columns:hover {
417
+ background: var(--kit-primary-soft);
418
+ color: var(--kit-text);
419
+ }
420
+
421
+ .kui-tool-rail[data-columns='2'] .kui-tool-rail-columns {
422
+ align-self: flex-start;
423
+ margin-left: 9px;
424
+ }
425
+
426
+ /* A hairline between sections of the rail (Photoshop's tool groups). */
427
+ .kui-tool-rail-divider {
428
+ width: 28px;
429
+ height: 1px;
430
+ margin: 4px 0;
431
+ background: var(--kit-border);
432
+ }
433
+
434
+ /* A two-column rail's row: at most two slots, never spanning two sections. */
435
+ .kui-tool-rail-row {
436
+ display: flex;
437
+ justify-content: center;
438
+ gap: 2px;
439
+ }
440
+
441
+ .kui-tool-slot {
442
+ position: relative;
443
+ display: inline-flex;
444
+ }
445
+
446
+ /* A slot with more tools in its flyout: a small mark in its corner. */
447
+ .kui-tool-slot[data-grouped='true']::after {
448
+ content: '';
449
+ position: absolute;
450
+ right: 2px;
451
+ bottom: 2px;
452
+ border-left: 4px solid transparent;
453
+ border-bottom: 4px solid var(--kit-text-muted);
454
+ pointer-events: none;
455
+ }
456
+
457
+ .kui-tool-flyout {
458
+ min-width: 200px;
459
+ }
460
+
461
+ /* The editor frame (EditorFrame): the top bar in every mode but Focus, the command area of the
462
+ display mode (Single line's row, Classic's ribbon), the body with its rail and panels. */
463
+
464
+ .kui-frame-top {
465
+ display: flex;
466
+ align-items: center;
467
+ flex: none;
468
+ height: var(--kui-bar-height);
469
+ padding: 0 8px;
470
+ background: var(--kit-surface-muted);
471
+ }
472
+
473
+ /*
474
+ * The tab strip takes the bar's free width. A tab shows whole or not at all: those it cannot hold
475
+ * move under the More tabs button at its end (U8), so no label is cut.
476
+ */
477
+ .kui-frame-tabs {
478
+ display: flex;
479
+ align-items: flex-end;
480
+ flex: 1;
481
+ align-self: stretch;
482
+ min-width: 0;
483
+ overflow: hidden;
484
+ }
485
+
486
+ .kui-frame-tabs .kui-ribbon-tabs {
487
+ overflow: hidden;
488
+ }
489
+
490
+ .kui-frame-tabs-more {
491
+ display: inline-flex;
492
+ flex: none;
493
+ align-items: center;
494
+ justify-content: center;
495
+ width: 32px;
496
+ height: 28px;
497
+ margin: 0 0 1px 2px;
498
+ padding: 0;
499
+ border: 0;
500
+ border-radius: var(--kit-radius-control);
501
+ background: transparent;
502
+ color: var(--kit-text-muted);
503
+ cursor: pointer;
504
+ }
505
+
506
+ .kui-frame-tabs-more:hover,
507
+ .kui-frame-tabs-more[aria-expanded='true'] {
508
+ background: var(--kit-surface);
509
+ color: var(--kit-text);
510
+ }
511
+
512
+ /* Menus has no command area under the bar: the bar draws the edge itself. */
513
+ .kui-app[data-mode='menus'] .kui-frame-top {
514
+ border-bottom: 1px solid var(--kit-border);
515
+ }
516
+
517
+ .kui-frame-title {
518
+ flex: none;
519
+ max-width: 240px;
520
+ margin-right: 12px;
521
+ overflow: hidden;
522
+ font-weight: 600;
523
+ text-overflow: ellipsis;
524
+ white-space: nowrap;
525
+ }
526
+
527
+ .kui-frame-body {
528
+ display: flex;
529
+ flex: 1;
530
+ min-height: 0;
531
+ }
532
+
533
+ .kui-frame-main {
534
+ display: flex;
535
+ flex-direction: column;
536
+ flex: 1;
537
+ min-width: 0;
538
+ min-height: 0;
539
+ }
540
+
541
+ /* Single line: one 36 px row of the selected tab's groups. */
542
+ .kui-line {
543
+ flex: none;
544
+ border-bottom: 1px solid var(--kit-border);
545
+ background: var(--kit-surface);
546
+ }
547
+
548
+ .kui-line-panel {
549
+ display: flex;
550
+ align-items: center;
551
+ gap: 2px;
552
+ height: 36px;
553
+ padding: 0 8px;
554
+ overflow-x: auto;
555
+ overflow-y: hidden;
556
+ scrollbar-width: none;
557
+ }
558
+
559
+ /* WebKit (the desktop app's WKWebView) ignores scrollbar-width. */
560
+ .kui-line-panel::-webkit-scrollbar {
561
+ display: none;
562
+ }
563
+
564
+ /* The ribbon inside scrolls itself (with scroll buttons), so the panel does not. */
565
+ .kui-drop-ribbon {
566
+ overflow-x: hidden;
567
+ }
568
+
569
+ .kui-drop-ribbon .kui-ribbon-panel {
570
+ padding: 0;
571
+ }
572
+
573
+ /* The mode button shows a dot while the frame shows a smaller mode than the one chosen. */
574
+ .kui-mode-button {
575
+ position: relative;
576
+ }
577
+
578
+ .kui-mode-button[data-stepped]::after {
579
+ content: '';
580
+ position: absolute;
581
+ top: 4px;
582
+ right: 4px;
583
+ width: 6px;
584
+ height: 6px;
585
+ border-radius: 50%;
586
+ background: var(--kit-primary);
587
+ }
588
+
589
+ /* Focus: one small card floating over the top of the body. */
590
+ /*
591
+ * Focus's bar floats at the bottom center, where it covers the least of the content (Focus hides
592
+ * the status bar, so nothing is under it), faint until the pointer or the keyboard is on it.
593
+ */
594
+ .kui-focus-bar {
595
+ position: absolute;
596
+ bottom: 12px;
597
+ left: 50%;
598
+ z-index: 40;
599
+ display: flex;
600
+ align-items: center;
601
+ gap: 2px;
602
+ padding: 4px 6px;
603
+ border: 1px solid var(--kit-border);
604
+ border-radius: var(--kit-radius-card);
605
+ background: var(--kit-surface);
606
+ box-shadow: var(--kit-shadow-card);
607
+ opacity: 0.45;
608
+ transform: translateX(-50%);
609
+ transition: opacity 120ms ease;
610
+ }
611
+
612
+ .kui-focus-bar:is(:hover, :focus-within) {
613
+ opacity: 1;
614
+ }
615
+
616
+ .kui-focus-bar[data-fresh] {
617
+ opacity: 1;
618
+ }
619
+
620
+ .kui-focus-exit kbd {
621
+ margin-left: 2px;
622
+ font-family: inherit;
623
+ font-size: 11px;
624
+ color: var(--kit-text-muted);
625
+ }
626
+
627
+ .kui-focus-tool {
628
+ display: inline-flex;
629
+ align-items: center;
630
+ gap: 6px;
631
+ margin-left: 2px;
632
+ padding: 0 8px 0 8px;
633
+ border-left: 1px solid var(--kit-border);
634
+ color: var(--kit-text-muted);
635
+ white-space: nowrap;
636
+ }
637
+
638
+ /* Touch (a coarse pointer): 44 px targets, a 48 px command row and bar, 40 px menu rows. */
639
+ .kui-app[data-density='touch'] {
640
+ --kui-bar-height: 48px;
641
+ }
642
+
643
+ .kui-app[data-density='touch'] :is(.kui-icon-button, .kui-line-more) {
644
+ min-width: 44px;
645
+ height: 44px;
646
+ }
647
+
648
+ .kui-app[data-density='touch'] :is(.kui-ribbon-tab, .kui-menu-bar-item, .kui-button) {
649
+ height: 44px;
650
+ }
651
+
652
+ .kui-app[data-density='touch'] .kui-line-panel {
653
+ height: 48px;
654
+ }
655
+
656
+ .kui-app[data-density='touch'] .kui-line-panel .kui-ribbon-button {
657
+ height: 44px;
658
+ }
659
+
660
+ .kui-app[data-density='touch'] .kui-menu-item {
661
+ height: 40px;
662
+ }
663
+
664
+ .kui-app[data-density='touch'] .kui-tool-rail {
665
+ width: 56px;
666
+ }
667
+
668
+ .kui-app[data-density='touch'] .kui-tool-rail[data-columns='2'] {
669
+ width: 100px;
670
+ }
671
+
672
+ /* Side panel sections */
673
+
674
+ .kui-panel-section {
675
+ border-bottom: 1px solid var(--kit-border);
676
+ }
677
+
678
+ .kui-panel-section-header {
679
+ display: flex;
680
+ align-items: center;
681
+ gap: 4px;
682
+ height: 32px;
683
+ padding: 0 8px 0 6px;
684
+ }
685
+
686
+ .kui-panel-section-toggle {
687
+ display: flex;
688
+ align-items: center;
689
+ gap: 4px;
690
+ flex: 1;
691
+ height: 28px;
692
+ padding: 0 4px;
693
+ border: 0;
694
+ background: transparent;
695
+ color: var(--kit-text-muted);
696
+ font-size: 12px;
697
+ font-weight: 600;
698
+ text-align: left;
699
+ cursor: pointer;
700
+ }
701
+
702
+ .kui-panel-section-chevron {
703
+ transition: transform 120ms ease;
704
+ }
705
+
706
+ .kui-panel-section[data-open='true'] .kui-panel-section-chevron {
707
+ transform: rotate(90deg);
708
+ }
709
+
710
+ .kui-panel-section-body {
711
+ padding: 0 0 8px;
712
+ }
713
+
714
+ .kui-file-changed {
715
+ flex: 0 0 auto;
716
+ display: flex;
717
+ align-items: center;
718
+ gap: 8px;
719
+ margin: 8px 12px 0;
720
+ padding: 6px 10px;
721
+ border: 1px solid var(--kit-border, #e5e3df);
722
+ border-radius: var(--kit-radius-card, 12px);
723
+ background: var(--kit-surface-muted, #fafaf9);
724
+ color: var(--kit-text, #1a1a1a);
725
+ font-size: 13px;
726
+ }
727
+
728
+ .kui-file-changed > span {
729
+ flex: 1 1 auto;
730
+ }
731
+
732
+ .kui-agent-edited {
733
+ display: inline-flex;
734
+ align-items: center;
735
+ gap: 4px;
736
+ color: var(--kit-primary);
737
+ }
738
+
739
+ /* The host's own change (a sync feature writing into the document): said plainly, not as the agent. */
740
+ .kui-host-edited {
741
+ display: inline-flex;
742
+ align-items: center;
743
+ color: var(--kit-text-muted, inherit);
744
+ }
745
+
746
+ /* A read-only document's mark where Undo, Redo, and Save would be. */
747
+ .kui-view-only {
748
+ display: inline-flex;
749
+ align-items: center;
750
+ padding: 0 8px;
751
+ font-size: 12px;
752
+ color: var(--kit-text-muted, inherit);
753
+ }
754
+
755
+ .kui-customize-search {
756
+ width: 100%;
757
+ margin-bottom: 8px;
758
+ }
759
+
760
+ .kui-customize-tree,
761
+ .kui-customize-tree ul {
762
+ list-style: none;
763
+ margin: 0;
764
+ padding: 0 0 0 16px;
765
+ }
766
+
767
+ .kui-customize-tree {
768
+ max-height: 50vh;
769
+ overflow: auto;
770
+ padding-left: 0;
771
+ }
772
+
773
+ .kui-customize-row {
774
+ display: flex;
775
+ align-items: center;
776
+ gap: 8px;
777
+ min-height: 26px;
778
+ }
779
+
780
+ .kui-hide-menu-backdrop {
781
+ background: transparent;
782
+ }
783
+
784
+ /* A chart's data grid (Chart Design › Edit Data). */
785
+ .kui-chart-data {
786
+ border-collapse: collapse;
787
+ }
788
+ .kui-chart-data th,
789
+ .kui-chart-data td {
790
+ border: 1px solid var(--kit-border);
791
+ padding: 0;
792
+ }
793
+ .kui-chart-data input {
794
+ width: 96px;
795
+ border: 0;
796
+ padding: 4px 6px;
797
+ font: inherit;
798
+ background: transparent;
799
+ }
800
+ .kui-chart-data thead input,
801
+ .kui-chart-data tbody th input {
802
+ font-weight: 600;
803
+ }
804
+ .kui-chart-data input[aria-invalid='true'] {
805
+ outline: 1px solid var(--kit-danger);
806
+ outline-offset: -1px;
807
+ }