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