@lapismd/design-core 0.1.0 → 0.1.2

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/CHANGELOG.md +22 -0
  2. package/README.md +1 -1
  3. package/package.json +12 -8
  4. package/spec/src/styling-and-themes.md +9 -9
  5. package/src/shared/ai/chat.css +2 -1
  6. package/src/shared/ai/composer-input/ComposerInput.svelte +3 -2
  7. package/src/shared/ai/experimental/reaction-bar/ReactionBar.svelte +1 -1
  8. package/src/shared/ai/tool-calls/ToolCalls.svelte +1 -1
  9. package/src/shared/ai/trigger-menu.ts +2 -3
  10. package/src/shared/diff/file-diff/FileDiff.svelte +5 -8
  11. package/src/shared/diff/file-listing/FileListingViewModeToggle.css +42 -5
  12. package/src/shared/diff/merge-editor/MergeEditor.svelte +2 -7
  13. package/src/shared/filter/filter-query/filters.ts +2 -2
  14. package/src/shared/filter/filter-query/parser.ts +9 -8
  15. package/src/shared/filter/power-search/PowerSearch.svelte +1 -1
  16. package/src/shared/filter/search-filter-bar/SearchFilterBar.svelte +2 -2
  17. package/src/shared/filter/search-filter-bar/SearchFilterInput.svelte +1 -1
  18. package/src/shared/filter/search-filter-bar/SearchFilterPredicateEditor.svelte +1 -1
  19. package/src/shared/filter/search-filter-bar/search-filter-syntax.ts +1 -1
  20. package/src/shared/forms/autocomplete-input/AutocompleteInput.svelte +19 -7
  21. package/src/shared/shadcn/command/command-dialog.svelte +1 -1
  22. package/src/shared/shadcn/command/command-group.svelte +3 -1
  23. package/src/shared/shadcn/command-view/command-view.svelte +1 -6
  24. package/src/shared/shadcn/dropdown-menu/dropdown-menu-checkbox-item.svelte +0 -691
  25. package/src/shared/shadcn/dropdown-menu/dropdown-menu-content.svelte +691 -0
  26. package/src/shared/shadcn/dropdown-menu/dropdown-menu-radio-group.svelte +1 -1
  27. package/src/shared/shadcn/scroll-area/scroll-area.svelte +2 -0
  28. package/src/shared/shadcn/spinner/spinner.svelte +3 -3
  29. package/src/shared/shell/app-shell/AppShell.demo.css +37 -0
  30. package/src/shared/shell/app-shell/AppShellBodyContent.svelte +5 -1
  31. package/src/shared/shell/app-shell/AppShellBodySidebar.svelte +5 -1
  32. package/src/shared/shell/app-shell/AppShellMobilePanelSelector.svelte +1 -1
  33. package/src/shared/shell/app-shell/app-shell-controller.svelte.ts +23 -9
  34. package/src/shared/shell/app-shell/examples/AppShellBodyDemo.svelte +4 -0
  35. package/src/shared/shell/app-shell/examples/AppShellCompleteDemo.svelte +1 -0
  36. package/src/shared/shell/app-shell/examples/AppShellConversationDemo.svelte +1 -0
  37. package/src/shared/shell/app-shell/examples/AppShellExamples.css +521 -0
  38. package/src/shared/shell/app-shell/examples/AppShellFilesSidebarDemo.svelte +1 -0
  39. package/src/shared/shell/app-shell/examples/AppShellMarkdownDocumentDemo.svelte +6 -1
  40. package/src/shared/shell/app-shell/examples/AppShellMarkdownFilesDemo.svelte +1 -0
  41. package/src/shared/shell/app-shell/examples/AppShellModeSwitchDemo.svelte +1 -0
  42. package/src/shared/shell/app-shell/examples/AppShellProjectSidebarDemo.svelte +1 -0
  43. package/src/shared/shell/app-shell/examples/AppShellSidebarDemo.svelte +1 -0
  44. package/src/shared/shell/app-shell/examples/AppShellToolbarDemo.svelte +1 -0
  45. package/src/shared/workspace/menu/WorkspaceContextMenuItems.svelte +2 -1
  46. package/src/shared/workspace/menu/WorkspaceMenuItems.svelte +2 -1
  47. package/src/shared/workspace/problems/ProblemsQuickFix.svelte +1 -4
  48. package/src/shared/workspace/settings/AppSettingsContent.svelte +6 -0
  49. package/src/shared/workspace/settings/AppSettingsNavigation.svelte +7 -0
  50. package/src/shared/workspace/settings/CopyableValue.svelte +81 -0
  51. package/src/shared/workspace/settings/DeclarativeSettingsSection.svelte +20 -0
  52. package/src/shared/workspace/settings/WorkspaceSettingField.svelte +110 -41
  53. package/src/shared/workspace/settings/WorkspaceSettingMultiSelect.svelte +7 -6
  54. package/src/shared/workspace/settings/WorkspaceSettingObjectTable.svelte +187 -23
  55. package/src/shared/workspace/settings/WorkspaceSettingSelect.svelte +29 -29
  56. package/src/shared/workspace/settings/WorkspaceSettings.css +190 -4
  57. package/src/shared/workspace/settings/WorkspaceSettingsStoryCustomField.svelte +2 -2
  58. package/src/shared/workspace/settings/WorkspaceSettingsStoryCustomPage.svelte +13 -0
  59. package/src/shared/workspace/settings/WorkspaceSettingsSurface.svelte +50 -0
  60. package/src/shared/workspace/settings/configuration.ts +5 -0
  61. package/src/shared/workspace/settings/copyable-value.ts +10 -0
  62. package/src/shared/workspace/settings/index.ts +5 -0
  63. package/src/shared/workspace/settings/settings-controller.svelte.ts +349 -15
  64. package/src/shared/workspace/settings/types.ts +90 -8
  65. package/src/storybook/app-shell-reference/AppShellTwoExpandedSidebarsReference.css +25 -0
  66. package/src/storybook/app-shell-reference/AppShellTwoExpandedSidebarsReference.svelte +48 -0
  67. package/src/storybook/app-shell-reference/index.ts +1 -0
@@ -0,0 +1,521 @@
1
+ .ui-shell-story-complete {
2
+ --ui-shell-body-sidebar-width: 10rem;
3
+ }
4
+
5
+ .ui-shell-story-mode-demo {
6
+ position: relative;
7
+ height: 100%;
8
+ }
9
+
10
+ .ui-shell-story-mode-controls {
11
+ position: absolute;
12
+ z-index: 50;
13
+ inset-block-end: 1rem;
14
+ inset-inline-start: 50%;
15
+ display: flex;
16
+ gap: 0.25rem;
17
+ padding: 0.25rem;
18
+ border: 1px solid var(--border);
19
+ border-radius: var(--radius);
20
+ background: var(--background);
21
+ box-shadow: var(--ui-shell-main-shadow);
22
+ transform: translateX(-50%);
23
+ }
24
+
25
+ .ui-shell-story-mode-controls button {
26
+ text-transform: capitalize;
27
+ }
28
+
29
+ .ui-shell-story-sidebar-heading {
30
+ display: flex;
31
+ min-height: 2rem;
32
+ align-items: center;
33
+ gap: 0.75rem;
34
+ padding: 1rem 1rem 0.5rem;
35
+ white-space: nowrap;
36
+ }
37
+
38
+ .ui-shell-story-sidebar-heading svg {
39
+ width: 1rem;
40
+ height: 1rem;
41
+ flex: none;
42
+ }
43
+
44
+ .ui-minimal-app-shell__sidebar[data-state="collapsed"]
45
+ .ui-shell-story-sidebar-heading {
46
+ padding-block-start: 1.25rem;
47
+ }
48
+
49
+ .ui-shell-story-sidebar-body {
50
+ padding: 0 0.5rem;
51
+ }
52
+
53
+ .ui-shell-story-sidebar-body nav {
54
+ display: flex;
55
+ flex-direction: column;
56
+ gap: 0.25rem;
57
+ padding-block-end: 0.5rem;
58
+ }
59
+
60
+ .ui-shell-story-nav-label {
61
+ padding: 0.75rem 0.75rem 0.25rem;
62
+ color: var(--muted-foreground);
63
+ font-size: 0.6875rem;
64
+ font-weight: 600;
65
+ letter-spacing: 0.08em;
66
+ text-transform: uppercase;
67
+ }
68
+
69
+ .ui-shell-story-sidebar-footer {
70
+ min-height: 3rem;
71
+ padding: 0.75rem 1rem;
72
+ color: var(--muted-foreground);
73
+ font-size: 0.75rem;
74
+ font-weight: 600;
75
+ }
76
+
77
+ .ui-shell-story-project-header {
78
+ display: flex;
79
+ min-width: 0;
80
+ flex-wrap: wrap;
81
+ align-items: center;
82
+ gap: 0.5rem;
83
+ padding: 0.625rem 0.75rem 0.75rem;
84
+ }
85
+
86
+ .ui-shell-story-project-app {
87
+ display: flex;
88
+ min-width: 0;
89
+ flex: 1;
90
+ align-items: center;
91
+ gap: 0.625rem;
92
+ }
93
+
94
+ .ui-shell-story-project-app > svg {
95
+ width: 1.25rem;
96
+ height: 1.25rem;
97
+ flex: none;
98
+ }
99
+
100
+ .ui-shell-story-project-app > div {
101
+ display: flex;
102
+ min-width: 0;
103
+ flex-direction: column;
104
+ }
105
+
106
+ .ui-shell-story-project-app strong,
107
+ .ui-shell-story-project-app span {
108
+ overflow: hidden;
109
+ text-overflow: ellipsis;
110
+ white-space: nowrap;
111
+ }
112
+
113
+ .ui-shell-story-project-app span,
114
+ .ui-shell-story-project-selector > span,
115
+ .ui-shell-story-project-footer,
116
+ .ui-shell-story-files-footer {
117
+ color: var(--muted-foreground);
118
+ font-size: 0.75rem;
119
+ }
120
+
121
+ .ui-shell-story-project-selector {
122
+ display: grid;
123
+ width: 100%;
124
+ gap: 0.25rem;
125
+ }
126
+
127
+ .ui-shell-story-project-selector
128
+ > [data-ui-component="select"][data-ui-part="select-trigger"] {
129
+ width: 100%;
130
+ min-width: 0;
131
+ background: var(--background);
132
+ }
133
+
134
+ .ui-minimal-app-shell__sidebar[data-state="collapsed"][data-presentation="inline"]
135
+ .ui-shell-story-project-header {
136
+ justify-content: center;
137
+ padding: 0.5rem;
138
+ }
139
+
140
+ .ui-minimal-app-shell__sidebar[data-state="collapsed"][data-presentation="inline"]
141
+ .ui-shell-story-project-footer {
142
+ border-block-start: 0;
143
+ }
144
+
145
+ .ui-shell-story-project-body,
146
+ .ui-shell-story-files-body {
147
+ padding: 0.5rem;
148
+ }
149
+
150
+ .ui-shell-story-project-body nav,
151
+ .ui-shell-story-files-body nav {
152
+ display: flex;
153
+ flex-direction: column;
154
+ gap: 0.25rem;
155
+ }
156
+
157
+ .ui-shell-story-project-item,
158
+ .ui-shell-story-files-body button {
159
+ display: flex;
160
+ width: 100%;
161
+ min-width: 0;
162
+ min-height: 2.25rem;
163
+ align-items: center;
164
+ gap: 0.625rem;
165
+ border: 0;
166
+ border-radius: calc(var(--radius) * 0.75);
167
+ padding: 0.375rem 0.5rem;
168
+ color: var(--foreground);
169
+ background: transparent;
170
+ font: inherit;
171
+ text-align: start;
172
+ }
173
+
174
+ .ui-shell-story-project-item:hover,
175
+ .ui-shell-story-project-item:focus-visible,
176
+ .ui-shell-story-project-item[data-active],
177
+ .ui-shell-story-files-body button:hover,
178
+ .ui-shell-story-files-body button:focus-visible {
179
+ background: var(--accent);
180
+ }
181
+
182
+ .ui-shell-story-project-item:focus-visible,
183
+ .ui-shell-story-files-body button:focus-visible {
184
+ outline: 2px solid var(--ring);
185
+ outline-offset: 1px;
186
+ }
187
+
188
+ .ui-shell-story-project-item svg,
189
+ .ui-shell-story-files-body button svg {
190
+ width: 1rem;
191
+ height: 1rem;
192
+ flex: none;
193
+ }
194
+
195
+ .ui-minimal-app-shell__sidebar[data-state="collapsed"][data-presentation="inline"]
196
+ .ui-shell-story-project-item,
197
+ .ui-minimal-app-shell__sidebar[data-state="collapsed"]
198
+ .ui-shell-story-files-body
199
+ button {
200
+ justify-content: center;
201
+ padding-inline: 0;
202
+ }
203
+
204
+ .ui-shell-story-project-footer,
205
+ .ui-shell-story-files-footer {
206
+ min-height: 2.75rem;
207
+ padding: 0.75rem;
208
+ border-block-start: 1px solid var(--border);
209
+ }
210
+
211
+ .ui-shell-story-files-header {
212
+ display: flex;
213
+ min-height: var(--ui-shell-toolbar-height);
214
+ align-items: center;
215
+ gap: 0.625rem;
216
+ padding-inline: 0.5rem;
217
+ border-block-end: 1px solid var(--border);
218
+ white-space: nowrap;
219
+ }
220
+
221
+ .ui-shell-story-files-header > svg {
222
+ width: 1rem;
223
+ height: 1rem;
224
+ flex: none;
225
+ }
226
+
227
+ .ui-shell-story-files-header > * {
228
+ transform: translateY(0.25rem);
229
+ }
230
+
231
+ .ui-shell-story-ai-header {
232
+ display: flex;
233
+ min-height: var(--ui-shell-toolbar-height);
234
+ align-items: center;
235
+ gap: 0.75rem;
236
+ padding-inline: 1rem;
237
+ border-block-end: 1px solid var(--border);
238
+ white-space: nowrap;
239
+ }
240
+
241
+ .ui-shell-story-ai-header svg {
242
+ width: 1rem;
243
+ height: 1rem;
244
+ flex: none;
245
+ }
246
+
247
+ .ui-shell-story-ai-header > svg,
248
+ .ui-shell-story-ai-header > strong,
249
+ .ui-shell-story-ai-header > [data-ui-part="sidebar-close"] {
250
+ transform: translateY(0.25rem);
251
+ }
252
+
253
+ .ui-minimal-app-shell__sidebar[data-side="right"][data-state="collapsed"]
254
+ .ui-shell-story-ai-header {
255
+ min-height: 0;
256
+ padding: 0.5rem 0.5rem 0;
257
+ border-block-end: 0;
258
+ }
259
+
260
+ .ui-shell-story-ai-body
261
+ > [data-ui-component="scroll-area"]
262
+ > [data-ui-part="scroll-area-viewport"]
263
+ > div {
264
+ height: 100%;
265
+ }
266
+
267
+ .ui-shell-story-ai-body
268
+ > [data-ui-component="scroll-area"]
269
+ > [data-ui-part="scroll-area-viewport"]
270
+ > div
271
+ > [data-ui-component="button"] {
272
+ margin: 0.5rem;
273
+ }
274
+
275
+ .ui-minimal-app-shell__sidebar[data-side="right"][data-state="collapsed"]
276
+ .ui-shell-story-ai-body
277
+ > [data-ui-component="scroll-area"]
278
+ > [data-ui-part="scroll-area-viewport"]
279
+ > div
280
+ > [data-ui-component="button"] {
281
+ margin-block-start: 0.75rem;
282
+ }
283
+
284
+ .ui-shell-story-ai-body
285
+ [data-ui-component="ai-chat-layout"][data-density="compact"]
286
+ [data-ui-part="message-area"] {
287
+ padding-block-end: 7rem;
288
+ }
289
+
290
+ .ui-shell-story-ai-composer {
291
+ display: grid;
292
+ gap: 0;
293
+ }
294
+
295
+ .ui-shell-story-ai-composer > [data-ui-component="ai-chat-typing-indicator"] {
296
+ width: fit-content;
297
+ padding: 0.25rem 0.5rem;
298
+ border-radius: calc(var(--radius) * 0.75);
299
+ background: var(--background);
300
+ }
301
+
302
+ .ui-shell-story-nav-item {
303
+ width: 100%;
304
+ min-width: 0;
305
+ justify-content: flex-start;
306
+ overflow: hidden;
307
+ }
308
+
309
+ .ui-minimal-app-shell__sidebar[data-state="collapsed"]
310
+ .ui-shell-story-nav-item {
311
+ justify-content: center;
312
+ }
313
+
314
+ .ui-shell-story-toolbar-controls {
315
+ display: flex;
316
+ width: 100%;
317
+ min-width: 0;
318
+ align-items: center;
319
+ gap: 0.5rem;
320
+ padding-inline: 0.75rem;
321
+ }
322
+
323
+ .ui-shell-story-toolbar-title {
324
+ overflow: hidden;
325
+ text-overflow: ellipsis;
326
+ white-space: nowrap;
327
+ }
328
+
329
+ .ui-shell-story-toolbar-spacer {
330
+ flex: 1;
331
+ }
332
+
333
+ .ui-shell-story-document-toc {
334
+ display: flex;
335
+ min-width: 0;
336
+ flex-direction: column;
337
+ gap: 0.25rem;
338
+ padding: 3rem 0.75rem 1rem;
339
+ }
340
+
341
+ .ui-shell-story-document-toc > span {
342
+ padding: 0 0.5rem 0.5rem;
343
+ color: var(--muted-foreground);
344
+ font-size: 0.6875rem;
345
+ font-weight: 700;
346
+ letter-spacing: 0.08em;
347
+ text-transform: uppercase;
348
+ }
349
+
350
+ .ui-shell-story-document-toc a {
351
+ overflow: hidden;
352
+ border-radius: calc(var(--radius) * 0.75);
353
+ padding: 0.375rem 0.5rem;
354
+ color: var(--muted-foreground);
355
+ font-size: 0.8125rem;
356
+ text-decoration: none;
357
+ text-overflow: ellipsis;
358
+ white-space: nowrap;
359
+ }
360
+
361
+ .ui-shell-story-document-toc a:hover,
362
+ .ui-shell-story-document-toc a:focus-visible,
363
+ .ui-shell-story-document-toc a[aria-current] {
364
+ color: var(--foreground);
365
+ background: var(--accent);
366
+ }
367
+
368
+ .ui-shell-story-document-toc a:focus-visible {
369
+ outline: 2px solid var(--ring);
370
+ outline-offset: 1px;
371
+ }
372
+
373
+ .ui-shell-story-document {
374
+ max-width: 50rem;
375
+ padding: 2rem clamp(1.5rem, 5vw, 4rem) 4rem;
376
+ margin-inline: auto;
377
+ }
378
+
379
+ .ui-shell-story-document header {
380
+ margin-block-end: 2.5rem;
381
+ }
382
+
383
+ .ui-shell-story-document header > span {
384
+ color: var(--muted-foreground);
385
+ font-size: 0.6875rem;
386
+ font-weight: 700;
387
+ letter-spacing: 0.08em;
388
+ text-transform: uppercase;
389
+ }
390
+
391
+ .ui-shell-story-document h2 {
392
+ margin: 0.375rem 0 0.75rem;
393
+ font-size: 2rem;
394
+ }
395
+
396
+ .ui-shell-story-document h3 {
397
+ margin: 0 0 0.625rem;
398
+ font-size: 1.125rem;
399
+ }
400
+
401
+ .ui-shell-story-document p {
402
+ margin: 0 0 0.75rem;
403
+ color: var(--muted-foreground);
404
+ line-height: 1.65;
405
+ }
406
+
407
+ .ui-shell-story-document section {
408
+ scroll-margin-block-start: 1rem;
409
+ padding-block: 1.25rem;
410
+ border-block-start: 1px solid var(--border);
411
+ }
412
+
413
+ .ui-shell-story-document-empty {
414
+ display: grid;
415
+ height: 100%;
416
+ place-content: center;
417
+ justify-items: center;
418
+ gap: 0.5rem;
419
+ padding: 2rem;
420
+ color: var(--muted-foreground);
421
+ text-align: center;
422
+ }
423
+
424
+ .ui-shell-story-document-empty > svg {
425
+ width: 2rem;
426
+ height: 2rem;
427
+ }
428
+
429
+ .ui-shell-story-document-empty strong {
430
+ color: var(--foreground);
431
+ }
432
+
433
+ .ui-shell-story-body-demo {
434
+ container-type: inline-size;
435
+ display: flex;
436
+ flex-direction: column;
437
+ gap: 2rem;
438
+ min-height: 48rem;
439
+ padding: 2rem;
440
+ }
441
+
442
+ .ui-shell-story-body-demo header {
443
+ display: flex;
444
+ max-width: 42rem;
445
+ flex-direction: column;
446
+ gap: 0.5rem;
447
+ }
448
+
449
+ .ui-shell-story-body-demo header p,
450
+ .ui-shell-story-body-demo header h2,
451
+ .ui-shell-story-body-demo header span,
452
+ .ui-shell-story-card-grid p {
453
+ margin: 0;
454
+ }
455
+
456
+ .ui-shell-story-body-demo header p,
457
+ .ui-shell-story-card-grid span {
458
+ color: var(--muted-foreground);
459
+ font-size: 0.75rem;
460
+ font-weight: 600;
461
+ letter-spacing: 0.08em;
462
+ text-transform: uppercase;
463
+ }
464
+
465
+ .ui-shell-story-body-demo header h2 {
466
+ font-size: 1.75rem;
467
+ line-height: 1.2;
468
+ }
469
+
470
+ .ui-shell-story-body-demo header > span,
471
+ .ui-shell-story-card-grid p {
472
+ color: var(--muted-foreground);
473
+ }
474
+
475
+ .ui-shell-story-card-grid {
476
+ display: grid;
477
+ grid-template-columns: repeat(3, minmax(0, 1fr));
478
+ gap: 1rem;
479
+ }
480
+
481
+ .ui-shell-story-card-grid section {
482
+ display: flex;
483
+ min-width: 0;
484
+ flex-direction: column;
485
+ gap: 0.5rem;
486
+ padding: 1rem;
487
+ border: 1px solid var(--border);
488
+ border-radius: calc(var(--radius) * 0.8);
489
+ background: var(--card);
490
+ }
491
+
492
+ .ui-shell-story-card-grid strong {
493
+ font-size: 1.75rem;
494
+ }
495
+
496
+ @container (max-width: 34rem) {
497
+ .ui-shell-story-card-grid {
498
+ grid-template-columns: minmax(0, 1fr);
499
+ gap: 0.75rem;
500
+ }
501
+
502
+ .ui-shell-story-card-grid section {
503
+ display: grid;
504
+ grid-template-columns: minmax(0, 1fr) auto;
505
+ grid-template-rows: auto auto;
506
+ align-items: center;
507
+ column-gap: 1rem;
508
+ row-gap: 0.25rem;
509
+ padding-block: 0.75rem;
510
+ }
511
+
512
+ .ui-shell-story-card-grid section > span,
513
+ .ui-shell-story-card-grid section > p {
514
+ grid-column: 1;
515
+ }
516
+
517
+ .ui-shell-story-card-grid section > strong {
518
+ grid-column: 2;
519
+ grid-row: 1 / span 2;
520
+ }
521
+ }
@@ -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,
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import "./AppShellExamples.css";
2
3
  import BoxesIcon from "@lucide/svelte/icons/boxes";
3
4
  import FolderKanbanIcon from "@lucide/svelte/icons/folder-kanban";
4
5
  import NotebookTabsIcon from "@lucide/svelte/icons/notebook-tabs";
@@ -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 FilesIcon from "@lucide/svelte/icons/files";
4
5
  import InfoIcon from "@lucide/svelte/icons/info";
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import "./AppShellExamples.css";
2
3
  import { AppShell } from "../index.js";
3
4
 
4
5
  let {
@@ -22,8 +22,9 @@
22
22
  event: MouseEvent,
23
23
  ) {
24
24
  if (entry.disabled) return;
25
+ const selectedMenu = menu;
25
26
  await entry.callback?.(event);
26
- if (entry.closeOnSelect) menu.hide();
27
+ if (entry.closeOnSelect) selectedMenu.hide();
27
28
  }
28
29
  </script>
29
30
 
@@ -22,8 +22,9 @@
22
22
  event: MouseEvent,
23
23
  ) {
24
24
  if (entry.disabled) return;
25
+ const selectedMenu = menu;
25
26
  await entry.callback?.(event);
26
- if (entry.closeOnSelect) menu.hide();
27
+ if (entry.closeOnSelect) selectedMenu.hide();
27
28
  }
28
29
  </script>
29
30
 
@@ -30,10 +30,7 @@
30
30
  class="ui-workspace-problems__severity"
31
31
  name={severityIcon}
32
32
  />
33
- <WorkspaceIcon
34
- class="ui-workspace-problems__lightbulb"
35
- name="lightbulb"
36
- />
33
+ <WorkspaceIcon class="ui-workspace-problems__lightbulb" name="lightbulb" />
37
34
  </DropdownMenu.Trigger>
38
35
  <DropdownMenu.Portal>
39
36
  <DropdownMenu.Content
@@ -90,6 +90,12 @@
90
90
  settingsState.controller.selectSection(result.sectionId);
91
91
  settingsState.query = "";
92
92
  await tick();
93
+ if (result.fieldId) {
94
+ const section = settingsState.controller.sections.find(
95
+ (candidate) => candidate.id === result.sectionId,
96
+ );
97
+ await section?.revealSearchEntry?.(result.fieldId);
98
+ }
93
99
  await tick();
94
100
  requestAnimationFrame(() => {
95
101
  const element = viewport?.querySelector<HTMLElement>(
@@ -2,6 +2,12 @@
2
2
  import WorkspaceIcon from "../icon/WorkspaceIcon.svelte";
3
3
  import { getAppSettingsContext } from "./app-settings-context.svelte.js";
4
4
 
5
+ let {
6
+ onselect,
7
+ }: {
8
+ onselect?: (sectionId: string) => void;
9
+ } = $props();
10
+
5
11
  const state = getAppSettingsContext();
6
12
  let groups = $derived.by(() => {
7
13
  const configured = new Map(
@@ -47,6 +53,7 @@
47
53
  onclick={() => {
48
54
  state.controller.selectSection(section.id);
49
55
  state.query = "";
56
+ onselect?.(section.id);
50
57
  }}
51
58
  >
52
59
  <WorkspaceIcon name={section.icon ?? "settings"} />