@poveste/app 0.13.1 → 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 (89) hide show
  1. package/dist/bundled/App.vue_vue_type_script_setup_true_lang.js +1 -1
  2. package/dist/bundled/app.css +16 -16
  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/BaseOverflowMenu.vue_vue_type_script_setup_true_lang.js +5 -2
  10. package/dist/bundled/components/base/BaseSplitPane.js +1 -1
  11. package/dist/bundled/components/base/BaseSplitPane.vue_vue_type_script_setup_true_lang.js +6 -4
  12. package/dist/bundled/components/command/CommandPrompts.vue_vue_type_script_setup_true_lang.js +1 -1
  13. package/dist/bundled/components/command/CommandPromptsModal.vue_vue_type_script_setup_true_lang.js +4 -3
  14. package/dist/bundled/components/command/PromptSelect.vue_vue_type_script_setup_true_lang.js +1 -1
  15. package/dist/bundled/components/command/PromptText.vue_vue_type_script_setup_true_lang.js +1 -1
  16. package/dist/bundled/components/panel/StatePresets.vue_vue_type_script_setup_true_lang.js +30 -20
  17. package/dist/bundled/components/panel/StoryControls.vue_vue_type_script_setup_true_lang.js +1 -1
  18. package/dist/bundled/components/panel/StoryDocs.vue_vue_type_script_setup_true_lang.js +3 -1
  19. package/dist/bundled/components/panel/StoryEvent.vue_vue_type_script_setup_true_lang.js +5 -1
  20. package/dist/bundled/components/panel/StoryEvents.vue_vue_type_script_setup_true_lang.js +2 -1
  21. package/dist/bundled/components/panel/StorySidePanel.vue_vue_type_script_setup_true_lang.js +7 -5
  22. package/dist/bundled/components/panel/StorySourceCode.js +1 -1
  23. package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_script_setup_true_lang.js +3 -2
  24. package/dist/bundled/components/search/SearchPane.vue_vue_type_script_setup_true_lang.js +15 -7
  25. package/dist/bundled/components/story/GenericMountStory.vue_vue_type_script_setup_true_lang.js +2 -1
  26. package/dist/bundled/components/story/GenericRenderStory.vue_vue_type_script_setup_true_lang.js +2 -1
  27. package/dist/bundled/components/story/StoryResponsivePreview.js +1 -1
  28. package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_script_setup_true_lang.js +17 -6
  29. package/dist/bundled/components/story/StoryVariantGrid.js +1 -1
  30. package/dist/bundled/components/story/StoryVariantGrid.vue_vue_type_script_setup_true_lang.js +15 -10
  31. package/dist/bundled/components/story/StoryView.vue_vue_type_script_setup_true_lang.js +3 -2
  32. package/dist/bundled/components/story/StoryViewer.js +1 -1
  33. package/dist/bundled/components/story/StoryViewer.vue_vue_type_script_setup_true_lang.js +3 -3
  34. package/dist/bundled/components/toolbar/ToolbarBackground.vue_vue_type_script_setup_true_lang.js +1 -1
  35. package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue_vue_type_script_setup_true_lang.js +17 -16
  36. package/dist/bundled/plugin.js +4 -3
  37. package/dist/bundled/sandbox.js +2 -2
  38. package/dist/bundled/stores/folder.js +1 -1
  39. package/dist/bundled/util/commands.js +20 -9
  40. package/dist/bundled/util/docs.js +2 -1
  41. package/dist/bundled/util/grid-slots.js +1 -1
  42. package/dist/bundled/util/icons.generated.js +0 -1
  43. package/dist/bundled/util/keyboard.js +1 -0
  44. package/dist/bundled/util/mapping.js +1 -1
  45. package/dist/bundled/util/preview-settings.js +1 -1
  46. package/package.json +5 -5
  47. package/src/app/App.vue +6 -3
  48. package/src/app/components/HomeView.vue +1 -1
  49. package/src/app/components/app/AppLogo.vue +6 -2
  50. package/src/app/components/app/Breadcrumb.vue +2 -1
  51. package/src/app/components/app/TopBar.vue +7 -2
  52. package/src/app/components/base/BaseCheckbox.vue +1 -1
  53. package/src/app/components/base/BaseOverflowMenu.vue +9 -3
  54. package/src/app/components/base/BaseSplitPane.vue +9 -4
  55. package/src/app/components/command/CommandPrompts.vue +1 -1
  56. package/src/app/components/command/CommandPromptsModal.vue +1 -0
  57. package/src/app/components/command/PromptSelect.vue +2 -1
  58. package/src/app/components/command/PromptText.vue +7 -3
  59. package/src/app/components/panel/StatePresets.vue +26 -5
  60. package/src/app/components/panel/StoryControls.vue +1 -1
  61. package/src/app/components/panel/StoryDocs.vue +3 -1
  62. package/src/app/components/panel/StoryEvent.vue +7 -2
  63. package/src/app/components/panel/StoryEvents.vue +4 -1
  64. package/src/app/components/panel/StorySidePanel.vue +2 -0
  65. package/src/app/components/panel/StorySourceCode.vue +6 -3
  66. package/src/app/components/search/SearchPane.vue +14 -5
  67. package/src/app/components/story/GenericMountStory.vue +2 -1
  68. package/src/app/components/story/GenericRenderStory.vue +2 -1
  69. package/src/app/components/story/StoryResponsivePreview.vue +30 -5
  70. package/src/app/components/story/StoryVariantGrid.vue +33 -16
  71. package/src/app/components/story/StoryView.vue +7 -3
  72. package/src/app/components/story/StoryViewer.vue +3 -3
  73. package/src/app/components/toolbar/ToolbarBackground.vue +1 -1
  74. package/src/app/components/toolbar/ToolbarResponsiveSize.vue +23 -3
  75. package/src/app/plugin.ts +7 -3
  76. package/src/app/sandbox.ts +1 -1
  77. package/src/app/stores/folder.ts +1 -1
  78. package/src/app/types.ts +2 -2
  79. package/src/app/util/commands.ts +26 -16
  80. package/src/app/util/docs.ts +2 -1
  81. package/src/app/util/grid-slots.ts +1 -1
  82. package/src/app/util/icons.generated.ts +1 -1
  83. package/src/app/util/keyboard.ts +3 -0
  84. package/src/app/util/mapping.ts +1 -1
  85. package/src/app/util/preview-settings.ts +1 -1
  86. package/src/app/util/scroll.ts +5 -1
  87. package/src/app/util/state.ts +1 -1
  88. package/src/app/util/variant.ts +4 -1
  89. package/src/app/components/base/BaseCopyIcon.vue +0 -34
@@ -51,7 +51,7 @@ var App_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompon
51
51
  tree$1.value = newTree;
52
52
  });
53
53
  const stories = computed(() => files$1.value.reduce((acc, file) => {
54
- acc.push(file.story);
54
+ if (file.story) acc.push(file.story);
55
55
  return acc;
56
56
  }, []));
57
57
  const storyStore = useStoryStore();
@@ -12,8 +12,8 @@
12
12
  }
13
13
  }
14
14
  @scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
15
- .bind-icon-color[data-v-64e4f50b] {
16
- color: var(--v6ab8d98a);
15
+ .bind-icon-color[data-v-d524f876] {
16
+ color: var(--v1c581d20);
17
17
  }
18
18
  }
19
19
  @scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
@@ -22,28 +22,28 @@
22
22
  }
23
23
  }
24
24
  @scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
25
- .landscape > div > .dragger[data-v-6a9b0727] {
25
+ .landscape > div > .dragger[data-v-1e09b1b3] {
26
26
  width: .625rem;
27
27
  }
28
- .portrait > div > .dragger[data-v-6a9b0727] {
28
+ .portrait > div > .dragger[data-v-1e09b1b3] {
29
29
  height: .625rem;
30
30
  }
31
- .landscape > div > .dragger.dragger-offset-before[data-v-6a9b0727] {
31
+ .landscape > div > .dragger.dragger-offset-before[data-v-1e09b1b3] {
32
32
  right: 0;
33
33
  }
34
- .portrait > div > .dragger.dragger-offset-before[data-v-6a9b0727] {
34
+ .portrait > div > .dragger.dragger-offset-before[data-v-1e09b1b3] {
35
35
  bottom: 0;
36
36
  }
37
- .landscape > div > .dragger.dragger-offset-center[data-v-6a9b0727] {
37
+ .landscape > div > .dragger.dragger-offset-center[data-v-1e09b1b3] {
38
38
  right: -.3125rem;
39
39
  }
40
- .portrait > div > .dragger.dragger-offset-center[data-v-6a9b0727] {
40
+ .portrait > div > .dragger.dragger-offset-center[data-v-1e09b1b3] {
41
41
  bottom: -.3125rem;
42
42
  }
43
- .landscape > div > .dragger.dragger-offset-after[data-v-6a9b0727] {
43
+ .landscape > div > .dragger.dragger-offset-after[data-v-1e09b1b3] {
44
44
  right: -.625rem;
45
45
  }
46
- .portrait > div > .dragger.dragger-offset-after[data-v-6a9b0727] {
46
+ .portrait > div > .dragger.dragger-offset-after[data-v-1e09b1b3] {
47
47
  bottom: -.625rem;
48
48
  }
49
49
  }
@@ -87,7 +87,7 @@
87
87
  }
88
88
  }
89
89
  @scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
90
- .__poveste-code-placeholder[data-v-6de9e107] {
90
+ .__poveste-code-placeholder[data-v-ec6c2034] {
91
91
  color: inherit;
92
92
  font-size: inherit;
93
93
  }
@@ -102,8 +102,8 @@
102
102
  }
103
103
  }
104
104
  @scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
105
- .bind-preview-bg[data-v-380b627d] {
106
- background-color: var(--v0cb511a0);
105
+ .bind-preview-bg[data-v-d3057f34] {
106
+ background-color: var(--v372ee944);
107
107
  }
108
108
  }
109
109
  @scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
@@ -118,7 +118,7 @@
118
118
  /* Cells are placed with `order`, so without this Tab and a screen reader walk
119
119
  them in slot order — the order they were recycled in, not the screen's.
120
120
  Chromium only for now; elsewhere the rule is ignored. */
121
- .poveste-story-variant-grid-cells[data-v-5f7bc1e1] {
121
+ .poveste-story-variant-grid-cells[data-v-a753c25f] {
122
122
  reading-flow: grid-order;
123
123
  }
124
124
  }
@@ -133,8 +133,8 @@
133
133
  }
134
134
  }
135
135
  @scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
136
- .bind-icon-color[data-v-d5a7fe4c] {
137
- color: var(--v4fc4017e);
136
+ .bind-icon-color[data-v-5e1183de] {
137
+ color: var(--v96d17610);
138
138
  }
139
139
  }
140
140
  @scope (:root) to (.__poveste-render-story:not(.__poveste-render-custom-controls)) {
@@ -14,7 +14,7 @@ var _hoisted_3 = {
14
14
  var HomeView_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
15
15
  __name: "HomeView",
16
16
  setup(__props) {
17
- const logoUrl = computed(() => povesteConfig.theme?.logo?.square ? customLogos.square : poveste_default);
17
+ const logoUrl = computed(() => povesteConfig.theme?.logo?.square ? customLogos?.square ?? "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'%20width='512'%20height='512'%20fill='none'%3e%3cdefs%3e%3clinearGradient%20id='pv'%20x1='96'%20y1='416'%20x2='416'%20y2='96'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2324C56A'/%3e%3cstop%20offset='1'%20stop-color='%2317A6C6'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='16'%20y='16'%20width='480'%20height='480'%20rx='112'%20fill='url(%23pv)'/%3e%3crect%20x='140'%20y='142'%20width='232'%20height='44'%20rx='16'%20fill='%23fff'/%3e%3crect%20x='151'%20y='217'%20width='88'%20height='146'%20rx='9'%20stroke='%23fff'%20stroke-width='22'/%3e%3crect%20x='172'%20y='244'%20width='30'%20height='92'%20rx='13'%20fill='%23fff'/%3e%3crect%20x='262'%20y='206'%20width='110'%20height='168'%20rx='20'%20fill='%23fff'/%3e%3crect%20x='284'%20y='226'%20width='66'%20height='58'%20rx='13'%20fill='url(%23pv)'/%3e%3c/svg%3e" : poveste_default);
18
18
  const storyStore = useStoryStore();
19
19
  const stats = computed(() => {
20
20
  let storyCount = 0;
@@ -9,8 +9,8 @@ var AppLogo_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
9
9
  __name: "AppLogo",
10
10
  setup(__props) {
11
11
  const logoUrl = computed(() => {
12
- if (isDark.value) return povesteConfig.theme.logo?.dark ? customLogos.dark : poveste_text_dark_default;
13
- return povesteConfig.theme.logo?.light ? customLogos.light : poveste_text_default;
12
+ if (isDark.value) return povesteConfig.theme.logo?.dark ? customLogos?.dark ?? "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxODcwIDUxMiIgZmlsbD0ibm9uZSI+CiAgPGRlZnM+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9InB2dyIgeDE9Ijk2IiB5MT0iNDE2IiB4Mj0iNDE2IiB5Mj0iOTYiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgPHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjMjRDNTZBIi8+CiAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzE3QTZDNiIvPgogICAgPC9saW5lYXJHcmFkaWVudD4KICA8L2RlZnM+CiAgPHJlY3QgeD0iMTYiIHk9IjE2IiB3aWR0aD0iNDgwIiBoZWlnaHQ9IjQ4MCIgcng9IjExMiIgZmlsbD0idXJsKCNwdncpIi8+CiAgPHJlY3QgeD0iMTQwIiB5PSIxNDIiIHdpZHRoPSIyMzIiIGhlaWdodD0iNDQiIHJ4PSIxNiIgZmlsbD0iI2ZmZiIvPgogIDxyZWN0IHg9IjE1MSIgeT0iMjE3IiB3aWR0aD0iODgiIGhlaWdodD0iMTQ2IiByeD0iOSIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjIyIi8+CiAgPHJlY3QgeD0iMTcyIiB5PSIyNDQiIHdpZHRoPSIzMCIgaGVpZ2h0PSI5MiIgcng9IjEzIiBmaWxsPSIjZmZmIi8+CiAgPHJlY3QgeD0iMjYyIiB5PSIyMDYiIHdpZHRoPSIxMTAiIGhlaWdodD0iMTY4IiByeD0iMjAiIGZpbGw9IiNmZmYiLz4KICA8cmVjdCB4PSIyODQiIHk9IjIyNiIgd2lkdGg9IjY2IiBoZWlnaHQ9IjU4IiByeD0iMTMiIGZpbGw9InVybCgjcHZ3KSIvPgogIDx0ZXh0IHg9IjY3NiIgeT0iMjU2IiBkb21pbmFudC1iYXNlbGluZT0iY2VudHJhbCIgZm9udC1mYW1pbHk9InVpLXNhbnMtc2VyaWYsIHN5c3RlbS11aSwgLWFwcGxlLXN5c3RlbSwgJ1NlZ29lIFVJJywgUm9ib3RvLCBIZWx2ZXRpY2EsIEFyaWFsLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjMyMCIgZm9udC13ZWlnaHQ9IjQwMCIgbGV0dGVyLXNwYWNpbmc9Ii00IiBmaWxsPSIjZjhmYWZjIj5Qb3Zlc3RlPC90ZXh0Pgo8L3N2Zz4K" : poveste_text_dark_default;
13
+ return povesteConfig.theme.logo?.light ? customLogos?.light ?? "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxODcwIDUxMiIgZmlsbD0ibm9uZSI+CiAgPGRlZnM+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9InB2dyIgeDE9Ijk2IiB5MT0iNDE2IiB4Mj0iNDE2IiB5Mj0iOTYiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgPHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjMjRDNTZBIi8+CiAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzE3QTZDNiIvPgogICAgPC9saW5lYXJHcmFkaWVudD4KICA8L2RlZnM+CiAgPHJlY3QgeD0iMTYiIHk9IjE2IiB3aWR0aD0iNDgwIiBoZWlnaHQ9IjQ4MCIgcng9IjExMiIgZmlsbD0idXJsKCNwdncpIi8+CiAgPHJlY3QgeD0iMTQwIiB5PSIxNDIiIHdpZHRoPSIyMzIiIGhlaWdodD0iNDQiIHJ4PSIxNiIgZmlsbD0iI2ZmZiIvPgogIDxyZWN0IHg9IjE1MSIgeT0iMjE3IiB3aWR0aD0iODgiIGhlaWdodD0iMTQ2IiByeD0iOSIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjIyIi8+CiAgPHJlY3QgeD0iMTcyIiB5PSIyNDQiIHdpZHRoPSIzMCIgaGVpZ2h0PSI5MiIgcng9IjEzIiBmaWxsPSIjZmZmIi8+CiAgPHJlY3QgeD0iMjYyIiB5PSIyMDYiIHdpZHRoPSIxMTAiIGhlaWdodD0iMTY4IiByeD0iMjAiIGZpbGw9IiNmZmYiLz4KICA8cmVjdCB4PSIyODQiIHk9IjIyNiIgd2lkdGg9IjY2IiBoZWlnaHQ9IjU4IiByeD0iMTMiIGZpbGw9InVybCgjcHZ3KSIvPgogIDx0ZXh0IHg9IjY3NiIgeT0iMjU2IiBkb21pbmFudC1iYXNlbGluZT0iY2VudHJhbCIgZm9udC1mYW1pbHk9InVpLXNhbnMtc2VyaWYsIHN5c3RlbS11aSwgLWFwcGxlLXN5c3RlbSwgJ1NlZ29lIFVJJywgUm9ib3RvLCBIZWx2ZXRpY2EsIEFyaWFsLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjMyMCIgZm9udC13ZWlnaHQ9IjQwMCIgbGV0dGVyLXNwYWNpbmc9Ii00IiBmaWxsPSIjMWUyOTNiIj5Qb3Zlc3RlPC90ZXh0Pgo8L3N2Zz4K" : poveste_text_default;
14
14
  });
15
15
  const altText = computed(() => `${povesteConfig.theme.title} logo`);
16
16
  return (_ctx, _cache) => {
@@ -2,6 +2,6 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
2
2
  import Breadcrumb_vue_vue_type_script_setup_true_lang_default from "./Breadcrumb.vue_vue_type_script_setup_true_lang.js";
3
3
  /* empty css */
4
4
  //#region src/app/components/app/Breadcrumb.vue
5
- var Breadcrumb_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Breadcrumb_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-64e4f50b"]]);
5
+ var Breadcrumb_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Breadcrumb_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-d524f876"]]);
6
6
  //#endregion
7
7
  export { Breadcrumb_default as default };
@@ -14,11 +14,11 @@ var Breadcrumb_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
14
14
  stories: {}
15
15
  },
16
16
  setup(__props) {
17
- useCssVars((_ctx) => ({ "v6ab8d98a": story.value?.iconColor }));
17
+ useCssVars((_ctx) => ({ "v1c581d20": story.value?.iconColor }));
18
18
  const storyStore = useStoryStore();
19
19
  const story = computed(() => storyStore.currentStory);
20
20
  const folders = computed(() => {
21
- return story.value.file.path.slice(0, -1);
21
+ return story.value?.file?.path.slice(0, -1) ?? [];
22
22
  });
23
23
  const isMenuOpened = ref(false);
24
24
  function openMenu() {
@@ -7,7 +7,7 @@ import ToolbarNewTab_default from "../toolbar/ToolbarNewTab.js";
7
7
  import ToolbarResponsiveSize_default from "../toolbar/ToolbarResponsiveSize.js";
8
8
  import ToolbarTextDirection_default from "../toolbar/ToolbarTextDirection.js";
9
9
  import ToolbarTitle_default from "../toolbar/ToolbarTitle.js";
10
- import { createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, openBlock, unref, withCtx } from "@poveste/vendors/vue";
10
+ import { computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, openBlock, unref, withCtx } from "@poveste/vendors/vue";
11
11
  //#region src/app/components/app/TopBar.vue?vue&type=script&setup=true&lang.ts
12
12
  var _hoisted_1 = { class: "poveste-top-bar flex-none grid grid-cols-[1fr_auto_1fr] items-center h-14 px-4 gap-3" };
13
13
  var _hoisted_2 = { key: 1 };
@@ -19,6 +19,7 @@ var TopBar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
19
19
  },
20
20
  setup(__props) {
21
21
  const storyStore = useStoryStore();
22
+ const editableFile = computed(() => storyStore.currentStory?.file?.filePath);
22
23
  return (_ctx, _cache) => {
23
24
  return openBlock(), createElementBlock("div", _hoisted_1, [
24
25
  createVNode(AppActions_default, {
@@ -49,9 +50,9 @@ var TopBar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
49
50
  variant: unref(storyStore).currentVariant,
50
51
  story: unref(storyStore).currentStory
51
52
  }, null, 8, ["variant", "story"])) : createCommentVNode("", true),
52
- _ctx.__POVESTE_DEV__ ? (openBlock(), createBlock(DevOnlyToolbarOpenInEditor_default, {
53
+ _ctx.__POVESTE_DEV__ && editableFile.value ? (openBlock(), createBlock(DevOnlyToolbarOpenInEditor_default, {
53
54
  key: 2,
54
- file: unref(storyStore).currentStory.file?.filePath,
55
+ file: editableFile.value,
55
56
  tooltip: "Edit story in editor"
56
57
  }, null, 8, ["file"])) : createCommentVNode("", true)
57
58
  ]),
@@ -29,7 +29,7 @@ var BaseCheckbox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
29
29
  const progress = computed(() => props.modelValue ? 1 : 0);
30
30
  const dashoffset = computed(() => (1 - progress.value) * dasharray.value);
31
31
  watch(path, () => {
32
- dasharray.value = path.value.getTotalLength?.() ?? 21.21;
32
+ dasharray.value = path.value?.getTotalLength?.() ?? 21.21;
33
33
  });
34
34
  return (_ctx, _cache) => {
35
35
  return openBlock(), createElementBlock("div", {
@@ -40,12 +40,15 @@ var BaseOverflowMenu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
40
40
  index: props.index
41
41
  });
42
42
  useResizeObserver(el, (entries) => {
43
+ const element = el.value;
44
+ if (!element) return;
43
45
  const width = entries[0].contentRect.width;
44
- if (!children.value.has(el.value)) children.value.set(el.value, state);
46
+ if (!children.value.has(element)) children.value.set(element, state);
45
47
  state.width = width;
46
48
  });
47
49
  onBeforeUnmount(() => {
48
- children.value.delete(el.value);
50
+ const element = el.value;
51
+ if (element) children.value.delete(element);
49
52
  });
50
53
  const visible = computed(() => visibleChildrenCount.value > state.index);
51
54
  return () => h("div", {
@@ -2,6 +2,6 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
2
2
  import BaseSplitPane_vue_vue_type_script_setup_true_lang_default from "./BaseSplitPane.vue_vue_type_script_setup_true_lang.js";
3
3
  /* empty css */
4
4
  //#region src/app/components/base/BaseSplitPane.vue
5
- var BaseSplitPane_default = /*#__PURE__*/ _plugin_vue_export_helper_default(BaseSplitPane_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-6a9b0727"]]);
5
+ var BaseSplitPane_default = /*#__PURE__*/ _plugin_vue_export_helper_default(BaseSplitPane_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-1e09b1b3"]]);
6
6
  //#endregion
7
7
  export { BaseSplitPane_default as default };
@@ -111,12 +111,12 @@ var BaseSplitPane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
111
111
  });
112
112
  const rightStyle = computed(() => {
113
113
  if (!hasBothPanes.value) return { [axis.value]: "100%" };
114
- return { [axis.value]: props.fixed ? null : `${100 - boundSplit.value}%` };
114
+ return { [axis.value]: props.fixed ? void 0 : `${100 - boundSplit.value}%` };
115
115
  });
116
116
  const dragging = ref(false);
117
117
  let startPosition = 0;
118
118
  let startSplit = 0;
119
- const el = ref(null);
119
+ const el = ref();
120
120
  function dragStart(e) {
121
121
  dragging.value = true;
122
122
  startPosition = props.orientation === "landscape" ? e.pageX : e.pageY;
@@ -126,14 +126,16 @@ var BaseSplitPane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
126
126
  }
127
127
  function dragMove(e) {
128
128
  if (dragging.value) {
129
+ const pane = el.value;
130
+ if (!pane) return;
129
131
  let position;
130
132
  let totalSize;
131
133
  if (props.orientation === "landscape") {
132
134
  position = e.pageX;
133
- totalSize = el.value.offsetWidth;
135
+ totalSize = pane.offsetWidth;
134
136
  } else {
135
137
  position = e.pageY;
136
- totalSize = el.value.offsetHeight;
138
+ totalSize = pane.offsetHeight;
137
139
  }
138
140
  const dPosition = position - startPosition;
139
141
  if (props.fixed) currentSplit.value = startSplit + dPosition;
@@ -19,7 +19,7 @@ var CommandPrompts_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
19
19
  select: PromptSelect_default
20
20
  };
21
21
  const answers = reactive({});
22
- for (const prompt of props.command.prompts) {
22
+ for (const prompt of props.command.prompts ?? []) {
23
23
  let defaultValue;
24
24
  if (typeof prompt.defaultValue === "function") defaultValue = prompt.defaultValue(answers);
25
25
  else defaultValue = prompt.defaultValue;
@@ -1,5 +1,5 @@
1
1
  import { useCommandStore } from "../../stores/command.js";
2
- import { createCommentVNode, createElementBlock, createElementVNode, createVNode, defineAsyncComponent, defineComponent, openBlock, unref } from "@poveste/vendors/vue";
2
+ import { createBlock, createCommentVNode, createElementBlock, createElementVNode, defineAsyncComponent, defineComponent, openBlock, unref } from "@poveste/vendors/vue";
3
3
  //#region src/app/components/command/CommandPromptsModal.vue?vue&type=script&setup=true&lang.ts
4
4
  var _hoisted_1 = {
5
5
  key: 0,
@@ -24,10 +24,11 @@ var CommandPromptsModal_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
24
24
  return __props.shown ? (openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", {
25
25
  class: "absolute inset-0",
26
26
  onClick: _cache[0] || (_cache[0] = ($event) => close())
27
- }), createElementVNode("div", _hoisted_2, [createVNode(unref(CommandPrompts), {
27
+ }), createElementVNode("div", _hoisted_2, [unref(commandStore).selectedCommand ? (openBlock(), createBlock(unref(CommandPrompts), {
28
+ key: 0,
28
29
  command: unref(commandStore).selectedCommand,
29
30
  onClose: _cache[1] || (_cache[1] = ($event) => close())
30
- }, null, 8, ["command"])])])) : createCommentVNode("", true);
31
+ }, null, 8, ["command"])) : createCommentVNode("", true)])])) : createCommentVNode("", true);
31
32
  };
32
33
  }
33
34
  });
@@ -27,7 +27,7 @@ var PromptSelect_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
27
27
  const props = __props;
28
28
  const emit = __emit;
29
29
  const model = computed({
30
- get: () => props.modelValue,
30
+ get: () => props.modelValue ?? "",
31
31
  set: (value) => {
32
32
  emit("update:modelValue", value);
33
33
  emit("next");
@@ -20,7 +20,7 @@ var PromptText_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
20
20
  const props = __props;
21
21
  const emit = __emit;
22
22
  const model = computed({
23
- get: () => props.modelValue,
23
+ get: () => props.modelValue ?? "",
24
24
  set: (value) => emit("update:modelValue", value)
25
25
  });
26
26
  const input = ref();
@@ -6,14 +6,13 @@ import { Icon } from "@poveste/vendors/iconify";
6
6
  import { applyState, clone } from "@poveste/shared";
7
7
  //#region src/app/components/panel/StatePresets.vue?vue&type=script&setup=true&lang.ts
8
8
  var _hoisted_1 = { class: "poveste-state-presets flex gap-2 w-full items-center" };
9
- var _hoisted_2 = ["onUpdate:modelValue"];
10
- var _hoisted_3 = {
9
+ var _hoisted_2 = {
11
10
  key: 1,
12
11
  class: "flex items-center gap-2"
13
12
  };
14
- var _hoisted_4 = { class: "flex-1 truncate" };
15
- var _hoisted_5 = { class: "flex gap-2 items-center" };
16
- var _hoisted_6 = { class: "flex-1 truncate" };
13
+ var _hoisted_3 = { class: "flex-1 truncate" };
14
+ var _hoisted_4 = { class: "flex gap-2 items-center" };
15
+ var _hoisted_5 = { class: "flex-1 truncate" };
17
16
  var DEFAULT_ID = "default";
18
17
  var StatePresets_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
19
18
  __name: "StatePresets",
@@ -41,7 +40,10 @@ var StatePresets_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
41
40
  }
42
41
  function applyPreset(id) {
43
42
  if (id === DEFAULT_ID) resetState();
44
- else if (presetStates.value.has(id)) applyState(props.variant.state, clone(toRawDeep(presetStates.value.get(id).state)));
43
+ else {
44
+ const preset = presetStates.value.get(id);
45
+ if (preset) applyState(props.variant.state, clone(toRawDeep(preset.state)));
46
+ }
45
47
  }
46
48
  onMounted(() => {
47
49
  if (selectedOption.value !== DEFAULT_ID) applyPreset(selectedOption.value);
@@ -59,8 +61,15 @@ var StatePresets_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
59
61
  selectedOption.value = id;
60
62
  isEditing.value = true;
61
63
  await nextTick();
62
- input.value.select();
64
+ input.value?.select();
63
65
  }
66
+ const editingLabel = computed({
67
+ get: () => presetStates.value.get(selectedOption.value)?.label ?? "",
68
+ set: (value) => {
69
+ const preset = presetStates.value.get(selectedOption.value);
70
+ if (preset) preset.label = value;
71
+ }
72
+ });
64
73
  const savedNotif = ref(false);
65
74
  const savedTimeout = useTimeoutFn(() => {
66
75
  savedNotif.value = false;
@@ -68,6 +77,7 @@ var StatePresets_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
68
77
  async function savePreset() {
69
78
  if (!canEdit.value) return;
70
79
  const preset = presetStates.value.get(selectedOption.value);
80
+ if (!preset) return;
71
81
  preset.state = toPresetState(props.variant.state, omitKeys);
72
82
  savedNotif.value = true;
73
83
  savedTimeout.start();
@@ -81,7 +91,7 @@ var StatePresets_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
81
91
  if (!canEdit.value) return;
82
92
  isEditing.value = true;
83
93
  await nextTick();
84
- input.value.select();
94
+ input.value?.select();
85
95
  }
86
96
  function stopEditing() {
87
97
  isEditing.value = false;
@@ -96,27 +106,27 @@ var StatePresets_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
96
106
  class: "flex-1 min-w-0"
97
107
  }, [createVNode(BaseSelect_default, {
98
108
  modelValue: unref(selectedOption),
99
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(selectedOption) ? selectedOption.value = $event : null),
109
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(selectedOption) ? selectedOption.value = $event : null),
100
110
  options: presetsOptions.value,
101
- onDblclick: _cache[3] || (_cache[3] = ($event) => startEditing()),
102
- onKeydown: [_cache[4] || (_cache[4] = withKeys(($event) => stopEditing(), ["enter"])), _cache[5] || (_cache[5] = withKeys(($event) => stopEditing(), ["escape"]))],
103
- onSelect: _cache[6] || (_cache[6] = (id) => applyPreset(id))
111
+ onDblclick: _cache[4] || (_cache[4] = ($event) => startEditing()),
112
+ onKeydown: [_cache[5] || (_cache[5] = withKeys(($event) => stopEditing(), ["enter"])), _cache[6] || (_cache[6] = withKeys(($event) => stopEditing(), ["escape"]))],
113
+ onSelect: _cache[7] || (_cache[7] = (id) => applyPreset(id))
104
114
  }, {
105
115
  default: withCtx(({ label }) => [isEditing.value ? withDirectives((openBlock(), createElementBlock("input", {
106
116
  key: 0,
107
117
  ref_key: "input",
108
118
  ref: input,
109
- "onUpdate:modelValue": ($event) => unref(presetStates).get(unref(selectedOption)).label = $event,
119
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => editingLabel.value = $event),
110
120
  type: "text",
111
121
  class: "text-inherit bg-transparent w-full h-full outline-none",
112
- onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop", "prevent"]))
113
- }, null, 8, _hoisted_2)), [[vModelText, unref(presetStates).get(unref(selectedOption)).label]]) : (openBlock(), createElementBlock("div", _hoisted_3, [createElementVNode("span", _hoisted_4, toDisplayString(label), 1), canEdit.value ? withDirectives((openBlock(), createBlock(unref(Icon), {
122
+ onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop", "prevent"]))
123
+ }, null, 512)), [[vModelText, editingLabel.value]]) : (openBlock(), createElementBlock("div", _hoisted_2, [createElementVNode("span", _hoisted_3, toDisplayString(label), 1), canEdit.value ? withDirectives((openBlock(), createBlock(unref(Icon), {
114
124
  key: 0,
115
125
  icon: "carbon:edit",
116
126
  class: "flex-none cursor-pointer w-4 h-4 hover:text-primary-500 opacity-50 hover:opacity-100 dark:hover:text-primary-400 text-gray-900 dark:text-gray-100",
117
- onClick: _cache[1] || (_cache[1] = withModifiers(($event) => startEditing(), ["stop"]))
127
+ onClick: _cache[2] || (_cache[2] = withModifiers(($event) => startEditing(), ["stop"]))
118
128
  }, null, 512)), [[_directive_tooltip, "Rename this preset"]]) : createCommentVNode("", true)]))]),
119
- option: withCtx(({ label, value }) => [createElementVNode("div", _hoisted_5, [createElementVNode("span", _hoisted_6, toDisplayString(label), 1), value !== DEFAULT_ID ? withDirectives((openBlock(), createBlock(unref(Icon), {
129
+ option: withCtx(({ label, value }) => [createElementVNode("div", _hoisted_4, [createElementVNode("span", _hoisted_5, toDisplayString(label), 1), value !== DEFAULT_ID ? withDirectives((openBlock(), createBlock(unref(Icon), {
120
130
  key: 0,
121
131
  icon: "carbon:trash-can",
122
132
  class: "flex-none cursor-pointer w-4 h-4 hover:text-primary-500 opacity-50 hover:opacity-100 dark:hover:text-primary-400 text-gray-900 dark:text-gray-100",
@@ -128,18 +138,18 @@ var StatePresets_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
128
138
  "data-testid": "preset-save",
129
139
  icon: savedNotif.value ? "carbon:checkmark" : "carbon:save",
130
140
  class: normalizeClass(["cursor-pointer w-4 h-4 hover:text-primary-500 dark:hover:text-primary-400 text-gray-900 dark:text-gray-100", [canEdit.value ? "opacity-50 hover:opacity-100" : "opacity-25 pointer-events-none"]]),
131
- onClick: _cache[7] || (_cache[7] = ($event) => savePreset())
141
+ onClick: _cache[8] || (_cache[8] = ($event) => savePreset())
132
142
  }, null, 8, ["icon", "class"]), [[_directive_tooltip, savedNotif.value ? "Saved!" : canEdit.value ? "Save to preset" : null]]),
133
143
  withDirectives(createVNode(unref(Icon), {
134
144
  "data-testid": "preset-create",
135
145
  icon: "carbon:add-alt",
136
146
  class: "cursor-pointer w-4 h-4 hover:text-primary-500 opacity-50 hover:opacity-100 dark:hover:text-primary-400 text-gray-900 dark:text-gray-100",
137
- onClick: _cache[8] || (_cache[8] = ($event) => createPreset())
147
+ onClick: _cache[9] || (_cache[9] = ($event) => createPreset())
138
148
  }, null, 512), [[_directive_tooltip, "Create new preset"]]),
139
149
  withDirectives(createVNode(unref(Icon), {
140
150
  icon: "carbon:reset",
141
151
  class: "cursor-pointer w-4 h-4 hover:text-primary-500 opacity-50 hover:opacity-100 dark:hover:text-primary-400 text-gray-900 dark:text-gray-100",
142
- onClick: _cache[9] || (_cache[9] = ($event) => resetState())
152
+ onClick: _cache[10] || (_cache[10] = ($event) => resetState())
143
153
  }, null, 512), [[_directive_tooltip, "Reset to initial state"]])
144
154
  ]);
145
155
  };
@@ -31,7 +31,7 @@ var StoryControls_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
31
31
  watch(() => props.variant, () => {
32
32
  ready.value = false;
33
33
  });
34
- const hasCustomControls = computed(() => props.variant.slots().controls || props.story.slots().controls);
34
+ const hasCustomControls = computed(() => props.variant.slots?.().controls || props.story.slots?.().controls);
35
35
  const hasInitState = computed(() => Object.entries(props.variant.state || {}).some(([key]) => !key.startsWith("_h")));
36
36
  return (_ctx, _cache) => {
37
37
  return openBlock(), createElementBlock("div", _hoisted_1, [
@@ -10,7 +10,9 @@ var _hoisted_1 = ["innerHTML"];
10
10
  function useStoryDoc(story) {
11
11
  const renderedDoc = ref("");
12
12
  watchEffect(async () => {
13
- const mdKey = story.value.file.filePath.replace(/\.(\w*)$/, ".md");
13
+ const filePath = story.value?.file?.filePath;
14
+ if (!filePath) return;
15
+ const mdKey = filePath.replace(/\.(\w*)$/, ".md");
14
16
  if (markdownFiles[mdKey]) {
15
17
  const md = await markdownFiles[mdKey]();
16
18
  renderedDoc.value = md.html;
@@ -14,7 +14,11 @@ var StoryEvent_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
14
14
  const formattedArgument = computed(() => {
15
15
  switch (typeof props.event.argument) {
16
16
  case "string": return `"${props.event.argument}"`;
17
- case "object": return `{ ${Object.keys(props.event.argument).map((key) => `${key}: ${props.event.argument[key]}`).join(", ")} }`;
17
+ case "object": {
18
+ const argument = props.event.argument;
19
+ if (!argument) return "null";
20
+ return `{ ${Object.keys(argument).map((key) => `${key}: ${argument[key]}`).join(", ")} }`;
21
+ }
18
22
  default: return props.event.argument;
19
23
  }
20
24
  });
@@ -16,7 +16,8 @@ var StoryEvents_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
16
16
  async function resetUnseen() {
17
17
  if (eventsStore.unseen > 0) eventsStore.unseen = 0;
18
18
  await nextTick();
19
- eventsElement.value.scrollTo({ top: eventsElement.value.scrollHeight });
19
+ const events = eventsElement.value;
20
+ events?.scrollTo({ top: events.scrollHeight });
20
21
  }
21
22
  return (_ctx, _cache) => {
22
23
  return openBlock(), createElementBlock("div", {
@@ -7,7 +7,7 @@ import PaneTabs_default from "./PaneTabs.js";
7
7
  import StoryControls_default from "./StoryControls.js";
8
8
  import StoryEvents_default from "./StoryEvents.js";
9
9
  import StorySourceCode_default from "./StorySourceCode.js";
10
- import { computed, createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, openBlock, resolveDynamicComponent, unref, withCtx } from "@poveste/vendors/vue";
10
+ import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, openBlock, resolveDynamicComponent, unref, withCtx } from "@poveste/vendors/vue";
11
11
  import { useRoute } from "@poveste/vendors/vue-router";
12
12
  //#region src/app/components/panel/StorySidePanel.vue?vue&type=script&setup=true&lang.ts
13
13
  var _hoisted_1 = { class: "h-full w-full p-2" };
@@ -47,19 +47,21 @@ var StorySidePanel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
47
47
  class: "poveste-story-side-panel poveste-loaded h-full",
48
48
  "data-testid": "story-side-panel"
49
49
  }, {
50
- first: withCtx(() => [createElementVNode("div", _hoisted_3, [createVNode(PaneTabs_default, {
50
+ first: withCtx(() => [createElementVNode("div", _hoisted_3, [unref(storyStore).currentStory ? (openBlock(), createBlock(PaneTabs_default, {
51
+ key: 0,
51
52
  story: unref(storyStore).currentStory,
52
53
  variant: unref(storyStore).currentVariant
53
- }, null, 8, ["story", "variant"]), (openBlock(), createBlock(resolveDynamicComponent(panelContentComponent.value), {
54
+ }, null, 8, ["story", "variant"])) : createCommentVNode("", true), (openBlock(), createBlock(resolveDynamicComponent(panelContentComponent.value), {
54
55
  story: unref(storyStore).currentStory,
55
56
  variant: unref(storyStore).currentVariant,
56
57
  class: "h-full overflow-auto"
57
58
  }, null, 8, ["story", "variant"]))])]),
58
- last: withCtx(() => [createVNode(StorySourceCode_default, {
59
+ last: withCtx(() => [unref(storyStore).currentStory ? (openBlock(), createBlock(StorySourceCode_default, {
60
+ key: 0,
59
61
  story: unref(storyStore).currentStory,
60
62
  variant: unref(storyStore).currentVariant,
61
63
  class: "h-full"
62
- }, null, 8, ["story", "variant"])]),
64
+ }, null, 8, ["story", "variant"])) : createCommentVNode("", true)]),
63
65
  _: 1
64
66
  }, 8, ["save-id", "orientation"]))])]);
65
67
  };
@@ -2,6 +2,6 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
2
2
  import StorySourceCode_vue_vue_type_script_setup_true_lang_default from "./StorySourceCode.vue_vue_type_script_setup_true_lang.js";
3
3
  /* empty css */
4
4
  //#region src/app/components/panel/StorySourceCode.vue
5
- var StorySourceCode_default = /*#__PURE__*/ _plugin_vue_export_helper_default(StorySourceCode_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-6de9e107"]]);
5
+ var StorySourceCode_default = /*#__PURE__*/ _plugin_vue_export_helper_default(StorySourceCode_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-ec6c2034"]]);
6
6
  //#endregion
7
7
  export { StorySourceCode_default as default };
@@ -27,9 +27,10 @@ var StorySourceCode_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
27
27
  },
28
28
  setup(__props) {
29
29
  const props = __props;
30
- const generateSourceCodeFn = ref(null);
30
+ const generateSourceCodeFn = shallowRef(null);
31
31
  watchEffect(async () => {
32
- const clientPlugin = clientSupportPlugins[props.story.file?.supportPluginId];
32
+ const supportPluginId = props.story.file?.supportPluginId;
33
+ const clientPlugin = supportPluginId ? clientSupportPlugins[supportPluginId] : void 0;
33
34
  if (clientPlugin) {
34
35
  const pluginModule = await clientPlugin();
35
36
  generateSourceCodeFn.value = markRaw(pluginModule.generateSourceCode);
@@ -50,7 +50,7 @@ var SearchPane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
50
50
  watch(() => props.shown, (value) => {
51
51
  if (value) requestAnimationFrame(() => {
52
52
  focused.value = true;
53
- input.value.select();
53
+ input.value?.select();
54
54
  });
55
55
  });
56
56
  const searchInputText = ref("");
@@ -95,14 +95,18 @@ var SearchPane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
95
95
  const idMapData = titleIdMap[document.item.id];
96
96
  if (!idMapData) continue;
97
97
  switch (idMapData.kind) {
98
- case "story":
99
- list.push(storyResultFactory(storyStore.getStoryById(idMapData.id), rank));
98
+ case "story": {
99
+ const story = storyStore.getStoryById(idMapData.id);
100
+ if (!story) continue;
101
+ list.push(storyResultFactory(story, rank));
100
102
  rank++;
101
103
  break;
104
+ }
102
105
  case "variant": {
103
106
  const [storyId] = idMapData.id.split(":");
104
107
  const story = storyStore.getStoryById(storyId);
105
108
  const variant = storyStore.getVariantById(idMapData.id);
109
+ if (!story || !variant) continue;
106
110
  list.push(variantResultFactory(story, variant, rank));
107
111
  rank++;
108
112
  break;
@@ -121,9 +125,13 @@ var SearchPane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
121
125
  const idMapData = docIdMap[document.item.id];
122
126
  if (!idMapData) continue;
123
127
  switch (idMapData.kind) {
124
- case "story":
125
- list.push(storyResultFactory(storyStore.getStoryById(idMapData.id), rank, "docs"));
128
+ case "story": {
129
+ const story = storyStore.getStoryById(idMapData.id);
130
+ if (!story) continue;
131
+ list.push(storyResultFactory(story, rank, "docs"));
126
132
  rank++;
133
+ break;
134
+ }
127
135
  }
128
136
  }
129
137
  docsResults.value = list;
@@ -141,7 +149,7 @@ var SearchPane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
141
149
  params: { storyId: story.id },
142
150
  query: { ...type === "docs" ? { tab: "docs" } : {} }
143
151
  },
144
- path: story.file.path.slice(0, -1),
152
+ path: story.file?.path.slice(0, -1) ?? [],
145
153
  icon: story.icon,
146
154
  iconColor: story.iconColor
147
155
  };
@@ -160,7 +168,7 @@ var SearchPane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
160
168
  ...type === "docs" ? { tab: "docs" } : {}
161
169
  }
162
170
  },
163
- path: [...story.file.path ?? [], story.title],
171
+ path: [...story.file?.path ?? [], story.title],
164
172
  icon: variant.icon,
165
173
  iconColor: variant.iconColor
166
174
  };
@@ -8,7 +8,8 @@ var GenericMountStory_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
8
8
  const props = __props;
9
9
  const mountComponent = ref(null);
10
10
  watchEffect(async () => {
11
- const clientPlugin = clientSupportPlugins[props.story.file?.supportPluginId];
11
+ const supportPluginId = props.story.file?.supportPluginId;
12
+ const clientPlugin = supportPluginId ? clientSupportPlugins[supportPluginId] : void 0;
12
13
  if (clientPlugin) {
13
14
  const pluginModule = await clientPlugin();
14
15
  mountComponent.value = markRaw(pluginModule.MountStory);
@@ -8,7 +8,8 @@ var GenericRenderStory_vue_vue_type_script_setup_true_lang_default = /*@__PURE__
8
8
  const props = __props;
9
9
  const mountComponent = ref(null);
10
10
  watchEffect(async () => {
11
- const clientPlugin = clientSupportPlugins[props.story.file?.supportPluginId];
11
+ const supportPluginId = props.story.file?.supportPluginId;
12
+ const clientPlugin = supportPluginId ? clientSupportPlugins[supportPluginId] : void 0;
12
13
  if (clientPlugin) try {
13
14
  const pluginModule = await clientPlugin();
14
15
  mountComponent.value = markRaw(pluginModule.RenderStory);