@poveste/app 0.13.0 → 0.14.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 (110) hide show
  1. package/dist/bundled/App.vue_vue_type_script_setup_true_lang.js +26 -34
  2. package/dist/bundled/app.css +18 -24
  3. package/dist/bundled/components/HomeView.vue_vue_type_script_setup_true_lang.js +1 -1
  4. package/dist/bundled/components/app/AppLogo.vue_vue_type_script_setup_true_lang.js +2 -2
  5. package/dist/bundled/components/app/Breadcrumb.js +1 -1
  6. package/dist/bundled/components/app/Breadcrumb.vue_vue_type_script_setup_true_lang.js +2 -2
  7. package/dist/bundled/components/app/TopBar.vue_vue_type_script_setup_true_lang.js +4 -3
  8. package/dist/bundled/components/base/BaseCheckbox.vue_vue_type_script_setup_true_lang.js +1 -1
  9. package/dist/bundled/components/base/BaseListItemLink.js +6 -3
  10. package/dist/bundled/components/base/BaseListItemLink.vue_vue_type_script_lang.js +10 -4
  11. package/dist/bundled/components/base/BaseOverflowMenu.vue_vue_type_script_setup_true_lang.js +5 -2
  12. package/dist/bundled/components/base/BaseOverflowTab.js +6 -3
  13. package/dist/bundled/components/base/BaseOverflowTab.vue_vue_type_script_lang.js +4 -0
  14. package/dist/bundled/components/base/BaseSplitPane.js +1 -1
  15. package/dist/bundled/components/base/BaseSplitPane.vue_vue_type_script_setup_true_lang.js +6 -4
  16. package/dist/bundled/components/base/BaseTab.js +6 -3
  17. package/dist/bundled/components/base/BaseTab.vue_vue_type_script_lang.js +4 -0
  18. package/dist/bundled/components/command/CommandPrompts.vue_vue_type_script_setup_true_lang.js +1 -1
  19. package/dist/bundled/components/command/CommandPromptsModal.vue_vue_type_script_setup_true_lang.js +4 -3
  20. package/dist/bundled/components/command/PromptSelect.vue_vue_type_script_setup_true_lang.js +1 -1
  21. package/dist/bundled/components/command/PromptText.vue_vue_type_script_setup_true_lang.js +1 -1
  22. package/dist/bundled/components/panel/PaneTabs.vue_vue_type_script_setup_true_lang.js +4 -4
  23. package/dist/bundled/components/panel/StatePresets.vue_vue_type_script_setup_true_lang.js +30 -20
  24. package/dist/bundled/components/panel/StoryControls.vue_vue_type_script_setup_true_lang.js +1 -1
  25. package/dist/bundled/components/panel/StoryDocs.vue_vue_type_script_setup_true_lang.js +3 -1
  26. package/dist/bundled/components/panel/StoryEvent.vue_vue_type_script_setup_true_lang.js +5 -1
  27. package/dist/bundled/components/panel/StoryEvents.vue_vue_type_script_setup_true_lang.js +2 -1
  28. package/dist/bundled/components/panel/StorySidePanel.vue_vue_type_script_setup_true_lang.js +7 -5
  29. package/dist/bundled/components/panel/StorySourceCode.js +1 -1
  30. package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_script_setup_true_lang.js +6 -5
  31. package/dist/bundled/components/search/SearchPane.vue_vue_type_script_setup_true_lang.js +15 -7
  32. package/dist/bundled/components/story/GenericMountStory.vue_vue_type_script_setup_true_lang.js +2 -1
  33. package/dist/bundled/components/story/GenericRenderStory.vue_vue_type_script_setup_true_lang.js +2 -1
  34. package/dist/bundled/components/story/StoryResponsivePreview.js +1 -1
  35. package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_script_setup_true_lang.js +17 -6
  36. package/dist/bundled/components/story/StoryVariantGrid.js +1 -1
  37. package/dist/bundled/components/story/StoryVariantGrid.vue_vue_type_script_setup_true_lang.js +15 -10
  38. package/dist/bundled/components/story/StoryVariantSingle.js +1 -1
  39. package/dist/bundled/components/story/StoryVariantSingle.vue_vue_type_script_setup_true_lang.js +21 -33
  40. package/dist/bundled/components/story/StoryVariantSingleView.vue_vue_type_script_setup_true_lang.js +1 -1
  41. package/dist/bundled/components/story/StoryView.vue_vue_type_script_setup_true_lang.js +3 -2
  42. package/dist/bundled/components/story/StoryViewer.js +1 -1
  43. package/dist/bundled/components/story/StoryViewer.vue_vue_type_script_setup_true_lang.js +3 -3
  44. package/dist/bundled/components/toolbar/ToolbarBackground.js +1 -3
  45. package/dist/bundled/components/toolbar/ToolbarBackground.vue_vue_type_script_setup_true_lang.js +2 -6
  46. package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue_vue_type_script_setup_true_lang.js +17 -16
  47. package/dist/bundled/plugin.js +4 -3
  48. package/dist/bundled/sandbox.js +2 -2
  49. package/dist/bundled/stores/folder.js +1 -1
  50. package/dist/bundled/util/commands.js +20 -9
  51. package/dist/bundled/util/docs.js +2 -1
  52. package/dist/bundled/util/grid-slots.js +1 -1
  53. package/dist/bundled/util/highlighter.js +1 -1
  54. package/dist/bundled/util/icons.generated.js +0 -1
  55. package/dist/bundled/util/keyboard.js +1 -0
  56. package/dist/bundled/util/mapping.js +6 -2
  57. package/dist/bundled/util/preview-settings.js +1 -1
  58. package/dist/style.css +14 -2
  59. package/package.json +8 -6
  60. package/src/app/App.vue +36 -29
  61. package/src/app/components/HomeView.vue +1 -1
  62. package/src/app/components/app/AppLogo.vue +6 -2
  63. package/src/app/components/app/Breadcrumb.vue +2 -1
  64. package/src/app/components/app/TopBar.vue +7 -2
  65. package/src/app/components/base/BaseCheckbox.vue +1 -1
  66. package/src/app/components/base/BaseListItemLink.vue +12 -1
  67. package/src/app/components/base/BaseOverflowMenu.vue +9 -3
  68. package/src/app/components/base/BaseOverflowTab.vue +12 -1
  69. package/src/app/components/base/BaseSplitPane.vue +9 -4
  70. package/src/app/components/base/BaseTab.vue +12 -1
  71. package/src/app/components/command/CommandPrompts.vue +10 -2
  72. package/src/app/components/command/CommandPromptsModal.vue +1 -0
  73. package/src/app/components/command/PromptSelect.vue +2 -1
  74. package/src/app/components/command/PromptText.vue +7 -3
  75. package/src/app/components/panel/PaneTabs.vue +4 -4
  76. package/src/app/components/panel/StatePresets.vue +26 -5
  77. package/src/app/components/panel/StoryControls.vue +1 -1
  78. package/src/app/components/panel/StoryDocs.vue +3 -1
  79. package/src/app/components/panel/StoryEvent.vue +7 -2
  80. package/src/app/components/panel/StoryEvents.vue +4 -1
  81. package/src/app/components/panel/StorySidePanel.vue +2 -0
  82. package/src/app/components/panel/StorySourceCode.vue +11 -8
  83. package/src/app/components/search/SearchPane.vue +14 -5
  84. package/src/app/components/story/GenericMountStory.vue +2 -1
  85. package/src/app/components/story/GenericRenderStory.vue +2 -1
  86. package/src/app/components/story/StoryResponsivePreview.vue +30 -5
  87. package/src/app/components/story/StoryVariantGrid.vue +33 -16
  88. package/src/app/components/story/StoryVariantSingle.vue +44 -52
  89. package/src/app/components/story/StoryVariantSingleView.vue +1 -1
  90. package/src/app/components/story/StoryView.vue +7 -3
  91. package/src/app/components/story/StoryViewer.vue +3 -3
  92. package/src/app/components/toolbar/ToolbarBackground.vue +1 -8
  93. package/src/app/components/toolbar/ToolbarResponsiveSize.vue +23 -3
  94. package/src/app/components/tree/StoryGroup.vue +1 -1
  95. package/src/app/plugin.ts +7 -3
  96. package/src/app/sandbox.ts +1 -1
  97. package/src/app/stores/folder.ts +1 -1
  98. package/src/app/types.ts +2 -2
  99. package/src/app/util/commands.ts +26 -16
  100. package/src/app/util/docs.ts +2 -1
  101. package/src/app/util/grid-slots.ts +1 -1
  102. package/src/app/util/highlighter.ts +9 -1
  103. package/src/app/util/icons.generated.ts +1 -1
  104. package/src/app/util/keyboard.ts +3 -0
  105. package/src/app/util/mapping.ts +6 -2
  106. package/src/app/util/preview-settings.ts +1 -1
  107. package/src/app/util/scroll.ts +5 -1
  108. package/src/app/util/state.ts +1 -1
  109. package/src/app/util/variant.ts +4 -1
  110. package/src/app/components/base/BaseCopyIcon.vue +0 -34
@@ -8,12 +8,19 @@ import StoryVariantGridItem from './StoryVariantGridItem.vue'
8
8
 
9
9
  const storyStore = useStoryStore()
10
10
 
11
+ // `currentStory` is a `.find()` over the loaded stories, so it is undefined for
12
+ // a route naming a story that is not there, and `layout` is optional on top of
13
+ // that. `StoryView` only mounts this component inside its `v-else` on the same
14
+ // value, so neither is ever absent here — but that guarantee lives in another
15
+ // component's template and cannot be seen from this one, which is why these
16
+ // read through `?.` rather than an assertion.
11
17
  const gridTemplateWidth = computed(() => {
12
- if (storyStore.currentStory.layout.type !== 'grid') {
18
+ const layout = storyStore.currentStory?.layout
19
+ if (layout?.type !== 'grid') {
13
20
  return
14
21
  }
15
22
 
16
- const layoutWidth = storyStore.currentStory.layout.width
23
+ const layoutWidth = layout.width
17
24
 
18
25
  if (!layoutWidth) {
19
26
  return '200px'
@@ -38,11 +45,11 @@ const initialCount = 10
38
45
 
39
46
  const maxItemHeight = ref(0)
40
47
 
41
- const el = ref<HTMLDivElement>(null)
48
+ const el = ref<HTMLDivElement>()
42
49
  const scrollTop = ref(0)
43
50
  const viewportHeight = ref(0)
44
51
 
45
- const variants = computed(() => storyStore.currentStory.variants)
52
+ const variants = computed(() => storyStore.currentStory?.variants ?? [])
46
53
 
47
54
  useResizeObserver(el, () => {
48
55
  updateWindow()
@@ -103,7 +110,7 @@ function onItemResize(_w: number, h: number) {
103
110
 
104
111
  // Grid size
105
112
 
106
- const gridEl = ref<HTMLDivElement>(null)
113
+ const gridEl = ref<HTMLDivElement>()
107
114
  const gridColumnWidth = ref(1)
108
115
  const viewWidth = ref(1)
109
116
 
@@ -113,8 +120,12 @@ function updateSize() {
113
120
 
114
121
  if (!gridEl.value) return
115
122
 
116
- if (gridTemplateWidth.value.endsWith('%')) {
117
- gridColumnWidth.value = viewWidth.value * Number.parseInt(gridTemplateWidth.value) / 100 - gap
123
+ // Undefined when the story is not a grid, which is when this never runs.
124
+ const templateWidth = gridTemplateWidth.value
125
+ if (!templateWidth) return
126
+
127
+ if (templateWidth.endsWith('%')) {
128
+ gridColumnWidth.value = viewWidth.value * Number.parseInt(templateWidth) / 100 - gap
118
129
  }
119
130
  else {
120
131
  gridColumnWidth.value = Number.parseInt(gridTemplateWidth.value)
@@ -184,7 +195,9 @@ function scheduleTrim() {
184
195
  }
185
196
 
186
197
  watch(visibleVariants, (visible) => {
187
- slots.value = assignSlots(slots.value, storyStore.currentStory.id, visible)
198
+ const story = storyStore.currentStory
199
+ if (!story) return
200
+ slots.value = assignSlots(slots.value, story.id, visible)
188
201
  scheduleTrim()
189
202
  }, { immediate: true })
190
203
 
@@ -241,14 +254,18 @@ watch(() => storyStore.currentVariant, (variant) => {
241
254
  transform: offsetY ? `translateY(${offsetY}px)` : undefined,
242
255
  }"
243
256
  >
244
- <StoryVariantGridItem
245
- v-for="(slot, index) of slots"
246
- :key="index"
247
- :variant="slot.variant"
248
- :story="storyStore.currentStory"
249
- :style="{ order: slot.order, display: slot.visible ? undefined : 'none' }"
250
- @resize="onItemResize"
251
- />
257
+ <!-- A `template`, so the guard adds no element: `gridEl` above is
258
+ measured by a resize observer and must not move. -->
259
+ <template v-if="storyStore.currentStory">
260
+ <StoryVariantGridItem
261
+ v-for="(slot, index) of slots"
262
+ :key="index"
263
+ :variant="slot.variant"
264
+ :story="storyStore.currentStory"
265
+ :style="{ order: slot.order, display: slot.visible ? undefined : 'none' }"
266
+ @resize="onItemResize"
267
+ />
268
+ </template>
252
269
  </div>
253
270
  </div>
254
271
  </div>
@@ -27,59 +27,19 @@ const showsPreview = computed(() => !!variant.value || autoSelectsVariant(storyS
27
27
  </script>
28
28
 
29
29
  <template>
30
- <div
31
- v-if="isMobile"
32
- class="divide-y divide-gray-100 dark:divide-gray-800 h-full flex flex-col"
33
- >
34
- <a
35
- v-if="!hasSingleVariant || !variant"
36
- class="px-6 h-12 hover:text-primary-500 dark:hover:text-primary-400 cursor-pointer flex gap-2 flex-wrap w-full items-center flex-none"
37
- @click="$emit('openVariantMenu')"
38
- >
39
- <template v-if="variant">
40
- <Icon
41
- :icon="variant.icon ?? 'carbon:cube'"
42
- class="w-5 h-5 flex-none"
43
- :class="{
44
- 'text-gray-500': !variant.iconColor,
45
- 'bind-icon-color': variant.iconColor,
46
- }"
47
- />
48
- {{ variant.title }}
49
- </template>
50
- <template v-else>
51
- Select a variant...
52
- </template>
53
-
54
- <Icon
55
- icon="carbon:chevron-sort"
56
- class="w-5 h-5 shrink-0 ml-auto"
57
- />
58
- </a>
59
- <div
60
- v-if="showsPreview"
61
- class="poveste-story-variant-single p-2 h-full __poveste-pane-shadow-from-right"
62
- >
63
- <StoryVariantSingleView
64
- :variant="variant"
65
- :story="storyStore.currentStory"
66
- />
67
- </div>
68
- </div>
69
-
70
30
  <!--
71
- One split pane whether or not there is a list to put in it. A story with a
72
- single variant hides the first pane instead of taking a different branch, so
73
- the preview stays at one position in the tree and survives the move between
74
- a one-variant story and a many-variant one (#328).
31
+ One split pane for every layout. The variant list, the mobile picker row and
32
+ the bare single-variant view used to be three branches each carrying their
33
+ own `StoryVariantSingleView`, so moving between them rebuilt the preview and
34
+ cold-booted its sandbox. `isMobile` is a live media query, so that happened
35
+ on a window resize (#600); the single/many-variant half was #328.
75
36
  -->
76
37
  <BaseSplitPane
77
- v-else
78
38
  save-id="story-single-main-split"
79
39
  :min="5"
80
40
  :max="40"
81
41
  :default-split="17"
82
- :show-first="!hasSingleVariant"
42
+ :show-first="!isMobile && !hasSingleVariant"
83
43
  >
84
44
  <template #first>
85
45
  <div class="h-full overflow-y-auto">
@@ -92,13 +52,45 @@ const showsPreview = computed(() => !!variant.value || autoSelectsVariant(storyS
92
52
  </template>
93
53
  <template #last>
94
54
  <div
95
- v-if="showsPreview"
96
- class="poveste-story-variant-single p-2 h-full __poveste-pane-shadow-from-right"
55
+ class="h-full flex flex-col"
56
+ :class="{ 'divide-y divide-gray-100 dark:divide-gray-800': isMobile }"
97
57
  >
98
- <StoryVariantSingleView
99
- :variant="variant"
100
- :story="storyStore.currentStory"
101
- />
58
+ <!-- Mobile has no room for the list beside the preview, so the variant
59
+ it is showing opens a full-screen overlay instead. -->
60
+ <a
61
+ v-if="isMobile && (!hasSingleVariant || !variant)"
62
+ class="px-6 h-12 hover:text-primary-500 dark:hover:text-primary-400 cursor-pointer flex gap-2 flex-wrap w-full items-center flex-none"
63
+ @click="$emit('openVariantMenu')"
64
+ >
65
+ <template v-if="variant">
66
+ <Icon
67
+ :icon="variant.icon ?? 'carbon:cube'"
68
+ class="w-5 h-5 flex-none"
69
+ :class="{
70
+ 'text-gray-500': !variant.iconColor,
71
+ 'bind-icon-color': variant.iconColor,
72
+ }"
73
+ />
74
+ {{ variant.title }}
75
+ </template>
76
+ <template v-else>
77
+ Select a variant...
78
+ </template>
79
+
80
+ <Icon
81
+ icon="carbon:chevron-sort"
82
+ class="w-5 h-5 shrink-0 ml-auto"
83
+ />
84
+ </a>
85
+ <div
86
+ v-if="showsPreview"
87
+ class="poveste-story-variant-single p-2 h-full __poveste-pane-shadow-from-right"
88
+ >
89
+ <StoryVariantSingleView
90
+ :variant="variant"
91
+ :story="storyStore.currentStory"
92
+ />
93
+ </div>
102
94
  </div>
103
95
  </template>
104
96
  </BaseSplitPane>
@@ -60,7 +60,7 @@ watchEffect(() => {
60
60
  -->
61
61
  <template v-if="shown">
62
62
  <StoryVariantSinglePreviewNative
63
- v-if="shown.story.layout?.iframe === false"
63
+ v-if="shown.story.layout?.type === 'single' && shown.story.layout.iframe === false"
64
64
  :story="shown.story"
65
65
  :variant="shown.variant"
66
66
  />
@@ -33,8 +33,12 @@ const route = useRoute()
33
33
  // Restore variant selection
34
34
 
35
35
  watch(() => storyStore.currentVariant, (value) => {
36
- if (value) {
37
- storyStore.currentStory.lastSelectedVariant = value
36
+ // A current variant is found *inside* the current story, so one implies the
37
+ // other — but that is a fact about two computeds in the store, not something
38
+ // the compiler can see from here.
39
+ const story = storyStore.currentStory
40
+ if (value && story) {
41
+ story.lastSelectedVariant = value
38
42
  }
39
43
  }, {
40
44
  immediate: true,
@@ -61,7 +65,7 @@ function setVariant(variantId: string) {
61
65
 
62
66
  // Docs auto-scroll to top
63
67
 
64
- const docsOnlyScroller = ref<HTMLElement>(null)
68
+ const docsOnlyScroller = ref<HTMLElement>()
65
69
 
66
70
  function scrollDocsToTop() {
67
71
  docsOnlyScroller.value?.scrollTo(0, 0)
@@ -24,10 +24,10 @@ watch(variant, () => {
24
24
  <template>
25
25
  <div class="poveste-story-viewer bg-gray-50 h-full dark:bg-gray-750">
26
26
  <StoryVariantGrid
27
- v-if="storyStore.currentStory.layout.type === 'grid'"
27
+ v-if="storyStore.currentStory?.layout?.type === 'grid'"
28
28
  />
29
29
  <StoryVariantSingle
30
- v-else-if="storyStore.currentStory.layout.type === 'single'"
30
+ v-else-if="storyStore.currentStory?.layout?.type === 'single'"
31
31
  @open-variant-menu="isMenuOpened = true"
32
32
  />
33
33
  </div>
@@ -38,7 +38,7 @@ watch(variant, () => {
38
38
  @close="closeMenu"
39
39
  >
40
40
  <StoryVariantListItem
41
- v-for="(v, index) of storyStore.currentStory.variants"
41
+ v-for="(v, index) of storyStore.currentStory?.variants ?? []"
42
42
  :key="index"
43
43
  :variant="v"
44
44
  />
@@ -17,7 +17,7 @@ const colorSchemeOptions: { value: SandboxColorScheme, label: string, icon: stri
17
17
  // A book that hides the app color scheme switch doesn't want the preview one
18
18
  // either — it keeps whatever `theme.defaultColorScheme` says.
19
19
  const showColorScheme = !povesteConfig.theme.hideColorSchemeSwitch
20
- const showDropdown = showColorScheme || !!povesteConfig.backgroundPresets.length
20
+ const showDropdown = showColorScheme || !!povesteConfig.backgroundPresets?.length
21
21
  </script>
22
22
 
23
23
  <template>
@@ -109,10 +109,3 @@ const showDropdown = showColorScheme || !!povesteConfig.backgroundPresets.length
109
109
  </template>
110
110
  </VDropdown>
111
111
  </template>
112
-
113
- <style scoped>
114
- .bind-preview-bg {
115
- background-color: v-bind('settings.backgroundColor');
116
- color: v-bind('contrastColor');
117
- }
118
- </style>
@@ -1,10 +1,30 @@
1
1
  <script lang="ts" setup>
2
2
  import { Icon } from '@iconify/vue'
3
+ import { computed } from 'vue'
3
4
  import { usePreviewSettingsStore } from '../../stores/preview-settings'
4
5
  import { povesteConfig } from '../../util/config'
5
6
  import BaseCheckbox from '../base/BaseCheckbox.vue'
6
7
 
7
8
  const settings = usePreviewSettingsStore().currentSettings
9
+
10
+ // Not `v-model.number`: Vue's `looseToNumber` returns the original value when
11
+ // `parseFloat` gives NaN, so clearing the field stored the string `''`. That is
12
+ // a third value for a two-valued setting, and it is not nullish — so the `??`
13
+ // in the size tooltip and in the dragger's start value both stopped firing, and
14
+ // dragging after clearing the field set the size to the drag distance (#440).
15
+ // The placeholder already says empty means auto, so empty becomes `null`.
16
+ function autoWhenEmpty(key: 'responsiveWidth' | 'responsiveHeight') {
17
+ return computed<number | null>({
18
+ get: () => settings[key],
19
+ set: (value) => {
20
+ const parsed = typeof value === 'number' ? value : Number.parseFloat(value ?? '')
21
+ settings[key] = Number.isFinite(parsed) ? parsed : null
22
+ },
23
+ })
24
+ }
25
+
26
+ const responsiveWidth = autoWhenEmpty('responsiveWidth')
27
+ const responsiveHeight = autoWhenEmpty('responsiveHeight')
8
28
  </script>
9
29
 
10
30
  <template>
@@ -40,7 +60,7 @@ const settings = usePreviewSettingsStore().currentSettings
40
60
 
41
61
  <div class="flex items-center gap-2 px-4 py-3">
42
62
  <input
43
- v-model.number="settings.responsiveWidth"
63
+ v-model="responsiveWidth"
44
64
  v-tooltip="'Responsive width (px)'"
45
65
  type="number"
46
66
  class="bg-transparent border border-gray-200 dark:border-gray-850 rounded w-20 opacity-50 focus:opacity-100 flex-1 min-w-0"
@@ -49,7 +69,7 @@ const settings = usePreviewSettingsStore().currentSettings
49
69
  >
50
70
  <span class="opacity-50">×</span>
51
71
  <input
52
- v-model.number="settings.responsiveHeight"
72
+ v-model="responsiveHeight"
53
73
  v-tooltip="'Responsive height (px)'"
54
74
  type="number"
55
75
  class="bg-transparent border border-gray-200 dark:border-gray-850 rounded w-20 opacity-50 focus:opacity-100 flex-1 min-w-0"
@@ -67,7 +87,7 @@ const settings = usePreviewSettingsStore().currentSettings
67
87
  ? 'bg-primary-500 hover:bg-primary-600 text-white dark:text-black'
68
88
  : 'bg-transparent hover:bg-primary-100 dark:hover:bg-primary-700',
69
89
  ]"
70
- @click="settings.responsiveWidth = preset.width;settings.responsiveHeight = preset.height;hide()"
90
+ @click="settings.responsiveWidth = preset.width;settings.responsiveHeight = preset.height ?? null;hide()"
71
91
  >
72
92
  {{ preset.label }}
73
93
  <span class="ml-auto opacity-70 flex gap-1">
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import type { Story, TreeGroup } from '../../types'
2
+ import type { Story, TreeFolder, TreeGroup, TreeLeaf } from '../../types'
3
3
  import { Icon } from '@iconify/vue'
4
4
  import { computed } from 'vue'
5
5
  import { useFolderStore } from '../../stores/folder'
package/src/app/plugin.ts CHANGED
@@ -1,11 +1,15 @@
1
1
  import { router } from './router.js'
2
2
 
3
3
  export function setupPluginApi() {
4
- if (!import.meta.hot) return
4
+ // Captured rather than re-read: the narrowing from this guard does not reach
5
+ // into the callbacks below, and `hot?.send` there would leave `sendEvent`'s
6
+ // promise waiting for a reply to a message that was never sent.
7
+ const hot = import.meta.hot
8
+ if (!hot) return
5
9
 
6
10
  const listeners: Record<string, Set<(result: any) => unknown>> = {}
7
11
 
8
- import.meta.hot.on('poveste:dev-event-result', ({ event, result }) => {
12
+ hot.on('poveste:dev-event-result', ({ event, result }) => {
9
13
  const set = listeners[event]
10
14
  if (set) {
11
15
  for (const listener of set) {
@@ -36,7 +40,7 @@ export function setupPluginApi() {
36
40
  window.__HST_PLUGIN_API__ = {
37
41
  sendEvent: (event: string, payload?: any) => {
38
42
  return new Promise((resolve) => {
39
- import.meta.hot.send(`poveste:dev-event`, {
43
+ hot.send(`poveste:dev-event`, {
40
44
  event,
41
45
  payload,
42
46
  })
@@ -72,7 +72,7 @@ if (window.parent && window.parent !== window) {
72
72
  // window, and no framework hook sees an error raised outside its own call
73
73
  // stack (#323).
74
74
  function reportUncaught(error: unknown) {
75
- reportStoryError(error, { storyId: storyId.value, variantId: variantId.value })
75
+ reportStoryError(error, { storyId: storyId.value ?? undefined, variantId: variantId.value ?? undefined })
76
76
  }
77
77
  window.addEventListener('error', (event) => {
78
78
  if (!isBenignResizeObserverEvent(event)) {
@@ -51,7 +51,7 @@ export const useFolderStore = defineStore('folder', () => {
51
51
  const storyStore = useStoryStore()
52
52
 
53
53
  watch(() => storyStore.currentStory, (story) => {
54
- if (story) {
54
+ if (story?.file) {
55
55
  openFileFolders(story.file.path)
56
56
  }
57
57
  })
package/src/app/types.ts CHANGED
@@ -54,14 +54,14 @@ export interface PreviewSettings {
54
54
  *
55
55
  * @default 720
56
56
  */
57
- responsiveWidth: number
57
+ responsiveWidth: number | null
58
58
  /**
59
59
  * Height of the responsive preview, in pixels. `null` sizes it to the
60
60
  * available space.
61
61
  *
62
62
  * @default null
63
63
  */
64
- responsiveHeight: number
64
+ responsiveHeight: number | null
65
65
  /**
66
66
  * Swap `responsiveWidth` and `responsiveHeight`, to preview a size in
67
67
  * landscape without editing both values.
@@ -1,29 +1,39 @@
1
- import type { ClientCommand, ClientCommandContext } from '@poveste/shared'
1
+ import type { ClientCommand, ClientCommandContext, Story } from '@poveste/shared'
2
2
  import { router } from '../router.js'
3
3
  import { useStoryStore } from '../stores/story.js'
4
4
  import { openInEditor } from './open-in-editor.js'
5
5
 
6
+ /**
7
+ * The path "Open file in editor" should open, or undefined when there is none.
8
+ *
9
+ * `Story.file` is optional, and `let file: string` used to be assigned
10
+ * `story.file?.filePath` in both branches — so a story without a file produced
11
+ * `file: undefined`, and `openInEditor` sent
12
+ * `__open-in-editor?file=undefined` to the dev server: a request to open a file
13
+ * literally named "undefined", with nothing said in the UI (#667).
14
+ *
15
+ * A docs-only story prefers its markdown, falling back to the component file
16
+ * when the story has both.
17
+ */
18
+ function editableFilePath(story: Story | undefined): string | undefined {
19
+ const file = story?.file
20
+ if (!file) return undefined
21
+ return story?.docsOnly ? file.docsFilePath ?? file.filePath : file.filePath
22
+ }
23
+
6
24
  export const builtinCommands: ClientCommand[] = [
7
25
  {
8
26
  id: 'builtin:open-in-editor',
9
27
  label: 'Open file in editor',
10
28
  icon: 'carbon:script-reference',
11
- showIf: ({ route }) => route.name === 'story' && !!useStoryStore().currentStory,
12
- getParams: () => {
13
- const story = useStoryStore().currentStory
14
- let file: string
15
- if (story.docsOnly) {
16
- file = story.file?.docsFilePath ?? story.file?.filePath
17
- }
18
- else {
19
- file = story.file?.filePath
20
- }
21
- return {
22
- file,
23
- }
24
- },
29
+ // On the path rather than on the story: a story with no file has nothing
30
+ // to open, and offering the command was how the bad request got sent.
31
+ showIf: ({ route }) => route.name === 'story' && !!editableFilePath(useStoryStore().currentStory),
32
+ getParams: () => ({
33
+ file: editableFilePath(useStoryStore().currentStory),
34
+ }),
25
35
  clientAction: ({ file }) => {
26
- openInEditor(file)
36
+ if (file) openInEditor(file)
27
37
  },
28
38
  },
29
39
  {
@@ -13,7 +13,8 @@ export async function getSourceCode(story: Story, variant: Variant) {
13
13
  }
14
14
  }
15
15
  else {
16
- const clientPlugin = clientSupportPlugins[story.file?.supportPluginId]
16
+ const supportPluginId = story.file?.supportPluginId
17
+ const clientPlugin = supportPluginId ? clientSupportPlugins[supportPluginId] : undefined
17
18
  if (clientPlugin) {
18
19
  const pluginModule = await clientPlugin()
19
20
  return pluginModule.generateSourceCode(variant)
@@ -26,7 +26,7 @@ export function assignSlots(slots: Slot[], storyId: string, visible: Variant[]):
26
26
  const position = new Map(visible.map((v, i) => [v.id, i]))
27
27
  const next: Slot[] = slots.map(slot => (
28
28
  slot.storyId === storyId && position.has(slot.variant.id)
29
- ? { ...slot, visible: true, order: position.get(slot.variant.id) }
29
+ ? { ...slot, visible: true, order: position.get(slot.variant.id) ?? 0 }
30
30
  : { ...slot, visible: false, order: 0 }
31
31
  ))
32
32
  const placed = new Set(next.filter(s => s.visible).map(s => s.variant.id))
@@ -23,8 +23,16 @@ export function getHighlighter(): Promise<HighlighterCore> {
23
23
  import('shiki/langs/html.mjs'),
24
24
  import('shiki/langs/jsx.mjs'),
25
25
  ],
26
+ /*
27
+ * `github-light-high-contrast`, not `github-light`. The plain one paints
28
+ * keywords at 4.38:1 on the pane background, variables at 3.34 and tag
29
+ * names at 4.43 — three of its twelve token colours miss AA (#533). This is
30
+ * GitHub's own accessible build of the same theme, so code keeps reading the
31
+ * way it did, and the colours are maintained upstream rather than darkened
32
+ * by hand here.
33
+ */
26
34
  themes: [
27
- import('shiki/themes/github-light.mjs'),
35
+ import('shiki/themes/github-light-high-contrast.mjs'),
28
36
  import('shiki/themes/github-dark.mjs'),
29
37
  ],
30
38
  engine: createOnigurumaEngine(import('shiki/wasm')),
@@ -2,7 +2,7 @@
2
2
  import type { IconifyJSON } from '@iconify/vue'
3
3
 
4
4
  export const iconCollections: IconifyJSON[] = [
5
- {"prefix":"carbon","icons":{"add-alt":{"body":"<path fill=\"currentColor\" d=\"M16 4c6.6 0 12 5.4 12 12s-5.4 12-12 12S4 22.6 4 16S9.4 4 16 4m0-2C8.3 2 2 8.3 2 16s6.3 14 14 14s14-6.3 14-14S23.7 2 16 2\"/><path fill=\"currentColor\" d=\"M24 15h-7V8h-2v7H8v2h7v7h2v-7h7z\"/>"},"area":{"body":"<path fill=\"currentColor\" d=\"M27 22.142V9.858A3.992 3.992 0 1 0 22.142 5H9.858A3.992 3.992 0 1 0 5 9.858v12.284A3.992 3.992 0 1 0 9.858 27h12.284A3.992 3.992 0 1 0 27 22.142M26 4a2 2 0 1 1-2 2a2 2 0 0 1 2-2M4 6a2 2 0 1 1 2 2a2 2 0 0 1-2-2m2 22a2 2 0 1 1 2-2a2 2 0 0 1-2 2m16.142-3H9.858A4 4 0 0 0 7 22.142V9.858A4 4 0 0 0 9.858 7h12.284A4 4 0 0 0 25 9.858v12.284A3.99 3.99 0 0 0 22.142 25M26 28a2 2 0 1 1 2-2a2.003 2.003 0 0 1-2 2\"/>"},"audio-console":{"body":"<path fill=\"currentColor\" d=\"M28 14.005h-1v-12h-2v12h-1a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h1v10h2v-10h1a2.003 2.003 0 0 0 2-2v-2a2 2 0 0 0-2-2m0 4h-4v-2h4Zm-10-12h-1v-4h-2v4h-1a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h1v18h2v-18h1a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2m0 4h-4v-2h4Zm-10 10H7v-18H5v18H4a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h1v4h2v-4h1a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2m0 4H4v-2h4Z\"/>"},"bring-forward":{"body":"<path fill=\"currentColor\" d=\"M12 15h-2v-3a2 2 0 0 1 2-2h3v2h-3Zm3 15h-3a2 2 0 0 1-2-2v-3h2v3h3Zm3-2h4v2h-4zm10 2h-3v-2h3v-3h2v3a2 2 0 0 1-2 2M10 18h2v4h-2zm18 0h2v4h-2zm2-3h-2v-3h-3v-2h3a2 2 0 0 1 2 2Zm-12-5h4v2h-4z\"/><path fill=\"currentColor\" d=\"M8 22H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4h-2V4H4v16h4Z\"/>"},"caret-down":{"body":"<path fill=\"currentColor\" d=\"m24 12l-8 10l-8-10z\"/>"},"caret-right":{"body":"<path fill=\"currentColor\" d=\"m12 8l10 8l-10 8z\"/>"},"checkbox":{"body":"<path fill=\"currentColor\" d=\"M26 4H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2M6 26V6h20v20Z\"/>"},"checkmark":{"body":"<path fill=\"currentColor\" d=\"m13 24l-9-9l1.414-1.414L13 21.171L26.586 7.586L28 9z\"/>"},"chevron-down":{"body":"<path fill=\"currentColor\" d=\"M16 22L6 12l1.4-1.4l8.6 8.6l8.6-8.6L26 12z\"/>"},"chevron-right":{"body":"<path fill=\"currentColor\" d=\"M22 16L12 26l-1.4-1.4l8.6-8.6l-8.6-8.6L12 6z\"/>"},"chevron-sort":{"body":"<path fill=\"currentColor\" d=\"m16 28l-7-7l1.41-1.41L16 25.17l5.59-5.58L23 21zm0-24l7 7l-1.41 1.41L16 6.83l-5.59 5.58L9 11z\"/>"},"close":{"body":"<path fill=\"currentColor\" d=\"M17.414 16L24 9.414L22.586 8L16 14.586L9.414 8L8 9.414L14.586 16L8 22.586L9.414 24L16 17.414L22.586 24L24 22.586z\"/>"},"code":{"body":"<path fill=\"currentColor\" d=\"m31 16l-7 7l-1.41-1.41L28.17 16l-5.58-5.59L24 9zM1 16l7-7l1.41 1.41L3.83 16l5.58 5.59L8 23zm11.42 9.484L17.64 6l1.932.517L14.352 26z\"/>"},"code-hide":{"body":"<path fill=\"currentColor\" d=\"m17.713 13.471l1.863-6.953L17.645 6l-1.565 5.838zm6.494 6.494l1.414 1.414L31 16l-7-7l-1.414 1.414L28.172 16zM30 28.586L3.414 2L2 3.414l5.793 5.793L1 16l7 7l1.414-1.414L3.828 16l5.379-5.379l5.677 5.677l-2.461 9.184l1.932.518l2.162-8.069L28.586 30z\"/>"},"color-palette":{"body":"<circle cx=\"10\" cy=\"12\" r=\"2\" fill=\"currentColor\"/><circle cx=\"16\" cy=\"9\" r=\"2\" fill=\"currentColor\"/><circle cx=\"22\" cy=\"12\" r=\"2\" fill=\"currentColor\"/><circle cx=\"23\" cy=\"18\" r=\"2\" fill=\"currentColor\"/><circle cx=\"19\" cy=\"23\" r=\"2\" fill=\"currentColor\"/><path fill=\"currentColor\" d=\"M16.54 2A14 14 0 0 0 2 16a4.82 4.82 0 0 0 6.09 4.65l1.12-.31a3 3 0 0 1 3.79 2.9V27a3 3 0 0 0 3 3a14 14 0 0 0 14-14.54A14.05 14.05 0 0 0 16.54 2m8.11 22.31A11.93 11.93 0 0 1 16 28a1 1 0 0 1-1-1v-3.76a5 5 0 0 0-5-5a5 5 0 0 0-1.33.18l-1.12.31A2.82 2.82 0 0 1 4 16A12 12 0 0 1 16.47 4A12.18 12.18 0 0 1 28 15.53a11.9 11.9 0 0 1-3.35 8.79Z\"/>"},"condition-wait-point":{"body":"<path fill=\"currentColor\" d=\"m8 16l8-8l8 8l-8 8z\"/><path fill=\"currentColor\" d=\"M16 4A12 12 0 1 1 4 16A12.014 12.014 0 0 1 16 4m0-2a14 14 0 1 0 14 14A14 14 0 0 0 16 2\"/>"},"copy-file":{"body":"<path fill=\"currentColor\" d=\"m27.4 14.7l-6.1-6.1C21 8.2 20.5 8 20 8h-8c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V16.1c0-.5-.2-1-.6-1.4M20 10l5.9 6H20zm-8 18V10h6v6c0 1.1.9 2 2 2h6v10z\"/><path fill=\"currentColor\" d=\"M6 18H4V4c0-1.1.9-2 2-2h14v2H6z\"/>"},"cube":{"body":"<path fill=\"currentColor\" d=\"m28.504 8.136l-12-7a1 1 0 0 0-1.008 0l-12 7A1 1 0 0 0 3 9v14a1 1 0 0 0 .496.864l12 7a1 1 0 0 0 1.008 0l12-7A1 1 0 0 0 29 23V9a1 1 0 0 0-.496-.864M16 3.158L26.016 9L16 14.842L5.984 9ZM5 10.74l10 5.833V28.26L5 22.426Zm12 17.52V16.574l10-5.833v11.685Z\"/>"},"cube-view":{"body":"<circle cx=\"16\" cy=\"16\" r=\"2\" fill=\"currentColor\"/><path fill=\"currentColor\" d=\"M23.777 15.479A8.64 8.64 0 0 0 16 10a8.64 8.64 0 0 0-7.777 5.479L8 16l.223.522A8.64 8.64 0 0 0 16 22a8.64 8.64 0 0 0 7.777-5.478L24 16ZM16 20a4 4 0 1 1 4-4a4.005 4.005 0 0 1-4 4\"/><path fill=\"currentColor\" d=\"m28.504 8.136l-12-7a1 1 0 0 0-1.008 0l-12 7A1 1 0 0 0 3 9v14a1 1 0 0 0 .496.864l12 7a1 1 0 0 0 1.008 0l12-7A1 1 0 0 0 29 23V9a1 1 0 0 0-.496-.864M27 22.426l-11 6.416l-11-6.416V9.574l11-6.416l11 6.416Z\"/>"},"data-vis-1":{"body":"<path fill=\"currentColor\" d=\"M26 22a3.96 3.96 0 0 0-2.02.567l-3.813-3.814a4.965 4.965 0 0 0 0-5.506l2.547-2.547A3.028 3.028 0 1 0 21.3 9.286l-2.547 2.547a4.965 4.965 0 0 0-5.506 0L9.433 8.019A3.96 3.96 0 0 0 10 6a4 4 0 1 0-4 4a3.96 3.96 0 0 0 2.02-.567l3.813 3.814a4.965 4.965 0 0 0 0 5.506l-3.814 3.814A3.96 3.96 0 0 0 6 22a4 4 0 1 0 4 4a3.96 3.96 0 0 0-.567-2.02l3.814-3.813a5 5 0 0 0 1.753.732v3.285a3 3 0 1 0 2 0v-3.285a5 5 0 0 0 1.753-.732l3.814 3.814A3.96 3.96 0 0 0 22 26a4 4 0 1 0 4-4m-10-9a3 3 0 1 1-3 3a3.003 3.003 0 0 1 3-3M4 6a2 2 0 1 1 2 2a2 2 0 0 1-2-2m2 22a2 2 0 1 1 2-2a2 2 0 0 1-2 2m20 0a2 2 0 1 1 2-2a2.003 2.003 0 0 1-2 2\"/>"},"devices":{"body":"<path fill=\"currentColor\" d=\"M10 30H4a2 2 0 0 1-2-2V16a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2M4 16v12h6V16Z\"/><path fill=\"currentColor\" d=\"M28 4H6a2 2 0 0 0-2 2v6h2V6h22v14H14v2h2v4h-2v2h9v-2h-5v-4h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2\"/>"},"document":{"body":"<path fill=\"currentColor\" d=\"m25.7 9.3l-7-7c-.2-.2-.4-.3-.7-.3H8c-1.1 0-2 .9-2 2v24c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V10c0-.3-.1-.5-.3-.7M18 4.4l5.6 5.6H18zM24 28H8V4h8v6c0 1.1.9 2 2 2h6z\"/><path fill=\"currentColor\" d=\"M10 22h12v2H10zm0-6h12v2H10z\"/>"},"document-blank":{"body":"<path fill=\"currentColor\" d=\"m25.7 9.3l-7-7A.9.9 0 0 0 18 2H8a2.006 2.006 0 0 0-2 2v24a2.006 2.006 0 0 0 2 2h16a2.006 2.006 0 0 0 2-2V10a.9.9 0 0 0-.3-.7M18 4.4l5.6 5.6H18ZM24 28H8V4h8v6a2.006 2.006 0 0 0 2 2h6Z\"/>"},"document-unknown":{"body":"<circle cx=\"9\" cy=\"28.5\" r=\"1.5\" fill=\"currentColor\"/><path fill=\"currentColor\" d=\"M10 25H8v-4h2a2 2 0 0 0 0-4H8a2 2 0 0 0-2 2v.5H4V19a4.005 4.005 0 0 1 4-4h2a4 4 0 0 1 0 8Z\"/><path fill=\"currentColor\" d=\"m27.7 9.3l-7-7A.9.9 0 0 0 20 2H10a2.006 2.006 0 0 0-2 2v8h2V4h8v6a2.006 2.006 0 0 0 2 2h6v16H14v2h12a2.006 2.006 0 0 0 2-2V10a.91.91 0 0 0-.3-.7M20 10V4.4l5.6 5.6Z\"/>"},"edit":{"body":"<path fill=\"currentColor\" d=\"M2 26h28v2H2zM25.4 9c.8-.8.8-2 0-2.8l-3.6-3.6c-.8-.8-2-.8-2.8 0l-15 15V24h6.4zm-5-5L24 7.6l-3 3L17.4 7zM6 22v-3.6l10-10l3.6 3.6l-10 10z\"/>"},"erase":{"body":"<path fill=\"currentColor\" d=\"M7 27h23v2H7zm20.38-16.49l-7.93-7.92a2 2 0 0 0-2.83 0l-14 14a2 2 0 0 0 0 2.83L7.13 24h9.59l10.66-10.66a2 2 0 0 0 0-2.83M15.89 22H8l-4-4l6.31-6.31l7.93 7.92Zm3.76-3.76l-7.92-7.93L18 4l8 7.93Z\"/>"},"event-schedule":{"body":"<path fill=\"currentColor\" d=\"M21 30a8 8 0 1 1 8-8a8 8 0 0 1-8 8m0-14a6 6 0 1 0 6 6a6 6 0 0 0-6-6\"/><path fill=\"currentColor\" d=\"M22.59 25L20 22.41V18h2v3.59l2 2z\"/><path fill=\"currentColor\" d=\"M28 6a2 2 0 0 0-2-2h-4V2h-2v2h-8V2h-2v2H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h4v-2H6V6h4v2h2V6h8v2h2V6h4v6h2Z\"/>"},"flash":{"body":"<path fill=\"currentColor\" d=\"M11.61 29.92a1 1 0 0 1-.6-1.07L12.83 17H8a1 1 0 0 1-1-1.23l3-13A1 1 0 0 1 11 2h10a1 1 0 0 1 .78.37a1 1 0 0 1 .2.85L20.25 11H25a1 1 0 0 1 .9.56a1 1 0 0 1-.11 1l-13 17A1 1 0 0 1 12 30a1.1 1.1 0 0 1-.39-.08M17.75 13l2-9H11.8L9.26 15h5.91l-1.59 10.28L23 13Z\"/>"},"help":{"body":"<path fill=\"currentColor\" d=\"M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2m0 26a12 12 0 1 1 12-12a12 12 0 0 1-12 12\"/><circle cx=\"16\" cy=\"23.5\" r=\"1.5\" fill=\"currentColor\"/><path fill=\"currentColor\" d=\"M17 8h-1.5a4.49 4.49 0 0 0-4.5 4.5v.5h2v-.5a2.5 2.5 0 0 1 2.5-2.5H17a2.5 2.5 0 0 1 0 5h-2v4.5h2V17a4.5 4.5 0 0 0 0-9\"/>"},"launch":{"body":"<path fill=\"currentColor\" d=\"M26 28H6a2.003 2.003 0 0 1-2-2V6a2.003 2.003 0 0 1 2-2h10v2H6v20h20V16h2v10a2.003 2.003 0 0 1-2 2\"/><path fill=\"currentColor\" d=\"M20 2v2h6.586L18 12.586L19.414 14L28 5.414V12h2V2z\"/>"},"moon":{"body":"<path fill=\"currentColor\" d=\"M13.503 5.414a15.076 15.076 0 0 0 11.593 18.194a11.1 11.1 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1 1 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.07 13.07 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3\"/>"},"open-panel-filled-bottom":{"body":"<path fill=\"currentColor\" d=\"M28 4H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 2v12H4V6Z\"/>"},"open-panel-filled-left":{"body":"<path fill=\"currentColor\" d=\"M28 4H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 22H12V6h16Z\"/>"},"open-panel-filled-right":{"body":"<path fill=\"currentColor\" d=\"M28 4H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2M4 6h16v20H4Z\"/>"},"pan-horizontal":{"body":"<path fill=\"currentColor\" d=\"m24 10l-1.414 1.414L26.172 15H5.828l3.586-3.586L8 10l-6 6l6 6l1.414-1.414L5.828 17h20.344l-3.586 3.586L24 22l6-6z\"/>"},"pan-vertical":{"body":"<path fill=\"currentColor\" d=\"m10 8l1.414 1.414L15 5.828v20.344l-3.586-3.586L10 24l6 6l6-6l-1.414-1.414L17 26.172V5.828l3.586 3.586L22 8l-6-6z\"/>"},"panel-expansion":{"body":"<path fill=\"currentColor\" d=\"M12 6H6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2m-6 8V8h6v6Zm20-8h-6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2m-6 18V8h6v16Z\"/>"},"reset":{"body":"<path fill=\"currentColor\" d=\"M18 28A12 12 0 1 0 6 16v6.2l-3.6-3.6L1 20l6 6l6-6l-1.4-1.4L8 22.2V16a10 10 0 1 1 10 10Z\"/>"},"save":{"body":"<path fill=\"currentColor\" d=\"m27.71 9.29l-5-5A1 1 0 0 0 22 4H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V10a1 1 0 0 0-.29-.71M12 6h8v4h-8Zm8 20h-8v-8h8Zm2 0v-8a2 2 0 0 0-2-2h-8a2 2 0 0 0-2 2v8H6V6h4v4a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V6.41l4 4V26Z\"/>"},"screen":{"body":"<path fill=\"currentColor\" d=\"M28 4H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h8v4H8v2h16v-2h-4v-4h8a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2M18 28h-4v-4h4Zm10-6H4V6h24Z\"/>"},"script-reference":{"body":"<path fill=\"currentColor\" d=\"M4 20v2h4.586L2 28.586L3.414 30L10 23.414V28h2v-8zm23.17 6l-2.58 2.58L26 30l4-4l-4-4l-1.42 1.41zm-8.34 0l2.58-2.58L20 22l-4 4l4 4l1.42-1.41zM25.7 9.3l-7-7A.9.9 0 0 0 18 2H8a2.006 2.006 0 0 0-2 2v12h2V4h8v6a2.006 2.006 0 0 0 2 2h6v6h2v-8a.91.91 0 0 0-.3-.7M18 10V4.4l5.6 5.6Z\"/>"},"search":{"body":"<path fill=\"currentColor\" d=\"m29 27.586l-7.552-7.552a11.018 11.018 0 1 0-1.414 1.414L27.586 29ZM4 13a9 9 0 1 1 9 9a9.01 9.01 0 0 1-9-9\"/>"},"shape-except":{"body":"<path fill=\"currentColor\" d=\"M28 10h-6V4a2 2 0 0 0-2-2H4a2.003 2.003 0 0 0-2 2v16a2.003 2.003 0 0 0 2 2h6v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V12a2 2 0 0 0-2-2M12 20v-8h8v8ZM3.999 4H20v6h-8a2 2 0 0 0-2 2v8H4Z\"/>"},"software-resource-reference":{"body":"<path fill=\"currentColor\" d=\"m6.899 10.283l3.394-3.394l1.414 1.414l-3.394 3.394zM4.9 19.7l-2.3-2.3C2.2 17 2 16.5 2 16s.2-1 .6-1.4l2.3-2.3l1.4 1.4L4 16l2.3 2.3zm1.989 2.007l1.414-1.414l3.394 3.394l-1.414 1.414zM16 30c-.5 0-1-.2-1.4-.6l-2.3-2.3l1.4-1.4L16 28l2.3-2.3l1.4 1.4l-2.3 2.3c-.4.4-.9.6-1.4.6m4.293-6.303l3.394-3.394l1.414 1.414l-3.394 3.394zM27.1 19.7l-1.4-1.4L28 16l-2.3-2.3l1.4-1.4l2.3 2.3c.4.4.6.9.6 1.4s-.2 1-.6 1.4zM20.303 8.313l1.414-1.414l3.394 3.394l-1.414 1.414zM16 2c-.5 0-1 .2-1.4.6l-2.3 2.3l1.4 1.4L16 4l2.3 2.3l1.4-1.4l-2.3-2.3C17 2.2 16.5 2 16 2\"/>"},"sun":{"body":"<path fill=\"currentColor\" d=\"M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6M5.394 6.813L6.81 5.399l3.505 3.506L8.9 10.319zM2 15.005h5v2H2zm3.394 10.193L8.9 21.692l1.414 1.414l-3.505 3.506zM15 25.005h2v5h-2zm6.687-1.9l1.414-1.414l3.506 3.506l-1.414 1.414zm3.313-8.1h5v2h-5zm-3.313-6.101l3.506-3.506l1.414 1.414l-3.506 3.506zM15 2.005h2v5h-2z\"/>"},"text-color":{"body":"<path fill=\"currentColor\" d=\"M22 21h2L17 4h-2L8 21h2l1.61-4h8.74Zm-9.57-6l3.44-8.37h.26L19.54 15ZM6 24h20v4H6z\"/>"},"text-font":{"body":"<path fill=\"currentColor\" d=\"M25 12h-5v2h5a1 1 0 0 1 1 1v2h-4a3.003 3.003 0 0 0-3 3v1a3.003 3.003 0 0 0 3 3h6v-9a3.003 3.003 0 0 0-3-3m-3 10a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h4v3Zm-6 2h2L12 7h-2L4 24h2l1.694-5h6.613Zm-7.629-7l2.497-7.371h.266L13.63 17Z\"/>"},"trash-can":{"body":"<path fill=\"currentColor\" d=\"M12 12h2v12h-2zm6 0h2v12h-2z\"/><path fill=\"currentColor\" d=\"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6Zm4 22V8h16v20Zm4-26h8v2h-8z\"/>"},"view":{"body":"<path fill=\"currentColor\" d=\"M30.94 15.66A16.69 16.69 0 0 0 16 5A16.69 16.69 0 0 0 1.06 15.66a1 1 0 0 0 0 .68A16.69 16.69 0 0 0 16 27a16.69 16.69 0 0 0 14.94-10.66a1 1 0 0 0 0-.68M16 25c-5.3 0-10.9-3.93-12.93-9C5.1 10.93 10.7 7 16 7s10.9 3.93 12.93 9C26.9 21.07 21.3 25 16 25\"/><path fill=\"currentColor\" d=\"M16 10a6 6 0 1 0 6 6a6 6 0 0 0-6-6m0 10a4 4 0 1 1 4-4a4 4 0 0 1-4 4\"/>"},"view-off":{"body":"<path fill=\"currentColor\" d=\"m5.24 22.51l1.43-1.42A14.06 14.06 0 0 1 3.07 16C5.1 10.93 10.7 7 16 7a12.4 12.4 0 0 1 4 .72l1.55-1.56A14.7 14.7 0 0 0 16 5A16.69 16.69 0 0 0 1.06 15.66a1 1 0 0 0 0 .68a16 16 0 0 0 4.18 6.17\"/><path fill=\"currentColor\" d=\"M12 15.73a4 4 0 0 1 3.7-3.7l1.81-1.82a6 6 0 0 0-7.33 7.33Zm18.94-.07a16.4 16.4 0 0 0-5.74-7.44L30 3.41L28.59 2L2 28.59L3.41 30l5.1-5.1A15.3 15.3 0 0 0 16 27a16.69 16.69 0 0 0 14.94-10.66a1 1 0 0 0 0-.68M20 16a4 4 0 0 1-6 3.44L19.44 14a4 4 0 0 1 .56 2m-4 9a13.05 13.05 0 0 1-6-1.58l2.54-2.54a6 6 0 0 0 8.35-8.35l2.87-2.87A14.54 14.54 0 0 1 28.93 16C26.9 21.07 21.3 25 16 25\"/>"},"warning-alt":{"body":"<path fill=\"currentColor\" d=\"M16 23a1.5 1.5 0 1 0 1.5 1.5A1.5 1.5 0 0 0 16 23m-1-11h2v9h-2z\"/><path fill=\"currentColor\" d=\"M29 30H3a1 1 0 0 1-.887-1.461l13-25a1 1 0 0 1 1.774 0l13 25A1 1 0 0 1 29 30M4.65 28h22.7l.001-.003L16.002 6.17h-.004L4.648 27.997Z\"/>"}},"lastModified":1785496919,"aliases":{"software-resource-resource":{"parent":"software-resource-reference"}},"width":32,"height":32},
5
+ {"prefix":"carbon","icons":{"add-alt":{"body":"<path fill=\"currentColor\" d=\"M16 4c6.6 0 12 5.4 12 12s-5.4 12-12 12S4 22.6 4 16S9.4 4 16 4m0-2C8.3 2 2 8.3 2 16s6.3 14 14 14s14-6.3 14-14S23.7 2 16 2\"/><path fill=\"currentColor\" d=\"M24 15h-7V8h-2v7H8v2h7v7h2v-7h7z\"/>"},"area":{"body":"<path fill=\"currentColor\" d=\"M27 22.142V9.858A3.992 3.992 0 1 0 22.142 5H9.858A3.992 3.992 0 1 0 5 9.858v12.284A3.992 3.992 0 1 0 9.858 27h12.284A3.992 3.992 0 1 0 27 22.142M26 4a2 2 0 1 1-2 2a2 2 0 0 1 2-2M4 6a2 2 0 1 1 2 2a2 2 0 0 1-2-2m2 22a2 2 0 1 1 2-2a2 2 0 0 1-2 2m16.142-3H9.858A4 4 0 0 0 7 22.142V9.858A4 4 0 0 0 9.858 7h12.284A4 4 0 0 0 25 9.858v12.284A3.99 3.99 0 0 0 22.142 25M26 28a2 2 0 1 1 2-2a2.003 2.003 0 0 1-2 2\"/>"},"audio-console":{"body":"<path fill=\"currentColor\" d=\"M28 14.005h-1v-12h-2v12h-1a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h1v10h2v-10h1a2.003 2.003 0 0 0 2-2v-2a2 2 0 0 0-2-2m0 4h-4v-2h4Zm-10-12h-1v-4h-2v4h-1a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h1v18h2v-18h1a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2m0 4h-4v-2h4Zm-10 10H7v-18H5v18H4a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h1v4h2v-4h1a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2m0 4H4v-2h4Z\"/>"},"caret-down":{"body":"<path fill=\"currentColor\" d=\"m24 12l-8 10l-8-10z\"/>"},"caret-right":{"body":"<path fill=\"currentColor\" d=\"m12 8l10 8l-10 8z\"/>"},"checkbox":{"body":"<path fill=\"currentColor\" d=\"M26 4H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2M6 26V6h20v20Z\"/>"},"checkmark":{"body":"<path fill=\"currentColor\" d=\"m13 24l-9-9l1.414-1.414L13 21.171L26.586 7.586L28 9z\"/>"},"chevron-down":{"body":"<path fill=\"currentColor\" d=\"M16 22L6 12l1.4-1.4l8.6 8.6l8.6-8.6L26 12z\"/>"},"chevron-right":{"body":"<path fill=\"currentColor\" d=\"M22 16L12 26l-1.4-1.4l8.6-8.6l-8.6-8.6L12 6z\"/>"},"chevron-sort":{"body":"<path fill=\"currentColor\" d=\"m16 28l-7-7l1.41-1.41L16 25.17l5.59-5.58L23 21zm0-24l7 7l-1.41 1.41L16 6.83l-5.59 5.58L9 11z\"/>"},"close":{"body":"<path fill=\"currentColor\" d=\"M17.414 16L24 9.414L22.586 8L16 14.586L9.414 8L8 9.414L14.586 16L8 22.586L9.414 24L16 17.414L22.586 24L24 22.586z\"/>"},"code":{"body":"<path fill=\"currentColor\" d=\"m31 16l-7 7l-1.41-1.41L28.17 16l-5.58-5.59L24 9zM1 16l7-7l1.41 1.41L3.83 16l5.58 5.59L8 23zm11.42 9.484L17.64 6l1.932.517L14.352 26z\"/>"},"code-hide":{"body":"<path fill=\"currentColor\" d=\"m17.713 13.471l1.863-6.953L17.645 6l-1.565 5.838zm6.494 6.494l1.414 1.414L31 16l-7-7l-1.414 1.414L28.172 16zM30 28.586L3.414 2L2 3.414l5.793 5.793L1 16l7 7l1.414-1.414L3.828 16l5.379-5.379l5.677 5.677l-2.461 9.184l1.932.518l2.162-8.069L28.586 30z\"/>"},"color-palette":{"body":"<circle cx=\"10\" cy=\"12\" r=\"2\" fill=\"currentColor\"/><circle cx=\"16\" cy=\"9\" r=\"2\" fill=\"currentColor\"/><circle cx=\"22\" cy=\"12\" r=\"2\" fill=\"currentColor\"/><circle cx=\"23\" cy=\"18\" r=\"2\" fill=\"currentColor\"/><circle cx=\"19\" cy=\"23\" r=\"2\" fill=\"currentColor\"/><path fill=\"currentColor\" d=\"M16.54 2A14 14 0 0 0 2 16a4.82 4.82 0 0 0 6.09 4.65l1.12-.31a3 3 0 0 1 3.79 2.9V27a3 3 0 0 0 3 3a14 14 0 0 0 14-14.54A14.05 14.05 0 0 0 16.54 2m8.11 22.31A11.93 11.93 0 0 1 16 28a1 1 0 0 1-1-1v-3.76a5 5 0 0 0-5-5a5 5 0 0 0-1.33.18l-1.12.31A2.82 2.82 0 0 1 4 16A12 12 0 0 1 16.47 4A12.18 12.18 0 0 1 28 15.53a11.9 11.9 0 0 1-3.35 8.79Z\"/>"},"condition-wait-point":{"body":"<path fill=\"currentColor\" d=\"m8 16l8-8l8 8l-8 8z\"/><path fill=\"currentColor\" d=\"M16 4A12 12 0 1 1 4 16A12.014 12.014 0 0 1 16 4m0-2a14 14 0 1 0 14 14A14 14 0 0 0 16 2\"/>"},"copy-file":{"body":"<path fill=\"currentColor\" d=\"m27.4 14.7l-6.1-6.1C21 8.2 20.5 8 20 8h-8c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V16.1c0-.5-.2-1-.6-1.4M20 10l5.9 6H20zm-8 18V10h6v6c0 1.1.9 2 2 2h6v10z\"/><path fill=\"currentColor\" d=\"M6 18H4V4c0-1.1.9-2 2-2h14v2H6z\"/>"},"cube":{"body":"<path fill=\"currentColor\" d=\"m28.504 8.136l-12-7a1 1 0 0 0-1.008 0l-12 7A1 1 0 0 0 3 9v14a1 1 0 0 0 .496.864l12 7a1 1 0 0 0 1.008 0l12-7A1 1 0 0 0 29 23V9a1 1 0 0 0-.496-.864M16 3.158L26.016 9L16 14.842L5.984 9ZM5 10.74l10 5.833V28.26L5 22.426Zm12 17.52V16.574l10-5.833v11.685Z\"/>"},"cube-view":{"body":"<circle cx=\"16\" cy=\"16\" r=\"2\" fill=\"currentColor\"/><path fill=\"currentColor\" d=\"M23.777 15.479A8.64 8.64 0 0 0 16 10a8.64 8.64 0 0 0-7.777 5.479L8 16l.223.522A8.64 8.64 0 0 0 16 22a8.64 8.64 0 0 0 7.777-5.478L24 16ZM16 20a4 4 0 1 1 4-4a4.005 4.005 0 0 1-4 4\"/><path fill=\"currentColor\" d=\"m28.504 8.136l-12-7a1 1 0 0 0-1.008 0l-12 7A1 1 0 0 0 3 9v14a1 1 0 0 0 .496.864l12 7a1 1 0 0 0 1.008 0l12-7A1 1 0 0 0 29 23V9a1 1 0 0 0-.496-.864M27 22.426l-11 6.416l-11-6.416V9.574l11-6.416l11 6.416Z\"/>"},"data-vis-1":{"body":"<path fill=\"currentColor\" d=\"M26 22a3.96 3.96 0 0 0-2.02.567l-3.813-3.814a4.965 4.965 0 0 0 0-5.506l2.547-2.547A3.028 3.028 0 1 0 21.3 9.286l-2.547 2.547a4.965 4.965 0 0 0-5.506 0L9.433 8.019A3.96 3.96 0 0 0 10 6a4 4 0 1 0-4 4a3.96 3.96 0 0 0 2.02-.567l3.813 3.814a4.965 4.965 0 0 0 0 5.506l-3.814 3.814A3.96 3.96 0 0 0 6 22a4 4 0 1 0 4 4a3.96 3.96 0 0 0-.567-2.02l3.814-3.813a5 5 0 0 0 1.753.732v3.285a3 3 0 1 0 2 0v-3.285a5 5 0 0 0 1.753-.732l3.814 3.814A3.96 3.96 0 0 0 22 26a4 4 0 1 0 4-4m-10-9a3 3 0 1 1-3 3a3.003 3.003 0 0 1 3-3M4 6a2 2 0 1 1 2 2a2 2 0 0 1-2-2m2 22a2 2 0 1 1 2-2a2 2 0 0 1-2 2m20 0a2 2 0 1 1 2-2a2.003 2.003 0 0 1-2 2\"/>"},"devices":{"body":"<path fill=\"currentColor\" d=\"M10 30H4a2 2 0 0 1-2-2V16a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2M4 16v12h6V16Z\"/><path fill=\"currentColor\" d=\"M28 4H6a2 2 0 0 0-2 2v6h2V6h22v14H14v2h2v4h-2v2h9v-2h-5v-4h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2\"/>"},"document":{"body":"<path fill=\"currentColor\" d=\"m25.7 9.3l-7-7c-.2-.2-.4-.3-.7-.3H8c-1.1 0-2 .9-2 2v24c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V10c0-.3-.1-.5-.3-.7M18 4.4l5.6 5.6H18zM24 28H8V4h8v6c0 1.1.9 2 2 2h6z\"/><path fill=\"currentColor\" d=\"M10 22h12v2H10zm0-6h12v2H10z\"/>"},"document-blank":{"body":"<path fill=\"currentColor\" d=\"m25.7 9.3l-7-7A.9.9 0 0 0 18 2H8a2.006 2.006 0 0 0-2 2v24a2.006 2.006 0 0 0 2 2h16a2.006 2.006 0 0 0 2-2V10a.9.9 0 0 0-.3-.7M18 4.4l5.6 5.6H18ZM24 28H8V4h8v6a2.006 2.006 0 0 0 2 2h6Z\"/>"},"document-unknown":{"body":"<circle cx=\"9\" cy=\"28.5\" r=\"1.5\" fill=\"currentColor\"/><path fill=\"currentColor\" d=\"M10 25H8v-4h2a2 2 0 0 0 0-4H8a2 2 0 0 0-2 2v.5H4V19a4.005 4.005 0 0 1 4-4h2a4 4 0 0 1 0 8Z\"/><path fill=\"currentColor\" d=\"m27.7 9.3l-7-7A.9.9 0 0 0 20 2H10a2.006 2.006 0 0 0-2 2v8h2V4h8v6a2.006 2.006 0 0 0 2 2h6v16H14v2h12a2.006 2.006 0 0 0 2-2V10a.91.91 0 0 0-.3-.7M20 10V4.4l5.6 5.6Z\"/>"},"edit":{"body":"<path fill=\"currentColor\" d=\"M2 26h28v2H2zM25.4 9c.8-.8.8-2 0-2.8l-3.6-3.6c-.8-.8-2-.8-2.8 0l-15 15V24h6.4zm-5-5L24 7.6l-3 3L17.4 7zM6 22v-3.6l10-10l3.6 3.6l-10 10z\"/>"},"erase":{"body":"<path fill=\"currentColor\" d=\"M7 27h23v2H7zm20.38-16.49l-7.93-7.92a2 2 0 0 0-2.83 0l-14 14a2 2 0 0 0 0 2.83L7.13 24h9.59l10.66-10.66a2 2 0 0 0 0-2.83M15.89 22H8l-4-4l6.31-6.31l7.93 7.92Zm3.76-3.76l-7.92-7.93L18 4l8 7.93Z\"/>"},"event-schedule":{"body":"<path fill=\"currentColor\" d=\"M21 30a8 8 0 1 1 8-8a8 8 0 0 1-8 8m0-14a6 6 0 1 0 6 6a6 6 0 0 0-6-6\"/><path fill=\"currentColor\" d=\"M22.59 25L20 22.41V18h2v3.59l2 2z\"/><path fill=\"currentColor\" d=\"M28 6a2 2 0 0 0-2-2h-4V2h-2v2h-8V2h-2v2H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h4v-2H6V6h4v2h2V6h8v2h2V6h4v6h2Z\"/>"},"flash":{"body":"<path fill=\"currentColor\" d=\"M11.61 29.92a1 1 0 0 1-.6-1.07L12.83 17H8a1 1 0 0 1-1-1.23l3-13A1 1 0 0 1 11 2h10a1 1 0 0 1 .78.37a1 1 0 0 1 .2.85L20.25 11H25a1 1 0 0 1 .9.56a1 1 0 0 1-.11 1l-13 17A1 1 0 0 1 12 30a1.1 1.1 0 0 1-.39-.08M17.75 13l2-9H11.8L9.26 15h5.91l-1.59 10.28L23 13Z\"/>"},"help":{"body":"<path fill=\"currentColor\" d=\"M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2m0 26a12 12 0 1 1 12-12a12 12 0 0 1-12 12\"/><circle cx=\"16\" cy=\"23.5\" r=\"1.5\" fill=\"currentColor\"/><path fill=\"currentColor\" d=\"M17 8h-1.5a4.49 4.49 0 0 0-4.5 4.5v.5h2v-.5a2.5 2.5 0 0 1 2.5-2.5H17a2.5 2.5 0 0 1 0 5h-2v4.5h2V17a4.5 4.5 0 0 0 0-9\"/>"},"launch":{"body":"<path fill=\"currentColor\" d=\"M26 28H6a2.003 2.003 0 0 1-2-2V6a2.003 2.003 0 0 1 2-2h10v2H6v20h20V16h2v10a2.003 2.003 0 0 1-2 2\"/><path fill=\"currentColor\" d=\"M20 2v2h6.586L18 12.586L19.414 14L28 5.414V12h2V2z\"/>"},"moon":{"body":"<path fill=\"currentColor\" d=\"M13.503 5.414a15.076 15.076 0 0 0 11.593 18.194a11.1 11.1 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1 1 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.07 13.07 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3\"/>"},"open-panel-filled-bottom":{"body":"<path fill=\"currentColor\" d=\"M28 4H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 2v12H4V6Z\"/>"},"open-panel-filled-left":{"body":"<path fill=\"currentColor\" d=\"M28 4H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 22H12V6h16Z\"/>"},"open-panel-filled-right":{"body":"<path fill=\"currentColor\" d=\"M28 4H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2M4 6h16v20H4Z\"/>"},"pan-horizontal":{"body":"<path fill=\"currentColor\" d=\"m24 10l-1.414 1.414L26.172 15H5.828l3.586-3.586L8 10l-6 6l6 6l1.414-1.414L5.828 17h20.344l-3.586 3.586L24 22l6-6z\"/>"},"pan-vertical":{"body":"<path fill=\"currentColor\" d=\"m10 8l1.414 1.414L15 5.828v20.344l-3.586-3.586L10 24l6 6l6-6l-1.414-1.414L17 26.172V5.828l3.586 3.586L22 8l-6-6z\"/>"},"panel-expansion":{"body":"<path fill=\"currentColor\" d=\"M12 6H6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2m-6 8V8h6v6Zm20-8h-6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2m-6 18V8h6v16Z\"/>"},"reset":{"body":"<path fill=\"currentColor\" d=\"M18 28A12 12 0 1 0 6 16v6.2l-3.6-3.6L1 20l6 6l6-6l-1.4-1.4L8 22.2V16a10 10 0 1 1 10 10Z\"/>"},"save":{"body":"<path fill=\"currentColor\" d=\"m27.71 9.29l-5-5A1 1 0 0 0 22 4H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V10a1 1 0 0 0-.29-.71M12 6h8v4h-8Zm8 20h-8v-8h8Zm2 0v-8a2 2 0 0 0-2-2h-8a2 2 0 0 0-2 2v8H6V6h4v4a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V6.41l4 4V26Z\"/>"},"screen":{"body":"<path fill=\"currentColor\" d=\"M28 4H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h8v4H8v2h16v-2h-4v-4h8a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2M18 28h-4v-4h4Zm10-6H4V6h24Z\"/>"},"script-reference":{"body":"<path fill=\"currentColor\" d=\"M4 20v2h4.586L2 28.586L3.414 30L10 23.414V28h2v-8zm23.17 6l-2.58 2.58L26 30l4-4l-4-4l-1.42 1.41zm-8.34 0l2.58-2.58L20 22l-4 4l4 4l1.42-1.41zM25.7 9.3l-7-7A.9.9 0 0 0 18 2H8a2.006 2.006 0 0 0-2 2v12h2V4h8v6a2.006 2.006 0 0 0 2 2h6v6h2v-8a.91.91 0 0 0-.3-.7M18 10V4.4l5.6 5.6Z\"/>"},"search":{"body":"<path fill=\"currentColor\" d=\"m29 27.586l-7.552-7.552a11.018 11.018 0 1 0-1.414 1.414L27.586 29ZM4 13a9 9 0 1 1 9 9a9.01 9.01 0 0 1-9-9\"/>"},"shape-except":{"body":"<path fill=\"currentColor\" d=\"M28 10h-6V4a2 2 0 0 0-2-2H4a2.003 2.003 0 0 0-2 2v16a2.003 2.003 0 0 0 2 2h6v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V12a2 2 0 0 0-2-2M12 20v-8h8v8ZM3.999 4H20v6h-8a2 2 0 0 0-2 2v8H4Z\"/>"},"software-resource-reference":{"body":"<path fill=\"currentColor\" d=\"m6.899 10.283l3.394-3.394l1.414 1.414l-3.394 3.394zM4.9 19.7l-2.3-2.3C2.2 17 2 16.5 2 16s.2-1 .6-1.4l2.3-2.3l1.4 1.4L4 16l2.3 2.3zm1.989 2.007l1.414-1.414l3.394 3.394l-1.414 1.414zM16 30c-.5 0-1-.2-1.4-.6l-2.3-2.3l1.4-1.4L16 28l2.3-2.3l1.4 1.4l-2.3 2.3c-.4.4-.9.6-1.4.6m4.293-6.303l3.394-3.394l1.414 1.414l-3.394 3.394zM27.1 19.7l-1.4-1.4L28 16l-2.3-2.3l1.4-1.4l2.3 2.3c.4.4.6.9.6 1.4s-.2 1-.6 1.4zM20.303 8.313l1.414-1.414l3.394 3.394l-1.414 1.414zM16 2c-.5 0-1 .2-1.4.6l-2.3 2.3l1.4 1.4L16 4l2.3 2.3l1.4-1.4l-2.3-2.3C17 2.2 16.5 2 16 2\"/>"},"sun":{"body":"<path fill=\"currentColor\" d=\"M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6M5.394 6.813L6.81 5.399l3.505 3.506L8.9 10.319zM2 15.005h5v2H2zm3.394 10.193L8.9 21.692l1.414 1.414l-3.505 3.506zM15 25.005h2v5h-2zm6.687-1.9l1.414-1.414l3.506 3.506l-1.414 1.414zm3.313-8.1h5v2h-5zm-3.313-6.101l3.506-3.506l1.414 1.414l-3.506 3.506zM15 2.005h2v5h-2z\"/>"},"text-color":{"body":"<path fill=\"currentColor\" d=\"M22 21h2L17 4h-2L8 21h2l1.61-4h8.74Zm-9.57-6l3.44-8.37h.26L19.54 15ZM6 24h20v4H6z\"/>"},"text-font":{"body":"<path fill=\"currentColor\" d=\"M25 12h-5v2h5a1 1 0 0 1 1 1v2h-4a3.003 3.003 0 0 0-3 3v1a3.003 3.003 0 0 0 3 3h6v-9a3.003 3.003 0 0 0-3-3m-3 10a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h4v3Zm-6 2h2L12 7h-2L4 24h2l1.694-5h6.613Zm-7.629-7l2.497-7.371h.266L13.63 17Z\"/>"},"trash-can":{"body":"<path fill=\"currentColor\" d=\"M12 12h2v12h-2zm6 0h2v12h-2z\"/><path fill=\"currentColor\" d=\"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6Zm4 22V8h16v20Zm4-26h8v2h-8z\"/>"},"view":{"body":"<path fill=\"currentColor\" d=\"M30.94 15.66A16.69 16.69 0 0 0 16 5A16.69 16.69 0 0 0 1.06 15.66a1 1 0 0 0 0 .68A16.69 16.69 0 0 0 16 27a16.69 16.69 0 0 0 14.94-10.66a1 1 0 0 0 0-.68M16 25c-5.3 0-10.9-3.93-12.93-9C5.1 10.93 10.7 7 16 7s10.9 3.93 12.93 9C26.9 21.07 21.3 25 16 25\"/><path fill=\"currentColor\" d=\"M16 10a6 6 0 1 0 6 6a6 6 0 0 0-6-6m0 10a4 4 0 1 1 4-4a4 4 0 0 1-4 4\"/>"},"view-off":{"body":"<path fill=\"currentColor\" d=\"m5.24 22.51l1.43-1.42A14.06 14.06 0 0 1 3.07 16C5.1 10.93 10.7 7 16 7a12.4 12.4 0 0 1 4 .72l1.55-1.56A14.7 14.7 0 0 0 16 5A16.69 16.69 0 0 0 1.06 15.66a1 1 0 0 0 0 .68a16 16 0 0 0 4.18 6.17\"/><path fill=\"currentColor\" d=\"M12 15.73a4 4 0 0 1 3.7-3.7l1.81-1.82a6 6 0 0 0-7.33 7.33Zm18.94-.07a16.4 16.4 0 0 0-5.74-7.44L30 3.41L28.59 2L2 28.59L3.41 30l5.1-5.1A15.3 15.3 0 0 0 16 27a16.69 16.69 0 0 0 14.94-10.66a1 1 0 0 0 0-.68M20 16a4 4 0 0 1-6 3.44L19.44 14a4 4 0 0 1 .56 2m-4 9a13.05 13.05 0 0 1-6-1.58l2.54-2.54a6 6 0 0 0 8.35-8.35l2.87-2.87A14.54 14.54 0 0 1 28.93 16C26.9 21.07 21.3 25 16 25\"/>"},"warning-alt":{"body":"<path fill=\"currentColor\" d=\"M16 23a1.5 1.5 0 1 0 1.5 1.5A1.5 1.5 0 0 0 16 23m-1-11h2v9h-2z\"/><path fill=\"currentColor\" d=\"M29 30H3a1 1 0 0 1-.887-1.461l13-25a1 1 0 0 1 1.774 0l13 25A1 1 0 0 1 29 30M4.65 28h22.7l.001-.003L16.002 6.17h-.004L4.648 27.997Z\"/>"}},"lastModified":1785496919,"aliases":{"software-resource-resource":{"parent":"software-resource-reference"}},"width":32,"height":32},
6
6
  {"prefix":"fluent","icons":{"text-paragraph-direction-left-16-regular":{"body":"<path fill=\"currentColor\" d=\"M9 3a2.5 2.5 0 0 0 0 5h1V3zm2 0v10.5a.5.5 0 0 1-1 0V9H9a3.5 3.5 0 1 1 0-7h4.5a.5.5 0 0 1 0 1H13v10.5a.5.5 0 0 1-1 0V3zM3.854 6.146a.5.5 0 0 1 0 .708L2.707 8l1.147 1.146a.5.5 0 1 1-.708.708l-1.5-1.5a.5.5 0 0 1 0-.708l1.5-1.5a.5.5 0 0 1 .708 0\"/>","width":16,"height":16},"text-paragraph-direction-right-16-regular":{"body":"<path fill=\"currentColor\" d=\"M9 3a2.5 2.5 0 0 0 0 5h1V3zm2 0v10.5a.5.5 0 0 1-1 0V9H9a3.5 3.5 0 1 1 0-7h4.5a.5.5 0 0 1 0 1H13v10.5a.5.5 0 0 1-1 0V3zM2.146 6.146a.5.5 0 0 1 .708 0l1.5 1.5a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708-.708L3.293 8L2.146 6.854a.5.5 0 0 1 0-.708\"/>","width":16,"height":16}},"lastModified":1786851660,"width":20,"height":20},
7
7
  {"prefix":"mdi","icons":{"drag-horizontal-variant":{"body":"<path fill=\"currentColor\" d=\"M21 11H3V9h18zm0 2H3v2h18z\"/>"},"drag-vertical-variant":{"body":"<path fill=\"currentColor\" d=\"M11 21H9V3h2zm4-18h-2v18h2z\"/>"},"tailwind":{"body":"<path fill=\"currentColor\" d=\"M12 6c-2.67 0-4.33 1.33-5 4c1-1.33 2.17-1.83 3.5-1.5c.76.19 1.31.74 1.91 1.35c.98 1 2.09 2.15 4.59 2.15c2.67 0 4.33-1.33 5-4c-1 1.33-2.17 1.83-3.5 1.5c-.76-.19-1.3-.74-1.91-1.35C15.61 7.15 14.5 6 12 6m-5 6c-2.67 0-4.33 1.33-5 4c1-1.33 2.17-1.83 3.5-1.5c.76.19 1.3.74 1.91 1.35C8.39 16.85 9.5 18 12 18c2.67 0 4.33-1.33 5-4c-1 1.33-2.17 1.83-3.5 1.5c-.76-.19-1.3-.74-1.91-1.35C10.61 13.15 9.5 12 7 12\"/>"}},"lastModified":1737398331,"width":24,"height":24},
8
8
  {"prefix":"ri","icons":{"add-line":{"body":"<path fill=\"currentColor\" d=\"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z\"/>"},"subtract-line":{"body":"<path fill=\"currentColor\" d=\"M5 11v2h14v-2z\"/>"}},"lastModified":1770712905,"width":24,"height":24},
@@ -105,6 +105,9 @@ function isMatchingShortcut(shortcut: KeyboardShortcut): boolean {
105
105
  function isMatchingCombination(combination: string): boolean {
106
106
  const splitted = combination.split('+').map(key => key.trim())
107
107
  const targetKey = splitted.pop()
108
+ // `split` always yields at least one element, so this is unreachable for any
109
+ // real combination — an empty or blank one matches nothing, which is right.
110
+ if (!targetKey) return false
108
111
  for (const mod in modifiers) {
109
112
  const containsMod = splitted.includes(mod)
110
113
  const isPressed = modifiers[mod].pressed
@@ -70,8 +70,12 @@ export function mapVariant(variant: Variant, existingVariant?: Variant): Variant
70
70
  _hPropState: {},
71
71
  _hPropDefs: {},
72
72
  }),
73
- setupApp: null,
74
- slots: () => ({}),
73
+ setupApp: undefined,
74
+ // The three keys `Variant` declares, absent rather than missing: a
75
+ // variant created here defines no slots, and consumers read them
76
+ // with `||`. `Story.slots` is `() => any`, which is why the same
77
+ // literal above needs nothing.
78
+ slots: () => ({ default: undefined, controls: undefined, source: undefined }),
75
79
  previewReady: false,
76
80
  }
77
81
  }