@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
|
@@ -122,39 +122,39 @@ const sizeTooltip = computed(() => `${responsiveWidth.value ?? 'Auto'} × ${resp
|
|
|
122
122
|
</script>
|
|
123
123
|
|
|
124
124
|
<template>
|
|
125
|
-
<div class="poveste-story-responsive-preview
|
|
125
|
+
<div class="poveste-story-responsive-preview w-full h-full flex-1 rounded-lg relative overflow-hidden">
|
|
126
126
|
<div
|
|
127
127
|
v-if="isResponsiveEnabled"
|
|
128
|
-
class="
|
|
128
|
+
class="absolute inset-0 w-full h-full bg-gray-100 dark:bg-gray-750 rounded-r-lg border-l-2 border-gray-500/10 dark:border-gray-700/30 overflow-hidden"
|
|
129
129
|
>
|
|
130
130
|
<HatchedPattern
|
|
131
|
-
class="
|
|
131
|
+
class="w-full h-full text-black/[1%] dark:text-white/[1%]"
|
|
132
132
|
/>
|
|
133
133
|
</div>
|
|
134
134
|
|
|
135
135
|
<div
|
|
136
136
|
ref="previewWrapper"
|
|
137
|
-
class="
|
|
137
|
+
class="h-full overflow-auto relative"
|
|
138
138
|
>
|
|
139
139
|
<div
|
|
140
|
-
class="
|
|
140
|
+
class="overflow-hidden bg-white dark:bg-gray-700 rounded-lg relative"
|
|
141
141
|
:class="isResponsiveEnabled ? {
|
|
142
|
-
'
|
|
143
|
-
'
|
|
144
|
-
'
|
|
145
|
-
} : '
|
|
142
|
+
'w-fit': !!finalWidth,
|
|
143
|
+
'h-fit': !!finalHeight,
|
|
144
|
+
'h-full': !finalHeight,
|
|
145
|
+
} : 'h-full'"
|
|
146
146
|
>
|
|
147
147
|
<div
|
|
148
|
-
class="bind-preview-bg
|
|
148
|
+
class="bind-preview-bg rounded-lg h-full"
|
|
149
149
|
data-test-id="responsive-preview-bg"
|
|
150
150
|
>
|
|
151
151
|
<CheckerboardPattern
|
|
152
152
|
v-if="settings.checkerboard"
|
|
153
|
-
class="
|
|
153
|
+
class="absolute inset-0 w-full h-full text-gray-500/20"
|
|
154
154
|
/>
|
|
155
|
-
<div class="
|
|
156
|
-
<div class="
|
|
157
|
-
<div class="
|
|
155
|
+
<div class="p-8 h-full relative">
|
|
156
|
+
<div class="w-full h-full relative">
|
|
157
|
+
<div class="absolute inset-0" />
|
|
158
158
|
|
|
159
159
|
<slot
|
|
160
160
|
:is-responsive-enabled="isResponsiveEnabled"
|
|
@@ -165,14 +165,14 @@ const sizeTooltip = computed(() => `${responsiveWidth.value ?? 'Auto'} × ${resp
|
|
|
165
165
|
</div>
|
|
166
166
|
|
|
167
167
|
<!-- Markers -->
|
|
168
|
-
<div class="
|
|
169
|
-
<div class="
|
|
170
|
-
<div class="
|
|
171
|
-
<div class="
|
|
172
|
-
<div class="
|
|
173
|
-
<div class="
|
|
174
|
-
<div class="
|
|
175
|
-
<div class="
|
|
168
|
+
<div class="absolute top-5 left-8 h-2 w-px bg-gray-400/25" />
|
|
169
|
+
<div class="absolute top-5 right-8 h-2 w-px bg-gray-400/25" />
|
|
170
|
+
<div class="absolute bottom-5 left-8 h-2 w-px bg-gray-400/25" />
|
|
171
|
+
<div class="absolute bottom-5 right-8 h-2 w-px bg-gray-400/25" />
|
|
172
|
+
<div class="absolute left-5 top-8 w-2 h-px bg-gray-400/25" />
|
|
173
|
+
<div class="absolute left-5 bottom-8 w-2 h-px bg-gray-400/25" />
|
|
174
|
+
<div class="absolute right-5 top-8 w-2 h-px bg-gray-400/25" />
|
|
175
|
+
<div class="absolute right-5 bottom-8 w-2 h-px bg-gray-400/25" />
|
|
176
176
|
</div>
|
|
177
177
|
|
|
178
178
|
<!-- Resize Dragger -->
|
|
@@ -180,27 +180,27 @@ const sizeTooltip = computed(() => `${responsiveWidth.value ?? 'Auto'} × ${resp
|
|
|
180
180
|
<div
|
|
181
181
|
ref="horizontalDragger"
|
|
182
182
|
v-tooltip.right="sizeTooltip"
|
|
183
|
-
class="
|
|
183
|
+
class="absolute w-4 top-0 bottom-4 right-0 hover:bg-primary-500/30 flex items-center justify-center cursor-ew-resize group hover:text-primary-500"
|
|
184
184
|
>
|
|
185
185
|
<Icon
|
|
186
186
|
icon="mdi:drag-vertical-variant"
|
|
187
|
-
class="
|
|
187
|
+
class="w-4 h-4 opacity-20 group-hover:opacity-90"
|
|
188
188
|
/>
|
|
189
189
|
</div>
|
|
190
190
|
<div
|
|
191
191
|
ref="verticalDragger"
|
|
192
192
|
v-tooltip.bottom="sizeTooltip"
|
|
193
|
-
class="
|
|
193
|
+
class="absolute h-4 left-0 right-4 bottom-0 hover:bg-primary-500/30 flex items-center justify-center cursor-ns-resize group hover:text-primary-500"
|
|
194
194
|
>
|
|
195
195
|
<Icon
|
|
196
196
|
icon="mdi:drag-horizontal-variant"
|
|
197
|
-
class="
|
|
197
|
+
class="w-4 h-4 opacity-20 group-hover:opacity-90"
|
|
198
198
|
/>
|
|
199
199
|
</div>
|
|
200
200
|
<div
|
|
201
201
|
ref="cornerDragger"
|
|
202
202
|
v-tooltip.bottom="sizeTooltip"
|
|
203
|
-
class="
|
|
203
|
+
class="absolute w-4 h-4 right-0 bottom-0 hover:bg-primary-500/30 flex items-center justify-center cursor-nwse-resize group hover:text-primary-500"
|
|
204
204
|
/>
|
|
205
205
|
</template>
|
|
206
206
|
</div>
|
|
@@ -115,22 +115,22 @@ const columnCount = computed(() => Math.min(storyStore.currentStory.variants.len
|
|
|
115
115
|
</script>
|
|
116
116
|
|
|
117
117
|
<template>
|
|
118
|
-
<div class="poveste-story-variant-grid
|
|
118
|
+
<div class="poveste-story-variant-grid flex flex-col items-stretch h-full __poveste-pane-shadow-from-right">
|
|
119
119
|
<div
|
|
120
120
|
ref="el"
|
|
121
|
-
class="
|
|
121
|
+
class="overflow-y-auto flex flex-1"
|
|
122
122
|
@scroll="updateMaxCount()"
|
|
123
123
|
>
|
|
124
|
-
<div class="
|
|
124
|
+
<div class="flex w-0 flex-1 mx-4">
|
|
125
125
|
<div
|
|
126
|
-
class="
|
|
126
|
+
class="m-auto"
|
|
127
127
|
:style="{
|
|
128
128
|
minHeight: `${(storyStore.currentStory.variants.length / countPerRow) * (maxItemHeight + gap) - gap}px`,
|
|
129
129
|
}"
|
|
130
130
|
>
|
|
131
131
|
<div
|
|
132
132
|
ref="gridEl"
|
|
133
|
-
class="
|
|
133
|
+
class="grid gap-4 my-4"
|
|
134
134
|
:style="{
|
|
135
135
|
gridTemplateColumns: `repeat(${columnCount}, ${gridColumnWidth}px)`,
|
|
136
136
|
}"
|
|
@@ -7,6 +7,7 @@ import { useResizeObserver } from '@vueuse/core'
|
|
|
7
7
|
import { computed, ref, toRefs } from 'vue'
|
|
8
8
|
import { useRouter } from 'vue-router'
|
|
9
9
|
import { usePreviewSettingsStore } from '../../stores/preview-settings'
|
|
10
|
+
import { useStoryStore } from '../../stores/story'
|
|
10
11
|
import { usePreviewDark } from '../../util/color-scheme'
|
|
11
12
|
import { povesteConfig } from '../../util/config'
|
|
12
13
|
import { getSourceCode } from '../../util/docs'
|
|
@@ -37,13 +38,12 @@ const emit = defineEmits({
|
|
|
37
38
|
const { variant } = toRefs(props)
|
|
38
39
|
const { isActive, targetRoute } = useCurrentVariantRoute(variant)
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
const storyStore = useStoryStore()
|
|
42
|
+
|
|
43
|
+
storyStore.setPreviewReady(props.variant, false)
|
|
44
|
+
|
|
43
45
|
function onReady() {
|
|
44
|
-
|
|
45
|
-
previewReady: true,
|
|
46
|
-
})
|
|
46
|
+
storyStore.setPreviewReady(props.variant, true)
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
const router = useRouter()
|
|
@@ -84,32 +84,32 @@ const useIframe = computed(() => {
|
|
|
84
84
|
<template>
|
|
85
85
|
<div
|
|
86
86
|
ref="el"
|
|
87
|
-
class="poveste-story-variant-grid-item
|
|
87
|
+
class="poveste-story-variant-grid-item cursor-default flex flex-col gap-y-1 group"
|
|
88
88
|
>
|
|
89
89
|
<!-- Header -->
|
|
90
|
-
<div class="
|
|
90
|
+
<div class="flex-none flex items-center">
|
|
91
91
|
<RouterLink
|
|
92
92
|
v-tooltip="variant.title"
|
|
93
93
|
:to="targetRoute"
|
|
94
|
-
class="
|
|
94
|
+
class="rounded w-max px-2 py-0.5 min-w-16 cursor-pointer flex items-center gap-1 flex-shrink"
|
|
95
95
|
:class="{
|
|
96
|
-
'hover:
|
|
97
|
-
'
|
|
96
|
+
'hover:bg-gray-200 text-gray-500 dark:hover:bg-gray-800': !isActive,
|
|
97
|
+
'bg-primary-200 hover:bg-primary-300 text-primary-800 dark:bg-primary-700 dark:hover:bg-primary-800 dark:text-primary-200': isActive,
|
|
98
98
|
}"
|
|
99
99
|
>
|
|
100
100
|
<Icon
|
|
101
101
|
:icon="variant.icon ?? 'carbon:cube'"
|
|
102
|
-
class="
|
|
102
|
+
class="w-4 h-4 opacity-50"
|
|
103
103
|
:class="{
|
|
104
|
-
'
|
|
104
|
+
'text-gray-500': !isActive && !variant.iconColor,
|
|
105
105
|
'bind-icon-color': !isActive && variant.iconColor,
|
|
106
106
|
}"
|
|
107
107
|
/>
|
|
108
|
-
<span class="
|
|
108
|
+
<span class="truncate flex-1">{{ variant.title }}</span>
|
|
109
109
|
</RouterLink>
|
|
110
110
|
|
|
111
111
|
<!-- Toolbar -->
|
|
112
|
-
<div class="
|
|
112
|
+
<div class="flex-none ml-auto hidden group-hover:flex items-center">
|
|
113
113
|
<HstCopyIcon
|
|
114
114
|
:content="() => getSourceCode(story, variant)"
|
|
115
115
|
/>
|
|
@@ -122,27 +122,27 @@ const useIframe = computed(() => {
|
|
|
122
122
|
|
|
123
123
|
<!-- Body -->
|
|
124
124
|
<div
|
|
125
|
-
class="
|
|
125
|
+
class="border bg-white dark:bg-gray-700 rounded flex-1 p-4 relative"
|
|
126
126
|
:class="{
|
|
127
|
-
'
|
|
128
|
-
'
|
|
127
|
+
'border-gray-100 dark:border-gray-800': !isActive,
|
|
128
|
+
'border-primary-200 dark:border-primary-900': isActive,
|
|
129
129
|
}"
|
|
130
130
|
data-test-id="sandbox-render"
|
|
131
131
|
@click.stop="selectVariant()"
|
|
132
132
|
@keyup="selectVariant()"
|
|
133
133
|
>
|
|
134
134
|
<div
|
|
135
|
-
class="
|
|
135
|
+
class="absolute inset-0 rounded bind-preview-bg"
|
|
136
136
|
data-test-id="responsive-preview-bg"
|
|
137
137
|
/>
|
|
138
138
|
|
|
139
139
|
<CheckerboardPattern
|
|
140
140
|
v-if="settings.checkerboard"
|
|
141
|
-
class="
|
|
141
|
+
class="absolute inset-0 w-full h-full text-gray-500/20"
|
|
142
142
|
/>
|
|
143
143
|
|
|
144
144
|
<div
|
|
145
|
-
class="
|
|
145
|
+
class="relative h-full"
|
|
146
146
|
:style="{
|
|
147
147
|
'--poveste-contrast-color': contrastColor,
|
|
148
148
|
// Deprecated alias — keep so stories referencing `var(--histoire-contrast-color)` still work.
|
|
@@ -30,17 +30,17 @@ useScrollOnActive(isActive, el)
|
|
|
30
30
|
v-slot="{ active }"
|
|
31
31
|
:to="targetRoute"
|
|
32
32
|
:is-active="isActive"
|
|
33
|
-
class="
|
|
33
|
+
class="px-2 py-2 md:py-1.5 m-1 rounded-sm flex items-center gap-2"
|
|
34
34
|
>
|
|
35
35
|
<Icon
|
|
36
36
|
:icon="variant.icon ?? 'carbon:cube'"
|
|
37
|
-
class="
|
|
37
|
+
class="w-5 h-5 sm:w-4 sm:h-4 flex-none"
|
|
38
38
|
:class="{
|
|
39
|
-
'
|
|
39
|
+
'text-gray-500': !active && !variant.iconColor,
|
|
40
40
|
'bind-icon-color': !active && variant.iconColor,
|
|
41
41
|
}"
|
|
42
42
|
/>
|
|
43
|
-
<span class="
|
|
43
|
+
<span class="truncate">{{ variant.title }}</span>
|
|
44
44
|
</BaseListItemLink>
|
|
45
45
|
</div>
|
|
46
46
|
</template>
|
|
@@ -21,7 +21,7 @@ const variant = computed(() => storyStore.currentVariant)
|
|
|
21
21
|
<template>
|
|
22
22
|
<div
|
|
23
23
|
v-if="hasSingleVariant && variant"
|
|
24
|
-
class="poveste-story-variant-single
|
|
24
|
+
class="poveste-story-variant-single p-2 h-full __poveste-pane-shadow-from-right"
|
|
25
25
|
>
|
|
26
26
|
<StoryVariantSingleView
|
|
27
27
|
:variant="variant"
|
|
@@ -31,18 +31,18 @@ const variant = computed(() => storyStore.currentVariant)
|
|
|
31
31
|
<template v-else>
|
|
32
32
|
<div
|
|
33
33
|
v-if="isMobile"
|
|
34
|
-
class="
|
|
34
|
+
class="divide-y divide-gray-100 dark:divide-gray-800 h-full flex flex-col"
|
|
35
35
|
>
|
|
36
36
|
<a
|
|
37
|
-
class="
|
|
37
|
+
class="px-6 h-12 hover:text-primary-500 dark:hover:text-primary-400 cursor-pointer flex gap-2 flex-wrap w-full items-center flex-none"
|
|
38
38
|
@click="$emit('openVariantMenu')"
|
|
39
39
|
>
|
|
40
40
|
<template v-if="variant">
|
|
41
41
|
<Icon
|
|
42
42
|
:icon="variant.icon ?? 'carbon:cube'"
|
|
43
|
-
class="
|
|
43
|
+
class="w-5 h-5 flex-none"
|
|
44
44
|
:class="{
|
|
45
|
-
'
|
|
45
|
+
'text-gray-500': !variant.iconColor,
|
|
46
46
|
'bind-icon-color': variant.iconColor,
|
|
47
47
|
}"
|
|
48
48
|
/>
|
|
@@ -54,12 +54,12 @@ const variant = computed(() => storyStore.currentVariant)
|
|
|
54
54
|
|
|
55
55
|
<Icon
|
|
56
56
|
icon="carbon:chevron-sort"
|
|
57
|
-
class="
|
|
57
|
+
class="w-5 h-5 shrink-0 ml-auto"
|
|
58
58
|
/>
|
|
59
59
|
</a>
|
|
60
60
|
<div
|
|
61
61
|
v-if="storyStore.currentVariant"
|
|
62
|
-
class="
|
|
62
|
+
class="p-2 h-full"
|
|
63
63
|
>
|
|
64
64
|
<StoryVariantSingleView
|
|
65
65
|
:variant="storyStore.currentVariant"
|
|
@@ -75,7 +75,7 @@ const variant = computed(() => storyStore.currentVariant)
|
|
|
75
75
|
:default-split="17"
|
|
76
76
|
>
|
|
77
77
|
<template #first>
|
|
78
|
-
<div class="
|
|
78
|
+
<div class="h-full overflow-y-auto">
|
|
79
79
|
<StoryVariantListItem
|
|
80
80
|
v-for="(v, index) of storyStore.currentStory.variants"
|
|
81
81
|
:key="index"
|
|
@@ -86,7 +86,7 @@ const variant = computed(() => storyStore.currentVariant)
|
|
|
86
86
|
<template #last>
|
|
87
87
|
<div
|
|
88
88
|
v-if="storyStore.currentVariant"
|
|
89
|
-
class="
|
|
89
|
+
class="p-2 h-full __poveste-pane-shadow-from-right"
|
|
90
90
|
>
|
|
91
91
|
<StoryVariantSingleView
|
|
92
92
|
:variant="storyStore.currentVariant"
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { Story, Variant } from '../../types'
|
|
3
3
|
import { computed } from 'vue'
|
|
4
4
|
import { usePreviewSettingsStore } from '../../stores/preview-settings'
|
|
5
|
+
import { useStoryStore } from '../../stores/story'
|
|
5
6
|
import { usePreviewDark } from '../../util/color-scheme'
|
|
6
7
|
import { povesteConfig } from '../../util/config'
|
|
7
8
|
import { getContrastColor } from '../../util/preview-settings'
|
|
@@ -13,14 +14,12 @@ const props = defineProps<{
|
|
|
13
14
|
variant: Variant
|
|
14
15
|
}>()
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const storyStore = useStoryStore()
|
|
18
|
+
|
|
19
|
+
storyStore.setPreviewReady(props.variant, false)
|
|
19
20
|
|
|
20
21
|
function onReady() {
|
|
21
|
-
|
|
22
|
-
previewReady: true,
|
|
23
|
-
})
|
|
22
|
+
storyStore.setPreviewReady(props.variant, true)
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
const settings = usePreviewSettingsStore().currentSettings
|
|
@@ -50,14 +49,14 @@ const autoApplyContrastColor = computed(() => !!povesteConfig.autoApplyContrastC
|
|
|
50
49
|
'color': autoApplyContrastColor ? contrastColor : undefined,
|
|
51
50
|
},
|
|
52
51
|
]"
|
|
53
|
-
class="
|
|
52
|
+
class="relative"
|
|
54
53
|
data-test-id="sandbox-render"
|
|
55
54
|
>
|
|
56
55
|
<GenericRenderStory
|
|
57
56
|
:key="`${story.id}-${variant.id}`"
|
|
58
57
|
:variant="variant"
|
|
59
58
|
:story="story"
|
|
60
|
-
class="
|
|
59
|
+
class="h-full"
|
|
61
60
|
:class="{
|
|
62
61
|
[povesteConfig.sandboxDarkClass]: previewDark, // @TODO remove
|
|
63
62
|
[povesteConfig.theme.darkClass]: previewDark,
|
|
@@ -6,6 +6,7 @@ import { useEventListener } from '@vueuse/core'
|
|
|
6
6
|
import { computed, onBeforeUnmount, ref, toRaw, watch } from 'vue'
|
|
7
7
|
import { useEventsStore } from '../../stores/events'
|
|
8
8
|
import { usePreviewSettingsStore } from '../../stores/preview-settings'
|
|
9
|
+
import { useStoryStore } from '../../stores/story'
|
|
9
10
|
import { EVENT_SEND, PREVIEW_SETTINGS_SYNC, SANDBOX_HEIGHT, SANDBOX_READY, STATE_SYNC } from '../../util/const'
|
|
10
11
|
import { trackWindow } from '../../util/keyboard'
|
|
11
12
|
import { getSandboxUrl } from '../../util/sandbox'
|
|
@@ -33,6 +34,11 @@ function syncState() {
|
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
|
|
37
|
+
// The host end of the bridge, and the same flag as `plugin-vue`'s state sync
|
|
38
|
+
// with the same #95 caveat: `synced` may only be set when the write below will
|
|
39
|
+
// actually provoke the watcher. `applyState` reports that now. Setting it
|
|
40
|
+
// unconditionally means an apply that changes nothing leaves it set, and the
|
|
41
|
+
// next real edit is skipped instead — a control that does nothing.
|
|
36
42
|
let synced = false
|
|
37
43
|
|
|
38
44
|
watch(() => props.variant.state, () => {
|
|
@@ -46,9 +52,9 @@ watch(() => props.variant.state, () => {
|
|
|
46
52
|
immediate: true,
|
|
47
53
|
})
|
|
48
54
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
const storyStore = useStoryStore()
|
|
56
|
+
|
|
57
|
+
storyStore.setPreviewReady(props.variant, false)
|
|
52
58
|
|
|
53
59
|
const reportedHeight = ref<number | null>(null)
|
|
54
60
|
|
|
@@ -76,8 +82,7 @@ useEventListener(window, 'message', (event) => {
|
|
|
76
82
|
})
|
|
77
83
|
|
|
78
84
|
function updateVariantState(state: any) {
|
|
79
|
-
synced =
|
|
80
|
-
applyState(props.variant.state, state)
|
|
85
|
+
synced = applyState(props.variant.state, state)
|
|
81
86
|
}
|
|
82
87
|
|
|
83
88
|
function logEvent(event: HstEvent) {
|
|
@@ -86,9 +91,7 @@ function logEvent(event: HstEvent) {
|
|
|
86
91
|
}
|
|
87
92
|
|
|
88
93
|
function setPreviewReady() {
|
|
89
|
-
|
|
90
|
-
previewReady: true,
|
|
91
|
-
})
|
|
94
|
+
storyStore.setPreviewReady(props.variant, true)
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
const sandboxUrl = computed(() => {
|
|
@@ -102,9 +105,7 @@ let unmounted = false
|
|
|
102
105
|
|
|
103
106
|
watch(sandboxUrl, () => {
|
|
104
107
|
isIframeLoaded.value = false
|
|
105
|
-
|
|
106
|
-
previewReady: false,
|
|
107
|
-
})
|
|
108
|
+
storyStore.setPreviewReady(props.variant, false)
|
|
108
109
|
stopTrackKeyboard?.()
|
|
109
110
|
stopTrackKeyboard = undefined
|
|
110
111
|
})
|
|
@@ -157,10 +158,10 @@ function onIframeLoad() {
|
|
|
157
158
|
<iframe
|
|
158
159
|
ref="iframe"
|
|
159
160
|
:src="sandboxUrl"
|
|
160
|
-
class="
|
|
161
|
+
class="w-full h-full relative"
|
|
161
162
|
:class="{
|
|
162
|
-
'
|
|
163
|
-
'
|
|
163
|
+
'invisible': !isIframeLoaded,
|
|
164
|
+
'pointer-events-none': resizing,
|
|
164
165
|
}"
|
|
165
166
|
:style="isResponsiveEnabled ? {
|
|
166
167
|
width: finalWidth ? `${finalWidth}px` : null,
|
|
@@ -11,7 +11,7 @@ defineProps<{
|
|
|
11
11
|
|
|
12
12
|
<template>
|
|
13
13
|
<div
|
|
14
|
-
class="poveste-story-variant-single-view
|
|
14
|
+
class="poveste-story-variant-single-view h-full flex flex-col"
|
|
15
15
|
data-test-id="story-variant-single-view"
|
|
16
16
|
>
|
|
17
17
|
<StoryVariantSinglePreviewNative
|
|
@@ -77,23 +77,23 @@ function scrollDocsToTop() {
|
|
|
77
77
|
>
|
|
78
78
|
<Icon
|
|
79
79
|
icon="carbon:software-resource-resource"
|
|
80
|
-
class="
|
|
80
|
+
class="w-16 h-16 opacity-50"
|
|
81
81
|
/>
|
|
82
82
|
</BaseEmpty>
|
|
83
83
|
|
|
84
84
|
<div
|
|
85
85
|
v-else
|
|
86
|
-
class="poveste-story-view poveste-with-story
|
|
86
|
+
class="poveste-story-view poveste-with-story h-full"
|
|
87
87
|
>
|
|
88
88
|
<div
|
|
89
89
|
v-if="storyStore.currentStory.docsOnly"
|
|
90
90
|
ref="docsOnlyScroller"
|
|
91
|
-
class="
|
|
91
|
+
class="h-full overflow-auto"
|
|
92
92
|
>
|
|
93
93
|
<StoryDocs
|
|
94
94
|
:story="storyStore.currentStory"
|
|
95
95
|
standalone
|
|
96
|
-
class="md:
|
|
96
|
+
class="md:p-12 w-full md:max-w-[600px] lg:max-w-[800px] xl:max-w-[900px]"
|
|
97
97
|
@scroll-top="scrollDocsToTop()"
|
|
98
98
|
/>
|
|
99
99
|
</div>
|
|
@@ -111,7 +111,7 @@ function scrollDocsToTop() {
|
|
|
111
111
|
:max="95"
|
|
112
112
|
:default-split="splitDefaultSplit"
|
|
113
113
|
:show-divider="false"
|
|
114
|
-
class="
|
|
114
|
+
class="h-full"
|
|
115
115
|
>
|
|
116
116
|
<template #first>
|
|
117
117
|
<StoryViewer />
|
|
@@ -22,7 +22,7 @@ watch(variant, () => {
|
|
|
22
22
|
</script>
|
|
23
23
|
|
|
24
24
|
<template>
|
|
25
|
-
<div class="poveste-story-viewer
|
|
25
|
+
<div class="poveste-story-viewer bg-gray-50 h-full dark:bg-gray-750">
|
|
26
26
|
<StoryVariantGrid
|
|
27
27
|
v-if="storyStore.currentStory.layout.type === 'grid'"
|
|
28
28
|
/>
|
|
@@ -25,7 +25,7 @@ const showDropdown = showColorScheme || !!povesteConfig.backgroundPresets.length
|
|
|
25
25
|
v-if="showDropdown"
|
|
26
26
|
placement="bottom-end"
|
|
27
27
|
:skidding="6"
|
|
28
|
-
class="poveste-toolbar-background
|
|
28
|
+
class="poveste-toolbar-background flex-none"
|
|
29
29
|
data-test-id="toolbar-background"
|
|
30
30
|
>
|
|
31
31
|
<!-- The tooltip would sit on top of the first row of the dropdown, so drop
|
|
@@ -33,44 +33,44 @@ const showDropdown = showColorScheme || !!povesteConfig.backgroundPresets.length
|
|
|
33
33
|
<template #default="{ shown }">
|
|
34
34
|
<div
|
|
35
35
|
v-tooltip="shown ? '' : 'Preview appearance'"
|
|
36
|
-
class="
|
|
36
|
+
class="flex items-center gap-1 px-2.5 py-1.5 hover:bg-white/50 dark:hover:bg-white/10 hover:text-primary-500 dark:hover:text-primary-400 cursor-pointer text-gray-900 dark:text-gray-100 transition-colors group"
|
|
37
37
|
>
|
|
38
38
|
<Icon
|
|
39
39
|
icon="carbon:color-palette"
|
|
40
|
-
class="
|
|
40
|
+
class="w-4 h-4"
|
|
41
41
|
/>
|
|
42
42
|
<Icon
|
|
43
43
|
icon="carbon:chevron-down"
|
|
44
|
-
class="
|
|
44
|
+
class="w-3 h-3 opacity-40 group-hover:opacity-70"
|
|
45
45
|
/>
|
|
46
46
|
</div>
|
|
47
47
|
</template>
|
|
48
48
|
|
|
49
49
|
<template #popper="{ hide }">
|
|
50
50
|
<div
|
|
51
|
-
class="
|
|
51
|
+
class="flex flex-col items-stretch"
|
|
52
52
|
data-test-id="background-popper"
|
|
53
53
|
>
|
|
54
54
|
<div
|
|
55
55
|
v-if="showColorScheme"
|
|
56
|
-
class="
|
|
56
|
+
class="flex items-stretch gap-1 px-2 pt-2"
|
|
57
57
|
data-test-id="sandbox-color-scheme"
|
|
58
58
|
>
|
|
59
59
|
<button
|
|
60
60
|
v-for="option in colorSchemeOptions"
|
|
61
61
|
:key="option.value"
|
|
62
62
|
:data-test-id="`sandbox-color-scheme-${option.value}`"
|
|
63
|
-
class="
|
|
63
|
+
class="flex-1 px-3 py-1.5 rounded flex items-center justify-center gap-1.5 cursor-pointer text-sm"
|
|
64
64
|
:class="[
|
|
65
65
|
settings.colorScheme === option.value
|
|
66
|
-
? '
|
|
67
|
-
: '
|
|
66
|
+
? 'bg-primary-500 hover:bg-primary-600 text-white dark:text-black'
|
|
67
|
+
: 'bg-transparent hover:bg-primary-100 dark:hover:bg-primary-700',
|
|
68
68
|
]"
|
|
69
69
|
@click="settings.colorScheme = option.value"
|
|
70
70
|
>
|
|
71
71
|
<Icon
|
|
72
72
|
:icon="option.icon"
|
|
73
|
-
class="
|
|
73
|
+
class="w-4 h-4"
|
|
74
74
|
/>
|
|
75
75
|
<span>{{ option.label }}</span>
|
|
76
76
|
</button>
|
|
@@ -83,19 +83,19 @@ const showDropdown = showColorScheme || !!povesteConfig.backgroundPresets.length
|
|
|
83
83
|
<button
|
|
84
84
|
v-for="(option, index) in povesteConfig.backgroundPresets"
|
|
85
85
|
:key="index"
|
|
86
|
-
class="
|
|
86
|
+
class="px-4 py-3 cursor-pointer text-left flex items-baseline gap-4"
|
|
87
87
|
:class="[
|
|
88
88
|
settings.backgroundColor === option.color
|
|
89
|
-
? '
|
|
90
|
-
: '
|
|
89
|
+
? 'bg-primary-500 hover:bg-primary-600 text-white dark:text-black'
|
|
90
|
+
: 'bg-transparent hover:bg-primary-100 dark:hover:bg-primary-700',
|
|
91
91
|
]"
|
|
92
92
|
@click="previewSettings.setBackgroundColor(option.color);hide()"
|
|
93
93
|
>
|
|
94
|
-
<span class="
|
|
94
|
+
<span class="mr-auto">{{ option.label }}</span>
|
|
95
95
|
<template v-if="option.color !== '$checkerboard'">
|
|
96
|
-
<span class="
|
|
96
|
+
<span class="ml-auto opacity-70">{{ option.color }}</span>
|
|
97
97
|
<div
|
|
98
|
-
class="
|
|
98
|
+
class="w-4 h-4 rounded-full border border-black/20 dark:border-white/20 flex items-center justify-center text-xs"
|
|
99
99
|
:style="{
|
|
100
100
|
backgroundColor: option.color,
|
|
101
101
|
color: option.contrastColor,
|