@poveste/app 0.1.0 → 0.1.2
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/assets/poveste-text-dark.svg +15 -0
- package/dist/app/assets/poveste-text.svg +15 -0
- package/dist/app/assets/poveste.svg +14 -0
- package/dist/app/style/main.pcss +3 -3
- package/dist/app/style/sandbox.css +1 -1
- package/dist/app/style/transitions.pcss +4 -4
- package/dist/bundled/App.vue2.js +9 -9
- package/dist/bundled/app.css +54 -54
- package/dist/bundled/assets/poveste-text-dark.svg.js +4 -0
- package/dist/bundled/assets/poveste-text.svg.js +4 -0
- package/dist/bundled/assets/poveste.svg.js +4 -0
- package/dist/bundled/components/HomeView.vue2.js +4 -4
- package/dist/bundled/components/app/AppHeader.vue2.js +4 -4
- package/dist/bundled/components/app/AppLogo.vue2.js +7 -7
- package/dist/bundled/components/app/Breadcrumb.vue.js +1 -1
- package/dist/bundled/components/app/Breadcrumb.vue2.js +2 -2
- package/dist/bundled/components/app/InitialLoading.vue2.js +3 -3
- package/dist/bundled/components/app/MobileOverlay.vue2.js +2 -2
- package/dist/bundled/components/base/BaseButton.vue2.js +1 -1
- package/dist/bundled/components/base/BaseCheckbox.vue2.js +1 -1
- package/dist/bundled/components/base/BaseEmpty.vue.js +2 -2
- package/dist/bundled/components/base/BaseIcon.vue.js +1 -1
- package/dist/bundled/components/base/BaseIcon.vue2.js +2 -2
- package/dist/bundled/components/base/BaseKeyboardShortcut.vue2.js +1 -1
- package/dist/bundled/components/base/BaseListItemLink.vue.js +1 -1
- package/dist/bundled/components/base/BaseOverflowMenu.vue2.js +1 -1
- package/dist/bundled/components/base/BaseOverflowTab.vue.js +2 -2
- package/dist/bundled/components/base/BaseSelect.vue2.js +1 -1
- package/dist/bundled/components/base/BaseSplitPane.vue.js +1 -1
- package/dist/bundled/components/base/BaseSplitPane.vue2.js +2 -2
- package/dist/bundled/components/base/BaseTab.vue.js +2 -2
- package/dist/bundled/components/base/BaseTag.vue.js +1 -1
- package/dist/bundled/components/command/CommandPrompts.vue2.js +1 -1
- package/dist/bundled/components/command/CommandPromptsModal.vue2.js +1 -1
- package/dist/bundled/components/command/PromptSelect.vue2.js +1 -1
- package/dist/bundled/components/command/PromptText.vue2.js +1 -1
- package/dist/bundled/components/misc/HatchedPattern.vue.js +2 -2
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue2.js +1 -1
- package/dist/bundled/components/panel/ControlsComponentProps.vue2.js +1 -1
- package/dist/bundled/components/panel/ControlsComponentState.vue2.js +1 -1
- package/dist/bundled/components/panel/ControlsComponentStateItem.vue2.js +1 -1
- package/dist/bundled/components/panel/PaneTabs.vue2.js +1 -1
- package/dist/bundled/components/panel/StatePresets.vue2.js +3 -3
- package/dist/bundled/components/panel/StoryControls.vue2.js +2 -2
- package/dist/bundled/components/panel/StoryDocs.vue2.js +6 -6
- package/dist/bundled/components/panel/StoryEvent.vue2.js +1 -1
- package/dist/bundled/components/panel/StoryEvents.vue2.js +1 -1
- package/dist/bundled/components/panel/StorySidePanel.vue2.js +3 -3
- package/dist/bundled/components/panel/StorySourceCode.vue.js +1 -1
- package/dist/bundled/components/panel/StorySourceCode.vue2.js +4 -4
- package/dist/bundled/components/search/SearchItem.vue.js +1 -1
- package/dist/bundled/components/search/SearchItem.vue2.js +2 -2
- package/dist/bundled/components/search/SearchLoading.vue2.js +1 -1
- package/dist/bundled/components/search/SearchModal.vue2.js +1 -1
- package/dist/bundled/components/search/SearchPane.vue2.js +3 -3
- package/dist/bundled/components/search/search-docs-data.js +1 -1
- package/dist/bundled/components/search/search-title-data.js +1 -1
- package/dist/bundled/components/story/GenericMountStory.vue2.js +2 -2
- package/dist/bundled/components/story/GenericRenderStory.vue2.js +2 -2
- package/dist/bundled/components/story/StoryResponsivePreview.vue.js +1 -1
- package/dist/bundled/components/story/StoryResponsivePreview.vue2.js +3 -3
- package/dist/bundled/components/story/StoryVariantGrid.vue2.js +2 -2
- package/dist/bundled/components/story/StoryVariantGridItem.vue.js +1 -1
- package/dist/bundled/components/story/StoryVariantGridItem.vue2.js +8 -6
- package/dist/bundled/components/story/StoryVariantListItem.vue.js +1 -1
- package/dist/bundled/components/story/StoryVariantListItem.vue2.js +2 -2
- package/dist/bundled/components/story/StoryVariantSingle.vue.js +1 -1
- package/dist/bundled/components/story/StoryVariantSingle.vue2.js +3 -3
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue2.js +7 -5
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue2.js +1 -1
- package/dist/bundled/components/story/StoryVariantSingleView.vue2.js +2 -2
- package/dist/bundled/components/story/StoryView.vue2.js +2 -2
- 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 +1 -1
- package/dist/bundled/components/toolbar/ToolbarBackground.vue.js +1 -1
- package/dist/bundled/components/toolbar/ToolbarBackground.vue2.js +6 -6
- package/dist/bundled/components/toolbar/ToolbarNewTab.vue2.js +1 -1
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue2.js +5 -5
- package/dist/bundled/components/toolbar/ToolbarTextDirection.vue2.js +1 -1
- package/dist/bundled/components/toolbar/ToolbarTitle.vue2.js +1 -1
- package/dist/bundled/components/tree/StoryGroup.vue2.js +1 -1
- 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 +4 -4
- package/dist/bundled/components/tree/StoryListItem.vue.js +1 -1
- package/dist/bundled/components/tree/StoryListItem.vue2.js +3 -3
- package/dist/bundled/index.js +2 -2
- package/dist/bundled/plugin.js +2 -2
- package/dist/bundled/router.js +2 -2
- package/dist/bundled/sandbox.js +6 -6
- package/dist/bundled/stores/folder.js +1 -1
- package/dist/bundled/stores/preview-settings.js +1 -1
- package/dist/bundled/util/commands.js +2 -2
- package/dist/bundled/util/config.js +3 -3
- package/dist/bundled/util/const.js +4 -4
- package/dist/bundled/util/dark.js +4 -4
- package/dist/bundled/util/docs.js +1 -1
- package/dist/bundled/util/events.js +1 -1
- package/dist/bundled/util/preview-settings.js +4 -3
- package/dist/style.css +348 -121
- package/package.json +8 -4
- package/src/app/App.vue +9 -9
- package/src/app/assets/poveste-text-dark.svg +15 -0
- package/src/app/assets/poveste-text.svg +15 -0
- package/src/app/assets/poveste.svg +14 -0
- package/src/app/components/HomeView.vue +4 -4
- package/src/app/components/app/AppHeader.vue +4 -4
- package/src/app/components/app/AppLogo.vue +7 -7
- package/src/app/components/app/Breadcrumb.vue +1 -1
- package/src/app/components/app/InitialLoading.vue +3 -3
- package/src/app/components/app/MobileOverlay.vue +2 -2
- package/src/app/components/base/BaseButton.vue +1 -1
- package/src/app/components/base/BaseCheckbox.vue +1 -1
- package/src/app/components/base/BaseCopyIcon.vue +1 -1
- package/src/app/components/base/BaseEmpty.vue +1 -1
- package/src/app/components/base/BaseIcon.vue +2 -2
- package/src/app/components/base/BaseKeyboardShortcut.vue +1 -1
- package/src/app/components/base/BaseListItemLink.vue +1 -1
- package/src/app/components/base/BaseOverflowMenu.vue +1 -1
- package/src/app/components/base/BaseOverflowTab.vue +2 -2
- package/src/app/components/base/BaseSelect.vue +1 -1
- package/src/app/components/base/BaseSplitPane.vue +2 -2
- package/src/app/components/base/BaseTab.vue +2 -2
- package/src/app/components/base/BaseTag.vue +1 -1
- package/src/app/components/command/CommandPrompts.vue +1 -1
- package/src/app/components/command/CommandPromptsModal.vue +1 -1
- package/src/app/components/command/PromptSelect.vue +1 -1
- package/src/app/components/command/PromptText.vue +1 -1
- package/src/app/components/misc/HatchedPattern.vue +2 -2
- package/src/app/components/panel/ControlsComponentPropItem.vue +1 -1
- package/src/app/components/panel/ControlsComponentProps.vue +1 -1
- package/src/app/components/panel/ControlsComponentState.vue +1 -1
- package/src/app/components/panel/ControlsComponentStateItem.vue +1 -1
- package/src/app/components/panel/PaneTabs.vue +1 -1
- package/src/app/components/panel/StatePresets.vue +3 -3
- package/src/app/components/panel/StoryControls.vue +2 -2
- package/src/app/components/panel/StoryDocs.vue +6 -6
- package/src/app/components/panel/StoryEvent.vue +1 -1
- package/src/app/components/panel/StoryEvents.vue +1 -1
- package/src/app/components/panel/StorySidePanel.vue +3 -3
- package/src/app/components/panel/StorySourceCode.vue +5 -5
- package/src/app/components/search/SearchItem.vue +1 -1
- package/src/app/components/search/SearchLoading.vue +1 -1
- package/src/app/components/search/SearchModal.vue +1 -1
- package/src/app/components/search/SearchPane.vue +3 -3
- package/src/app/components/search/search-docs-data.ts +1 -1
- package/src/app/components/search/search-title-data.ts +1 -1
- package/src/app/components/story/GenericMountStory.vue +2 -2
- package/src/app/components/story/GenericRenderStory.vue +2 -2
- package/src/app/components/story/StoryResponsivePreview.vue +1 -1
- package/src/app/components/story/StoryVariantGrid.vue +2 -2
- package/src/app/components/story/StoryVariantGridItem.vue +6 -4
- package/src/app/components/story/StoryVariantListItem.vue +1 -1
- package/src/app/components/story/StoryVariantSingle.vue +2 -2
- package/src/app/components/story/StoryVariantSinglePreviewNative.vue +7 -5
- package/src/app/components/story/StoryVariantSinglePreviewRemote.vue +1 -1
- package/src/app/components/story/StoryVariantSingleView.vue +2 -2
- package/src/app/components/story/StoryView.vue +2 -2
- package/src/app/components/story/StoryViewer.vue +1 -1
- package/src/app/components/toolbar/DevOnlyToolbarOpenInEditor.vue +1 -1
- package/src/app/components/toolbar/ToolbarBackground.vue +4 -4
- package/src/app/components/toolbar/ToolbarNewTab.vue +1 -1
- package/src/app/components/toolbar/ToolbarResponsiveSize.vue +5 -5
- package/src/app/components/toolbar/ToolbarTextDirection.vue +1 -1
- package/src/app/components/toolbar/ToolbarTitle.vue +1 -1
- package/src/app/components/tree/StoryGroup.vue +1 -1
- package/src/app/components/tree/StoryList.vue +1 -1
- package/src/app/components/tree/StoryListFolder.vue +3 -3
- package/src/app/components/tree/StoryListItem.vue +1 -1
- package/src/app/index.ts +2 -2
- package/src/app/plugin.ts +2 -2
- package/src/app/router.ts +2 -2
- package/src/app/sandbox.ts +6 -6
- package/src/app/stores/folder.ts +1 -1
- package/src/app/stores/preview-settings.ts +1 -1
- package/src/app/style/main.pcss +3 -3
- package/src/app/style/sandbox.css +1 -1
- package/src/app/style/transitions.pcss +4 -4
- package/src/app/types.ts +2 -2
- package/src/app/util/commands.ts +2 -2
- package/src/app/util/config.ts +2 -2
- package/src/app/util/const.ts +4 -4
- package/src/app/util/dark.ts +4 -4
- package/src/app/util/docs.ts +1 -1
- package/src/app/util/events.ts +1 -1
- package/src/app/util/preview-settings.ts +5 -3
- package/src/virtual.d.ts +1 -1
- package/dist/app/assets/histoire-text-dark.svg +0 -89
- package/dist/app/assets/histoire-text.svg +0 -89
- package/dist/app/assets/histoire.svg +0 -51
- package/dist/bundled/assets/histoire-text-dark.svg.js +0 -4
- package/dist/bundled/assets/histoire-text.svg.js +0 -4
- package/dist/bundled/assets/histoire.svg.js +0 -4
- package/postcss-scope-wrapper.cjs +0 -35
- package/postcss.config.cjs +0 -9
- package/scripts/copy.mjs +0 -12
- package/scripts/watchAndCopy.mjs +0 -15
- package/src/app/assets/histoire-text-dark.svg +0 -89
- package/src/app/assets/histoire-text.svg +0 -89
- package/src/app/assets/histoire.svg +0 -51
- package/tailwind.config.cjs +0 -137
- package/tsconfig.json +0 -53
- package/vite.config.ts +0 -88
|
@@ -4,7 +4,7 @@ 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 {
|
|
7
|
+
import { povesteConfig } from "../../util/config.js";
|
|
8
8
|
import { isDark } from "../../util/dark.js";
|
|
9
9
|
import { getSourceCode } from "../../util/docs.js";
|
|
10
10
|
import { getContrastColor } from "../../util/preview-settings.js";
|
|
@@ -36,8 +36,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
36
36
|
},
|
|
37
37
|
setup(__props, { emit: __emit }) {
|
|
38
38
|
useCssVars((_ctx) => ({
|
|
39
|
-
"
|
|
40
|
-
"
|
|
39
|
+
"v70ef7b9c": unref(variant).iconColor,
|
|
40
|
+
"v960da962": unref(settings).backgroundColor
|
|
41
41
|
}));
|
|
42
42
|
const props = __props;
|
|
43
43
|
const emit = __emit;
|
|
@@ -67,14 +67,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
67
67
|
});
|
|
68
68
|
const settings = usePreviewSettingsStore().currentSettings;
|
|
69
69
|
const contrastColor = computed(() => getContrastColor(settings));
|
|
70
|
-
const autoApplyContrastColor = computed(() => !!
|
|
70
|
+
const autoApplyContrastColor = computed(() => !!povesteConfig.autoApplyContrastColor);
|
|
71
71
|
return (_ctx, _cache) => {
|
|
72
72
|
const _component_RouterLink = resolveComponent("RouterLink");
|
|
73
73
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
74
74
|
return openBlock(), createElementBlock("div", {
|
|
75
75
|
ref_key: "el",
|
|
76
76
|
ref: el,
|
|
77
|
-
class: "
|
|
77
|
+
class: "poveste-story-variant-grid-item htw-cursor-default htw-flex htw-flex-col htw-gap-y-1 htw-group"
|
|
78
78
|
}, [
|
|
79
79
|
createElementVNode("div", _hoisted_1, [
|
|
80
80
|
withDirectives((openBlock(), createBlock(_component_RouterLink, {
|
|
@@ -128,6 +128,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
128
128
|
createElementVNode("div", {
|
|
129
129
|
class: "htw-relative htw-h-full",
|
|
130
130
|
style: normalizeStyle({
|
|
131
|
+
"--poveste-contrast-color": contrastColor.value,
|
|
132
|
+
// Deprecated alias — keep so stories referencing `var(--histoire-contrast-color)` still work.
|
|
131
133
|
"--histoire-contrast-color": contrastColor.value,
|
|
132
134
|
"color": autoApplyContrastColor.value ? contrastColor.value : void 0
|
|
133
135
|
})
|
|
@@ -138,7 +140,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
138
140
|
story: __props.story,
|
|
139
141
|
dir: unref(settings).textDirection,
|
|
140
142
|
class: normalizeClass({
|
|
141
|
-
[unref(
|
|
143
|
+
[unref(povesteConfig).theme.darkClass]: unref(isDark)
|
|
142
144
|
}),
|
|
143
145
|
onReady
|
|
144
146
|
}, 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-e7e8e2de"]]);
|
|
6
6
|
export {
|
|
7
7
|
StoryVariantListItem as default
|
|
8
8
|
};
|
|
@@ -15,7 +15,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15
15
|
},
|
|
16
16
|
setup(__props) {
|
|
17
17
|
useCssVars((_ctx) => ({
|
|
18
|
-
"
|
|
18
|
+
"v6ef859d8": unref(variant).iconColor
|
|
19
19
|
}));
|
|
20
20
|
const props = __props;
|
|
21
21
|
const { variant } = toRefs(props);
|
|
@@ -26,7 +26,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
26
|
return openBlock(), createElementBlock("div", {
|
|
27
27
|
ref_key: "el",
|
|
28
28
|
ref: el,
|
|
29
|
-
class: "
|
|
29
|
+
class: "poveste-story-variant-list-item",
|
|
30
30
|
"data-test-id": "story-variant-list-item"
|
|
31
31
|
}, [
|
|
32
32
|
createVNode(BaseListItemLink, {
|
|
@@ -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-b675426a"]]);
|
|
6
6
|
export {
|
|
7
7
|
StoryVariantSingle as default
|
|
8
8
|
};
|
|
@@ -9,7 +9,7 @@ import _sfc_main$1 from "./StoryVariantSingleView.vue2.js";
|
|
|
9
9
|
"use strict";
|
|
10
10
|
const _hoisted_1 = {
|
|
11
11
|
key: 0,
|
|
12
|
-
class: "
|
|
12
|
+
class: "poveste-story-variant-single htw-p-2 htw-h-full __poveste-pane-shadow-from-right"
|
|
13
13
|
};
|
|
14
14
|
const _hoisted_2 = {
|
|
15
15
|
key: 0,
|
|
@@ -22,7 +22,7 @@ const _hoisted_3 = {
|
|
|
22
22
|
const _hoisted_4 = { class: "htw-h-full htw-overflow-y-auto" };
|
|
23
23
|
const _hoisted_5 = {
|
|
24
24
|
key: 0,
|
|
25
|
-
class: "htw-p-2 htw-h-full
|
|
25
|
+
class: "htw-p-2 htw-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
|
+
"v5162df32": variant.value?.iconColor
|
|
35
35
|
}));
|
|
36
36
|
const storyStore = useStoryStore();
|
|
37
37
|
const hasSingleVariant = computed(() => storyStore.currentStory?.variants.length === 1);
|
|
@@ -1,6 +1,6 @@
|
|
|
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 {
|
|
3
|
+
import { povesteConfig } from "../../util/config.js";
|
|
4
4
|
import { isDark } from "../../util/dark.js";
|
|
5
5
|
import { getContrastColor } from "../../util/preview-settings.js";
|
|
6
6
|
import "./GenericRenderStory.vue.js";
|
|
@@ -25,10 +25,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
25
|
}
|
|
26
26
|
const settings = usePreviewSettingsStore().currentSettings;
|
|
27
27
|
const contrastColor = computed(() => getContrastColor(settings));
|
|
28
|
-
const autoApplyContrastColor = computed(() => !!
|
|
28
|
+
const autoApplyContrastColor = computed(() => !!povesteConfig.autoApplyContrastColor);
|
|
29
29
|
return (_ctx, _cache) => {
|
|
30
30
|
return openBlock(), createBlock(StoryResponsivePreview, {
|
|
31
|
-
class: "
|
|
31
|
+
class: "poveste-story-variant-single-preview-native",
|
|
32
32
|
variant: __props.variant
|
|
33
33
|
}, {
|
|
34
34
|
default: withCtx(({ isResponsiveEnabled, finalWidth, finalHeight }) => [
|
|
@@ -39,6 +39,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
39
39
|
height: finalHeight ? `${finalHeight}px` : "100%"
|
|
40
40
|
} : { width: "100%", height: "100%" },
|
|
41
41
|
{
|
|
42
|
+
"--poveste-contrast-color": contrastColor.value,
|
|
43
|
+
// Deprecated alias — keep so stories referencing `var(--histoire-contrast-color)` still work.
|
|
42
44
|
"--histoire-contrast-color": contrastColor.value,
|
|
43
45
|
"color": autoApplyContrastColor.value ? contrastColor.value : void 0
|
|
44
46
|
}
|
|
@@ -51,9 +53,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
51
53
|
variant: __props.variant,
|
|
52
54
|
story: __props.story,
|
|
53
55
|
class: normalizeClass(["htw-h-full", {
|
|
54
|
-
[unref(
|
|
56
|
+
[unref(povesteConfig).sandboxDarkClass]: unref(isDark),
|
|
55
57
|
// @TODO remove
|
|
56
|
-
[unref(
|
|
58
|
+
[unref(povesteConfig).theme.darkClass]: unref(isDark)
|
|
57
59
|
}]),
|
|
58
60
|
dir: unref(settings).textDirection,
|
|
59
61
|
onReady
|
|
@@ -98,7 +98,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
98
98
|
}
|
|
99
99
|
return (_ctx, _cache) => {
|
|
100
100
|
return openBlock(), createBlock(StoryResponsivePreview, {
|
|
101
|
-
class: "
|
|
101
|
+
class: "poveste-story-variant-single-preview-remote",
|
|
102
102
|
variant: __props.variant
|
|
103
103
|
}, {
|
|
104
104
|
default: withCtx(({ isResponsiveEnabled, finalWidth, finalHeight, resizing }) => [
|
|
@@ -17,7 +17,7 @@ import _sfc_main$6 from "./StoryVariantSinglePreviewNative.vue2.js";
|
|
|
17
17
|
import _sfc_main$7 from "./StoryVariantSinglePreviewRemote.vue2.js";
|
|
18
18
|
"use strict";
|
|
19
19
|
const _hoisted_1 = {
|
|
20
|
-
class: "
|
|
20
|
+
class: "poveste-story-variant-single-view htw-h-full htw-flex htw-flex-col",
|
|
21
21
|
"data-test-id": "story-variant-single-view"
|
|
22
22
|
};
|
|
23
23
|
const _hoisted_2 = {
|
|
@@ -42,7 +42,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
variant: __props.variant,
|
|
43
43
|
story: __props.story
|
|
44
44
|
}, null, 8, ["variant", "story"]),
|
|
45
|
-
_ctx.
|
|
45
|
+
_ctx.__POVESTE_DEV__ ? (openBlock(), createBlock(_sfc_main$5, {
|
|
46
46
|
key: 1,
|
|
47
47
|
file: __props.story.file?.filePath,
|
|
48
48
|
tooltip: "Edit story in editor"
|
|
@@ -13,7 +13,7 @@ import _sfc_main$2 from "../panel/StorySidePanel.vue2.js";
|
|
|
13
13
|
"use strict";
|
|
14
14
|
const _hoisted_1 = {
|
|
15
15
|
key: 1,
|
|
16
|
-
class: "
|
|
16
|
+
class: "poveste-story-view poveste-with-story htw-h-full"
|
|
17
17
|
};
|
|
18
18
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
19
19
|
__name: "StoryView",
|
|
@@ -57,7 +57,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
57
57
|
return (_ctx, _cache) => {
|
|
58
58
|
return !unref(storyStore).currentStory ? (openBlock(), createBlock(BaseEmpty, {
|
|
59
59
|
key: 0,
|
|
60
|
-
class: "
|
|
60
|
+
class: "poveste-story-view poveste-no-story"
|
|
61
61
|
}, {
|
|
62
62
|
default: withCtx(() => [
|
|
63
63
|
createVNode(unref(Icon), {
|
|
@@ -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-1d298079"]]);
|
|
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: "
|
|
10
|
+
const _hoisted_1 = { class: "poveste-story-viewer htw-bg-gray-50 htw-h-full dark:htw-bg-gray-750" };
|
|
11
11
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
12
|
__name: "StoryViewer",
|
|
13
13
|
setup(__props) {
|
|
14
14
|
useCssVars((_ctx) => ({
|
|
15
|
-
"
|
|
15
|
+
"v4009a800": variant.value?.iconColor
|
|
16
16
|
}));
|
|
17
17
|
const storyStore = useStoryStore();
|
|
18
18
|
const variant = computed(() => storyStore.currentVariant);
|
|
@@ -13,7 +13,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13
13
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
14
14
|
return withDirectives((openBlock(), createElementBlock("a", {
|
|
15
15
|
target: "_blank",
|
|
16
|
-
class: "
|
|
16
|
+
class: "poveste-toolbar-open-in-editor htw-flex htw-items-center htw-gap-1 htw-h-full htw-px-2 hover:htw-text-primary-500 htw-opacity-50 hover:htw-opacity-100 dark:hover:htw-text-primary-400 htw-text-gray-900 dark:htw-text-gray-100",
|
|
17
17
|
onClick: _cache[0] || (_cache[0] = ($event) => unref(openInEditor)(__props.file))
|
|
18
18
|
}, [
|
|
19
19
|
createVNode(unref(Icon), {
|
|
@@ -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-26d08825"]]);
|
|
6
6
|
export {
|
|
7
7
|
ToolbarBackground as default
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, useCssVars, computed, unref, resolveComponent, resolveDirective, createBlock, createCommentVNode, openBlock, withCtx, withDirectives, createElementBlock, createElementVNode, createVNode, createTextVNode, Fragment, renderList, normalizeClass, toDisplayString, normalizeStyle } from "@poveste/vendors/vue";
|
|
2
2
|
import { Icon } from "@poveste/vendors/iconify";
|
|
3
3
|
import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
4
|
-
import {
|
|
4
|
+
import { povesteConfig } from "../../util/config.js";
|
|
5
5
|
import { getContrastColor } from "../../util/preview-settings.js";
|
|
6
6
|
import "../base/BaseCheckbox.vue.js";
|
|
7
7
|
import _sfc_main$1 from "../base/BaseCheckbox.vue2.js";
|
|
@@ -21,19 +21,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
__name: "ToolbarBackground",
|
|
22
22
|
setup(__props) {
|
|
23
23
|
useCssVars((_ctx) => ({
|
|
24
|
-
"
|
|
25
|
-
"
|
|
24
|
+
"v57972cd3": unref(settings).backgroundColor,
|
|
25
|
+
"v07febf58": contrastColor.value
|
|
26
26
|
}));
|
|
27
27
|
const settings = usePreviewSettingsStore().currentSettings;
|
|
28
28
|
const contrastColor = computed(() => getContrastColor(settings));
|
|
29
29
|
return (_ctx, _cache) => {
|
|
30
30
|
const _component_VDropdown = resolveComponent("VDropdown");
|
|
31
31
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
32
|
-
return unref(
|
|
32
|
+
return unref(povesteConfig).backgroundPresets.length ? (openBlock(), createBlock(_component_VDropdown, {
|
|
33
33
|
key: 0,
|
|
34
34
|
placement: "bottom-end",
|
|
35
35
|
skidding: 6,
|
|
36
|
-
class: "
|
|
36
|
+
class: "poveste-toolbar-background htw-h-full htw-flex-none",
|
|
37
37
|
"data-test-id": "toolbar-background"
|
|
38
38
|
}, {
|
|
39
39
|
popper: withCtx(({ hide }) => [
|
|
@@ -47,7 +47,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
47
47
|
])]),
|
|
48
48
|
_: 1
|
|
49
49
|
}, 8, ["modelValue"]),
|
|
50
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(
|
|
50
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(povesteConfig).backgroundPresets, (option, index) => {
|
|
51
51
|
return openBlock(), createElementBlock("button", {
|
|
52
52
|
key: index,
|
|
53
53
|
class: normalizeClass(["htw-px-4 htw-py-3 htw-cursor-pointer htw-text-left htw-flex htw-items-baseline htw-gap-4", [
|
|
@@ -19,7 +19,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19
19
|
return withDirectives((openBlock(), createElementBlock("a", {
|
|
20
20
|
href: sandboxUrl.value,
|
|
21
21
|
target: "_blank",
|
|
22
|
-
class: "
|
|
22
|
+
class: "poveste-toolbar-new-tab htw-flex htw-items-center htw-gap-1 htw-h-full htw-px-2 hover:htw-text-primary-500 htw-opacity-50 hover:htw-opacity-100 dark:hover:htw-text-primary-400 htw-text-gray-900 dark:htw-text-gray-100"
|
|
23
23
|
}, [
|
|
24
24
|
createVNode(unref(Icon), {
|
|
25
25
|
icon: "carbon:launch",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, resolveComponent, resolveDirective, createBlock, openBlock, unref, withCtx, withDirectives, createElementBlock, normalizeClass, createVNode, createElementVNode, createTextVNode, vModelText, Fragment, renderList, toDisplayString, createCommentVNode } from "@poveste/vendors/vue";
|
|
2
2
|
import { Icon } from "@poveste/vendors/iconify";
|
|
3
3
|
import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
4
|
-
import {
|
|
4
|
+
import { povesteConfig } from "../../util/config.js";
|
|
5
5
|
import "../base/BaseCheckbox.vue.js";
|
|
6
6
|
import _sfc_main$1 from "../base/BaseCheckbox.vue2.js";
|
|
7
7
|
"use strict";
|
|
@@ -24,8 +24,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
24
|
return openBlock(), createBlock(_component_VDropdown, {
|
|
25
25
|
placement: "bottom-end",
|
|
26
26
|
skidding: 6,
|
|
27
|
-
disabled: !unref(
|
|
28
|
-
class: "
|
|
27
|
+
disabled: !unref(povesteConfig).responsivePresets?.length,
|
|
28
|
+
class: "poveste-toolbar-responsive-size htw-h-full htw-flex-none"
|
|
29
29
|
}, {
|
|
30
30
|
popper: withCtx(({ hide }) => [
|
|
31
31
|
createElementVNode("div", _hoisted_1, [
|
|
@@ -71,7 +71,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
71
71
|
[_directive_tooltip, "Responsive height (px)"]
|
|
72
72
|
])
|
|
73
73
|
]),
|
|
74
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(
|
|
74
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(povesteConfig).responsivePresets, (preset, index) => {
|
|
75
75
|
return openBlock(), createElementBlock("button", {
|
|
76
76
|
key: index,
|
|
77
77
|
class: normalizeClass(["htw-px-4 htw-py-3 htw-cursor-pointer htw-text-left htw-flex htw-gap-4", [
|
|
@@ -102,7 +102,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
102
102
|
default: withCtx(() => [
|
|
103
103
|
withDirectives((openBlock(), createElementBlock("div", {
|
|
104
104
|
class: normalizeClass(["htw-flex htw-items-center htw-gap-1 htw-h-full htw-px-2 htw-group", {
|
|
105
|
-
"htw-cursor-pointer hover:htw-text-primary-500": unref(
|
|
105
|
+
"htw-cursor-pointer hover:htw-text-primary-500": unref(povesteConfig).responsivePresets?.length
|
|
106
106
|
}])
|
|
107
107
|
}, [
|
|
108
108
|
createVNode(unref(Icon), {
|
|
@@ -9,7 +9,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9
9
|
return (_ctx, _cache) => {
|
|
10
10
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
11
11
|
return withDirectives((openBlock(), createElementBlock("a", {
|
|
12
|
-
class: "
|
|
12
|
+
class: "poveste-toolbar-text-direction htw-flex htw-items-center htw-gap-1 htw-h-full htw-px-2 hover:htw-text-primary-500 htw-opacity-50 hover:htw-opacity-100 dark:hover:htw-text-primary-400 htw-text-gray-900 dark:htw-text-gray-100",
|
|
13
13
|
onClick: _cache[0] || (_cache[0] = ($event) => unref(settings).textDirection = unref(settings).textDirection === "ltr" ? "rtl" : "ltr")
|
|
14
14
|
}, [
|
|
15
15
|
createVNode(unref(Icon), {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, createElementBlock, openBlock, createVNode, createElementVNode, unref, normalizeClass, toDisplayString } from "@poveste/vendors/vue";
|
|
2
2
|
import { Icon } from "@poveste/vendors/iconify";
|
|
3
3
|
"use strict";
|
|
4
|
-
const _hoisted_1 = { class: "
|
|
4
|
+
const _hoisted_1 = { class: "poveste-toolbar-title htw-flex htw-items-center htw-gap-1 htw-text-gray-500 htw-flex-1 htw-truncate htw-min-w-0" };
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "ToolbarTitle",
|
|
7
7
|
props: {
|
|
@@ -6,7 +6,7 @@ import StoryListItem from "./StoryListItem.vue.js";
|
|
|
6
6
|
"use strict";
|
|
7
7
|
const _hoisted_1 = {
|
|
8
8
|
"data-test-id": "story-group",
|
|
9
|
-
class: "
|
|
9
|
+
class: "poveste-story-group htw-my-2 first:htw-mt-0 last:htw-mb-0 htw-group"
|
|
10
10
|
};
|
|
11
11
|
const _hoisted_2 = { class: "htw-truncate" };
|
|
12
12
|
const _hoisted_3 = { key: 1 };
|
|
@@ -4,7 +4,7 @@ import StoryListFolder from "./StoryListFolder.vue.js";
|
|
|
4
4
|
import StoryListItem from "./StoryListItem.vue.js";
|
|
5
5
|
import _sfc_main$1 from "./StoryGroup.vue2.js";
|
|
6
6
|
"use strict";
|
|
7
|
-
const _hoisted_1 = { class: "
|
|
7
|
+
const _hoisted_1 = { class: "poveste-story-list htw-overflow-y-auto" };
|
|
8
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
9
|
__name: "StoryList",
|
|
10
10
|
props: {
|
|
@@ -2,7 +2,7 @@ import _sfc_main from "./StoryListFolder.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
"use strict";
|
|
5
|
-
const StoryListFolder = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const StoryListFolder = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-18510a3c"]]);
|
|
6
6
|
export {
|
|
7
7
|
StoryListFolder as default
|
|
8
8
|
};
|
|
@@ -5,10 +5,10 @@ import StoryListItem from "./StoryListItem.vue.js";
|
|
|
5
5
|
"use strict";
|
|
6
6
|
const _hoisted_1 = {
|
|
7
7
|
"data-test-id": "story-list-folder",
|
|
8
|
-
class: "
|
|
8
|
+
class: "poveste-story-list-folder"
|
|
9
9
|
};
|
|
10
10
|
const _hoisted_2 = { class: "bind-tree-padding htw-flex htw-items-center htw-gap-2 htw-min-w-0" };
|
|
11
|
-
const _hoisted_3 = { class: "htw-flex htw-flex-none htw-items-center htw-opacity-30 [.
|
|
11
|
+
const _hoisted_3 = { class: "htw-flex htw-flex-none htw-items-center htw-opacity-30 [.poveste-story-list-folder-button:hover_&]:htw-opacity-100 htw-ml-4 htw-w-4 htw-h-4 htw-rounded-sm htw-border htw-border-gray-500/40" };
|
|
12
12
|
const _hoisted_4 = { class: "htw-truncate" };
|
|
13
13
|
const _hoisted_5 = { key: 0 };
|
|
14
14
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -21,7 +21,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
},
|
|
22
22
|
setup(__props) {
|
|
23
23
|
useCssVars((_ctx) => ({
|
|
24
|
-
"
|
|
24
|
+
"v8d8133ee": folderPadding.value
|
|
25
25
|
}));
|
|
26
26
|
const props = __props;
|
|
27
27
|
const folderStore = useFolderStore();
|
|
@@ -39,7 +39,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
39
39
|
createElementVNode("div", {
|
|
40
40
|
role: "button",
|
|
41
41
|
tabindex: "0",
|
|
42
|
-
class: "
|
|
42
|
+
class: "poveste-story-list-folder-button htw-px-0.5 htw-py-2 md:htw-py-1.5 htw-mx-1 htw-rounded-sm hover:htw-bg-primary-100 dark:hover:htw-bg-primary-900 htw-cursor-pointer htw-select-none htw-flex",
|
|
43
43
|
onClick: toggleOpen,
|
|
44
44
|
onKeyup: [
|
|
45
45
|
withKeys(toggleOpen, ["enter"]),
|
|
@@ -2,7 +2,7 @@ import _sfc_main from "./StoryListItem.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
"use strict";
|
|
5
|
-
const StoryListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const StoryListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a12ff9e7"]]);
|
|
6
6
|
export {
|
|
7
7
|
StoryListItem as default
|
|
8
8
|
};
|
|
@@ -18,8 +18,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
},
|
|
19
19
|
setup(__props) {
|
|
20
20
|
useCssVars((_ctx) => ({
|
|
21
|
-
"
|
|
22
|
-
"
|
|
21
|
+
"v2411f6f6": filePadding.value,
|
|
22
|
+
"b2034f9c": _ctx.story.iconColor
|
|
23
23
|
}));
|
|
24
24
|
const props = __props;
|
|
25
25
|
const filePadding = computed(() => {
|
|
@@ -34,7 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
34
34
|
ref_key: "el",
|
|
35
35
|
ref: el,
|
|
36
36
|
"data-test-id": "story-list-item",
|
|
37
|
-
class: "
|
|
37
|
+
class: "poveste-story-list-item"
|
|
38
38
|
}, [
|
|
39
39
|
createVNode(BaseListItemLink, {
|
|
40
40
|
to: {
|
package/dist/bundled/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { createApp } from "@poveste/vendors/vue";
|
|
|
4
4
|
import "./App.vue.js";
|
|
5
5
|
import { setupPluginApi } from "./plugin.js";
|
|
6
6
|
import { router } from "./router.js";
|
|
7
|
-
import "virtual:$
|
|
7
|
+
import "virtual:$poveste-theme";
|
|
8
8
|
import _sfc_main from "./App.vue2.js";
|
|
9
9
|
"use strict";
|
|
10
10
|
async function mountMainApp() {
|
|
@@ -26,7 +26,7 @@ async function mountMainApp() {
|
|
|
26
26
|
app.use(router);
|
|
27
27
|
app.mount("#app");
|
|
28
28
|
if (import.meta.hot) {
|
|
29
|
-
import.meta.hot.send("
|
|
29
|
+
import.meta.hot.send("poveste:mount", {});
|
|
30
30
|
/* @__PURE__ */ setupPluginApi();
|
|
31
31
|
}
|
|
32
32
|
}
|
package/dist/bundled/plugin.js
CHANGED
|
@@ -3,7 +3,7 @@ import { router } from "./router.js";
|
|
|
3
3
|
function setupPluginApi() {
|
|
4
4
|
if (!import.meta.hot) return;
|
|
5
5
|
const listeners = {};
|
|
6
|
-
import.meta.hot.on("
|
|
6
|
+
import.meta.hot.on("poveste:dev-event-result", ({ event, result }) => {
|
|
7
7
|
const set = listeners[event];
|
|
8
8
|
if (set) {
|
|
9
9
|
for (const listener of set) {
|
|
@@ -25,7 +25,7 @@ function setupPluginApi() {
|
|
|
25
25
|
window.__HST_PLUGIN_API__ = {
|
|
26
26
|
sendEvent: (event, payload) => {
|
|
27
27
|
return new Promise((resolve) => {
|
|
28
|
-
import.meta.hot.send(`
|
|
28
|
+
import.meta.hot.send(`poveste:dev-event`, {
|
|
29
29
|
event,
|
|
30
30
|
payload
|
|
31
31
|
});
|
package/dist/bundled/router.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createWebHistory, createWebHashHistory, createRouter } from "@poveste/vendors/vue-router";
|
|
2
|
-
import {
|
|
2
|
+
import { povesteConfig } from "./util/config.js";
|
|
3
3
|
"use strict";
|
|
4
4
|
const base = import.meta.env.BASE_URL;
|
|
5
5
|
function createRouterHistory() {
|
|
6
|
-
switch (
|
|
6
|
+
switch (povesteConfig.routerMode) {
|
|
7
7
|
case "hash":
|
|
8
8
|
return createWebHashHistory(base);
|
|
9
9
|
case "history":
|
package/dist/bundled/sandbox.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { applyState } from "@poveste/shared";
|
|
2
2
|
import { createPinia } from "@poveste/vendors/pinia";
|
|
3
|
-
import { files } from "virtual:$
|
|
3
|
+
import { files } from "virtual:$poveste-stories";
|
|
4
4
|
import { ref, createApp, h, computed, watch, onMounted } from "@poveste/vendors/vue";
|
|
5
5
|
import { parseQuery } from "@poveste/vendors/vue-router";
|
|
6
6
|
import "./components/story/GenericMountStory.vue.js";
|
|
7
7
|
import "./components/story/GenericRenderStory.vue.js";
|
|
8
8
|
import { setupPluginApi } from "./plugin.js";
|
|
9
|
-
import {
|
|
9
|
+
import { povesteConfig } from "./util/config.js";
|
|
10
10
|
import { SANDBOX_READY, STATE_SYNC, PREVIEW_SETTINGS_SYNC } from "./util/const.js";
|
|
11
11
|
import { isDark } from "./util/dark.js";
|
|
12
12
|
import { mapFile } from "./util/mapping.js";
|
|
@@ -73,11 +73,11 @@ app.use(createPinia());
|
|
|
73
73
|
app.mount("#app");
|
|
74
74
|
watch(isDark, (value) => {
|
|
75
75
|
if (value) {
|
|
76
|
-
document.documentElement.classList.add(
|
|
77
|
-
document.documentElement.classList.add(
|
|
76
|
+
document.documentElement.classList.add(povesteConfig.sandboxDarkClass);
|
|
77
|
+
document.documentElement.classList.add(povesteConfig.theme.darkClass);
|
|
78
78
|
} else {
|
|
79
|
-
document.documentElement.classList.remove(
|
|
80
|
-
document.documentElement.classList.remove(
|
|
79
|
+
document.documentElement.classList.remove(povesteConfig.sandboxDarkClass);
|
|
80
|
+
document.documentElement.classList.remove(povesteConfig.theme.darkClass);
|
|
81
81
|
}
|
|
82
82
|
}, {
|
|
83
83
|
immediate: true
|
|
@@ -5,7 +5,7 @@ import { useStoryStore } from "./story.js";
|
|
|
5
5
|
"use strict";
|
|
6
6
|
const useFolderStore = defineStore("folder", () => {
|
|
7
7
|
const openedFolders = useStorage(
|
|
8
|
-
"
|
|
8
|
+
"_poveste-tree-state",
|
|
9
9
|
/* @__PURE__ */ new Map()
|
|
10
10
|
);
|
|
11
11
|
function getStringPath(path) {
|
|
@@ -2,7 +2,7 @@ import { useStorage } from "@poveste/vendors/vue-use";
|
|
|
2
2
|
import { defineStore } from "@poveste/vendors/pinia";
|
|
3
3
|
"use strict";
|
|
4
4
|
const usePreviewSettingsStore = defineStore("preview-settings", () => {
|
|
5
|
-
const currentSettings = useStorage("
|
|
5
|
+
const currentSettings = useStorage("_poveste-sandbox-settings-v3", {
|
|
6
6
|
responsiveWidth: 720,
|
|
7
7
|
responsiveHeight: null,
|
|
8
8
|
rotate: false,
|
|
@@ -25,7 +25,7 @@ const builtinCommands = [
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
id: "builtin:
|
|
28
|
+
id: "builtin:poveste-docs",
|
|
29
29
|
label: "Open Poveste Documentation",
|
|
30
30
|
icon: "carbon:help",
|
|
31
31
|
clientAction: () => {
|
|
@@ -35,7 +35,7 @@ const builtinCommands = [
|
|
|
35
35
|
];
|
|
36
36
|
function executeCommand(command, params) {
|
|
37
37
|
if (import.meta.hot) {
|
|
38
|
-
import.meta.hot.send("
|
|
38
|
+
import.meta.hot.send("poveste:dev-command", {
|
|
39
39
|
id: command.id,
|
|
40
40
|
params
|
|
41
41
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { config, logos } from "virtual:$
|
|
1
|
+
import { config, logos } from "virtual:$poveste-config";
|
|
2
2
|
"use strict";
|
|
3
|
-
const
|
|
3
|
+
const povesteConfig = config;
|
|
4
4
|
const customLogos = logos;
|
|
5
5
|
export {
|
|
6
6
|
customLogos,
|
|
7
|
-
|
|
7
|
+
povesteConfig
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const STATE_SYNC = "
|
|
2
|
-
const SANDBOX_READY = "
|
|
3
|
-
const EVENT_SEND = "
|
|
4
|
-
const PREVIEW_SETTINGS_SYNC = "
|
|
1
|
+
const STATE_SYNC = "__poveste:state-sync";
|
|
2
|
+
const SANDBOX_READY = "__poveste:sandbox-ready";
|
|
3
|
+
const EVENT_SEND = "__poveste:event";
|
|
4
|
+
const PREVIEW_SETTINGS_SYNC = "__poveste:preview-settings-sync";
|
|
5
5
|
export {
|
|
6
6
|
EVENT_SEND,
|
|
7
7
|
PREVIEW_SETTINGS_SYNC,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useDark, useToggle } from "@poveste/vendors/vue-use";
|
|
2
2
|
import { watch } from "@poveste/vendors/vue";
|
|
3
|
-
import {
|
|
3
|
+
import { povesteConfig } from "./config.js";
|
|
4
4
|
"use strict";
|
|
5
5
|
const isDark = useDark({
|
|
6
6
|
valueDark: "htw-dark",
|
|
7
|
-
initialValue:
|
|
8
|
-
storageKey: "
|
|
9
|
-
storage:
|
|
7
|
+
initialValue: povesteConfig.theme.defaultColorScheme,
|
|
8
|
+
storageKey: "poveste-color-scheme",
|
|
9
|
+
storage: povesteConfig.theme.storeColorScheme ? localStorage : sessionStorage
|
|
10
10
|
});
|
|
11
11
|
const toggleDark = useToggle(isDark);
|
|
12
12
|
function applyDarkToControls() {
|