@poveste/app 0.2.1 → 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,207 +0,0 @@
|
|
|
1
|
-
import { defineComponent, useCssVars, unref, ref, onUnmounted, computed, createElementBlock, openBlock, createCommentVNode, createElementVNode, createVNode, normalizeClass, createBlock, createStaticVNode, renderSlot, Fragment, withDirectives } from "@poveste/vendors/vue";
|
|
2
|
-
import { Icon } from "@poveste/vendors/iconify";
|
|
3
|
-
import { useEventListener } from "@poveste/vendors/vue-use";
|
|
4
|
-
import { VTooltip } from "@poveste/vendors/floating-vue";
|
|
5
|
-
import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
6
|
-
import CheckerboardPattern from "../misc/CheckerboardPattern.vue.js";
|
|
7
|
-
import HatchedPattern from "../misc/HatchedPattern.vue.js";
|
|
8
|
-
"use strict";
|
|
9
|
-
const _hoisted_1 = { class: "poveste-story-responsive-preview ptw-w-full ptw-h-full ptw-flex-1 ptw-rounded-lg ptw-relative ptw-overflow-hidden" };
|
|
10
|
-
const _hoisted_2 = {
|
|
11
|
-
key: 0,
|
|
12
|
-
class: "ptw-absolute ptw-inset-0 ptw-w-full ptw-h-full ptw-bg-gray-100 dark:ptw-bg-gray-750 ptw-rounded-r-lg ptw-border-l-2 ptw-border-gray-500/10 dark:ptw-border-gray-700/30 ptw-overflow-hidden"
|
|
13
|
-
};
|
|
14
|
-
const _hoisted_3 = {
|
|
15
|
-
class: "bind-preview-bg ptw-rounded-lg ptw-h-full",
|
|
16
|
-
"data-test-id": "responsive-preview-bg"
|
|
17
|
-
};
|
|
18
|
-
const _hoisted_4 = { class: "ptw-p-8 ptw-h-full ptw-relative" };
|
|
19
|
-
const _hoisted_5 = { class: "ptw-w-full ptw-h-full ptw-relative" };
|
|
20
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
21
|
-
__name: "StoryResponsivePreview",
|
|
22
|
-
props: {
|
|
23
|
-
variant: {}
|
|
24
|
-
},
|
|
25
|
-
setup(__props) {
|
|
26
|
-
useCssVars((_ctx) => ({
|
|
27
|
-
"v2ebc4fb8": unref(settings).backgroundColor
|
|
28
|
-
}));
|
|
29
|
-
const props = __props;
|
|
30
|
-
const settings = usePreviewSettingsStore().currentSettings;
|
|
31
|
-
const resizing = ref(false);
|
|
32
|
-
const onUnmountedCleanupFns = [];
|
|
33
|
-
onUnmounted(() => {
|
|
34
|
-
onUnmountedCleanupFns.forEach((fn) => fn());
|
|
35
|
-
});
|
|
36
|
-
function addWindowListener(event, listener) {
|
|
37
|
-
window.addEventListener(event, listener);
|
|
38
|
-
const removeListener = () => window.removeEventListener(event, listener);
|
|
39
|
-
onUnmountedCleanupFns.push(removeListener);
|
|
40
|
-
return () => {
|
|
41
|
-
removeListener();
|
|
42
|
-
onUnmountedCleanupFns.splice(onUnmountedCleanupFns.indexOf(removeListener), 1);
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
function useDragger(el, value, min, max, axis) {
|
|
46
|
-
function onMouseDown(event) {
|
|
47
|
-
event.preventDefault();
|
|
48
|
-
event.stopPropagation();
|
|
49
|
-
const start = axis === "x" ? event.clientX : event.clientY;
|
|
50
|
-
const startValue = value.value ?? (axis === "x" ? previewWrapper.value.clientWidth - 67 : previewWrapper.value.clientHeight - 70);
|
|
51
|
-
resizing.value = true;
|
|
52
|
-
const removeListeners = [
|
|
53
|
-
addWindowListener("mousemove", onMouseMove),
|
|
54
|
-
addWindowListener("mouseup", onMouseUp)
|
|
55
|
-
];
|
|
56
|
-
function onMouseMove(event2) {
|
|
57
|
-
const snapTarget = axis === "x" ? previewWrapper.value.clientWidth : previewWrapper.value.clientHeight;
|
|
58
|
-
const delta = (axis === "x" ? event2.clientX : event2.clientY) - start;
|
|
59
|
-
value.value = Math.max(min, Math.min(max, startValue + delta));
|
|
60
|
-
if (Math.abs(value.value - (snapTarget - 67)) < 16) {
|
|
61
|
-
value.value = null;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
function onMouseUp() {
|
|
65
|
-
removeListeners.forEach((fn) => fn());
|
|
66
|
-
resizing.value = false;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
useEventListener(el, "mousedown", onMouseDown);
|
|
70
|
-
function onTouchStart(event) {
|
|
71
|
-
event.preventDefault();
|
|
72
|
-
event.stopPropagation();
|
|
73
|
-
const start = axis === "x" ? event.touches[0].clientX : event.touches[0].clientY;
|
|
74
|
-
const startValue = value.value;
|
|
75
|
-
resizing.value = true;
|
|
76
|
-
const removeListeners = [
|
|
77
|
-
addWindowListener("touchmove", onTouchMove),
|
|
78
|
-
addWindowListener("touchend", onTouchEnd),
|
|
79
|
-
addWindowListener("touchcancel", onTouchEnd)
|
|
80
|
-
];
|
|
81
|
-
function onTouchMove(event2) {
|
|
82
|
-
const delta = (axis === "x" ? event2.touches[0].clientX : event2.touches[0].clientY) - start;
|
|
83
|
-
value.value = Math.max(min, Math.min(max, startValue + delta));
|
|
84
|
-
}
|
|
85
|
-
function onTouchEnd() {
|
|
86
|
-
removeListeners.forEach((fn) => fn());
|
|
87
|
-
resizing.value = false;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
useEventListener(el, "touchstart", onTouchStart);
|
|
91
|
-
}
|
|
92
|
-
const responsiveWidth = computed({
|
|
93
|
-
get: () => settings[settings.rotate ? "responsiveHeight" : "responsiveWidth"],
|
|
94
|
-
set: (value) => {
|
|
95
|
-
settings[settings.rotate ? "responsiveHeight" : "responsiveWidth"] = value;
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
const responsiveHeight = computed({
|
|
99
|
-
get: () => settings[settings.rotate ? "responsiveWidth" : "responsiveHeight"],
|
|
100
|
-
set: (value) => {
|
|
101
|
-
settings[settings.rotate ? "responsiveWidth" : "responsiveHeight"] = value;
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
const horizontalDragger = ref();
|
|
105
|
-
const verticalDragger = ref();
|
|
106
|
-
const cornerDragger = ref();
|
|
107
|
-
const previewWrapper = ref();
|
|
108
|
-
useDragger(horizontalDragger, responsiveWidth, 32, 2e4, "x");
|
|
109
|
-
useDragger(verticalDragger, responsiveHeight, 32, 2e4, "y");
|
|
110
|
-
useDragger(cornerDragger, responsiveWidth, 32, 2e4, "x");
|
|
111
|
-
useDragger(cornerDragger, responsiveHeight, 32, 2e4, "y");
|
|
112
|
-
const finalWidth = computed(() => settings.rotate ? settings.responsiveHeight : settings.responsiveWidth);
|
|
113
|
-
const finalHeight = computed(() => settings.rotate ? settings.responsiveWidth : settings.responsiveHeight);
|
|
114
|
-
const isResponsiveEnabled = computed(() => !props.variant.responsiveDisabled);
|
|
115
|
-
const sizeTooltip = computed(() => `${responsiveWidth.value ?? "Auto"} × ${responsiveHeight.value ?? "Auto"}`);
|
|
116
|
-
return (_ctx, _cache) => {
|
|
117
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
118
|
-
isResponsiveEnabled.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
119
|
-
createVNode(HatchedPattern, { class: "ptw-w-full ptw-h-full ptw-text-black/[1%] dark:ptw-text-white/[1%]" })
|
|
120
|
-
])) : createCommentVNode("", true),
|
|
121
|
-
createElementVNode("div", {
|
|
122
|
-
ref_key: "previewWrapper",
|
|
123
|
-
ref: previewWrapper,
|
|
124
|
-
class: "ptw-h-full ptw-overflow-auto ptw-relative"
|
|
125
|
-
}, [
|
|
126
|
-
createElementVNode("div", {
|
|
127
|
-
class: normalizeClass(["ptw-overflow-hidden ptw-bg-white dark:ptw-bg-gray-700 ptw-rounded-lg ptw-relative", isResponsiveEnabled.value ? {
|
|
128
|
-
"ptw-w-fit": !!finalWidth.value,
|
|
129
|
-
"ptw-h-fit": !!finalHeight.value,
|
|
130
|
-
"ptw-h-full": !finalHeight.value
|
|
131
|
-
} : "ptw-h-full"])
|
|
132
|
-
}, [
|
|
133
|
-
createElementVNode("div", _hoisted_3, [
|
|
134
|
-
unref(settings).checkerboard ? (openBlock(), createBlock(CheckerboardPattern, {
|
|
135
|
-
key: 0,
|
|
136
|
-
class: "ptw-absolute ptw-inset-0 ptw-w-full ptw-h-full ptw-text-gray-500/20"
|
|
137
|
-
})) : createCommentVNode("", true),
|
|
138
|
-
createElementVNode("div", _hoisted_4, [
|
|
139
|
-
createElementVNode("div", _hoisted_5, [
|
|
140
|
-
_cache[0] || (_cache[0] = createElementVNode("div", { class: "ptw-absolute ptw-inset-0" }, null, -1)),
|
|
141
|
-
renderSlot(_ctx.$slots, "default", {
|
|
142
|
-
isResponsiveEnabled: isResponsiveEnabled.value,
|
|
143
|
-
finalWidth: finalWidth.value,
|
|
144
|
-
finalHeight: finalHeight.value,
|
|
145
|
-
resizing: resizing.value
|
|
146
|
-
}, void 0, true)
|
|
147
|
-
]),
|
|
148
|
-
_cache[1] || (_cache[1] = createStaticVNode('<div class="ptw-absolute ptw-top-5 ptw-left-8 ptw-h-2 ptw-w-px ptw-bg-gray-400/25" data-v-996dc779></div><div class="ptw-absolute ptw-top-5 ptw-right-8 ptw-h-2 ptw-w-px ptw-bg-gray-400/25" data-v-996dc779></div><div class="ptw-absolute ptw-bottom-5 ptw-left-8 ptw-h-2 ptw-w-px ptw-bg-gray-400/25" data-v-996dc779></div><div class="ptw-absolute ptw-bottom-5 ptw-right-8 ptw-h-2 ptw-w-px ptw-bg-gray-400/25" data-v-996dc779></div><div class="ptw-absolute ptw-left-5 ptw-top-8 ptw-w-2 ptw-h-px ptw-bg-gray-400/25" data-v-996dc779></div><div class="ptw-absolute ptw-left-5 ptw-bottom-8 ptw-w-2 ptw-h-px ptw-bg-gray-400/25" data-v-996dc779></div><div class="ptw-absolute ptw-right-5 ptw-top-8 ptw-w-2 ptw-h-px ptw-bg-gray-400/25" data-v-996dc779></div><div class="ptw-absolute ptw-right-5 ptw-bottom-8 ptw-w-2 ptw-h-px ptw-bg-gray-400/25" data-v-996dc779></div>', 8))
|
|
149
|
-
]),
|
|
150
|
-
isResponsiveEnabled.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
151
|
-
withDirectives((openBlock(), createElementBlock("div", {
|
|
152
|
-
ref_key: "horizontalDragger",
|
|
153
|
-
ref: horizontalDragger,
|
|
154
|
-
class: "ptw-absolute ptw-w-4 ptw-top-0 ptw-bottom-4 ptw-right-0 hover:ptw-bg-primary-500/30 ptw-flex ptw-items-center ptw-justify-center ptw-cursor-ew-resize ptw-group hover:ptw-text-primary-500"
|
|
155
|
-
}, [
|
|
156
|
-
createVNode(unref(Icon), {
|
|
157
|
-
icon: "mdi:drag-vertical-variant",
|
|
158
|
-
class: "ptw-w-4 ptw-h-4 ptw-opacity-20 group-hover:ptw-opacity-90"
|
|
159
|
-
})
|
|
160
|
-
])), [
|
|
161
|
-
[
|
|
162
|
-
unref(VTooltip),
|
|
163
|
-
sizeTooltip.value,
|
|
164
|
-
void 0,
|
|
165
|
-
{ right: true }
|
|
166
|
-
]
|
|
167
|
-
]),
|
|
168
|
-
withDirectives((openBlock(), createElementBlock("div", {
|
|
169
|
-
ref_key: "verticalDragger",
|
|
170
|
-
ref: verticalDragger,
|
|
171
|
-
class: "ptw-absolute ptw-h-4 ptw-left-0 ptw-right-4 ptw-bottom-0 hover:ptw-bg-primary-500/30 ptw-flex ptw-items-center ptw-justify-center ptw-cursor-ns-resize ptw-group hover:ptw-text-primary-500"
|
|
172
|
-
}, [
|
|
173
|
-
createVNode(unref(Icon), {
|
|
174
|
-
icon: "mdi:drag-horizontal-variant",
|
|
175
|
-
class: "ptw-w-4 ptw-h-4 ptw-opacity-20 group-hover:ptw-opacity-90"
|
|
176
|
-
})
|
|
177
|
-
])), [
|
|
178
|
-
[
|
|
179
|
-
unref(VTooltip),
|
|
180
|
-
sizeTooltip.value,
|
|
181
|
-
void 0,
|
|
182
|
-
{ bottom: true }
|
|
183
|
-
]
|
|
184
|
-
]),
|
|
185
|
-
withDirectives(createElementVNode("div", {
|
|
186
|
-
ref_key: "cornerDragger",
|
|
187
|
-
ref: cornerDragger,
|
|
188
|
-
class: "ptw-absolute ptw-w-4 ptw-h-4 ptw-right-0 ptw-bottom-0 hover:ptw-bg-primary-500/30 ptw-flex ptw-items-center ptw-justify-center ptw-cursor-nwse-resize ptw-group hover:ptw-text-primary-500"
|
|
189
|
-
}, null, 512), [
|
|
190
|
-
[
|
|
191
|
-
unref(VTooltip),
|
|
192
|
-
sizeTooltip.value,
|
|
193
|
-
void 0,
|
|
194
|
-
{ bottom: true }
|
|
195
|
-
]
|
|
196
|
-
])
|
|
197
|
-
], 64)) : createCommentVNode("", true)
|
|
198
|
-
])
|
|
199
|
-
], 2)
|
|
200
|
-
], 512)
|
|
201
|
-
]);
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
export {
|
|
206
|
-
_sfc_main as default
|
|
207
|
-
};
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, watch, onMounted, createElementBlock, openBlock, createElementVNode, normalizeStyle, unref, Fragment, renderList, createBlock } from "@poveste/vendors/vue";
|
|
2
|
-
import { useResizeObserver } from "@poveste/vendors/vue-use";
|
|
3
|
-
import { useStoryStore } from "../../stores/story.js";
|
|
4
|
-
import StoryVariantGridItem from "./StoryVariantGridItem.vue.js";
|
|
5
|
-
"use strict";
|
|
6
|
-
const _hoisted_1 = { class: "poveste-story-variant-grid ptw-flex ptw-flex-col ptw-items-stretch ptw-h-full __poveste-pane-shadow-from-right" };
|
|
7
|
-
const _hoisted_2 = { class: "ptw-flex ptw-w-0 ptw-flex-1 ptw-mx-4" };
|
|
8
|
-
const margin = 16;
|
|
9
|
-
const gap = 16;
|
|
10
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
|
-
__name: "StoryVariantGrid",
|
|
12
|
-
setup(__props) {
|
|
13
|
-
const storyStore = useStoryStore();
|
|
14
|
-
const gridTemplateWidth = computed(() => {
|
|
15
|
-
if (storyStore.currentStory.layout.type !== "grid") {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
const layoutWidth = storyStore.currentStory.layout.width;
|
|
19
|
-
if (!layoutWidth) {
|
|
20
|
-
return "200px";
|
|
21
|
-
}
|
|
22
|
-
if (typeof layoutWidth === "number") {
|
|
23
|
-
return `${layoutWidth}px`;
|
|
24
|
-
}
|
|
25
|
-
return layoutWidth;
|
|
26
|
-
});
|
|
27
|
-
const itemWidth = ref(16);
|
|
28
|
-
const maxItemHeight = ref(0);
|
|
29
|
-
const maxCount = ref(10);
|
|
30
|
-
const countPerRow = ref(0);
|
|
31
|
-
const visibleRows = ref(0);
|
|
32
|
-
const el = ref(null);
|
|
33
|
-
useResizeObserver(el, () => {
|
|
34
|
-
updateMaxCount();
|
|
35
|
-
updateSize();
|
|
36
|
-
});
|
|
37
|
-
function updateMaxCount() {
|
|
38
|
-
if (!maxItemHeight.value) return;
|
|
39
|
-
const width = el.value.clientWidth - margin * 2;
|
|
40
|
-
const height = el.value.clientHeight;
|
|
41
|
-
const scrollTop = el.value.scrollTop;
|
|
42
|
-
countPerRow.value = Math.floor((width + gap) / (itemWidth.value + gap));
|
|
43
|
-
visibleRows.value = Math.ceil((height + scrollTop + gap) / (maxItemHeight.value + gap));
|
|
44
|
-
const newMaxCount = countPerRow.value * visibleRows.value;
|
|
45
|
-
if (maxCount.value < newMaxCount) {
|
|
46
|
-
maxCount.value = newMaxCount;
|
|
47
|
-
}
|
|
48
|
-
if (storyStore.currentVariant) {
|
|
49
|
-
const index = storyStore.currentStory.variants.indexOf(storyStore.currentVariant);
|
|
50
|
-
if (index + 1 > maxCount.value) {
|
|
51
|
-
maxCount.value = index + 1;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function onItemResize(w, h) {
|
|
56
|
-
itemWidth.value = w;
|
|
57
|
-
if (maxItemHeight.value < h) {
|
|
58
|
-
maxItemHeight.value = h;
|
|
59
|
-
updateMaxCount();
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
watch(() => storyStore.currentVariant, () => {
|
|
63
|
-
maxItemHeight.value = 0;
|
|
64
|
-
updateMaxCount();
|
|
65
|
-
});
|
|
66
|
-
const gridEl = ref(null);
|
|
67
|
-
const gridColumnWidth = ref(1);
|
|
68
|
-
const viewWidth = ref(1);
|
|
69
|
-
function updateSize() {
|
|
70
|
-
if (!el.value) return;
|
|
71
|
-
viewWidth.value = el.value.clientWidth;
|
|
72
|
-
if (!gridEl.value) return;
|
|
73
|
-
if (gridTemplateWidth.value.endsWith("%")) {
|
|
74
|
-
gridColumnWidth.value = viewWidth.value * Number.parseInt(gridTemplateWidth.value) / 100 - gap;
|
|
75
|
-
} else {
|
|
76
|
-
gridColumnWidth.value = Number.parseInt(gridTemplateWidth.value);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
onMounted(() => {
|
|
80
|
-
updateSize();
|
|
81
|
-
});
|
|
82
|
-
useResizeObserver(gridEl, () => {
|
|
83
|
-
updateSize();
|
|
84
|
-
});
|
|
85
|
-
const columnCount = computed(() => Math.min(storyStore.currentStory.variants.length, Math.floor((viewWidth.value + gap) / (gridColumnWidth.value + gap))));
|
|
86
|
-
return (_ctx, _cache) => {
|
|
87
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
88
|
-
createElementVNode("div", {
|
|
89
|
-
ref_key: "el",
|
|
90
|
-
ref: el,
|
|
91
|
-
class: "ptw-overflow-y-auto ptw-flex ptw-flex-1",
|
|
92
|
-
onScroll: _cache[0] || (_cache[0] = ($event) => updateMaxCount())
|
|
93
|
-
}, [
|
|
94
|
-
createElementVNode("div", _hoisted_2, [
|
|
95
|
-
createElementVNode("div", {
|
|
96
|
-
class: "ptw-m-auto",
|
|
97
|
-
style: normalizeStyle({
|
|
98
|
-
minHeight: `${unref(storyStore).currentStory.variants.length / countPerRow.value * (maxItemHeight.value + gap) - gap}px`
|
|
99
|
-
})
|
|
100
|
-
}, [
|
|
101
|
-
createElementVNode("div", {
|
|
102
|
-
ref_key: "gridEl",
|
|
103
|
-
ref: gridEl,
|
|
104
|
-
class: "ptw-grid ptw-gap-4 ptw-my-4",
|
|
105
|
-
style: normalizeStyle({
|
|
106
|
-
gridTemplateColumns: `repeat(${columnCount.value}, ${gridColumnWidth.value}px)`
|
|
107
|
-
})
|
|
108
|
-
}, [
|
|
109
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(storyStore).currentStory.variants.slice(0, maxCount.value), (variant, index) => {
|
|
110
|
-
return openBlock(), createBlock(StoryVariantGridItem, {
|
|
111
|
-
key: index,
|
|
112
|
-
variant,
|
|
113
|
-
story: unref(storyStore).currentStory,
|
|
114
|
-
onResize: onItemResize
|
|
115
|
-
}, null, 8, ["variant", "story"]);
|
|
116
|
-
}), 128))
|
|
117
|
-
], 4)
|
|
118
|
-
], 4)
|
|
119
|
-
])
|
|
120
|
-
], 544)
|
|
121
|
-
]);
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
export {
|
|
126
|
-
_sfc_main as default
|
|
127
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./StoryVariantGridItem.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
"use strict";
|
|
5
|
-
const StoryVariantGridItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-42097cb5"]]);
|
|
6
|
-
export {
|
|
7
|
-
StoryVariantGridItem as default
|
|
8
|
-
};
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { defineComponent, useCssVars, unref, toRefs, ref, computed, resolveComponent, resolveDirective, createElementBlock, openBlock, createElementVNode, withDirectives, createBlock, normalizeClass, withCtx, createVNode, toDisplayString, withModifiers, createCommentVNode, normalizeStyle } from "@poveste/vendors/vue";
|
|
2
|
-
import { Icon } from "@poveste/vendors/iconify";
|
|
3
|
-
import { HstCopyIcon } from "@poveste/controls";
|
|
4
|
-
import { useResizeObserver } from "@poveste/vendors/vue-use";
|
|
5
|
-
import { useRouter } from "@poveste/vendors/vue-router";
|
|
6
|
-
import { usePreviewSettingsStore } from "../../stores/preview-settings.js";
|
|
7
|
-
import { usePreviewDark } from "../../util/color-scheme.js";
|
|
8
|
-
import { povesteConfig } from "../../util/config.js";
|
|
9
|
-
import { getSourceCode } from "../../util/docs.js";
|
|
10
|
-
import { getContrastColor } from "../../util/preview-settings.js";
|
|
11
|
-
import { useScrollOnActive } from "../../util/scroll.js";
|
|
12
|
-
import { useCurrentVariantRoute } from "../../util/variant.js";
|
|
13
|
-
import CheckerboardPattern from "../misc/CheckerboardPattern.vue.js";
|
|
14
|
-
import "../toolbar/ToolbarNewTab.vue.js";
|
|
15
|
-
import "./GenericRenderStory.vue.js";
|
|
16
|
-
import "./StoryVariantSinglePreviewRemote.vue.js";
|
|
17
|
-
import _sfc_main$1 from "../toolbar/ToolbarNewTab.vue2.js";
|
|
18
|
-
import _sfc_main$2 from "./StoryVariantSinglePreviewRemote.vue2.js";
|
|
19
|
-
import _sfc_main$3 from "./GenericRenderStory.vue2.js";
|
|
20
|
-
"use strict";
|
|
21
|
-
const _hoisted_1 = { class: "ptw-flex-none ptw-flex ptw-items-center" };
|
|
22
|
-
const _hoisted_2 = { class: "ptw-truncate ptw-flex-1" };
|
|
23
|
-
const _hoisted_3 = { class: "ptw-flex-none ptw-ml-auto ptw-hidden group-hover:ptw-flex ptw-items-center" };
|
|
24
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
25
|
-
__name: "StoryVariantGridItem",
|
|
26
|
-
props: {
|
|
27
|
-
variant: {
|
|
28
|
-
type: Object,
|
|
29
|
-
required: true
|
|
30
|
-
},
|
|
31
|
-
story: {
|
|
32
|
-
type: Object,
|
|
33
|
-
required: true
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
emits: {
|
|
37
|
-
resize: (_width, _height) => true
|
|
38
|
-
},
|
|
39
|
-
setup(__props, { emit: __emit }) {
|
|
40
|
-
useCssVars((_ctx) => ({
|
|
41
|
-
"v087cd7b6": unref(variant).iconColor,
|
|
42
|
-
"v6d9d16a6": unref(settings).backgroundColor
|
|
43
|
-
}));
|
|
44
|
-
const props = __props;
|
|
45
|
-
const emit = __emit;
|
|
46
|
-
const { variant } = toRefs(props);
|
|
47
|
-
const { isActive, targetRoute } = useCurrentVariantRoute(variant);
|
|
48
|
-
Object.assign(props.variant, {
|
|
49
|
-
previewReady: false
|
|
50
|
-
});
|
|
51
|
-
function onReady() {
|
|
52
|
-
Object.assign(props.variant, {
|
|
53
|
-
previewReady: true
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
const router = useRouter();
|
|
57
|
-
function selectVariant() {
|
|
58
|
-
router.push(targetRoute.value);
|
|
59
|
-
}
|
|
60
|
-
const el = ref();
|
|
61
|
-
const { autoScroll } = useScrollOnActive(isActive, el);
|
|
62
|
-
useResizeObserver(el, () => {
|
|
63
|
-
if (props.variant.previewReady) {
|
|
64
|
-
emit("resize", el.value.clientWidth, el.value.clientHeight);
|
|
65
|
-
if (isActive.value) {
|
|
66
|
-
autoScroll();
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
const settings = usePreviewSettingsStore().currentSettings;
|
|
71
|
-
const previewDark = usePreviewDark(settings);
|
|
72
|
-
const contrastColor = computed(() => getContrastColor(settings));
|
|
73
|
-
const autoApplyContrastColor = computed(() => !!povesteConfig.autoApplyContrastColor);
|
|
74
|
-
const useIframe = computed(() => {
|
|
75
|
-
const layout = props.story.layout;
|
|
76
|
-
if (layout?.type === "grid" && layout.iframeGrid !== void 0) {
|
|
77
|
-
return layout.iframeGrid;
|
|
78
|
-
}
|
|
79
|
-
return povesteConfig.isolateStyles !== false;
|
|
80
|
-
});
|
|
81
|
-
return (_ctx, _cache) => {
|
|
82
|
-
const _component_RouterLink = resolveComponent("RouterLink");
|
|
83
|
-
const _directive_tooltip = resolveDirective("tooltip");
|
|
84
|
-
return openBlock(), createElementBlock("div", {
|
|
85
|
-
ref_key: "el",
|
|
86
|
-
ref: el,
|
|
87
|
-
class: "poveste-story-variant-grid-item ptw-cursor-default ptw-flex ptw-flex-col ptw-gap-y-1 ptw-group"
|
|
88
|
-
}, [
|
|
89
|
-
createElementVNode("div", _hoisted_1, [
|
|
90
|
-
withDirectives((openBlock(), createBlock(_component_RouterLink, {
|
|
91
|
-
to: unref(targetRoute),
|
|
92
|
-
class: normalizeClass(["ptw-rounded ptw-w-max ptw-px-2 ptw-py-0.5 ptw-min-w-16 ptw-cursor-pointer ptw-flex ptw-items-center ptw-gap-1 ptw-flex-shrink", {
|
|
93
|
-
"hover:ptw-bg-gray-200 ptw-text-gray-500 dark:hover:ptw-bg-gray-800": !unref(isActive),
|
|
94
|
-
"ptw-bg-primary-200 hover:ptw-bg-primary-300 ptw-text-primary-800 dark:ptw-bg-primary-700 dark:hover:ptw-bg-primary-800 dark:ptw-text-primary-200": unref(isActive)
|
|
95
|
-
}])
|
|
96
|
-
}, {
|
|
97
|
-
default: withCtx(() => [
|
|
98
|
-
createVNode(unref(Icon), {
|
|
99
|
-
icon: unref(variant).icon ?? "carbon:cube",
|
|
100
|
-
class: normalizeClass(["ptw-w-4 ptw-h-4 ptw-opacity-50", {
|
|
101
|
-
"ptw-text-gray-500": !unref(isActive) && !unref(variant).iconColor,
|
|
102
|
-
"bind-icon-color": !unref(isActive) && unref(variant).iconColor
|
|
103
|
-
}])
|
|
104
|
-
}, null, 8, ["icon", "class"]),
|
|
105
|
-
createElementVNode("span", _hoisted_2, toDisplayString(unref(variant).title), 1)
|
|
106
|
-
]),
|
|
107
|
-
_: 1
|
|
108
|
-
}, 8, ["to", "class"])), [
|
|
109
|
-
[_directive_tooltip, unref(variant).title]
|
|
110
|
-
]),
|
|
111
|
-
createElementVNode("div", _hoisted_3, [
|
|
112
|
-
createVNode(unref(HstCopyIcon), {
|
|
113
|
-
content: () => unref(getSourceCode)(__props.story, unref(variant))
|
|
114
|
-
}, null, 8, ["content"]),
|
|
115
|
-
createVNode(_sfc_main$1, {
|
|
116
|
-
variant: unref(variant),
|
|
117
|
-
story: __props.story
|
|
118
|
-
}, null, 8, ["variant", "story"])
|
|
119
|
-
])
|
|
120
|
-
]),
|
|
121
|
-
createElementVNode("div", {
|
|
122
|
-
class: normalizeClass(["ptw-border ptw-bg-white dark:ptw-bg-gray-700 ptw-rounded ptw-flex-1 ptw-p-4 ptw-relative", {
|
|
123
|
-
"ptw-border-gray-100 dark:ptw-border-gray-800": !unref(isActive),
|
|
124
|
-
"ptw-border-primary-200 dark:ptw-border-primary-900": unref(isActive)
|
|
125
|
-
}]),
|
|
126
|
-
"data-test-id": "sandbox-render",
|
|
127
|
-
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => selectVariant(), ["stop"])),
|
|
128
|
-
onKeyup: _cache[1] || (_cache[1] = ($event) => selectVariant())
|
|
129
|
-
}, [
|
|
130
|
-
_cache[2] || (_cache[2] = createElementVNode("div", {
|
|
131
|
-
class: "ptw-absolute ptw-inset-0 ptw-rounded bind-preview-bg",
|
|
132
|
-
"data-test-id": "responsive-preview-bg"
|
|
133
|
-
}, null, -1)),
|
|
134
|
-
unref(settings).checkerboard ? (openBlock(), createBlock(CheckerboardPattern, {
|
|
135
|
-
key: 0,
|
|
136
|
-
class: "ptw-absolute ptw-inset-0 ptw-w-full ptw-h-full ptw-text-gray-500/20"
|
|
137
|
-
})) : createCommentVNode("", true),
|
|
138
|
-
createElementVNode("div", {
|
|
139
|
-
class: "ptw-relative ptw-h-full",
|
|
140
|
-
style: normalizeStyle({
|
|
141
|
-
"--poveste-contrast-color": contrastColor.value,
|
|
142
|
-
// Deprecated alias — keep so stories referencing `var(--histoire-contrast-color)` still work.
|
|
143
|
-
"--histoire-contrast-color": contrastColor.value,
|
|
144
|
-
"color": autoApplyContrastColor.value ? contrastColor.value : void 0
|
|
145
|
-
})
|
|
146
|
-
}, [
|
|
147
|
-
useIframe.value ? (openBlock(), createBlock(_sfc_main$2, {
|
|
148
|
-
key: `iframe-${__props.story.id}-${unref(variant).id}`,
|
|
149
|
-
story: __props.story,
|
|
150
|
-
variant: unref(variant),
|
|
151
|
-
"auto-height": ""
|
|
152
|
-
}, null, 8, ["story", "variant"])) : (openBlock(), createBlock(_sfc_main$3, {
|
|
153
|
-
key: `${__props.story.id}-${unref(variant).id}`,
|
|
154
|
-
variant: unref(variant),
|
|
155
|
-
story: __props.story,
|
|
156
|
-
dir: unref(settings).textDirection,
|
|
157
|
-
class: normalizeClass({
|
|
158
|
-
[unref(povesteConfig).theme.darkClass]: unref(previewDark)
|
|
159
|
-
}),
|
|
160
|
-
onReady
|
|
161
|
-
}, null, 8, ["variant", "story", "dir", "class"]))
|
|
162
|
-
], 4)
|
|
163
|
-
], 34)
|
|
164
|
-
], 512);
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
export {
|
|
169
|
-
_sfc_main as default
|
|
170
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./StoryVariantListItem.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
"use strict";
|
|
5
|
-
const StoryVariantListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-363b3d4f"]]);
|
|
6
|
-
export {
|
|
7
|
-
StoryVariantListItem as default
|
|
8
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { defineComponent, useCssVars, unref, toRefs, ref, createElementBlock, openBlock, createVNode, withCtx, createElementVNode, normalizeClass, toDisplayString } from "@poveste/vendors/vue";
|
|
2
|
-
import { Icon } from "@poveste/vendors/iconify";
|
|
3
|
-
import { useScrollOnActive } from "../../util/scroll.js";
|
|
4
|
-
import { useCurrentVariantRoute } from "../../util/variant.js";
|
|
5
|
-
import BaseListItemLink from "../base/BaseListItemLink.vue.js";
|
|
6
|
-
"use strict";
|
|
7
|
-
const _hoisted_1 = { class: "ptw-truncate" };
|
|
8
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
-
__name: "StoryVariantListItem",
|
|
10
|
-
props: {
|
|
11
|
-
variant: {
|
|
12
|
-
type: Object,
|
|
13
|
-
required: true
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
setup(__props) {
|
|
17
|
-
useCssVars((_ctx) => ({
|
|
18
|
-
"v3223e976": unref(variant).iconColor
|
|
19
|
-
}));
|
|
20
|
-
const props = __props;
|
|
21
|
-
const { variant } = toRefs(props);
|
|
22
|
-
const { isActive, targetRoute } = useCurrentVariantRoute(variant);
|
|
23
|
-
const el = ref();
|
|
24
|
-
useScrollOnActive(isActive, el);
|
|
25
|
-
return (_ctx, _cache) => {
|
|
26
|
-
return openBlock(), createElementBlock("div", {
|
|
27
|
-
ref_key: "el",
|
|
28
|
-
ref: el,
|
|
29
|
-
class: "poveste-story-variant-list-item",
|
|
30
|
-
"data-test-id": "story-variant-list-item"
|
|
31
|
-
}, [
|
|
32
|
-
createVNode(BaseListItemLink, {
|
|
33
|
-
to: unref(targetRoute),
|
|
34
|
-
"is-active": unref(isActive),
|
|
35
|
-
class: "ptw-px-2 ptw-py-2 md:ptw-py-1.5 ptw-m-1 ptw-rounded-sm ptw-flex ptw-items-center ptw-gap-2"
|
|
36
|
-
}, {
|
|
37
|
-
default: withCtx(({ active }) => [
|
|
38
|
-
createVNode(unref(Icon), {
|
|
39
|
-
icon: unref(variant).icon ?? "carbon:cube",
|
|
40
|
-
class: normalizeClass(["ptw-w-5 ptw-h-5 sm:ptw-w-4 sm:ptw-h-4 ptw-flex-none", {
|
|
41
|
-
"ptw-text-gray-500": !active && !unref(variant).iconColor,
|
|
42
|
-
"bind-icon-color": !active && unref(variant).iconColor
|
|
43
|
-
}])
|
|
44
|
-
}, null, 8, ["icon", "class"]),
|
|
45
|
-
createElementVNode("span", _hoisted_1, toDisplayString(unref(variant).title), 1)
|
|
46
|
-
]),
|
|
47
|
-
_: 1
|
|
48
|
-
}, 8, ["to", "is-active"])
|
|
49
|
-
], 512);
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
export {
|
|
54
|
-
_sfc_main as default
|
|
55
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./StoryVariantSingle.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
"use strict";
|
|
5
|
-
const StoryVariantSingle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ca14569e"]]);
|
|
6
|
-
export {
|
|
7
|
-
StoryVariantSingle as default
|
|
8
|
-
};
|