@poveste/app 0.1.0 → 0.1.1

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 (269) hide show
  1. package/package.json +4 -4
  2. package/postcss.config.cjs +1 -1
  3. package/src/app/App.vue +9 -9
  4. package/src/app/assets/poveste-text-dark.svg +15 -0
  5. package/src/app/assets/poveste-text.svg +15 -0
  6. package/src/app/assets/poveste.svg +14 -0
  7. package/src/app/components/HomeView.vue +4 -4
  8. package/src/app/components/app/AppHeader.vue +4 -4
  9. package/src/app/components/app/AppLogo.vue +7 -7
  10. package/src/app/components/app/Breadcrumb.vue +1 -1
  11. package/src/app/components/app/InitialLoading.vue +3 -3
  12. package/src/app/components/app/MobileOverlay.vue +2 -2
  13. package/src/app/components/base/BaseButton.vue +1 -1
  14. package/src/app/components/base/BaseCheckbox.vue +1 -1
  15. package/src/app/components/base/BaseCopyIcon.vue +1 -1
  16. package/src/app/components/base/BaseEmpty.vue +1 -1
  17. package/src/app/components/base/BaseIcon.vue +2 -2
  18. package/src/app/components/base/BaseKeyboardShortcut.vue +1 -1
  19. package/src/app/components/base/BaseListItemLink.vue +1 -1
  20. package/src/app/components/base/BaseOverflowMenu.vue +1 -1
  21. package/src/app/components/base/BaseOverflowTab.vue +2 -2
  22. package/src/app/components/base/BaseSelect.vue +1 -1
  23. package/src/app/components/base/BaseSplitPane.vue +2 -2
  24. package/src/app/components/base/BaseTab.vue +2 -2
  25. package/src/app/components/base/BaseTag.vue +1 -1
  26. package/src/app/components/command/CommandPrompts.vue +1 -1
  27. package/src/app/components/command/CommandPromptsModal.vue +1 -1
  28. package/src/app/components/command/PromptSelect.vue +1 -1
  29. package/src/app/components/command/PromptText.vue +1 -1
  30. package/src/app/components/misc/HatchedPattern.vue +2 -2
  31. package/src/app/components/panel/ControlsComponentPropItem.vue +1 -1
  32. package/src/app/components/panel/ControlsComponentProps.vue +1 -1
  33. package/src/app/components/panel/ControlsComponentState.vue +1 -1
  34. package/src/app/components/panel/ControlsComponentStateItem.vue +1 -1
  35. package/src/app/components/panel/PaneTabs.vue +1 -1
  36. package/src/app/components/panel/StatePresets.vue +3 -3
  37. package/src/app/components/panel/StoryControls.vue +2 -2
  38. package/src/app/components/panel/StoryDocs.vue +6 -6
  39. package/src/app/components/panel/StoryEvent.vue +1 -1
  40. package/src/app/components/panel/StoryEvents.vue +1 -1
  41. package/src/app/components/panel/StorySidePanel.vue +3 -3
  42. package/src/app/components/panel/StorySourceCode.vue +5 -5
  43. package/src/app/components/search/SearchItem.vue +1 -1
  44. package/src/app/components/search/SearchLoading.vue +1 -1
  45. package/src/app/components/search/SearchModal.vue +1 -1
  46. package/src/app/components/search/SearchPane.vue +3 -3
  47. package/src/app/components/search/search-docs-data.ts +1 -1
  48. package/src/app/components/search/search-title-data.ts +1 -1
  49. package/src/app/components/story/GenericMountStory.vue +2 -2
  50. package/src/app/components/story/GenericRenderStory.vue +2 -2
  51. package/src/app/components/story/StoryResponsivePreview.vue +1 -1
  52. package/src/app/components/story/StoryVariantGrid.vue +2 -2
  53. package/src/app/components/story/StoryVariantGridItem.vue +6 -4
  54. package/src/app/components/story/StoryVariantListItem.vue +1 -1
  55. package/src/app/components/story/StoryVariantSingle.vue +2 -2
  56. package/src/app/components/story/StoryVariantSinglePreviewNative.vue +7 -5
  57. package/src/app/components/story/StoryVariantSinglePreviewRemote.vue +1 -1
  58. package/src/app/components/story/StoryVariantSingleView.vue +2 -2
  59. package/src/app/components/story/StoryView.vue +2 -2
  60. package/src/app/components/story/StoryViewer.vue +1 -1
  61. package/src/app/components/toolbar/DevOnlyToolbarOpenInEditor.vue +1 -1
  62. package/src/app/components/toolbar/ToolbarBackground.vue +4 -4
  63. package/src/app/components/toolbar/ToolbarNewTab.vue +1 -1
  64. package/src/app/components/toolbar/ToolbarResponsiveSize.vue +5 -5
  65. package/src/app/components/toolbar/ToolbarTextDirection.vue +1 -1
  66. package/src/app/components/toolbar/ToolbarTitle.vue +1 -1
  67. package/src/app/components/tree/StoryGroup.vue +1 -1
  68. package/src/app/components/tree/StoryList.vue +1 -1
  69. package/src/app/components/tree/StoryListFolder.vue +3 -3
  70. package/src/app/components/tree/StoryListItem.vue +1 -1
  71. package/src/app/index.ts +2 -2
  72. package/src/app/plugin.ts +2 -2
  73. package/src/app/router.ts +2 -2
  74. package/src/app/sandbox.ts +6 -6
  75. package/src/app/stores/folder.ts +1 -1
  76. package/src/app/stores/preview-settings.ts +1 -1
  77. package/src/app/style/main.pcss +3 -3
  78. package/src/app/style/sandbox.css +1 -1
  79. package/src/app/style/transitions.pcss +4 -4
  80. package/src/app/types.ts +2 -2
  81. package/src/app/util/commands.ts +2 -2
  82. package/src/app/util/config.ts +2 -2
  83. package/src/app/util/const.ts +4 -4
  84. package/src/app/util/dark.ts +4 -4
  85. package/src/app/util/docs.ts +1 -1
  86. package/src/app/util/events.ts +1 -1
  87. package/src/app/util/preview-settings.ts +5 -3
  88. package/src/virtual.d.ts +1 -1
  89. package/tailwind.config.cjs +2 -2
  90. package/vite.config.ts +2 -2
  91. package/dist/app/assets/histoire-text-dark.svg +0 -89
  92. package/dist/app/assets/histoire-text.svg +0 -89
  93. package/dist/app/assets/histoire.svg +0 -51
  94. package/dist/app/style/floating.pcss +0 -34
  95. package/dist/app/style/main.pcss +0 -100
  96. package/dist/app/style/sandbox.css +0 -24
  97. package/dist/app/style/transitions.pcss +0 -51
  98. package/dist/bundle-index.js +0 -1
  99. package/dist/bundle-main-dev.js +0 -4
  100. package/dist/bundle-main.js +0 -5
  101. package/dist/bundle-sandbox-dev.js +0 -2
  102. package/dist/bundle-sandbox.js +0 -2
  103. package/dist/bundled/App.vue.js +0 -5
  104. package/dist/bundled/App.vue2.js +0 -167
  105. package/dist/bundled/_virtual/_plugin-vue_export-helper.js +0 -10
  106. package/dist/bundled/api.js +0 -12
  107. package/dist/bundled/app.css +0 -116
  108. package/dist/bundled/assets/histoire-text-dark.svg.js +0 -4
  109. package/dist/bundled/assets/histoire-text.svg.js +0 -4
  110. package/dist/bundled/assets/histoire.svg.js +0 -4
  111. package/dist/bundled/components/HomeView.vue.js +0 -5
  112. package/dist/bundled/components/HomeView.vue2.js +0 -66
  113. package/dist/bundled/components/app/AppHeader.vue.js +0 -5
  114. package/dist/bundled/components/app/AppHeader.vue2.js +0 -71
  115. package/dist/bundled/components/app/AppLogo.vue.js +0 -5
  116. package/dist/bundled/components/app/AppLogo.vue2.js +0 -29
  117. package/dist/bundled/components/app/Breadcrumb.vue.js +0 -8
  118. package/dist/bundled/components/app/Breadcrumb.vue2.js +0 -91
  119. package/dist/bundled/components/app/HomeCounter.vue.js +0 -5
  120. package/dist/bundled/components/app/HomeCounter.vue2.js +0 -42
  121. package/dist/bundled/components/app/InitialLoading.vue.js +0 -5
  122. package/dist/bundled/components/app/InitialLoading.vue2.js +0 -51
  123. package/dist/bundled/components/app/MobileOverlay.vue.js +0 -5
  124. package/dist/bundled/components/app/MobileOverlay.vue2.js +0 -45
  125. package/dist/bundled/components/base/BaseButton.vue.js +0 -5
  126. package/dist/bundled/components/base/BaseButton.vue2.js +0 -39
  127. package/dist/bundled/components/base/BaseCheckbox.vue.js +0 -5
  128. package/dist/bundled/components/base/BaseCheckbox.vue2.js +0 -78
  129. package/dist/bundled/components/base/BaseEmpty.vue.js +0 -14
  130. package/dist/bundled/components/base/BaseIcon.vue.js +0 -8
  131. package/dist/bundled/components/base/BaseIcon.vue2.js +0 -29
  132. package/dist/bundled/components/base/BaseKeyboardShortcut.vue.js +0 -5
  133. package/dist/bundled/components/base/BaseKeyboardShortcut.vue2.js +0 -20
  134. package/dist/bundled/components/base/BaseListItem.vue.js +0 -5
  135. package/dist/bundled/components/base/BaseListItem.vue2.js +0 -33
  136. package/dist/bundled/components/base/BaseListItemLink.vue.js +0 -33
  137. package/dist/bundled/components/base/BaseListItemLink.vue2.js +0 -26
  138. package/dist/bundled/components/base/BaseOverflowMenu.vue.js +0 -5
  139. package/dist/bundled/components/base/BaseOverflowMenu.vue2.js +0 -100
  140. package/dist/bundled/components/base/BaseOverflowTab.vue.js +0 -36
  141. package/dist/bundled/components/base/BaseOverflowTab.vue2.js +0 -18
  142. package/dist/bundled/components/base/BaseSelect.vue.js +0 -5
  143. package/dist/bundled/components/base/BaseSelect.vue2.js +0 -77
  144. package/dist/bundled/components/base/BaseSplitPane.vue.js +0 -8
  145. package/dist/bundled/components/base/BaseSplitPane.vue2.js +0 -183
  146. package/dist/bundled/components/base/BaseTab.vue.js +0 -36
  147. package/dist/bundled/components/base/BaseTab.vue2.js +0 -18
  148. package/dist/bundled/components/base/BaseTag.vue.js +0 -13
  149. package/dist/bundled/components/command/CommandPrompts.vue.js +0 -5
  150. package/dist/bundled/components/command/CommandPrompts.vue2.js +0 -91
  151. package/dist/bundled/components/command/CommandPromptsModal.vue.js +0 -5
  152. package/dist/bundled/components/command/CommandPromptsModal.vue2.js +0 -45
  153. package/dist/bundled/components/command/PromptSelect.vue.js +0 -5
  154. package/dist/bundled/components/command/PromptSelect.vue2.js +0 -142
  155. package/dist/bundled/components/command/PromptText.vue.js +0 -5
  156. package/dist/bundled/components/command/PromptText.vue2.js +0 -67
  157. package/dist/bundled/components/misc/CheckerboardPattern.vue.js +0 -40
  158. package/dist/bundled/components/misc/HatchedPattern.vue.js +0 -12
  159. package/dist/bundled/components/panel/ControlsComponentPropItem.vue.js +0 -5
  160. package/dist/bundled/components/panel/ControlsComponentPropItem.vue2.js +0 -72
  161. package/dist/bundled/components/panel/ControlsComponentProps.vue.js +0 -5
  162. package/dist/bundled/components/panel/ControlsComponentProps.vue2.js +0 -45
  163. package/dist/bundled/components/panel/ControlsComponentState.vue.js +0 -5
  164. package/dist/bundled/components/panel/ControlsComponentState.vue2.js +0 -41
  165. package/dist/bundled/components/panel/ControlsComponentStateItem.vue.js +0 -5
  166. package/dist/bundled/components/panel/ControlsComponentStateItem.vue2.js +0 -46
  167. package/dist/bundled/components/panel/PaneTabs.vue.js +0 -5
  168. package/dist/bundled/components/panel/PaneTabs.vue2.js +0 -114
  169. package/dist/bundled/components/panel/StatePresets.vue.js +0 -5
  170. package/dist/bundled/components/panel/StatePresets.vue2.js +0 -193
  171. package/dist/bundled/components/panel/StoryControls.vue.js +0 -5
  172. package/dist/bundled/components/panel/StoryControls.vue2.js +0 -87
  173. package/dist/bundled/components/panel/StoryDocs.vue.js +0 -7
  174. package/dist/bundled/components/panel/StoryDocs.vue2.js +0 -161
  175. package/dist/bundled/components/panel/StoryEvent.vue.js +0 -5
  176. package/dist/bundled/components/panel/StoryEvent.vue2.js +0 -59
  177. package/dist/bundled/components/panel/StoryEvents.vue.js +0 -5
  178. package/dist/bundled/components/panel/StoryEvents.vue2.js +0 -53
  179. package/dist/bundled/components/panel/StorySidePanel.vue.js +0 -5
  180. package/dist/bundled/components/panel/StorySidePanel.vue2.js +0 -83
  181. package/dist/bundled/components/panel/StorySourceCode.vue.js +0 -8
  182. package/dist/bundled/components/panel/StorySourceCode.vue2.js +0 -204
  183. package/dist/bundled/components/search/SearchItem.vue.js +0 -8
  184. package/dist/bundled/components/search/SearchItem.vue2.js +0 -93
  185. package/dist/bundled/components/search/SearchItemContent.vue.js +0 -5
  186. package/dist/bundled/components/search/SearchItemContent.vue2.js +0 -71
  187. package/dist/bundled/components/search/SearchLoading.vue.js +0 -5
  188. package/dist/bundled/components/search/SearchLoading.vue2.js +0 -21
  189. package/dist/bundled/components/search/SearchModal.vue.js +0 -5
  190. package/dist/bundled/components/search/SearchModal.vue2.js +0 -51
  191. package/dist/bundled/components/search/SearchPane.vue.js +0 -5
  192. package/dist/bundled/components/search/SearchPane.vue2.js +0 -272
  193. package/dist/bundled/components/search/search-docs-data.js +0 -11
  194. package/dist/bundled/components/search/search-title-data.js +0 -11
  195. package/dist/bundled/components/story/GenericMountStory.vue.js +0 -5
  196. package/dist/bundled/components/story/GenericMountStory.vue2.js +0 -34
  197. package/dist/bundled/components/story/GenericRenderStory.vue.js +0 -5
  198. package/dist/bundled/components/story/GenericRenderStory.vue2.js +0 -39
  199. package/dist/bundled/components/story/StoryResponsivePreview.vue.js +0 -8
  200. package/dist/bundled/components/story/StoryResponsivePreview.vue2.js +0 -207
  201. package/dist/bundled/components/story/StoryVariantGrid.vue.js +0 -5
  202. package/dist/bundled/components/story/StoryVariantGrid.vue2.js +0 -146
  203. package/dist/bundled/components/story/StoryVariantGridItem.vue.js +0 -8
  204. package/dist/bundled/components/story/StoryVariantGridItem.vue2.js +0 -153
  205. package/dist/bundled/components/story/StoryVariantListItem.vue.js +0 -8
  206. package/dist/bundled/components/story/StoryVariantListItem.vue2.js +0 -55
  207. package/dist/bundled/components/story/StoryVariantSingle.vue.js +0 -8
  208. package/dist/bundled/components/story/StoryVariantSingle.vue2.js +0 -107
  209. package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue.js +0 -5
  210. package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue2.js +0 -70
  211. package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue.js +0 -5
  212. package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue2.js +0 -128
  213. package/dist/bundled/components/story/StoryVariantSingleView.vue.js +0 -5
  214. package/dist/bundled/components/story/StoryVariantSingleView.vue2.js +0 -66
  215. package/dist/bundled/components/story/StoryView.vue.js +0 -5
  216. package/dist/bundled/components/story/StoryView.vue2.js +0 -104
  217. package/dist/bundled/components/story/StoryViewer.vue.js +0 -8
  218. package/dist/bundled/components/story/StoryViewer.vue2.js +0 -55
  219. package/dist/bundled/components/toolbar/DevOnlyToolbarOpenInEditor.vue.js +0 -5
  220. package/dist/bundled/components/toolbar/DevOnlyToolbarOpenInEditor.vue2.js +0 -31
  221. package/dist/bundled/components/toolbar/ToolbarBackground.vue.js +0 -8
  222. package/dist/bundled/components/toolbar/ToolbarBackground.vue2.js +0 -98
  223. package/dist/bundled/components/toolbar/ToolbarNewTab.vue.js +0 -5
  224. package/dist/bundled/components/toolbar/ToolbarNewTab.vue2.js +0 -36
  225. package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue.js +0 -5
  226. package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue2.js +0 -127
  227. package/dist/bundled/components/toolbar/ToolbarTextDirection.vue.js +0 -5
  228. package/dist/bundled/components/toolbar/ToolbarTextDirection.vue2.js +0 -27
  229. package/dist/bundled/components/toolbar/ToolbarTitle.vue.js +0 -5
  230. package/dist/bundled/components/toolbar/ToolbarTitle.vue2.js +0 -26
  231. package/dist/bundled/components/tree/StoryGroup.vue.js +0 -5
  232. package/dist/bundled/components/tree/StoryGroup.vue2.js +0 -74
  233. package/dist/bundled/components/tree/StoryList.vue.js +0 -5
  234. package/dist/bundled/components/tree/StoryList.vue2.js +0 -41
  235. package/dist/bundled/components/tree/StoryListFolder.vue.js +0 -8
  236. package/dist/bundled/components/tree/StoryListFolder.vue2.js +0 -86
  237. package/dist/bundled/components/tree/StoryListItem.vue.js +0 -8
  238. package/dist/bundled/components/tree/StoryListItem.vue2.js +0 -69
  239. package/dist/bundled/index.js +0 -35
  240. package/dist/bundled/plugin.js +0 -49
  241. package/dist/bundled/router.js +0 -32
  242. package/dist/bundled/sandbox.js +0 -87
  243. package/dist/bundled/stores/command.js +0 -25
  244. package/dist/bundled/stores/events.js +0 -29
  245. package/dist/bundled/stores/folder.js +0 -54
  246. package/dist/bundled/stores/preview-settings.js +0 -19
  247. package/dist/bundled/stores/story.js +0 -43
  248. package/dist/bundled/util/commands.js +0 -57
  249. package/dist/bundled/util/config.js +0 -8
  250. package/dist/bundled/util/const.js +0 -10
  251. package/dist/bundled/util/dark.js +0 -28
  252. package/dist/bundled/util/docs.js +0 -26
  253. package/dist/bundled/util/env.js +0 -4
  254. package/dist/bundled/util/events.js +0 -33
  255. package/dist/bundled/util/keyboard.js +0 -90
  256. package/dist/bundled/util/mapping.js +0 -70
  257. package/dist/bundled/util/open-in-editor.js +0 -6
  258. package/dist/bundled/util/preview-settings.js +0 -21
  259. package/dist/bundled/util/responsive.js +0 -6
  260. package/dist/bundled/util/sandbox.js +0 -11
  261. package/dist/bundled/util/scroll.js +0 -31
  262. package/dist/bundled/util/select.js +0 -28
  263. package/dist/bundled/util/state.js +0 -41
  264. package/dist/bundled/util/tooltip.js +0 -15
  265. package/dist/bundled/util/variant.js +0 -21
  266. package/dist/style.css +0 -2626
  267. package/src/app/assets/histoire-text-dark.svg +0 -89
  268. package/src/app/assets/histoire-text.svg +0 -89
  269. package/src/app/assets/histoire.svg +0 -51
@@ -1,53 +0,0 @@
1
- import { defineComponent, computed, onMounted, watch, nextTick, ref, createElementBlock, openBlock, createBlock, withCtx, createVNode, createTextVNode, unref, Fragment, renderList } from "@poveste/vendors/vue";
2
- import { Icon } from "@poveste/vendors/iconify";
3
- import { useEventsStore } from "../../stores/events.js";
4
- import BaseEmpty from "../base/BaseEmpty.vue.js";
5
- import "./StoryEvent.vue.js";
6
- import _sfc_main$1 from "./StoryEvent.vue2.js";
7
- "use strict";
8
- const _hoisted_1 = { key: 1 };
9
- const _sfc_main = /* @__PURE__ */ defineComponent({
10
- __name: "StoryEvents",
11
- setup(__props) {
12
- const eventsStore = useEventsStore();
13
- const hasEvents = computed(() => eventsStore.events.length);
14
- onMounted(resetUnseen);
15
- watch(() => eventsStore.unseen, resetUnseen);
16
- async function resetUnseen() {
17
- if (eventsStore.unseen > 0) {
18
- eventsStore.unseen = 0;
19
- }
20
- await nextTick();
21
- eventsElement.value.scrollTo({ top: eventsElement.value.scrollHeight });
22
- }
23
- const eventsElement = ref();
24
- return (_ctx, _cache) => {
25
- return openBlock(), createElementBlock("div", {
26
- ref_key: "eventsElement",
27
- ref: eventsElement,
28
- class: "histoire-story-events"
29
- }, [
30
- !hasEvents.value ? (openBlock(), createBlock(BaseEmpty, { key: 0 }, {
31
- default: withCtx(() => [
32
- createVNode(unref(Icon), {
33
- icon: "carbon:event-schedule",
34
- class: "htw-w-8 htw-h-8 htw-opacity-50 htw-mb-6"
35
- }),
36
- _cache[0] || (_cache[0] = createTextVNode(" No event fired ", -1))
37
- ]),
38
- _: 1
39
- })) : (openBlock(), createElementBlock("div", _hoisted_1, [
40
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(eventsStore).events, (event, key) => {
41
- return openBlock(), createBlock(_sfc_main$1, {
42
- key,
43
- event
44
- }, null, 8, ["event"]);
45
- }), 128))
46
- ]))
47
- ], 512);
48
- };
49
- }
50
- });
51
- export {
52
- _sfc_main as default
53
- };
@@ -1,5 +0,0 @@
1
- import _sfc_main from "./StorySidePanel.vue2.js";
2
- "use strict";
3
- export {
4
- _sfc_main as default
5
- };
@@ -1,83 +0,0 @@
1
- import { defineComponent, computed, createBlock, unref, openBlock, withCtx, createElementVNode, createVNode, resolveDynamicComponent } from "@poveste/vendors/vue";
2
- import { useRoute } from "@poveste/vendors/vue-router";
3
- import { useStoryStore } from "../../stores/story.js";
4
- import BaseEmpty from "../base/BaseEmpty.vue.js";
5
- import BaseSplitPane from "../base/BaseSplitPane.vue.js";
6
- import "./PaneTabs.vue.js";
7
- import "./StoryControls.vue.js";
8
- import "./StoryDocs.vue.js";
9
- import "./StoryEvents.vue.js";
10
- import StorySourceCode from "./StorySourceCode.vue.js";
11
- import _sfc_main$1 from "./StoryControls.vue2.js";
12
- import _sfc_main$2 from "./StoryEvents.vue2.js";
13
- import _sfc_main$3 from "./StoryDocs.vue2.js";
14
- import _sfc_main$4 from "./PaneTabs.vue2.js";
15
- "use strict";
16
- const _hoisted_1 = { class: "htw-flex htw-flex-col htw-h-full" };
17
- const _sfc_main = /* @__PURE__ */ defineComponent({
18
- __name: "StorySidePanel",
19
- setup(__props) {
20
- const storyStore = useStoryStore();
21
- const route = useRoute();
22
- const panelContentComponent = computed(() => {
23
- switch (route.query.tab) {
24
- case "docs":
25
- return _sfc_main$3;
26
- case "events":
27
- return _sfc_main$2;
28
- default:
29
- return _sfc_main$1;
30
- }
31
- });
32
- return (_ctx, _cache) => {
33
- return !unref(storyStore).currentVariant ? (openBlock(), createBlock(BaseEmpty, {
34
- key: 0,
35
- class: "histoire-story-side-panel histoire-selection"
36
- }, {
37
- default: withCtx(() => [..._cache[0] || (_cache[0] = [
38
- createElementVNode("span", null, "Select a variant", -1)
39
- ])]),
40
- _: 1
41
- })) : !unref(storyStore).currentVariant.configReady || !unref(storyStore).currentVariant.previewReady ? (openBlock(), createBlock(BaseEmpty, {
42
- key: 1,
43
- class: "histoire-story-side-panel histoire-loading"
44
- }, {
45
- default: withCtx(() => [..._cache[1] || (_cache[1] = [
46
- createElementVNode("span", null, "Loading...", -1)
47
- ])]),
48
- _: 1
49
- })) : (openBlock(), createBlock(BaseSplitPane, {
50
- key: 2,
51
- "save-id": "story-sidepane",
52
- orientation: "portrait",
53
- class: "histoire-story-side-panel histoire-loaded htw-h-full",
54
- "data-test-id": "story-side-panel"
55
- }, {
56
- first: withCtx(() => [
57
- createElementVNode("div", _hoisted_1, [
58
- createVNode(_sfc_main$4, {
59
- story: unref(storyStore).currentStory,
60
- variant: unref(storyStore).currentVariant
61
- }, null, 8, ["story", "variant"]),
62
- (openBlock(), createBlock(resolveDynamicComponent(panelContentComponent.value), {
63
- story: unref(storyStore).currentStory,
64
- variant: unref(storyStore).currentVariant,
65
- class: "htw-h-full htw-overflow-auto"
66
- }, null, 8, ["story", "variant"]))
67
- ])
68
- ]),
69
- last: withCtx(() => [
70
- createVNode(StorySourceCode, {
71
- story: unref(storyStore).currentStory,
72
- variant: unref(storyStore).currentVariant,
73
- class: "htw-h-full"
74
- }, null, 8, ["story", "variant"])
75
- ]),
76
- _: 1
77
- }));
78
- };
79
- }
80
- });
81
- export {
82
- _sfc_main as default
83
- };
@@ -1,8 +0,0 @@
1
- import _sfc_main from "./StorySourceCode.vue2.js";
2
- /* empty css */
3
- import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- "use strict";
5
- const StorySourceCode = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c937edfe"]]);
6
- export {
7
- StorySourceCode as default
8
- };
@@ -1,204 +0,0 @@
1
- import { defineComponent, ref, watchEffect, markRaw, shallowRef, watch, computed, onMounted, nextTick, resolveDirective, createElementBlock, openBlock, createCommentVNode, createBlock, createElementVNode, createVNode, withDirectives, normalizeClass, unref, toDisplayString, withCtx } from "@poveste/vendors/vue";
2
- import { Icon } from "@poveste/vendors/iconify";
3
- import { HstCopyIcon } from "@poveste/controls";
4
- import { unindent } from "@poveste/shared";
5
- import { createHighlighter } from "shiki";
6
- import { clientSupportPlugins } from "virtual:$histoire-support-plugins-client";
7
- import { isDark } from "../../util/dark.js";
8
- import BaseEmpty from "../base/BaseEmpty.vue.js";
9
- "use strict";
10
- const _hoisted_1 = { class: "histoire-story-source-code htw-bg-gray-50 dark:htw-bg-gray-750 htw-h-full htw-overflow-hidden htw-flex htw-flex-col" };
11
- const _hoisted_2 = {
12
- key: 0,
13
- class: "htw-h-10 htw-flex-none htw-border-b htw-border-solid htw-border-gray-500/5 htw-px-4 htw-flex htw-items-center htw-gap-2"
14
- };
15
- const _hoisted_3 = { class: "htw-flex htw-flex-none htw-gap-px htw-h-full htw-py-2" };
16
- const _hoisted_4 = {
17
- key: 1,
18
- class: "htw-text-red-500 htw-h-full htw-p-2 htw-overflow-auto htw-font-mono htw-text-sm"
19
- };
20
- const _hoisted_5 = ["value"];
21
- const _hoisted_6 = ["innerHTML"];
22
- const _sfc_main = /* @__PURE__ */ defineComponent({
23
- __name: "StorySourceCode",
24
- props: {
25
- story: {},
26
- variant: {}
27
- },
28
- setup(__props) {
29
- const props = __props;
30
- const generateSourceCodeFn = ref(null);
31
- watchEffect(async () => {
32
- const clientPlugin = clientSupportPlugins[props.story.file?.supportPluginId];
33
- if (clientPlugin) {
34
- const pluginModule = await clientPlugin();
35
- generateSourceCodeFn.value = markRaw(pluginModule.generateSourceCode);
36
- }
37
- });
38
- const highlighter = shallowRef();
39
- const dynamicSourceCode = ref("");
40
- const error = ref(null);
41
- watch(() => [props.variant, generateSourceCodeFn.value], async () => {
42
- if (!generateSourceCodeFn.value) return;
43
- error.value = null;
44
- dynamicSourceCode.value = "";
45
- try {
46
- if (props.variant.source) {
47
- dynamicSourceCode.value = props.variant.source;
48
- } else if (props.variant.slots?.().source) {
49
- const source = props.variant.slots?.().source()[0].children;
50
- if (source) {
51
- dynamicSourceCode.value = await unindent(source);
52
- }
53
- } else {
54
- dynamicSourceCode.value = await generateSourceCodeFn.value(props.variant);
55
- }
56
- } catch (e) {
57
- console.error(e);
58
- error.value = e.message;
59
- }
60
- if (!dynamicSourceCode.value) {
61
- displayedSource.value = "static";
62
- }
63
- }, {
64
- deep: true,
65
- immediate: true
66
- });
67
- const staticSourceCode = ref("");
68
- watch(() => [props.story, props.story?.file?.source], async () => {
69
- staticSourceCode.value = "";
70
- const sourceLoader = props.story.file?.source;
71
- if (sourceLoader) {
72
- staticSourceCode.value = (await sourceLoader()).default;
73
- }
74
- }, {
75
- immediate: true
76
- });
77
- const displayedSource = ref("dynamic");
78
- const displayedSourceCode = computed(() => {
79
- if (displayedSource.value === "dynamic") {
80
- return dynamicSourceCode.value;
81
- }
82
- return staticSourceCode.value;
83
- });
84
- onMounted(async () => {
85
- highlighter.value = await createHighlighter({
86
- langs: [
87
- "html",
88
- "jsx"
89
- ],
90
- themes: [
91
- "github-light",
92
- "github-dark"
93
- ]
94
- });
95
- });
96
- const sourceHtml = computed(() => displayedSourceCode.value ? highlighter.value?.codeToHtml(displayedSourceCode.value, {
97
- lang: "html",
98
- theme: isDark.value ? "github-dark" : "github-light"
99
- }) : "");
100
- let lastScroll = 0;
101
- watch(() => props.variant, () => {
102
- lastScroll = 0;
103
- });
104
- const scroller = ref();
105
- function onScroll(event) {
106
- if (sourceHtml.value) {
107
- lastScroll = event.target.scrollTop;
108
- }
109
- }
110
- watch(sourceHtml, async () => {
111
- await nextTick();
112
- if (scroller.value) {
113
- scroller.value.scrollTop = lastScroll;
114
- }
115
- });
116
- return (_ctx, _cache) => {
117
- const _directive_tooltip = resolveDirective("tooltip");
118
- return openBlock(), createElementBlock("div", _hoisted_1, [
119
- !error.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
120
- _cache[2] || (_cache[2] = createElementVNode("div", { class: "htw-text-gray-900 dark:htw-text-gray-100" }, " Source ", -1)),
121
- _cache[3] || (_cache[3] = createElementVNode("div", { class: "htw-flex-1" }, null, -1)),
122
- createElementVNode("div", _hoisted_3, [
123
- withDirectives((openBlock(), createElementBlock("button", {
124
- class: normalizeClass(["htw-flex htw-items-center htw-gap-1 htw-h-full htw-px-1 htw-bg-gray-500/10 htw-rounded-l htw-transition-all htw-ease-[cubic-bezier(0,1,.6,1)] htw-duration-300 htw-overflow-hidden", [
125
- displayedSource.value !== "dynamic" ? "htw-max-w-6 htw-opacity-70" : "htw-max-w-[82px] htw-text-primary-600 dark:htw-text-primary-400",
126
- dynamicSourceCode.value ? "htw-cursor-pointer hover:htw-bg-gray-500/30 active:htw-bg-gray-600/50" : "htw-opacity-50"
127
- ]]),
128
- onClick: _cache[0] || (_cache[0] = ($event) => dynamicSourceCode.value && (displayedSource.value = "dynamic"))
129
- }, [
130
- createVNode(unref(Icon), {
131
- icon: "carbon:flash",
132
- class: "htw-w-4 htw-h-4 htw-flex-none"
133
- }),
134
- createElementVNode("span", {
135
- class: normalizeClass(["transition-opacity duration-300", {
136
- "opacity-0": displayedSource.value !== "dynamic"
137
- }])
138
- }, " Dynamic ", 2)
139
- ], 2)), [
140
- [_directive_tooltip, !dynamicSourceCode.value ? "Dynamic source code is not available" : displayedSource.value !== "dynamic" ? "Switch to dynamic source" : null]
141
- ]),
142
- withDirectives((openBlock(), createElementBlock("button", {
143
- class: normalizeClass(["htw-flex htw-items-center htw-gap-1 htw-h-full htw-px-1 htw-bg-gray-500/10 htw-rounded-r htw-transition-all htw-ease-[cubic-bezier(0,1,.6,1)] htw-duration-300 htw-overflow-hidden", [
144
- displayedSource.value !== "static" ? "htw-max-w-6 htw-opacity-70" : "htw-max-w-[63px] htw-text-primary-600 dark:htw-text-primary-400",
145
- staticSourceCode.value ? "htw-cursor-pointer hover:htw-bg-gray-500/30 active:htw-bg-gray-600/50" : "htw-opacity-50"
146
- ]]),
147
- onClick: _cache[1] || (_cache[1] = ($event) => staticSourceCode.value && (displayedSource.value = "static"))
148
- }, [
149
- createVNode(unref(Icon), {
150
- icon: "carbon:document",
151
- class: "htw-w-4 htw-h-4 htw-flex-none"
152
- }),
153
- createElementVNode("span", {
154
- class: normalizeClass(["transition-opacity duration-300", {
155
- "opacity-0": displayedSource.value !== "static"
156
- }])
157
- }, " Static ", 2)
158
- ], 2)), [
159
- [_directive_tooltip, !staticSourceCode.value ? "Static source code is not available" : displayedSource.value !== "static" ? "Switch to static source" : null]
160
- ])
161
- ]),
162
- createVNode(unref(HstCopyIcon), {
163
- content: displayedSourceCode.value,
164
- class: "htw-flex-none"
165
- }, null, 8, ["content"])
166
- ])) : createCommentVNode("", true),
167
- error.value ? (openBlock(), createElementBlock("div", _hoisted_4, " Error: " + toDisplayString(error.value), 1)) : !displayedSourceCode.value ? (openBlock(), createBlock(BaseEmpty, { key: 2 }, {
168
- default: withCtx(() => [
169
- createVNode(unref(Icon), {
170
- icon: "carbon:code-hide",
171
- class: "htw-w-8 htw-h-8 htw-opacity-50 htw-mb-6"
172
- }),
173
- _cache[4] || (_cache[4] = createElementVNode("span", null, "Not available", -1))
174
- ]),
175
- _: 1
176
- })) : !sourceHtml.value ? (openBlock(), createElementBlock("textarea", {
177
- key: 3,
178
- ref_key: "scroller",
179
- ref: scroller,
180
- class: "__histoire-code-placeholder htw-w-full htw-h-full htw-p-4 htw-outline-none htw-bg-transparent htw-resize-none htw-m-0",
181
- value: displayedSourceCode.value,
182
- readonly: "",
183
- "data-test-id": "story-source-code",
184
- onScroll
185
- }, null, 40, _hoisted_5)) : (openBlock(), createElementBlock("div", {
186
- key: 4,
187
- ref_key: "scroller",
188
- ref: scroller,
189
- class: "htw-w-full htw-h-full htw-overflow-auto",
190
- "data-test-id": "story-source-code",
191
- onScroll
192
- }, [
193
- createElementVNode("div", {
194
- class: "__histoire-code htw-p-4 htw-w-fit",
195
- innerHTML: sourceHtml.value
196
- }, null, 8, _hoisted_6)
197
- ], 544))
198
- ]);
199
- };
200
- }
201
- });
202
- export {
203
- _sfc_main as default
204
- };
@@ -1,8 +0,0 @@
1
- import _sfc_main from "./SearchItem.vue2.js";
2
- /* empty css */
3
- import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- "use strict";
5
- const SearchItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9f94ad2b"]]);
6
- export {
7
- SearchItem as default
8
- };
@@ -1,93 +0,0 @@
1
- import { defineComponent, useCssVars, ref, toRefs, createElementBlock, openBlock, unref, createBlock, createCommentVNode, withCtx, createVNode } from "@poveste/vendors/vue";
2
- import { useRouter } from "@poveste/vendors/vue-router";
3
- import { onKeyboardShortcut } from "../../util/keyboard.js";
4
- import { useScrollOnActive } from "../../util/scroll.js";
5
- import "../base/BaseListItem.vue.js";
6
- import BaseListItemLink from "../base/BaseListItemLink.vue.js";
7
- import "./SearchItemContent.vue.js";
8
- import _sfc_main$1 from "./SearchItemContent.vue2.js";
9
- import _sfc_main$2 from "../base/BaseListItem.vue2.js";
10
- "use strict";
11
- const _hoisted_1 = ["data-selected"];
12
- const _sfc_main = /* @__PURE__ */ defineComponent({
13
- __name: "SearchItem",
14
- props: {
15
- result: {
16
- type: Object,
17
- required: true
18
- },
19
- selected: {
20
- type: Boolean,
21
- default: false
22
- }
23
- },
24
- emits: {
25
- close: () => true
26
- },
27
- setup(__props, { emit: __emit }) {
28
- useCssVars((_ctx) => ({
29
- "v1f9aa6ca": __props.result.iconColor
30
- }));
31
- const props = __props;
32
- const emit = __emit;
33
- const el = ref();
34
- const { selected } = toRefs(props);
35
- useScrollOnActive(selected, el);
36
- const router = useRouter();
37
- onKeyboardShortcut(["enter"], () => {
38
- if (!props.selected) return;
39
- action();
40
- });
41
- function action(fromClick = false) {
42
- if ("route" in props.result && !fromClick) {
43
- router.push(props.result.route);
44
- }
45
- if ("onActivate" in props.result) {
46
- props.result.onActivate();
47
- }
48
- emit("close");
49
- }
50
- return (_ctx, _cache) => {
51
- return openBlock(), createElementBlock("div", {
52
- ref_key: "el",
53
- ref: el,
54
- class: "histoire-search-item",
55
- "data-test-id": "search-item",
56
- "data-selected": unref(selected) ? "" : void 0
57
- }, [
58
- "route" in __props.result ? (openBlock(), createBlock(BaseListItemLink, {
59
- key: 0,
60
- to: __props.result.route,
61
- "is-active": unref(selected),
62
- class: "htw-px-6 htw-py-4 htw-gap-4",
63
- onNavigate: _cache[0] || (_cache[0] = ($event) => action(true))
64
- }, {
65
- default: withCtx(() => [
66
- createVNode(_sfc_main$1, {
67
- result: __props.result,
68
- selected: unref(selected)
69
- }, null, 8, ["result", "selected"])
70
- ]),
71
- _: 1
72
- }, 8, ["to", "is-active"])) : createCommentVNode("", true),
73
- "onActivate" in __props.result ? (openBlock(), createBlock(_sfc_main$2, {
74
- key: 1,
75
- "is-active": unref(selected),
76
- class: "htw-px-6 htw-py-4 htw-gap-4",
77
- onNavigate: _cache[1] || (_cache[1] = ($event) => action(true))
78
- }, {
79
- default: withCtx(() => [
80
- createVNode(_sfc_main$1, {
81
- result: __props.result,
82
- selected: unref(selected)
83
- }, null, 8, ["result", "selected"])
84
- ]),
85
- _: 1
86
- }, 8, ["is-active"])) : createCommentVNode("", true)
87
- ], 8, _hoisted_1);
88
- };
89
- }
90
- });
91
- export {
92
- _sfc_main as default
93
- };
@@ -1,5 +0,0 @@
1
- import _sfc_main from "./SearchItemContent.vue2.js";
2
- "use strict";
3
- export {
4
- _sfc_main as default
5
- };
@@ -1,71 +0,0 @@
1
- import { defineComponent, createElementBlock, openBlock, Fragment, createVNode, createElementVNode, normalizeClass, createCommentVNode, createTextVNode, toDisplayString, renderList, createBlock, unref } from "@poveste/vendors/vue";
2
- import { Icon } from "@poveste/vendors/iconify";
3
- import BaseIcon from "../base/BaseIcon.vue.js";
4
- "use strict";
5
- const _hoisted_1 = { class: "htw-flex-1" };
6
- const _hoisted_2 = { class: "htw-flex" };
7
- const _hoisted_3 = { class: "htw-ml-auto htw-opacity-40" };
8
- const _hoisted_4 = {
9
- key: 0,
10
- class: "htw-flex htw-items-center htw-gap-0.5 htw-opacity-60"
11
- };
12
- const _sfc_main = /* @__PURE__ */ defineComponent({
13
- __name: "SearchItemContent",
14
- props: {
15
- result: {},
16
- selected: { type: Boolean }
17
- },
18
- setup(__props) {
19
- const defaultIcons = {
20
- story: "carbon:cube",
21
- variant: "carbon:cube"
22
- };
23
- const kindLabels = {
24
- story: "Story",
25
- variant: "Variant",
26
- command: "Command"
27
- };
28
- return (_ctx, _cache) => {
29
- return openBlock(), createElementBlock(Fragment, null, [
30
- createVNode(BaseIcon, {
31
- icon: __props.result.icon ?? defaultIcons[__props.result.kind],
32
- class: normalizeClass(["htw-w-4 htw-h-4", [
33
- !__props.selected ? [
34
- __props.result.iconColor ? "bind-icon-color" : {
35
- "htw-text-primary-500": __props.result.kind === "story",
36
- "htw-text-gray-500": __props.result.kind === "variant"
37
- }
38
- ] : [],
39
- {
40
- "colorize-black": __props.selected
41
- }
42
- ]])
43
- }, null, 8, ["icon", "class"]),
44
- createElementVNode("div", _hoisted_1, [
45
- createElementVNode("div", _hoisted_2, [
46
- createTextVNode(toDisplayString(__props.result.title) + " ", 1),
47
- createElementVNode("span", _hoisted_3, toDisplayString(kindLabels[__props.result.kind]), 1)
48
- ]),
49
- __props.result.path?.length ? (openBlock(), createElementBlock("div", _hoisted_4, [
50
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.result.path, (p, index) => {
51
- return openBlock(), createElementBlock("div", {
52
- key: index,
53
- class: "htw-flex htw-items-center htw-gap-0.5"
54
- }, [
55
- index > 0 ? (openBlock(), createBlock(unref(Icon), {
56
- key: 0,
57
- icon: "carbon:chevron-right",
58
- class: "htw-w-4 htw-h-4 htw-mt-0.5 htw-opacity-50"
59
- })) : createCommentVNode("", true),
60
- createElementVNode("span", null, toDisplayString(p), 1)
61
- ]);
62
- }), 128))
63
- ])) : createCommentVNode("", true)
64
- ])
65
- ], 64);
66
- };
67
- }
68
- });
69
- export {
70
- _sfc_main as default
71
- };
@@ -1,5 +0,0 @@
1
- import _sfc_main from "./SearchLoading.vue2.js";
2
- "use strict";
3
- export {
4
- _sfc_main as default
5
- };
@@ -1,21 +0,0 @@
1
- import { defineComponent, createElementBlock, openBlock, createVNode, createTextVNode, unref } from "@poveste/vendors/vue";
2
- import { Icon } from "@poveste/vendors/iconify";
3
- "use strict";
4
- const _hoisted_1 = { class: "histoire-search-loading htw-flex htw-items-center htw-gap-4 htw-pl-6 htw-border htw-border-transparent focus-visible:htw-border-primary-500 htw-h-[51px] htw-opacity-30" };
5
- const _sfc_main = /* @__PURE__ */ defineComponent({
6
- __name: "SearchLoading",
7
- setup(__props) {
8
- return (_ctx, _cache) => {
9
- return openBlock(), createElementBlock("div", _hoisted_1, [
10
- createVNode(unref(Icon), {
11
- icon: "carbon:search",
12
- class: "flex-none htw-w-4 htw-h-4"
13
- }),
14
- _cache[0] || (_cache[0] = createTextVNode(" Loading... ", -1))
15
- ]);
16
- };
17
- }
18
- });
19
- export {
20
- _sfc_main as default
21
- };
@@ -1,5 +0,0 @@
1
- import _sfc_main from "./SearchModal.vue2.js";
2
- "use strict";
3
- export {
4
- _sfc_main as default
5
- };
@@ -1,51 +0,0 @@
1
- import { defineComponent, defineAsyncComponent, withDirectives, openBlock, createElementBlock, createElementVNode, createVNode, unref, vShow } from "@poveste/vendors/vue";
2
- import "./SearchLoading.vue.js";
3
- import _sfc_main$1 from "./SearchLoading.vue2.js";
4
- "use strict";
5
- const _hoisted_1 = {
6
- class: "histoire-search-modal htw-fixed htw-inset-0 htw-bg-white/80 dark:htw-bg-gray-900/80 htw-z-20",
7
- "data-test-id": "search-modal"
8
- };
9
- const _hoisted_2 = { class: "htw-bg-white dark:htw-bg-gray-900 md:htw-mt-16 md:htw-mx-auto htw-w-screen htw-max-w-[512px] htw-shadow-xl htw-border htw-border-gray-200 dark:htw-border-gray-750 htw-rounded-lg htw-relative htw-divide-y htw-divide-gray-200 dark:htw-divide-gray-850" };
10
- const _sfc_main = /* @__PURE__ */ defineComponent({
11
- __name: "SearchModal",
12
- props: {
13
- shown: {
14
- type: Boolean,
15
- default: false
16
- }
17
- },
18
- emits: {
19
- close: () => true
20
- },
21
- setup(__props, { emit: __emit }) {
22
- const SearchPane = defineAsyncComponent({
23
- loader: () => import("./SearchPane.vue.js"),
24
- loadingComponent: _sfc_main$1,
25
- delay: 0
26
- });
27
- const emit = __emit;
28
- function close() {
29
- emit("close");
30
- }
31
- return (_ctx, _cache) => {
32
- return withDirectives((openBlock(), createElementBlock("div", _hoisted_1, [
33
- createElementVNode("div", {
34
- class: "htw-absolute htw-inset-0",
35
- onClick: _cache[0] || (_cache[0] = ($event) => close())
36
- }),
37
- createElementVNode("div", _hoisted_2, [
38
- createVNode(unref(SearchPane), {
39
- shown: __props.shown,
40
- onClose: _cache[1] || (_cache[1] = ($event) => close())
41
- }, null, 8, ["shown"])
42
- ])
43
- ], 512)), [
44
- [vShow, __props.shown]
45
- ]);
46
- };
47
- }
48
- });
49
- export {
50
- _sfc_main as default
51
- };
@@ -1,5 +0,0 @@
1
- import _sfc_main from "./SearchPane.vue2.js";
2
- "use strict";
3
- export {
4
- _sfc_main as default
5
- };