@poveste/app 0.1.2 → 0.2.0
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
|
@@ -31,7 +31,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31
31
|
default: withCtx(() => [
|
|
32
32
|
createVNode(unref(Icon), {
|
|
33
33
|
icon: "carbon:event-schedule",
|
|
34
|
-
class: "
|
|
34
|
+
class: "ptw-w-8 ptw-h-8 ptw-opacity-50 ptw-mb-6"
|
|
35
35
|
}),
|
|
36
36
|
_cache[0] || (_cache[0] = createTextVNode(" No event fired ", -1))
|
|
37
37
|
]),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { defineComponent, computed,
|
|
1
|
+
import { defineComponent, computed, createElementBlock, openBlock, createElementVNode, createBlock, unref, withCtx, createVNode, resolveDynamicComponent } from "@poveste/vendors/vue";
|
|
2
2
|
import { useRoute } from "@poveste/vendors/vue-router";
|
|
3
|
+
import { useLayoutStore } from "../../stores/layout.js";
|
|
3
4
|
import { useStoryStore } from "../../stores/story.js";
|
|
4
5
|
import BaseEmpty from "../base/BaseEmpty.vue.js";
|
|
5
6
|
import BaseSplitPane from "../base/BaseSplitPane.vue.js";
|
|
@@ -13,11 +14,17 @@ import _sfc_main$2 from "./StoryEvents.vue2.js";
|
|
|
13
14
|
import _sfc_main$3 from "./StoryDocs.vue2.js";
|
|
14
15
|
import _sfc_main$4 from "./PaneTabs.vue2.js";
|
|
15
16
|
"use strict";
|
|
16
|
-
const _hoisted_1 = { class: "
|
|
17
|
+
const _hoisted_1 = { class: "ptw-h-full ptw-w-full ptw-p-2" };
|
|
18
|
+
const _hoisted_2 = { class: "ptw-h-full ptw-w-full ptw-rounded-lg ptw-border ptw-border-gray-200 dark:ptw-border-gray-700 ptw-overflow-hidden ptw-bg-white dark:ptw-bg-gray-700" };
|
|
19
|
+
const _hoisted_3 = { class: "ptw-flex ptw-flex-col ptw-h-full" };
|
|
17
20
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18
21
|
__name: "StorySidePanel",
|
|
19
22
|
setup(__props) {
|
|
20
23
|
const storyStore = useStoryStore();
|
|
24
|
+
const layoutStore = useLayoutStore();
|
|
25
|
+
const innerOrientation = computed(
|
|
26
|
+
() => layoutStore.settings.storyOptionsPlacement === "bottom" ? "landscape" : "portrait"
|
|
27
|
+
);
|
|
21
28
|
const route = useRoute();
|
|
22
29
|
const panelContentComponent = computed(() => {
|
|
23
30
|
switch (route.query.tab) {
|
|
@@ -30,51 +37,55 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
30
37
|
}
|
|
31
38
|
});
|
|
32
39
|
return (_ctx, _cache) => {
|
|
33
|
-
return
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
40
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
41
|
+
createElementVNode("div", _hoisted_2, [
|
|
42
|
+
!unref(storyStore).currentVariant ? (openBlock(), createBlock(BaseEmpty, {
|
|
43
|
+
key: 0,
|
|
44
|
+
class: "poveste-story-side-panel poveste-selection"
|
|
45
|
+
}, {
|
|
46
|
+
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
47
|
+
createElementVNode("span", null, "Select a variant", -1)
|
|
48
|
+
])]),
|
|
49
|
+
_: 1
|
|
50
|
+
})) : !unref(storyStore).currentVariant.configReady || !unref(storyStore).currentVariant.previewReady ? (openBlock(), createBlock(BaseEmpty, {
|
|
51
|
+
key: 1,
|
|
52
|
+
class: "poveste-story-side-panel poveste-loading"
|
|
53
|
+
}, {
|
|
54
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
55
|
+
createElementVNode("span", null, "Loading...", -1)
|
|
56
|
+
])]),
|
|
57
|
+
_: 1
|
|
58
|
+
})) : (openBlock(), createBlock(BaseSplitPane, {
|
|
59
|
+
key: 2,
|
|
60
|
+
"save-id": `story-sidepane-${innerOrientation.value}`,
|
|
61
|
+
orientation: innerOrientation.value,
|
|
62
|
+
class: "poveste-story-side-panel poveste-loaded ptw-h-full",
|
|
63
|
+
"data-test-id": "story-side-panel"
|
|
64
|
+
}, {
|
|
65
|
+
first: withCtx(() => [
|
|
66
|
+
createElementVNode("div", _hoisted_3, [
|
|
67
|
+
createVNode(_sfc_main$4, {
|
|
68
|
+
story: unref(storyStore).currentStory,
|
|
69
|
+
variant: unref(storyStore).currentVariant
|
|
70
|
+
}, null, 8, ["story", "variant"]),
|
|
71
|
+
(openBlock(), createBlock(resolveDynamicComponent(panelContentComponent.value), {
|
|
72
|
+
story: unref(storyStore).currentStory,
|
|
73
|
+
variant: unref(storyStore).currentVariant,
|
|
74
|
+
class: "ptw-h-full ptw-overflow-auto"
|
|
75
|
+
}, null, 8, ["story", "variant"]))
|
|
76
|
+
])
|
|
77
|
+
]),
|
|
78
|
+
last: withCtx(() => [
|
|
79
|
+
createVNode(StorySourceCode, {
|
|
80
|
+
story: unref(storyStore).currentStory,
|
|
81
|
+
variant: unref(storyStore).currentVariant,
|
|
82
|
+
class: "ptw-h-full"
|
|
83
|
+
}, null, 8, ["story", "variant"])
|
|
84
|
+
]),
|
|
85
|
+
_: 1
|
|
86
|
+
}, 8, ["save-id", "orientation"]))
|
|
87
|
+
])
|
|
88
|
+
]);
|
|
78
89
|
};
|
|
79
90
|
}
|
|
80
91
|
});
|
|
@@ -2,7 +2,7 @@ import _sfc_main from "./StorySourceCode.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
"use strict";
|
|
5
|
-
const StorySourceCode = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const StorySourceCode = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5ee6b7f7"]]);
|
|
6
6
|
export {
|
|
7
7
|
StorySourceCode as default
|
|
8
8
|
};
|
|
@@ -7,15 +7,15 @@ import { clientSupportPlugins } from "virtual:$poveste-support-plugins-client";
|
|
|
7
7
|
import { isDark } from "../../util/dark.js";
|
|
8
8
|
import BaseEmpty from "../base/BaseEmpty.vue.js";
|
|
9
9
|
"use strict";
|
|
10
|
-
const _hoisted_1 = { class: "poveste-story-source-code
|
|
10
|
+
const _hoisted_1 = { class: "poveste-story-source-code ptw-bg-gray-50 dark:ptw-bg-gray-750 ptw-h-full ptw-overflow-hidden ptw-flex ptw-flex-col" };
|
|
11
11
|
const _hoisted_2 = {
|
|
12
12
|
key: 0,
|
|
13
|
-
class: "
|
|
13
|
+
class: "ptw-h-10 ptw-flex-none ptw-border-b ptw-border-solid ptw-border-gray-500/5 ptw-px-4 ptw-flex ptw-items-center ptw-gap-2"
|
|
14
14
|
};
|
|
15
|
-
const _hoisted_3 = { class: "
|
|
15
|
+
const _hoisted_3 = { class: "ptw-flex ptw-flex-none ptw-gap-px ptw-h-full ptw-py-2" };
|
|
16
16
|
const _hoisted_4 = {
|
|
17
17
|
key: 1,
|
|
18
|
-
class: "
|
|
18
|
+
class: "ptw-text-red-500 ptw-h-full ptw-p-2 ptw-overflow-auto ptw-font-mono ptw-text-sm"
|
|
19
19
|
};
|
|
20
20
|
const _hoisted_5 = ["value"];
|
|
21
21
|
const _hoisted_6 = ["innerHTML"];
|
|
@@ -117,19 +117,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
117
117
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
118
118
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
119
119
|
!error.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
120
|
-
_cache[2] || (_cache[2] = createElementVNode("div", { class: "
|
|
121
|
-
_cache[3] || (_cache[3] = createElementVNode("div", { class: "
|
|
120
|
+
_cache[2] || (_cache[2] = createElementVNode("div", { class: "ptw-text-gray-900 dark:ptw-text-gray-100" }, " Source ", -1)),
|
|
121
|
+
_cache[3] || (_cache[3] = createElementVNode("div", { class: "ptw-flex-1" }, null, -1)),
|
|
122
122
|
createElementVNode("div", _hoisted_3, [
|
|
123
123
|
withDirectives((openBlock(), createElementBlock("button", {
|
|
124
|
-
class: normalizeClass(["
|
|
125
|
-
displayedSource.value !== "dynamic" ? "
|
|
126
|
-
dynamicSourceCode.value ? "
|
|
124
|
+
class: normalizeClass(["ptw-flex ptw-items-center ptw-gap-1 ptw-h-full ptw-px-1 ptw-bg-gray-500/10 ptw-rounded-l ptw-transition-all ptw-ease-[cubic-bezier(0,1,.6,1)] ptw-duration-300 ptw-overflow-hidden", [
|
|
125
|
+
displayedSource.value !== "dynamic" ? "ptw-max-w-6 ptw-opacity-70" : "ptw-max-w-[82px] ptw-text-primary-600 dark:ptw-text-primary-400",
|
|
126
|
+
dynamicSourceCode.value ? "ptw-cursor-pointer hover:ptw-bg-gray-500/30 active:ptw-bg-gray-600/50" : "ptw-opacity-50"
|
|
127
127
|
]]),
|
|
128
128
|
onClick: _cache[0] || (_cache[0] = ($event) => dynamicSourceCode.value && (displayedSource.value = "dynamic"))
|
|
129
129
|
}, [
|
|
130
130
|
createVNode(unref(Icon), {
|
|
131
131
|
icon: "carbon:flash",
|
|
132
|
-
class: "
|
|
132
|
+
class: "ptw-w-4 ptw-h-4 ptw-flex-none"
|
|
133
133
|
}),
|
|
134
134
|
createElementVNode("span", {
|
|
135
135
|
class: normalizeClass(["transition-opacity duration-300", {
|
|
@@ -140,15 +140,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
140
140
|
[_directive_tooltip, !dynamicSourceCode.value ? "Dynamic source code is not available" : displayedSource.value !== "dynamic" ? "Switch to dynamic source" : null]
|
|
141
141
|
]),
|
|
142
142
|
withDirectives((openBlock(), createElementBlock("button", {
|
|
143
|
-
class: normalizeClass(["
|
|
144
|
-
displayedSource.value !== "static" ? "
|
|
145
|
-
staticSourceCode.value ? "
|
|
143
|
+
class: normalizeClass(["ptw-flex ptw-items-center ptw-gap-1 ptw-h-full ptw-px-1 ptw-bg-gray-500/10 ptw-rounded-r ptw-transition-all ptw-ease-[cubic-bezier(0,1,.6,1)] ptw-duration-300 ptw-overflow-hidden", [
|
|
144
|
+
displayedSource.value !== "static" ? "ptw-max-w-6 ptw-opacity-70" : "ptw-max-w-[63px] ptw-text-primary-600 dark:ptw-text-primary-400",
|
|
145
|
+
staticSourceCode.value ? "ptw-cursor-pointer hover:ptw-bg-gray-500/30 active:ptw-bg-gray-600/50" : "ptw-opacity-50"
|
|
146
146
|
]]),
|
|
147
147
|
onClick: _cache[1] || (_cache[1] = ($event) => staticSourceCode.value && (displayedSource.value = "static"))
|
|
148
148
|
}, [
|
|
149
149
|
createVNode(unref(Icon), {
|
|
150
150
|
icon: "carbon:document",
|
|
151
|
-
class: "
|
|
151
|
+
class: "ptw-w-4 ptw-h-4 ptw-flex-none"
|
|
152
152
|
}),
|
|
153
153
|
createElementVNode("span", {
|
|
154
154
|
class: normalizeClass(["transition-opacity duration-300", {
|
|
@@ -161,14 +161,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
161
161
|
]),
|
|
162
162
|
createVNode(unref(HstCopyIcon), {
|
|
163
163
|
content: displayedSourceCode.value,
|
|
164
|
-
class: "
|
|
164
|
+
class: "ptw-flex-none"
|
|
165
165
|
}, null, 8, ["content"])
|
|
166
166
|
])) : createCommentVNode("", true),
|
|
167
167
|
error.value ? (openBlock(), createElementBlock("div", _hoisted_4, " Error: " + toDisplayString(error.value), 1)) : !displayedSourceCode.value ? (openBlock(), createBlock(BaseEmpty, { key: 2 }, {
|
|
168
168
|
default: withCtx(() => [
|
|
169
169
|
createVNode(unref(Icon), {
|
|
170
170
|
icon: "carbon:code-hide",
|
|
171
|
-
class: "
|
|
171
|
+
class: "ptw-w-8 ptw-h-8 ptw-opacity-50 ptw-mb-6"
|
|
172
172
|
}),
|
|
173
173
|
_cache[4] || (_cache[4] = createElementVNode("span", null, "Not available", -1))
|
|
174
174
|
]),
|
|
@@ -177,7 +177,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
177
177
|
key: 3,
|
|
178
178
|
ref_key: "scroller",
|
|
179
179
|
ref: scroller,
|
|
180
|
-
class: "__poveste-code-placeholder
|
|
180
|
+
class: "__poveste-code-placeholder ptw-w-full ptw-h-full ptw-p-4 ptw-outline-none ptw-bg-transparent ptw-resize-none ptw-m-0",
|
|
181
181
|
value: displayedSourceCode.value,
|
|
182
182
|
readonly: "",
|
|
183
183
|
"data-test-id": "story-source-code",
|
|
@@ -186,12 +186,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
186
186
|
key: 4,
|
|
187
187
|
ref_key: "scroller",
|
|
188
188
|
ref: scroller,
|
|
189
|
-
class: "
|
|
189
|
+
class: "ptw-w-full ptw-h-full ptw-overflow-auto",
|
|
190
190
|
"data-test-id": "story-source-code",
|
|
191
191
|
onScroll
|
|
192
192
|
}, [
|
|
193
193
|
createElementVNode("div", {
|
|
194
|
-
class: "__poveste-code __histoire-code
|
|
194
|
+
class: "__poveste-code __histoire-code ptw-p-4 ptw-w-fit",
|
|
195
195
|
innerHTML: sourceHtml.value
|
|
196
196
|
}, null, 8, _hoisted_6)
|
|
197
197
|
], 544))
|
|
@@ -2,7 +2,7 @@ import _sfc_main from "./SearchItem.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
"use strict";
|
|
5
|
-
const SearchItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const SearchItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-81e4dd33"]]);
|
|
6
6
|
export {
|
|
7
7
|
SearchItem as default
|
|
8
8
|
};
|
|
@@ -26,7 +26,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
26
|
},
|
|
27
27
|
setup(__props, { emit: __emit }) {
|
|
28
28
|
useCssVars((_ctx) => ({
|
|
29
|
-
"
|
|
29
|
+
"dacfd852": __props.result.iconColor
|
|
30
30
|
}));
|
|
31
31
|
const props = __props;
|
|
32
32
|
const emit = __emit;
|
|
@@ -59,7 +59,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
59
59
|
key: 0,
|
|
60
60
|
to: __props.result.route,
|
|
61
61
|
"is-active": unref(selected),
|
|
62
|
-
class: "
|
|
62
|
+
class: "ptw-px-6 ptw-py-4 ptw-gap-4",
|
|
63
63
|
onNavigate: _cache[0] || (_cache[0] = ($event) => action(true))
|
|
64
64
|
}, {
|
|
65
65
|
default: withCtx(() => [
|
|
@@ -73,7 +73,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
73
73
|
"onActivate" in __props.result ? (openBlock(), createBlock(_sfc_main$2, {
|
|
74
74
|
key: 1,
|
|
75
75
|
"is-active": unref(selected),
|
|
76
|
-
class: "
|
|
76
|
+
class: "ptw-px-6 ptw-py-4 ptw-gap-4",
|
|
77
77
|
onNavigate: _cache[1] || (_cache[1] = ($event) => action(true))
|
|
78
78
|
}, {
|
|
79
79
|
default: withCtx(() => [
|
|
@@ -2,12 +2,12 @@ import { defineComponent, createElementBlock, openBlock, Fragment, createVNode,
|
|
|
2
2
|
import { Icon } from "@poveste/vendors/iconify";
|
|
3
3
|
import BaseIcon from "../base/BaseIcon.vue.js";
|
|
4
4
|
"use strict";
|
|
5
|
-
const _hoisted_1 = { class: "
|
|
6
|
-
const _hoisted_2 = { class: "
|
|
7
|
-
const _hoisted_3 = { class: "
|
|
5
|
+
const _hoisted_1 = { class: "ptw-flex-1" };
|
|
6
|
+
const _hoisted_2 = { class: "ptw-flex" };
|
|
7
|
+
const _hoisted_3 = { class: "ptw-ml-auto ptw-opacity-40" };
|
|
8
8
|
const _hoisted_4 = {
|
|
9
9
|
key: 0,
|
|
10
|
-
class: "
|
|
10
|
+
class: "ptw-flex ptw-items-center ptw-gap-0.5 ptw-opacity-60"
|
|
11
11
|
};
|
|
12
12
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
13
|
__name: "SearchItemContent",
|
|
@@ -29,11 +29,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29
29
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
30
30
|
createVNode(BaseIcon, {
|
|
31
31
|
icon: __props.result.icon ?? defaultIcons[__props.result.kind],
|
|
32
|
-
class: normalizeClass(["
|
|
32
|
+
class: normalizeClass(["ptw-w-4 ptw-h-4", [
|
|
33
33
|
!__props.selected ? [
|
|
34
34
|
__props.result.iconColor ? "bind-icon-color" : {
|
|
35
|
-
"
|
|
36
|
-
"
|
|
35
|
+
"ptw-text-primary-500": __props.result.kind === "story",
|
|
36
|
+
"ptw-text-gray-500": __props.result.kind === "variant"
|
|
37
37
|
}
|
|
38
38
|
] : [],
|
|
39
39
|
{
|
|
@@ -50,12 +50,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
50
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.result.path, (p, index) => {
|
|
51
51
|
return openBlock(), createElementBlock("div", {
|
|
52
52
|
key: index,
|
|
53
|
-
class: "
|
|
53
|
+
class: "ptw-flex ptw-items-center ptw-gap-0.5"
|
|
54
54
|
}, [
|
|
55
55
|
index > 0 ? (openBlock(), createBlock(unref(Icon), {
|
|
56
56
|
key: 0,
|
|
57
57
|
icon: "carbon:chevron-right",
|
|
58
|
-
class: "
|
|
58
|
+
class: "ptw-w-4 ptw-h-4 ptw-mt-0.5 ptw-opacity-50"
|
|
59
59
|
})) : createCommentVNode("", true),
|
|
60
60
|
createElementVNode("span", null, toDisplayString(p), 1)
|
|
61
61
|
]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, createElementBlock, openBlock, createVNode, createTextVNode, unref } from "@poveste/vendors/vue";
|
|
2
2
|
import { Icon } from "@poveste/vendors/iconify";
|
|
3
3
|
"use strict";
|
|
4
|
-
const _hoisted_1 = { class: "poveste-search-loading
|
|
4
|
+
const _hoisted_1 = { class: "poveste-search-loading ptw-flex ptw-items-center ptw-gap-4 ptw-pl-6 ptw-border ptw-border-transparent focus-visible:ptw-border-primary-500 ptw-h-[51px] ptw-opacity-30" };
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "SearchLoading",
|
|
7
7
|
setup(__props) {
|
|
@@ -9,7 +9,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9
9
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
10
10
|
createVNode(unref(Icon), {
|
|
11
11
|
icon: "carbon:search",
|
|
12
|
-
class: "flex-none
|
|
12
|
+
class: "flex-none ptw-w-4 ptw-h-4"
|
|
13
13
|
}),
|
|
14
14
|
_cache[0] || (_cache[0] = createTextVNode(" Loading... ", -1))
|
|
15
15
|
]);
|
|
@@ -3,10 +3,10 @@ import "./SearchLoading.vue.js";
|
|
|
3
3
|
import _sfc_main$1 from "./SearchLoading.vue2.js";
|
|
4
4
|
"use strict";
|
|
5
5
|
const _hoisted_1 = {
|
|
6
|
-
class: "poveste-search-modal
|
|
6
|
+
class: "poveste-search-modal ptw-fixed ptw-inset-0 ptw-bg-white/80 dark:ptw-bg-gray-900/80 ptw-z-20",
|
|
7
7
|
"data-test-id": "search-modal"
|
|
8
8
|
};
|
|
9
|
-
const _hoisted_2 = { class: "
|
|
9
|
+
const _hoisted_2 = { class: "ptw-bg-white dark:ptw-bg-gray-900 md:ptw-mt-16 md:ptw-mx-auto ptw-w-screen ptw-max-w-[512px] ptw-shadow-xl ptw-border ptw-border-gray-200 dark:ptw-border-gray-750 ptw-rounded-lg ptw-relative ptw-divide-y ptw-divide-gray-200 dark:ptw-divide-gray-850" };
|
|
10
10
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
11
|
__name: "SearchModal",
|
|
12
12
|
props: {
|
|
@@ -31,7 +31,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31
31
|
return (_ctx, _cache) => {
|
|
32
32
|
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1, [
|
|
33
33
|
createElementVNode("div", {
|
|
34
|
-
class: "
|
|
34
|
+
class: "ptw-absolute ptw-inset-0",
|
|
35
35
|
onClick: _cache[0] || (_cache[0] = ($event) => close())
|
|
36
36
|
}),
|
|
37
37
|
createElementVNode("div", _hoisted_2, [
|
|
@@ -13,7 +13,7 @@ import SearchItem from "./SearchItem.vue.js";
|
|
|
13
13
|
"use strict";
|
|
14
14
|
const _hoisted_1 = {
|
|
15
15
|
key: 1,
|
|
16
|
-
class: "
|
|
16
|
+
class: "ptw-max-h-[400px] ptw-overflow-y-auto ptw-rounded-b-lg"
|
|
17
17
|
};
|
|
18
18
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
19
19
|
__name: "SearchPane",
|
|
@@ -223,19 +223,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
223
223
|
return (_ctx, _cache) => {
|
|
224
224
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
225
225
|
createElementVNode("div", {
|
|
226
|
-
class: "poveste-search-pane
|
|
226
|
+
class: "poveste-search-pane ptw-flex ptw-items-center ptw-gap-4 ptw-pl-6 ptw-border ptw-border-transparent focus-visible:ptw-border-primary-500",
|
|
227
227
|
onClick: _cache[4] || (_cache[4] = ($event) => focused.value = true)
|
|
228
228
|
}, [
|
|
229
229
|
createVNode(unref(Icon), {
|
|
230
230
|
icon: "carbon:search",
|
|
231
|
-
class: "flex-none
|
|
231
|
+
class: "flex-none ptw-w-4 ptw-h-4"
|
|
232
232
|
}),
|
|
233
233
|
withDirectives(createElementVNode("input", {
|
|
234
234
|
ref_key: "input",
|
|
235
235
|
ref: input,
|
|
236
236
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchInputText.value = $event),
|
|
237
237
|
placeholder: "Search for stories, variants...",
|
|
238
|
-
class: "
|
|
238
|
+
class: "ptw-bg-transparent ptw-w-full ptw-flex-1 ptw-pl-0 ptw-pr-6 ptw-py-4 ptw-outline-none",
|
|
239
239
|
onKeydown: [
|
|
240
240
|
_cache[1] || (_cache[1] = withKeys(withModifiers(($event) => unref(selectNext)(), ["prevent"]), ["down"])),
|
|
241
241
|
_cache[2] || (_cache[2] = withKeys(withModifiers(($event) => unref(selectPrevious)(), ["prevent"]), ["up"])),
|
|
@@ -2,7 +2,7 @@ import _sfc_main from "./StoryResponsivePreview.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
"use strict";
|
|
5
|
-
const StoryResponsivePreview = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const StoryResponsivePreview = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-996dc779"]]);
|
|
6
6
|
export {
|
|
7
7
|
StoryResponsivePreview as default
|
|
8
8
|
};
|
|
@@ -6,17 +6,17 @@ import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
|
6
6
|
import CheckerboardPattern from "../misc/CheckerboardPattern.vue.js";
|
|
7
7
|
import HatchedPattern from "../misc/HatchedPattern.vue.js";
|
|
8
8
|
"use strict";
|
|
9
|
-
const _hoisted_1 = { class: "poveste-story-responsive-preview
|
|
9
|
+
const _hoisted_1 = { class: "poveste-story-responsive-preview ptw-w-full ptw-h-full ptw-flex-1 ptw-rounded-lg ptw-relative ptw-overflow-hidden" };
|
|
10
10
|
const _hoisted_2 = {
|
|
11
11
|
key: 0,
|
|
12
|
-
class: "
|
|
12
|
+
class: "ptw-absolute ptw-inset-0 ptw-w-full ptw-h-full ptw-bg-gray-100 dark:ptw-bg-gray-750 ptw-rounded-r-lg ptw-border-l-2 ptw-border-gray-500/10 dark:ptw-border-gray-700/30 ptw-overflow-hidden"
|
|
13
13
|
};
|
|
14
14
|
const _hoisted_3 = {
|
|
15
|
-
class: "bind-preview-bg
|
|
15
|
+
class: "bind-preview-bg ptw-rounded-lg ptw-h-full",
|
|
16
16
|
"data-test-id": "responsive-preview-bg"
|
|
17
17
|
};
|
|
18
|
-
const _hoisted_4 = { class: "
|
|
19
|
-
const _hoisted_5 = { class: "
|
|
18
|
+
const _hoisted_4 = { class: "ptw-p-8 ptw-h-full ptw-relative" };
|
|
19
|
+
const _hoisted_5 = { class: "ptw-w-full ptw-h-full ptw-relative" };
|
|
20
20
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
21
21
|
__name: "StoryResponsivePreview",
|
|
22
22
|
props: {
|
|
@@ -24,7 +24,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
24
|
},
|
|
25
25
|
setup(__props) {
|
|
26
26
|
useCssVars((_ctx) => ({
|
|
27
|
-
"
|
|
27
|
+
"v2ebc4fb8": unref(settings).backgroundColor
|
|
28
28
|
}));
|
|
29
29
|
const props = __props;
|
|
30
30
|
const settings = usePreviewSettingsStore().currentSettings;
|
|
@@ -116,28 +116,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
116
116
|
return (_ctx, _cache) => {
|
|
117
117
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
118
118
|
isResponsiveEnabled.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
119
|
-
createVNode(HatchedPattern, { class: "
|
|
119
|
+
createVNode(HatchedPattern, { class: "ptw-w-full ptw-h-full ptw-text-black/[1%] dark:ptw-text-white/[1%]" })
|
|
120
120
|
])) : createCommentVNode("", true),
|
|
121
121
|
createElementVNode("div", {
|
|
122
122
|
ref_key: "previewWrapper",
|
|
123
123
|
ref: previewWrapper,
|
|
124
|
-
class: "
|
|
124
|
+
class: "ptw-h-full ptw-overflow-auto ptw-relative"
|
|
125
125
|
}, [
|
|
126
126
|
createElementVNode("div", {
|
|
127
|
-
class: normalizeClass(["
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
} : "
|
|
127
|
+
class: normalizeClass(["ptw-overflow-hidden ptw-bg-white dark:ptw-bg-gray-700 ptw-rounded-lg ptw-relative", isResponsiveEnabled.value ? {
|
|
128
|
+
"ptw-w-fit": !!finalWidth.value,
|
|
129
|
+
"ptw-h-fit": !!finalHeight.value,
|
|
130
|
+
"ptw-h-full": !finalHeight.value
|
|
131
|
+
} : "ptw-h-full"])
|
|
132
132
|
}, [
|
|
133
133
|
createElementVNode("div", _hoisted_3, [
|
|
134
134
|
unref(settings).checkerboard ? (openBlock(), createBlock(CheckerboardPattern, {
|
|
135
135
|
key: 0,
|
|
136
|
-
class: "
|
|
136
|
+
class: "ptw-absolute ptw-inset-0 ptw-w-full ptw-h-full ptw-text-gray-500/20"
|
|
137
137
|
})) : createCommentVNode("", true),
|
|
138
138
|
createElementVNode("div", _hoisted_4, [
|
|
139
139
|
createElementVNode("div", _hoisted_5, [
|
|
140
|
-
_cache[0] || (_cache[0] = createElementVNode("div", { class: "
|
|
140
|
+
_cache[0] || (_cache[0] = createElementVNode("div", { class: "ptw-absolute ptw-inset-0" }, null, -1)),
|
|
141
141
|
renderSlot(_ctx.$slots, "default", {
|
|
142
142
|
isResponsiveEnabled: isResponsiveEnabled.value,
|
|
143
143
|
finalWidth: finalWidth.value,
|
|
@@ -145,17 +145,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
145
145
|
resizing: resizing.value
|
|
146
146
|
}, void 0, true)
|
|
147
147
|
]),
|
|
148
|
-
_cache[1] || (_cache[1] = createStaticVNode('<div class="
|
|
148
|
+
_cache[1] || (_cache[1] = createStaticVNode('<div class="ptw-absolute ptw-top-5 ptw-left-8 ptw-h-2 ptw-w-px ptw-bg-gray-400/25" data-v-996dc779></div><div class="ptw-absolute ptw-top-5 ptw-right-8 ptw-h-2 ptw-w-px ptw-bg-gray-400/25" data-v-996dc779></div><div class="ptw-absolute ptw-bottom-5 ptw-left-8 ptw-h-2 ptw-w-px ptw-bg-gray-400/25" data-v-996dc779></div><div class="ptw-absolute ptw-bottom-5 ptw-right-8 ptw-h-2 ptw-w-px ptw-bg-gray-400/25" data-v-996dc779></div><div class="ptw-absolute ptw-left-5 ptw-top-8 ptw-w-2 ptw-h-px ptw-bg-gray-400/25" data-v-996dc779></div><div class="ptw-absolute ptw-left-5 ptw-bottom-8 ptw-w-2 ptw-h-px ptw-bg-gray-400/25" data-v-996dc779></div><div class="ptw-absolute ptw-right-5 ptw-top-8 ptw-w-2 ptw-h-px ptw-bg-gray-400/25" data-v-996dc779></div><div class="ptw-absolute ptw-right-5 ptw-bottom-8 ptw-w-2 ptw-h-px ptw-bg-gray-400/25" data-v-996dc779></div>', 8))
|
|
149
149
|
]),
|
|
150
150
|
isResponsiveEnabled.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
151
151
|
withDirectives((openBlock(), createElementBlock("div", {
|
|
152
152
|
ref_key: "horizontalDragger",
|
|
153
153
|
ref: horizontalDragger,
|
|
154
|
-
class: "
|
|
154
|
+
class: "ptw-absolute ptw-w-4 ptw-top-0 ptw-bottom-4 ptw-right-0 hover:ptw-bg-primary-500/30 ptw-flex ptw-items-center ptw-justify-center ptw-cursor-ew-resize ptw-group hover:ptw-text-primary-500"
|
|
155
155
|
}, [
|
|
156
156
|
createVNode(unref(Icon), {
|
|
157
157
|
icon: "mdi:drag-vertical-variant",
|
|
158
|
-
class: "
|
|
158
|
+
class: "ptw-w-4 ptw-h-4 ptw-opacity-20 group-hover:ptw-opacity-90"
|
|
159
159
|
})
|
|
160
160
|
])), [
|
|
161
161
|
[
|
|
@@ -168,11 +168,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
168
168
|
withDirectives((openBlock(), createElementBlock("div", {
|
|
169
169
|
ref_key: "verticalDragger",
|
|
170
170
|
ref: verticalDragger,
|
|
171
|
-
class: "
|
|
171
|
+
class: "ptw-absolute ptw-h-4 ptw-left-0 ptw-right-4 ptw-bottom-0 hover:ptw-bg-primary-500/30 ptw-flex ptw-items-center ptw-justify-center ptw-cursor-ns-resize ptw-group hover:ptw-text-primary-500"
|
|
172
172
|
}, [
|
|
173
173
|
createVNode(unref(Icon), {
|
|
174
174
|
icon: "mdi:drag-horizontal-variant",
|
|
175
|
-
class: "
|
|
175
|
+
class: "ptw-w-4 ptw-h-4 ptw-opacity-20 group-hover:ptw-opacity-90"
|
|
176
176
|
})
|
|
177
177
|
])), [
|
|
178
178
|
[
|
|
@@ -185,7 +185,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
185
185
|
withDirectives(createElementVNode("div", {
|
|
186
186
|
ref_key: "cornerDragger",
|
|
187
187
|
ref: cornerDragger,
|
|
188
|
-
class: "
|
|
188
|
+
class: "ptw-absolute ptw-w-4 ptw-h-4 ptw-right-0 ptw-bottom-0 hover:ptw-bg-primary-500/30 ptw-flex ptw-items-center ptw-justify-center ptw-cursor-nwse-resize ptw-group hover:ptw-text-primary-500"
|
|
189
189
|
}, null, 512), [
|
|
190
190
|
[
|
|
191
191
|
unref(VTooltip),
|
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, watch, onMounted, createElementBlock, openBlock,
|
|
1
|
+
import { defineComponent, computed, ref, watch, onMounted, createElementBlock, openBlock, createElementVNode, normalizeStyle, unref, Fragment, renderList, createBlock } from "@poveste/vendors/vue";
|
|
2
2
|
import { useResizeObserver } from "@poveste/vendors/vue-use";
|
|
3
3
|
import { useStoryStore } from "../../stores/story.js";
|
|
4
|
-
import { isMobile } from "../../util/responsive.js";
|
|
5
|
-
import "../toolbar/DevOnlyToolbarOpenInEditor.vue.js";
|
|
6
|
-
import ToolbarBackground from "../toolbar/ToolbarBackground.vue.js";
|
|
7
|
-
import "../toolbar/ToolbarTextDirection.vue.js";
|
|
8
4
|
import StoryVariantGridItem from "./StoryVariantGridItem.vue.js";
|
|
9
|
-
import _sfc_main$1 from "../toolbar/ToolbarTextDirection.vue2.js";
|
|
10
|
-
import _sfc_main$2 from "../toolbar/DevOnlyToolbarOpenInEditor.vue2.js";
|
|
11
5
|
"use strict";
|
|
12
|
-
const _hoisted_1 = { class: "poveste-story-variant-grid
|
|
13
|
-
const _hoisted_2 = {
|
|
14
|
-
key: 0,
|
|
15
|
-
class: "htw-flex-none htw-flex htw-items-center htw-justify-end htw-h-8 htw-mx-2 htw-mt-1"
|
|
16
|
-
};
|
|
17
|
-
const _hoisted_3 = { class: "htw-flex htw-w-0 htw-flex-1 htw-mx-4" };
|
|
6
|
+
const _hoisted_1 = { class: "poveste-story-variant-grid ptw-flex ptw-flex-col ptw-items-stretch ptw-h-full __poveste-pane-shadow-from-right" };
|
|
7
|
+
const _hoisted_2 = { class: "ptw-flex ptw-w-0 ptw-flex-1 ptw-mx-4" };
|
|
18
8
|
const margin = 16;
|
|
19
9
|
const gap = 16;
|
|
20
10
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -95,24 +85,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
95
85
|
const columnCount = computed(() => Math.min(storyStore.currentStory.variants.length, Math.floor((viewWidth.value + gap) / (gridColumnWidth.value + gap))));
|
|
96
86
|
return (_ctx, _cache) => {
|
|
97
87
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
98
|
-
!unref(isMobile) ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
99
|
-
createVNode(ToolbarBackground),
|
|
100
|
-
createVNode(_sfc_main$1),
|
|
101
|
-
_ctx.__POVESTE_DEV__ ? (openBlock(), createBlock(_sfc_main$2, {
|
|
102
|
-
key: 0,
|
|
103
|
-
file: unref(storyStore).currentStory.file?.filePath,
|
|
104
|
-
tooltip: "Edit story in editor"
|
|
105
|
-
}, null, 8, ["file"])) : createCommentVNode("", true)
|
|
106
|
-
])) : createCommentVNode("", true),
|
|
107
88
|
createElementVNode("div", {
|
|
108
89
|
ref_key: "el",
|
|
109
90
|
ref: el,
|
|
110
|
-
class: "
|
|
91
|
+
class: "ptw-overflow-y-auto ptw-flex ptw-flex-1",
|
|
111
92
|
onScroll: _cache[0] || (_cache[0] = ($event) => updateMaxCount())
|
|
112
93
|
}, [
|
|
113
|
-
createElementVNode("div",
|
|
94
|
+
createElementVNode("div", _hoisted_2, [
|
|
114
95
|
createElementVNode("div", {
|
|
115
|
-
class: "
|
|
96
|
+
class: "ptw-m-auto",
|
|
116
97
|
style: normalizeStyle({
|
|
117
98
|
minHeight: `${unref(storyStore).currentStory.variants.length / countPerRow.value * (maxItemHeight.value + gap) - gap}px`
|
|
118
99
|
})
|
|
@@ -120,7 +101,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
120
101
|
createElementVNode("div", {
|
|
121
102
|
ref_key: "gridEl",
|
|
122
103
|
ref: gridEl,
|
|
123
|
-
class: "
|
|
104
|
+
class: "ptw-grid ptw-gap-4 ptw-my-4",
|
|
124
105
|
style: normalizeStyle({
|
|
125
106
|
gridTemplateColumns: `repeat(${columnCount.value}, ${gridColumnWidth.value}px)`
|
|
126
107
|
})
|