@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,161 +0,0 @@
|
|
|
1
|
-
import { defineComponent, toRefs, watch, ref, computed, createElementBlock, openBlock, createCommentVNode, createBlock, unref, normalizeClass, withCtx, createVNode, createTextVNode, watchEffect, nextTick } from "@poveste/vendors/vue";
|
|
2
|
-
import { Icon } from "@poveste/vendors/iconify";
|
|
3
|
-
import { markdownFiles } from "virtual:$poveste-markdown-files";
|
|
4
|
-
import { useRouter, useRoute } from "@poveste/vendors/vue-router";
|
|
5
|
-
import { povesteConfig } from "../../util/config.js";
|
|
6
|
-
import BaseEmpty from "../base/BaseEmpty.vue.js";
|
|
7
|
-
import "../toolbar/DevOnlyToolbarOpenInEditor.vue.js";
|
|
8
|
-
import _sfc_main$1 from "../toolbar/DevOnlyToolbarOpenInEditor.vue2.js";
|
|
9
|
-
"use strict";
|
|
10
|
-
const _hoisted_1 = ["innerHTML"];
|
|
11
|
-
function useStoryDoc(story) {
|
|
12
|
-
const renderedDoc = ref("");
|
|
13
|
-
watchEffect(async () => {
|
|
14
|
-
const mdKey = story.value.file.filePath.replace(/\.(\w*)$/, ".md");
|
|
15
|
-
if (markdownFiles[mdKey]) {
|
|
16
|
-
const md = await markdownFiles[mdKey]();
|
|
17
|
-
renderedDoc.value = md.html;
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
let comp = story.value.file?.component;
|
|
21
|
-
if (comp) {
|
|
22
|
-
if (comp.__asyncResolved) {
|
|
23
|
-
comp = comp.__asyncResolved;
|
|
24
|
-
} else if (comp.__asyncLoader) {
|
|
25
|
-
comp = await comp.__asyncLoader();
|
|
26
|
-
} else if (typeof comp === "function") {
|
|
27
|
-
try {
|
|
28
|
-
comp = await comp();
|
|
29
|
-
} catch (e) {
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
if (comp?.default) {
|
|
33
|
-
comp = comp.default;
|
|
34
|
-
}
|
|
35
|
-
renderedDoc.value = comp.doc;
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
return {
|
|
39
|
-
renderedDoc
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
43
|
-
__name: "StoryDocs",
|
|
44
|
-
props: {
|
|
45
|
-
story: {
|
|
46
|
-
type: Object,
|
|
47
|
-
required: true
|
|
48
|
-
},
|
|
49
|
-
standalone: {
|
|
50
|
-
type: Boolean,
|
|
51
|
-
default: false
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
emits: ["scrollTop"],
|
|
55
|
-
setup(__props, { emit: __emit }) {
|
|
56
|
-
const props = __props;
|
|
57
|
-
const emit = __emit;
|
|
58
|
-
const { story } = toRefs(props);
|
|
59
|
-
const { renderedDoc } = useStoryDoc(story);
|
|
60
|
-
const router = useRouter();
|
|
61
|
-
const fakeHost = `http://a.com`;
|
|
62
|
-
function onClick(e) {
|
|
63
|
-
const link = e.target.closest("a");
|
|
64
|
-
if (link && link.getAttribute("data-route") && !e.ctrlKey && !e.shiftKey && !e.altKey && !e.metaKey && link.target !== `_blank`) {
|
|
65
|
-
e.preventDefault();
|
|
66
|
-
const url = new URL(link.href, fakeHost);
|
|
67
|
-
const targetHref = url.pathname + url.search + url.hash;
|
|
68
|
-
router.push(targetHref);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
function getHash() {
|
|
72
|
-
const hash = location.hash;
|
|
73
|
-
if (povesteConfig.routerMode === "hash") {
|
|
74
|
-
const index = hash.indexOf("#", 1);
|
|
75
|
-
if (index !== -1) {
|
|
76
|
-
return hash.slice(index);
|
|
77
|
-
} else {
|
|
78
|
-
return void 0;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return hash;
|
|
82
|
-
}
|
|
83
|
-
async function scrollToAnchor() {
|
|
84
|
-
await nextTick();
|
|
85
|
-
const hash = getHash();
|
|
86
|
-
if (hash) {
|
|
87
|
-
const anchor = document.querySelector(decodeURIComponent(hash));
|
|
88
|
-
if (anchor) {
|
|
89
|
-
anchor.scrollIntoView();
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
emit("scrollTop");
|
|
94
|
-
}
|
|
95
|
-
watch(renderedDoc, () => {
|
|
96
|
-
scrollToAnchor();
|
|
97
|
-
}, {
|
|
98
|
-
immediate: true
|
|
99
|
-
});
|
|
100
|
-
const renderedEl = ref();
|
|
101
|
-
const route = useRoute();
|
|
102
|
-
async function patchAnchorLinks() {
|
|
103
|
-
await nextTick();
|
|
104
|
-
if (povesteConfig.routerMode === "hash" && renderedEl.value) {
|
|
105
|
-
const links = renderedEl.value.querySelectorAll("a.header-anchor");
|
|
106
|
-
for (const link of links) {
|
|
107
|
-
const href = link.getAttribute("href");
|
|
108
|
-
if (href) {
|
|
109
|
-
link.setAttribute("href", `#${route.path + href}`);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
watch(renderedDoc, () => {
|
|
115
|
-
patchAnchorLinks();
|
|
116
|
-
}, {
|
|
117
|
-
immediate: true
|
|
118
|
-
});
|
|
119
|
-
const filePath = computed(() => story.value.file?.docsFilePath ?? (props.standalone && story.value.file?.filePath));
|
|
120
|
-
return (_ctx, _cache) => {
|
|
121
|
-
return openBlock(), createElementBlock("div", {
|
|
122
|
-
class: "poveste-story-docs",
|
|
123
|
-
onClickCapture: onClick
|
|
124
|
-
}, [
|
|
125
|
-
_ctx.__POVESTE_DEV__ && unref(renderedDoc) && filePath.value ? (openBlock(), createElementBlock("div", {
|
|
126
|
-
key: 0,
|
|
127
|
-
class: normalizeClass(["ptw-flex ptw-items-center ptw-gap-2 ptw-p-2", {
|
|
128
|
-
"ptw-pt-4": !__props.standalone
|
|
129
|
-
}])
|
|
130
|
-
}, [
|
|
131
|
-
filePath.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
132
|
-
key: 0,
|
|
133
|
-
file: filePath.value,
|
|
134
|
-
tooltip: "Edit docs in editor"
|
|
135
|
-
}, null, 8, ["file"])) : createCommentVNode("", true)
|
|
136
|
-
], 2)) : createCommentVNode("", true),
|
|
137
|
-
!unref(renderedDoc) ? (openBlock(), createBlock(BaseEmpty, { key: 1 }, {
|
|
138
|
-
default: withCtx(() => [
|
|
139
|
-
createVNode(unref(Icon), {
|
|
140
|
-
icon: "carbon:document-unknown",
|
|
141
|
-
class: "ptw-w-8 ptw-h-8 ptw-opacity-50 ptw-mb-6"
|
|
142
|
-
}),
|
|
143
|
-
_cache[0] || (_cache[0] = createTextVNode(" No documentation available ", -1))
|
|
144
|
-
]),
|
|
145
|
-
_: 1
|
|
146
|
-
})) : (openBlock(), createElementBlock("div", {
|
|
147
|
-
key: 2,
|
|
148
|
-
ref_key: "renderedEl",
|
|
149
|
-
ref: renderedEl,
|
|
150
|
-
class: "ptw-prose dark:ptw-prose-invert ptw-p-4 ptw-max-w-none",
|
|
151
|
-
"data-test-id": "story-docs",
|
|
152
|
-
innerHTML: unref(renderedDoc)
|
|
153
|
-
}, null, 8, _hoisted_1))
|
|
154
|
-
], 32);
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
export {
|
|
159
|
-
_sfc_main as default,
|
|
160
|
-
useStoryDoc
|
|
161
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, resolveComponent, createBlock, openBlock, withCtx, createElementVNode, toDisplayString, normalizeClass, createElementBlock, createCommentVNode } from "@poveste/vendors/vue";
|
|
2
|
-
"use strict";
|
|
3
|
-
const _hoisted_1 = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "ptw-text-xs ptw-opacity-50 ptw-truncate"
|
|
6
|
-
};
|
|
7
|
-
const _hoisted_2 = { class: "ptw-overflow-auto ptw-max-w-[400px] ptw-max-h-[400px]" };
|
|
8
|
-
const _hoisted_3 = { class: "ptw-p-4" };
|
|
9
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
-
__name: "StoryEvent",
|
|
11
|
-
props: {
|
|
12
|
-
event: {}
|
|
13
|
-
},
|
|
14
|
-
setup(__props) {
|
|
15
|
-
const props = __props;
|
|
16
|
-
const formattedArgument = computed(() => {
|
|
17
|
-
switch (typeof props.event.argument) {
|
|
18
|
-
case "string":
|
|
19
|
-
return `"${props.event.argument}"`;
|
|
20
|
-
case "object":
|
|
21
|
-
return `{ ${Object.keys(props.event.argument).map((key) => `${key}: ${props.event.argument[key]}`).join(", ")} }`;
|
|
22
|
-
default:
|
|
23
|
-
return props.event.argument;
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
return (_ctx, _cache) => {
|
|
27
|
-
const _component_VDropdown = resolveComponent("VDropdown");
|
|
28
|
-
return openBlock(), createBlock(_component_VDropdown, {
|
|
29
|
-
class: "poveste-story-event ptw-group",
|
|
30
|
-
placement: "right",
|
|
31
|
-
"data-test-id": "event-item"
|
|
32
|
-
}, {
|
|
33
|
-
default: withCtx(({ shown }) => [
|
|
34
|
-
createElementVNode("div", {
|
|
35
|
-
class: normalizeClass(["group-hover:ptw-bg-primary-100 dark:group-hover:ptw-bg-primary-700 ptw-cursor-pointer ptw-py-2 ptw-px-4 ptw-flex ptw-items-baseline ptw-gap-1 ptw-leading-normal", [
|
|
36
|
-
shown ? "ptw-bg-primary-50 dark:ptw-bg-primary-600" : "group-odd:ptw-bg-gray-100/50 dark:group-odd:ptw-bg-gray-750/40"
|
|
37
|
-
]])
|
|
38
|
-
}, [
|
|
39
|
-
createElementVNode("span", {
|
|
40
|
-
class: normalizeClass({
|
|
41
|
-
"ptw-text-primary-500": shown
|
|
42
|
-
})
|
|
43
|
-
}, toDisplayString(__props.event.name), 3),
|
|
44
|
-
__props.event.argument ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(formattedArgument.value), 1)) : createCommentVNode("", true)
|
|
45
|
-
], 2)
|
|
46
|
-
]),
|
|
47
|
-
popper: withCtx(() => [
|
|
48
|
-
createElementVNode("div", _hoisted_2, [
|
|
49
|
-
createElementVNode("pre", _hoisted_3, toDisplayString(__props.event.argument), 1)
|
|
50
|
-
])
|
|
51
|
-
]),
|
|
52
|
-
_: 1
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
export {
|
|
58
|
-
_sfc_main as default
|
|
59
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, onMounted, watch, nextTick, ref, createElementBlock, openBlock, createBlock, withCtx, createVNode, createTextVNode, unref, Fragment, renderList } from "@poveste/vendors/vue";
|
|
2
|
-
import { Icon } from "@poveste/vendors/iconify";
|
|
3
|
-
import { useEventsStore } from "../../stores/events.js";
|
|
4
|
-
import BaseEmpty from "../base/BaseEmpty.vue.js";
|
|
5
|
-
import "./StoryEvent.vue.js";
|
|
6
|
-
import _sfc_main$1 from "./StoryEvent.vue2.js";
|
|
7
|
-
"use strict";
|
|
8
|
-
const _hoisted_1 = { key: 1 };
|
|
9
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
-
__name: "StoryEvents",
|
|
11
|
-
setup(__props) {
|
|
12
|
-
const eventsStore = useEventsStore();
|
|
13
|
-
const hasEvents = computed(() => eventsStore.events.length);
|
|
14
|
-
onMounted(resetUnseen);
|
|
15
|
-
watch(() => eventsStore.unseen, resetUnseen);
|
|
16
|
-
async function resetUnseen() {
|
|
17
|
-
if (eventsStore.unseen > 0) {
|
|
18
|
-
eventsStore.unseen = 0;
|
|
19
|
-
}
|
|
20
|
-
await nextTick();
|
|
21
|
-
eventsElement.value.scrollTo({ top: eventsElement.value.scrollHeight });
|
|
22
|
-
}
|
|
23
|
-
const eventsElement = ref();
|
|
24
|
-
return (_ctx, _cache) => {
|
|
25
|
-
return openBlock(), createElementBlock("div", {
|
|
26
|
-
ref_key: "eventsElement",
|
|
27
|
-
ref: eventsElement,
|
|
28
|
-
class: "poveste-story-events"
|
|
29
|
-
}, [
|
|
30
|
-
!hasEvents.value ? (openBlock(), createBlock(BaseEmpty, { key: 0 }, {
|
|
31
|
-
default: withCtx(() => [
|
|
32
|
-
createVNode(unref(Icon), {
|
|
33
|
-
icon: "carbon:event-schedule",
|
|
34
|
-
class: "ptw-w-8 ptw-h-8 ptw-opacity-50 ptw-mb-6"
|
|
35
|
-
}),
|
|
36
|
-
_cache[0] || (_cache[0] = createTextVNode(" No event fired ", -1))
|
|
37
|
-
]),
|
|
38
|
-
_: 1
|
|
39
|
-
})) : (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
40
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(eventsStore).events, (event, key) => {
|
|
41
|
-
return openBlock(), createBlock(_sfc_main$1, {
|
|
42
|
-
key,
|
|
43
|
-
event
|
|
44
|
-
}, null, 8, ["event"]);
|
|
45
|
-
}), 128))
|
|
46
|
-
]))
|
|
47
|
-
], 512);
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
export {
|
|
52
|
-
_sfc_main as default
|
|
53
|
-
};
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, createElementBlock, openBlock, createElementVNode, createBlock, unref, withCtx, createVNode, resolveDynamicComponent } from "@poveste/vendors/vue";
|
|
2
|
-
import { useRoute } from "@poveste/vendors/vue-router";
|
|
3
|
-
import { useLayoutStore } from "../../stores/layout.js";
|
|
4
|
-
import { useStoryStore } from "../../stores/story.js";
|
|
5
|
-
import BaseEmpty from "../base/BaseEmpty.vue.js";
|
|
6
|
-
import BaseSplitPane from "../base/BaseSplitPane.vue.js";
|
|
7
|
-
import "./PaneTabs.vue.js";
|
|
8
|
-
import "./StoryControls.vue.js";
|
|
9
|
-
import "./StoryDocs.vue.js";
|
|
10
|
-
import "./StoryEvents.vue.js";
|
|
11
|
-
import StorySourceCode from "./StorySourceCode.vue.js";
|
|
12
|
-
import _sfc_main$1 from "./StoryControls.vue2.js";
|
|
13
|
-
import _sfc_main$2 from "./StoryEvents.vue2.js";
|
|
14
|
-
import _sfc_main$3 from "./StoryDocs.vue2.js";
|
|
15
|
-
import _sfc_main$4 from "./PaneTabs.vue2.js";
|
|
16
|
-
"use strict";
|
|
17
|
-
const _hoisted_1 = { class: "ptw-h-full ptw-w-full ptw-p-2" };
|
|
18
|
-
const _hoisted_2 = { class: "ptw-h-full ptw-w-full ptw-rounded-lg ptw-border ptw-border-gray-200 dark:ptw-border-gray-700 ptw-overflow-hidden ptw-bg-white dark:ptw-bg-gray-700" };
|
|
19
|
-
const _hoisted_3 = { class: "ptw-flex ptw-flex-col ptw-h-full" };
|
|
20
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
21
|
-
__name: "StorySidePanel",
|
|
22
|
-
setup(__props) {
|
|
23
|
-
const storyStore = useStoryStore();
|
|
24
|
-
const layoutStore = useLayoutStore();
|
|
25
|
-
const innerOrientation = computed(
|
|
26
|
-
() => layoutStore.settings.storyOptionsPlacement === "bottom" ? "landscape" : "portrait"
|
|
27
|
-
);
|
|
28
|
-
const route = useRoute();
|
|
29
|
-
const panelContentComponent = computed(() => {
|
|
30
|
-
switch (route.query.tab) {
|
|
31
|
-
case "docs":
|
|
32
|
-
return _sfc_main$3;
|
|
33
|
-
case "events":
|
|
34
|
-
return _sfc_main$2;
|
|
35
|
-
default:
|
|
36
|
-
return _sfc_main$1;
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
return (_ctx, _cache) => {
|
|
40
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
41
|
-
createElementVNode("div", _hoisted_2, [
|
|
42
|
-
!unref(storyStore).currentVariant ? (openBlock(), createBlock(BaseEmpty, {
|
|
43
|
-
key: 0,
|
|
44
|
-
class: "poveste-story-side-panel poveste-selection"
|
|
45
|
-
}, {
|
|
46
|
-
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
47
|
-
createElementVNode("span", null, "Select a variant", -1)
|
|
48
|
-
])]),
|
|
49
|
-
_: 1
|
|
50
|
-
})) : !unref(storyStore).currentVariant.configReady || !unref(storyStore).currentVariant.previewReady ? (openBlock(), createBlock(BaseEmpty, {
|
|
51
|
-
key: 1,
|
|
52
|
-
class: "poveste-story-side-panel poveste-loading"
|
|
53
|
-
}, {
|
|
54
|
-
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
55
|
-
createElementVNode("span", null, "Loading...", -1)
|
|
56
|
-
])]),
|
|
57
|
-
_: 1
|
|
58
|
-
})) : (openBlock(), createBlock(BaseSplitPane, {
|
|
59
|
-
key: 2,
|
|
60
|
-
"save-id": `story-sidepane-${innerOrientation.value}`,
|
|
61
|
-
orientation: innerOrientation.value,
|
|
62
|
-
class: "poveste-story-side-panel poveste-loaded ptw-h-full",
|
|
63
|
-
"data-test-id": "story-side-panel"
|
|
64
|
-
}, {
|
|
65
|
-
first: withCtx(() => [
|
|
66
|
-
createElementVNode("div", _hoisted_3, [
|
|
67
|
-
createVNode(_sfc_main$4, {
|
|
68
|
-
story: unref(storyStore).currentStory,
|
|
69
|
-
variant: unref(storyStore).currentVariant
|
|
70
|
-
}, null, 8, ["story", "variant"]),
|
|
71
|
-
(openBlock(), createBlock(resolveDynamicComponent(panelContentComponent.value), {
|
|
72
|
-
story: unref(storyStore).currentStory,
|
|
73
|
-
variant: unref(storyStore).currentVariant,
|
|
74
|
-
class: "ptw-h-full ptw-overflow-auto"
|
|
75
|
-
}, null, 8, ["story", "variant"]))
|
|
76
|
-
])
|
|
77
|
-
]),
|
|
78
|
-
last: withCtx(() => [
|
|
79
|
-
createVNode(StorySourceCode, {
|
|
80
|
-
story: unref(storyStore).currentStory,
|
|
81
|
-
variant: unref(storyStore).currentVariant,
|
|
82
|
-
class: "ptw-h-full"
|
|
83
|
-
}, null, 8, ["story", "variant"])
|
|
84
|
-
]),
|
|
85
|
-
_: 1
|
|
86
|
-
}, 8, ["save-id", "orientation"]))
|
|
87
|
-
])
|
|
88
|
-
]);
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
export {
|
|
93
|
-
_sfc_main as default
|
|
94
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./StorySourceCode.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
"use strict";
|
|
5
|
-
const StorySourceCode = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5ee6b7f7"]]);
|
|
6
|
-
export {
|
|
7
|
-
StorySourceCode as default
|
|
8
|
-
};
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, watchEffect, markRaw, shallowRef, watch, computed, onMounted, nextTick, resolveDirective, createElementBlock, openBlock, createCommentVNode, createBlock, createElementVNode, createVNode, withDirectives, normalizeClass, unref, toDisplayString, withCtx } from "@poveste/vendors/vue";
|
|
2
|
-
import { Icon } from "@poveste/vendors/iconify";
|
|
3
|
-
import { HstCopyIcon } from "@poveste/controls";
|
|
4
|
-
import { unindent } from "@poveste/shared";
|
|
5
|
-
import { createHighlighter } from "shiki";
|
|
6
|
-
import { clientSupportPlugins } from "virtual:$poveste-support-plugins-client";
|
|
7
|
-
import { isDark } from "../../util/dark.js";
|
|
8
|
-
import BaseEmpty from "../base/BaseEmpty.vue.js";
|
|
9
|
-
"use strict";
|
|
10
|
-
const _hoisted_1 = { class: "poveste-story-source-code ptw-bg-gray-50 dark:ptw-bg-gray-750 ptw-h-full ptw-overflow-hidden ptw-flex ptw-flex-col" };
|
|
11
|
-
const _hoisted_2 = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: "ptw-h-10 ptw-flex-none ptw-border-b ptw-border-solid ptw-border-gray-500/5 ptw-px-4 ptw-flex ptw-items-center ptw-gap-2"
|
|
14
|
-
};
|
|
15
|
-
const _hoisted_3 = { class: "ptw-flex ptw-flex-none ptw-gap-px ptw-h-full ptw-py-2" };
|
|
16
|
-
const _hoisted_4 = {
|
|
17
|
-
key: 1,
|
|
18
|
-
class: "ptw-text-red-500 ptw-h-full ptw-p-2 ptw-overflow-auto ptw-font-mono ptw-text-sm"
|
|
19
|
-
};
|
|
20
|
-
const _hoisted_5 = ["value"];
|
|
21
|
-
const _hoisted_6 = ["innerHTML"];
|
|
22
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
23
|
-
__name: "StorySourceCode",
|
|
24
|
-
props: {
|
|
25
|
-
story: {},
|
|
26
|
-
variant: {}
|
|
27
|
-
},
|
|
28
|
-
setup(__props) {
|
|
29
|
-
const props = __props;
|
|
30
|
-
const generateSourceCodeFn = ref(null);
|
|
31
|
-
watchEffect(async () => {
|
|
32
|
-
const clientPlugin = clientSupportPlugins[props.story.file?.supportPluginId];
|
|
33
|
-
if (clientPlugin) {
|
|
34
|
-
const pluginModule = await clientPlugin();
|
|
35
|
-
generateSourceCodeFn.value = markRaw(pluginModule.generateSourceCode);
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
const highlighter = shallowRef();
|
|
39
|
-
const dynamicSourceCode = ref("");
|
|
40
|
-
const error = ref(null);
|
|
41
|
-
watch(() => [props.variant, generateSourceCodeFn.value], async () => {
|
|
42
|
-
if (!generateSourceCodeFn.value) return;
|
|
43
|
-
error.value = null;
|
|
44
|
-
dynamicSourceCode.value = "";
|
|
45
|
-
try {
|
|
46
|
-
if (props.variant.source) {
|
|
47
|
-
dynamicSourceCode.value = props.variant.source;
|
|
48
|
-
} else if (props.variant.slots?.().source) {
|
|
49
|
-
const source = props.variant.slots?.().source()[0].children;
|
|
50
|
-
if (source) {
|
|
51
|
-
dynamicSourceCode.value = await unindent(source);
|
|
52
|
-
}
|
|
53
|
-
} else {
|
|
54
|
-
dynamicSourceCode.value = await generateSourceCodeFn.value(props.variant);
|
|
55
|
-
}
|
|
56
|
-
} catch (e) {
|
|
57
|
-
console.error(e);
|
|
58
|
-
error.value = e.message;
|
|
59
|
-
}
|
|
60
|
-
if (!dynamicSourceCode.value) {
|
|
61
|
-
displayedSource.value = "static";
|
|
62
|
-
}
|
|
63
|
-
}, {
|
|
64
|
-
deep: true,
|
|
65
|
-
immediate: true
|
|
66
|
-
});
|
|
67
|
-
const staticSourceCode = ref("");
|
|
68
|
-
watch(() => [props.story, props.story?.file?.source], async () => {
|
|
69
|
-
staticSourceCode.value = "";
|
|
70
|
-
const sourceLoader = props.story.file?.source;
|
|
71
|
-
if (sourceLoader) {
|
|
72
|
-
staticSourceCode.value = (await sourceLoader()).default;
|
|
73
|
-
}
|
|
74
|
-
}, {
|
|
75
|
-
immediate: true
|
|
76
|
-
});
|
|
77
|
-
const displayedSource = ref("dynamic");
|
|
78
|
-
const displayedSourceCode = computed(() => {
|
|
79
|
-
if (displayedSource.value === "dynamic") {
|
|
80
|
-
return dynamicSourceCode.value;
|
|
81
|
-
}
|
|
82
|
-
return staticSourceCode.value;
|
|
83
|
-
});
|
|
84
|
-
onMounted(async () => {
|
|
85
|
-
highlighter.value = await createHighlighter({
|
|
86
|
-
langs: [
|
|
87
|
-
"html",
|
|
88
|
-
"jsx"
|
|
89
|
-
],
|
|
90
|
-
themes: [
|
|
91
|
-
"github-light",
|
|
92
|
-
"github-dark"
|
|
93
|
-
]
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
const sourceHtml = computed(() => displayedSourceCode.value ? highlighter.value?.codeToHtml(displayedSourceCode.value, {
|
|
97
|
-
lang: "html",
|
|
98
|
-
theme: isDark.value ? "github-dark" : "github-light"
|
|
99
|
-
}) : "");
|
|
100
|
-
let lastScroll = 0;
|
|
101
|
-
watch(() => props.variant, () => {
|
|
102
|
-
lastScroll = 0;
|
|
103
|
-
});
|
|
104
|
-
const scroller = ref();
|
|
105
|
-
function onScroll(event) {
|
|
106
|
-
if (sourceHtml.value) {
|
|
107
|
-
lastScroll = event.target.scrollTop;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
watch(sourceHtml, async () => {
|
|
111
|
-
await nextTick();
|
|
112
|
-
if (scroller.value) {
|
|
113
|
-
scroller.value.scrollTop = lastScroll;
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
return (_ctx, _cache) => {
|
|
117
|
-
const _directive_tooltip = resolveDirective("tooltip");
|
|
118
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
119
|
-
!error.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
120
|
-
_cache[2] || (_cache[2] = createElementVNode("div", { class: "ptw-text-gray-900 dark:ptw-text-gray-100" }, " Source ", -1)),
|
|
121
|
-
_cache[3] || (_cache[3] = createElementVNode("div", { class: "ptw-flex-1" }, null, -1)),
|
|
122
|
-
createElementVNode("div", _hoisted_3, [
|
|
123
|
-
withDirectives((openBlock(), createElementBlock("button", {
|
|
124
|
-
class: normalizeClass(["ptw-flex ptw-items-center ptw-gap-1 ptw-h-full ptw-px-1 ptw-bg-gray-500/10 ptw-rounded-l ptw-transition-all ptw-ease-[cubic-bezier(0,1,.6,1)] ptw-duration-300 ptw-overflow-hidden", [
|
|
125
|
-
displayedSource.value !== "dynamic" ? "ptw-max-w-6 ptw-opacity-70" : "ptw-max-w-[82px] ptw-text-primary-600 dark:ptw-text-primary-400",
|
|
126
|
-
dynamicSourceCode.value ? "ptw-cursor-pointer hover:ptw-bg-gray-500/30 active:ptw-bg-gray-600/50" : "ptw-opacity-50"
|
|
127
|
-
]]),
|
|
128
|
-
onClick: _cache[0] || (_cache[0] = ($event) => dynamicSourceCode.value && (displayedSource.value = "dynamic"))
|
|
129
|
-
}, [
|
|
130
|
-
createVNode(unref(Icon), {
|
|
131
|
-
icon: "carbon:flash",
|
|
132
|
-
class: "ptw-w-4 ptw-h-4 ptw-flex-none"
|
|
133
|
-
}),
|
|
134
|
-
createElementVNode("span", {
|
|
135
|
-
class: normalizeClass(["transition-opacity duration-300", {
|
|
136
|
-
"opacity-0": displayedSource.value !== "dynamic"
|
|
137
|
-
}])
|
|
138
|
-
}, " Dynamic ", 2)
|
|
139
|
-
], 2)), [
|
|
140
|
-
[_directive_tooltip, !dynamicSourceCode.value ? "Dynamic source code is not available" : displayedSource.value !== "dynamic" ? "Switch to dynamic source" : null]
|
|
141
|
-
]),
|
|
142
|
-
withDirectives((openBlock(), createElementBlock("button", {
|
|
143
|
-
class: normalizeClass(["ptw-flex ptw-items-center ptw-gap-1 ptw-h-full ptw-px-1 ptw-bg-gray-500/10 ptw-rounded-r ptw-transition-all ptw-ease-[cubic-bezier(0,1,.6,1)] ptw-duration-300 ptw-overflow-hidden", [
|
|
144
|
-
displayedSource.value !== "static" ? "ptw-max-w-6 ptw-opacity-70" : "ptw-max-w-[63px] ptw-text-primary-600 dark:ptw-text-primary-400",
|
|
145
|
-
staticSourceCode.value ? "ptw-cursor-pointer hover:ptw-bg-gray-500/30 active:ptw-bg-gray-600/50" : "ptw-opacity-50"
|
|
146
|
-
]]),
|
|
147
|
-
onClick: _cache[1] || (_cache[1] = ($event) => staticSourceCode.value && (displayedSource.value = "static"))
|
|
148
|
-
}, [
|
|
149
|
-
createVNode(unref(Icon), {
|
|
150
|
-
icon: "carbon:document",
|
|
151
|
-
class: "ptw-w-4 ptw-h-4 ptw-flex-none"
|
|
152
|
-
}),
|
|
153
|
-
createElementVNode("span", {
|
|
154
|
-
class: normalizeClass(["transition-opacity duration-300", {
|
|
155
|
-
"opacity-0": displayedSource.value !== "static"
|
|
156
|
-
}])
|
|
157
|
-
}, " Static ", 2)
|
|
158
|
-
], 2)), [
|
|
159
|
-
[_directive_tooltip, !staticSourceCode.value ? "Static source code is not available" : displayedSource.value !== "static" ? "Switch to static source" : null]
|
|
160
|
-
])
|
|
161
|
-
]),
|
|
162
|
-
createVNode(unref(HstCopyIcon), {
|
|
163
|
-
content: displayedSourceCode.value,
|
|
164
|
-
class: "ptw-flex-none"
|
|
165
|
-
}, null, 8, ["content"])
|
|
166
|
-
])) : createCommentVNode("", true),
|
|
167
|
-
error.value ? (openBlock(), createElementBlock("div", _hoisted_4, " Error: " + toDisplayString(error.value), 1)) : !displayedSourceCode.value ? (openBlock(), createBlock(BaseEmpty, { key: 2 }, {
|
|
168
|
-
default: withCtx(() => [
|
|
169
|
-
createVNode(unref(Icon), {
|
|
170
|
-
icon: "carbon:code-hide",
|
|
171
|
-
class: "ptw-w-8 ptw-h-8 ptw-opacity-50 ptw-mb-6"
|
|
172
|
-
}),
|
|
173
|
-
_cache[4] || (_cache[4] = createElementVNode("span", null, "Not available", -1))
|
|
174
|
-
]),
|
|
175
|
-
_: 1
|
|
176
|
-
})) : !sourceHtml.value ? (openBlock(), createElementBlock("textarea", {
|
|
177
|
-
key: 3,
|
|
178
|
-
ref_key: "scroller",
|
|
179
|
-
ref: scroller,
|
|
180
|
-
class: "__poveste-code-placeholder ptw-w-full ptw-h-full ptw-p-4 ptw-outline-none ptw-bg-transparent ptw-resize-none ptw-m-0",
|
|
181
|
-
value: displayedSourceCode.value,
|
|
182
|
-
readonly: "",
|
|
183
|
-
"data-test-id": "story-source-code",
|
|
184
|
-
onScroll
|
|
185
|
-
}, null, 40, _hoisted_5)) : (openBlock(), createElementBlock("div", {
|
|
186
|
-
key: 4,
|
|
187
|
-
ref_key: "scroller",
|
|
188
|
-
ref: scroller,
|
|
189
|
-
class: "ptw-w-full ptw-h-full ptw-overflow-auto",
|
|
190
|
-
"data-test-id": "story-source-code",
|
|
191
|
-
onScroll
|
|
192
|
-
}, [
|
|
193
|
-
createElementVNode("div", {
|
|
194
|
-
class: "__poveste-code __histoire-code ptw-p-4 ptw-w-fit",
|
|
195
|
-
innerHTML: sourceHtml.value
|
|
196
|
-
}, null, 8, _hoisted_6)
|
|
197
|
-
], 544))
|
|
198
|
-
]);
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
export {
|
|
203
|
-
_sfc_main as default
|
|
204
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./SearchItem.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
"use strict";
|
|
5
|
-
const SearchItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-81e4dd33"]]);
|
|
6
|
-
export {
|
|
7
|
-
SearchItem as default
|
|
8
|
-
};
|