@histoire/app 0.11.5 → 0.11.7
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/{floating-vue.pcss → floating.pcss} +0 -0
- package/dist/app/style/main.pcss +46 -44
- package/dist/app/style/sandbox.css +5 -1
- package/dist/bundle-main-dev.js +4 -0
- package/dist/bundle-sandbox-dev.js +2 -0
- package/dist/bundled/App.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/HomeView.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/app/AppHeader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/app/AppLogo.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/bundled/components/app/Breadcrumb.js +2 -2
- package/dist/bundled/components/app/Breadcrumb.vue_vue_type_script_setup_true_lang.js +10 -9
- package/dist/bundled/components/app/Breadcrumb.vue_vue_type_style_index_0_scoped_36846ccf_lang.js +4 -0
- package/dist/bundled/components/app/InitialLoading.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/app/MobileOverlay.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/base/BaseCheckbox.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/base/BaseEmpty.js +4 -4
- package/dist/bundled/components/base/BaseEmpty.vue_vue_type_style_index_0_scoped_c5ecfead_lang.js +4 -0
- package/dist/bundled/components/base/BaseListItemLink.js +1 -1
- package/dist/bundled/components/base/BaseOverflowMenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/base/BaseOverflowTab.js +1 -1
- package/dist/bundled/components/base/BaseSelect.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/bundled/components/base/BaseSplitPane.js +2 -2
- package/dist/bundled/components/base/BaseSplitPane.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/bundled/components/base/BaseSplitPane.vue_vue_type_style_index_0_scoped_ed925107_lang.js +4 -0
- package/dist/bundled/components/base/BaseTab.js +1 -1
- package/dist/bundled/components/base/BaseTag.js +13 -0
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/bundled/components/panel/ControlsComponentProps.vue_vue_type_script_setup_true_lang.js +8 -7
- package/dist/bundled/components/panel/PaneTabs.vue_vue_type_script_setup_true_lang.js +15 -12
- package/dist/bundled/components/panel/StatePresets.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/panel/StoryControls.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/panel/StoryDocs.vue_vue_type_script_setup_true_lang.js +17 -2
- package/dist/bundled/components/panel/StoryEvent.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/panel/StoryEvents.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/bundled/components/panel/StorySidePanel.vue_vue_type_script_setup_true_lang.js +9 -3
- package/dist/bundled/components/panel/StorySourceCode.js +2 -2
- package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_style_index_0_scoped_36810e45_lang.js +4 -0
- package/dist/bundled/components/search/SearchItem.js +2 -2
- package/dist/bundled/components/search/SearchItem.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/bundled/components/search/SearchItem.vue_vue_type_style_index_0_scoped_d95fcb03_lang.js +4 -0
- package/dist/bundled/components/search/SearchLoading.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/search/SearchModal.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/search/SearchPane.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/story/GenericMountStory.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/bundled/components/story/GenericRenderStory.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/bundled/components/story/StoryResponsivePreview.js +2 -2
- package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_script_setup_true_lang.js +41 -12
- package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_style_index_0_scoped_a83b1911_lang.js +4 -0
- package/dist/bundled/components/story/StoryVariantGrid.vue_vue_type_script_setup_true_lang.js +37 -29
- package/dist/bundled/components/story/StoryVariantGridItem.js +2 -2
- package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_script_setup_true_lang.js +21 -9
- package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_style_index_0_scoped_f7c98176_lang.js +4 -0
- package/dist/bundled/components/story/StoryVariantListItem.js +2 -2
- package/dist/bundled/components/story/StoryVariantListItem.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/bundled/components/story/StoryVariantListItem.vue_vue_type_style_index_0_scoped_ab890d9c_lang.js +4 -0
- package/dist/bundled/components/story/StoryVariantSingle.js +2 -2
- package/dist/bundled/components/story/StoryVariantSingle.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/bundled/components/story/StoryVariantSingle.vue_vue_type_style_index_0_scoped_ddfc5b4f_lang.js +4 -0
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue_vue_type_script_setup_true_lang.js +19 -7
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/bundled/components/story/StoryVariantSingleView.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/story/StoryView.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/bundled/components/story/StoryViewer.js +2 -2
- package/dist/bundled/components/story/StoryViewer.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/bundled/components/story/StoryViewer.vue_vue_type_style_index_0_scoped_6046525f_lang.js +4 -0
- package/dist/bundled/components/toolbar/ToolbarBackground.js +2 -2
- package/dist/bundled/components/toolbar/ToolbarBackground.vue_vue_type_script_setup_true_lang.js +32 -18
- package/dist/bundled/components/toolbar/ToolbarBackground.vue_vue_type_style_index_0_scoped_c48fb2b2_lang.js +4 -0
- package/dist/bundled/components/toolbar/ToolbarNewTab.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/bundled/components/toolbar/ToolbarTextDirection.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/toolbar/ToolbarTitle.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/tree/StoryGroup.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/tree/StoryList.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/bundled/components/tree/StoryListFolder.js +2 -2
- package/dist/bundled/components/tree/StoryListFolder.vue_vue_type_script_setup_true_lang.js +6 -3
- package/dist/bundled/components/tree/StoryListFolder.vue_vue_type_style_index_0_scoped_2fedbe45_lang.js +4 -0
- package/dist/bundled/components/tree/StoryListItem.js +2 -2
- package/dist/bundled/components/tree/StoryListItem.vue_vue_type_script_setup_true_lang.js +5 -4
- package/dist/bundled/components/tree/StoryListItem.vue_vue_type_style_index_0_scoped_19810958_lang.js +4 -0
- package/dist/bundled/style.css +46 -45
- package/dist/bundled/util/preview-settings.js +11 -0
- package/dist/style.css +77 -64
- package/package.json +4 -4
- package/src/app/App.vue +1 -1
- package/src/app/components/HomeView.vue +1 -1
- package/src/app/components/app/AppHeader.vue +1 -1
- package/src/app/components/app/AppLogo.vue +1 -0
- package/src/app/components/app/Breadcrumb.vue +1 -1
- package/src/app/components/app/InitialLoading.vue +1 -1
- package/src/app/components/app/MobileOverlay.vue +1 -1
- package/src/app/components/base/BaseCheckbox.vue +1 -1
- package/src/app/components/base/BaseCopyIcon.vue +1 -1
- package/src/app/components/base/BaseEmpty.vue +1 -1
- package/src/app/components/base/BaseListItemLink.vue +1 -0
- package/src/app/components/base/BaseOverflowMenu.vue +1 -1
- package/src/app/components/base/BaseOverflowTab.vue +1 -0
- package/src/app/components/base/BaseSelect.vue +1 -0
- package/src/app/components/base/BaseSplitPane.vue +1 -1
- package/src/app/components/base/BaseTab.vue +1 -0
- package/src/app/components/base/BaseTag.vue +5 -0
- package/src/app/components/panel/ControlsComponentPropItem.vue +1 -0
- package/src/app/components/panel/ControlsComponentProps.vue +1 -1
- package/src/app/components/panel/PaneTabs.vue +7 -12
- package/src/app/components/panel/StatePresets.vue +1 -1
- package/src/app/components/panel/StoryControls.vue +1 -1
- package/src/app/components/panel/StoryDocs.vue +30 -1
- package/src/app/components/panel/StoryEvent.vue +1 -1
- package/src/app/components/panel/StoryEvents.vue +4 -1
- package/src/app/components/panel/StorySidePanel.vue +9 -3
- package/src/app/components/panel/StorySourceCode.vue +1 -1
- package/src/app/components/search/SearchItem.vue +1 -0
- package/src/app/components/search/SearchLoading.vue +1 -1
- package/src/app/components/search/SearchModal.vue +1 -1
- package/src/app/components/search/SearchPane.vue +1 -1
- package/src/app/components/story/GenericMountStory.vue +1 -0
- package/src/app/components/story/GenericRenderStory.vue +1 -0
- package/src/app/components/story/StoryResponsivePreview.vue +11 -2
- package/src/app/components/story/StoryVariantGrid.vue +32 -24
- package/src/app/components/story/StoryVariantGridItem.vue +18 -4
- package/src/app/components/story/StoryVariantListItem.vue +1 -0
- package/src/app/components/story/StoryVariantSingle.vue +1 -1
- package/src/app/components/story/StoryVariantSinglePreviewNative.vue +17 -5
- package/src/app/components/story/StoryVariantSinglePreviewRemote.vue +1 -0
- package/src/app/components/story/StoryVariantSingleView.vue +1 -1
- package/src/app/components/story/StoryView.vue +5 -2
- package/src/app/components/story/StoryViewer.vue +1 -1
- package/src/app/components/toolbar/ToolbarBackground.vue +21 -7
- package/src/app/components/toolbar/ToolbarNewTab.vue +1 -1
- package/src/app/components/toolbar/ToolbarResponsiveSize.vue +3 -3
- package/src/app/components/toolbar/ToolbarTextDirection.vue +1 -1
- package/src/app/components/toolbar/ToolbarTitle.vue +1 -1
- package/src/app/components/tree/StoryGroup.vue +1 -1
- package/src/app/components/tree/StoryList.vue +1 -1
- package/src/app/components/tree/StoryListFolder.vue +4 -1
- package/src/app/components/tree/StoryListItem.vue +1 -0
- package/src/app/style/{floating-vue.pcss → floating.pcss} +0 -0
- package/src/app/style/main.pcss +46 -44
- package/src/app/style/sandbox.css +5 -1
- package/src/app/util/preview-settings.ts +13 -0
- package/src/bundle-main-dev.js +4 -0
- package/src/bundle-sandbox-dev.js +2 -0
- package/tailwind.config.cjs +1 -1
- package/dist/bundled/components/app/Breadcrumb.vue_vue_type_style_index_0_scoped_3c779b73_lang.js +0 -4
- package/dist/bundled/components/base/BaseEmpty.vue_vue_type_style_index_0_scoped_af3328a6_lang.js +0 -4
- package/dist/bundled/components/base/BaseSplitPane.vue_vue_type_style_index_0_scoped_bb6c600c_lang.js +0 -4
- package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_style_index_0_scoped_0d096b10_lang.js +0 -4
- package/dist/bundled/components/search/SearchItem.vue_vue_type_style_index_0_scoped_b819ed97_lang.js +0 -4
- package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_style_index_0_scoped_1375d05a_lang.js +0 -4
- package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_style_index_0_scoped_601cc357_lang.js +0 -4
- package/dist/bundled/components/story/StoryVariantListItem.vue_vue_type_style_index_0_scoped_02816158_lang.js +0 -4
- package/dist/bundled/components/story/StoryVariantSingle.vue_vue_type_style_index_0_scoped_89489ae4_lang.js +0 -4
- package/dist/bundled/components/story/StoryViewer.vue_vue_type_style_index_0_scoped_54d5a557_lang.js +0 -4
- package/dist/bundled/components/toolbar/ToolbarBackground.vue_vue_type_style_index_0_scoped_8d0cb17e_lang.js +0 -4
- package/dist/bundled/components/tree/StoryListFolder.vue_vue_type_style_index_0_scoped_41fb5f7e_lang.js +0 -4
- package/dist/bundled/components/tree/StoryListItem.vue_vue_type_style_index_0_scoped_d1a05247_lang.js +0 -4
|
@@ -31,12 +31,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
return (_ctx, _cache) => {
|
|
34
|
-
return !unref(storyStore).currentVariant ? (openBlock(), createBlock(BaseEmpty, {
|
|
34
|
+
return !unref(storyStore).currentVariant ? (openBlock(), createBlock(BaseEmpty, {
|
|
35
|
+
key: 0,
|
|
36
|
+
class: "histoire-story-side-panel histoire-selection"
|
|
37
|
+
}, {
|
|
35
38
|
default: withCtx(() => [
|
|
36
39
|
_hoisted_1
|
|
37
40
|
]),
|
|
38
41
|
_: 1
|
|
39
|
-
})) : !unref(storyStore).currentVariant.configReady || !unref(storyStore).currentVariant.previewReady ? (openBlock(), createBlock(BaseEmpty, {
|
|
42
|
+
})) : !unref(storyStore).currentVariant.configReady || !unref(storyStore).currentVariant.previewReady ? (openBlock(), createBlock(BaseEmpty, {
|
|
43
|
+
key: 1,
|
|
44
|
+
class: "histoire-story-side-panel histoire-loading"
|
|
45
|
+
}, {
|
|
40
46
|
default: withCtx(() => [
|
|
41
47
|
_hoisted_2
|
|
42
48
|
]),
|
|
@@ -45,7 +51,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
51
|
key: 2,
|
|
46
52
|
"save-id": "story-sidepane",
|
|
47
53
|
orientation: "portrait",
|
|
48
|
-
class: "htw-h-full",
|
|
54
|
+
class: "histoire-story-side-panel histoire-loaded htw-h-full",
|
|
49
55
|
"data-test-id": "story-side-panel"
|
|
50
56
|
}, {
|
|
51
57
|
first: withCtx(() => [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./StorySourceCode.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
-
import "./StorySourceCode.
|
|
2
|
+
import "./StorySourceCode.vue_vue_type_style_index_0_scoped_36810e45_lang.js";
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const StorySourceCode = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const StorySourceCode = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-36810e45"]]);
|
|
5
5
|
export {
|
|
6
6
|
StorySourceCode as default
|
|
7
7
|
};
|
package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -6,8 +6,8 @@ import { unindent } from "@histoire/shared";
|
|
|
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.js";
|
|
9
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
10
|
-
const _hoisted_1 = { class: "htw-bg-gray-50 dark:htw-bg-gray-750 htw-h-full htw-overflow-hidden htw-flex htw-flex-col" };
|
|
9
|
+
const _withScopeId = (n) => (pushScopeId("data-v-36810e45"), n = n(), popScopeId(), n);
|
|
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
11
|
const _hoisted_2 = {
|
|
12
12
|
key: 0,
|
|
13
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"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./SearchItem.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
-
import "./SearchItem.
|
|
2
|
+
import "./SearchItem.vue_vue_type_style_index_0_scoped_d95fcb03_lang.js";
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const SearchItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const SearchItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d95fcb03"]]);
|
|
5
5
|
export {
|
|
6
6
|
SearchItem as default
|
|
7
7
|
};
|
|
@@ -4,7 +4,7 @@ import { Icon } from "@histoire/vendors/iconify";
|
|
|
4
4
|
import { onKeyboardShortcut } from "../../util/keyboard.js";
|
|
5
5
|
import BaseListItemLink from "../base/BaseListItemLink.js";
|
|
6
6
|
import { useScrollOnActive } from "../../util/scroll.js";
|
|
7
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
7
|
+
const _withScopeId = (n) => (pushScopeId("data-v-d95fcb03"), n = n(), popScopeId(), n);
|
|
8
8
|
const _hoisted_1 = ["data-selected"];
|
|
9
9
|
const _hoisted_2 = { class: "htw-flex-1" };
|
|
10
10
|
const _hoisted_3 = { class: "htw-flex" };
|
|
@@ -31,7 +31,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31
31
|
setup(__props, { emit }) {
|
|
32
32
|
const props = __props;
|
|
33
33
|
useCssVars((_ctx) => ({
|
|
34
|
-
"
|
|
34
|
+
"beebbd52": __props.result.iconColor
|
|
35
35
|
}));
|
|
36
36
|
const el = ref();
|
|
37
37
|
const { selected } = toRefs(props);
|
|
@@ -55,6 +55,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
55
55
|
return openBlock(), createElementBlock("div", {
|
|
56
56
|
ref_key: "el",
|
|
57
57
|
ref: el,
|
|
58
|
+
class: "histoire-search-item",
|
|
58
59
|
"data-test-id": "search-item",
|
|
59
60
|
"data-selected": unref(selected) ? "" : void 0
|
|
60
61
|
}, [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createElementBlock, createVNode, unref, createTextVNode } from "@histoire/vendors/vue";
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
|
-
const _hoisted_1 = { class: "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" };
|
|
3
|
+
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" };
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "SearchLoading",
|
|
6
6
|
setup(__props) {
|
|
@@ -2,7 +2,7 @@ import { defineComponent, defineAsyncComponent, withDirectives, openBlock, creat
|
|
|
2
2
|
import "./SearchLoading.js";
|
|
3
3
|
import _sfc_main$1 from "./SearchLoading.vue_vue_type_script_setup_true_lang.js";
|
|
4
4
|
const _hoisted_1 = {
|
|
5
|
-
class: "htw-fixed htw-inset-0 htw-bg-white/80 dark:htw-bg-gray-700/80 htw-z-20",
|
|
5
|
+
class: "histoire-search-modal htw-fixed htw-inset-0 htw-bg-white/80 dark:htw-bg-gray-700/80 htw-z-20",
|
|
6
6
|
"data-test-id": "search-modal"
|
|
7
7
|
};
|
|
8
8
|
const _hoisted_2 = { class: "htw-bg-white dark:htw-bg-gray-700 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-850 htw-rounded-lg htw-relative htw-divide-y htw-divide-gray-200 dark:htw-divide-gray-850" };
|
|
@@ -221,7 +221,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
221
221
|
return (_ctx, _cache) => {
|
|
222
222
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
223
223
|
createElementVNode("div", {
|
|
224
|
-
class: "htw-flex htw-items-center htw-gap-4 htw-pl-6 htw-border htw-border-transparent focus-visible:htw-border-primary-500",
|
|
224
|
+
class: "histoire-search-pane htw-flex htw-items-center htw-gap-4 htw-pl-6 htw-border htw-border-transparent focus-visible:htw-border-primary-500",
|
|
225
225
|
onClick: _cache[4] || (_cache[4] = ($event) => focused.value = true)
|
|
226
226
|
}, [
|
|
227
227
|
createVNode(unref(Icon), {
|
package/dist/bundled/components/story/GenericMountStory.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -23,6 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
return (_ctx, _cache) => {
|
|
24
24
|
return mountComponent.value ? (openBlock(), createBlock(resolveDynamicComponent(mountComponent.value), mergeProps({
|
|
25
25
|
key: 0,
|
|
26
|
+
class: "histoire-generic-mount-story",
|
|
26
27
|
story: __props.story
|
|
27
28
|
}, _ctx.$attrs), null, 16, ["story"])) : createCommentVNode("", true);
|
|
28
29
|
};
|
package/dist/bundled/components/story/GenericRenderStory.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -23,6 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
return (_ctx, _cache) => {
|
|
24
24
|
return mountComponent.value ? (openBlock(), createBlock(resolveDynamicComponent(mountComponent.value), mergeProps({
|
|
25
25
|
key: 0,
|
|
26
|
+
class: "histoire-generic-render-story htw-sandbox-contain",
|
|
26
27
|
story: __props.story
|
|
27
28
|
}, _ctx.$attrs), null, 16, ["story"])) : createCommentVNode("", true);
|
|
28
29
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./StoryResponsivePreview.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
-
import "./StoryResponsivePreview.
|
|
2
|
+
import "./StoryResponsivePreview.vue_vue_type_style_index_0_scoped_a83b1911_lang.js";
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const StoryResponsivePreview = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const StoryResponsivePreview = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a83b1911"]]);
|
|
5
5
|
export {
|
|
6
6
|
StoryResponsivePreview as default
|
|
7
7
|
};
|
package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import { defineComponent, useCssVars, unref, ref, onUnmounted, computed, openBlock, createElementBlock, createVNode, createCommentVNode, createElementVNode, normalizeClass, createBlock, renderSlot, Fragment, pushScopeId, popScopeId, createStaticVNode } from "@histoire/vendors/vue";
|
|
1
|
+
import { defineComponent, useCssVars, unref, ref, onUnmounted, computed, openBlock, createElementBlock, createVNode, createCommentVNode, createElementVNode, normalizeClass, createBlock, renderSlot, Fragment, withDirectives, pushScopeId, popScopeId, createStaticVNode } from "@histoire/vendors/vue";
|
|
2
2
|
import { useEventListener } from "@histoire/vendors/vue-use";
|
|
3
3
|
import { Icon } from "@histoire/vendors/iconify";
|
|
4
4
|
import HatchedPattern from "../misc/HatchedPattern.js";
|
|
5
5
|
import CheckerboardPattern from "../misc/CheckerboardPattern.js";
|
|
6
6
|
import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
7
|
-
|
|
8
|
-
const
|
|
7
|
+
import { VTooltip } from "@histoire/vendors/floating-vue";
|
|
8
|
+
const _withScopeId = (n) => (pushScopeId("data-v-a83b1911"), n = n(), popScopeId(), n);
|
|
9
|
+
const _hoisted_1 = { class: "histoire-story-responsive-preview htw-w-full htw-h-full htw-flex-1 htw-rounded-lg htw-relative htw-overflow-hidden" };
|
|
9
10
|
const _hoisted_2 = {
|
|
10
11
|
key: 0,
|
|
11
12
|
class: "htw-absolute htw-inset-0 htw-w-full htw-h-full htw-bg-gray-100 dark:htw-bg-gray-750 htw-rounded-r-lg htw-border-l-2 htw-border-gray-500/10 dark:htw-border-gray-700/30 htw-overflow-hidden"
|
|
12
13
|
};
|
|
13
|
-
const _hoisted_3 = {
|
|
14
|
+
const _hoisted_3 = {
|
|
15
|
+
class: "bind-preview-bg htw-rounded-lg htw-h-full",
|
|
16
|
+
"data-test-id": "responsive-preview-bg"
|
|
17
|
+
};
|
|
14
18
|
const _hoisted_4 = { class: "htw-p-8 htw-h-full htw-relative" };
|
|
15
19
|
const _hoisted_5 = { class: "htw-w-full htw-h-full htw-relative" };
|
|
16
20
|
const _hoisted_6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "htw-absolute htw-inset-0" }, null, -1));
|
|
17
|
-
const _hoisted_7 = /* @__PURE__ */ createStaticVNode('<div class="htw-absolute htw-top-5 htw-left-8 htw-h-2 htw-w-px htw-bg-gray-400/25" data-v-
|
|
21
|
+
const _hoisted_7 = /* @__PURE__ */ createStaticVNode('<div class="htw-absolute htw-top-5 htw-left-8 htw-h-2 htw-w-px htw-bg-gray-400/25" data-v-a83b1911></div><div class="htw-absolute htw-top-5 htw-right-8 htw-h-2 htw-w-px htw-bg-gray-400/25" data-v-a83b1911></div><div class="htw-absolute htw-bottom-5 htw-left-8 htw-h-2 htw-w-px htw-bg-gray-400/25" data-v-a83b1911></div><div class="htw-absolute htw-bottom-5 htw-right-8 htw-h-2 htw-w-px htw-bg-gray-400/25" data-v-a83b1911></div><div class="htw-absolute htw-left-5 htw-top-8 htw-w-2 htw-h-px htw-bg-gray-400/25" data-v-a83b1911></div><div class="htw-absolute htw-left-5 htw-bottom-8 htw-w-2 htw-h-px htw-bg-gray-400/25" data-v-a83b1911></div><div class="htw-absolute htw-right-5 htw-top-8 htw-w-2 htw-h-px htw-bg-gray-400/25" data-v-a83b1911></div><div class="htw-absolute htw-right-5 htw-bottom-8 htw-w-2 htw-h-px htw-bg-gray-400/25" data-v-a83b1911></div>', 8);
|
|
18
22
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
19
23
|
__name: "StoryResponsivePreview",
|
|
20
24
|
props: {
|
|
@@ -23,7 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
27
|
setup(__props) {
|
|
24
28
|
const props = __props;
|
|
25
29
|
useCssVars((_ctx) => ({
|
|
26
|
-
"
|
|
30
|
+
"03d1950e": unref(settings).backgroundColor
|
|
27
31
|
}));
|
|
28
32
|
const settings = usePreviewSettingsStore().currentSettings;
|
|
29
33
|
const resizing = ref(false);
|
|
@@ -111,6 +115,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
111
115
|
const finalWidth = computed(() => settings.rotate ? settings.responsiveHeight : settings.responsiveWidth);
|
|
112
116
|
const finalHeight = computed(() => settings.rotate ? settings.responsiveWidth : settings.responsiveHeight);
|
|
113
117
|
const isResponsiveEnabled = computed(() => !props.variant.responsiveDisabled);
|
|
118
|
+
const sizeTooltip = computed(() => {
|
|
119
|
+
var _a, _b;
|
|
120
|
+
return ((_a = responsiveWidth.value) != null ? _a : "Auto") + " \xD7 " + ((_b = responsiveHeight.value) != null ? _b : "Auto");
|
|
121
|
+
});
|
|
114
122
|
return (_ctx, _cache) => {
|
|
115
123
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
116
124
|
unref(isResponsiveEnabled) ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
@@ -145,7 +153,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
145
153
|
_hoisted_7
|
|
146
154
|
]),
|
|
147
155
|
unref(isResponsiveEnabled) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
148
|
-
|
|
156
|
+
withDirectives((openBlock(), createElementBlock("div", {
|
|
149
157
|
ref_key: "horizontalDragger",
|
|
150
158
|
ref: horizontalDragger,
|
|
151
159
|
class: "htw-absolute htw-w-4 htw-top-0 htw-bottom-4 htw-right-0 hover:htw-bg-primary-500/30 htw-flex htw-items-center htw-justify-center htw-cursor-ew-resize htw-group hover:htw-text-primary-500"
|
|
@@ -154,8 +162,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
154
162
|
icon: "mdi:drag-vertical-variant",
|
|
155
163
|
class: "htw-w-4 htw-h-4 htw-opacity-20 group-hover:htw-opacity-90"
|
|
156
164
|
})
|
|
157
|
-
],
|
|
158
|
-
|
|
165
|
+
])), [
|
|
166
|
+
[
|
|
167
|
+
unref(VTooltip),
|
|
168
|
+
unref(sizeTooltip),
|
|
169
|
+
void 0,
|
|
170
|
+
{ right: true }
|
|
171
|
+
]
|
|
172
|
+
]),
|
|
173
|
+
withDirectives((openBlock(), createElementBlock("div", {
|
|
159
174
|
ref_key: "verticalDragger",
|
|
160
175
|
ref: verticalDragger,
|
|
161
176
|
class: "htw-absolute htw-h-4 htw-left-0 htw-right-4 htw-bottom-0 hover:htw-bg-primary-500/30 htw-flex htw-items-center htw-justify-center htw-cursor-ns-resize htw-group hover:htw-text-primary-500"
|
|
@@ -164,12 +179,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
164
179
|
icon: "mdi:drag-horizontal-variant",
|
|
165
180
|
class: "htw-w-4 htw-h-4 htw-opacity-20 group-hover:htw-opacity-90"
|
|
166
181
|
})
|
|
167
|
-
],
|
|
168
|
-
|
|
182
|
+
])), [
|
|
183
|
+
[
|
|
184
|
+
unref(VTooltip),
|
|
185
|
+
unref(sizeTooltip),
|
|
186
|
+
void 0,
|
|
187
|
+
{ bottom: true }
|
|
188
|
+
]
|
|
189
|
+
]),
|
|
190
|
+
withDirectives(createElementVNode("div", {
|
|
169
191
|
ref_key: "cornerDragger",
|
|
170
192
|
ref: cornerDragger,
|
|
171
193
|
class: "htw-absolute htw-w-4 htw-h-4 htw-right-0 htw-bottom-0 hover:htw-bg-primary-500/30 htw-flex htw-items-center htw-justify-center htw-cursor-nwse-resize htw-group hover:htw-text-primary-500"
|
|
172
|
-
}, null, 512)
|
|
194
|
+
}, null, 512), [
|
|
195
|
+
[
|
|
196
|
+
unref(VTooltip),
|
|
197
|
+
unref(sizeTooltip),
|
|
198
|
+
void 0,
|
|
199
|
+
{ bottom: true }
|
|
200
|
+
]
|
|
201
|
+
])
|
|
173
202
|
], 64)) : createCommentVNode("", true)
|
|
174
203
|
])
|
|
175
204
|
], 2)
|
package/dist/bundled/components/story/StoryVariantGrid.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -6,11 +6,12 @@ import StoryVariantGridItem from "./StoryVariantGridItem.js";
|
|
|
6
6
|
import ToolbarBackground from "../toolbar/ToolbarBackground.js";
|
|
7
7
|
import "../toolbar/ToolbarTextDirection.js";
|
|
8
8
|
import _sfc_main$1 from "../toolbar/ToolbarTextDirection.vue_vue_type_script_setup_true_lang.js";
|
|
9
|
-
const _hoisted_1 = { class: "htw-flex htw-flex-col htw-items-stretch htw-h-full __histoire-pane-shadow-from-right" };
|
|
9
|
+
const _hoisted_1 = { class: "histoire-story-variant-grid htw-flex htw-flex-col htw-items-stretch htw-h-full __histoire-pane-shadow-from-right" };
|
|
10
10
|
const _hoisted_2 = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "htw-flex-none htw-flex htw-items-center htw-justify-end htw-h-8 htw-mx-2 htw-mt-1"
|
|
13
13
|
};
|
|
14
|
+
const _hoisted_3 = { class: "htw-overflow-y-auto htw-flex htw-flex-1" };
|
|
14
15
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
16
|
__name: "StoryVariantGrid",
|
|
16
17
|
setup(__props) {
|
|
@@ -67,6 +68,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
watch(() => storyStore.currentVariant, () => {
|
|
71
|
+
maxItemHeight.value = 0;
|
|
70
72
|
updateMaxCount();
|
|
71
73
|
});
|
|
72
74
|
const gridEl = ref(null);
|
|
@@ -78,14 +80,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
78
80
|
viewWidth.value = el.value.clientWidth;
|
|
79
81
|
if (!gridEl.value)
|
|
80
82
|
return;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
if (gridTemplateWidth.value.endsWith("%")) {
|
|
84
|
+
gridColumnWidth.value = viewWidth.value * parseInt(gridTemplateWidth.value) / 100 - gap;
|
|
85
|
+
} else {
|
|
86
|
+
gridColumnWidth.value = parseInt(gridTemplateWidth.value);
|
|
87
|
+
}
|
|
85
88
|
}
|
|
86
89
|
onMounted(() => {
|
|
87
90
|
updateSize();
|
|
88
91
|
});
|
|
92
|
+
useResizeObserver(gridEl, () => {
|
|
93
|
+
updateSize();
|
|
94
|
+
});
|
|
89
95
|
const columnCount = computed(() => Math.min(storyStore.currentStory.variants.length, Math.floor((viewWidth.value + gap) / (gridColumnWidth.value + gap))));
|
|
90
96
|
return (_ctx, _cache) => {
|
|
91
97
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
@@ -93,37 +99,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
93
99
|
createVNode(ToolbarBackground),
|
|
94
100
|
createVNode(_sfc_main$1)
|
|
95
101
|
])) : createCommentVNode("", true),
|
|
96
|
-
createElementVNode("div",
|
|
97
|
-
ref_key: "el",
|
|
98
|
-
ref: el,
|
|
99
|
-
class: "htw-overflow-y-auto htw-flex htw-flex-1",
|
|
100
|
-
onScroll: _cache[0] || (_cache[0] = ($event) => updateMaxCount())
|
|
101
|
-
}, [
|
|
102
|
+
createElementVNode("div", _hoisted_3, [
|
|
102
103
|
createElementVNode("div", {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
ref_key: "el",
|
|
105
|
+
ref: el,
|
|
106
|
+
class: "htw-flex htw-w-0 htw-flex-1 htw-mx-4",
|
|
107
|
+
onScroll: _cache[0] || (_cache[0] = ($event) => updateMaxCount())
|
|
107
108
|
}, [
|
|
108
109
|
createElementVNode("div", {
|
|
109
|
-
|
|
110
|
-
ref: gridEl,
|
|
111
|
-
class: "htw-grid htw-gap-4 htw-m-4",
|
|
110
|
+
class: "htw-m-auto",
|
|
112
111
|
style: normalizeStyle({
|
|
113
|
-
|
|
112
|
+
minHeight: `${unref(storyStore).currentStory.variants.length / countPerRow.value * (maxItemHeight.value + gap) - gap}px`
|
|
114
113
|
})
|
|
115
114
|
}, [
|
|
116
|
-
(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
}
|
|
115
|
+
createElementVNode("div", {
|
|
116
|
+
ref_key: "gridEl",
|
|
117
|
+
ref: gridEl,
|
|
118
|
+
class: "htw-grid htw-gap-4 htw-my-4",
|
|
119
|
+
style: normalizeStyle({
|
|
120
|
+
gridTemplateColumns: `repeat(${unref(columnCount)}, ${gridColumnWidth.value}px)`
|
|
121
|
+
})
|
|
122
|
+
}, [
|
|
123
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(storyStore).currentStory.variants.slice(0, maxCount.value), (variant, index) => {
|
|
124
|
+
return openBlock(), createBlock(StoryVariantGridItem, {
|
|
125
|
+
key: index,
|
|
126
|
+
variant,
|
|
127
|
+
story: unref(storyStore).currentStory,
|
|
128
|
+
onResize: onItemResize
|
|
129
|
+
}, null, 8, ["variant", "story"]);
|
|
130
|
+
}), 128))
|
|
131
|
+
], 4)
|
|
124
132
|
], 4)
|
|
125
|
-
],
|
|
126
|
-
]
|
|
133
|
+
], 544)
|
|
134
|
+
])
|
|
127
135
|
]);
|
|
128
136
|
};
|
|
129
137
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./StoryVariantGridItem.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
-
import "./StoryVariantGridItem.
|
|
2
|
+
import "./StoryVariantGridItem.vue_vue_type_style_index_0_scoped_f7c98176_lang.js";
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const StoryVariantGridItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const StoryVariantGridItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f7c98176"]]);
|
|
5
5
|
export {
|
|
6
6
|
StoryVariantGridItem as default
|
|
7
7
|
};
|
package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import { defineComponent, useCssVars, unref, toRefs, ref, resolveComponent, resolveDirective, openBlock, createElementBlock, createElementVNode, withDirectives, createBlock, normalizeClass, withCtx, createVNode, toDisplayString, withModifiers, createCommentVNode, pushScopeId, popScopeId } from "@histoire/vendors/vue";
|
|
1
|
+
import { defineComponent, useCssVars, unref, toRefs, ref, computed, resolveComponent, resolveDirective, openBlock, createElementBlock, createElementVNode, withDirectives, createBlock, normalizeClass, withCtx, createVNode, toDisplayString, withModifiers, createCommentVNode, normalizeStyle, pushScopeId, popScopeId } from "@histoire/vendors/vue";
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
3
|
import { useRouter } from "@histoire/vendors/vue-router";
|
|
4
4
|
import { useResizeObserver } from "@histoire/vendors/vue-use";
|
|
5
5
|
import { useCurrentVariantRoute } from "../../util/variant.js";
|
|
6
6
|
import { useScrollOnActive } from "../../util/scroll.js";
|
|
7
7
|
import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
8
|
+
import { getContrastColor } from "../../util/preview-settings.js";
|
|
9
|
+
import { histoireConfig } from "../../util/config.js";
|
|
8
10
|
import "./GenericRenderStory.js";
|
|
9
11
|
import "../toolbar/ToolbarNewTab.js";
|
|
10
12
|
import CheckerboardPattern from "../misc/CheckerboardPattern.js";
|
|
11
13
|
import _sfc_main$1 from "../toolbar/ToolbarNewTab.vue_vue_type_script_setup_true_lang.js";
|
|
12
14
|
import _sfc_main$2 from "./GenericRenderStory.vue_vue_type_script_setup_true_lang.js";
|
|
13
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
15
|
+
const _withScopeId = (n) => (pushScopeId("data-v-f7c98176"), n = n(), popScopeId(), n);
|
|
14
16
|
const _hoisted_1 = { class: "htw-flex-none htw-flex htw-items-center" };
|
|
15
17
|
const _hoisted_2 = { class: "htw-truncate htw-flex-1" };
|
|
16
18
|
const _hoisted_3 = { class: "htw-flex-none htw-ml-auto htw-hidden group-hover:htw-flex htw-items-center" };
|
|
17
|
-
const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", {
|
|
18
|
-
|
|
19
|
+
const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", {
|
|
20
|
+
class: "htw-absolute htw-inset-0 htw-rounded bind-preview-bg",
|
|
21
|
+
"data-test-id": "responsive-preview-bg"
|
|
22
|
+
}, null, -1));
|
|
19
23
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
24
|
__name: "StoryVariantGridItem",
|
|
21
25
|
props: {
|
|
@@ -34,8 +38,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
34
38
|
setup(__props, { emit }) {
|
|
35
39
|
const props = __props;
|
|
36
40
|
useCssVars((_ctx) => ({
|
|
37
|
-
"
|
|
38
|
-
"
|
|
41
|
+
"edeb0368": unref(variant).iconColor,
|
|
42
|
+
"f4b27ac2": unref(settings).backgroundColor
|
|
39
43
|
}));
|
|
40
44
|
const { variant } = toRefs(props);
|
|
41
45
|
const { isActive, targetRoute } = useCurrentVariantRoute(variant);
|
|
@@ -62,13 +66,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
66
|
}
|
|
63
67
|
});
|
|
64
68
|
const settings = usePreviewSettingsStore().currentSettings;
|
|
69
|
+
const contrastColor = computed(() => getContrastColor(settings));
|
|
70
|
+
const autoApplyContrastColor = computed(() => !!histoireConfig.autoApplyContrastColor);
|
|
65
71
|
return (_ctx, _cache) => {
|
|
66
72
|
const _component_RouterLink = resolveComponent("RouterLink");
|
|
67
73
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
68
74
|
return openBlock(), createElementBlock("div", {
|
|
69
75
|
ref_key: "el",
|
|
70
76
|
ref: el,
|
|
71
|
-
class: "htw-cursor-default htw-flex htw-flex-col htw-gap-y-1 htw-group"
|
|
77
|
+
class: "histoire-story-variant-grid-item htw-cursor-default htw-flex htw-flex-col htw-gap-y-1 htw-group"
|
|
72
78
|
}, [
|
|
73
79
|
createElementVNode("div", _hoisted_1, [
|
|
74
80
|
withDirectives((openBlock(), createBlock(_component_RouterLink, {
|
|
@@ -116,7 +122,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
116
122
|
key: 0,
|
|
117
123
|
class: "htw-absolute htw-inset-0 htw-w-full htw-h-full htw-text-gray-500/20"
|
|
118
124
|
})) : createCommentVNode("", true),
|
|
119
|
-
createElementVNode("div",
|
|
125
|
+
createElementVNode("div", {
|
|
126
|
+
class: "htw-relative htw-h-full",
|
|
127
|
+
style: normalizeStyle({
|
|
128
|
+
"--histoire-contrast-color": unref(contrastColor),
|
|
129
|
+
color: unref(autoApplyContrastColor) ? unref(contrastColor) : void 0
|
|
130
|
+
})
|
|
131
|
+
}, [
|
|
120
132
|
(openBlock(), createBlock(_sfc_main$2, {
|
|
121
133
|
key: `${__props.story.id}-${unref(variant).id}`,
|
|
122
134
|
variant: unref(variant),
|
|
@@ -124,7 +136,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
124
136
|
dir: unref(settings).textDirection,
|
|
125
137
|
onReady
|
|
126
138
|
}, null, 8, ["variant", "story", "dir"]))
|
|
127
|
-
])
|
|
139
|
+
], 4)
|
|
128
140
|
], 34)
|
|
129
141
|
], 512);
|
|
130
142
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./StoryVariantListItem.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
-
import "./StoryVariantListItem.
|
|
2
|
+
import "./StoryVariantListItem.vue_vue_type_style_index_0_scoped_ab890d9c_lang.js";
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const StoryVariantListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const StoryVariantListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ab890d9c"]]);
|
|
5
5
|
export {
|
|
6
6
|
StoryVariantListItem as default
|
|
7
7
|
};
|
package/dist/bundled/components/story/StoryVariantListItem.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useCurrentVariantRoute } from "../../util/variant.js";
|
|
|
3
3
|
import BaseListItemLink from "../base/BaseListItemLink.js";
|
|
4
4
|
import { Icon } from "@histoire/vendors/iconify";
|
|
5
5
|
import { useScrollOnActive } from "../../util/scroll.js";
|
|
6
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
6
|
+
const _withScopeId = (n) => (pushScopeId("data-v-ab890d9c"), n = n(), popScopeId(), n);
|
|
7
7
|
const _hoisted_1 = { class: "htw-truncate" };
|
|
8
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
9
|
__name: "StoryVariantListItem",
|
|
@@ -16,7 +16,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
16
|
setup(__props) {
|
|
17
17
|
const props = __props;
|
|
18
18
|
useCssVars((_ctx) => ({
|
|
19
|
-
"
|
|
19
|
+
"89126aaa": unref(variant).iconColor
|
|
20
20
|
}));
|
|
21
21
|
const { variant } = toRefs(props);
|
|
22
22
|
const { isActive, targetRoute } = useCurrentVariantRoute(variant);
|
|
@@ -26,6 +26,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
26
|
return openBlock(), createElementBlock("div", {
|
|
27
27
|
ref_key: "el",
|
|
28
28
|
ref: el,
|
|
29
|
+
class: "histoire-story-variant-list-item",
|
|
29
30
|
"data-test-id": "story-variant-list-item"
|
|
30
31
|
}, [
|
|
31
32
|
createVNode(BaseListItemLink, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./StoryVariantSingle.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
-
import "./StoryVariantSingle.
|
|
2
|
+
import "./StoryVariantSingle.vue_vue_type_style_index_0_scoped_ddfc5b4f_lang.js";
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const StoryVariantSingle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const StoryVariantSingle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ddfc5b4f"]]);
|
|
5
5
|
export {
|
|
6
6
|
StoryVariantSingle as default
|
|
7
7
|
};
|
package/dist/bundled/components/story/StoryVariantSingle.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -6,10 +6,10 @@ import BaseSplitPane from "../base/BaseSplitPane.js";
|
|
|
6
6
|
import StoryVariantListItem from "./StoryVariantListItem.js";
|
|
7
7
|
import "./StoryVariantSingleView.js";
|
|
8
8
|
import _sfc_main$1 from "./StoryVariantSingleView.vue_vue_type_script_setup_true_lang.js";
|
|
9
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
9
|
+
const _withScopeId = (n) => (pushScopeId("data-v-ddfc5b4f"), n = n(), popScopeId(), n);
|
|
10
10
|
const _hoisted_1 = {
|
|
11
11
|
key: 0,
|
|
12
|
-
class: "htw-p-2 htw-h-full __histoire-pane-shadow-from-right"
|
|
12
|
+
class: "histoire-story-variant-single htw-p-2 htw-h-full __histoire-pane-shadow-from-right"
|
|
13
13
|
};
|
|
14
14
|
const _hoisted_2 = {
|
|
15
15
|
key: 0,
|
|
@@ -33,7 +33,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
33
|
useCssVars((_ctx) => {
|
|
34
34
|
var _a;
|
|
35
35
|
return {
|
|
36
|
-
"
|
|
36
|
+
"4d25d048": (_a = unref(variant)) == null ? void 0 : _a.iconColor
|
|
37
37
|
};
|
|
38
38
|
});
|
|
39
39
|
const storyStore = useStoryStore();
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeStyle,
|
|
2
|
-
import "./GenericRenderStory.js";
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, withCtx, createElementVNode, normalizeStyle, unref, normalizeClass } from "@histoire/vendors/vue";
|
|
3
2
|
import { isDark } from "../../util/dark.js";
|
|
4
3
|
import { histoireConfig } from "../../util/config.js";
|
|
5
4
|
import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
5
|
+
import { getContrastColor } from "../../util/preview-settings.js";
|
|
6
|
+
import "./GenericRenderStory.js";
|
|
6
7
|
import StoryResponsivePreview from "./StoryResponsivePreview.js";
|
|
7
8
|
import _sfc_main$1 from "./GenericRenderStory.vue_vue_type_script_setup_true_lang.js";
|
|
8
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -22,14 +23,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
23
|
});
|
|
23
24
|
}
|
|
24
25
|
const settings = usePreviewSettingsStore().currentSettings;
|
|
26
|
+
const contrastColor = computed(() => getContrastColor(settings));
|
|
27
|
+
const autoApplyContrastColor = computed(() => !!histoireConfig.autoApplyContrastColor);
|
|
25
28
|
return (_ctx, _cache) => {
|
|
26
|
-
return openBlock(), createBlock(StoryResponsivePreview, {
|
|
29
|
+
return openBlock(), createBlock(StoryResponsivePreview, {
|
|
30
|
+
class: "histoire-story-variant-single-preview-native",
|
|
31
|
+
variant: __props.variant
|
|
32
|
+
}, {
|
|
27
33
|
default: withCtx(({ isResponsiveEnabled, finalWidth, finalHeight }) => [
|
|
28
34
|
createElementVNode("div", {
|
|
29
|
-
style: normalizeStyle(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
style: normalizeStyle([
|
|
36
|
+
isResponsiveEnabled ? {
|
|
37
|
+
width: finalWidth ? `${finalWidth}px` : "100%",
|
|
38
|
+
height: finalHeight ? `${finalHeight}px` : "100%"
|
|
39
|
+
} : { width: "100%", height: "100%" },
|
|
40
|
+
{
|
|
41
|
+
"--histoire-contrast-color": unref(contrastColor),
|
|
42
|
+
color: unref(autoApplyContrastColor) ? unref(contrastColor) : void 0
|
|
43
|
+
}
|
|
44
|
+
]),
|
|
33
45
|
class: "htw-relative",
|
|
34
46
|
"data-test-id": "sandbox-render"
|
|
35
47
|
}, [
|