@histoire/app 0.17.17 → 1.0.0-alpha.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.
- package/dist/app/style/main.pcss +1 -1
- package/dist/app/style/sandbox.css +1 -1
- package/dist/bundle-main-dev.js +1 -1
- package/dist/bundle-main.js +2 -2
- package/dist/bundled/App.vue2.js +11 -11
- package/dist/bundled/{style.css → app.css} +41 -41
- package/dist/bundled/components/HomeView.vue2.js +1 -1
- package/dist/bundled/components/app/AppHeader.vue2.js +2 -2
- package/dist/bundled/components/app/AppLogo.vue2.js +3 -3
- package/dist/bundled/components/app/Breadcrumb.vue.js +2 -2
- package/dist/bundled/components/app/Breadcrumb.vue2.js +7 -9
- package/dist/bundled/components/app/InitialLoading.vue2.js +1 -1
- package/dist/bundled/components/base/BaseEmpty.vue.js +2 -3
- package/dist/bundled/components/base/BaseIcon.vue.js +1 -1
- package/dist/bundled/components/base/BaseIcon.vue2.js +1 -2
- package/dist/bundled/components/base/BaseListItemLink.vue.js +1 -1
- package/dist/bundled/components/base/BaseOverflowMenu.vue2.js +1 -1
- package/dist/bundled/components/base/BaseOverflowTab.vue.js +1 -1
- package/dist/bundled/components/base/BaseSelect.vue2.js +2 -2
- package/dist/bundled/components/base/BaseSplitPane.vue.js +1 -1
- package/dist/bundled/components/base/BaseSplitPane.vue2.js +2 -4
- package/dist/bundled/components/base/BaseTab.vue.js +1 -1
- package/dist/bundled/components/base/BaseTag.vue.js +1 -1
- package/dist/bundled/components/command/CommandPrompts.vue2.js +3 -7
- package/dist/bundled/components/command/CommandPromptsModal.vue2.js +1 -1
- package/dist/bundled/components/command/PromptSelect.vue2.js +3 -3
- package/dist/bundled/components/command/PromptText.vue2.js +1 -1
- package/dist/bundled/components/misc/CheckerboardPattern.vue.js +31 -34
- package/dist/bundled/components/misc/HatchedPattern.vue.js +2 -3
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue2.js +1 -1
- package/dist/bundled/components/panel/ControlsComponentProps.vue2.js +2 -4
- package/dist/bundled/components/panel/ControlsComponentState.vue2.js +1 -2
- package/dist/bundled/components/panel/PaneTabs.vue2.js +11 -11
- package/dist/bundled/components/panel/StatePresets.vue2.js +3 -4
- package/dist/bundled/components/panel/StoryControls.vue2.js +5 -6
- package/dist/bundled/components/panel/StoryDocs.vue2.js +4 -4
- package/dist/bundled/components/panel/StoryEvents.vue2.js +2 -2
- package/dist/bundled/components/panel/StorySidePanel.vue2.js +10 -12
- package/dist/bundled/components/panel/StorySourceCode.vue.js +2 -2
- package/dist/bundled/components/panel/StorySourceCode.vue2.js +15 -20
- package/dist/bundled/components/search/SearchItem.vue.js +2 -2
- package/dist/bundled/components/search/SearchItem.vue2.js +4 -6
- package/dist/bundled/components/search/SearchLoading.vue2.js +2 -2
- package/dist/bundled/components/search/SearchModal.vue2.js +1 -1
- package/dist/bundled/components/search/SearchPane.vue2.js +41 -59
- package/dist/bundled/components/search/search-docs-data.js +1 -1
- package/dist/bundled/components/search/search-title-data.js +1 -1
- package/dist/bundled/components/story/GenericMountStory.vue2.js +1 -1
- package/dist/bundled/components/story/StoryResponsivePreview.vue.js +2 -2
- package/dist/bundled/components/story/StoryResponsivePreview.vue2.js +7 -10
- package/dist/bundled/components/story/StoryVariantGrid.vue2.js +4 -7
- package/dist/bundled/components/story/StoryVariantGridItem.vue.js +2 -2
- package/dist/bundled/components/story/StoryVariantGridItem.vue2.js +13 -15
- package/dist/bundled/components/story/StoryVariantListItem.vue.js +2 -2
- package/dist/bundled/components/story/StoryVariantListItem.vue2.js +3 -4
- package/dist/bundled/components/story/StoryVariantSingle.vue.js +2 -2
- package/dist/bundled/components/story/StoryVariantSingle.vue2.js +2 -3
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue2.js +2 -2
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue2.js +3 -3
- package/dist/bundled/components/story/StoryVariantSingleView.vue2.js +4 -4
- package/dist/bundled/components/story/StoryView.vue2.js +4 -4
- package/dist/bundled/components/story/StoryViewer.vue.js +2 -2
- package/dist/bundled/components/story/StoryViewer.vue2.js +3 -4
- package/dist/bundled/components/toolbar/ToolbarBackground.vue.js +1 -1
- package/dist/bundled/components/toolbar/ToolbarBackground.vue2.js +3 -4
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue2.js +16 -17
- package/dist/bundled/components/tree/StoryGroup.vue2.js +8 -10
- package/dist/bundled/components/tree/StoryList.vue2.js +3 -3
- package/dist/bundled/components/tree/StoryListFolder.vue.js +2 -2
- package/dist/bundled/components/tree/StoryListFolder.vue2.js +11 -13
- package/dist/bundled/components/tree/StoryListItem.vue.js +2 -2
- package/dist/bundled/components/tree/StoryListItem.vue2.js +4 -5
- package/dist/bundled/index.js +4 -4
- package/dist/bundled/plugin.js +1 -2
- package/dist/bundled/sandbox.js +14 -19
- package/dist/bundled/stores/folder.js +1 -1
- package/dist/bundled/stores/preview-settings.js +1 -1
- package/dist/bundled/util/dark.js +1 -1
- package/dist/bundled/util/events.js +2 -4
- package/dist/bundled/util/scroll.js +1 -1
- package/dist/style.css +281 -293
- package/package.json +22 -23
- package/src/app/App.vue +11 -11
- package/src/app/api.ts +2 -2
- package/src/app/components/HomeView.vue +1 -1
- package/src/app/components/app/AppHeader.vue +1 -1
- package/src/app/components/app/AppLogo.vue +3 -3
- package/src/app/components/app/Breadcrumb.vue +2 -2
- package/src/app/components/base/BaseOverflowMenu.vue +2 -2
- package/src/app/components/base/BaseSelect.vue +2 -2
- package/src/app/components/command/CommandPrompts.vue +3 -6
- package/src/app/components/command/PromptSelect.vue +1 -1
- package/src/app/components/panel/ControlsComponentPropItem.vue +3 -3
- package/src/app/components/panel/ControlsComponentProps.vue +1 -1
- package/src/app/components/panel/ControlsComponentState.vue +2 -2
- package/src/app/components/panel/ControlsComponentStateItem.vue +2 -2
- package/src/app/components/panel/PaneTabs.vue +2 -2
- package/src/app/components/panel/StatePresets.vue +4 -4
- package/src/app/components/panel/StoryControls.vue +4 -4
- package/src/app/components/panel/StoryDocs.vue +5 -5
- package/src/app/components/panel/StoryEvent.vue +1 -1
- package/src/app/components/panel/StoryEvents.vue +2 -2
- package/src/app/components/panel/StorySidePanel.vue +2 -2
- package/src/app/components/panel/StorySourceCode.vue +4 -4
- package/src/app/components/search/SearchItem.vue +2 -2
- package/src/app/components/search/SearchItemContent.vue +1 -1
- package/src/app/components/search/SearchPane.vue +49 -61
- package/src/app/components/search/search-docs-data.ts +2 -2
- package/src/app/components/search/search-title-data.ts +2 -2
- package/src/app/components/search/types.ts +1 -1
- package/src/app/components/story/GenericMountStory.vue +1 -1
- package/src/app/components/story/GenericRenderStory.vue +1 -1
- package/src/app/components/story/StoryResponsivePreview.vue +5 -5
- package/src/app/components/story/StoryVariantGrid.vue +1 -1
- package/src/app/components/story/StoryVariantGridItem.vue +8 -8
- package/src/app/components/story/StoryVariantListItem.vue +3 -3
- package/src/app/components/story/StoryVariantSingle.vue +1 -1
- package/src/app/components/story/StoryVariantSinglePreviewNative.vue +3 -3
- package/src/app/components/story/StoryVariantSinglePreviewRemote.vue +6 -6
- package/src/app/components/story/StoryVariantSingleView.vue +4 -4
- package/src/app/components/story/StoryView.vue +4 -4
- package/src/app/components/story/StoryViewer.vue +1 -1
- package/src/app/components/toolbar/ToolbarNewTab.vue +1 -1
- package/src/app/components/toolbar/ToolbarTitle.vue +1 -1
- package/src/app/components/tree/StoryGroup.vue +2 -2
- package/src/app/components/tree/StoryList.vue +2 -2
- package/src/app/components/tree/StoryListFolder.vue +1 -1
- package/src/app/components/tree/StoryListItem.vue +2 -2
- package/src/app/index.ts +4 -4
- package/src/app/sandbox.ts +13 -17
- package/src/app/stores/folder.ts +1 -1
- package/src/app/stores/preview-settings.ts +2 -2
- package/src/app/stores/story.ts +1 -1
- package/src/app/style/main.pcss +1 -1
- package/src/app/style/sandbox.css +1 -1
- package/src/app/types.ts +1 -1
- package/src/app/util/dark.ts +1 -1
- package/src/app/util/docs.ts +1 -1
- package/src/app/util/keyboard.ts +1 -1
- package/src/app/util/mapping.ts +1 -1
- package/src/app/util/preview-settings.ts +1 -1
- package/src/app/util/sandbox.ts +1 -1
- package/src/app/util/scroll.ts +1 -1
- package/src/app/util/variant.ts +1 -1
- package/src/bundle-main-dev.js +1 -1
- package/src/bundle-main.js +2 -2
- package/tailwind.config.cjs +1 -1
- package/vite.config.ts +2 -2
- package/dist/bundled/components/app/Breadcrumb.vue3.js +0 -1
- package/dist/bundled/components/base/BaseEmpty.vue2.js +0 -1
- package/dist/bundled/components/base/BaseIcon.vue3.js +0 -1
- package/dist/bundled/components/base/BaseSplitPane.vue3.js +0 -1
- package/dist/bundled/components/misc/HatchedPattern.vue2.js +0 -1
- package/dist/bundled/components/panel/StorySourceCode.vue3.js +0 -1
- package/dist/bundled/components/search/SearchItem.vue3.js +0 -1
- package/dist/bundled/components/story/StoryResponsivePreview.vue3.js +0 -1
- package/dist/bundled/components/story/StoryVariantGridItem.vue3.js +0 -1
- package/dist/bundled/components/story/StoryVariantListItem.vue3.js +0 -1
- package/dist/bundled/components/story/StoryVariantSingle.vue3.js +0 -1
- package/dist/bundled/components/story/StoryViewer.vue3.js +0 -1
- package/dist/bundled/components/toolbar/ToolbarBackground.vue3.js +0 -1
- package/dist/bundled/components/tree/StoryListFolder.vue3.js +0 -1
- package/dist/bundled/components/tree/StoryListItem.vue3.js +0 -1
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/common.js +0 -52
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang/en.js +0 -10
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang/latin/advanced.js +0 -16
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang/latin/balance.js +0 -31
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang/latin/simple.js +0 -15
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang.js +0 -60
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/type.js +0 -11
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, toRefs, computed, openBlock, createBlock, withCtx, createVNode, createTextVNode, normalizeClass, unref, toDisplayString, createCommentVNode } from "@histoire/vendors/vue";
|
|
2
|
-
import BaseTab from "../base/BaseTab.vue.js";
|
|
3
2
|
import { useEventsStore } from "../../stores/events.js";
|
|
4
3
|
import "../base/BaseOverflowMenu.vue.js";
|
|
5
4
|
import BaseOverflowTab from "../base/BaseOverflowTab.vue.js";
|
|
5
|
+
import BaseTab from "../base/BaseTab.vue.js";
|
|
6
6
|
import BaseTag from "../base/BaseTag.vue.js";
|
|
7
7
|
import "./StoryDocs.vue.js";
|
|
8
8
|
import { useStoryDoc } from "./StoryDocs.vue2.js";
|
|
@@ -27,9 +27,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
27
|
to: { ..._ctx.$route, query: { ..._ctx.$route.query, tab: "" } },
|
|
28
28
|
matched: !_ctx.$route.query.tab
|
|
29
29
|
}, {
|
|
30
|
-
default: withCtx(() => [
|
|
30
|
+
default: withCtx(() => _cache[3] || (_cache[3] = [
|
|
31
31
|
createTextVNode(" Controls ")
|
|
32
|
-
]),
|
|
32
|
+
])),
|
|
33
33
|
_: 1
|
|
34
34
|
}, 8, ["to", "matched"]),
|
|
35
35
|
createVNode(BaseOverflowTab, {
|
|
@@ -39,9 +39,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
39
39
|
"opacity-50": !unref(renderedDoc)
|
|
40
40
|
})
|
|
41
41
|
}, {
|
|
42
|
-
default: withCtx(() => [
|
|
42
|
+
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
43
43
|
createTextVNode(" Docs ")
|
|
44
|
-
]),
|
|
44
|
+
])),
|
|
45
45
|
_: 1
|
|
46
46
|
}, 8, ["to", "matched", "class"]),
|
|
47
47
|
createVNode(BaseOverflowTab, {
|
|
@@ -52,7 +52,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
52
52
|
})
|
|
53
53
|
}, {
|
|
54
54
|
default: withCtx(() => [
|
|
55
|
-
createTextVNode(" Events "),
|
|
55
|
+
_cache[5] || (_cache[5] = createTextVNode(" Events ")),
|
|
56
56
|
unref(eventsStore).unseen ? (openBlock(), createBlock(BaseTag, { key: 0 }, {
|
|
57
57
|
default: withCtx(() => [
|
|
58
58
|
createTextVNode(toDisplayString(unref(eventsStore).unseen <= 99 ? unref(eventsStore).unseen : "99+"), 1)
|
|
@@ -68,9 +68,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
68
68
|
to: { ..._ctx.$route, query: { ..._ctx.$route.query, tab: "" } },
|
|
69
69
|
matched: !_ctx.$route.query.tab
|
|
70
70
|
}, {
|
|
71
|
-
default: withCtx(() => [
|
|
71
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
72
72
|
createTextVNode(" Controls ")
|
|
73
|
-
]),
|
|
73
|
+
])),
|
|
74
74
|
_: 1
|
|
75
75
|
}, 8, ["to", "matched"]),
|
|
76
76
|
createVNode(BaseTab, {
|
|
@@ -80,9 +80,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
80
80
|
"htw-opacity-50": !unref(renderedDoc)
|
|
81
81
|
})
|
|
82
82
|
}, {
|
|
83
|
-
default: withCtx(() => [
|
|
83
|
+
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
84
84
|
createTextVNode(" Docs ")
|
|
85
|
-
]),
|
|
85
|
+
])),
|
|
86
86
|
_: 1
|
|
87
87
|
}, 8, ["to", "matched", "class"]),
|
|
88
88
|
createVNode(BaseTab, {
|
|
@@ -93,7 +93,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
93
93
|
})
|
|
94
94
|
}, {
|
|
95
95
|
default: withCtx(() => [
|
|
96
|
-
createTextVNode(" Events "),
|
|
96
|
+
_cache[2] || (_cache[2] = createTextVNode(" Events ")),
|
|
97
97
|
unref(eventsStore).unseen ? (openBlock(), createBlock(BaseTag, { key: 0 }, {
|
|
98
98
|
default: withCtx(() => [
|
|
99
99
|
createTextVNode(toDisplayString(unref(eventsStore).unseen <= 99 ? unref(eventsStore).unseen : "99+"), 1)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent, computed, onMounted, ref, resolveDirective, openBlock, createElementBlock, createElementVNode, createVNode, unref, isRef, withKeys, withCtx, withDirectives, withModifiers, vModelText, toDisplayString, createBlock, createCommentVNode, normalizeClass, nextTick } from "@histoire/vendors/vue";
|
|
2
|
+
import { clone, omit, applyState } from "@histoire/shared";
|
|
2
3
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
4
|
import { useStorage, useTimeoutFn, onClickOutside } from "@histoire/vendors/vue-use";
|
|
4
|
-
import { clone, omit, applyState } from "@histoire/shared";
|
|
5
|
-
import "../base/BaseSelect.vue.js";
|
|
6
5
|
import { toRawDeep } from "../../util/state.js";
|
|
6
|
+
import "../base/BaseSelect.vue.js";
|
|
7
7
|
import _sfc_main$1 from "../base/BaseSelect.vue2.js";
|
|
8
8
|
"use strict";
|
|
9
9
|
const _hoisted_1 = { class: "histoire-state-presets htw-flex htw-gap-2 htw-w-full htw-items-center" };
|
|
@@ -75,8 +75,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
75
75
|
savedNotif.value = false;
|
|
76
76
|
}, 1e3);
|
|
77
77
|
async function savePreset() {
|
|
78
|
-
if (!canEdit.value)
|
|
79
|
-
return;
|
|
78
|
+
if (!canEdit.value) return;
|
|
80
79
|
const preset = presetStates.value.get(selectedOption.value);
|
|
81
80
|
preset.state = clone(omit(toRawDeep(props.variant.state), omitKeys));
|
|
82
81
|
savedNotif.value = true;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, computed, openBlock, createElementBlock, createElementVNode, createBlock, createCommentVNode, createVNode, withCtx, unref, Fragment, renderList } from "@histoire/vendors/vue";
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
|
-
import "../story/GenericRenderStory.vue.js";
|
|
4
3
|
import BaseEmpty from "../base/BaseEmpty.vue.js";
|
|
5
|
-
import "
|
|
4
|
+
import "../story/GenericRenderStory.vue.js";
|
|
6
5
|
import "./ControlsComponentProps.vue.js";
|
|
7
6
|
import "./ControlsComponentState.vue.js";
|
|
7
|
+
import "./StatePresets.vue.js";
|
|
8
8
|
import _sfc_main$1 from "./StatePresets.vue2.js";
|
|
9
9
|
import _sfc_main$2 from "../story/GenericRenderStory.vue2.js";
|
|
10
10
|
import _sfc_main$3 from "./ControlsComponentState.vue2.js";
|
|
@@ -16,8 +16,7 @@ const _hoisted_1 = {
|
|
|
16
16
|
};
|
|
17
17
|
const _hoisted_2 = { class: "htw-h-9 htw-flex-none htw-px-2 htw-flex htw-items-center" };
|
|
18
18
|
const _hoisted_3 = { key: 1 };
|
|
19
|
-
const _hoisted_4 =
|
|
20
|
-
const _hoisted_5 = { key: 3 };
|
|
19
|
+
const _hoisted_4 = { key: 3 };
|
|
21
20
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
22
21
|
__name: "StoryControls",
|
|
23
22
|
props: {
|
|
@@ -66,11 +65,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
66
65
|
icon: "carbon:audio-console",
|
|
67
66
|
class: "htw-w-8 htw-h-8 htw-opacity-50 htw-mb-6"
|
|
68
67
|
}),
|
|
69
|
-
|
|
68
|
+
_cache[1] || (_cache[1] = createElementVNode("span", null, "No controls available for this story", -1))
|
|
70
69
|
]),
|
|
71
70
|
_: 1
|
|
72
71
|
})) : createCommentVNode("", true),
|
|
73
|
-
((_d = (_c = __props.variant.state) == null ? void 0 : _c._hPropDefs) == null ? void 0 : _d.length) ? (openBlock(), createElementBlock("div",
|
|
72
|
+
((_d = (_c = __props.variant.state) == null ? void 0 : _c._hPropDefs) == null ? void 0 : _d.length) ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
74
73
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.variant.state._hPropDefs, (def, index) => {
|
|
75
74
|
return openBlock(), createBlock(_sfc_main$4, {
|
|
76
75
|
key: index,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent, toRefs, watch, ref, computed, openBlock, createElementBlock, unref, normalizeClass, createBlock, createCommentVNode, withCtx, createVNode, createTextVNode, watchEffect, nextTick } from "@histoire/vendors/vue";
|
|
2
|
-
import { markdownFiles } from "virtual:$histoire-markdown-files";
|
|
3
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
|
+
import { markdownFiles } from "virtual:$histoire-markdown-files";
|
|
4
4
|
import { useRouter, useRoute } from "@histoire/vendors/vue-router";
|
|
5
5
|
import { histoireConfig } from "../../util/config.js";
|
|
6
|
-
import "../toolbar/DevOnlyToolbarOpenInEditor.vue.js";
|
|
7
6
|
import BaseEmpty from "../base/BaseEmpty.vue.js";
|
|
7
|
+
import "../toolbar/DevOnlyToolbarOpenInEditor.vue.js";
|
|
8
8
|
import _sfc_main$1 from "../toolbar/DevOnlyToolbarOpenInEditor.vue2.js";
|
|
9
9
|
"use strict";
|
|
10
10
|
const _hoisted_1 = ["innerHTML"];
|
|
@@ -12,7 +12,7 @@ function useStoryDoc(story) {
|
|
|
12
12
|
const renderedDoc = ref("");
|
|
13
13
|
watchEffect(async () => {
|
|
14
14
|
var _a;
|
|
15
|
-
const mdKey = story.value.file.filePath.replace(/\.(\w
|
|
15
|
+
const mdKey = story.value.file.filePath.replace(/\.(\w*)$/, ".md");
|
|
16
16
|
if (markdownFiles[mdKey]) {
|
|
17
17
|
const md = await markdownFiles[mdKey]();
|
|
18
18
|
renderedDoc.value = md.html;
|
|
@@ -144,7 +144,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
144
144
|
icon: "carbon:document-unknown",
|
|
145
145
|
class: "htw-w-8 htw-h-8 htw-opacity-50 htw-mb-6"
|
|
146
146
|
}),
|
|
147
|
-
createTextVNode(" No documentation available ")
|
|
147
|
+
_cache[0] || (_cache[0] = createTextVNode(" No documentation available "))
|
|
148
148
|
]),
|
|
149
149
|
_: 1
|
|
150
150
|
})) : (openBlock(), createElementBlock("div", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, onMounted, watch, nextTick, ref, openBlock, createElementBlock, createBlock, withCtx, createVNode, unref, createTextVNode, Fragment, renderList } from "@histoire/vendors/vue";
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
|
-
import BaseEmpty from "../base/BaseEmpty.vue.js";
|
|
4
3
|
import { useEventsStore } from "../../stores/events.js";
|
|
4
|
+
import BaseEmpty from "../base/BaseEmpty.vue.js";
|
|
5
5
|
import "./StoryEvent.vue.js";
|
|
6
6
|
import _sfc_main$1 from "./StoryEvent.vue2.js";
|
|
7
7
|
"use strict";
|
|
@@ -33,7 +33,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
33
|
icon: "carbon:event-schedule",
|
|
34
34
|
class: "htw-w-8 htw-h-8 htw-opacity-50 htw-mb-6"
|
|
35
35
|
}),
|
|
36
|
-
createTextVNode(" No event fired ")
|
|
36
|
+
_cache[0] || (_cache[0] = createTextVNode(" No event fired "))
|
|
37
37
|
]),
|
|
38
38
|
_: 1
|
|
39
39
|
})) : (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import { defineComponent, computed, unref, openBlock, createBlock, withCtx, createElementVNode, createVNode, resolveDynamicComponent } from "@histoire/vendors/vue";
|
|
2
2
|
import { useRoute } from "@histoire/vendors/vue-router";
|
|
3
3
|
import { useStoryStore } from "../../stores/story.js";
|
|
4
|
-
import BaseSplitPane from "../base/BaseSplitPane.vue.js";
|
|
5
4
|
import BaseEmpty from "../base/BaseEmpty.vue.js";
|
|
5
|
+
import BaseSplitPane from "../base/BaseSplitPane.vue.js";
|
|
6
|
+
import "./PaneTabs.vue.js";
|
|
6
7
|
import "./StoryControls.vue.js";
|
|
7
8
|
import "./StoryDocs.vue.js";
|
|
8
9
|
import "./StoryEvents.vue.js";
|
|
9
10
|
import StorySourceCode from "./StorySourceCode.vue.js";
|
|
10
|
-
import "./PaneTabs.vue.js";
|
|
11
11
|
import _sfc_main$1 from "./StoryControls.vue2.js";
|
|
12
12
|
import _sfc_main$2 from "./StoryEvents.vue2.js";
|
|
13
13
|
import _sfc_main$3 from "./StoryDocs.vue2.js";
|
|
14
14
|
import _sfc_main$4 from "./PaneTabs.vue2.js";
|
|
15
15
|
"use strict";
|
|
16
|
-
const _hoisted_1 =
|
|
17
|
-
const _hoisted_2 = /* @__PURE__ */ createElementVNode("span", null, "Loading...", -1);
|
|
18
|
-
const _hoisted_3 = { class: "htw-flex htw-flex-col htw-h-full" };
|
|
16
|
+
const _hoisted_1 = { class: "htw-flex htw-flex-col htw-h-full" };
|
|
19
17
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
18
|
__name: "StorySidePanel",
|
|
21
19
|
setup(__props) {
|
|
@@ -36,17 +34,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
36
34
|
key: 0,
|
|
37
35
|
class: "histoire-story-side-panel histoire-selection"
|
|
38
36
|
}, {
|
|
39
|
-
default: withCtx(() => [
|
|
40
|
-
|
|
41
|
-
]),
|
|
37
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
38
|
+
createElementVNode("span", null, "Select a variant", -1)
|
|
39
|
+
])),
|
|
42
40
|
_: 1
|
|
43
41
|
})) : !unref(storyStore).currentVariant.configReady || !unref(storyStore).currentVariant.previewReady ? (openBlock(), createBlock(BaseEmpty, {
|
|
44
42
|
key: 1,
|
|
45
43
|
class: "histoire-story-side-panel histoire-loading"
|
|
46
44
|
}, {
|
|
47
|
-
default: withCtx(() => [
|
|
48
|
-
|
|
49
|
-
]),
|
|
45
|
+
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
46
|
+
createElementVNode("span", null, "Loading...", -1)
|
|
47
|
+
])),
|
|
50
48
|
_: 1
|
|
51
49
|
})) : (openBlock(), createBlock(BaseSplitPane, {
|
|
52
50
|
key: 2,
|
|
@@ -56,7 +54,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
56
54
|
"data-test-id": "story-side-panel"
|
|
57
55
|
}, {
|
|
58
56
|
first: withCtx(() => [
|
|
59
|
-
createElementVNode("div",
|
|
57
|
+
createElementVNode("div", _hoisted_1, [
|
|
60
58
|
createVNode(_sfc_main$4, {
|
|
61
59
|
story: unref(storyStore).currentStory,
|
|
62
60
|
variant: unref(storyStore).currentVariant
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _sfc_main from "./StorySourceCode.vue2.js";
|
|
2
|
-
|
|
2
|
+
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
"use strict";
|
|
5
|
-
const StorySourceCode = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const StorySourceCode = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d17c2406"]]);
|
|
6
6
|
export {
|
|
7
7
|
StorySourceCode as default
|
|
8
8
|
};
|
|
@@ -1,28 +1,24 @@
|
|
|
1
|
-
import { defineComponent, ref, watchEffect, markRaw, shallowRef, watch, computed, onMounted, nextTick, resolveDirective, openBlock, createElementBlock, createElementVNode, withDirectives, normalizeClass, createVNode, unref, createCommentVNode, toDisplayString, createBlock, withCtx
|
|
2
|
-
import { Icon } from "@histoire/vendors/iconify";
|
|
3
|
-
import { getHighlighter } from "shiki-es";
|
|
1
|
+
import { defineComponent, ref, watchEffect, markRaw, shallowRef, watch, computed, onMounted, nextTick, resolveDirective, openBlock, createElementBlock, createElementVNode, withDirectives, normalizeClass, createVNode, unref, createCommentVNode, toDisplayString, createBlock, withCtx } from "@histoire/vendors/vue";
|
|
4
2
|
import { HstCopyIcon } from "@histoire/controls";
|
|
5
3
|
import { unindent } from "@histoire/shared";
|
|
4
|
+
import { Icon } from "@histoire/vendors/iconify";
|
|
5
|
+
import { getHighlighter } from "shiki-es";
|
|
6
6
|
import { clientSupportPlugins } from "virtual:$histoire-support-plugins-client";
|
|
7
7
|
import { isDark } from "../../util/dark.js";
|
|
8
8
|
import BaseEmpty from "../base/BaseEmpty.vue.js";
|
|
9
9
|
"use strict";
|
|
10
|
-
const _withScopeId = (n) => (pushScopeId("data-v-f7d2e46a"), n = n(), popScopeId(), n);
|
|
11
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" };
|
|
12
11
|
const _hoisted_2 = {
|
|
13
12
|
key: 0,
|
|
14
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"
|
|
15
14
|
};
|
|
16
|
-
const _hoisted_3 =
|
|
17
|
-
const _hoisted_4 =
|
|
18
|
-
const _hoisted_5 = { class: "htw-flex htw-flex-none htw-gap-px htw-h-full htw-py-2" };
|
|
19
|
-
const _hoisted_6 = {
|
|
15
|
+
const _hoisted_3 = { class: "htw-flex htw-flex-none htw-gap-px htw-h-full htw-py-2" };
|
|
16
|
+
const _hoisted_4 = {
|
|
20
17
|
key: 1,
|
|
21
18
|
class: "htw-text-red-500 htw-h-full htw-p-2 htw-overflow-auto htw-font-mono htw-text-sm"
|
|
22
19
|
};
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const _hoisted_9 = ["innerHTML"];
|
|
20
|
+
const _hoisted_5 = ["value"];
|
|
21
|
+
const _hoisted_6 = ["innerHTML"];
|
|
26
22
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
27
23
|
__name: "StorySourceCode",
|
|
28
24
|
props: {
|
|
@@ -45,8 +41,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
41
|
const error = ref(null);
|
|
46
42
|
watch(() => [props.variant, generateSourceCodeFn.value], async () => {
|
|
47
43
|
var _a, _b, _c, _d;
|
|
48
|
-
if (!generateSourceCodeFn.value)
|
|
49
|
-
return;
|
|
44
|
+
if (!generateSourceCodeFn.value) return;
|
|
50
45
|
error.value = null;
|
|
51
46
|
dynamicSourceCode.value = "";
|
|
52
47
|
try {
|
|
@@ -131,9 +126,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
131
126
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
132
127
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
133
128
|
!error.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
createElementVNode("div",
|
|
129
|
+
_cache[2] || (_cache[2] = createElementVNode("div", { class: "htw-text-gray-900 dark:htw-text-gray-100" }, " Source ", -1)),
|
|
130
|
+
_cache[3] || (_cache[3] = createElementVNode("div", { class: "htw-flex-1" }, null, -1)),
|
|
131
|
+
createElementVNode("div", _hoisted_3, [
|
|
137
132
|
withDirectives((openBlock(), createElementBlock("button", {
|
|
138
133
|
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", [
|
|
139
134
|
displayedSource.value !== "dynamic" ? "htw-max-w-6 htw-opacity-70" : "htw-max-w-[82px] htw-text-primary-600 dark:htw-text-primary-400",
|
|
@@ -178,13 +173,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
178
173
|
class: "htw-flex-none"
|
|
179
174
|
}, null, 8, ["content"])
|
|
180
175
|
])) : createCommentVNode("", true),
|
|
181
|
-
error.value ? (openBlock(), createElementBlock("div",
|
|
176
|
+
error.value ? (openBlock(), createElementBlock("div", _hoisted_4, " Error: " + toDisplayString(error.value), 1)) : !displayedSourceCode.value ? (openBlock(), createBlock(BaseEmpty, { key: 2 }, {
|
|
182
177
|
default: withCtx(() => [
|
|
183
178
|
createVNode(unref(Icon), {
|
|
184
179
|
icon: "carbon:code-hide",
|
|
185
180
|
class: "htw-w-8 htw-h-8 htw-opacity-50 htw-mb-6"
|
|
186
181
|
}),
|
|
187
|
-
|
|
182
|
+
_cache[4] || (_cache[4] = createElementVNode("span", null, "Not available", -1))
|
|
188
183
|
]),
|
|
189
184
|
_: 1
|
|
190
185
|
})) : !sourceHtml.value ? (openBlock(), createElementBlock("textarea", {
|
|
@@ -196,7 +191,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
196
191
|
readonly: "",
|
|
197
192
|
"data-test-id": "story-source-code",
|
|
198
193
|
onScroll
|
|
199
|
-
}, null, 40,
|
|
194
|
+
}, null, 40, _hoisted_5)) : (openBlock(), createElementBlock("div", {
|
|
200
195
|
key: 4,
|
|
201
196
|
ref_key: "scroller",
|
|
202
197
|
ref: scroller,
|
|
@@ -207,7 +202,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
207
202
|
createElementVNode("div", {
|
|
208
203
|
class: "__histoire-code htw-p-4 htw-w-fit",
|
|
209
204
|
innerHTML: sourceHtml.value
|
|
210
|
-
}, null, 8,
|
|
205
|
+
}, null, 8, _hoisted_6)
|
|
211
206
|
], 544))
|
|
212
207
|
]);
|
|
213
208
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _sfc_main from "./SearchItem.vue2.js";
|
|
2
|
-
|
|
2
|
+
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
"use strict";
|
|
5
|
-
const SearchItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const SearchItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9f94ad2b"]]);
|
|
6
6
|
export {
|
|
7
7
|
SearchItem as default
|
|
8
8
|
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { defineComponent, useCssVars, ref, toRefs, openBlock, createElementBlock, unref, createBlock, withCtx, createVNode, createCommentVNode
|
|
1
|
+
import { defineComponent, useCssVars, ref, toRefs, openBlock, createElementBlock, unref, createBlock, withCtx, createVNode, createCommentVNode } from "@histoire/vendors/vue";
|
|
2
2
|
import { useRouter } from "@histoire/vendors/vue-router";
|
|
3
3
|
import { onKeyboardShortcut } from "../../util/keyboard.js";
|
|
4
4
|
import { useScrollOnActive } from "../../util/scroll.js";
|
|
5
|
-
import BaseListItemLink from "../base/BaseListItemLink.vue.js";
|
|
6
5
|
import "../base/BaseListItem.vue.js";
|
|
6
|
+
import BaseListItemLink from "../base/BaseListItemLink.vue.js";
|
|
7
7
|
import "./SearchItemContent.vue.js";
|
|
8
8
|
import _sfc_main$1 from "./SearchItemContent.vue2.js";
|
|
9
9
|
import _sfc_main$2 from "../base/BaseListItem.vue2.js";
|
|
10
10
|
"use strict";
|
|
11
|
-
const _withScopeId = (n) => (pushScopeId("data-v-d75a2748"), n = n(), popScopeId(), n);
|
|
12
11
|
const _hoisted_1 = ["data-selected"];
|
|
13
12
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
13
|
__name: "SearchItem",
|
|
@@ -27,7 +26,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
26
|
},
|
|
28
27
|
setup(__props, { emit: __emit }) {
|
|
29
28
|
useCssVars((_ctx) => ({
|
|
30
|
-
"
|
|
29
|
+
"1f9aa6ca": __props.result.iconColor
|
|
31
30
|
}));
|
|
32
31
|
const props = __props;
|
|
33
32
|
const emit = __emit;
|
|
@@ -36,8 +35,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
36
35
|
useScrollOnActive(selected, el);
|
|
37
36
|
const router = useRouter();
|
|
38
37
|
onKeyboardShortcut(["enter"], () => {
|
|
39
|
-
if (!props.selected)
|
|
40
|
-
return;
|
|
38
|
+
if (!props.selected) return;
|
|
41
39
|
action();
|
|
42
40
|
});
|
|
43
41
|
function action(fromClick = false) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openBlock,
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createVNode, unref, createTextVNode } from "@histoire/vendors/vue";
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
3
|
"use strict";
|
|
4
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" };
|
|
@@ -11,7 +11,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
11
11
|
icon: "carbon:search",
|
|
12
12
|
class: "flex-none htw-w-4 htw-h-4"
|
|
13
13
|
}),
|
|
14
|
-
createTextVNode(" Loading... ")
|
|
14
|
+
_cache[0] || (_cache[0] = createTextVNode(" Loading... "))
|
|
15
15
|
]);
|
|
16
16
|
};
|
|
17
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineAsyncComponent, openBlock,
|
|
1
|
+
import { defineComponent, defineAsyncComponent, withDirectives, openBlock, createElementBlock, createElementVNode, createVNode, unref, vShow } from "@histoire/vendors/vue";
|
|
2
2
|
import "./SearchLoading.vue.js";
|
|
3
3
|
import _sfc_main$1 from "./SearchLoading.vue2.js";
|
|
4
4
|
"use strict";
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, computed, openBlock, createElementBlock, Fragment, createElementVNode, createVNode, unref, withDirectives, withKeys, withModifiers, vModelText, createBlock, withCtx, createTextVNode, renderList, createCommentVNode } from "@histoire/vendors/vue";
|
|
2
|
-
import { useFocus, useDebounce } from "@histoire/vendors/vue-use";
|
|
3
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import language from "../../node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang/en.js";
|
|
3
|
+
import { useFocus, useDebounce } from "@histoire/vendors/vue-use";
|
|
4
|
+
import Fuse from "fuse.js";
|
|
7
5
|
import { registeredCommands } from "virtual:$histoire-commands";
|
|
6
|
+
import { useCommandStore } from "../../stores/command.js";
|
|
8
7
|
import { useStoryStore } from "../../stores/story.js";
|
|
9
|
-
import BaseEmpty from "../base/BaseEmpty.vue.js";
|
|
10
8
|
import { getCommandContext, builtinCommands } from "../../util/commands.js";
|
|
11
|
-
import { useCommandStore } from "../../stores/command.js";
|
|
12
9
|
import { useSelection } from "../../util/select.js";
|
|
13
|
-
import
|
|
10
|
+
import BaseEmpty from "../base/BaseEmpty.vue.js";
|
|
14
11
|
import { onUpdate, searchData } from "./search-title-data.js";
|
|
12
|
+
import SearchItem from "./SearchItem.vue.js";
|
|
15
13
|
"use strict";
|
|
16
14
|
const _hoisted_1 = {
|
|
17
15
|
key: 1,
|
|
@@ -53,24 +51,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
53
51
|
let titleSearchIndex;
|
|
54
52
|
let titleIdMap;
|
|
55
53
|
function createIndex() {
|
|
56
|
-
return new
|
|
57
|
-
|
|
58
|
-
document: {
|
|
59
|
-
id: "id",
|
|
60
|
-
index: [
|
|
61
|
-
"text"
|
|
62
|
-
]
|
|
63
|
-
},
|
|
64
|
-
worker: true,
|
|
65
|
-
charset,
|
|
66
|
-
language,
|
|
67
|
-
tokenize: "forward"
|
|
54
|
+
return new Fuse([], {
|
|
55
|
+
keys: ["text"]
|
|
68
56
|
});
|
|
69
57
|
}
|
|
70
58
|
async function loadSearchIndex(data) {
|
|
71
59
|
titleSearchIndex = createIndex();
|
|
72
|
-
for (const
|
|
73
|
-
|
|
60
|
+
for (const document of data.index) {
|
|
61
|
+
titleSearchIndex.add(document);
|
|
74
62
|
}
|
|
75
63
|
titleIdMap = data.idMap;
|
|
76
64
|
}
|
|
@@ -83,16 +71,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
83
71
|
async function loadDocSearchIndex() {
|
|
84
72
|
async function load(data) {
|
|
85
73
|
docSearchIndex = createIndex();
|
|
86
|
-
for (const
|
|
87
|
-
|
|
74
|
+
for (const document of data.index) {
|
|
75
|
+
docSearchIndex.add(document);
|
|
88
76
|
}
|
|
89
77
|
docIdMap = data.idMap;
|
|
90
78
|
if (rateLimitedSearch.value) {
|
|
91
|
-
searchOnDocField(rateLimitedSearch.value);
|
|
79
|
+
await searchOnDocField(rateLimitedSearch.value);
|
|
92
80
|
}
|
|
93
81
|
}
|
|
94
82
|
const searchDataModule = await DocSearchData();
|
|
95
|
-
load(searchDataModule.searchData);
|
|
83
|
+
await load(searchDataModule.searchData);
|
|
96
84
|
searchDataModule.onUpdate((searchData2) => {
|
|
97
85
|
load(searchData2);
|
|
98
86
|
});
|
|
@@ -101,27 +89,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
101
89
|
const titleResults = ref([]);
|
|
102
90
|
watch(rateLimitedSearch, async (value) => {
|
|
103
91
|
const list = [];
|
|
104
|
-
const
|
|
92
|
+
const result = titleSearchIndex.search(value);
|
|
105
93
|
let rank = 0;
|
|
106
|
-
for (const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
rank++;
|
|
123
|
-
break;
|
|
124
|
-
}
|
|
94
|
+
for (const document of result) {
|
|
95
|
+
const idMapData = titleIdMap[document.item.id];
|
|
96
|
+
if (!idMapData) continue;
|
|
97
|
+
switch (idMapData.kind) {
|
|
98
|
+
case "story": {
|
|
99
|
+
list.push(storyResultFactory(storyStore.getStoryById(idMapData.id), rank));
|
|
100
|
+
rank++;
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
case "variant": {
|
|
104
|
+
const [storyId] = idMapData.id.split(":");
|
|
105
|
+
const story = storyStore.getStoryById(storyId);
|
|
106
|
+
const variant = storyStore.getVariantById(idMapData.id);
|
|
107
|
+
list.push(variantResultFactory(story, variant, rank));
|
|
108
|
+
rank++;
|
|
109
|
+
break;
|
|
125
110
|
}
|
|
126
111
|
}
|
|
127
112
|
}
|
|
@@ -131,19 +116,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
131
116
|
async function searchOnDocField(query) {
|
|
132
117
|
if (docSearchIndex) {
|
|
133
118
|
const list = [];
|
|
134
|
-
const
|
|
119
|
+
const result = docSearchIndex.search(query);
|
|
135
120
|
let rank = 0;
|
|
136
|
-
for (const
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
rank++;
|
|
145
|
-
break;
|
|
146
|
-
}
|
|
121
|
+
for (const document of result) {
|
|
122
|
+
const idMapData = docIdMap[document.item.id];
|
|
123
|
+
if (!idMapData) continue;
|
|
124
|
+
switch (idMapData.kind) {
|
|
125
|
+
case "story": {
|
|
126
|
+
list.push(storyResultFactory(storyStore.getStoryById(idMapData.id), rank, "docs"));
|
|
127
|
+
rank++;
|
|
128
|
+
break;
|
|
147
129
|
}
|
|
148
130
|
}
|
|
149
131
|
}
|
|
@@ -270,9 +252,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
270
252
|
key: 0,
|
|
271
253
|
class: "no-animation"
|
|
272
254
|
}, {
|
|
273
|
-
default: withCtx(() => [
|
|
255
|
+
default: withCtx(() => _cache[6] || (_cache[6] = [
|
|
274
256
|
createTextVNode(" No results ")
|
|
275
|
-
]),
|
|
257
|
+
])),
|
|
276
258
|
_: 1
|
|
277
259
|
})) : results.value.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
278
260
|
(openBlock(true), createElementBlock(Fragment, null, renderList(results.value, (result, index) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { markRaw } from "@histoire/vendors/vue";
|
|
2
1
|
import { searchData as searchData$1, onUpdate as onUpdate$1 } from "virtual:$histoire-search-docs-data";
|
|
2
|
+
import { markRaw } from "@histoire/vendors/vue";
|
|
3
3
|
"use strict";
|
|
4
4
|
const searchData = markRaw(searchData$1);
|
|
5
5
|
function onUpdate(cb) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { markRaw } from "@histoire/vendors/vue";
|
|
2
1
|
import { searchData as searchData$1, onUpdate as onUpdate$1 } from "virtual:$histoire-search-title-data";
|
|
2
|
+
import { markRaw } from "@histoire/vendors/vue";
|
|
3
3
|
"use strict";
|
|
4
4
|
const searchData = markRaw(searchData$1);
|
|
5
5
|
function onUpdate(cb) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent, ref, watchEffect, markRaw, openBlock, createBlock, resolveDynamicComponent, mergeProps, createCommentVNode } from "@histoire/vendors/vue";
|
|
2
2
|
import { clientSupportPlugins } from "virtual:$histoire-support-plugins-client";
|
|
3
3
|
"use strict";
|
|
4
4
|
const __default__ = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _sfc_main from "./StoryResponsivePreview.vue2.js";
|
|
2
|
-
|
|
2
|
+
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
"use strict";
|
|
5
|
-
const StoryResponsivePreview = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const StoryResponsivePreview = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-18122333"]]);
|
|
6
6
|
export {
|
|
7
7
|
StoryResponsivePreview as default
|
|
8
8
|
};
|