@poveste/app 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/postcss.config.cjs +1 -1
- 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/tailwind.config.cjs +2 -2
- package/vite.config.ts +2 -2
- 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/app/style/floating.pcss +0 -34
- package/dist/app/style/main.pcss +0 -100
- package/dist/app/style/sandbox.css +0 -24
- package/dist/app/style/transitions.pcss +0 -51
- package/dist/bundle-index.js +0 -1
- package/dist/bundle-main-dev.js +0 -4
- package/dist/bundle-main.js +0 -5
- package/dist/bundle-sandbox-dev.js +0 -2
- package/dist/bundle-sandbox.js +0 -2
- package/dist/bundled/App.vue.js +0 -5
- package/dist/bundled/App.vue2.js +0 -167
- package/dist/bundled/_virtual/_plugin-vue_export-helper.js +0 -10
- package/dist/bundled/api.js +0 -12
- package/dist/bundled/app.css +0 -116
- 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/dist/bundled/components/HomeView.vue.js +0 -5
- package/dist/bundled/components/HomeView.vue2.js +0 -66
- package/dist/bundled/components/app/AppHeader.vue.js +0 -5
- package/dist/bundled/components/app/AppHeader.vue2.js +0 -71
- package/dist/bundled/components/app/AppLogo.vue.js +0 -5
- package/dist/bundled/components/app/AppLogo.vue2.js +0 -29
- package/dist/bundled/components/app/Breadcrumb.vue.js +0 -8
- package/dist/bundled/components/app/Breadcrumb.vue2.js +0 -91
- package/dist/bundled/components/app/HomeCounter.vue.js +0 -5
- package/dist/bundled/components/app/HomeCounter.vue2.js +0 -42
- package/dist/bundled/components/app/InitialLoading.vue.js +0 -5
- package/dist/bundled/components/app/InitialLoading.vue2.js +0 -51
- package/dist/bundled/components/app/MobileOverlay.vue.js +0 -5
- package/dist/bundled/components/app/MobileOverlay.vue2.js +0 -45
- package/dist/bundled/components/base/BaseButton.vue.js +0 -5
- package/dist/bundled/components/base/BaseButton.vue2.js +0 -39
- package/dist/bundled/components/base/BaseCheckbox.vue.js +0 -5
- package/dist/bundled/components/base/BaseCheckbox.vue2.js +0 -78
- package/dist/bundled/components/base/BaseEmpty.vue.js +0 -14
- package/dist/bundled/components/base/BaseIcon.vue.js +0 -8
- package/dist/bundled/components/base/BaseIcon.vue2.js +0 -29
- package/dist/bundled/components/base/BaseKeyboardShortcut.vue.js +0 -5
- package/dist/bundled/components/base/BaseKeyboardShortcut.vue2.js +0 -20
- package/dist/bundled/components/base/BaseListItem.vue.js +0 -5
- package/dist/bundled/components/base/BaseListItem.vue2.js +0 -33
- package/dist/bundled/components/base/BaseListItemLink.vue.js +0 -33
- package/dist/bundled/components/base/BaseListItemLink.vue2.js +0 -26
- package/dist/bundled/components/base/BaseOverflowMenu.vue.js +0 -5
- package/dist/bundled/components/base/BaseOverflowMenu.vue2.js +0 -100
- package/dist/bundled/components/base/BaseOverflowTab.vue.js +0 -36
- package/dist/bundled/components/base/BaseOverflowTab.vue2.js +0 -18
- package/dist/bundled/components/base/BaseSelect.vue.js +0 -5
- package/dist/bundled/components/base/BaseSelect.vue2.js +0 -77
- package/dist/bundled/components/base/BaseSplitPane.vue.js +0 -8
- package/dist/bundled/components/base/BaseSplitPane.vue2.js +0 -183
- package/dist/bundled/components/base/BaseTab.vue.js +0 -36
- package/dist/bundled/components/base/BaseTab.vue2.js +0 -18
- package/dist/bundled/components/base/BaseTag.vue.js +0 -13
- package/dist/bundled/components/command/CommandPrompts.vue.js +0 -5
- package/dist/bundled/components/command/CommandPrompts.vue2.js +0 -91
- package/dist/bundled/components/command/CommandPromptsModal.vue.js +0 -5
- package/dist/bundled/components/command/CommandPromptsModal.vue2.js +0 -45
- package/dist/bundled/components/command/PromptSelect.vue.js +0 -5
- package/dist/bundled/components/command/PromptSelect.vue2.js +0 -142
- package/dist/bundled/components/command/PromptText.vue.js +0 -5
- package/dist/bundled/components/command/PromptText.vue2.js +0 -67
- package/dist/bundled/components/misc/CheckerboardPattern.vue.js +0 -40
- package/dist/bundled/components/misc/HatchedPattern.vue.js +0 -12
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue.js +0 -5
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue2.js +0 -72
- package/dist/bundled/components/panel/ControlsComponentProps.vue.js +0 -5
- package/dist/bundled/components/panel/ControlsComponentProps.vue2.js +0 -45
- package/dist/bundled/components/panel/ControlsComponentState.vue.js +0 -5
- package/dist/bundled/components/panel/ControlsComponentState.vue2.js +0 -41
- package/dist/bundled/components/panel/ControlsComponentStateItem.vue.js +0 -5
- package/dist/bundled/components/panel/ControlsComponentStateItem.vue2.js +0 -46
- package/dist/bundled/components/panel/PaneTabs.vue.js +0 -5
- package/dist/bundled/components/panel/PaneTabs.vue2.js +0 -114
- package/dist/bundled/components/panel/StatePresets.vue.js +0 -5
- package/dist/bundled/components/panel/StatePresets.vue2.js +0 -193
- package/dist/bundled/components/panel/StoryControls.vue.js +0 -5
- package/dist/bundled/components/panel/StoryControls.vue2.js +0 -87
- package/dist/bundled/components/panel/StoryDocs.vue.js +0 -7
- package/dist/bundled/components/panel/StoryDocs.vue2.js +0 -161
- package/dist/bundled/components/panel/StoryEvent.vue.js +0 -5
- package/dist/bundled/components/panel/StoryEvent.vue2.js +0 -59
- package/dist/bundled/components/panel/StoryEvents.vue.js +0 -5
- package/dist/bundled/components/panel/StoryEvents.vue2.js +0 -53
- package/dist/bundled/components/panel/StorySidePanel.vue.js +0 -5
- package/dist/bundled/components/panel/StorySidePanel.vue2.js +0 -83
- package/dist/bundled/components/panel/StorySourceCode.vue.js +0 -8
- package/dist/bundled/components/panel/StorySourceCode.vue2.js +0 -204
- package/dist/bundled/components/search/SearchItem.vue.js +0 -8
- package/dist/bundled/components/search/SearchItem.vue2.js +0 -93
- package/dist/bundled/components/search/SearchItemContent.vue.js +0 -5
- package/dist/bundled/components/search/SearchItemContent.vue2.js +0 -71
- package/dist/bundled/components/search/SearchLoading.vue.js +0 -5
- package/dist/bundled/components/search/SearchLoading.vue2.js +0 -21
- package/dist/bundled/components/search/SearchModal.vue.js +0 -5
- package/dist/bundled/components/search/SearchModal.vue2.js +0 -51
- package/dist/bundled/components/search/SearchPane.vue.js +0 -5
- package/dist/bundled/components/search/SearchPane.vue2.js +0 -272
- package/dist/bundled/components/search/search-docs-data.js +0 -11
- package/dist/bundled/components/search/search-title-data.js +0 -11
- package/dist/bundled/components/story/GenericMountStory.vue.js +0 -5
- package/dist/bundled/components/story/GenericMountStory.vue2.js +0 -34
- package/dist/bundled/components/story/GenericRenderStory.vue.js +0 -5
- package/dist/bundled/components/story/GenericRenderStory.vue2.js +0 -39
- package/dist/bundled/components/story/StoryResponsivePreview.vue.js +0 -8
- package/dist/bundled/components/story/StoryResponsivePreview.vue2.js +0 -207
- package/dist/bundled/components/story/StoryVariantGrid.vue.js +0 -5
- package/dist/bundled/components/story/StoryVariantGrid.vue2.js +0 -146
- package/dist/bundled/components/story/StoryVariantGridItem.vue.js +0 -8
- package/dist/bundled/components/story/StoryVariantGridItem.vue2.js +0 -153
- package/dist/bundled/components/story/StoryVariantListItem.vue.js +0 -8
- package/dist/bundled/components/story/StoryVariantListItem.vue2.js +0 -55
- package/dist/bundled/components/story/StoryVariantSingle.vue.js +0 -8
- package/dist/bundled/components/story/StoryVariantSingle.vue2.js +0 -107
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue.js +0 -5
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue2.js +0 -70
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue.js +0 -5
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue2.js +0 -128
- package/dist/bundled/components/story/StoryVariantSingleView.vue.js +0 -5
- package/dist/bundled/components/story/StoryVariantSingleView.vue2.js +0 -66
- package/dist/bundled/components/story/StoryView.vue.js +0 -5
- package/dist/bundled/components/story/StoryView.vue2.js +0 -104
- package/dist/bundled/components/story/StoryViewer.vue.js +0 -8
- package/dist/bundled/components/story/StoryViewer.vue2.js +0 -55
- package/dist/bundled/components/toolbar/DevOnlyToolbarOpenInEditor.vue.js +0 -5
- package/dist/bundled/components/toolbar/DevOnlyToolbarOpenInEditor.vue2.js +0 -31
- package/dist/bundled/components/toolbar/ToolbarBackground.vue.js +0 -8
- package/dist/bundled/components/toolbar/ToolbarBackground.vue2.js +0 -98
- package/dist/bundled/components/toolbar/ToolbarNewTab.vue.js +0 -5
- package/dist/bundled/components/toolbar/ToolbarNewTab.vue2.js +0 -36
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue.js +0 -5
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue2.js +0 -127
- package/dist/bundled/components/toolbar/ToolbarTextDirection.vue.js +0 -5
- package/dist/bundled/components/toolbar/ToolbarTextDirection.vue2.js +0 -27
- package/dist/bundled/components/toolbar/ToolbarTitle.vue.js +0 -5
- package/dist/bundled/components/toolbar/ToolbarTitle.vue2.js +0 -26
- package/dist/bundled/components/tree/StoryGroup.vue.js +0 -5
- package/dist/bundled/components/tree/StoryGroup.vue2.js +0 -74
- package/dist/bundled/components/tree/StoryList.vue.js +0 -5
- package/dist/bundled/components/tree/StoryList.vue2.js +0 -41
- package/dist/bundled/components/tree/StoryListFolder.vue.js +0 -8
- package/dist/bundled/components/tree/StoryListFolder.vue2.js +0 -86
- package/dist/bundled/components/tree/StoryListItem.vue.js +0 -8
- package/dist/bundled/components/tree/StoryListItem.vue2.js +0 -69
- package/dist/bundled/index.js +0 -35
- package/dist/bundled/plugin.js +0 -49
- package/dist/bundled/router.js +0 -32
- package/dist/bundled/sandbox.js +0 -87
- package/dist/bundled/stores/command.js +0 -25
- package/dist/bundled/stores/events.js +0 -29
- package/dist/bundled/stores/folder.js +0 -54
- package/dist/bundled/stores/preview-settings.js +0 -19
- package/dist/bundled/stores/story.js +0 -43
- package/dist/bundled/util/commands.js +0 -57
- package/dist/bundled/util/config.js +0 -8
- package/dist/bundled/util/const.js +0 -10
- package/dist/bundled/util/dark.js +0 -28
- package/dist/bundled/util/docs.js +0 -26
- package/dist/bundled/util/env.js +0 -4
- package/dist/bundled/util/events.js +0 -33
- package/dist/bundled/util/keyboard.js +0 -90
- package/dist/bundled/util/mapping.js +0 -70
- package/dist/bundled/util/open-in-editor.js +0 -6
- package/dist/bundled/util/preview-settings.js +0 -21
- package/dist/bundled/util/responsive.js +0 -6
- package/dist/bundled/util/sandbox.js +0 -11
- package/dist/bundled/util/scroll.js +0 -31
- package/dist/bundled/util/select.js +0 -28
- package/dist/bundled/util/state.js +0 -41
- package/dist/bundled/util/tooltip.js +0 -15
- package/dist/bundled/util/variant.js +0 -21
- package/dist/style.css +0 -2626
- 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
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, computed, createBlock, openBlock, withCtx, createElementVNode, normalizeStyle, normalizeClass, toRaw } from "@poveste/vendors/vue";
|
|
2
|
-
import { applyState } from "@poveste/shared";
|
|
3
|
-
import { useEventListener } from "@poveste/vendors/vue-use";
|
|
4
|
-
import { useEventsStore } from "../../stores/events.js";
|
|
5
|
-
import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
6
|
-
import { SANDBOX_READY, EVENT_SEND, STATE_SYNC, PREVIEW_SETTINGS_SYNC } from "../../util/const.js";
|
|
7
|
-
import { getSandboxUrl } from "../../util/sandbox.js";
|
|
8
|
-
import { toRawDeep } from "../../util/state.js";
|
|
9
|
-
import StoryResponsivePreview from "./StoryResponsivePreview.vue.js";
|
|
10
|
-
"use strict";
|
|
11
|
-
const _hoisted_1 = ["src"];
|
|
12
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
-
__name: "StoryVariantSinglePreviewRemote",
|
|
14
|
-
props: {
|
|
15
|
-
story: {},
|
|
16
|
-
variant: {}
|
|
17
|
-
},
|
|
18
|
-
setup(__props) {
|
|
19
|
-
const props = __props;
|
|
20
|
-
const settings = usePreviewSettingsStore().currentSettings;
|
|
21
|
-
const iframe = ref();
|
|
22
|
-
function syncState() {
|
|
23
|
-
if (iframe.value && props.variant.previewReady) {
|
|
24
|
-
iframe.value.contentWindow.postMessage({
|
|
25
|
-
type: STATE_SYNC,
|
|
26
|
-
state: toRawDeep(props.variant.state, true)
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
let synced = false;
|
|
31
|
-
watch(() => props.variant.state, () => {
|
|
32
|
-
if (synced) {
|
|
33
|
-
synced = false;
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
syncState();
|
|
37
|
-
}, {
|
|
38
|
-
deep: true,
|
|
39
|
-
immediate: true
|
|
40
|
-
});
|
|
41
|
-
Object.assign(props.variant, {
|
|
42
|
-
previewReady: false
|
|
43
|
-
});
|
|
44
|
-
useEventListener(window, "message", (event) => {
|
|
45
|
-
switch (event.data.type) {
|
|
46
|
-
case STATE_SYNC:
|
|
47
|
-
updateVariantState(event.data.state);
|
|
48
|
-
break;
|
|
49
|
-
case EVENT_SEND:
|
|
50
|
-
logEvent(event.data.event);
|
|
51
|
-
break;
|
|
52
|
-
case SANDBOX_READY:
|
|
53
|
-
setPreviewReady();
|
|
54
|
-
break;
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
function updateVariantState(state) {
|
|
58
|
-
synced = true;
|
|
59
|
-
applyState(props.variant.state, state);
|
|
60
|
-
}
|
|
61
|
-
function logEvent(event) {
|
|
62
|
-
const eventsStore = useEventsStore();
|
|
63
|
-
eventsStore.addEvent(event);
|
|
64
|
-
}
|
|
65
|
-
function setPreviewReady() {
|
|
66
|
-
Object.assign(props.variant, {
|
|
67
|
-
previewReady: true
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
const sandboxUrl = computed(() => {
|
|
71
|
-
return getSandboxUrl(props.story, props.variant);
|
|
72
|
-
});
|
|
73
|
-
const isIframeLoaded = ref(false);
|
|
74
|
-
watch(sandboxUrl, () => {
|
|
75
|
-
isIframeLoaded.value = false;
|
|
76
|
-
Object.assign(props.variant, {
|
|
77
|
-
previewReady: false
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
function syncSettings() {
|
|
81
|
-
if (iframe.value) {
|
|
82
|
-
iframe.value.contentWindow.postMessage({
|
|
83
|
-
type: PREVIEW_SETTINGS_SYNC,
|
|
84
|
-
settings: toRaw(settings)
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
watch(() => settings, () => {
|
|
89
|
-
syncSettings();
|
|
90
|
-
}, {
|
|
91
|
-
deep: true,
|
|
92
|
-
immediate: true
|
|
93
|
-
});
|
|
94
|
-
function onIframeLoad() {
|
|
95
|
-
isIframeLoaded.value = true;
|
|
96
|
-
syncState();
|
|
97
|
-
syncSettings();
|
|
98
|
-
}
|
|
99
|
-
return (_ctx, _cache) => {
|
|
100
|
-
return openBlock(), createBlock(StoryResponsivePreview, {
|
|
101
|
-
class: "histoire-story-variant-single-preview-remote",
|
|
102
|
-
variant: __props.variant
|
|
103
|
-
}, {
|
|
104
|
-
default: withCtx(({ isResponsiveEnabled, finalWidth, finalHeight, resizing }) => [
|
|
105
|
-
createElementVNode("iframe", {
|
|
106
|
-
ref_key: "iframe",
|
|
107
|
-
ref: iframe,
|
|
108
|
-
src: sandboxUrl.value,
|
|
109
|
-
class: normalizeClass(["htw-w-full htw-h-full htw-relative", {
|
|
110
|
-
"htw-invisible": !isIframeLoaded.value,
|
|
111
|
-
"htw-pointer-events-none": resizing
|
|
112
|
-
}]),
|
|
113
|
-
style: normalizeStyle(isResponsiveEnabled ? {
|
|
114
|
-
width: finalWidth ? `${finalWidth}px` : null,
|
|
115
|
-
height: finalHeight ? `${finalHeight}px` : null
|
|
116
|
-
} : void 0),
|
|
117
|
-
"data-test-id": "preview-iframe",
|
|
118
|
-
onLoad: _cache[0] || (_cache[0] = ($event) => onIframeLoad())
|
|
119
|
-
}, null, 46, _hoisted_1)
|
|
120
|
-
]),
|
|
121
|
-
_: 1
|
|
122
|
-
}, 8, ["variant"]);
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
export {
|
|
127
|
-
_sfc_main as default
|
|
128
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, createCommentVNode, createBlock, unref, createVNode } from "@poveste/vendors/vue";
|
|
2
|
-
import { isMobile } from "../../util/responsive.js";
|
|
3
|
-
import "../toolbar/DevOnlyToolbarOpenInEditor.vue.js";
|
|
4
|
-
import ToolbarBackground from "../toolbar/ToolbarBackground.vue.js";
|
|
5
|
-
import "../toolbar/ToolbarNewTab.vue.js";
|
|
6
|
-
import "../toolbar/ToolbarResponsiveSize.vue.js";
|
|
7
|
-
import "../toolbar/ToolbarTextDirection.vue.js";
|
|
8
|
-
import "../toolbar/ToolbarTitle.vue.js";
|
|
9
|
-
import "./StoryVariantSinglePreviewNative.vue.js";
|
|
10
|
-
import "./StoryVariantSinglePreviewRemote.vue.js";
|
|
11
|
-
import _sfc_main$1 from "../toolbar/ToolbarTitle.vue2.js";
|
|
12
|
-
import _sfc_main$2 from "../toolbar/ToolbarResponsiveSize.vue2.js";
|
|
13
|
-
import _sfc_main$3 from "../toolbar/ToolbarTextDirection.vue2.js";
|
|
14
|
-
import _sfc_main$4 from "../toolbar/ToolbarNewTab.vue2.js";
|
|
15
|
-
import _sfc_main$5 from "../toolbar/DevOnlyToolbarOpenInEditor.vue2.js";
|
|
16
|
-
import _sfc_main$6 from "./StoryVariantSinglePreviewNative.vue2.js";
|
|
17
|
-
import _sfc_main$7 from "./StoryVariantSinglePreviewRemote.vue2.js";
|
|
18
|
-
"use strict";
|
|
19
|
-
const _hoisted_1 = {
|
|
20
|
-
class: "histoire-story-variant-single-view htw-h-full htw-flex htw-flex-col",
|
|
21
|
-
"data-test-id": "story-variant-single-view"
|
|
22
|
-
};
|
|
23
|
-
const _hoisted_2 = {
|
|
24
|
-
key: 0,
|
|
25
|
-
class: "htw-flex-none htw-flex htw-items-center htw-h-8 -htw-mt-1"
|
|
26
|
-
};
|
|
27
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
28
|
-
__name: "StoryVariantSingleView",
|
|
29
|
-
props: {
|
|
30
|
-
variant: {},
|
|
31
|
-
story: {}
|
|
32
|
-
},
|
|
33
|
-
setup(__props) {
|
|
34
|
-
return (_ctx, _cache) => {
|
|
35
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
36
|
-
!unref(isMobile) ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
37
|
-
createVNode(_sfc_main$1, { variant: __props.variant }, null, 8, ["variant"]),
|
|
38
|
-
!__props.variant.responsiveDisabled ? (openBlock(), createBlock(_sfc_main$2, { key: 0 })) : createCommentVNode("", true),
|
|
39
|
-
createVNode(ToolbarBackground),
|
|
40
|
-
createVNode(_sfc_main$3),
|
|
41
|
-
createVNode(_sfc_main$4, {
|
|
42
|
-
variant: __props.variant,
|
|
43
|
-
story: __props.story
|
|
44
|
-
}, null, 8, ["variant", "story"]),
|
|
45
|
-
_ctx.__HISTOIRE_DEV__ ? (openBlock(), createBlock(_sfc_main$5, {
|
|
46
|
-
key: 1,
|
|
47
|
-
file: __props.story.file?.filePath,
|
|
48
|
-
tooltip: "Edit story in editor"
|
|
49
|
-
}, null, 8, ["file"])) : createCommentVNode("", true)
|
|
50
|
-
])) : createCommentVNode("", true),
|
|
51
|
-
__props.story.layout?.iframe === false ? (openBlock(), createBlock(_sfc_main$6, {
|
|
52
|
-
key: 1,
|
|
53
|
-
story: __props.story,
|
|
54
|
-
variant: __props.variant
|
|
55
|
-
}, null, 8, ["story", "variant"])) : (openBlock(), createBlock(_sfc_main$7, {
|
|
56
|
-
key: 2,
|
|
57
|
-
story: __props.story,
|
|
58
|
-
variant: __props.variant
|
|
59
|
-
}, null, 8, ["story", "variant"]))
|
|
60
|
-
]);
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
export {
|
|
65
|
-
_sfc_main as default
|
|
66
|
-
};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { defineComponent, watch, ref, createBlock, createElementBlock, unref, openBlock, withCtx, createVNode } from "@poveste/vendors/vue";
|
|
2
|
-
import { Icon } from "@poveste/vendors/iconify";
|
|
3
|
-
import { useRouter, useRoute } from "@poveste/vendors/vue-router";
|
|
4
|
-
import { useStoryStore } from "../../stores/story.js";
|
|
5
|
-
import { isMobile } from "../../util/responsive.js";
|
|
6
|
-
import BaseEmpty from "../base/BaseEmpty.vue.js";
|
|
7
|
-
import BaseSplitPane from "../base/BaseSplitPane.vue.js";
|
|
8
|
-
import "../panel/StoryDocs.vue.js";
|
|
9
|
-
import "../panel/StorySidePanel.vue.js";
|
|
10
|
-
import StoryViewer from "./StoryViewer.vue.js";
|
|
11
|
-
import _sfc_main$1 from "../panel/StoryDocs.vue2.js";
|
|
12
|
-
import _sfc_main$2 from "../panel/StorySidePanel.vue2.js";
|
|
13
|
-
"use strict";
|
|
14
|
-
const _hoisted_1 = {
|
|
15
|
-
key: 1,
|
|
16
|
-
class: "histoire-story-view histoire-with-story htw-h-full"
|
|
17
|
-
};
|
|
18
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
19
|
-
__name: "StoryView",
|
|
20
|
-
setup(__props) {
|
|
21
|
-
const storyStore = useStoryStore();
|
|
22
|
-
const router = useRouter();
|
|
23
|
-
const route = useRoute();
|
|
24
|
-
watch(() => storyStore.currentVariant, (value) => {
|
|
25
|
-
if (value) {
|
|
26
|
-
storyStore.currentStory.lastSelectedVariant = value;
|
|
27
|
-
}
|
|
28
|
-
}, {
|
|
29
|
-
immediate: true
|
|
30
|
-
});
|
|
31
|
-
watch(() => [storyStore.currentStory, storyStore.currentVariant], () => {
|
|
32
|
-
if (!storyStore.currentVariant) {
|
|
33
|
-
if (storyStore.currentStory?.lastSelectedVariant) {
|
|
34
|
-
setVariant(storyStore.currentStory.lastSelectedVariant.id);
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
if (storyStore.currentStory?.variants.length === 1) {
|
|
38
|
-
setVariant(storyStore.currentStory.variants[0].id);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}, {
|
|
42
|
-
immediate: true
|
|
43
|
-
});
|
|
44
|
-
function setVariant(variantId) {
|
|
45
|
-
router.replace({
|
|
46
|
-
...route,
|
|
47
|
-
query: {
|
|
48
|
-
...route.query,
|
|
49
|
-
variantId
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
const docsOnlyScroller = ref(null);
|
|
54
|
-
function scrollDocsToTop() {
|
|
55
|
-
docsOnlyScroller.value?.scrollTo(0, 0);
|
|
56
|
-
}
|
|
57
|
-
return (_ctx, _cache) => {
|
|
58
|
-
return !unref(storyStore).currentStory ? (openBlock(), createBlock(BaseEmpty, {
|
|
59
|
-
key: 0,
|
|
60
|
-
class: "histoire-story-view histoire-no-story"
|
|
61
|
-
}, {
|
|
62
|
-
default: withCtx(() => [
|
|
63
|
-
createVNode(unref(Icon), {
|
|
64
|
-
icon: "carbon:software-resource-resource",
|
|
65
|
-
class: "htw-w-16 htw-h-16 htw-opacity-50"
|
|
66
|
-
})
|
|
67
|
-
]),
|
|
68
|
-
_: 1
|
|
69
|
-
})) : (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
70
|
-
unref(storyStore).currentStory.docsOnly ? (openBlock(), createElementBlock("div", {
|
|
71
|
-
key: 0,
|
|
72
|
-
ref_key: "docsOnlyScroller",
|
|
73
|
-
ref: docsOnlyScroller,
|
|
74
|
-
class: "htw-h-full htw-overflow-auto"
|
|
75
|
-
}, [
|
|
76
|
-
createVNode(_sfc_main$1, {
|
|
77
|
-
story: unref(storyStore).currentStory,
|
|
78
|
-
standalone: "",
|
|
79
|
-
class: "md:htw-p-12 htw-w-full md:htw-max-w-[600px] lg:htw-max-w-[800px] xl:htw-max-w-[900px]",
|
|
80
|
-
onScrollTop: _cache[0] || (_cache[0] = ($event) => scrollDocsToTop())
|
|
81
|
-
}, null, 8, ["story"])
|
|
82
|
-
], 512)) : unref(isMobile) ? (openBlock(), createBlock(StoryViewer, { key: 1 })) : (openBlock(), createBlock(BaseSplitPane, {
|
|
83
|
-
key: 2,
|
|
84
|
-
"save-id": "story-main",
|
|
85
|
-
min: 30,
|
|
86
|
-
max: 95,
|
|
87
|
-
"default-split": 75,
|
|
88
|
-
class: "htw-h-full"
|
|
89
|
-
}, {
|
|
90
|
-
first: withCtx(() => [
|
|
91
|
-
createVNode(StoryViewer)
|
|
92
|
-
]),
|
|
93
|
-
last: withCtx(() => [
|
|
94
|
-
createVNode(_sfc_main$2)
|
|
95
|
-
]),
|
|
96
|
-
_: 1
|
|
97
|
-
}))
|
|
98
|
-
]));
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
export {
|
|
103
|
-
_sfc_main as default
|
|
104
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./StoryViewer.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
"use strict";
|
|
5
|
-
const StoryViewer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-096f6d6e"]]);
|
|
6
|
-
export {
|
|
7
|
-
StoryViewer as default
|
|
8
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { defineComponent, useCssVars, computed, ref, watch, createElementBlock, openBlock, Fragment, createElementVNode, createVNode, createBlock, createCommentVNode, unref, withCtx, renderList } from "@poveste/vendors/vue";
|
|
2
|
-
import { useStoryStore } from "../../stores/story.js";
|
|
3
|
-
import "../app/MobileOverlay.vue.js";
|
|
4
|
-
import "./StoryVariantGrid.vue.js";
|
|
5
|
-
import StoryVariantListItem from "./StoryVariantListItem.vue.js";
|
|
6
|
-
import StoryVariantSingle from "./StoryVariantSingle.vue.js";
|
|
7
|
-
import _sfc_main$1 from "./StoryVariantGrid.vue2.js";
|
|
8
|
-
import _sfc_main$2 from "../app/MobileOverlay.vue2.js";
|
|
9
|
-
"use strict";
|
|
10
|
-
const _hoisted_1 = { class: "histoire-story-viewer htw-bg-gray-50 htw-h-full dark:htw-bg-gray-750" };
|
|
11
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
-
__name: "StoryViewer",
|
|
13
|
-
setup(__props) {
|
|
14
|
-
useCssVars((_ctx) => ({
|
|
15
|
-
"v0f021d3c": variant.value?.iconColor
|
|
16
|
-
}));
|
|
17
|
-
const storyStore = useStoryStore();
|
|
18
|
-
const variant = computed(() => storyStore.currentVariant);
|
|
19
|
-
const isMenuOpened = ref(false);
|
|
20
|
-
function closeMenu() {
|
|
21
|
-
isMenuOpened.value = false;
|
|
22
|
-
}
|
|
23
|
-
watch(variant, () => {
|
|
24
|
-
isMenuOpened.value = false;
|
|
25
|
-
});
|
|
26
|
-
return (_ctx, _cache) => {
|
|
27
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
28
|
-
createElementVNode("div", _hoisted_1, [
|
|
29
|
-
unref(storyStore).currentStory.layout.type === "grid" ? (openBlock(), createBlock(_sfc_main$1, { key: 0 })) : unref(storyStore).currentStory.layout.type === "single" ? (openBlock(), createBlock(StoryVariantSingle, {
|
|
30
|
-
key: 1,
|
|
31
|
-
onOpenVariantMenu: _cache[0] || (_cache[0] = ($event) => isMenuOpened.value = true)
|
|
32
|
-
})) : createCommentVNode("", true)
|
|
33
|
-
]),
|
|
34
|
-
createVNode(_sfc_main$2, {
|
|
35
|
-
title: "Select a variant",
|
|
36
|
-
opened: isMenuOpened.value,
|
|
37
|
-
onClose: closeMenu
|
|
38
|
-
}, {
|
|
39
|
-
default: withCtx(() => [
|
|
40
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(storyStore).currentStory.variants, (v, index) => {
|
|
41
|
-
return openBlock(), createBlock(StoryVariantListItem, {
|
|
42
|
-
key: index,
|
|
43
|
-
variant: v
|
|
44
|
-
}, null, 8, ["variant"]);
|
|
45
|
-
}), 128))
|
|
46
|
-
]),
|
|
47
|
-
_: 1
|
|
48
|
-
}, 8, ["opened"])
|
|
49
|
-
], 64);
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
export {
|
|
54
|
-
_sfc_main as default
|
|
55
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { defineComponent, resolveDirective, withDirectives, createElementBlock, openBlock, unref, createVNode } from "@poveste/vendors/vue";
|
|
2
|
-
import { Icon } from "@poveste/vendors/iconify";
|
|
3
|
-
import { openInEditor } from "../../util/open-in-editor.js";
|
|
4
|
-
"use strict";
|
|
5
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
-
__name: "DevOnlyToolbarOpenInEditor",
|
|
7
|
-
props: {
|
|
8
|
-
file: {},
|
|
9
|
-
tooltip: {}
|
|
10
|
-
},
|
|
11
|
-
setup(__props) {
|
|
12
|
-
return (_ctx, _cache) => {
|
|
13
|
-
const _directive_tooltip = resolveDirective("tooltip");
|
|
14
|
-
return withDirectives((openBlock(), createElementBlock("a", {
|
|
15
|
-
target: "_blank",
|
|
16
|
-
class: "histoire-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
|
-
onClick: _cache[0] || (_cache[0] = ($event) => unref(openInEditor)(__props.file))
|
|
18
|
-
}, [
|
|
19
|
-
createVNode(unref(Icon), {
|
|
20
|
-
icon: "carbon:script-reference",
|
|
21
|
-
class: "htw-w-4 htw-h-4"
|
|
22
|
-
})
|
|
23
|
-
])), [
|
|
24
|
-
[_directive_tooltip, __props.tooltip]
|
|
25
|
-
]);
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
export {
|
|
30
|
-
_sfc_main as default
|
|
31
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./ToolbarBackground.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
"use strict";
|
|
5
|
-
const ToolbarBackground = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c48fb2b2"]]);
|
|
6
|
-
export {
|
|
7
|
-
ToolbarBackground as default
|
|
8
|
-
};
|
|
@@ -1,98 +0,0 @@
|
|
|
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
|
-
import { Icon } from "@poveste/vendors/iconify";
|
|
3
|
-
import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
4
|
-
import { histoireConfig } from "../../util/config.js";
|
|
5
|
-
import { getContrastColor } from "../../util/preview-settings.js";
|
|
6
|
-
import "../base/BaseCheckbox.vue.js";
|
|
7
|
-
import _sfc_main$1 from "../base/BaseCheckbox.vue2.js";
|
|
8
|
-
"use strict";
|
|
9
|
-
const _hoisted_1 = { class: "htw-cursor-pointer hover:htw-text-primary-500 htw-flex htw-items-center htw-gap-1 htw-h-full htw-px-2 htw-group" };
|
|
10
|
-
const _hoisted_2 = { class: "bind-preview-bg htw-w-4 htw-h-4 htw-rounded-full htw-border htw-border-black/50 dark:htw-border-white/50 htw-flex htw-items-center htw-justify-center htw-text-xs" };
|
|
11
|
-
const _hoisted_3 = { key: 0 };
|
|
12
|
-
const _hoisted_4 = {
|
|
13
|
-
class: "htw-flex htw-flex-col htw-items-stretch",
|
|
14
|
-
"data-test-id": "background-popper"
|
|
15
|
-
};
|
|
16
|
-
const _hoisted_5 = ["onClick"];
|
|
17
|
-
const _hoisted_6 = { class: "htw-mr-auto" };
|
|
18
|
-
const _hoisted_7 = { class: "htw-ml-auto htw-opacity-70" };
|
|
19
|
-
const _hoisted_8 = { key: 0 };
|
|
20
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
21
|
-
__name: "ToolbarBackground",
|
|
22
|
-
setup(__props) {
|
|
23
|
-
useCssVars((_ctx) => ({
|
|
24
|
-
"v627bec82": unref(settings).backgroundColor,
|
|
25
|
-
"v35068428": contrastColor.value
|
|
26
|
-
}));
|
|
27
|
-
const settings = usePreviewSettingsStore().currentSettings;
|
|
28
|
-
const contrastColor = computed(() => getContrastColor(settings));
|
|
29
|
-
return (_ctx, _cache) => {
|
|
30
|
-
const _component_VDropdown = resolveComponent("VDropdown");
|
|
31
|
-
const _directive_tooltip = resolveDirective("tooltip");
|
|
32
|
-
return unref(histoireConfig).backgroundPresets.length ? (openBlock(), createBlock(_component_VDropdown, {
|
|
33
|
-
key: 0,
|
|
34
|
-
placement: "bottom-end",
|
|
35
|
-
skidding: 6,
|
|
36
|
-
class: "histoire-toolbar-background htw-h-full htw-flex-none",
|
|
37
|
-
"data-test-id": "toolbar-background"
|
|
38
|
-
}, {
|
|
39
|
-
popper: withCtx(({ hide }) => [
|
|
40
|
-
createElementVNode("div", _hoisted_4, [
|
|
41
|
-
createVNode(_sfc_main$1, {
|
|
42
|
-
modelValue: unref(settings).checkerboard,
|
|
43
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(settings).checkerboard = $event)
|
|
44
|
-
}, {
|
|
45
|
-
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
46
|
-
createTextVNode(" Checkerboard ", -1)
|
|
47
|
-
])]),
|
|
48
|
-
_: 1
|
|
49
|
-
}, 8, ["modelValue"]),
|
|
50
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(histoireConfig).backgroundPresets, (option, index) => {
|
|
51
|
-
return openBlock(), createElementBlock("button", {
|
|
52
|
-
key: index,
|
|
53
|
-
class: normalizeClass(["htw-px-4 htw-py-3 htw-cursor-pointer htw-text-left htw-flex htw-items-baseline htw-gap-4", [
|
|
54
|
-
unref(settings).backgroundColor === option.color ? "htw-bg-primary-500 hover:htw-bg-primary-600 htw-text-white dark:htw-text-black" : "htw-bg-transparent hover:htw-bg-primary-100 dark:hover:htw-bg-primary-700"
|
|
55
|
-
]]),
|
|
56
|
-
onClick: ($event) => {
|
|
57
|
-
unref(settings).backgroundColor = option.color;
|
|
58
|
-
hide();
|
|
59
|
-
}
|
|
60
|
-
}, [
|
|
61
|
-
createElementVNode("span", _hoisted_6, toDisplayString(option.label), 1),
|
|
62
|
-
option.color !== "$checkerboard" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
63
|
-
createElementVNode("span", _hoisted_7, toDisplayString(option.color), 1),
|
|
64
|
-
createElementVNode("div", {
|
|
65
|
-
class: "htw-w-4 htw-h-4 htw-rounded-full htw-border htw-border-black/20 dark:htw-border-white/20 htw-flex htw-items-center htw-justify-center htw-text-xs",
|
|
66
|
-
style: normalizeStyle({
|
|
67
|
-
backgroundColor: option.color,
|
|
68
|
-
color: option.contrastColor
|
|
69
|
-
})
|
|
70
|
-
}, [
|
|
71
|
-
option.contrastColor ? (openBlock(), createElementBlock("span", _hoisted_8, "a")) : createCommentVNode("", true)
|
|
72
|
-
], 4)
|
|
73
|
-
], 64)) : createCommentVNode("", true)
|
|
74
|
-
], 10, _hoisted_5);
|
|
75
|
-
}), 128))
|
|
76
|
-
])
|
|
77
|
-
]),
|
|
78
|
-
default: withCtx(() => [
|
|
79
|
-
withDirectives((openBlock(), createElementBlock("div", _hoisted_1, [
|
|
80
|
-
createElementVNode("div", _hoisted_2, [
|
|
81
|
-
contrastColor.value ? (openBlock(), createElementBlock("span", _hoisted_3, "a")) : createCommentVNode("", true)
|
|
82
|
-
]),
|
|
83
|
-
createVNode(unref(Icon), {
|
|
84
|
-
icon: "carbon:caret-down",
|
|
85
|
-
class: "htw-w-4 htw-h-4 htw-opacity-50 group-hover:htw-opacity-100"
|
|
86
|
-
})
|
|
87
|
-
])), [
|
|
88
|
-
[_directive_tooltip, "Background color"]
|
|
89
|
-
])
|
|
90
|
-
]),
|
|
91
|
-
_: 1
|
|
92
|
-
})) : createCommentVNode("", true);
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
export {
|
|
97
|
-
_sfc_main as default
|
|
98
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, resolveDirective, withDirectives, createElementBlock, openBlock, createVNode, unref } from "@poveste/vendors/vue";
|
|
2
|
-
import { Icon } from "@poveste/vendors/iconify";
|
|
3
|
-
import { getSandboxUrl } from "../../util/sandbox.js";
|
|
4
|
-
"use strict";
|
|
5
|
-
const _hoisted_1 = ["href"];
|
|
6
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
-
__name: "ToolbarNewTab",
|
|
8
|
-
props: {
|
|
9
|
-
variant: {},
|
|
10
|
-
story: {}
|
|
11
|
-
},
|
|
12
|
-
setup(__props) {
|
|
13
|
-
const props = __props;
|
|
14
|
-
const sandboxUrl = computed(() => {
|
|
15
|
-
return getSandboxUrl(props.story, props.variant);
|
|
16
|
-
});
|
|
17
|
-
return (_ctx, _cache) => {
|
|
18
|
-
const _directive_tooltip = resolveDirective("tooltip");
|
|
19
|
-
return withDirectives((openBlock(), createElementBlock("a", {
|
|
20
|
-
href: sandboxUrl.value,
|
|
21
|
-
target: "_blank",
|
|
22
|
-
class: "histoire-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
|
-
}, [
|
|
24
|
-
createVNode(unref(Icon), {
|
|
25
|
-
icon: "carbon:launch",
|
|
26
|
-
class: "htw-w-4 htw-h-4"
|
|
27
|
-
})
|
|
28
|
-
], 8, _hoisted_1)), [
|
|
29
|
-
[_directive_tooltip, "Open variant in new tab"]
|
|
30
|
-
]);
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
export {
|
|
35
|
-
_sfc_main as default
|
|
36
|
-
};
|