@histoire/app 1.0.0-alpha.1 → 1.0.0-alpha.3
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/bundled/App.vue2.js +1 -1
- package/dist/bundled/app.css +7 -7
- package/dist/bundled/components/HomeView.vue2.js +3 -6
- package/dist/bundled/components/app/AppHeader.vue2.js +2 -3
- package/dist/bundled/components/app/AppLogo.vue2.js +4 -5
- package/dist/bundled/components/app/Breadcrumb.vue2.js +4 -7
- package/dist/bundled/components/app/HomeCounter.vue2.js +1 -1
- package/dist/bundled/components/app/InitialLoading.vue2.js +1 -1
- package/dist/bundled/components/app/MobileOverlay.vue2.js +1 -1
- package/dist/bundled/components/base/BaseButton.vue2.js +1 -1
- package/dist/bundled/components/base/BaseCheckbox.vue2.js +2 -3
- package/dist/bundled/components/base/BaseEmpty.vue.js +1 -1
- package/dist/bundled/components/base/BaseIcon.vue2.js +1 -1
- package/dist/bundled/components/base/BaseKeyboardShortcut.vue2.js +1 -1
- package/dist/bundled/components/base/BaseListItem.vue2.js +1 -1
- 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 +1 -1
- package/dist/bundled/components/base/BaseSplitPane.vue2.js +1 -1
- 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 +10 -11
- package/dist/bundled/components/command/CommandPromptsModal.vue2.js +1 -1
- package/dist/bundled/components/command/PromptSelect.vue2.js +3 -4
- package/dist/bundled/components/command/PromptText.vue2.js +3 -4
- package/dist/bundled/components/misc/CheckerboardPattern.vue.js +1 -1
- package/dist/bundled/components/misc/HatchedPattern.vue.js +1 -1
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue2.js +5 -11
- package/dist/bundled/components/panel/ControlsComponentProps.vue2.js +1 -1
- package/dist/bundled/components/panel/ControlsComponentState.vue2.js +1 -1
- package/dist/bundled/components/panel/ControlsComponentStateItem.vue2.js +1 -1
- package/dist/bundled/components/panel/PaneTabs.vue2.js +1 -1
- package/dist/bundled/components/panel/StatePresets.vue2.js +1 -1
- package/dist/bundled/components/panel/StoryControls.vue2.js +3 -4
- package/dist/bundled/components/panel/StoryDocs.vue2.js +4 -8
- package/dist/bundled/components/panel/StoryEvent.vue2.js +1 -1
- package/dist/bundled/components/panel/StoryEvents.vue2.js +1 -1
- package/dist/bundled/components/panel/StorySidePanel.vue2.js +1 -1
- package/dist/bundled/components/panel/StorySourceCode.vue.js +1 -1
- package/dist/bundled/components/panel/StorySourceCode.vue2.js +12 -21
- package/dist/bundled/components/search/SearchItem.vue2.js +1 -1
- package/dist/bundled/components/search/SearchItemContent.vue2.js +2 -3
- package/dist/bundled/components/search/SearchLoading.vue2.js +1 -1
- package/dist/bundled/components/search/SearchPane.vue2.js +2 -5
- package/dist/bundled/components/story/GenericMountStory.vue2.js +2 -3
- package/dist/bundled/components/story/GenericRenderStory.vue2.js +2 -3
- package/dist/bundled/components/story/StoryResponsivePreview.vue2.js +1 -1
- package/dist/bundled/components/story/StoryVariantGrid.vue2.js +2 -3
- package/dist/bundled/components/story/StoryVariantGridItem.vue2.js +1 -1
- package/dist/bundled/components/story/StoryVariantListItem.vue2.js +1 -1
- package/dist/bundled/components/story/StoryVariantSingle.vue2.js +5 -11
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue2.js +1 -1
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue2.js +1 -1
- package/dist/bundled/components/story/StoryVariantSingleView.vue2.js +3 -4
- package/dist/bundled/components/story/StoryView.vue2.js +4 -6
- package/dist/bundled/components/story/StoryViewer.vue2.js +4 -7
- package/dist/bundled/components/toolbar/DevOnlyToolbarOpenInEditor.vue2.js +1 -1
- package/dist/bundled/components/toolbar/ToolbarBackground.vue2.js +1 -1
- package/dist/bundled/components/toolbar/ToolbarNewTab.vue2.js +1 -1
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue2.js +20 -24
- package/dist/bundled/components/toolbar/ToolbarTextDirection.vue2.js +1 -1
- package/dist/bundled/components/toolbar/ToolbarTitle.vue2.js +1 -1
- package/dist/bundled/components/tree/StoryGroup.vue2.js +1 -1
- package/dist/bundled/components/tree/StoryList.vue2.js +1 -1
- package/dist/bundled/components/tree/StoryListFolder.vue.js +1 -1
- package/dist/bundled/components/tree/StoryListFolder.vue2.js +2 -2
- package/dist/bundled/components/tree/StoryListItem.vue.js +1 -1
- package/dist/bundled/components/tree/StoryListItem.vue2.js +3 -3
- package/dist/bundled/sandbox.js +7 -13
- package/dist/bundled/stores/command.js +2 -3
- package/dist/bundled/stores/events.js +1 -4
- package/dist/bundled/stores/story.js +1 -4
- package/dist/bundled/util/commands.js +3 -5
- package/dist/bundled/util/dark.js +1 -2
- package/dist/bundled/util/docs.js +4 -5
- package/dist/bundled/util/events.js +1 -2
- package/dist/bundled/util/preview-settings.js +1 -2
- package/dist/style.css +0 -2
- package/package.json +6 -6
- package/src/app/components/panel/StorySourceCode.vue +3 -3
- package/src/app/components/tree/StoryGroup.vue +1 -1
- package/src/app/components/tree/StoryListFolder.vue +1 -1
- package/src/app/components/tree/StoryListItem.vue +1 -1
- package/src/app/sandbox.ts +4 -4
package/dist/bundled/App.vue2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, watch, onMounted, resolveComponent,
|
|
1
|
+
import { defineComponent, ref, computed, watch, onMounted, resolveComponent, createElementBlock, openBlock, Fragment, createCommentVNode, createElementVNode, createVNode, unref, createBlock, normalizeStyle, withCtx, Transition } from "@histoire/vendors/vue";
|
|
2
2
|
import { useTitle } from "@histoire/vendors/vue-use";
|
|
3
3
|
import { files, tree, onUpdate } from "virtual:$histoire-stories";
|
|
4
4
|
import "./components/app/AppHeader.vue.js";
|
package/dist/bundled/app.css
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
.bind-tree-margin[data-v-
|
|
3
|
-
margin-left: var(--
|
|
2
|
+
.bind-tree-margin[data-v-64c2458f] {
|
|
3
|
+
margin-left: var(--2562213a);
|
|
4
4
|
}
|
|
5
|
-
.bind-icon-color[data-v-
|
|
6
|
-
color: var(--
|
|
5
|
+
.bind-icon-color[data-v-64c2458f] {
|
|
6
|
+
color: var(--1eff521f);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.bind-tree-padding[data-v-
|
|
10
|
-
padding-left: var(--
|
|
9
|
+
.bind-tree-padding[data-v-ee932a0c] {
|
|
10
|
+
padding-left: var(--5352bb71);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.bind-icon-color[data-v-d15ecb89] {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.__histoire-code-placeholder[data-v-
|
|
54
|
+
.__histoire-code-placeholder[data-v-96af7f40] {
|
|
55
55
|
color: inherit;
|
|
56
56
|
font-size: inherit;
|
|
57
57
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent, computed,
|
|
1
|
+
import { defineComponent, computed, createElementBlock, openBlock, createElementVNode, createVNode } from "@histoire/vendors/vue";
|
|
2
2
|
import HistoireLogo from "../assets/histoire.svg.js";
|
|
3
3
|
import { useStoryStore } from "../stores/story.js";
|
|
4
|
-
import {
|
|
4
|
+
import { customLogos, histoireConfig } from "../util/config.js";
|
|
5
5
|
import "./app/HomeCounter.vue.js";
|
|
6
6
|
import _sfc_main$1 from "./app/HomeCounter.vue2.js";
|
|
7
7
|
"use strict";
|
|
@@ -11,10 +11,7 @@ const _hoisted_3 = { class: "htw-flex !md:htw-flex-col htw-flex-wrap htw-justify
|
|
|
11
11
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
12
|
__name: "HomeView",
|
|
13
13
|
setup(__props) {
|
|
14
|
-
const logoUrl = computed(() =>
|
|
15
|
-
var _a, _b;
|
|
16
|
-
return ((_b = (_a = histoireConfig.theme) == null ? void 0 : _a.logo) == null ? void 0 : _b.square) ? customLogos.square : HistoireLogo;
|
|
17
|
-
});
|
|
14
|
+
const logoUrl = computed(() => histoireConfig.theme?.logo?.square ? customLogos.square : HistoireLogo);
|
|
18
15
|
const storyStore = useStoryStore();
|
|
19
16
|
const stats = computed(() => {
|
|
20
17
|
let storyCount = 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, resolveDirective,
|
|
1
|
+
import { defineComponent, computed, resolveDirective, createElementBlock, openBlock, createElementVNode, unref, createVNode, withDirectives, createCommentVNode } from "@histoire/vendors/vue";
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
3
|
import { histoireConfig } from "../../util/config.js";
|
|
4
4
|
import { isDark, toggleDark } from "../../util/dark.js";
|
|
@@ -25,12 +25,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
25
|
toggleDark();
|
|
26
26
|
});
|
|
27
27
|
return (_ctx, _cache) => {
|
|
28
|
-
var _a;
|
|
29
28
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
30
29
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
31
30
|
createElementVNode("div", _hoisted_2, [
|
|
32
31
|
createElementVNode("a", {
|
|
33
|
-
href:
|
|
32
|
+
href: unref(histoireConfig).theme?.logoHref,
|
|
34
33
|
target: "_blank",
|
|
35
34
|
class: "htw-w-full htw-h-full htw-flex htw-items-center"
|
|
36
35
|
}, [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent, computed,
|
|
1
|
+
import { defineComponent, computed, createElementBlock, openBlock } from "@histoire/vendors/vue";
|
|
2
2
|
import HistoireLogoDark from "../../assets/histoire-text-dark.svg.js";
|
|
3
3
|
import HistoireLogoLight from "../../assets/histoire-text.svg.js";
|
|
4
|
-
import {
|
|
4
|
+
import { customLogos, histoireConfig } from "../../util/config.js";
|
|
5
5
|
import { isDark } from "../../util/dark.js";
|
|
6
6
|
"use strict";
|
|
7
7
|
const _hoisted_1 = ["src", "alt"];
|
|
@@ -9,11 +9,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9
9
|
__name: "AppLogo",
|
|
10
10
|
setup(__props) {
|
|
11
11
|
const logoUrl = computed(() => {
|
|
12
|
-
var _a, _b;
|
|
13
12
|
if (isDark.value) {
|
|
14
|
-
return
|
|
13
|
+
return histoireConfig.theme.logo?.dark ? customLogos.dark : HistoireLogoDark;
|
|
15
14
|
}
|
|
16
|
-
return
|
|
15
|
+
return histoireConfig.theme.logo?.light ? customLogos.light : HistoireLogoLight;
|
|
17
16
|
});
|
|
18
17
|
const altText = computed(() => `${histoireConfig.theme.title} logo`);
|
|
19
18
|
return (_ctx, _cache) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useCssVars, computed, ref, watch,
|
|
1
|
+
import { defineComponent, useCssVars, computed, ref, watch, createElementBlock, openBlock, Fragment, createElementVNode, createVNode, renderList, toDisplayString, createTextVNode, unref, normalizeClass, withCtx } from "@histoire/vendors/vue";
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
3
|
import { useStoryStore } from "../../stores/story.js";
|
|
4
4
|
import "../tree/StoryList.vue.js";
|
|
@@ -16,12 +16,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
16
|
stories: {}
|
|
17
17
|
},
|
|
18
18
|
setup(__props) {
|
|
19
|
-
useCssVars((_ctx) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"a3f02f4e": (_a = story.value) == null ? void 0 : _a.iconColor
|
|
23
|
-
};
|
|
24
|
-
});
|
|
19
|
+
useCssVars((_ctx) => ({
|
|
20
|
+
"a3f02f4e": story.value?.iconColor
|
|
21
|
+
}));
|
|
25
22
|
const storyStore = useStoryStore();
|
|
26
23
|
const story = computed(() => storyStore.currentStory);
|
|
27
24
|
const folders = computed(() => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, createElementBlock, openBlock, createVNode, createElementVNode, unref, toDisplayString } from "@histoire/vendors/vue";
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
3
|
"use strict";
|
|
4
4
|
const _hoisted_1 = { class: "htw-p-2 htw-flex htw-items-center htw-gap-x-2" };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, reactive,
|
|
1
|
+
import { defineComponent, reactive, createElementBlock, openBlock, createVNode, Transition, withCtx, createCommentVNode, normalizeStyle, Fragment, renderList, createElementVNode, normalizeClass } from "@histoire/vendors/vue";
|
|
2
2
|
"use strict";
|
|
3
3
|
const _hoisted_1 = { class: "histoire-initial-loading htw-fixed htw-inset-0 htw-bg-white dark:htw-bg-gray-700 htw-flex htw-flex-col htw-gap-6 htw-items-center htw-justify-center" };
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, createBlock, openBlock, Transition, withCtx, createElementBlock, createCommentVNode, createElementVNode, renderSlot, toDisplayString, createVNode, unref } from "@histoire/vendors/vue";
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
3
|
"use strict";
|
|
4
4
|
const _hoisted_1 = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed,
|
|
1
|
+
import { defineComponent, computed, createBlock, openBlock, resolveDynamicComponent, normalizeClass, withCtx, renderSlot } from "@histoire/vendors/vue";
|
|
2
2
|
import { RouterLink } from "@histoire/vendors/vue-router";
|
|
3
3
|
"use strict";
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, watch,
|
|
1
|
+
import { defineComponent, ref, computed, watch, createElementBlock, openBlock, withKeys, withModifiers, createElementVNode, renderSlot, normalizeClass } from "@histoire/vendors/vue";
|
|
2
2
|
"use strict";
|
|
3
3
|
const _hoisted_1 = { class: "htw-text-white htw-w-[16px] htw-h-[16px] htw-relative" };
|
|
4
4
|
const _hoisted_2 = {
|
|
@@ -32,8 +32,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
32
|
const dashoffset = computed(() => (1 - progress.value) * dasharray.value);
|
|
33
33
|
const animationEnabled = ref(false);
|
|
34
34
|
watch(path, () => {
|
|
35
|
-
|
|
36
|
-
dasharray.value = ((_b = (_a = path.value).getTotalLength) == null ? void 0 : _b.call(_a)) ?? 21.21;
|
|
35
|
+
dasharray.value = path.value.getTotalLength?.() ?? 21.21;
|
|
37
36
|
});
|
|
38
37
|
return (_ctx, _cache) => {
|
|
39
38
|
return openBlock(), createElementBlock("div", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createElementBlock, openBlock, renderSlot } from "@histoire/vendors/vue";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
const _sfc_main = {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed,
|
|
1
|
+
import { defineComponent, computed, createElementBlock, createBlock, openBlock, unref } from "@histoire/vendors/vue";
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
3
|
"use strict";
|
|
4
4
|
const _hoisted_1 = ["src", "alt"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed,
|
|
1
|
+
import { defineComponent, computed, createElementBlock, openBlock, toDisplayString } from "@histoire/vendors/vue";
|
|
2
2
|
import { formatKey } from "../../util/keyboard.js";
|
|
3
3
|
"use strict";
|
|
4
4
|
const _hoisted_1 = { class: "histoire-base-keyboard-shortcut htw-border htw-border-current htw-opacity-50 htw-px-1 htw-rounded-sm" };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, openBlock,
|
|
1
|
+
import { defineComponent, createElementBlock, openBlock, withKeys, normalizeClass, renderSlot } from "@histoire/vendors/vue";
|
|
2
2
|
"use strict";
|
|
3
3
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
4
|
__name: "BaseListItem",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _sfc_main from "./BaseListItemLink.vue2.js";
|
|
2
|
-
import { resolveComponent,
|
|
2
|
+
import { resolveComponent, createBlock, openBlock, mergeProps, withCtx, createElementVNode, withKeys, normalizeClass, renderSlot } from "@histoire/vendors/vue";
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
"use strict";
|
|
5
5
|
const _hoisted_1 = ["href", "onClick", "onKeyup"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, resolveComponent,
|
|
1
|
+
import { defineComponent, ref, computed, resolveComponent, createElementBlock, openBlock, createVNode, createBlock, createCommentVNode, withCtx, renderSlot, createElementVNode, unref, reactive, onBeforeUnmount, h } from "@histoire/vendors/vue";
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
3
|
import { useResizeObserver } from "@histoire/vendors/vue-use";
|
|
4
4
|
"use strict";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _sfc_main from "./BaseOverflowTab.vue2.js";
|
|
2
|
-
import { resolveComponent,
|
|
2
|
+
import { resolveComponent, createBlock, openBlock, mergeProps, withCtx, createElementVNode, renderSlot, createVNode, Transition, createElementBlock, createCommentVNode } from "@histoire/vendors/vue";
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
"use strict";
|
|
5
5
|
const _hoisted_1 = ["href", "onClick"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed,
|
|
1
|
+
import { defineComponent, computed, createBlock, openBlock, unref, withCtx, createElementVNode, createVNode, renderSlot, createTextVNode, toDisplayString, createElementBlock, Fragment, renderList, mergeProps } from "@histoire/vendors/vue";
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
3
|
import { Dropdown } from "@histoire/vendors/floating-vue";
|
|
4
4
|
"use strict";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, computed, onUnmounted,
|
|
1
|
+
import { defineComponent, ref, watch, computed, onUnmounted, createElementBlock, openBlock, normalizeClass, createElementVNode, normalizeStyle, renderSlot, withModifiers } from "@histoire/vendors/vue";
|
|
2
2
|
"use strict";
|
|
3
3
|
const SAVE_PREFIX = "__histoire";
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _sfc_main from "./BaseTab.vue2.js";
|
|
2
|
-
import { resolveComponent,
|
|
2
|
+
import { resolveComponent, createBlock, openBlock, mergeProps, withCtx, createElementVNode, renderSlot, createVNode, Transition, createElementBlock, createCommentVNode } from "@histoire/vendors/vue";
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
"use strict";
|
|
5
5
|
const _hoisted_1 = ["href", "onClick"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createElementBlock, openBlock, renderSlot } from "@histoire/vendors/vue";
|
|
2
2
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
3
|
const _sfc_main = {};
|
|
4
4
|
const _hoisted_1 = { class: "histoire-base-tag htw-text-center htw-text-xs htw-mx-1 htw-px-0.5 htw-h-4 htw-uppercase htw-min-w-4 htw-rounded-full htw-bg-primary-500 htw-text-white dark:htw-text-black" };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent, reactive, ref, onMounted, openBlock,
|
|
1
|
+
import { defineComponent, reactive, ref, onMounted, createElementBlock, openBlock, withKeys, withModifiers, createElementVNode, toDisplayString, Fragment, renderList, createBlock, resolveDynamicComponent, createVNode, withCtx, nextTick } from "@histoire/vendors/vue";
|
|
2
2
|
import { getCommandContext, executeCommand } from "../../util/commands.js";
|
|
3
3
|
import "../base/BaseButton.vue.js";
|
|
4
4
|
import "../base/BaseKeyboardShortcut.vue.js";
|
|
5
5
|
import "./PromptSelect.vue.js";
|
|
6
6
|
import "./PromptText.vue.js";
|
|
7
|
-
import _sfc_main$1 from "
|
|
8
|
-
import _sfc_main$2 from "
|
|
9
|
-
import _sfc_main$3 from "
|
|
10
|
-
import _sfc_main$4 from "
|
|
7
|
+
import _sfc_main$1 from "./PromptSelect.vue2.js";
|
|
8
|
+
import _sfc_main$2 from "./PromptText.vue2.js";
|
|
9
|
+
import _sfc_main$3 from "../base/BaseButton.vue2.js";
|
|
10
|
+
import _sfc_main$4 from "../base/BaseKeyboardShortcut.vue2.js";
|
|
11
11
|
"use strict";
|
|
12
12
|
const _hoisted_1 = { class: "htw-p-4 htw-opacity-70" };
|
|
13
13
|
const _hoisted_2 = { class: "htw-flex htw-justify-end htw-gap-2 htw-p-2" };
|
|
@@ -21,8 +21,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
const props = __props;
|
|
22
22
|
const emit = __emit;
|
|
23
23
|
const promptTypes = {
|
|
24
|
-
text: _sfc_main$
|
|
25
|
-
select: _sfc_main$
|
|
24
|
+
text: _sfc_main$2,
|
|
25
|
+
select: _sfc_main$1
|
|
26
26
|
};
|
|
27
27
|
const answers = reactive({});
|
|
28
28
|
for (const prompt of props.command.prompts) {
|
|
@@ -42,8 +42,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
const promptComps = ref([]);
|
|
43
43
|
function focusPrompt(index) {
|
|
44
44
|
nextTick(() => {
|
|
45
|
-
|
|
46
|
-
(_b = (_a = promptComps.value[index]) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
|
|
45
|
+
promptComps.value[index]?.focus?.();
|
|
47
46
|
});
|
|
48
47
|
}
|
|
49
48
|
onMounted(() => {
|
|
@@ -72,12 +71,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
72
71
|
}, null, 40, ["modelValue", "onUpdate:modelValue", "prompt", "answers", "index", "onNext"]);
|
|
73
72
|
}), 128)),
|
|
74
73
|
createElementVNode("div", _hoisted_2, [
|
|
75
|
-
createVNode(_sfc_main$
|
|
74
|
+
createVNode(_sfc_main$3, {
|
|
76
75
|
type: "submit",
|
|
77
76
|
class: "htw-px-4 htw-py-2 htw-flex htw-items-start htw-gap-2"
|
|
78
77
|
}, {
|
|
79
78
|
default: withCtx(() => [
|
|
80
|
-
createVNode(_sfc_main$
|
|
79
|
+
createVNode(_sfc_main$4, { shortcut: "Enter" }),
|
|
81
80
|
_cache[2] || (_cache[2] = createElementVNode("span", null, "Submit", -1))
|
|
82
81
|
]),
|
|
83
82
|
_: 1
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, defineAsyncComponent,
|
|
1
|
+
import { defineComponent, defineAsyncComponent, createElementBlock, createCommentVNode, openBlock, createElementVNode, createVNode, unref } from "@histoire/vendors/vue";
|
|
2
2
|
import { useCommandStore } from "../../stores/command.js";
|
|
3
3
|
"use strict";
|
|
4
4
|
const _hoisted_1 = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, watchEffect,
|
|
1
|
+
import { defineComponent, computed, ref, watchEffect, createElementBlock, openBlock, withDirectives, createElementVNode, vModelText, createCommentVNode, toDisplayString, createTextVNode, createVNode, withKeys, withModifiers, unref, Fragment, renderList, normalizeClass, createBlock } from "@histoire/vendors/vue";
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
3
|
import { useSelection } from "../../util/select.js";
|
|
4
4
|
import "../base/BaseKeyboardShortcut.vue.js";
|
|
@@ -36,9 +36,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
36
36
|
});
|
|
37
37
|
const input = ref();
|
|
38
38
|
function focus() {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
(_b = input.value) == null ? void 0 : _b.select();
|
|
39
|
+
input.value?.focus();
|
|
40
|
+
input.value?.select();
|
|
42
41
|
}
|
|
43
42
|
__expose({
|
|
44
43
|
focus
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, watch,
|
|
1
|
+
import { defineComponent, computed, ref, watch, createElementBlock, openBlock, createElementVNode, withDirectives, createCommentVNode, toDisplayString, vModelText } from "@histoire/vendors/vue";
|
|
2
2
|
"use strict";
|
|
3
3
|
const _hoisted_1 = { class: "histoire-prompt-text" };
|
|
4
4
|
const _hoisted_2 = { class: "htw-flex htw-flex-col htw-gap-2 htw-p-2" };
|
|
@@ -25,9 +25,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
25
|
});
|
|
26
26
|
const input = ref();
|
|
27
27
|
function focus() {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
(_b = input.value) == null ? void 0 : _b.select();
|
|
28
|
+
input.value?.focus();
|
|
29
|
+
input.value?.select();
|
|
31
30
|
}
|
|
32
31
|
__expose({
|
|
33
32
|
focus
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createElementBlock, openBlock, createElementVNode } from "@histoire/vendors/vue";
|
|
2
2
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
3
|
const _sfc_main = {};
|
|
4
4
|
const _hoisted_1 = { fill: "none" };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, resolveDirective,
|
|
1
|
+
import { defineComponent, computed, resolveDirective, createBlock, createCommentVNode, openBlock, resolveDynamicComponent, withCtx, withDirectives, createVNode, unref, withModifiers, normalizeClass } from "@histoire/vendors/vue";
|
|
2
2
|
import { HstJson, HstCheckbox, HstNumber, HstText } from "@histoire/controls";
|
|
3
3
|
import { Icon } from "@histoire/vendors/iconify";
|
|
4
4
|
"use strict";
|
|
@@ -12,8 +12,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12
12
|
setup(__props) {
|
|
13
13
|
const props = __props;
|
|
14
14
|
const comp = computed(() => {
|
|
15
|
-
|
|
16
|
-
switch ((_a = props.definition.types) == null ? void 0 : _a[0]) {
|
|
15
|
+
switch (props.definition.types?.[0]) {
|
|
17
16
|
case "string":
|
|
18
17
|
return HstText;
|
|
19
18
|
case "number":
|
|
@@ -27,8 +26,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
26
|
});
|
|
28
27
|
const model = computed({
|
|
29
28
|
get: () => {
|
|
30
|
-
|
|
31
|
-
return (_a = props.variant.state._hPropState[props.component.index]) == null ? void 0 : _a[props.definition.name];
|
|
29
|
+
return props.variant.state._hPropState[props.component.index]?.[props.definition.name];
|
|
32
30
|
},
|
|
33
31
|
set: (value) => {
|
|
34
32
|
if (!props.variant.state._hPropState[props.component.index]) {
|
|
@@ -42,18 +40,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
42
40
|
delete props.variant.state._hPropState[props.component.index][props.definition.name];
|
|
43
41
|
}
|
|
44
42
|
}
|
|
45
|
-
const canReset = computed(() =>
|
|
46
|
-
var _a, _b;
|
|
47
|
-
return ((_b = (_a = props.variant.state) == null ? void 0 : _a._hPropState) == null ? void 0 : _b[props.component.index]) && props.definition.name in props.variant.state._hPropState[props.component.index];
|
|
48
|
-
});
|
|
43
|
+
const canReset = computed(() => props.variant.state?._hPropState?.[props.component.index] && props.definition.name in props.variant.state._hPropState[props.component.index]);
|
|
49
44
|
return (_ctx, _cache) => {
|
|
50
|
-
var _a;
|
|
51
45
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
52
46
|
return comp.value ? (openBlock(), createBlock(resolveDynamicComponent(comp.value), {
|
|
53
47
|
key: 0,
|
|
54
48
|
modelValue: model.value,
|
|
55
49
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => model.value = $event),
|
|
56
|
-
placeholder: model.value === void 0 ?
|
|
50
|
+
placeholder: model.value === void 0 ? _ctx.definition?.default : null,
|
|
57
51
|
class: "histoire-controls-component-prop-item",
|
|
58
52
|
title: `${_ctx.definition.name}${canReset.value ? " *" : ""}`
|
|
59
53
|
}, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, resolveDirective,
|
|
1
|
+
import { defineComponent, resolveDirective, createElementBlock, openBlock, createElementVNode, withDirectives, createVNode, unref, createTextVNode, toDisplayString, Fragment, renderList, createBlock } from "@histoire/vendors/vue";
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
3
|
import "./ControlsComponentPropItem.vue.js";
|
|
4
4
|
import _sfc_main$1 from "./ControlsComponentPropItem.vue2.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, resolveDirective,
|
|
1
|
+
import { defineComponent, computed, resolveDirective, createElementBlock, openBlock, createElementVNode, withDirectives, createVNode, unref, Fragment, renderList, createBlock } from "@histoire/vendors/vue";
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
3
|
import "./ControlsComponentStateItem.vue.js";
|
|
4
4
|
import _sfc_main$1 from "./ControlsComponentStateItem.vue2.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed,
|
|
1
|
+
import { defineComponent, computed, createBlock, createCommentVNode, openBlock, resolveDynamicComponent } from "@histoire/vendors/vue";
|
|
2
2
|
import { HstJson, HstCheckbox, HstNumber, HstText } from "@histoire/controls";
|
|
3
3
|
"use strict";
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, toRefs, computed,
|
|
1
|
+
import { defineComponent, toRefs, computed, createBlock, openBlock, withCtx, createVNode, createTextVNode, normalizeClass, unref, createCommentVNode, toDisplayString } from "@histoire/vendors/vue";
|
|
2
2
|
import { useEventsStore } from "../../stores/events.js";
|
|
3
3
|
import "../base/BaseOverflowMenu.vue.js";
|
|
4
4
|
import BaseOverflowTab from "../base/BaseOverflowTab.vue.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, onMounted, ref, resolveDirective,
|
|
1
|
+
import { defineComponent, computed, onMounted, ref, resolveDirective, createElementBlock, openBlock, createElementVNode, withDirectives, createVNode, withKeys, unref, isRef, withCtx, createCommentVNode, toDisplayString, createBlock, withModifiers, vModelText, normalizeClass, nextTick } from "@histoire/vendors/vue";
|
|
2
2
|
import { clone, omit, applyState } from "@histoire/shared";
|
|
3
3
|
import { Icon } from "@histoire/vendors/iconify";
|
|
4
4
|
import { useStorage, useTimeoutFn, onClickOutside } from "@histoire/vendors/vue-use";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, computed,
|
|
1
|
+
import { defineComponent, ref, watch, computed, createElementBlock, openBlock, createElementVNode, createBlock, createCommentVNode, createVNode, withCtx, unref, Fragment, renderList } from "@histoire/vendors/vue";
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
3
|
import BaseEmpty from "../base/BaseEmpty.vue.js";
|
|
4
4
|
import "../story/GenericRenderStory.vue.js";
|
|
@@ -38,7 +38,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
38
38
|
const hasCustomControls = computed(() => props.variant.slots().controls || props.story.slots().controls);
|
|
39
39
|
const hasInitState = computed(() => Object.entries(props.variant.state || {}).filter(([key]) => !key.startsWith("_h")).length > 0);
|
|
40
40
|
return (_ctx, _cache) => {
|
|
41
|
-
var _a, _b, _c, _d;
|
|
42
41
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
43
42
|
createElementVNode("div", _hoisted_2, [
|
|
44
43
|
ready.value || !hasCustomControls.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
@@ -59,7 +58,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
59
58
|
class: "htw-flex-none htw-my-2",
|
|
60
59
|
variant: __props.variant
|
|
61
60
|
}, null, 8, ["variant"])
|
|
62
|
-
])) : !
|
|
61
|
+
])) : !__props.variant.state?._hPropDefs?.length ? (openBlock(), createBlock(BaseEmpty, { key: 2 }, {
|
|
63
62
|
default: withCtx(() => [
|
|
64
63
|
createVNode(unref(Icon), {
|
|
65
64
|
icon: "carbon:audio-console",
|
|
@@ -69,7 +68,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
69
68
|
]),
|
|
70
69
|
_: 1
|
|
71
70
|
})) : createCommentVNode("", true),
|
|
72
|
-
|
|
71
|
+
__props.variant.state?._hPropDefs?.length ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
73
72
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.variant.state._hPropDefs, (def, index) => {
|
|
74
73
|
return openBlock(), createBlock(_sfc_main$4, {
|
|
75
74
|
key: index,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, toRefs, watch, ref, computed,
|
|
1
|
+
import { defineComponent, toRefs, watch, ref, computed, createElementBlock, openBlock, createCommentVNode, createBlock, unref, normalizeClass, withCtx, createVNode, createTextVNode, watchEffect, nextTick } from "@histoire/vendors/vue";
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
3
|
import { markdownFiles } from "virtual:$histoire-markdown-files";
|
|
4
4
|
import { useRouter, useRoute } from "@histoire/vendors/vue-router";
|
|
@@ -11,14 +11,13 @@ const _hoisted_1 = ["innerHTML"];
|
|
|
11
11
|
function useStoryDoc(story) {
|
|
12
12
|
const renderedDoc = ref("");
|
|
13
13
|
watchEffect(async () => {
|
|
14
|
-
var _a;
|
|
15
14
|
const mdKey = story.value.file.filePath.replace(/\.(\w*)$/, ".md");
|
|
16
15
|
if (markdownFiles[mdKey]) {
|
|
17
16
|
const md = await markdownFiles[mdKey]();
|
|
18
17
|
renderedDoc.value = md.html;
|
|
19
18
|
return;
|
|
20
19
|
}
|
|
21
|
-
let comp =
|
|
20
|
+
let comp = story.value.file?.component;
|
|
22
21
|
if (comp) {
|
|
23
22
|
if (comp.__asyncResolved) {
|
|
24
23
|
comp = comp.__asyncResolved;
|
|
@@ -30,7 +29,7 @@ function useStoryDoc(story) {
|
|
|
30
29
|
} catch (e) {
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
|
-
if (comp
|
|
32
|
+
if (comp?.default) {
|
|
34
33
|
comp = comp.default;
|
|
35
34
|
}
|
|
36
35
|
renderedDoc.value = comp.doc;
|
|
@@ -117,10 +116,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
117
116
|
}, {
|
|
118
117
|
immediate: true
|
|
119
118
|
});
|
|
120
|
-
const filePath = computed(() =>
|
|
121
|
-
var _a, _b;
|
|
122
|
-
return ((_a = story.value.file) == null ? void 0 : _a.docsFilePath) ?? (props.standalone && ((_b = story.value.file) == null ? void 0 : _b.filePath));
|
|
123
|
-
});
|
|
119
|
+
const filePath = computed(() => story.value.file?.docsFilePath ?? (props.standalone && story.value.file?.filePath));
|
|
124
120
|
return (_ctx, _cache) => {
|
|
125
121
|
return openBlock(), createElementBlock("div", {
|
|
126
122
|
class: "histoire-story-docs",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, resolveComponent,
|
|
1
|
+
import { defineComponent, computed, resolveComponent, createBlock, openBlock, withCtx, createElementVNode, toDisplayString, normalizeClass, createElementBlock, createCommentVNode } from "@histoire/vendors/vue";
|
|
2
2
|
"use strict";
|
|
3
3
|
const _hoisted_1 = {
|
|
4
4
|
key: 0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, onMounted, watch, nextTick, ref,
|
|
1
|
+
import { defineComponent, computed, onMounted, watch, nextTick, ref, createElementBlock, openBlock, createBlock, withCtx, createVNode, createTextVNode, unref, Fragment, renderList } from "@histoire/vendors/vue";
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
3
|
import { useEventsStore } from "../../stores/events.js";
|
|
4
4
|
import BaseEmpty from "../base/BaseEmpty.vue.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, unref, openBlock,
|
|
1
|
+
import { defineComponent, computed, createBlock, unref, openBlock, 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
4
|
import BaseEmpty from "../base/BaseEmpty.vue.js";
|
|
@@ -2,7 +2,7 @@ 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-96af7f40"]]);
|
|
6
6
|
export {
|
|
7
7
|
StorySourceCode as default
|
|
8
8
|
};
|