@lapismd/design-core 0.1.0 → 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 (124) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/LICENSE.md +3 -3
  3. package/README.md +21 -1
  4. package/package.json +34 -15
  5. package/spec/src/styling-and-themes.md +11 -9
  6. package/src/shared/ai/chat.css +25 -1
  7. package/src/shared/ai/chat.ts +12 -0
  8. package/src/shared/ai/composer-input/ComposerInput.svelte +3 -2
  9. package/src/shared/ai/context.svelte.ts +2 -0
  10. package/src/shared/ai/experimental/reaction-bar/ReactionBar.svelte +1 -1
  11. package/src/shared/ai/layout/Layout.svelte +116 -10
  12. package/src/shared/ai/message-list/MessageList.svelte +123 -43
  13. package/src/shared/ai/message-list/MessageListHistoryFixture.svelte +112 -0
  14. package/src/shared/ai/message-list/MessageListLegacyFixture.svelte +52 -0
  15. package/src/shared/ai/message-list/VirtualizedMessageRows.svelte +299 -0
  16. package/src/shared/ai/message-list/position.ts +7 -0
  17. package/src/shared/ai/new-messages.svelte.ts +24 -5
  18. package/src/shared/ai/stream-scroll.svelte.ts +135 -6
  19. package/src/shared/ai/tool-call-detail/ToolCallDetail.svelte +71 -0
  20. package/src/shared/ai/tool-call-detail/tool-call-detail.ts +209 -0
  21. package/src/shared/ai/tool-calls/ToolCalls.svelte +1 -1
  22. package/src/shared/ai/trigger-menu.ts +2 -3
  23. package/src/shared/diff/core/merge/actions.ts +4 -3
  24. package/src/shared/diff/core/merge/render-model.ts +14 -10
  25. package/src/shared/diff/file-diff/FileDiff.css +68 -1
  26. package/src/shared/diff/file-diff/FileDiff.svelte +27 -14
  27. package/src/shared/diff/file-diff/FileDiffComposer.svelte +98 -16
  28. package/src/shared/diff/file-diff/index.ts +2 -0
  29. package/src/shared/diff/file-diff/types.ts +13 -0
  30. package/src/shared/diff/file-listing/FileListingViewModeToggle.css +42 -5
  31. package/src/shared/diff/index.ts +2 -0
  32. package/src/shared/diff/merge-editor/MergeEditor.svelte +2 -7
  33. package/src/shared/filter/filter-query/filters.ts +2 -2
  34. package/src/shared/filter/filter-query/parser.ts +9 -8
  35. package/src/shared/filter/power-search/PowerSearch.svelte +1 -1
  36. package/src/shared/filter/search-filter-bar/SearchFilterBar.svelte +2 -2
  37. package/src/shared/filter/search-filter-bar/SearchFilterInput.svelte +1 -1
  38. package/src/shared/filter/search-filter-bar/SearchFilterPredicateEditor.svelte +1 -1
  39. package/src/shared/filter/search-filter-bar/search-filter-syntax.ts +1 -1
  40. package/src/shared/forms/autocomplete-input/AutocompleteInput.svelte +19 -7
  41. package/src/shared/forms/confirm-button/ConfirmButton.svelte +38 -0
  42. package/src/shared/forms/confirm-button/ConfirmButtonExample.svelte +14 -0
  43. package/src/shared/forms/confirm-button/index.ts +1 -0
  44. package/src/shared/forms/confirm-dialog/ConfirmDialog.css +21 -0
  45. package/src/shared/forms/confirm-dialog/ConfirmDialog.svelte +116 -0
  46. package/src/shared/forms/confirm-dialog/ConfirmDialogExample.svelte +17 -0
  47. package/src/shared/forms/confirm-dialog/index.ts +2 -0
  48. package/src/shared/forms/dialog-frame/DialogFrame.css +130 -0
  49. package/src/shared/forms/dialog-frame/DialogFrame.svelte +108 -0
  50. package/src/shared/forms/dialog-frame/DialogFrameExample.svelte +37 -0
  51. package/src/shared/forms/dialog-frame/index.ts +6 -0
  52. package/src/shared/forms/dialog.ts +8 -0
  53. package/src/shared/forms/index.ts +11 -0
  54. package/src/shared/shadcn/button/button.svelte +4 -0
  55. package/src/shared/shadcn/code-block/highlightRanges.ts +10 -6
  56. package/src/shared/shadcn/code-block/syntax/defineSyntaxTheme.ts +4 -2
  57. package/src/shared/shadcn/code-block/tokenizer.ts +3 -3
  58. package/src/shared/shadcn/command/command-dialog.svelte +1 -1
  59. package/src/shared/shadcn/command/command-group.svelte +3 -1
  60. package/src/shared/shadcn/command-view/command-view.svelte +1 -6
  61. package/src/shared/shadcn/dialog/dialog-content.svelte +3 -4
  62. package/src/shared/shadcn/dialog/dialog-portal.svelte +10 -2
  63. package/src/shared/shadcn/dropdown-menu/dropdown-menu-checkbox-item.svelte +0 -691
  64. package/src/shared/shadcn/dropdown-menu/dropdown-menu-content.svelte +691 -0
  65. package/src/shared/shadcn/dropdown-menu/dropdown-menu-radio-group.svelte +1 -1
  66. package/src/shared/shadcn/scroll-area/scroll-area.svelte +2 -0
  67. package/src/shared/shadcn/spinner/spinner.svelte +3 -3
  68. package/src/shared/shadcn/tooltip/tooltip-content.svelte +10 -4
  69. package/src/shared/shadcn/tooltip/tooltip.tokens.ts +4 -0
  70. package/src/shared/shell/app-shell/AppShell.css +112 -32
  71. package/src/shared/shell/app-shell/AppShell.demo.css +37 -0
  72. package/src/shared/shell/app-shell/AppShellBodyContent.svelte +5 -1
  73. package/src/shared/shell/app-shell/AppShellBodySidebar.svelte +5 -1
  74. package/src/shared/shell/app-shell/AppShellMain.svelte +12 -1
  75. package/src/shared/shell/app-shell/AppShellMobilePanelSelector.svelte +1 -1
  76. package/src/shared/shell/app-shell/AppShellRoot.svelte +27 -13
  77. package/src/shared/shell/app-shell/AppShellSidebar.svelte +121 -19
  78. package/src/shared/shell/app-shell/AppShellSidebarClose.svelte +17 -17
  79. package/src/shared/shell/app-shell/AppShellSidebarToggle.svelte +38 -58
  80. package/src/shared/shell/app-shell/AppShellSurfaceLayer.svelte +173 -0
  81. package/src/shared/shell/app-shell/AppShellSurfaceLayerBody.svelte +32 -0
  82. package/src/shared/shell/app-shell/AppShellSurfaceLayerHeader.svelte +26 -0
  83. package/src/shared/shell/app-shell/app-shell-context.svelte.ts +6 -3
  84. package/src/shared/shell/app-shell/app-shell-controller.svelte.ts +269 -11
  85. package/src/shared/shell/app-shell/app-shell-sidebar-context.svelte.ts +1 -0
  86. package/src/shared/shell/app-shell/examples/AppShellBodyDemo.svelte +4 -0
  87. package/src/shared/shell/app-shell/examples/AppShellCompleteDemo.svelte +1 -0
  88. package/src/shared/shell/app-shell/examples/AppShellConversationDemo.svelte +1 -0
  89. package/src/shared/shell/app-shell/examples/AppShellExamples.css +624 -0
  90. package/src/shared/shell/app-shell/examples/AppShellFilesSidebarDemo.svelte +1 -0
  91. package/src/shared/shell/app-shell/examples/AppShellMarkdownDocumentDemo.svelte +6 -1
  92. package/src/shared/shell/app-shell/examples/AppShellMarkdownFilesDemo.svelte +1 -0
  93. package/src/shared/shell/app-shell/examples/AppShellModeSwitchDemo.svelte +1 -0
  94. package/src/shared/shell/app-shell/examples/AppShellMultiPanelDemo.svelte +187 -0
  95. package/src/shared/shell/app-shell/examples/AppShellProjectSidebarDemo.svelte +1 -0
  96. package/src/shared/shell/app-shell/examples/AppShellSidebarDemo.svelte +1 -0
  97. package/src/shared/shell/app-shell/examples/AppShellToolbarDemo.svelte +1 -0
  98. package/src/shared/shell/app-shell/index.ts +14 -0
  99. package/src/shared/shell/shell.tokens.css +2 -0
  100. package/src/shared/shell/shell.tokens.ts +5 -0
  101. package/src/shared/workspace/menu/WorkspaceContextMenuItems.svelte +2 -1
  102. package/src/shared/workspace/menu/WorkspaceMenuItems.svelte +2 -1
  103. package/src/shared/workspace/problems/ProblemsQuickFix.svelte +1 -4
  104. package/src/shared/workspace/settings/AppSettingsContent.svelte +6 -0
  105. package/src/shared/workspace/settings/AppSettingsNavigation.svelte +7 -0
  106. package/src/shared/workspace/settings/CopyableValue.svelte +81 -0
  107. package/src/shared/workspace/settings/DeclarativeSettingsSection.svelte +20 -0
  108. package/src/shared/workspace/settings/WorkspaceSettingField.svelte +110 -41
  109. package/src/shared/workspace/settings/WorkspaceSettingMultiSelect.svelte +7 -6
  110. package/src/shared/workspace/settings/WorkspaceSettingObjectTable.svelte +187 -23
  111. package/src/shared/workspace/settings/WorkspaceSettingSelect.svelte +29 -29
  112. package/src/shared/workspace/settings/WorkspaceSettings.css +190 -4
  113. package/src/shared/workspace/settings/WorkspaceSettingsStoryCustomField.svelte +2 -2
  114. package/src/shared/workspace/settings/WorkspaceSettingsStoryCustomPage.svelte +13 -0
  115. package/src/shared/workspace/settings/WorkspaceSettingsSurface.svelte +50 -0
  116. package/src/shared/workspace/settings/configuration.ts +5 -0
  117. package/src/shared/workspace/settings/copyable-value.ts +10 -0
  118. package/src/shared/workspace/settings/index.ts +5 -0
  119. package/src/shared/workspace/settings/settings-controller.svelte.ts +349 -15
  120. package/src/shared/workspace/settings/types.ts +90 -8
  121. package/src/storybook/app-shell-reference/AppShellTwoExpandedSidebarsReference.css +25 -0
  122. package/src/storybook/app-shell-reference/AppShellTwoExpandedSidebarsReference.svelte +48 -0
  123. package/src/storybook/app-shell-reference/index.ts +1 -0
  124. package/src/theme.css +10 -0
@@ -0,0 +1,624 @@
1
+ .ui-shell-story-complete {
2
+ --ui-shell-body-sidebar-width: 10rem;
3
+ }
4
+
5
+ .ui-shell-story-multi-panel {
6
+ width: min(100%, 80rem);
7
+ margin-inline: auto;
8
+ }
9
+
10
+ .ui-shell-story-multi-panel-wide {
11
+ width: min(100%, 94rem);
12
+ }
13
+
14
+ .ui-shell-story-multi-panel-dark {
15
+ color-scheme: dark;
16
+ }
17
+
18
+ .ui-shell-story-multi-panel__toolbar {
19
+ gap: 0.5rem;
20
+ padding-inline: 0.5rem;
21
+ }
22
+
23
+ .ui-shell-story-multi-panel__toolbar > span {
24
+ flex: 1;
25
+ }
26
+
27
+ .ui-shell-story-multi-panel__nav,
28
+ .ui-shell-story-multi-panel__rail {
29
+ display: grid;
30
+ gap: 0.25rem;
31
+ padding: 0.5rem;
32
+ }
33
+
34
+ .ui-shell-story-multi-panel__nav button,
35
+ .ui-shell-story-multi-panel__rail button {
36
+ display: flex;
37
+ min-height: 2.25rem;
38
+ align-items: center;
39
+ justify-content: space-between;
40
+ gap: 0.75rem;
41
+ padding: 0.375rem 0.625rem;
42
+ border: 0;
43
+ border-radius: calc(var(--radius) * 0.75);
44
+ color: var(--foreground);
45
+ background: transparent;
46
+ font: inherit;
47
+ text-align: start;
48
+ }
49
+
50
+ .ui-shell-story-multi-panel__nav button:is(:hover, :focus-visible),
51
+ .ui-shell-story-multi-panel__nav button[data-active],
52
+ .ui-shell-story-multi-panel__rail button:is(:hover, :focus-visible) {
53
+ background: var(--accent);
54
+ }
55
+
56
+ .ui-shell-story-multi-panel__rail small {
57
+ color: var(--muted-foreground);
58
+ }
59
+
60
+ .ui-shell-story-multi-panel__content {
61
+ width: min(100%, 42rem);
62
+ margin-inline: auto;
63
+ padding: clamp(2rem, 8cqw, 6rem) 1.5rem;
64
+ }
65
+
66
+ .ui-shell-story-multi-panel__content > p:first-child,
67
+ .ui-shell-story-multi-panel__panel-copy p {
68
+ color: var(--muted-foreground);
69
+ font-size: 0.75rem;
70
+ font-weight: 600;
71
+ letter-spacing: 0.06em;
72
+ text-transform: uppercase;
73
+ }
74
+
75
+ .ui-shell-story-multi-panel__content h1 {
76
+ margin-block: 0.5rem 1rem;
77
+ font-size: clamp(1.5rem, 4cqw, 3rem);
78
+ line-height: 1;
79
+ }
80
+
81
+ .ui-shell-story-multi-panel__panel-copy,
82
+ .ui-shell-story-multi-panel__reviews {
83
+ display: grid;
84
+ gap: 0.75rem;
85
+ padding: 1rem;
86
+ }
87
+
88
+ .ui-shell-story-multi-panel__panel-copy strong {
89
+ margin-block-end: 0.75rem;
90
+ }
91
+
92
+ .ui-shell-story-multi-panel__reviews article {
93
+ display: flex;
94
+ align-items: center;
95
+ justify-content: space-between;
96
+ gap: 1rem;
97
+ padding: 1rem;
98
+ border: 1px solid var(--border);
99
+ border-radius: var(--radius);
100
+ background: var(--card);
101
+ }
102
+
103
+ .ui-shell-story-multi-panel__reviews span {
104
+ color: var(--muted-foreground);
105
+ font-size: 0.75rem;
106
+ }
107
+
108
+ .ui-shell-story-mode-demo {
109
+ position: relative;
110
+ height: 100%;
111
+ }
112
+
113
+ .ui-shell-story-mode-controls {
114
+ position: absolute;
115
+ z-index: 50;
116
+ inset-block-end: 1rem;
117
+ inset-inline-start: 50%;
118
+ display: flex;
119
+ gap: 0.25rem;
120
+ padding: 0.25rem;
121
+ border: 1px solid var(--border);
122
+ border-radius: var(--radius);
123
+ background: var(--background);
124
+ box-shadow: var(--ui-shell-main-shadow);
125
+ transform: translateX(-50%);
126
+ }
127
+
128
+ .ui-shell-story-mode-controls button {
129
+ text-transform: capitalize;
130
+ }
131
+
132
+ .ui-shell-story-sidebar-heading {
133
+ display: flex;
134
+ min-height: 2rem;
135
+ align-items: center;
136
+ gap: 0.75rem;
137
+ padding: 1rem 1rem 0.5rem;
138
+ white-space: nowrap;
139
+ }
140
+
141
+ .ui-shell-story-sidebar-heading svg {
142
+ width: 1rem;
143
+ height: 1rem;
144
+ flex: none;
145
+ }
146
+
147
+ .ui-minimal-app-shell__sidebar[data-state="collapsed"]
148
+ .ui-shell-story-sidebar-heading {
149
+ padding-block-start: 1.25rem;
150
+ }
151
+
152
+ .ui-shell-story-sidebar-body {
153
+ padding: 0 0.5rem;
154
+ }
155
+
156
+ .ui-shell-story-sidebar-body nav {
157
+ display: flex;
158
+ flex-direction: column;
159
+ gap: 0.25rem;
160
+ padding-block-end: 0.5rem;
161
+ }
162
+
163
+ .ui-shell-story-nav-label {
164
+ padding: 0.75rem 0.75rem 0.25rem;
165
+ color: var(--muted-foreground);
166
+ font-size: 0.6875rem;
167
+ font-weight: 600;
168
+ letter-spacing: 0.08em;
169
+ text-transform: uppercase;
170
+ }
171
+
172
+ .ui-shell-story-sidebar-footer {
173
+ min-height: 3rem;
174
+ padding: 0.75rem 1rem;
175
+ color: var(--muted-foreground);
176
+ font-size: 0.75rem;
177
+ font-weight: 600;
178
+ }
179
+
180
+ .ui-shell-story-project-header {
181
+ display: flex;
182
+ min-width: 0;
183
+ flex-wrap: wrap;
184
+ align-items: center;
185
+ gap: 0.5rem;
186
+ padding: 0.625rem 0.75rem 0.75rem;
187
+ }
188
+
189
+ .ui-shell-story-project-app {
190
+ display: flex;
191
+ min-width: 0;
192
+ flex: 1;
193
+ align-items: center;
194
+ gap: 0.625rem;
195
+ }
196
+
197
+ .ui-shell-story-project-app > svg {
198
+ width: 1.25rem;
199
+ height: 1.25rem;
200
+ flex: none;
201
+ }
202
+
203
+ .ui-shell-story-project-app > div {
204
+ display: flex;
205
+ min-width: 0;
206
+ flex-direction: column;
207
+ }
208
+
209
+ .ui-shell-story-project-app strong,
210
+ .ui-shell-story-project-app span {
211
+ overflow: hidden;
212
+ text-overflow: ellipsis;
213
+ white-space: nowrap;
214
+ }
215
+
216
+ .ui-shell-story-project-app span,
217
+ .ui-shell-story-project-selector > span,
218
+ .ui-shell-story-project-footer,
219
+ .ui-shell-story-files-footer {
220
+ color: var(--muted-foreground);
221
+ font-size: 0.75rem;
222
+ }
223
+
224
+ .ui-shell-story-project-selector {
225
+ display: grid;
226
+ width: 100%;
227
+ gap: 0.25rem;
228
+ }
229
+
230
+ .ui-shell-story-project-selector
231
+ > [data-ui-component="select"][data-ui-part="select-trigger"] {
232
+ width: 100%;
233
+ min-width: 0;
234
+ background: var(--background);
235
+ }
236
+
237
+ .ui-minimal-app-shell__sidebar[data-state="collapsed"][data-presentation="inline"]
238
+ .ui-shell-story-project-header {
239
+ justify-content: center;
240
+ padding: 0.5rem;
241
+ }
242
+
243
+ .ui-minimal-app-shell__sidebar[data-state="collapsed"][data-presentation="inline"]
244
+ .ui-shell-story-project-footer {
245
+ border-block-start: 0;
246
+ }
247
+
248
+ .ui-shell-story-project-body,
249
+ .ui-shell-story-files-body {
250
+ padding: 0.5rem;
251
+ }
252
+
253
+ .ui-shell-story-project-body nav,
254
+ .ui-shell-story-files-body nav {
255
+ display: flex;
256
+ flex-direction: column;
257
+ gap: 0.25rem;
258
+ }
259
+
260
+ .ui-shell-story-project-item,
261
+ .ui-shell-story-files-body button {
262
+ display: flex;
263
+ width: 100%;
264
+ min-width: 0;
265
+ min-height: 2.25rem;
266
+ align-items: center;
267
+ gap: 0.625rem;
268
+ border: 0;
269
+ border-radius: calc(var(--radius) * 0.75);
270
+ padding: 0.375rem 0.5rem;
271
+ color: var(--foreground);
272
+ background: transparent;
273
+ font: inherit;
274
+ text-align: start;
275
+ }
276
+
277
+ .ui-shell-story-project-item:hover,
278
+ .ui-shell-story-project-item:focus-visible,
279
+ .ui-shell-story-project-item[data-active],
280
+ .ui-shell-story-files-body button:hover,
281
+ .ui-shell-story-files-body button:focus-visible {
282
+ background: var(--accent);
283
+ }
284
+
285
+ .ui-shell-story-project-item:focus-visible,
286
+ .ui-shell-story-files-body button:focus-visible {
287
+ outline: 2px solid var(--ring);
288
+ outline-offset: 1px;
289
+ }
290
+
291
+ .ui-shell-story-project-item svg,
292
+ .ui-shell-story-files-body button svg {
293
+ width: 1rem;
294
+ height: 1rem;
295
+ flex: none;
296
+ }
297
+
298
+ .ui-minimal-app-shell__sidebar[data-state="collapsed"][data-presentation="inline"]
299
+ .ui-shell-story-project-item,
300
+ .ui-minimal-app-shell__sidebar[data-state="collapsed"]
301
+ .ui-shell-story-files-body
302
+ button {
303
+ justify-content: center;
304
+ padding-inline: 0;
305
+ }
306
+
307
+ .ui-shell-story-project-footer,
308
+ .ui-shell-story-files-footer {
309
+ min-height: 2.75rem;
310
+ padding: 0.75rem;
311
+ border-block-start: 1px solid var(--border);
312
+ }
313
+
314
+ .ui-shell-story-files-header {
315
+ display: flex;
316
+ min-height: var(--ui-shell-toolbar-height);
317
+ align-items: center;
318
+ gap: 0.625rem;
319
+ padding-inline: 0.5rem;
320
+ border-block-end: 1px solid var(--border);
321
+ white-space: nowrap;
322
+ }
323
+
324
+ .ui-shell-story-files-header > svg {
325
+ width: 1rem;
326
+ height: 1rem;
327
+ flex: none;
328
+ }
329
+
330
+ .ui-shell-story-files-header > * {
331
+ transform: translateY(0.25rem);
332
+ }
333
+
334
+ .ui-shell-story-ai-header {
335
+ display: flex;
336
+ min-height: var(--ui-shell-toolbar-height);
337
+ align-items: center;
338
+ gap: 0.75rem;
339
+ padding-inline: 1rem;
340
+ border-block-end: 1px solid var(--border);
341
+ white-space: nowrap;
342
+ }
343
+
344
+ .ui-shell-story-ai-header svg {
345
+ width: 1rem;
346
+ height: 1rem;
347
+ flex: none;
348
+ }
349
+
350
+ .ui-shell-story-ai-header > svg,
351
+ .ui-shell-story-ai-header > strong,
352
+ .ui-shell-story-ai-header > [data-ui-part="sidebar-close"] {
353
+ transform: translateY(0.25rem);
354
+ }
355
+
356
+ .ui-minimal-app-shell__sidebar[data-side="right"][data-state="collapsed"]
357
+ .ui-shell-story-ai-header {
358
+ min-height: 0;
359
+ padding: 0.5rem 0.5rem 0;
360
+ border-block-end: 0;
361
+ }
362
+
363
+ .ui-shell-story-ai-body
364
+ > [data-ui-component="scroll-area"]
365
+ > [data-ui-part="scroll-area-viewport"]
366
+ > div {
367
+ height: 100%;
368
+ }
369
+
370
+ .ui-shell-story-ai-body
371
+ > [data-ui-component="scroll-area"]
372
+ > [data-ui-part="scroll-area-viewport"]
373
+ > div
374
+ > [data-ui-component="button"] {
375
+ margin: 0.5rem;
376
+ }
377
+
378
+ .ui-minimal-app-shell__sidebar[data-side="right"][data-state="collapsed"]
379
+ .ui-shell-story-ai-body
380
+ > [data-ui-component="scroll-area"]
381
+ > [data-ui-part="scroll-area-viewport"]
382
+ > div
383
+ > [data-ui-component="button"] {
384
+ margin-block-start: 0.75rem;
385
+ }
386
+
387
+ .ui-shell-story-ai-body
388
+ [data-ui-component="ai-chat-layout"][data-density="compact"]
389
+ [data-ui-part="message-area"] {
390
+ padding-block-end: 7rem;
391
+ }
392
+
393
+ .ui-shell-story-ai-composer {
394
+ display: grid;
395
+ gap: 0;
396
+ }
397
+
398
+ .ui-shell-story-ai-composer > [data-ui-component="ai-chat-typing-indicator"] {
399
+ width: fit-content;
400
+ padding: 0.25rem 0.5rem;
401
+ border-radius: calc(var(--radius) * 0.75);
402
+ background: var(--background);
403
+ }
404
+
405
+ .ui-shell-story-nav-item {
406
+ width: 100%;
407
+ min-width: 0;
408
+ justify-content: flex-start;
409
+ overflow: hidden;
410
+ }
411
+
412
+ .ui-minimal-app-shell__sidebar[data-state="collapsed"]
413
+ .ui-shell-story-nav-item {
414
+ justify-content: center;
415
+ }
416
+
417
+ .ui-shell-story-toolbar-controls {
418
+ display: flex;
419
+ width: 100%;
420
+ min-width: 0;
421
+ align-items: center;
422
+ gap: 0.5rem;
423
+ padding-inline: 0.75rem;
424
+ }
425
+
426
+ .ui-shell-story-toolbar-title {
427
+ overflow: hidden;
428
+ text-overflow: ellipsis;
429
+ white-space: nowrap;
430
+ }
431
+
432
+ .ui-shell-story-toolbar-spacer {
433
+ flex: 1;
434
+ }
435
+
436
+ .ui-shell-story-document-toc {
437
+ display: flex;
438
+ min-width: 0;
439
+ flex-direction: column;
440
+ gap: 0.25rem;
441
+ padding: 3rem 0.75rem 1rem;
442
+ }
443
+
444
+ .ui-shell-story-document-toc > span {
445
+ padding: 0 0.5rem 0.5rem;
446
+ color: var(--muted-foreground);
447
+ font-size: 0.6875rem;
448
+ font-weight: 700;
449
+ letter-spacing: 0.08em;
450
+ text-transform: uppercase;
451
+ }
452
+
453
+ .ui-shell-story-document-toc a {
454
+ overflow: hidden;
455
+ border-radius: calc(var(--radius) * 0.75);
456
+ padding: 0.375rem 0.5rem;
457
+ color: var(--muted-foreground);
458
+ font-size: 0.8125rem;
459
+ text-decoration: none;
460
+ text-overflow: ellipsis;
461
+ white-space: nowrap;
462
+ }
463
+
464
+ .ui-shell-story-document-toc a:hover,
465
+ .ui-shell-story-document-toc a:focus-visible,
466
+ .ui-shell-story-document-toc a[aria-current] {
467
+ color: var(--foreground);
468
+ background: var(--accent);
469
+ }
470
+
471
+ .ui-shell-story-document-toc a:focus-visible {
472
+ outline: 2px solid var(--ring);
473
+ outline-offset: 1px;
474
+ }
475
+
476
+ .ui-shell-story-document {
477
+ max-width: 50rem;
478
+ padding: 2rem clamp(1.5rem, 5vw, 4rem) 4rem;
479
+ margin-inline: auto;
480
+ }
481
+
482
+ .ui-shell-story-document header {
483
+ margin-block-end: 2.5rem;
484
+ }
485
+
486
+ .ui-shell-story-document header > span {
487
+ color: var(--muted-foreground);
488
+ font-size: 0.6875rem;
489
+ font-weight: 700;
490
+ letter-spacing: 0.08em;
491
+ text-transform: uppercase;
492
+ }
493
+
494
+ .ui-shell-story-document h2 {
495
+ margin: 0.375rem 0 0.75rem;
496
+ font-size: 2rem;
497
+ }
498
+
499
+ .ui-shell-story-document h3 {
500
+ margin: 0 0 0.625rem;
501
+ font-size: 1.125rem;
502
+ }
503
+
504
+ .ui-shell-story-document p {
505
+ margin: 0 0 0.75rem;
506
+ color: var(--muted-foreground);
507
+ line-height: 1.65;
508
+ }
509
+
510
+ .ui-shell-story-document section {
511
+ scroll-margin-block-start: 1rem;
512
+ padding-block: 1.25rem;
513
+ border-block-start: 1px solid var(--border);
514
+ }
515
+
516
+ .ui-shell-story-document-empty {
517
+ display: grid;
518
+ height: 100%;
519
+ place-content: center;
520
+ justify-items: center;
521
+ gap: 0.5rem;
522
+ padding: 2rem;
523
+ color: var(--muted-foreground);
524
+ text-align: center;
525
+ }
526
+
527
+ .ui-shell-story-document-empty > svg {
528
+ width: 2rem;
529
+ height: 2rem;
530
+ }
531
+
532
+ .ui-shell-story-document-empty strong {
533
+ color: var(--foreground);
534
+ }
535
+
536
+ .ui-shell-story-body-demo {
537
+ container-type: inline-size;
538
+ display: flex;
539
+ flex-direction: column;
540
+ gap: 2rem;
541
+ min-height: 48rem;
542
+ padding: 2rem;
543
+ }
544
+
545
+ .ui-shell-story-body-demo header {
546
+ display: flex;
547
+ max-width: 42rem;
548
+ flex-direction: column;
549
+ gap: 0.5rem;
550
+ }
551
+
552
+ .ui-shell-story-body-demo header p,
553
+ .ui-shell-story-body-demo header h2,
554
+ .ui-shell-story-body-demo header span,
555
+ .ui-shell-story-card-grid p {
556
+ margin: 0;
557
+ }
558
+
559
+ .ui-shell-story-body-demo header p,
560
+ .ui-shell-story-card-grid span {
561
+ color: var(--muted-foreground);
562
+ font-size: 0.75rem;
563
+ font-weight: 600;
564
+ letter-spacing: 0.08em;
565
+ text-transform: uppercase;
566
+ }
567
+
568
+ .ui-shell-story-body-demo header h2 {
569
+ font-size: 1.75rem;
570
+ line-height: 1.2;
571
+ }
572
+
573
+ .ui-shell-story-body-demo header > span,
574
+ .ui-shell-story-card-grid p {
575
+ color: var(--muted-foreground);
576
+ }
577
+
578
+ .ui-shell-story-card-grid {
579
+ display: grid;
580
+ grid-template-columns: repeat(3, minmax(0, 1fr));
581
+ gap: 1rem;
582
+ }
583
+
584
+ .ui-shell-story-card-grid section {
585
+ display: flex;
586
+ min-width: 0;
587
+ flex-direction: column;
588
+ gap: 0.5rem;
589
+ padding: 1rem;
590
+ border: 1px solid var(--border);
591
+ border-radius: calc(var(--radius) * 0.8);
592
+ background: var(--card);
593
+ }
594
+
595
+ .ui-shell-story-card-grid strong {
596
+ font-size: 1.75rem;
597
+ }
598
+
599
+ @container (max-width: 34rem) {
600
+ .ui-shell-story-card-grid {
601
+ grid-template-columns: minmax(0, 1fr);
602
+ gap: 0.75rem;
603
+ }
604
+
605
+ .ui-shell-story-card-grid section {
606
+ display: grid;
607
+ grid-template-columns: minmax(0, 1fr) auto;
608
+ grid-template-rows: auto auto;
609
+ align-items: center;
610
+ column-gap: 1rem;
611
+ row-gap: 0.25rem;
612
+ padding-block: 0.75rem;
613
+ }
614
+
615
+ .ui-shell-story-card-grid section > span,
616
+ .ui-shell-story-card-grid section > p {
617
+ grid-column: 1;
618
+ }
619
+
620
+ .ui-shell-story-card-grid section > strong {
621
+ grid-column: 2;
622
+ grid-row: 1 / span 2;
623
+ }
624
+ }
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import "./AppShellExamples.css";
2
3
  import FileCode2Icon from "@lucide/svelte/icons/file-code-2";
3
4
  import FileTextIcon from "@lucide/svelte/icons/file-text";
4
5
  import FolderIcon from "@lucide/svelte/icons/folder";
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import "./AppShellExamples.css";
2
3
  import FileTextIcon from "@lucide/svelte/icons/file-text";
3
4
  import type { AppShellSide } from "../app-shell-controller.svelte.js";
4
5
  import { AppShell } from "../index.js";
@@ -69,11 +70,15 @@
69
70
  open={sidebarSide !== undefined}
70
71
  label="Table of contents"
71
72
  mobileLabel="Document contents"
73
+ scrollbarVisibility="hover"
72
74
  >
73
75
  {@render tableOfContents()}
74
76
  </AppShell.Body.Sidebar>
75
77
 
76
- <AppShell.Body.Content label={file ? `${file} content` : "Document content"}>
78
+ <AppShell.Body.Content
79
+ label={file ? `${file} content` : "Document content"}
80
+ scrollbarVisibility="hover"
81
+ >
77
82
  {#if file}
78
83
  <article class="ui-shell-story-document">
79
84
  <header>
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import "./AppShellExamples.css";
2
3
  import FileTextIcon from "@lucide/svelte/icons/file-text";
3
4
  import FolderOpenIcon from "@lucide/svelte/icons/folder-open";
4
5
  import type {
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import "./AppShellExamples.css";
2
3
  import { Button } from "../../../shadcn/button/index.js";
3
4
  import type {
4
5
  AppShellController,