@histoire/app 0.11.2 → 0.11.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/components/app/Breadcrumb.js +2 -2
- package/dist/bundled/components/app/Breadcrumb.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/bundled/components/app/Breadcrumb.vue_vue_type_style_index_0_scoped_3c779b73_lang.js +4 -0
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue_vue_type_script_setup_true_lang.js +6 -32
- package/dist/bundled/components/story/StoryVariantGrid.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/bundled/components/story/StoryVariantGridItem.js +2 -2
- package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_script_setup_true_lang.js +8 -7
- package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_style_index_0_scoped_601cc357_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 -3
- package/dist/bundled/components/story/StoryVariantListItem.vue_vue_type_style_index_0_scoped_02816158_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_89489ae4_lang.js +4 -0
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue_vue_type_script_setup_true_lang.js +8 -3
- package/dist/bundled/components/story/StoryVariantSingleView.vue_vue_type_script_setup_true_lang.js +16 -13
- package/dist/bundled/components/toolbar/ToolbarBackground.js +7 -0
- package/dist/bundled/components/toolbar/{StoryVariantBackground.vue_vue_type_script_setup_true_lang.js → ToolbarBackground.vue_vue_type_script_setup_true_lang.js} +3 -3
- package/dist/bundled/components/toolbar/ToolbarBackground.vue_vue_type_style_index_0_scoped_8d0cb17e_lang.js +4 -0
- package/dist/bundled/components/toolbar/ToolbarNewTab.js +5 -0
- package/dist/bundled/components/toolbar/{StoryVariantNewTab.vue_vue_type_script_setup_true_lang.js → ToolbarNewTab.vue_vue_type_script_setup_true_lang.js} +2 -2
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.js +5 -0
- package/dist/bundled/components/toolbar/{StoryVariantResponsiveSize.vue_vue_type_script_setup_true_lang.js → ToolbarResponsiveSize.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/bundled/components/toolbar/ToolbarTextDirection.js +5 -0
- package/dist/bundled/components/toolbar/ToolbarTextDirection.vue_vue_type_script_setup_true_lang.js +26 -0
- package/dist/bundled/components/toolbar/ToolbarTitle.js +5 -0
- package/dist/bundled/components/toolbar/{StoryVariantTitle.vue_vue_type_script_setup_true_lang.js → ToolbarTitle.vue_vue_type_script_setup_true_lang.js} +2 -2
- package/dist/bundled/components/tree/StoryListItem.js +2 -2
- package/dist/bundled/components/tree/StoryListItem.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/bundled/components/tree/StoryListItem.vue_vue_type_style_index_0_scoped_d1a05247_lang.js +4 -0
- package/dist/bundled/stores/preview-settings.js +3 -2
- package/dist/bundled/style.css +16 -16
- package/dist/bundled/util/dark.js +15 -0
- package/dist/bundled/util/preview-settings.js +1 -0
- package/dist/style.css +28 -5
- package/package.json +4 -4
- package/src/app/components/app/Breadcrumb.vue +1 -1
- package/src/app/components/panel/ControlsComponentPropItem.vue +4 -37
- package/src/app/components/story/StoryVariantGrid.vue +4 -2
- package/src/app/components/story/StoryVariantGridItem.vue +4 -3
- package/src/app/components/story/StoryVariantListItem.vue +1 -1
- package/src/app/components/story/StoryVariantSingle.vue +1 -1
- package/src/app/components/story/StoryVariantSinglePreviewNative.vue +7 -0
- package/src/app/components/story/StoryVariantSingleView.vue +10 -8
- package/src/app/components/toolbar/{StoryVariantBackground.vue → ToolbarBackground.vue} +0 -0
- package/src/app/components/toolbar/{StoryVariantNewTab.vue → ToolbarNewTab.vue} +1 -1
- package/src/app/components/toolbar/{StoryVariantResponsiveSize.vue → ToolbarResponsiveSize.vue} +0 -0
- package/src/app/components/toolbar/ToolbarTextDirection.vue +19 -0
- package/src/app/components/toolbar/{StoryVariantTitle.vue → ToolbarTitle.vue} +1 -1
- package/src/app/components/tree/StoryListItem.vue +1 -1
- package/src/app/stores/preview-settings.ts +2 -1
- package/src/app/types.ts +1 -0
- package/src/app/util/dark.ts +17 -0
- package/src/app/util/preview-settings.ts +2 -0
- package/src/shim.d.ts +9 -0
- package/dist/bundled/components/app/Breadcrumb.vue_vue_type_style_index_0_scoped_afeba72b_lang.js +0 -4
- package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_style_index_0_scoped_5ded7495_lang.js +0 -4
- package/dist/bundled/components/story/StoryVariantListItem.vue_vue_type_style_index_0_scoped_cc25ec8b_lang.js +0 -4
- package/dist/bundled/components/story/StoryVariantSingle.vue_vue_type_style_index_0_scoped_afe0bbc2_lang.js +0 -4
- package/dist/bundled/components/toolbar/StoryVariantBackground.js +0 -7
- package/dist/bundled/components/toolbar/StoryVariantBackground.vue_vue_type_style_index_0_scoped_8dc02d19_lang.js +0 -4
- package/dist/bundled/components/toolbar/StoryVariantNewTab.js +0 -5
- package/dist/bundled/components/toolbar/StoryVariantResponsiveSize.js +0 -5
- package/dist/bundled/components/toolbar/StoryVariantTitle.js +0 -5
- package/dist/bundled/components/tree/StoryListItem.vue_vue_type_style_index_0_scoped_313a2f42_lang.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./Breadcrumb.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
-
import "./Breadcrumb.
|
|
2
|
+
import "./Breadcrumb.vue_vue_type_style_index_0_scoped_3c779b73_lang.js";
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const Breadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const Breadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3c779b73"]]);
|
|
5
5
|
export {
|
|
6
6
|
Breadcrumb as default
|
|
7
7
|
};
|
|
@@ -5,7 +5,7 @@ import "./MobileOverlay.js";
|
|
|
5
5
|
import "../tree/StoryList.js";
|
|
6
6
|
import _sfc_main$1 from "./MobileOverlay.vue_vue_type_script_setup_true_lang.js";
|
|
7
7
|
import _sfc_main$2 from "../tree/StoryList.vue_vue_type_script_setup_true_lang.js";
|
|
8
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
8
|
+
const _withScopeId = (n) => (pushScopeId("data-v-3c779b73"), n = n(), popScopeId(), n);
|
|
9
9
|
const _hoisted_1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { class: "htw-opacity-40" }, " / ", -1));
|
|
10
10
|
const _hoisted_2 = { class: "htw-flex htw-items-center htw-gap-2" };
|
|
11
11
|
const _hoisted_3 = { class: "htw-opacity-40 htw-text-sm" };
|
|
@@ -19,7 +19,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19
19
|
useCssVars((_ctx) => {
|
|
20
20
|
var _a;
|
|
21
21
|
return {
|
|
22
|
-
"
|
|
22
|
+
"0fe094b1": (_a = unref(story)) == null ? void 0 : _a.iconColor
|
|
23
23
|
};
|
|
24
24
|
});
|
|
25
25
|
const storyStore = useStoryStore();
|
|
@@ -55,7 +55,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
55
55
|
createElementVNode("span", _hoisted_2, [
|
|
56
56
|
createVNode(unref(Icon), {
|
|
57
57
|
icon: (_a = unref(story).icon) != null ? _a : "carbon:cube",
|
|
58
|
-
class: normalizeClass(["
|
|
58
|
+
class: normalizeClass(["htw-w-5 htw-h-5 htw-flex-none", {
|
|
59
59
|
"htw-text-primary-500": !unref(story).iconColor,
|
|
60
60
|
"bind-icon-color": unref(story).iconColor
|
|
61
61
|
}])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, computed,
|
|
1
|
+
import { defineComponent, computed, resolveDirective, unref, openBlock, createBlock, resolveDynamicComponent, isRef, withCtx, withDirectives, createVNode, normalizeClass, withModifiers, createCommentVNode } from "@histoire/vendors/vue";
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
|
-
import {
|
|
3
|
+
import { HstJson, HstCheckbox, HstNumber, HstText } from "@histoire/controls";
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "ControlsComponentPropItem",
|
|
6
6
|
props: {
|
|
@@ -21,33 +21,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
return HstCheckbox;
|
|
22
22
|
case "object":
|
|
23
23
|
default:
|
|
24
|
-
return
|
|
24
|
+
return HstJson;
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
-
const isJSON = computed(() => comp.value === HstTextarea);
|
|
28
|
-
const invalidValue = ref("");
|
|
29
27
|
const model = computed({
|
|
30
28
|
get: () => {
|
|
31
29
|
var _a;
|
|
32
|
-
|
|
33
|
-
return invalidValue.value;
|
|
34
|
-
}
|
|
35
|
-
let val = (_a = props.variant.state._hPropState[props.component.index]) == null ? void 0 : _a[props.definition.name];
|
|
36
|
-
if (val && isJSON.value) {
|
|
37
|
-
val = JSON.stringify(val, null, 2);
|
|
38
|
-
}
|
|
39
|
-
return val;
|
|
30
|
+
return (_a = props.variant.state._hPropState[props.component.index]) == null ? void 0 : _a[props.definition.name];
|
|
40
31
|
},
|
|
41
32
|
set: (value) => {
|
|
42
|
-
invalidValue.value = "";
|
|
43
|
-
if (isJSON.value) {
|
|
44
|
-
try {
|
|
45
|
-
value = JSON.parse(value);
|
|
46
|
-
} catch (e) {
|
|
47
|
-
invalidValue.value = value;
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
33
|
if (!props.variant.state._hPropState[props.component.index]) {
|
|
52
34
|
props.variant.state._hPropState[props.component.index] = {};
|
|
53
35
|
}
|
|
@@ -69,17 +51,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
69
51
|
key: 0,
|
|
70
52
|
modelValue: unref(model),
|
|
71
53
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(model) ? model.value = $event : null),
|
|
72
|
-
title: `${__props.definition.name}${unref(canReset) ? " *" : ""}
|
|
73
|
-
placeholder: unref(isJSON) ? "Enter JSON" : null
|
|
54
|
+
title: `${__props.definition.name}${unref(canReset) ? " *" : ""}`
|
|
74
55
|
}, {
|
|
75
56
|
actions: withCtx(() => [
|
|
76
|
-
invalidValue.value ? withDirectives((openBlock(), createBlock(unref(Icon), {
|
|
77
|
-
key: 0,
|
|
78
|
-
icon: "carbon:warning-alt",
|
|
79
|
-
class: "htw-text-orange-500"
|
|
80
|
-
}, null, 512)), [
|
|
81
|
-
[_directive_tooltip, "JSON error"]
|
|
82
|
-
]) : createCommentVNode("", true),
|
|
83
57
|
withDirectives(createVNode(unref(Icon), {
|
|
84
58
|
icon: "carbon:erase",
|
|
85
59
|
class: normalizeClass(["htw-cursor-pointer htw-w-4 htw-h-4 hover:htw-text-primary-500 dark:hover:htw-text-primary-400 htw-text-gray-900 dark:htw-text-gray-100", [
|
|
@@ -91,7 +65,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
91
65
|
])
|
|
92
66
|
]),
|
|
93
67
|
_: 1
|
|
94
|
-
}, 8, ["modelValue", "title"
|
|
68
|
+
}, 8, ["modelValue", "title"])) : createCommentVNode("", true);
|
|
95
69
|
};
|
|
96
70
|
}
|
|
97
71
|
});
|
package/dist/bundled/components/story/StoryVariantGrid.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -3,7 +3,9 @@ import { useResizeObserver } from "@histoire/vendors/vue-use";
|
|
|
3
3
|
import { useStoryStore } from "../../stores/story.js";
|
|
4
4
|
import { isMobile } from "../../util/responsive.js";
|
|
5
5
|
import StoryVariantGridItem from "./StoryVariantGridItem.js";
|
|
6
|
-
import
|
|
6
|
+
import ToolbarBackground from "../toolbar/ToolbarBackground.js";
|
|
7
|
+
import "../toolbar/ToolbarTextDirection.js";
|
|
8
|
+
import _sfc_main$1 from "../toolbar/ToolbarTextDirection.vue_vue_type_script_setup_true_lang.js";
|
|
7
9
|
const _hoisted_1 = { class: "htw-flex htw-flex-col htw-items-stretch htw-h-full __histoire-pane-shadow-from-right" };
|
|
8
10
|
const _hoisted_2 = {
|
|
9
11
|
key: 0,
|
|
@@ -88,7 +90,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
88
90
|
return (_ctx, _cache) => {
|
|
89
91
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
90
92
|
!unref(isMobile) ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
91
|
-
createVNode(
|
|
93
|
+
createVNode(ToolbarBackground),
|
|
94
|
+
createVNode(_sfc_main$1)
|
|
92
95
|
])) : createCommentVNode("", true),
|
|
93
96
|
createElementVNode("div", {
|
|
94
97
|
ref_key: "el",
|
|
@@ -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_601cc357_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-601cc357"]]);
|
|
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
|
@@ -6,11 +6,11 @@ import { useCurrentVariantRoute } from "../../util/variant.js";
|
|
|
6
6
|
import { useScrollOnActive } from "../../util/scroll.js";
|
|
7
7
|
import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
8
8
|
import "./GenericRenderStory.js";
|
|
9
|
-
import "../toolbar/
|
|
9
|
+
import "../toolbar/ToolbarNewTab.js";
|
|
10
10
|
import CheckerboardPattern from "../misc/CheckerboardPattern.js";
|
|
11
|
-
import _sfc_main$1 from "../toolbar/
|
|
11
|
+
import _sfc_main$1 from "../toolbar/ToolbarNewTab.vue_vue_type_script_setup_true_lang.js";
|
|
12
12
|
import _sfc_main$2 from "./GenericRenderStory.vue_vue_type_script_setup_true_lang.js";
|
|
13
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
13
|
+
const _withScopeId = (n) => (pushScopeId("data-v-601cc357"), n = n(), popScopeId(), n);
|
|
14
14
|
const _hoisted_1 = { class: "htw-flex-none htw-flex htw-items-center" };
|
|
15
15
|
const _hoisted_2 = { class: "htw-truncate htw-flex-1" };
|
|
16
16
|
const _hoisted_3 = { class: "htw-flex-none htw-ml-auto htw-hidden group-hover:htw-flex htw-items-center" };
|
|
@@ -34,8 +34,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
34
34
|
setup(__props, { emit }) {
|
|
35
35
|
const props = __props;
|
|
36
36
|
useCssVars((_ctx) => ({
|
|
37
|
-
"
|
|
38
|
-
"
|
|
37
|
+
"f3384526": unref(variant).iconColor,
|
|
38
|
+
"75db4c5e": unref(settings).backgroundColor
|
|
39
39
|
}));
|
|
40
40
|
const { variant } = toRefs(props);
|
|
41
41
|
const { isActive, targetRoute } = useCurrentVariantRoute(variant);
|
|
@@ -83,7 +83,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
83
83
|
return [
|
|
84
84
|
createVNode(unref(Icon), {
|
|
85
85
|
icon: (_a = unref(variant).icon) != null ? _a : "carbon:cube",
|
|
86
|
-
class: normalizeClass(["
|
|
86
|
+
class: normalizeClass(["htw-w-4 htw-h-4 htw-opacity-50", {
|
|
87
87
|
"htw-text-gray-500": !unref(isActive) && !unref(variant).iconColor,
|
|
88
88
|
"bind-icon-color": !unref(isActive) && unref(variant).iconColor
|
|
89
89
|
}])
|
|
@@ -121,8 +121,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
121
121
|
key: `${__props.story.id}-${unref(variant).id}`,
|
|
122
122
|
variant: unref(variant),
|
|
123
123
|
story: __props.story,
|
|
124
|
+
dir: unref(settings).textDirection,
|
|
124
125
|
onReady
|
|
125
|
-
}, null, 8, ["variant", "story"]))
|
|
126
|
+
}, null, 8, ["variant", "story", "dir"]))
|
|
126
127
|
])
|
|
127
128
|
], 34)
|
|
128
129
|
], 512);
|
|
@@ -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_02816158_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-02816158"]]);
|
|
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-02816158"), 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
|
+
"36260edc": unref(variant).iconColor
|
|
20
20
|
}));
|
|
21
21
|
const { variant } = toRefs(props);
|
|
22
22
|
const { isActive, targetRoute } = useCurrentVariantRoute(variant);
|
|
@@ -38,7 +38,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
38
38
|
return [
|
|
39
39
|
createVNode(unref(Icon), {
|
|
40
40
|
icon: (_a = unref(variant).icon) != null ? _a : "carbon:cube",
|
|
41
|
-
class: normalizeClass(["
|
|
41
|
+
class: normalizeClass(["htw-w-5 htw-h-5 sm:htw-w-4 sm:htw-h-4 htw-flex-none", {
|
|
42
42
|
"htw-text-gray-500": !active && !unref(variant).iconColor,
|
|
43
43
|
"bind-icon-color": !active && unref(variant).iconColor
|
|
44
44
|
}])
|
|
@@ -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_89489ae4_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-89489ae4"]]);
|
|
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,7 +6,7 @@ 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-89489ae4"), n = n(), popScopeId(), n);
|
|
10
10
|
const _hoisted_1 = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "htw-p-2 htw-h-full __histoire-pane-shadow-from-right"
|
|
@@ -33,7 +33,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
33
|
useCssVars((_ctx) => {
|
|
34
34
|
var _a;
|
|
35
35
|
return {
|
|
36
|
-
"
|
|
36
|
+
"513cd7c8": (_a = unref(variant)) == null ? void 0 : _a.iconColor
|
|
37
37
|
};
|
|
38
38
|
});
|
|
39
39
|
const storyStore = useStoryStore();
|
|
@@ -58,7 +58,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
58
58
|
unref(variant) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
59
59
|
createVNode(unref(Icon), {
|
|
60
60
|
icon: (_a = unref(variant).icon) != null ? _a : "carbon:cube",
|
|
61
|
-
class: normalizeClass(["
|
|
61
|
+
class: normalizeClass(["htw-w-5 htw-h-5 htw-flex-none", {
|
|
62
62
|
"htw-text-gray-500": !unref(variant).iconColor,
|
|
63
63
|
"bind-icon-color": unref(variant).iconColor
|
|
64
64
|
}])
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeStyle } from "@histoire/vendors/vue";
|
|
1
|
+
import { defineComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeStyle, normalizeClass, unref } from "@histoire/vendors/vue";
|
|
2
2
|
import "./GenericRenderStory.js";
|
|
3
|
+
import { isDark } from "../../util/dark.js";
|
|
4
|
+
import { histoireConfig } from "../../util/config.js";
|
|
5
|
+
import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
3
6
|
import StoryResponsivePreview from "./StoryResponsivePreview.js";
|
|
4
7
|
import _sfc_main$1 from "./GenericRenderStory.vue_vue_type_script_setup_true_lang.js";
|
|
5
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -18,6 +21,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18
21
|
previewReady: true
|
|
19
22
|
});
|
|
20
23
|
}
|
|
24
|
+
const settings = usePreviewSettingsStore().currentSettings;
|
|
21
25
|
return (_ctx, _cache) => {
|
|
22
26
|
return openBlock(), createBlock(StoryResponsivePreview, { variant: __props.variant }, {
|
|
23
27
|
default: withCtx(({ isResponsiveEnabled, finalWidth, finalHeight }) => [
|
|
@@ -33,9 +37,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
37
|
key: `${__props.story.id}-${__props.variant.id}`,
|
|
34
38
|
variant: __props.variant,
|
|
35
39
|
story: __props.story,
|
|
36
|
-
class: "htw-h-full",
|
|
40
|
+
class: normalizeClass(["htw-h-full", [unref(isDark) ? unref(histoireConfig).sandboxDarkClass : void 0]]),
|
|
41
|
+
dir: unref(settings).textDirection,
|
|
37
42
|
onReady
|
|
38
|
-
}, null, 8, ["variant", "story"]))
|
|
43
|
+
}, null, 8, ["variant", "story", "class", "dir"]))
|
|
39
44
|
], 4)
|
|
40
45
|
]),
|
|
41
46
|
_: 1
|
package/dist/bundled/components/story/StoryVariantSingleView.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createElementBlock, unref, createVNode, createBlock, createCommentVNode } from "@histoire/vendors/vue";
|
|
2
2
|
import { isMobile } from "../../util/responsive.js";
|
|
3
|
-
import "../toolbar/
|
|
4
|
-
import "../toolbar/
|
|
5
|
-
import
|
|
6
|
-
import "../toolbar/
|
|
3
|
+
import "../toolbar/ToolbarTitle.js";
|
|
4
|
+
import "../toolbar/ToolbarResponsiveSize.js";
|
|
5
|
+
import ToolbarBackground from "../toolbar/ToolbarBackground.js";
|
|
6
|
+
import "../toolbar/ToolbarTextDirection.js";
|
|
7
|
+
import "../toolbar/ToolbarNewTab.js";
|
|
7
8
|
import "./StoryVariantSinglePreviewNative.js";
|
|
8
9
|
import "./StoryVariantSinglePreviewRemote.js";
|
|
9
|
-
import _sfc_main$1 from "../toolbar/
|
|
10
|
-
import _sfc_main$2 from "../toolbar/
|
|
11
|
-
import _sfc_main$3 from "../toolbar/
|
|
12
|
-
import _sfc_main$4 from "
|
|
13
|
-
import _sfc_main$5 from "./
|
|
10
|
+
import _sfc_main$1 from "../toolbar/ToolbarTitle.vue_vue_type_script_setup_true_lang.js";
|
|
11
|
+
import _sfc_main$2 from "../toolbar/ToolbarResponsiveSize.vue_vue_type_script_setup_true_lang.js";
|
|
12
|
+
import _sfc_main$3 from "../toolbar/ToolbarTextDirection.vue_vue_type_script_setup_true_lang.js";
|
|
13
|
+
import _sfc_main$4 from "../toolbar/ToolbarNewTab.vue_vue_type_script_setup_true_lang.js";
|
|
14
|
+
import _sfc_main$5 from "./StoryVariantSinglePreviewNative.vue_vue_type_script_setup_true_lang.js";
|
|
15
|
+
import _sfc_main$6 from "./StoryVariantSinglePreviewRemote.vue_vue_type_script_setup_true_lang.js";
|
|
14
16
|
const _hoisted_1 = {
|
|
15
17
|
class: "htw-h-full htw-flex htw-flex-col",
|
|
16
18
|
"data-test-id": "story-variant-single-view"
|
|
@@ -32,17 +34,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
34
|
!unref(isMobile) ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
33
35
|
createVNode(_sfc_main$1, { variant: __props.variant }, null, 8, ["variant"]),
|
|
34
36
|
!__props.variant.responsiveDisabled ? (openBlock(), createBlock(_sfc_main$2, { key: 0 })) : createCommentVNode("", true),
|
|
35
|
-
createVNode(
|
|
36
|
-
createVNode(_sfc_main$3,
|
|
37
|
+
createVNode(ToolbarBackground),
|
|
38
|
+
createVNode(_sfc_main$3),
|
|
39
|
+
createVNode(_sfc_main$4, {
|
|
37
40
|
variant: __props.variant,
|
|
38
41
|
story: __props.story
|
|
39
42
|
}, null, 8, ["variant", "story"])
|
|
40
43
|
])) : createCommentVNode("", true),
|
|
41
|
-
((_a = __props.story.layout) == null ? void 0 : _a.iframe) === false ? (openBlock(), createBlock(_sfc_main$
|
|
44
|
+
((_a = __props.story.layout) == null ? void 0 : _a.iframe) === false ? (openBlock(), createBlock(_sfc_main$5, {
|
|
42
45
|
key: 1,
|
|
43
46
|
story: __props.story,
|
|
44
47
|
variant: __props.variant
|
|
45
|
-
}, null, 8, ["story", "variant"])) : (openBlock(), createBlock(_sfc_main$
|
|
48
|
+
}, null, 8, ["story", "variant"])) : (openBlock(), createBlock(_sfc_main$6, {
|
|
46
49
|
key: 2,
|
|
47
50
|
story: __props.story,
|
|
48
51
|
variant: __props.variant
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _sfc_main from "./ToolbarBackground.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
import "./ToolbarBackground.vue_vue_type_style_index_0_scoped_8d0cb17e_lang.js";
|
|
3
|
+
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const ToolbarBackground = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8d0cb17e"]]);
|
|
5
|
+
export {
|
|
6
|
+
ToolbarBackground as default
|
|
7
|
+
};
|
|
@@ -4,7 +4,7 @@ import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
|
4
4
|
import { histoireConfig } from "../../util/config.js";
|
|
5
5
|
import "../base/BaseCheckbox.js";
|
|
6
6
|
import _sfc_main$1 from "../base/BaseCheckbox.vue_vue_type_script_setup_true_lang.js";
|
|
7
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
7
|
+
const _withScopeId = (n) => (pushScopeId("data-v-8d0cb17e"), n = n(), popScopeId(), n);
|
|
8
8
|
const _hoisted_1 = { class: "htw-cursor-pointer hover:htw-text-primary-500 htw-flex htw-items-center htw-gap-1 htw-h-full htw-px-2 htw-group" };
|
|
9
9
|
const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "bind-preview-bg htw-w-4 htw-h-4 htw-rounded-full htw-border htw-border-black/50 dark:htw-border-white/50" }, null, -1));
|
|
10
10
|
const _hoisted_3 = { class: "htw-flex htw-flex-col htw-items-stretch" };
|
|
@@ -12,10 +12,10 @@ const _hoisted_4 = ["onClick"];
|
|
|
12
12
|
const _hoisted_5 = { class: "htw-mr-auto" };
|
|
13
13
|
const _hoisted_6 = { class: "htw-ml-auto htw-opacity-70" };
|
|
14
14
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
|
-
__name: "
|
|
15
|
+
__name: "ToolbarBackground",
|
|
16
16
|
setup(__props) {
|
|
17
17
|
useCssVars((_ctx) => ({
|
|
18
|
-
"
|
|
18
|
+
"25c5213c": unref(settings).backgroundColor
|
|
19
19
|
}));
|
|
20
20
|
const settings = usePreviewSettingsStore().currentSettings;
|
|
21
21
|
return (_ctx, _cache) => {
|
|
@@ -3,7 +3,7 @@ import { Icon } from "@histoire/vendors/iconify";
|
|
|
3
3
|
import { getSandboxUrl } from "../../util/sandbox.js";
|
|
4
4
|
const _hoisted_1 = ["href"];
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
-
__name: "
|
|
6
|
+
__name: "ToolbarNewTab",
|
|
7
7
|
props: {
|
|
8
8
|
variant: null,
|
|
9
9
|
story: null
|
|
@@ -22,7 +22,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
22
|
}, [
|
|
23
23
|
createVNode(unref(Icon), {
|
|
24
24
|
icon: "carbon:launch",
|
|
25
|
-
class: "
|
|
25
|
+
class: "htw-w-4 htw-h-4"
|
|
26
26
|
})
|
|
27
27
|
], 8, _hoisted_1)), [
|
|
28
28
|
[_directive_tooltip, "Open variant in new tab"]
|
|
@@ -15,7 +15,7 @@ const _hoisted_8 = { key: 1 };
|
|
|
15
15
|
const _hoisted_9 = { key: 2 };
|
|
16
16
|
const _hoisted_10 = { key: 0 };
|
|
17
17
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18
|
-
__name: "
|
|
18
|
+
__name: "ToolbarResponsiveSize",
|
|
19
19
|
setup(__props) {
|
|
20
20
|
const settings = usePreviewSettingsStore().currentSettings;
|
|
21
21
|
return (_ctx, _cache) => {
|
package/dist/bundled/components/toolbar/ToolbarTextDirection.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineComponent, resolveDirective, withDirectives, openBlock, createElementBlock, unref, createVNode } from "@histoire/vendors/vue";
|
|
2
|
+
import { Icon } from "@histoire/vendors/iconify";
|
|
3
|
+
import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "ToolbarTextDirection",
|
|
6
|
+
setup(__props) {
|
|
7
|
+
const settings = usePreviewSettingsStore().currentSettings;
|
|
8
|
+
return (_ctx, _cache) => {
|
|
9
|
+
const _directive_tooltip = resolveDirective("tooltip");
|
|
10
|
+
return withDirectives((openBlock(), createElementBlock("a", {
|
|
11
|
+
class: "htw-flex htw-items-center htw-gap-1 htw-h-full htw-px-2 hover:htw-text-primary-500 htw-opacity-50 hover:htw-opacity-100 dark:hover:htw-text-primary-400 htw-text-gray-900 dark:htw-text-gray-100",
|
|
12
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(settings).textDirection = unref(settings).textDirection === "ltr" ? "rtl" : "ltr")
|
|
13
|
+
}, [
|
|
14
|
+
createVNode(unref(Icon), {
|
|
15
|
+
icon: unref(settings).textDirection === "ltr" ? "fluent:text-paragraph-direction-right-16-regular" : "fluent:text-paragraph-direction-left-16-regular",
|
|
16
|
+
class: "htw-w-4 htw-h-4"
|
|
17
|
+
}, null, 8, ["icon"])
|
|
18
|
+
])), [
|
|
19
|
+
[_directive_tooltip, `Switch to text direction ${unref(settings).textDirection === "ltr" ? "Right to Left" : "Left to Right"}`]
|
|
20
|
+
]);
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
_sfc_main as default
|
|
26
|
+
};
|
|
@@ -2,7 +2,7 @@ import { defineComponent, openBlock, createElementBlock, createVNode, unref, nor
|
|
|
2
2
|
import { Icon } from "@histoire/vendors/iconify";
|
|
3
3
|
const _hoisted_1 = { class: "htw-flex htw-items-center htw-gap-1 htw-text-gray-500 htw-flex-1 htw-truncate htw-min-w-0" };
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
-
__name: "
|
|
5
|
+
__name: "ToolbarTitle",
|
|
6
6
|
props: {
|
|
7
7
|
variant: null
|
|
8
8
|
},
|
|
@@ -12,7 +12,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12
12
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
13
13
|
createVNode(unref(Icon), {
|
|
14
14
|
icon: (_a = __props.variant.icon) != null ? _a : "carbon:cube",
|
|
15
|
-
class: normalizeClass(["
|
|
15
|
+
class: normalizeClass(["htw-w-4 htw-h-4 htw-opacity-50", [
|
|
16
16
|
__props.variant.iconColor ? "bind-icon-color" : "htw-text-gray-500"
|
|
17
17
|
]])
|
|
18
18
|
}, null, 8, ["icon", "class"]),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./StoryListItem.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
-
import "./StoryListItem.
|
|
2
|
+
import "./StoryListItem.vue_vue_type_style_index_0_scoped_d1a05247_lang.js";
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const StoryListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const StoryListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d1a05247"]]);
|
|
5
5
|
export {
|
|
6
6
|
StoryListItem as default
|
|
7
7
|
};
|
|
@@ -3,7 +3,7 @@ import BaseListItemLink from "../base/BaseListItemLink.js";
|
|
|
3
3
|
import { Icon } from "@histoire/vendors/iconify";
|
|
4
4
|
import { useRoute } from "@histoire/vendors/vue-router";
|
|
5
5
|
import { useScrollOnActive } from "../../util/scroll.js";
|
|
6
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
6
|
+
const _withScopeId = (n) => (pushScopeId("data-v-d1a05247"), n = n(), popScopeId(), n);
|
|
7
7
|
const _hoisted_1 = { class: "bind-tree-margin htw-flex htw-items-center htw-gap-2 htw-pl-4 htw-min-w-0" };
|
|
8
8
|
const _hoisted_2 = { class: "htw-truncate" };
|
|
9
9
|
const _hoisted_3 = {
|
|
@@ -19,8 +19,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19
19
|
setup(__props) {
|
|
20
20
|
const props = __props;
|
|
21
21
|
useCssVars((_ctx) => ({
|
|
22
|
-
"
|
|
23
|
-
"
|
|
22
|
+
"7f500e3a": unref(filePadding),
|
|
23
|
+
"6930c8c2": __props.story.iconColor
|
|
24
24
|
}));
|
|
25
25
|
const filePadding = computed(() => {
|
|
26
26
|
return props.depth * 12 + "px";
|
|
@@ -50,7 +50,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
50
|
createElementVNode("span", _hoisted_1, [
|
|
51
51
|
createVNode(unref(Icon), {
|
|
52
52
|
icon: (_a = __props.story.icon) != null ? _a : "carbon:cube",
|
|
53
|
-
class: normalizeClass(["
|
|
53
|
+
class: normalizeClass(["htw-w-5 htw-h-5 sm:htw-w-4 sm:htw-h-4 htw-flex-none", {
|
|
54
54
|
"htw-text-primary-500": !active && !__props.story.iconColor,
|
|
55
55
|
"bind-icon-color": !active && __props.story.iconColor
|
|
56
56
|
}])
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { defineStore } from "@histoire/vendors/pinia";
|
|
2
2
|
import { useStorage } from "@histoire/vendors/vue-use";
|
|
3
3
|
const usePreviewSettingsStore = defineStore("preview-settings", () => {
|
|
4
|
-
const currentSettings = useStorage("_histoire-sandbox-settings-
|
|
4
|
+
const currentSettings = useStorage("_histoire-sandbox-settings-v3", {
|
|
5
5
|
responsiveWidth: 720,
|
|
6
6
|
responsiveHeight: null,
|
|
7
7
|
rotate: false,
|
|
8
8
|
backgroundColor: "transparent",
|
|
9
|
-
checkerboard: false
|
|
9
|
+
checkerboard: false,
|
|
10
|
+
textDirection: "ltr"
|
|
10
11
|
});
|
|
11
12
|
return {
|
|
12
13
|
currentSettings
|