@poveste/app 0.15.0 → 0.16.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/main.pcss +18 -44
- package/dist/bundled/App.vue_vue_type_script_setup_true_lang.js +9 -7
- package/dist/bundled/app.css +80 -17
- package/dist/bundled/components/app/AppActions.vue_vue_type_script_setup_true_lang.js +44 -27
- package/dist/bundled/components/app/ShortcutTooltip.js +5 -0
- package/dist/bundled/components/app/ShortcutTooltip.vue_vue_type_script_setup_true_lang.js +27 -0
- package/dist/bundled/components/base/BaseDropdown.js +6 -0
- package/dist/bundled/components/base/BaseDropdown.vue_vue_type_script_setup_true_lang.js +68 -0
- package/dist/bundled/components/base/BaseOverflowMenu.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/bundled/components/base/BaseSelect.js +1 -0
- package/dist/bundled/components/base/BaseSelect.vue_vue_type_script_setup_true_lang.js +80 -51
- package/dist/bundled/components/base/BaseSplitPane.js +1 -1
- package/dist/bundled/components/base/BaseSplitPane.vue_vue_type_script_setup_true_lang.js +65 -4
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue_vue_type_script_setup_true_lang.js +15 -13
- package/dist/bundled/components/panel/ControlsComponentProps.vue_vue_type_script_setup_true_lang.js +9 -6
- package/dist/bundled/components/panel/ControlsComponentState.vue_vue_type_script_setup_true_lang.js +9 -6
- package/dist/bundled/components/panel/StatePresets.vue_vue_type_script_setup_true_lang.js +69 -54
- package/dist/bundled/components/panel/StoryEvent.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/bundled/components/panel/StorySidePanel.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/bundled/components/panel/StorySourceCode.js +1 -1
- package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_script_setup_true_lang.js +21 -16
- package/dist/bundled/components/story/StoryResponsivePreview.js +1 -1
- package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_script_setup_true_lang.js +46 -43
- package/dist/bundled/components/story/StoryVariantGridItem.js +1 -1
- package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_script_setup_true_lang.js +21 -19
- package/dist/bundled/components/story/StoryVariantSingle.js +1 -1
- package/dist/bundled/components/story/StoryVariantSingle.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/bundled/components/story/StoryView.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/bundled/components/toolbar/DevOnlyToolbarOpenInEditor.vue_vue_type_script_setup_true_lang.js +15 -12
- package/dist/bundled/components/toolbar/ToolbarBackground.vue_vue_type_script_setup_true_lang.js +20 -16
- package/dist/bundled/components/toolbar/ToolbarNewTab.vue_vue_type_script_setup_true_lang.js +16 -13
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue_vue_type_script_setup_true_lang.js +35 -24
- package/dist/bundled/components/toolbar/ToolbarTextDirection.vue_vue_type_script_setup_true_lang.js +15 -12
- package/dist/bundled/index.js +0 -13
- package/dist/bundled/sandbox.js +2 -1
- package/dist/bundled/util/icons.generated.js +4 -2
- package/dist/bundled/util/scroll.js +26 -5
- package/dist/bundled/util/state.js +105 -5
- package/dist/style.css +731 -357
- package/package.json +19 -15
- package/src/__tests__/base-select.spec.ts +25 -0
- package/src/__tests__/reset.spec.ts +53 -0
- package/src/__tests__/state-clone.spec.ts +55 -1
- package/src/__tests__/state-types.spec.ts +175 -0
- package/src/app/App.vue +43 -34
- package/src/app/components/app/AppActions.vue +42 -30
- package/src/app/components/app/ShortcutTooltip.vue +29 -0
- package/src/app/components/base/BaseDropdown.vue +142 -0
- package/src/app/components/base/BaseOverflowMenu.vue +10 -5
- package/src/app/components/base/BaseSelect.vue +133 -60
- package/src/app/components/base/BaseSplitPane.vue +73 -2
- package/src/app/components/panel/ControlsComponentPropItem.vue +18 -17
- package/src/app/components/panel/ControlsComponentProps.vue +7 -5
- package/src/app/components/panel/ControlsComponentState.vue +7 -5
- package/src/app/components/panel/StatePresets.vue +82 -76
- package/src/app/components/panel/StoryEvent.vue +10 -9
- package/src/app/components/panel/StorySidePanel.vue +1 -0
- package/src/app/components/panel/StorySourceCode.vue +47 -41
- package/src/app/components/story/StoryResponsivePreview.vue +55 -27
- package/src/app/components/story/StoryVariantGridItem.vue +19 -18
- package/src/app/components/story/StoryVariantSingle.vue +1 -0
- package/src/app/components/story/StoryView.vue +1 -0
- package/src/app/components/toolbar/DevOnlyToolbarOpenInEditor.vue +14 -12
- package/src/app/components/toolbar/ToolbarBackground.vue +22 -23
- package/src/app/components/toolbar/ToolbarNewTab.vue +14 -12
- package/src/app/components/toolbar/ToolbarResponsiveSize.vue +31 -25
- package/src/app/components/toolbar/ToolbarTextDirection.vue +14 -10
- package/src/app/index.ts +0 -17
- package/src/app/sandbox.ts +8 -1
- package/src/app/style/main.pcss +18 -44
- package/src/app/util/icons.generated.ts +2 -2
- package/src/app/util/scroll.ts +47 -9
- package/src/app/util/state.ts +139 -6
- package/dist/app/style/floating.pcss +0 -40
- package/dist/bundled/util/tooltip.js +0 -14
- package/src/app/style/floating.pcss +0 -40
- package/src/app/util/tooltip.ts +0 -13
package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { isDark } from "../../util/dark.js";
|
|
2
2
|
import BaseEmpty_default from "../base/BaseEmpty.js";
|
|
3
3
|
import { getHighlighter } from "../../util/highlighter.js";
|
|
4
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, markRaw, nextTick, normalizeClass, onMounted, openBlock, ref,
|
|
4
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, markRaw, nextTick, normalizeClass, onMounted, openBlock, ref, shallowRef, toDisplayString, unref, watch, watchEffect, withCtx } from "@poveste/vendors/vue";
|
|
5
5
|
import { Icon } from "@poveste/vendors/iconify";
|
|
6
|
+
import { HstCopyIcon, HstTooltip } from "@poveste/controls";
|
|
6
7
|
import { clientSupportPlugins } from "virtual:$poveste-support-plugins-client";
|
|
7
8
|
import { unindent } from "@poveste/shared";
|
|
8
|
-
import { HstCopyIcon } from "@poveste/controls";
|
|
9
9
|
//#region src/app/components/panel/StorySourceCode.vue?vue&type=script&setup=true&lang.ts
|
|
10
10
|
var _hoisted_1 = { class: "poveste-story-source-code bg-gray-50 dark:bg-gray-750 h-full overflow-hidden flex flex-col" };
|
|
11
11
|
var _hoisted_2 = {
|
|
@@ -93,23 +93,28 @@ var StorySourceCode_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
93
93
|
if (scroller.value) scroller.value.scrollTop = lastScroll;
|
|
94
94
|
});
|
|
95
95
|
return (_ctx, _cache) => {
|
|
96
|
-
const _directive_tooltip = resolveDirective("tooltip");
|
|
97
96
|
return openBlock(), createElementBlock("div", _hoisted_1, [!error.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
98
97
|
_cache[2] || (_cache[2] = createElementVNode("div", { class: "text-gray-900 dark:text-gray-100" }, " Source ", -1)),
|
|
99
98
|
_cache[3] || (_cache[3] = createElementVNode("div", { class: "flex-1" }, null, -1)),
|
|
100
|
-
createElementVNode("div", _hoisted_3, [
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
class: normalizeClass(["
|
|
108
|
-
|
|
109
|
-
}, [createVNode(unref(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
99
|
+
createElementVNode("div", _hoisted_3, [createVNode(unref(HstTooltip), { content: !dynamicSourceCode.value ? "Dynamic source code is not available" : displayedSource.value !== "dynamic" ? "Switch to dynamic source" : null }, {
|
|
100
|
+
default: withCtx(() => [createElementVNode("button", {
|
|
101
|
+
class: normalizeClass(["flex items-center gap-1 h-full px-1 bg-gray-500/10 rounded-l transition-all ease-[cubic-bezier(0,1,.6,1)] duration-300 overflow-hidden", [displayedSource.value !== "dynamic" ? "max-w-6 opacity-70" : "max-w-[82px] text-primary-800 dark:text-primary-400", dynamicSourceCode.value ? "cursor-pointer hover:bg-gray-500/30 active:bg-gray-600/50" : displayedSource.value !== "dynamic" && "opacity-50"]]),
|
|
102
|
+
onClick: _cache[0] || (_cache[0] = ($event) => dynamicSourceCode.value && (displayedSource.value = "dynamic"))
|
|
103
|
+
}, [createVNode(unref(Icon), {
|
|
104
|
+
icon: "carbon:flash",
|
|
105
|
+
class: "w-4 h-4 flex-none"
|
|
106
|
+
}), createElementVNode("span", { class: normalizeClass(["transition-opacity duration-300", { "opacity-0": displayedSource.value !== "dynamic" }]) }, " Dynamic ", 2)], 2)]),
|
|
107
|
+
_: 1
|
|
108
|
+
}, 8, ["content"]), createVNode(unref(HstTooltip), { content: !staticSourceCode.value ? "Static source code is not available" : displayedSource.value !== "static" ? "Switch to static source" : null }, {
|
|
109
|
+
default: withCtx(() => [createElementVNode("button", {
|
|
110
|
+
class: normalizeClass(["flex items-center gap-1 h-full px-1 bg-gray-500/10 rounded-r transition-all ease-[cubic-bezier(0,1,.6,1)] duration-300 overflow-hidden", [displayedSource.value !== "static" ? "max-w-6 opacity-70" : "max-w-[63px] text-primary-800 dark:text-primary-400", staticSourceCode.value ? "cursor-pointer hover:bg-gray-500/30 active:bg-gray-600/50" : displayedSource.value !== "static" && "opacity-50"]]),
|
|
111
|
+
onClick: _cache[1] || (_cache[1] = ($event) => staticSourceCode.value && (displayedSource.value = "static"))
|
|
112
|
+
}, [createVNode(unref(Icon), {
|
|
113
|
+
icon: "carbon:document",
|
|
114
|
+
class: "w-4 h-4 flex-none"
|
|
115
|
+
}), createElementVNode("span", { class: normalizeClass(["transition-opacity duration-300", { "opacity-0": displayedSource.value !== "static" }]) }, " Static ", 2)], 2)]),
|
|
116
|
+
_: 1
|
|
117
|
+
}, 8, ["content"])]),
|
|
113
118
|
createVNode(unref(HstCopyIcon), {
|
|
114
119
|
content: displayedSourceCode.value,
|
|
115
120
|
class: "flex-none"
|
|
@@ -2,6 +2,6 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
|
|
|
2
2
|
import StoryResponsivePreview_vue_vue_type_script_setup_true_lang_default from "./StoryResponsivePreview.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/app/components/story/StoryResponsivePreview.vue
|
|
5
|
-
var StoryResponsivePreview_default = /*#__PURE__*/ _plugin_vue_export_helper_default(StoryResponsivePreview_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var StoryResponsivePreview_default = /*#__PURE__*/ _plugin_vue_export_helper_default(StoryResponsivePreview_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-a99edb14"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { StoryResponsivePreview_default as default };
|
package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -2,9 +2,9 @@ import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
|
2
2
|
import CheckerboardPattern_default from "../misc/CheckerboardPattern.js";
|
|
3
3
|
import HatchedPattern_default from "../misc/HatchedPattern.js";
|
|
4
4
|
import { useEventListener } from "@poveste/vendors/vue-use";
|
|
5
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createStaticVNode, createVNode, defineComponent, normalizeClass, onUnmounted, openBlock, ref, renderSlot, unref, useCssVars,
|
|
5
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createStaticVNode, createVNode, defineComponent, normalizeClass, onUnmounted, openBlock, ref, renderSlot, unref, useCssVars, withCtx } from "@poveste/vendors/vue";
|
|
6
6
|
import { Icon } from "@poveste/vendors/iconify";
|
|
7
|
-
import {
|
|
7
|
+
import { HstTooltip } from "@poveste/controls";
|
|
8
8
|
//#region src/app/components/story/StoryResponsivePreview.vue?vue&type=script&setup=true&lang.ts
|
|
9
9
|
var _hoisted_1 = { class: "poveste-story-responsive-preview w-full h-full flex-1 rounded-lg relative overflow-hidden" };
|
|
10
10
|
var _hoisted_2 = {
|
|
@@ -12,7 +12,7 @@ var _hoisted_2 = {
|
|
|
12
12
|
class: "absolute inset-0 w-full h-full bg-gray-100 dark:bg-gray-750 rounded-r-lg border-l-2 border-gray-500/10 dark:border-gray-700/30 overflow-hidden"
|
|
13
13
|
};
|
|
14
14
|
var _hoisted_3 = ["data-testid"];
|
|
15
|
-
var _hoisted_4 = { class: "w-full
|
|
15
|
+
var _hoisted_4 = { class: "w-full flex-1 relative grid" };
|
|
16
16
|
var StoryResponsivePreview_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
17
17
|
__name: "StoryResponsivePreview",
|
|
18
18
|
props: {
|
|
@@ -23,7 +23,7 @@ var StoryResponsivePreview_vue_vue_type_script_setup_true_lang_default = /*@__PU
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
setup(__props) {
|
|
26
|
-
useCssVars((_ctx) => ({ "
|
|
26
|
+
useCssVars((_ctx) => ({ "v4ce71e65": unref(settings).backgroundColor }));
|
|
27
27
|
const props = __props;
|
|
28
28
|
const settings = usePreviewSettingsStore().currentSettings;
|
|
29
29
|
const resizing = ref(false);
|
|
@@ -135,53 +135,56 @@ var StoryResponsivePreview_vue_vue_type_script_setup_true_lang_default = /*@__PU
|
|
|
135
135
|
} : "h-full",
|
|
136
136
|
isResponsiveEnabled.value && finalHeight.value ? "overflow-hidden" : "overflow-auto"
|
|
137
137
|
]]) }, [createElementVNode("div", {
|
|
138
|
-
class: normalizeClass(["rounded-lg min-h-full relative", __props.responsive ? "bind-preview-bg" : ""]),
|
|
138
|
+
class: normalizeClass(["rounded-lg min-h-full relative flex flex-col", __props.responsive ? "bind-preview-bg" : ""]),
|
|
139
139
|
"data-testid": __props.responsive ? "responsive-preview-bg" : void 0
|
|
140
140
|
}, [unref(settings).checkerboard && __props.responsive ? (openBlock(), createBlock(CheckerboardPattern_default, {
|
|
141
141
|
key: 0,
|
|
142
142
|
class: "absolute inset-0 w-full h-full text-gray-500/20"
|
|
143
|
-
})) : createCommentVNode("", true), createElementVNode("div", { class: normalizeClass(["
|
|
143
|
+
})) : createCommentVNode("", true), createElementVNode("div", { class: normalizeClass(["flex-1 relative flex flex-col", __props.responsive ? "p-8" : ""]) }, [createElementVNode("div", _hoisted_4, [_cache[0] || (_cache[0] = createElementVNode("div", { class: "absolute inset-0" }, null, -1)), renderSlot(_ctx.$slots, "default", {
|
|
144
144
|
isResponsiveEnabled: isResponsiveEnabled.value,
|
|
145
145
|
finalWidth: finalWidth.value,
|
|
146
146
|
finalHeight: finalHeight.value,
|
|
147
147
|
resizing: resizing.value
|
|
148
|
-
}, void 0, true)]), isResponsiveEnabled.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_cache[1] || (_cache[1] = createStaticVNode("<div class=\"absolute top-5 left-8 h-2 w-px bg-gray-400/25\" data-v-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
unref(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
},
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
148
|
+
}, void 0, true)]), isResponsiveEnabled.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_cache[1] || (_cache[1] = createStaticVNode("<div class=\"absolute top-5 left-8 h-2 w-px bg-gray-400/25\" data-v-a99edb14></div><div class=\"absolute top-5 right-8 h-2 w-px bg-gray-400/25\" data-v-a99edb14></div><div class=\"absolute bottom-5 left-8 h-2 w-px bg-gray-400/25\" data-v-a99edb14></div><div class=\"absolute bottom-5 right-8 h-2 w-px bg-gray-400/25\" data-v-a99edb14></div><div class=\"absolute left-5 top-8 w-2 h-px bg-gray-400/25\" data-v-a99edb14></div><div class=\"absolute left-5 bottom-8 w-2 h-px bg-gray-400/25\" data-v-a99edb14></div><div class=\"absolute right-5 top-8 w-2 h-px bg-gray-400/25\" data-v-a99edb14></div><div class=\"absolute right-5 bottom-8 w-2 h-px bg-gray-400/25\" data-v-a99edb14></div>", 8))], 64)) : createCommentVNode("", true)], 2)], 10, _hoisted_3), isResponsiveEnabled.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
149
|
+
createVNode(unref(HstTooltip), {
|
|
150
|
+
content: sizeTooltip.value,
|
|
151
|
+
side: "right"
|
|
152
|
+
}, {
|
|
153
|
+
default: withCtx(() => [createElementVNode("div", {
|
|
154
|
+
ref_key: "horizontalDragger",
|
|
155
|
+
ref: horizontalDragger,
|
|
156
|
+
class: "absolute w-4 top-0 bottom-4 right-0 hover:bg-primary-500/30 flex items-center justify-center cursor-ew-resize group hover:text-primary-500"
|
|
157
|
+
}, [createVNode(unref(Icon), {
|
|
158
|
+
icon: "mdi:drag-vertical-variant",
|
|
159
|
+
class: "w-4 h-4 opacity-20 group-hover:opacity-90"
|
|
160
|
+
})], 512)]),
|
|
161
|
+
_: 1
|
|
162
|
+
}, 8, ["content"]),
|
|
163
|
+
createVNode(unref(HstTooltip), {
|
|
164
|
+
content: sizeTooltip.value,
|
|
165
|
+
side: "bottom"
|
|
166
|
+
}, {
|
|
167
|
+
default: withCtx(() => [createElementVNode("div", {
|
|
168
|
+
ref_key: "verticalDragger",
|
|
169
|
+
ref: verticalDragger,
|
|
170
|
+
class: "absolute h-4 left-0 right-4 bottom-0 hover:bg-primary-500/30 flex items-center justify-center cursor-ns-resize group hover:text-primary-500"
|
|
171
|
+
}, [createVNode(unref(Icon), {
|
|
172
|
+
icon: "mdi:drag-horizontal-variant",
|
|
173
|
+
class: "w-4 h-4 opacity-20 group-hover:opacity-90"
|
|
174
|
+
})], 512)]),
|
|
175
|
+
_: 1
|
|
176
|
+
}, 8, ["content"]),
|
|
177
|
+
createVNode(unref(HstTooltip), {
|
|
178
|
+
content: sizeTooltip.value,
|
|
179
|
+
side: "bottom"
|
|
180
|
+
}, {
|
|
181
|
+
default: withCtx(() => [createElementVNode("div", {
|
|
182
|
+
ref_key: "cornerDragger",
|
|
183
|
+
ref: cornerDragger,
|
|
184
|
+
class: "absolute w-4 h-4 right-0 bottom-0 hover:bg-primary-500/30 flex items-center justify-center cursor-nwse-resize group hover:text-primary-500"
|
|
185
|
+
}, null, 512)]),
|
|
186
|
+
_: 1
|
|
187
|
+
}, 8, ["content"])
|
|
185
188
|
], 64)) : createCommentVNode("", true)], 2)], 512)]);
|
|
186
189
|
};
|
|
187
190
|
}
|
|
@@ -2,6 +2,6 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
|
|
|
2
2
|
import StoryVariantGridItem_vue_vue_type_script_setup_true_lang_default from "./StoryVariantGridItem.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/app/components/story/StoryVariantGridItem.vue
|
|
5
|
-
var StoryVariantGridItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(StoryVariantGridItem_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var StoryVariantGridItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(StoryVariantGridItem_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-bfa057e9"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { StoryVariantGridItem_default as default };
|
package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -11,10 +11,10 @@ import { getSourceCode } from "../../util/docs.js";
|
|
|
11
11
|
import CheckerboardPattern_default from "../misc/CheckerboardPattern.js";
|
|
12
12
|
import StoryVariantSinglePreviewRemote_default from "./StoryVariantSinglePreviewRemote.js";
|
|
13
13
|
import { useResizeObserver } from "@poveste/vendors/vue-use";
|
|
14
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, openBlock, ref, resolveComponent,
|
|
14
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, openBlock, ref, resolveComponent, toDisplayString, toRefs, unref, useCssVars, watch, withCtx, withModifiers } from "@poveste/vendors/vue";
|
|
15
15
|
import { Icon } from "@poveste/vendors/iconify";
|
|
16
|
+
import { HstCopyIcon, HstTooltip } from "@poveste/controls";
|
|
16
17
|
import { useRouter } from "@poveste/vendors/vue-router";
|
|
17
|
-
import { HstCopyIcon } from "@poveste/controls";
|
|
18
18
|
//#region src/app/components/story/StoryVariantGridItem.vue?vue&type=script&setup=true&lang.ts
|
|
19
19
|
var _hoisted_1 = { class: "flex-none flex items-center" };
|
|
20
20
|
var _hoisted_2 = { class: "truncate flex-1" };
|
|
@@ -34,8 +34,8 @@ var StoryVariantGridItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE
|
|
|
34
34
|
emits: { resize: (_width, _height) => true },
|
|
35
35
|
setup(__props, { emit: __emit }) {
|
|
36
36
|
useCssVars((_ctx) => ({
|
|
37
|
-
"
|
|
38
|
-
"
|
|
37
|
+
"v1061c03c": unref(variant).iconColor,
|
|
38
|
+
"v2d8b4c49": unref(settings).backgroundColor
|
|
39
39
|
}));
|
|
40
40
|
const props = __props;
|
|
41
41
|
const emit = __emit;
|
|
@@ -76,27 +76,29 @@ var StoryVariantGridItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE
|
|
|
76
76
|
});
|
|
77
77
|
return (_ctx, _cache) => {
|
|
78
78
|
const _component_RouterLink = resolveComponent("RouterLink");
|
|
79
|
-
const _directive_tooltip = resolveDirective("tooltip");
|
|
80
79
|
return openBlock(), createElementBlock("div", {
|
|
81
80
|
ref_key: "el",
|
|
82
81
|
ref: el,
|
|
83
82
|
class: "poveste-story-variant-grid-item cursor-default flex flex-col gap-y-1 group"
|
|
84
|
-
}, [createElementVNode("div", _hoisted_1, [
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}, {
|
|
91
|
-
default: withCtx(() => [createVNode(unref(Icon), {
|
|
92
|
-
icon: unref(variant).icon ?? "carbon:cube",
|
|
93
|
-
class: normalizeClass(["w-4 h-4 opacity-50", {
|
|
94
|
-
"text-gray-500": !unref(isActive) && !unref(variant).iconColor,
|
|
95
|
-
"bind-icon-color": !unref(isActive) && unref(variant).iconColor
|
|
83
|
+
}, [createElementVNode("div", _hoisted_1, [createVNode(unref(HstTooltip), { content: unref(variant).title }, {
|
|
84
|
+
default: withCtx(() => [createVNode(_component_RouterLink, {
|
|
85
|
+
to: unref(targetRoute),
|
|
86
|
+
class: normalizeClass(["rounded w-max px-2 py-0.5 min-w-16 cursor-pointer flex items-center gap-1 flex-shrink", {
|
|
87
|
+
"hover:bg-gray-200 text-gray-500 dark:hover:bg-gray-800": !unref(isActive),
|
|
88
|
+
"bg-primary-200 hover:bg-primary-300 text-primary-800 dark:bg-primary-700 dark:hover:bg-primary-800 dark:text-primary-200": unref(isActive)
|
|
96
89
|
}])
|
|
97
|
-
},
|
|
90
|
+
}, {
|
|
91
|
+
default: withCtx(() => [createVNode(unref(Icon), {
|
|
92
|
+
icon: unref(variant).icon ?? "carbon:cube",
|
|
93
|
+
class: normalizeClass(["w-4 h-4 opacity-50", {
|
|
94
|
+
"text-gray-500": !unref(isActive) && !unref(variant).iconColor,
|
|
95
|
+
"bind-icon-color": !unref(isActive) && unref(variant).iconColor
|
|
96
|
+
}])
|
|
97
|
+
}, null, 8, ["icon", "class"]), createElementVNode("span", _hoisted_2, toDisplayString(unref(variant).title), 1)]),
|
|
98
|
+
_: 1
|
|
99
|
+
}, 8, ["to", "class"])]),
|
|
98
100
|
_: 1
|
|
99
|
-
}, 8, ["
|
|
101
|
+
}, 8, ["content"]), createElementVNode("div", _hoisted_3, [createVNode(unref(HstCopyIcon), { content: () => unref(getSourceCode)(__props.story, unref(variant)) }, null, 8, ["content"]), createVNode(ToolbarNewTab_default, {
|
|
100
102
|
variant: unref(variant),
|
|
101
103
|
story: __props.story
|
|
102
104
|
}, null, 8, ["variant", "story"])])]), createElementVNode("div", {
|
|
@@ -2,6 +2,6 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
|
|
|
2
2
|
import StoryVariantSingle_vue_vue_type_script_setup_true_lang_default from "./StoryVariantSingle.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/app/components/story/StoryVariantSingle.vue
|
|
5
|
-
var StoryVariantSingle_default = /*#__PURE__*/ _plugin_vue_export_helper_default(StoryVariantSingle_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var StoryVariantSingle_default = /*#__PURE__*/ _plugin_vue_export_helper_default(StoryVariantSingle_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-6ba33e62"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { StoryVariantSingle_default as default };
|
package/dist/bundled/components/story/StoryVariantSingle.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -16,7 +16,7 @@ var StoryVariantSingle_vue_vue_type_script_setup_true_lang_default = /*@__PURE__
|
|
|
16
16
|
__name: "StoryVariantSingle",
|
|
17
17
|
emits: { openVariantMenu: () => true },
|
|
18
18
|
setup(__props) {
|
|
19
|
-
useCssVars((_ctx) => ({ "
|
|
19
|
+
useCssVars((_ctx) => ({ "v3bcafcf8": variant.value?.iconColor }));
|
|
20
20
|
const storyStore = useStoryStore();
|
|
21
21
|
const hasSingleVariant = computed(() => storyStore.currentStory?.variants.length === 1);
|
|
22
22
|
const variant = computed(() => storyStore.currentVariant ?? null);
|
|
@@ -24,6 +24,7 @@ var StoryVariantSingle_vue_vue_type_script_setup_true_lang_default = /*@__PURE__
|
|
|
24
24
|
return (_ctx, _cache) => {
|
|
25
25
|
return openBlock(), createBlock(BaseSplitPane_default, {
|
|
26
26
|
"save-id": "story-single-main-split",
|
|
27
|
+
label: "Resize the variant list",
|
|
27
28
|
min: 5,
|
|
28
29
|
max: 40,
|
|
29
30
|
"default-split": 17,
|
|
@@ -72,6 +72,7 @@ var StoryView_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
72
72
|
}, null, 8, ["story"])], 512)) : (openBlock(), createBlock(BaseSplitPane_default, {
|
|
73
73
|
key: 1,
|
|
74
74
|
"save-id": `story-main-${placement.value}`,
|
|
75
|
+
label: "Resize the preview",
|
|
75
76
|
orientation: splitOrientation.value,
|
|
76
77
|
min: 30,
|
|
77
78
|
max: 95,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import TopBarChipItem_default from "../app/TopBarChipItem.js";
|
|
2
2
|
import { openInEditor } from "../../util/open-in-editor.js";
|
|
3
|
-
import { createBlock, createVNode, defineComponent, openBlock,
|
|
3
|
+
import { createBlock, createVNode, defineComponent, openBlock, unref, withCtx } from "@poveste/vendors/vue";
|
|
4
4
|
import { Icon } from "@poveste/vendors/iconify";
|
|
5
|
+
import { HstTooltip } from "@poveste/controls";
|
|
5
6
|
//#region src/app/components/toolbar/DevOnlyToolbarOpenInEditor.vue?vue&type=script&setup=true&lang.ts
|
|
6
7
|
var DevOnlyToolbarOpenInEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
7
8
|
__name: "DevOnlyToolbarOpenInEditor",
|
|
@@ -11,19 +12,21 @@ var DevOnlyToolbarOpenInEditor_vue_vue_type_script_setup_true_lang_default = /*@
|
|
|
11
12
|
},
|
|
12
13
|
setup(__props) {
|
|
13
14
|
return (_ctx, _cache) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
return openBlock(), createBlock(unref(HstTooltip), { content: __props.tooltip }, {
|
|
16
|
+
default: withCtx(() => [createVNode(TopBarChipItem_default, {
|
|
17
|
+
"aria-label": "Open story in editor",
|
|
18
|
+
target: "_blank",
|
|
19
|
+
class: "poveste-toolbar-open-in-editor",
|
|
20
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(openInEditor)(__props.file))
|
|
21
|
+
}, {
|
|
22
|
+
default: withCtx(() => [createVNode(unref(Icon), {
|
|
23
|
+
icon: "carbon:script-reference",
|
|
24
|
+
class: "w-4 h-4"
|
|
25
|
+
})]),
|
|
26
|
+
_: 1
|
|
24
27
|
})]),
|
|
25
28
|
_: 1
|
|
26
|
-
}
|
|
29
|
+
}, 8, ["content"]);
|
|
27
30
|
};
|
|
28
31
|
}
|
|
29
32
|
});
|
package/dist/bundled/components/toolbar/ToolbarBackground.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { povesteConfig } from "../../util/config.js";
|
|
2
2
|
import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
3
3
|
import BaseCheckbox_default from "../base/BaseCheckbox.js";
|
|
4
|
-
import
|
|
4
|
+
import BaseDropdown_default from "../base/BaseDropdown.js";
|
|
5
|
+
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderList, toDisplayString, unref, withCtx } from "@poveste/vendors/vue";
|
|
5
6
|
import { Icon } from "@poveste/vendors/iconify";
|
|
6
7
|
//#region src/app/components/toolbar/ToolbarBackground.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var _hoisted_1 = {
|
|
8
|
+
var _hoisted_1 = {
|
|
9
|
+
class: "flex items-center gap-1 px-2.5 py-1.5 hover:bg-white/50 dark:hover:bg-white/10 hover:text-primary-500 dark:hover:text-primary-400 cursor-pointer text-gray-900 dark:text-gray-100 transition-colors group",
|
|
10
|
+
"aria-label": "Preview appearance"
|
|
11
|
+
};
|
|
8
12
|
var _hoisted_2 = {
|
|
9
13
|
class: "flex flex-col items-stretch",
|
|
10
14
|
"data-testid": "background-popper"
|
|
@@ -44,23 +48,16 @@ var ToolbarBackground_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
44
48
|
const showColorScheme = !povesteConfig.theme.hideColorSchemeSwitch;
|
|
45
49
|
const showDropdown = showColorScheme || !!povesteConfig.backgroundPresets?.length;
|
|
46
50
|
return (_ctx, _cache) => {
|
|
47
|
-
|
|
48
|
-
const _directive_tooltip = resolveDirective("tooltip");
|
|
49
|
-
return unref(showDropdown) ? (openBlock(), createBlock(_component_VDropdown, {
|
|
51
|
+
return unref(showDropdown) ? (openBlock(), createBlock(BaseDropdown_default, {
|
|
50
52
|
key: 0,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
side: "bottom",
|
|
54
|
+
align: "end",
|
|
55
|
+
"align-offset": 6,
|
|
56
|
+
tooltip: "Preview appearance",
|
|
53
57
|
class: "poveste-toolbar-background flex-none",
|
|
54
58
|
"data-testid": "toolbar-background"
|
|
55
59
|
}, {
|
|
56
|
-
|
|
57
|
-
icon: "carbon:color-palette",
|
|
58
|
-
class: "w-4 h-4"
|
|
59
|
-
}), createVNode(unref(Icon), {
|
|
60
|
-
icon: "carbon:chevron-down",
|
|
61
|
-
class: "w-3 h-3 opacity-40 group-hover:opacity-70"
|
|
62
|
-
})])), [[_directive_tooltip, shown ? "" : "Preview appearance"]])]),
|
|
63
|
-
popper: withCtx(({ hide }) => [createElementVNode("div", _hoisted_2, [
|
|
60
|
+
popper: withCtx(({ close }) => [createElementVNode("div", _hoisted_2, [
|
|
64
61
|
showColorScheme ? (openBlock(), createElementBlock("div", _hoisted_3, [(openBlock(), createElementBlock(Fragment, null, renderList(colorSchemeOptions, (option) => {
|
|
65
62
|
return createElementVNode("button", {
|
|
66
63
|
key: option.value,
|
|
@@ -85,7 +82,7 @@ var ToolbarBackground_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
85
82
|
class: normalizeClass(["px-4 py-3 cursor-pointer text-left flex items-baseline gap-4", [unref(settings).backgroundColor === option.color ? "bg-primary-500 hover:bg-primary-600 text-white dark:text-black" : "bg-transparent hover:bg-primary-100 dark:hover:bg-primary-700"]]),
|
|
86
83
|
onClick: ($event) => {
|
|
87
84
|
unref(previewSettings).setBackgroundColor(option.color);
|
|
88
|
-
|
|
85
|
+
close();
|
|
89
86
|
}
|
|
90
87
|
}, [createElementVNode("span", _hoisted_6, toDisplayString(option.label), 1), option.color !== "$checkerboard" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("span", _hoisted_7, toDisplayString(option.color), 1), createElementVNode("div", {
|
|
91
88
|
class: "w-4 h-4 rounded-full border border-black/20 dark:border-white/20 flex items-center justify-center text-xs",
|
|
@@ -96,6 +93,13 @@ var ToolbarBackground_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
96
93
|
}, [option.contrastColor ? (openBlock(), createElementBlock("span", _hoisted_8, "a")) : createCommentVNode("", true)], 4)], 64)) : createCommentVNode("", true)], 10, _hoisted_5);
|
|
97
94
|
}), 128))
|
|
98
95
|
])]),
|
|
96
|
+
default: withCtx(() => [createElementVNode("button", _hoisted_1, [createVNode(unref(Icon), {
|
|
97
|
+
icon: "carbon:color-palette",
|
|
98
|
+
class: "w-4 h-4"
|
|
99
|
+
}), createVNode(unref(Icon), {
|
|
100
|
+
icon: "carbon:chevron-down",
|
|
101
|
+
class: "w-3 h-3 opacity-40 group-hover:opacity-70"
|
|
102
|
+
})])]),
|
|
99
103
|
_: 1
|
|
100
104
|
})) : createCommentVNode("", true);
|
|
101
105
|
};
|
package/dist/bundled/components/toolbar/ToolbarNewTab.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import TopBarChipItem_default from "../app/TopBarChipItem.js";
|
|
2
2
|
import { getSandboxUrl } from "../../util/sandbox.js";
|
|
3
|
-
import { computed, createBlock, createVNode, defineComponent, openBlock,
|
|
3
|
+
import { computed, createBlock, createVNode, defineComponent, openBlock, unref, withCtx } from "@poveste/vendors/vue";
|
|
4
4
|
import { Icon } from "@poveste/vendors/iconify";
|
|
5
|
+
import { HstTooltip } from "@poveste/controls";
|
|
5
6
|
//#region src/app/components/toolbar/ToolbarNewTab.vue?vue&type=script&setup=true&lang.ts
|
|
6
7
|
var ToolbarNewTab_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
7
8
|
__name: "ToolbarNewTab",
|
|
@@ -15,19 +16,21 @@ var ToolbarNewTab_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
15
16
|
return getSandboxUrl(props.story, props.variant);
|
|
16
17
|
});
|
|
17
18
|
return (_ctx, _cache) => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
return openBlock(), createBlock(unref(HstTooltip), { content: "Open variant in new tab" }, {
|
|
20
|
+
default: withCtx(() => [createVNode(TopBarChipItem_default, {
|
|
21
|
+
href: sandboxUrl.value,
|
|
22
|
+
target: "_blank",
|
|
23
|
+
"aria-label": "Open variant in new tab",
|
|
24
|
+
class: "poveste-toolbar-new-tab"
|
|
25
|
+
}, {
|
|
26
|
+
default: withCtx(() => [createVNode(unref(Icon), {
|
|
27
|
+
icon: "carbon:launch",
|
|
28
|
+
class: "w-4 h-4"
|
|
29
|
+
})]),
|
|
30
|
+
_: 1
|
|
31
|
+
}, 8, ["href"])]),
|
|
29
32
|
_: 1
|
|
30
|
-
}
|
|
33
|
+
});
|
|
31
34
|
};
|
|
32
35
|
}
|
|
33
36
|
});
|
package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { povesteConfig } from "../../util/config.js";
|
|
2
2
|
import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
3
3
|
import BaseCheckbox_default from "../base/BaseCheckbox.js";
|
|
4
|
-
import
|
|
4
|
+
import BaseDropdown_default from "../base/BaseDropdown.js";
|
|
5
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, isRef, normalizeClass, openBlock, renderList, toDisplayString, unref, vModelText, withCtx, withDirectives } from "@poveste/vendors/vue";
|
|
5
6
|
import { Icon } from "@poveste/vendors/iconify";
|
|
7
|
+
import { HstTooltip } from "@poveste/controls";
|
|
6
8
|
//#region src/app/components/toolbar/ToolbarResponsiveSize.vue?vue&type=script&setup=true&lang.ts
|
|
7
9
|
var _hoisted_1 = { class: "flex flex-col items-stretch" };
|
|
8
10
|
var _hoisted_2 = { class: "flex items-center gap-2 px-4 py-3" };
|
|
@@ -29,15 +31,15 @@ var ToolbarResponsiveSize_vue_vue_type_script_setup_true_lang_default = /*@__PUR
|
|
|
29
31
|
const responsiveWidth = autoWhenEmpty("responsiveWidth");
|
|
30
32
|
const responsiveHeight = autoWhenEmpty("responsiveHeight");
|
|
31
33
|
return (_ctx, _cache) => {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
skidding: 6,
|
|
34
|
+
return openBlock(), createBlock(BaseDropdown_default, {
|
|
35
|
+
side: "bottom",
|
|
36
|
+
align: "end",
|
|
37
|
+
"align-offset": 6,
|
|
37
38
|
disabled: !unref(povesteConfig).responsivePresets?.length,
|
|
39
|
+
tooltip: "Responsive sizes",
|
|
38
40
|
class: "poveste-toolbar-responsive-size flex-none"
|
|
39
41
|
}, {
|
|
40
|
-
popper: withCtx(({
|
|
42
|
+
popper: withCtx(({ close }) => [createElementVNode("div", _hoisted_1, [
|
|
41
43
|
createVNode(BaseCheckbox_default, {
|
|
42
44
|
modelValue: unref(settings).rotate,
|
|
43
45
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(settings).rotate = $event)
|
|
@@ -46,21 +48,27 @@ var ToolbarResponsiveSize_vue_vue_type_script_setup_true_lang_default = /*@__PUR
|
|
|
46
48
|
_: 1
|
|
47
49
|
}, 8, ["modelValue"]),
|
|
48
50
|
createElementVNode("div", _hoisted_2, [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
createVNode(unref(HstTooltip), { content: "Responsive width (px)" }, {
|
|
52
|
+
default: withCtx(() => [withDirectives(createElementVNode("input", {
|
|
53
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(responsiveWidth) ? responsiveWidth.value = $event : null),
|
|
54
|
+
type: "number",
|
|
55
|
+
class: "bg-transparent border border-gray-200 dark:border-gray-850 rounded w-20 opacity-50 focus:opacity-100 flex-1 min-w-0",
|
|
56
|
+
step: "16",
|
|
57
|
+
placeholder: "Auto"
|
|
58
|
+
}, null, 512), [[vModelText, unref(responsiveWidth)]])]),
|
|
59
|
+
_: 1
|
|
60
|
+
}),
|
|
56
61
|
_cache[4] || (_cache[4] = createElementVNode("span", { class: "opacity-50" }, "×", -1)),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
createVNode(unref(HstTooltip), { content: "Responsive height (px)" }, {
|
|
63
|
+
default: withCtx(() => [withDirectives(createElementVNode("input", {
|
|
64
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(responsiveHeight) ? responsiveHeight.value = $event : null),
|
|
65
|
+
type: "number",
|
|
66
|
+
class: "bg-transparent border border-gray-200 dark:border-gray-850 rounded w-20 opacity-50 focus:opacity-100 flex-1 min-w-0",
|
|
67
|
+
step: "16",
|
|
68
|
+
placeholder: "Auto"
|
|
69
|
+
}, null, 512), [[vModelText, unref(responsiveHeight)]])]),
|
|
70
|
+
_: 1
|
|
71
|
+
})
|
|
64
72
|
]),
|
|
65
73
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(povesteConfig).responsivePresets, (preset, index) => {
|
|
66
74
|
return openBlock(), createElementBlock("button", {
|
|
@@ -69,7 +77,7 @@ var ToolbarResponsiveSize_vue_vue_type_script_setup_true_lang_default = /*@__PUR
|
|
|
69
77
|
onClick: ($event) => {
|
|
70
78
|
unref(settings).responsiveWidth = preset.width;
|
|
71
79
|
unref(settings).responsiveHeight = preset.height ?? null;
|
|
72
|
-
|
|
80
|
+
close();
|
|
73
81
|
}
|
|
74
82
|
}, [createTextVNode(toDisplayString(preset.label) + " ", 1), createElementVNode("span", _hoisted_4, [
|
|
75
83
|
preset.width ? (openBlock(), createElementBlock("span", _hoisted_5, [createTextVNode(toDisplayString(preset.width), 1), !preset.height ? (openBlock(), createElementBlock("span", _hoisted_6, "px")) : createCommentVNode("", true)])) : createCommentVNode("", true),
|
|
@@ -78,13 +86,16 @@ var ToolbarResponsiveSize_vue_vue_type_script_setup_true_lang_default = /*@__PUR
|
|
|
78
86
|
])], 10, _hoisted_3);
|
|
79
87
|
}), 128))
|
|
80
88
|
])]),
|
|
81
|
-
default: withCtx(() => [
|
|
89
|
+
default: withCtx(() => [createElementVNode("button", {
|
|
90
|
+
class: normalizeClass(["flex items-center gap-1 px-2.5 py-1.5 text-gray-900 dark:text-gray-100 transition-colors group", { "hover:bg-white/50 dark:hover:bg-white/10 hover:text-primary-500 dark:hover:text-primary-400 cursor-pointer": unref(povesteConfig).responsivePresets?.length }]),
|
|
91
|
+
"aria-label": "Responsive sizes"
|
|
92
|
+
}, [createVNode(unref(Icon), {
|
|
82
93
|
icon: "carbon:devices",
|
|
83
94
|
class: "w-4 h-4"
|
|
84
95
|
}), createVNode(unref(Icon), {
|
|
85
96
|
icon: "carbon:chevron-down",
|
|
86
97
|
class: "w-3 h-3 opacity-40 group-hover:opacity-70"
|
|
87
|
-
})], 2)
|
|
98
|
+
})], 2)]),
|
|
88
99
|
_: 1
|
|
89
100
|
}, 8, ["disabled"]);
|
|
90
101
|
};
|