@poveste/app 0.1.3 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/style/floating.pcss +4 -4
- package/dist/app/style/main.pcss +2 -2
- package/dist/app/style/sandbox.css +1 -1
- package/dist/bundle-main.js +2 -0
- package/dist/bundled/App.vue2.js +81 -37
- package/dist/bundled/app.css +51 -46
- package/dist/bundled/components/HomeView.vue2.js +3 -3
- package/dist/bundled/components/app/AppActions.vue.js +5 -0
- package/dist/bundled/components/app/AppActions.vue2.js +76 -0
- package/dist/bundled/components/app/AppHeader.vue2.js +5 -47
- package/dist/bundled/components/app/Breadcrumb.vue.js +1 -1
- package/dist/bundled/components/app/Breadcrumb.vue2.js +9 -9
- package/dist/bundled/components/app/HomeCounter.vue2.js +5 -5
- package/dist/bundled/components/app/InitialLoading.vue2.js +5 -5
- package/dist/bundled/components/app/MobileOverlay.vue2.js +5 -5
- package/dist/bundled/components/app/TopBar.vue.js +5 -0
- package/dist/bundled/components/app/TopBar.vue2.js +73 -0
- package/dist/bundled/components/app/TopBarChip.vue.js +13 -0
- package/dist/bundled/components/app/TopBarChipItem.vue.js +13 -0
- package/dist/bundled/components/base/BaseButton.vue2.js +3 -3
- package/dist/bundled/components/base/BaseCheckbox.vue2.js +8 -8
- package/dist/bundled/components/base/BaseEmpty.vue.js +2 -2
- package/dist/bundled/components/base/BaseKeyboardShortcut.vue2.js +1 -1
- package/dist/bundled/components/base/BaseListItem.vue2.js +2 -2
- package/dist/bundled/components/base/BaseListItemLink.vue.js +2 -2
- package/dist/bundled/components/base/BaseOverflowMenu.vue2.js +4 -4
- package/dist/bundled/components/base/BaseOverflowTab.vue.js +3 -3
- package/dist/bundled/components/base/BaseSelect.vue2.js +6 -6
- package/dist/bundled/components/base/BaseSplitPane.vue.js +1 -1
- package/dist/bundled/components/base/BaseSplitPane.vue2.js +20 -16
- package/dist/bundled/components/base/BaseTab.vue.js +3 -3
- package/dist/bundled/components/base/BaseTag.vue.js +1 -1
- package/dist/bundled/components/command/CommandPrompts.vue2.js +5 -5
- package/dist/bundled/components/command/CommandPromptsModal.vue2.js +3 -3
- package/dist/bundled/components/command/PromptSelect.vue2.js +12 -12
- package/dist/bundled/components/command/PromptText.vue2.js +4 -4
- package/dist/bundled/components/layout/LayoutItem.vue.js +5 -0
- package/dist/bundled/components/layout/LayoutItem.vue2.js +44 -0
- package/dist/bundled/components/layout/LayoutItemGroup.vue.js +5 -0
- package/dist/bundled/components/layout/LayoutItemGroup.vue2.js +25 -0
- package/dist/bundled/components/layout/LayoutModal.vue.js +5 -0
- package/dist/bundled/components/layout/LayoutModal.vue2.js +68 -0
- package/dist/bundled/components/layout/LayoutPane.vue.js +5 -0
- package/dist/bundled/components/layout/LayoutPane.vue2.js +59 -0
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue2.js +2 -2
- package/dist/bundled/components/panel/ControlsComponentProps.vue2.js +4 -4
- package/dist/bundled/components/panel/ControlsComponentState.vue2.js +2 -2
- package/dist/bundled/components/panel/PaneTabs.vue2.js +4 -4
- package/dist/bundled/components/panel/StatePresets.vue2.js +13 -13
- package/dist/bundled/components/panel/StoryControls.vue2.js +6 -6
- package/dist/bundled/components/panel/StoryDocs.vue2.js +4 -4
- package/dist/bundled/components/panel/StoryEvent.vue2.js +7 -7
- package/dist/bundled/components/panel/StoryEvents.vue2.js +1 -1
- package/dist/bundled/components/panel/StorySidePanel.vue2.js +58 -47
- package/dist/bundled/components/panel/StorySourceCode.vue.js +1 -1
- package/dist/bundled/components/panel/StorySourceCode.vue2.js +19 -19
- package/dist/bundled/components/search/SearchItem.vue.js +1 -1
- package/dist/bundled/components/search/SearchItem.vue2.js +3 -3
- package/dist/bundled/components/search/SearchItemContent.vue2.js +9 -9
- package/dist/bundled/components/search/SearchLoading.vue2.js +2 -2
- package/dist/bundled/components/search/SearchModal.vue2.js +3 -3
- package/dist/bundled/components/search/SearchPane.vue2.js +4 -4
- package/dist/bundled/components/story/StoryResponsivePreview.vue.js +1 -1
- package/dist/bundled/components/story/StoryResponsivePreview.vue2.js +21 -21
- package/dist/bundled/components/story/StoryVariantGrid.vue2.js +7 -26
- package/dist/bundled/components/story/StoryVariantGridItem.vue.js +1 -1
- package/dist/bundled/components/story/StoryVariantGridItem.vue2.js +36 -21
- package/dist/bundled/components/story/StoryVariantListItem.vue.js +1 -1
- package/dist/bundled/components/story/StoryVariantListItem.vue2.js +5 -5
- package/dist/bundled/components/story/StoryVariantSingle.vue.js +1 -1
- package/dist/bundled/components/story/StoryVariantSingle.vue2.js +10 -10
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue2.js +6 -5
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue2.js +33 -8
- package/dist/bundled/components/story/StoryVariantSingleView.vue2.js +8 -39
- package/dist/bundled/components/story/StoryView.vue2.js +21 -11
- package/dist/bundled/components/story/StoryViewer.vue.js +1 -1
- package/dist/bundled/components/story/StoryViewer.vue2.js +2 -2
- package/dist/bundled/components/toolbar/DevOnlyToolbarOpenInEditor.vue2.js +13 -9
- package/dist/bundled/components/toolbar/ToolbarBackground.vue.js +1 -1
- package/dist/bundled/components/toolbar/ToolbarBackground.vue2.js +62 -33
- package/dist/bundled/components/toolbar/ToolbarNewTab.vue2.js +13 -10
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue2.js +14 -14
- package/dist/bundled/components/toolbar/ToolbarTextDirection.vue2.js +13 -9
- package/dist/bundled/components/toolbar/ToolbarTitle.vue.js +4 -1
- package/dist/bundled/components/toolbar/ToolbarTitle.vue2.js +30 -7
- package/dist/bundled/components/tree/StoryGroup.vue2.js +5 -5
- 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 +7 -7
- package/dist/bundled/components/tree/StoryListItem.vue.js +1 -1
- package/dist/bundled/components/tree/StoryListItem.vue2.js +8 -8
- package/dist/bundled/index.js +3 -0
- package/dist/bundled/sandbox.js +41 -15
- package/dist/bundled/stores/layout.js +16 -0
- package/dist/bundled/stores/preview-settings.js +19 -4
- package/dist/bundled/util/color-scheme.js +27 -0
- package/dist/bundled/util/const.js +2 -0
- package/dist/bundled/util/dark.js +3 -3
- package/dist/bundled/util/keyboard.js +60 -32
- package/dist/bundled/util/preview-settings.js +11 -0
- package/dist/bundled/util/tooltip.js +2 -2
- package/dist/style.css +644 -529
- package/package.json +8 -8
- package/src/app/App.vue +109 -66
- package/src/app/components/HomeView.vue +3 -3
- package/src/app/components/app/AppActions.vue +58 -0
- package/src/app/components/app/AppHeader.vue +4 -47
- package/src/app/components/app/Breadcrumb.vue +8 -8
- package/src/app/components/app/HomeCounter.vue +5 -5
- package/src/app/components/app/InitialLoading.vue +5 -5
- package/src/app/components/app/MobileOverlay.vue +5 -5
- package/src/app/components/app/TopBar.vue +60 -0
- package/src/app/components/app/TopBarChip.vue +5 -0
- package/src/app/components/app/TopBarChipItem.vue +7 -0
- package/src/app/components/base/BaseButton.vue +3 -3
- package/src/app/components/base/BaseCheckbox.vue +9 -9
- package/src/app/components/base/BaseCopyIcon.vue +1 -1
- package/src/app/components/base/BaseEmpty.vue +4 -4
- package/src/app/components/base/BaseKeyboardShortcut.vue +1 -1
- package/src/app/components/base/BaseListItem.vue +3 -3
- package/src/app/components/base/BaseListItemLink.vue +3 -3
- package/src/app/components/base/BaseOverflowMenu.vue +4 -4
- package/src/app/components/base/BaseOverflowTab.vue +3 -3
- package/src/app/components/base/BaseSelect.vue +6 -6
- package/src/app/components/base/BaseSplitPane.vue +21 -16
- package/src/app/components/base/BaseTab.vue +3 -3
- package/src/app/components/base/BaseTag.vue +1 -1
- package/src/app/components/command/CommandPrompts.vue +5 -5
- package/src/app/components/command/CommandPromptsModal.vue +3 -3
- package/src/app/components/command/PromptSelect.vue +14 -14
- package/src/app/components/command/PromptText.vue +4 -4
- package/src/app/components/layout/LayoutItem.vue +36 -0
- package/src/app/components/layout/LayoutItemGroup.vue +18 -0
- package/src/app/components/layout/LayoutModal.vue +60 -0
- package/src/app/components/layout/LayoutPane.vue +45 -0
- package/src/app/components/panel/ControlsComponentPropItem.vue +2 -2
- package/src/app/components/panel/ControlsComponentProps.vue +3 -3
- package/src/app/components/panel/ControlsComponentState.vue +2 -2
- package/src/app/components/panel/PaneTabs.vue +4 -4
- package/src/app/components/panel/StatePresets.vue +13 -13
- package/src/app/components/panel/StoryControls.vue +6 -6
- package/src/app/components/panel/StoryDocs.vue +4 -4
- package/src/app/components/panel/StoryEvent.vue +7 -7
- package/src/app/components/panel/StoryEvents.vue +1 -1
- package/src/app/components/panel/StorySidePanel.vue +51 -41
- package/src/app/components/panel/StorySourceCode.vue +19 -19
- package/src/app/components/search/SearchItem.vue +2 -2
- package/src/app/components/search/SearchItemContent.vue +9 -9
- package/src/app/components/search/SearchLoading.vue +2 -2
- package/src/app/components/search/SearchModal.vue +3 -3
- package/src/app/components/search/SearchPane.vue +4 -4
- package/src/app/components/story/StoryResponsivePreview.vue +27 -27
- package/src/app/components/story/StoryVariantGrid.vue +5 -24
- package/src/app/components/story/StoryVariantGridItem.vue +36 -17
- package/src/app/components/story/StoryVariantListItem.vue +4 -4
- package/src/app/components/story/StoryVariantSingle.vue +9 -9
- package/src/app/components/story/StoryVariantSinglePreviewNative.vue +7 -5
- package/src/app/components/story/StoryVariantSinglePreviewRemote.vue +37 -7
- package/src/app/components/story/StoryVariantSingleView.vue +1 -34
- package/src/app/components/story/StoryView.vue +23 -8
- package/src/app/components/story/StoryViewer.vue +1 -1
- package/src/app/components/toolbar/DevOnlyToolbarOpenInEditor.vue +5 -4
- package/src/app/components/toolbar/ToolbarBackground.vue +62 -25
- package/src/app/components/toolbar/ToolbarNewTab.vue +5 -4
- package/src/app/components/toolbar/ToolbarResponsiveSize.vue +15 -15
- package/src/app/components/toolbar/ToolbarTextDirection.vue +5 -4
- package/src/app/components/toolbar/ToolbarTitle.vue +32 -8
- package/src/app/components/tree/StoryGroup.vue +5 -5
- package/src/app/components/tree/StoryList.vue +1 -1
- package/src/app/components/tree/StoryListFolder.vue +6 -6
- package/src/app/components/tree/StoryListItem.vue +6 -6
- package/src/app/index.ts +3 -0
- package/src/app/sandbox.ts +59 -15
- package/src/app/stores/layout.ts +22 -0
- package/src/app/stores/preview-settings.ts +26 -2
- package/src/app/style/floating.pcss +4 -4
- package/src/app/style/main.pcss +2 -2
- package/src/app/style/sandbox.css +1 -1
- package/src/app/types.ts +49 -0
- package/src/app/util/color-scheme.ts +36 -0
- package/src/app/util/const.ts +1 -0
- package/src/app/util/dark.ts +3 -3
- package/src/app/util/keyboard.ts +65 -32
- package/src/app/util/preview-settings.ts +16 -0
- package/src/app/util/tooltip.ts +2 -2
- package/src/bundle-main.js +2 -0
- package/src/shim.d.ts +2 -2
|
@@ -2,7 +2,7 @@ import _sfc_main from "./StoryVariantGridItem.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
"use strict";
|
|
5
|
-
const StoryVariantGridItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const StoryVariantGridItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-42097cb5"]]);
|
|
6
6
|
export {
|
|
7
7
|
StoryVariantGridItem as default
|
|
8
8
|
};
|
|
@@ -4,8 +4,8 @@ import { HstCopyIcon } from "@poveste/controls";
|
|
|
4
4
|
import { useResizeObserver } from "@poveste/vendors/vue-use";
|
|
5
5
|
import { useRouter } from "@poveste/vendors/vue-router";
|
|
6
6
|
import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
7
|
+
import { usePreviewDark } from "../../util/color-scheme.js";
|
|
7
8
|
import { povesteConfig } from "../../util/config.js";
|
|
8
|
-
import { isDark } from "../../util/dark.js";
|
|
9
9
|
import { getSourceCode } from "../../util/docs.js";
|
|
10
10
|
import { getContrastColor } from "../../util/preview-settings.js";
|
|
11
11
|
import { useScrollOnActive } from "../../util/scroll.js";
|
|
@@ -13,12 +13,14 @@ import { useCurrentVariantRoute } from "../../util/variant.js";
|
|
|
13
13
|
import CheckerboardPattern from "../misc/CheckerboardPattern.vue.js";
|
|
14
14
|
import "../toolbar/ToolbarNewTab.vue.js";
|
|
15
15
|
import "./GenericRenderStory.vue.js";
|
|
16
|
+
import "./StoryVariantSinglePreviewRemote.vue.js";
|
|
16
17
|
import _sfc_main$1 from "../toolbar/ToolbarNewTab.vue2.js";
|
|
17
|
-
import _sfc_main$2 from "./
|
|
18
|
+
import _sfc_main$2 from "./StoryVariantSinglePreviewRemote.vue2.js";
|
|
19
|
+
import _sfc_main$3 from "./GenericRenderStory.vue2.js";
|
|
18
20
|
"use strict";
|
|
19
|
-
const _hoisted_1 = { class: "
|
|
20
|
-
const _hoisted_2 = { class: "
|
|
21
|
-
const _hoisted_3 = { class: "
|
|
21
|
+
const _hoisted_1 = { class: "ptw-flex-none ptw-flex ptw-items-center" };
|
|
22
|
+
const _hoisted_2 = { class: "ptw-truncate ptw-flex-1" };
|
|
23
|
+
const _hoisted_3 = { class: "ptw-flex-none ptw-ml-auto ptw-hidden group-hover:ptw-flex ptw-items-center" };
|
|
22
24
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
23
25
|
__name: "StoryVariantGridItem",
|
|
24
26
|
props: {
|
|
@@ -36,8 +38,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
36
38
|
},
|
|
37
39
|
setup(__props, { emit: __emit }) {
|
|
38
40
|
useCssVars((_ctx) => ({
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
+
"v087cd7b6": unref(variant).iconColor,
|
|
42
|
+
"v6d9d16a6": unref(settings).backgroundColor
|
|
41
43
|
}));
|
|
42
44
|
const props = __props;
|
|
43
45
|
const emit = __emit;
|
|
@@ -66,29 +68,37 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
66
68
|
}
|
|
67
69
|
});
|
|
68
70
|
const settings = usePreviewSettingsStore().currentSettings;
|
|
71
|
+
const previewDark = usePreviewDark(settings);
|
|
69
72
|
const contrastColor = computed(() => getContrastColor(settings));
|
|
70
73
|
const autoApplyContrastColor = computed(() => !!povesteConfig.autoApplyContrastColor);
|
|
74
|
+
const useIframe = computed(() => {
|
|
75
|
+
const layout = props.story.layout;
|
|
76
|
+
if (layout?.type === "grid" && layout.iframeGrid !== void 0) {
|
|
77
|
+
return layout.iframeGrid;
|
|
78
|
+
}
|
|
79
|
+
return povesteConfig.isolateStyles !== false;
|
|
80
|
+
});
|
|
71
81
|
return (_ctx, _cache) => {
|
|
72
82
|
const _component_RouterLink = resolveComponent("RouterLink");
|
|
73
83
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
74
84
|
return openBlock(), createElementBlock("div", {
|
|
75
85
|
ref_key: "el",
|
|
76
86
|
ref: el,
|
|
77
|
-
class: "poveste-story-variant-grid-item
|
|
87
|
+
class: "poveste-story-variant-grid-item ptw-cursor-default ptw-flex ptw-flex-col ptw-gap-y-1 ptw-group"
|
|
78
88
|
}, [
|
|
79
89
|
createElementVNode("div", _hoisted_1, [
|
|
80
90
|
withDirectives((openBlock(), createBlock(_component_RouterLink, {
|
|
81
91
|
to: unref(targetRoute),
|
|
82
|
-
class: normalizeClass(["
|
|
83
|
-
"hover:
|
|
84
|
-
"
|
|
92
|
+
class: normalizeClass(["ptw-rounded ptw-w-max ptw-px-2 ptw-py-0.5 ptw-min-w-16 ptw-cursor-pointer ptw-flex ptw-items-center ptw-gap-1 ptw-flex-shrink", {
|
|
93
|
+
"hover:ptw-bg-gray-200 ptw-text-gray-500 dark:hover:ptw-bg-gray-800": !unref(isActive),
|
|
94
|
+
"ptw-bg-primary-200 hover:ptw-bg-primary-300 ptw-text-primary-800 dark:ptw-bg-primary-700 dark:hover:ptw-bg-primary-800 dark:ptw-text-primary-200": unref(isActive)
|
|
85
95
|
}])
|
|
86
96
|
}, {
|
|
87
97
|
default: withCtx(() => [
|
|
88
98
|
createVNode(unref(Icon), {
|
|
89
99
|
icon: unref(variant).icon ?? "carbon:cube",
|
|
90
|
-
class: normalizeClass(["
|
|
91
|
-
"
|
|
100
|
+
class: normalizeClass(["ptw-w-4 ptw-h-4 ptw-opacity-50", {
|
|
101
|
+
"ptw-text-gray-500": !unref(isActive) && !unref(variant).iconColor,
|
|
92
102
|
"bind-icon-color": !unref(isActive) && unref(variant).iconColor
|
|
93
103
|
}])
|
|
94
104
|
}, null, 8, ["icon", "class"]),
|
|
@@ -109,24 +119,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
109
119
|
])
|
|
110
120
|
]),
|
|
111
121
|
createElementVNode("div", {
|
|
112
|
-
class: normalizeClass(["
|
|
113
|
-
"
|
|
114
|
-
"
|
|
122
|
+
class: normalizeClass(["ptw-border ptw-bg-white dark:ptw-bg-gray-700 ptw-rounded ptw-flex-1 ptw-p-4 ptw-relative", {
|
|
123
|
+
"ptw-border-gray-100 dark:ptw-border-gray-800": !unref(isActive),
|
|
124
|
+
"ptw-border-primary-200 dark:ptw-border-primary-900": unref(isActive)
|
|
115
125
|
}]),
|
|
116
126
|
"data-test-id": "sandbox-render",
|
|
117
127
|
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => selectVariant(), ["stop"])),
|
|
118
128
|
onKeyup: _cache[1] || (_cache[1] = ($event) => selectVariant())
|
|
119
129
|
}, [
|
|
120
130
|
_cache[2] || (_cache[2] = createElementVNode("div", {
|
|
121
|
-
class: "
|
|
131
|
+
class: "ptw-absolute ptw-inset-0 ptw-rounded bind-preview-bg",
|
|
122
132
|
"data-test-id": "responsive-preview-bg"
|
|
123
133
|
}, null, -1)),
|
|
124
134
|
unref(settings).checkerboard ? (openBlock(), createBlock(CheckerboardPattern, {
|
|
125
135
|
key: 0,
|
|
126
|
-
class: "
|
|
136
|
+
class: "ptw-absolute ptw-inset-0 ptw-w-full ptw-h-full ptw-text-gray-500/20"
|
|
127
137
|
})) : createCommentVNode("", true),
|
|
128
138
|
createElementVNode("div", {
|
|
129
|
-
class: "
|
|
139
|
+
class: "ptw-relative ptw-h-full",
|
|
130
140
|
style: normalizeStyle({
|
|
131
141
|
"--poveste-contrast-color": contrastColor.value,
|
|
132
142
|
// Deprecated alias — keep so stories referencing `var(--histoire-contrast-color)` still work.
|
|
@@ -134,13 +144,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
134
144
|
"color": autoApplyContrastColor.value ? contrastColor.value : void 0
|
|
135
145
|
})
|
|
136
146
|
}, [
|
|
137
|
-
(openBlock(), createBlock(_sfc_main$2, {
|
|
147
|
+
useIframe.value ? (openBlock(), createBlock(_sfc_main$2, {
|
|
148
|
+
key: `iframe-${__props.story.id}-${unref(variant).id}`,
|
|
149
|
+
story: __props.story,
|
|
150
|
+
variant: unref(variant),
|
|
151
|
+
"auto-height": ""
|
|
152
|
+
}, null, 8, ["story", "variant"])) : (openBlock(), createBlock(_sfc_main$3, {
|
|
138
153
|
key: `${__props.story.id}-${unref(variant).id}`,
|
|
139
154
|
variant: unref(variant),
|
|
140
155
|
story: __props.story,
|
|
141
156
|
dir: unref(settings).textDirection,
|
|
142
157
|
class: normalizeClass({
|
|
143
|
-
[unref(povesteConfig).theme.darkClass]: unref(
|
|
158
|
+
[unref(povesteConfig).theme.darkClass]: unref(previewDark)
|
|
144
159
|
}),
|
|
145
160
|
onReady
|
|
146
161
|
}, null, 8, ["variant", "story", "dir", "class"]))
|
|
@@ -2,7 +2,7 @@ import _sfc_main from "./StoryVariantListItem.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
"use strict";
|
|
5
|
-
const StoryVariantListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const StoryVariantListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-363b3d4f"]]);
|
|
6
6
|
export {
|
|
7
7
|
StoryVariantListItem as default
|
|
8
8
|
};
|
|
@@ -4,7 +4,7 @@ import { useScrollOnActive } from "../../util/scroll.js";
|
|
|
4
4
|
import { useCurrentVariantRoute } from "../../util/variant.js";
|
|
5
5
|
import BaseListItemLink from "../base/BaseListItemLink.vue.js";
|
|
6
6
|
"use strict";
|
|
7
|
-
const _hoisted_1 = { class: "
|
|
7
|
+
const _hoisted_1 = { class: "ptw-truncate" };
|
|
8
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
9
|
__name: "StoryVariantListItem",
|
|
10
10
|
props: {
|
|
@@ -15,7 +15,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15
15
|
},
|
|
16
16
|
setup(__props) {
|
|
17
17
|
useCssVars((_ctx) => ({
|
|
18
|
-
"
|
|
18
|
+
"v3223e976": unref(variant).iconColor
|
|
19
19
|
}));
|
|
20
20
|
const props = __props;
|
|
21
21
|
const { variant } = toRefs(props);
|
|
@@ -32,13 +32,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
32
|
createVNode(BaseListItemLink, {
|
|
33
33
|
to: unref(targetRoute),
|
|
34
34
|
"is-active": unref(isActive),
|
|
35
|
-
class: "
|
|
35
|
+
class: "ptw-px-2 ptw-py-2 md:ptw-py-1.5 ptw-m-1 ptw-rounded-sm ptw-flex ptw-items-center ptw-gap-2"
|
|
36
36
|
}, {
|
|
37
37
|
default: withCtx(({ active }) => [
|
|
38
38
|
createVNode(unref(Icon), {
|
|
39
39
|
icon: unref(variant).icon ?? "carbon:cube",
|
|
40
|
-
class: normalizeClass(["
|
|
41
|
-
"
|
|
40
|
+
class: normalizeClass(["ptw-w-5 ptw-h-5 sm:ptw-w-4 sm:ptw-h-4 ptw-flex-none", {
|
|
41
|
+
"ptw-text-gray-500": !active && !unref(variant).iconColor,
|
|
42
42
|
"bind-icon-color": !active && unref(variant).iconColor
|
|
43
43
|
}])
|
|
44
44
|
}, null, 8, ["icon", "class"]),
|
|
@@ -2,7 +2,7 @@ import _sfc_main from "./StoryVariantSingle.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
"use strict";
|
|
5
|
-
const StoryVariantSingle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const StoryVariantSingle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ca14569e"]]);
|
|
6
6
|
export {
|
|
7
7
|
StoryVariantSingle as default
|
|
8
8
|
};
|
|
@@ -9,20 +9,20 @@ import _sfc_main$1 from "./StoryVariantSingleView.vue2.js";
|
|
|
9
9
|
"use strict";
|
|
10
10
|
const _hoisted_1 = {
|
|
11
11
|
key: 0,
|
|
12
|
-
class: "poveste-story-variant-single
|
|
12
|
+
class: "poveste-story-variant-single ptw-p-2 ptw-h-full __poveste-pane-shadow-from-right"
|
|
13
13
|
};
|
|
14
14
|
const _hoisted_2 = {
|
|
15
15
|
key: 0,
|
|
16
|
-
class: "
|
|
16
|
+
class: "ptw-divide-y ptw-divide-gray-100 dark:ptw-divide-gray-800 ptw-h-full ptw-flex ptw-flex-col"
|
|
17
17
|
};
|
|
18
18
|
const _hoisted_3 = {
|
|
19
19
|
key: 0,
|
|
20
|
-
class: "
|
|
20
|
+
class: "ptw-p-2 ptw-h-full"
|
|
21
21
|
};
|
|
22
|
-
const _hoisted_4 = { class: "
|
|
22
|
+
const _hoisted_4 = { class: "ptw-h-full ptw-overflow-y-auto" };
|
|
23
23
|
const _hoisted_5 = {
|
|
24
24
|
key: 0,
|
|
25
|
-
class: "
|
|
25
|
+
class: "ptw-p-2 ptw-h-full __poveste-pane-shadow-from-right"
|
|
26
26
|
};
|
|
27
27
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
28
28
|
__name: "StoryVariantSingle",
|
|
@@ -31,7 +31,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31
31
|
},
|
|
32
32
|
setup(__props) {
|
|
33
33
|
useCssVars((_ctx) => ({
|
|
34
|
-
"
|
|
34
|
+
"fcfb0a0c": variant.value?.iconColor
|
|
35
35
|
}));
|
|
36
36
|
const storyStore = useStoryStore();
|
|
37
37
|
const hasSingleVariant = computed(() => storyStore.currentStory?.variants.length === 1);
|
|
@@ -45,14 +45,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
45
|
])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
46
46
|
unref(isMobile) ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
47
47
|
createElementVNode("a", {
|
|
48
|
-
class: "
|
|
48
|
+
class: "ptw-px-6 ptw-h-12 hover:ptw-text-primary-500 dark:hover:ptw-text-primary-400 ptw-cursor-pointer ptw-flex ptw-gap-2 ptw-flex-wrap ptw-w-full ptw-items-center ptw-flex-none",
|
|
49
49
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("openVariantMenu"))
|
|
50
50
|
}, [
|
|
51
51
|
variant.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
52
52
|
createVNode(unref(Icon), {
|
|
53
53
|
icon: variant.value.icon ?? "carbon:cube",
|
|
54
|
-
class: normalizeClass(["
|
|
55
|
-
"
|
|
54
|
+
class: normalizeClass(["ptw-w-5 ptw-h-5 ptw-flex-none", {
|
|
55
|
+
"ptw-text-gray-500": !variant.value.iconColor,
|
|
56
56
|
"bind-icon-color": variant.value.iconColor
|
|
57
57
|
}])
|
|
58
58
|
}, null, 8, ["icon", "class"]),
|
|
@@ -62,7 +62,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
62
|
], 64)),
|
|
63
63
|
createVNode(unref(Icon), {
|
|
64
64
|
icon: "carbon:chevron-sort",
|
|
65
|
-
class: "
|
|
65
|
+
class: "ptw-w-5 ptw-h-5 ptw-shrink-0 ptw-ml-auto"
|
|
66
66
|
})
|
|
67
67
|
]),
|
|
68
68
|
unref(storyStore).currentVariant ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, createBlock, openBlock, withCtx, createElementVNode, normalizeStyle, unref, normalizeClass } from "@poveste/vendors/vue";
|
|
2
2
|
import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
3
|
+
import { usePreviewDark } from "../../util/color-scheme.js";
|
|
3
4
|
import { povesteConfig } from "../../util/config.js";
|
|
4
|
-
import { isDark } from "../../util/dark.js";
|
|
5
5
|
import { getContrastColor } from "../../util/preview-settings.js";
|
|
6
6
|
import "./GenericRenderStory.vue.js";
|
|
7
7
|
import StoryResponsivePreview from "./StoryResponsivePreview.vue.js";
|
|
@@ -24,6 +24,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
const settings = usePreviewSettingsStore().currentSettings;
|
|
27
|
+
const previewDark = usePreviewDark(settings);
|
|
27
28
|
const contrastColor = computed(() => getContrastColor(settings));
|
|
28
29
|
const autoApplyContrastColor = computed(() => !!povesteConfig.autoApplyContrastColor);
|
|
29
30
|
return (_ctx, _cache) => {
|
|
@@ -45,17 +46,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
46
|
"color": autoApplyContrastColor.value ? contrastColor.value : void 0
|
|
46
47
|
}
|
|
47
48
|
]),
|
|
48
|
-
class: "
|
|
49
|
+
class: "ptw-relative",
|
|
49
50
|
"data-test-id": "sandbox-render"
|
|
50
51
|
}, [
|
|
51
52
|
(openBlock(), createBlock(_sfc_main$1, {
|
|
52
53
|
key: `${__props.story.id}-${__props.variant.id}`,
|
|
53
54
|
variant: __props.variant,
|
|
54
55
|
story: __props.story,
|
|
55
|
-
class: normalizeClass(["
|
|
56
|
-
[unref(povesteConfig).sandboxDarkClass]: unref(
|
|
56
|
+
class: normalizeClass(["ptw-h-full", {
|
|
57
|
+
[unref(povesteConfig).sandboxDarkClass]: unref(previewDark),
|
|
57
58
|
// @TODO remove
|
|
58
|
-
[unref(povesteConfig).theme.darkClass]: unref(
|
|
59
|
+
[unref(povesteConfig).theme.darkClass]: unref(previewDark)
|
|
59
60
|
}]),
|
|
60
61
|
dir: unref(settings).textDirection,
|
|
61
62
|
onReady
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, computed, createBlock, openBlock, withCtx, createElementVNode, normalizeStyle, normalizeClass, toRaw } from "@poveste/vendors/vue";
|
|
1
|
+
import { defineComponent, ref, watch, computed, onBeforeUnmount, createBlock, openBlock, withCtx, createElementVNode, normalizeStyle, normalizeClass, toRaw } from "@poveste/vendors/vue";
|
|
2
2
|
import { applyState } from "@poveste/shared";
|
|
3
3
|
import { useEventListener } from "@poveste/vendors/vue-use";
|
|
4
4
|
import { useEventsStore } from "../../stores/events.js";
|
|
5
5
|
import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
6
|
-
import { SANDBOX_READY, EVENT_SEND, STATE_SYNC, PREVIEW_SETTINGS_SYNC } from "../../util/const.js";
|
|
6
|
+
import { SANDBOX_HEIGHT, SANDBOX_READY, EVENT_SEND, STATE_SYNC, PREVIEW_SETTINGS_SYNC } from "../../util/const.js";
|
|
7
|
+
import { trackWindow } from "../../util/keyboard.js";
|
|
7
8
|
import { getSandboxUrl } from "../../util/sandbox.js";
|
|
8
9
|
import { toRawDeep } from "../../util/state.js";
|
|
9
10
|
import StoryResponsivePreview from "./StoryResponsivePreview.vue.js";
|
|
@@ -13,7 +14,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13
14
|
__name: "StoryVariantSinglePreviewRemote",
|
|
14
15
|
props: {
|
|
15
16
|
story: {},
|
|
16
|
-
variant: {}
|
|
17
|
+
variant: {},
|
|
18
|
+
autoHeight: { type: Boolean }
|
|
17
19
|
},
|
|
18
20
|
setup(__props) {
|
|
19
21
|
const props = __props;
|
|
@@ -41,8 +43,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
43
|
Object.assign(props.variant, {
|
|
42
44
|
previewReady: false
|
|
43
45
|
});
|
|
46
|
+
const reportedHeight = ref(null);
|
|
44
47
|
useEventListener(window, "message", (event) => {
|
|
45
|
-
|
|
48
|
+
if (event.source !== iframe.value?.contentWindow) return;
|
|
49
|
+
switch (event.data?.type) {
|
|
46
50
|
case STATE_SYNC:
|
|
47
51
|
updateVariantState(event.data.state);
|
|
48
52
|
break;
|
|
@@ -52,6 +56,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
52
56
|
case SANDBOX_READY:
|
|
53
57
|
setPreviewReady();
|
|
54
58
|
break;
|
|
59
|
+
case SANDBOX_HEIGHT:
|
|
60
|
+
if (typeof event.data.h === "number") {
|
|
61
|
+
const next = Math.max(40, event.data.h);
|
|
62
|
+
if (next !== reportedHeight.value) reportedHeight.value = next;
|
|
63
|
+
}
|
|
64
|
+
break;
|
|
55
65
|
}
|
|
56
66
|
});
|
|
57
67
|
function updateVariantState(state) {
|
|
@@ -71,11 +81,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
71
81
|
return getSandboxUrl(props.story, props.variant);
|
|
72
82
|
});
|
|
73
83
|
const isIframeLoaded = ref(false);
|
|
84
|
+
let stopTrackKeyboard;
|
|
85
|
+
let unmounted = false;
|
|
74
86
|
watch(sandboxUrl, () => {
|
|
75
87
|
isIframeLoaded.value = false;
|
|
76
88
|
Object.assign(props.variant, {
|
|
77
89
|
previewReady: false
|
|
78
90
|
});
|
|
91
|
+
stopTrackKeyboard?.();
|
|
92
|
+
stopTrackKeyboard = void 0;
|
|
93
|
+
});
|
|
94
|
+
onBeforeUnmount(() => {
|
|
95
|
+
unmounted = true;
|
|
96
|
+
stopTrackKeyboard?.();
|
|
79
97
|
});
|
|
80
98
|
function syncSettings() {
|
|
81
99
|
if (iframe.value) {
|
|
@@ -92,9 +110,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
92
110
|
immediate: true
|
|
93
111
|
});
|
|
94
112
|
function onIframeLoad() {
|
|
113
|
+
if (unmounted) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
95
116
|
isIframeLoaded.value = true;
|
|
96
117
|
syncState();
|
|
97
118
|
syncSettings();
|
|
119
|
+
stopTrackKeyboard?.();
|
|
120
|
+
if (iframe.value?.contentWindow) {
|
|
121
|
+
stopTrackKeyboard = trackWindow(iframe.value.contentWindow);
|
|
122
|
+
}
|
|
98
123
|
}
|
|
99
124
|
return (_ctx, _cache) => {
|
|
100
125
|
return openBlock(), createBlock(StoryResponsivePreview, {
|
|
@@ -106,14 +131,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
106
131
|
ref_key: "iframe",
|
|
107
132
|
ref: iframe,
|
|
108
133
|
src: sandboxUrl.value,
|
|
109
|
-
class: normalizeClass(["
|
|
110
|
-
"
|
|
111
|
-
"
|
|
134
|
+
class: normalizeClass(["ptw-w-full ptw-h-full ptw-relative", {
|
|
135
|
+
"ptw-invisible": !isIframeLoaded.value,
|
|
136
|
+
"ptw-pointer-events-none": resizing
|
|
112
137
|
}]),
|
|
113
138
|
style: normalizeStyle(isResponsiveEnabled ? {
|
|
114
139
|
width: finalWidth ? `${finalWidth}px` : null,
|
|
115
140
|
height: finalHeight ? `${finalHeight}px` : null
|
|
116
|
-
} : void 0),
|
|
141
|
+
} : props.autoHeight && reportedHeight.value ? { height: `${reportedHeight.value}px` } : void 0),
|
|
117
142
|
"data-test-id": "preview-iframe",
|
|
118
143
|
onLoad: _cache[0] || (_cache[0] = ($event) => onIframeLoad())
|
|
119
144
|
}, null, 46, _hoisted_1)
|
|
@@ -1,29 +1,13 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock,
|
|
2
|
-
import { isMobile } from "../../util/responsive.js";
|
|
3
|
-
import "../toolbar/DevOnlyToolbarOpenInEditor.vue.js";
|
|
4
|
-
import ToolbarBackground from "../toolbar/ToolbarBackground.vue.js";
|
|
5
|
-
import "../toolbar/ToolbarNewTab.vue.js";
|
|
6
|
-
import "../toolbar/ToolbarResponsiveSize.vue.js";
|
|
7
|
-
import "../toolbar/ToolbarTextDirection.vue.js";
|
|
8
|
-
import "../toolbar/ToolbarTitle.vue.js";
|
|
1
|
+
import { defineComponent, createElementBlock, openBlock, createBlock } from "@poveste/vendors/vue";
|
|
9
2
|
import "./StoryVariantSinglePreviewNative.vue.js";
|
|
10
3
|
import "./StoryVariantSinglePreviewRemote.vue.js";
|
|
11
|
-
import _sfc_main$1 from "
|
|
12
|
-
import _sfc_main$2 from "
|
|
13
|
-
import _sfc_main$3 from "../toolbar/ToolbarTextDirection.vue2.js";
|
|
14
|
-
import _sfc_main$4 from "../toolbar/ToolbarNewTab.vue2.js";
|
|
15
|
-
import _sfc_main$5 from "../toolbar/DevOnlyToolbarOpenInEditor.vue2.js";
|
|
16
|
-
import _sfc_main$6 from "./StoryVariantSinglePreviewNative.vue2.js";
|
|
17
|
-
import _sfc_main$7 from "./StoryVariantSinglePreviewRemote.vue2.js";
|
|
4
|
+
import _sfc_main$1 from "./StoryVariantSinglePreviewNative.vue2.js";
|
|
5
|
+
import _sfc_main$2 from "./StoryVariantSinglePreviewRemote.vue2.js";
|
|
18
6
|
"use strict";
|
|
19
7
|
const _hoisted_1 = {
|
|
20
|
-
class: "poveste-story-variant-single-view
|
|
8
|
+
class: "poveste-story-variant-single-view ptw-h-full ptw-flex ptw-flex-col",
|
|
21
9
|
"data-test-id": "story-variant-single-view"
|
|
22
10
|
};
|
|
23
|
-
const _hoisted_2 = {
|
|
24
|
-
key: 0,
|
|
25
|
-
class: "htw-flex-none htw-flex htw-items-center htw-h-8 -htw-mt-1"
|
|
26
|
-
};
|
|
27
11
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
28
12
|
__name: "StoryVariantSingleView",
|
|
29
13
|
props: {
|
|
@@ -33,27 +17,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
17
|
setup(__props) {
|
|
34
18
|
return (_ctx, _cache) => {
|
|
35
19
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
!__props.variant.responsiveDisabled ? (openBlock(), createBlock(_sfc_main$2, { key: 0 })) : createCommentVNode("", true),
|
|
39
|
-
createVNode(ToolbarBackground),
|
|
40
|
-
createVNode(_sfc_main$3),
|
|
41
|
-
createVNode(_sfc_main$4, {
|
|
42
|
-
variant: __props.variant,
|
|
43
|
-
story: __props.story
|
|
44
|
-
}, null, 8, ["variant", "story"]),
|
|
45
|
-
_ctx.__POVESTE_DEV__ ? (openBlock(), createBlock(_sfc_main$5, {
|
|
46
|
-
key: 1,
|
|
47
|
-
file: __props.story.file?.filePath,
|
|
48
|
-
tooltip: "Edit story in editor"
|
|
49
|
-
}, null, 8, ["file"])) : createCommentVNode("", true)
|
|
50
|
-
])) : createCommentVNode("", true),
|
|
51
|
-
__props.story.layout?.iframe === false ? (openBlock(), createBlock(_sfc_main$6, {
|
|
52
|
-
key: 1,
|
|
20
|
+
__props.story.layout?.iframe === false ? (openBlock(), createBlock(_sfc_main$1, {
|
|
21
|
+
key: 0,
|
|
53
22
|
story: __props.story,
|
|
54
23
|
variant: __props.variant
|
|
55
|
-
}, null, 8, ["story", "variant"])) : (openBlock(), createBlock(_sfc_main$
|
|
56
|
-
key:
|
|
24
|
+
}, null, 8, ["story", "variant"])) : (openBlock(), createBlock(_sfc_main$2, {
|
|
25
|
+
key: 1,
|
|
57
26
|
story: __props.story,
|
|
58
27
|
variant: __props.variant
|
|
59
28
|
}, null, 8, ["story", "variant"]))
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent, watch, ref, createBlock, createElementBlock, unref, openBlock, withCtx, createVNode } from "@poveste/vendors/vue";
|
|
1
|
+
import { defineComponent, computed, watch, ref, createBlock, createElementBlock, unref, openBlock, withCtx, createVNode } from "@poveste/vendors/vue";
|
|
2
2
|
import { Icon } from "@poveste/vendors/iconify";
|
|
3
3
|
import { useRouter, useRoute } from "@poveste/vendors/vue-router";
|
|
4
|
+
import { useLayoutStore } from "../../stores/layout.js";
|
|
4
5
|
import { useStoryStore } from "../../stores/story.js";
|
|
5
6
|
import { isMobile } from "../../util/responsive.js";
|
|
6
7
|
import BaseEmpty from "../base/BaseEmpty.vue.js";
|
|
@@ -13,12 +14,19 @@ import _sfc_main$2 from "../panel/StorySidePanel.vue2.js";
|
|
|
13
14
|
"use strict";
|
|
14
15
|
const _hoisted_1 = {
|
|
15
16
|
key: 1,
|
|
16
|
-
class: "poveste-story-view poveste-with-story
|
|
17
|
+
class: "poveste-story-view poveste-with-story ptw-h-full"
|
|
17
18
|
};
|
|
18
19
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
19
20
|
__name: "StoryView",
|
|
20
21
|
setup(__props) {
|
|
21
22
|
const storyStore = useStoryStore();
|
|
23
|
+
const layoutStore = useLayoutStore();
|
|
24
|
+
const effectiveStoryOptionsVisible = computed(
|
|
25
|
+
() => storyStore.currentStory?.meta?.storyOptions ?? layoutStore.settings.storyOptionsVisible
|
|
26
|
+
);
|
|
27
|
+
const placement = computed(() => layoutStore.settings.storyOptionsPlacement);
|
|
28
|
+
const splitOrientation = computed(() => placement.value === "bottom" ? "portrait" : "landscape");
|
|
29
|
+
const splitDefaultSplit = computed(() => placement.value === "bottom" ? 60 : 75);
|
|
22
30
|
const router = useRouter();
|
|
23
31
|
const route = useRoute();
|
|
24
32
|
watch(() => storyStore.currentVariant, (value) => {
|
|
@@ -62,7 +70,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
70
|
default: withCtx(() => [
|
|
63
71
|
createVNode(unref(Icon), {
|
|
64
72
|
icon: "carbon:software-resource-resource",
|
|
65
|
-
class: "
|
|
73
|
+
class: "ptw-w-16 ptw-h-16 ptw-opacity-50"
|
|
66
74
|
})
|
|
67
75
|
]),
|
|
68
76
|
_: 1
|
|
@@ -71,21 +79,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
71
79
|
key: 0,
|
|
72
80
|
ref_key: "docsOnlyScroller",
|
|
73
81
|
ref: docsOnlyScroller,
|
|
74
|
-
class: "
|
|
82
|
+
class: "ptw-h-full ptw-overflow-auto"
|
|
75
83
|
}, [
|
|
76
84
|
createVNode(_sfc_main$1, {
|
|
77
85
|
story: unref(storyStore).currentStory,
|
|
78
86
|
standalone: "",
|
|
79
|
-
class: "md:
|
|
87
|
+
class: "md:ptw-p-12 ptw-w-full md:ptw-max-w-[600px] lg:ptw-max-w-[800px] xl:ptw-max-w-[900px]",
|
|
80
88
|
onScrollTop: _cache[0] || (_cache[0] = ($event) => scrollDocsToTop())
|
|
81
89
|
}, null, 8, ["story"])
|
|
82
|
-
], 512)) : unref(isMobile) ? (openBlock(), createBlock(StoryViewer, { key: 1 })) : (openBlock(), createBlock(BaseSplitPane, {
|
|
83
|
-
key:
|
|
84
|
-
"save-id":
|
|
90
|
+
], 512)) : unref(isMobile) ? (openBlock(), createBlock(StoryViewer, { key: 1 })) : !effectiveStoryOptionsVisible.value ? (openBlock(), createBlock(StoryViewer, { key: 2 })) : (openBlock(), createBlock(BaseSplitPane, {
|
|
91
|
+
key: 3,
|
|
92
|
+
"save-id": `story-main-${placement.value}`,
|
|
93
|
+
orientation: splitOrientation.value,
|
|
85
94
|
min: 30,
|
|
86
95
|
max: 95,
|
|
87
|
-
"default-split":
|
|
88
|
-
|
|
96
|
+
"default-split": splitDefaultSplit.value,
|
|
97
|
+
"show-divider": false,
|
|
98
|
+
class: "ptw-h-full"
|
|
89
99
|
}, {
|
|
90
100
|
first: withCtx(() => [
|
|
91
101
|
createVNode(StoryViewer)
|
|
@@ -94,7 +104,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
94
104
|
createVNode(_sfc_main$2)
|
|
95
105
|
]),
|
|
96
106
|
_: 1
|
|
97
|
-
}))
|
|
107
|
+
}, 8, ["save-id", "orientation", "default-split"]))
|
|
98
108
|
]));
|
|
99
109
|
};
|
|
100
110
|
}
|
|
@@ -2,7 +2,7 @@ import _sfc_main from "./StoryViewer.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
"use strict";
|
|
5
|
-
const StoryViewer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const StoryViewer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-14c2dacd"]]);
|
|
6
6
|
export {
|
|
7
7
|
StoryViewer as default
|
|
8
8
|
};
|
|
@@ -7,12 +7,12 @@ import StoryVariantSingle from "./StoryVariantSingle.vue.js";
|
|
|
7
7
|
import _sfc_main$1 from "./StoryVariantGrid.vue2.js";
|
|
8
8
|
import _sfc_main$2 from "../app/MobileOverlay.vue2.js";
|
|
9
9
|
"use strict";
|
|
10
|
-
const _hoisted_1 = { class: "poveste-story-viewer
|
|
10
|
+
const _hoisted_1 = { class: "poveste-story-viewer ptw-bg-gray-50 ptw-h-full dark:ptw-bg-gray-750" };
|
|
11
11
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
12
|
__name: "StoryViewer",
|
|
13
13
|
setup(__props) {
|
|
14
14
|
useCssVars((_ctx) => ({
|
|
15
|
-
"
|
|
15
|
+
"e0c29708": variant.value?.iconColor
|
|
16
16
|
}));
|
|
17
17
|
const storyStore = useStoryStore();
|
|
18
18
|
const variant = computed(() => storyStore.currentVariant);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent, resolveDirective, withDirectives,
|
|
1
|
+
import { defineComponent, resolveDirective, withDirectives, createBlock, openBlock, unref, withCtx, createVNode } from "@poveste/vendors/vue";
|
|
2
2
|
import { Icon } from "@poveste/vendors/iconify";
|
|
3
3
|
import { openInEditor } from "../../util/open-in-editor.js";
|
|
4
|
+
import TopBarChipItem from "../app/TopBarChipItem.vue.js";
|
|
4
5
|
"use strict";
|
|
5
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
7
|
__name: "DevOnlyToolbarOpenInEditor",
|
|
@@ -11,16 +12,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
11
12
|
setup(__props) {
|
|
12
13
|
return (_ctx, _cache) => {
|
|
13
14
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
14
|
-
return withDirectives((openBlock(),
|
|
15
|
+
return withDirectives((openBlock(), createBlock(TopBarChipItem, {
|
|
15
16
|
target: "_blank",
|
|
16
|
-
class: "poveste-toolbar-open-in-editor
|
|
17
|
+
class: "poveste-toolbar-open-in-editor",
|
|
17
18
|
onClick: _cache[0] || (_cache[0] = ($event) => unref(openInEditor)(__props.file))
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
}, {
|
|
20
|
+
default: withCtx(() => [
|
|
21
|
+
createVNode(unref(Icon), {
|
|
22
|
+
icon: "carbon:script-reference",
|
|
23
|
+
class: "ptw-w-4 ptw-h-4"
|
|
24
|
+
})
|
|
25
|
+
]),
|
|
26
|
+
_: 1
|
|
27
|
+
})), [
|
|
24
28
|
[_directive_tooltip, __props.tooltip]
|
|
25
29
|
]);
|
|
26
30
|
};
|
|
@@ -2,7 +2,7 @@ import _sfc_main from "./ToolbarBackground.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
"use strict";
|
|
5
|
-
const ToolbarBackground = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const ToolbarBackground = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-dcd1e9e2"]]);
|
|
6
6
|
export {
|
|
7
7
|
ToolbarBackground as default
|
|
8
8
|
};
|