@poveste/app 0.2.1 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +66 -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 +62 -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 +7 -0
- package/dist/bundled/components/app/HomeCounter.vue_vue_type_script_setup_true_lang.js +55 -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 +2828 -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 +8 -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 +59 -13
- 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,187 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, computed, onUnmounted, createElementBlock, openBlock, normalizeClass, createElementVNode, normalizeStyle, renderSlot, withModifiers } from "@poveste/vendors/vue";
|
|
2
|
-
"use strict";
|
|
3
|
-
const SAVE_PREFIX = "__poveste";
|
|
4
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
-
__name: "BaseSplitPane",
|
|
6
|
-
props: {
|
|
7
|
-
orientation: {
|
|
8
|
-
type: String,
|
|
9
|
-
default: "landscape",
|
|
10
|
-
validator: (value) => ["landscape", "portrait"].includes(value)
|
|
11
|
-
},
|
|
12
|
-
defaultSplit: {
|
|
13
|
-
type: Number,
|
|
14
|
-
default: 50
|
|
15
|
-
},
|
|
16
|
-
split: {
|
|
17
|
-
type: Number,
|
|
18
|
-
default: void 0
|
|
19
|
-
},
|
|
20
|
-
min: {
|
|
21
|
-
type: Number,
|
|
22
|
-
default: 20
|
|
23
|
-
},
|
|
24
|
-
max: {
|
|
25
|
-
type: Number,
|
|
26
|
-
default: 80
|
|
27
|
-
},
|
|
28
|
-
draggerOffset: {
|
|
29
|
-
type: String,
|
|
30
|
-
default: "center",
|
|
31
|
-
validator: (value) => ["before", "center", "after"].includes(value)
|
|
32
|
-
},
|
|
33
|
-
saveId: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: null
|
|
36
|
-
},
|
|
37
|
-
fixed: {
|
|
38
|
-
type: Boolean,
|
|
39
|
-
default: false
|
|
40
|
-
},
|
|
41
|
-
showDivider: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
default: true
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
emits: {
|
|
47
|
-
"update:split": (_value) => true
|
|
48
|
-
},
|
|
49
|
-
setup(__props, { emit: __emit }) {
|
|
50
|
-
const props = __props;
|
|
51
|
-
const emit = __emit;
|
|
52
|
-
const currentSplit = ref(props.defaultSplit);
|
|
53
|
-
watch(() => props.split, (value) => {
|
|
54
|
-
if (value !== void 0) {
|
|
55
|
-
currentSplit.value = value;
|
|
56
|
-
}
|
|
57
|
-
}, {
|
|
58
|
-
immediate: true
|
|
59
|
-
});
|
|
60
|
-
if (props.saveId) {
|
|
61
|
-
const storageKey = `${SAVE_PREFIX}-split-pane-${props.saveId}`;
|
|
62
|
-
const savedValue = localStorage.getItem(storageKey);
|
|
63
|
-
if (savedValue != null) {
|
|
64
|
-
let parsedValue;
|
|
65
|
-
try {
|
|
66
|
-
parsedValue = JSON.parse(savedValue);
|
|
67
|
-
} catch (e) {
|
|
68
|
-
console.error(e);
|
|
69
|
-
}
|
|
70
|
-
if (typeof parsedValue === "number") {
|
|
71
|
-
currentSplit.value = parsedValue;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
watch(currentSplit, (value) => {
|
|
75
|
-
localStorage.setItem(storageKey, JSON.stringify(value));
|
|
76
|
-
});
|
|
77
|
-
watch(currentSplit, (value) => {
|
|
78
|
-
if (value !== props.split) {
|
|
79
|
-
emit("update:split", value);
|
|
80
|
-
}
|
|
81
|
-
}, {
|
|
82
|
-
immediate: true
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
const boundSplit = computed(() => {
|
|
86
|
-
if (currentSplit.value < props.min) {
|
|
87
|
-
return props.min;
|
|
88
|
-
} else if (currentSplit.value > props.max) {
|
|
89
|
-
return props.max;
|
|
90
|
-
} else {
|
|
91
|
-
return currentSplit.value;
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
const leftStyle = computed(() => ({
|
|
95
|
-
[props.orientation === "landscape" ? "width" : "height"]: props.fixed ? `${boundSplit.value}px` : `${boundSplit.value}%`
|
|
96
|
-
}));
|
|
97
|
-
const rightStyle = computed(() => ({
|
|
98
|
-
[props.orientation === "landscape" ? "width" : "height"]: props.fixed ? null : `${100 - boundSplit.value}%`
|
|
99
|
-
}));
|
|
100
|
-
const dragging = ref(false);
|
|
101
|
-
let startPosition = 0;
|
|
102
|
-
let startSplit = 0;
|
|
103
|
-
const el = ref(null);
|
|
104
|
-
function dragStart(e) {
|
|
105
|
-
dragging.value = true;
|
|
106
|
-
startPosition = props.orientation === "landscape" ? e.pageX : e.pageY;
|
|
107
|
-
startSplit = boundSplit.value;
|
|
108
|
-
window.addEventListener("mousemove", dragMove);
|
|
109
|
-
window.addEventListener("mouseup", dragEnd);
|
|
110
|
-
}
|
|
111
|
-
function dragMove(e) {
|
|
112
|
-
if (dragging.value) {
|
|
113
|
-
let position;
|
|
114
|
-
let totalSize;
|
|
115
|
-
if (props.orientation === "landscape") {
|
|
116
|
-
position = e.pageX;
|
|
117
|
-
totalSize = el.value.offsetWidth;
|
|
118
|
-
} else {
|
|
119
|
-
position = e.pageY;
|
|
120
|
-
totalSize = el.value.offsetHeight;
|
|
121
|
-
}
|
|
122
|
-
const dPosition = position - startPosition;
|
|
123
|
-
if (props.fixed) {
|
|
124
|
-
currentSplit.value = startSplit + dPosition;
|
|
125
|
-
} else {
|
|
126
|
-
currentSplit.value = startSplit + ~~(dPosition / totalSize * 200) / 2;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
function dragEnd() {
|
|
131
|
-
dragging.value = false;
|
|
132
|
-
removeDragListeners();
|
|
133
|
-
}
|
|
134
|
-
function removeDragListeners() {
|
|
135
|
-
window.removeEventListener("mousemove", dragMove);
|
|
136
|
-
window.removeEventListener("mouseup", dragEnd);
|
|
137
|
-
}
|
|
138
|
-
onUnmounted(() => {
|
|
139
|
-
removeDragListeners();
|
|
140
|
-
});
|
|
141
|
-
return (_ctx, _cache) => {
|
|
142
|
-
return openBlock(), createElementBlock("div", {
|
|
143
|
-
ref_key: "el",
|
|
144
|
-
ref: el,
|
|
145
|
-
class: normalizeClass(["poveste-base-split-pane ptw-flex ptw-h-full ptw-isolate ptw-overflow-auto", {
|
|
146
|
-
"ptw-flex-col": __props.orientation === "portrait",
|
|
147
|
-
"ptw-cursor-ew-resize": dragging.value && __props.orientation === "landscape",
|
|
148
|
-
"ptw-cursor-ns-resize": dragging.value && __props.orientation === "portrait",
|
|
149
|
-
[__props.orientation]: true
|
|
150
|
-
}])
|
|
151
|
-
}, [
|
|
152
|
-
createElementVNode("div", {
|
|
153
|
-
class: normalizeClass(["ptw-relative ptw-top-0 ptw-left-0 ptw-z-20", {
|
|
154
|
-
"ptw-pointer-events-none": dragging.value,
|
|
155
|
-
"ptw-border-r ptw-border-gray-300/30 dark:ptw-border-gray-800": __props.orientation === "landscape" && __props.showDivider,
|
|
156
|
-
"ptw-flex-none": __props.fixed
|
|
157
|
-
}]),
|
|
158
|
-
style: normalizeStyle(leftStyle.value)
|
|
159
|
-
}, [
|
|
160
|
-
renderSlot(_ctx.$slots, "first", {}, void 0, true),
|
|
161
|
-
createElementVNode("div", {
|
|
162
|
-
class: normalizeClass(["dragger ptw-absolute ptw-z-100 hover:ptw-bg-primary-500/50 ptw-transition-colors ptw-duration-150 ptw-delay-150", {
|
|
163
|
-
"ptw-top-0 ptw-bottom-0 ptw-cursor-ew-resize": __props.orientation === "landscape",
|
|
164
|
-
"ptw-left-0 ptw-right-0 ptw-cursor-ns-resize": __props.orientation === "portrait",
|
|
165
|
-
[`dragger-offset-${__props.draggerOffset}`]: true,
|
|
166
|
-
"ptw-bg-primary-500/25": dragging.value
|
|
167
|
-
}]),
|
|
168
|
-
onMousedown: withModifiers(dragStart, ["prevent"])
|
|
169
|
-
}, null, 34)
|
|
170
|
-
], 6),
|
|
171
|
-
createElementVNode("div", {
|
|
172
|
-
class: normalizeClass(["ptw-relative ptw-bottom-0 ptw-right-0", {
|
|
173
|
-
"ptw-pointer-events-none": dragging.value,
|
|
174
|
-
"ptw-border-t ptw-border-gray-300/30 dark:ptw-border-gray-800": __props.orientation === "portrait" && __props.showDivider,
|
|
175
|
-
"ptw-flex-1": __props.fixed
|
|
176
|
-
}]),
|
|
177
|
-
style: normalizeStyle(rightStyle.value)
|
|
178
|
-
}, [
|
|
179
|
-
renderSlot(_ctx.$slots, "last", {}, void 0, true)
|
|
180
|
-
], 6)
|
|
181
|
-
], 2);
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
});
|
|
185
|
-
export {
|
|
186
|
-
_sfc_main as default
|
|
187
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./BaseTab.vue2.js";
|
|
2
|
-
import { resolveComponent, createBlock, openBlock, mergeProps, withCtx, createElementVNode, renderSlot, createVNode, Transition, createElementBlock, createCommentVNode } from "@poveste/vendors/vue";
|
|
3
|
-
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
"use strict";
|
|
5
|
-
const _hoisted_1 = ["href", "onClick"];
|
|
6
|
-
const _hoisted_2 = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "ptw-absolute ptw-bottom-0 ptw-left-0 ptw-w-full ptw-h-[2px] ptw-bg-primary-500 dark:ptw-bg-primary-400"
|
|
9
|
-
};
|
|
10
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11
|
-
const _component_router_link = resolveComponent("router-link");
|
|
12
|
-
return openBlock(), createBlock(_component_router_link, mergeProps({ class: "poveste-base-tab" }, _ctx.$attrs, { custom: "" }), {
|
|
13
|
-
default: withCtx(({ isActive, isExactActive, href, navigate }) => [
|
|
14
|
-
createElementVNode("a", mergeProps(_ctx.$attrs, {
|
|
15
|
-
href,
|
|
16
|
-
class: ["ptw-px-4 ptw-h-full ptw-inline-flex ptw-items-center hover:ptw-bg-primary-50 dark:hover:ptw-bg-primary-900 ptw-relative ptw-text-gray-900 dark:ptw-text-gray-100", {
|
|
17
|
-
"ptw-text-primary-500 dark:ptw-text-primary-400": _ctx.matched != null ? _ctx.matched : _ctx.exact && isExactActive || !_ctx.exact && isActive
|
|
18
|
-
}],
|
|
19
|
-
onClick: navigate
|
|
20
|
-
}), [
|
|
21
|
-
renderSlot(_ctx.$slots, "default"),
|
|
22
|
-
createVNode(Transition, { name: "__poveste-scale-x" }, {
|
|
23
|
-
default: withCtx(() => [
|
|
24
|
-
(_ctx.matched != null ? _ctx.matched : _ctx.exact && isExactActive || !_ctx.exact && isActive) ? (openBlock(), createElementBlock("div", _hoisted_2)) : createCommentVNode("", true)
|
|
25
|
-
]),
|
|
26
|
-
_: 2
|
|
27
|
-
}, 1024)
|
|
28
|
-
], 16, _hoisted_1)
|
|
29
|
-
]),
|
|
30
|
-
_: 3
|
|
31
|
-
}, 16);
|
|
32
|
-
}
|
|
33
|
-
const BaseTab = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
34
|
-
export {
|
|
35
|
-
BaseTab as default
|
|
36
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { defineComponent } from "@poveste/vendors/vue";
|
|
2
|
-
"use strict";
|
|
3
|
-
const _sfc_main = defineComponent({
|
|
4
|
-
inheritAttrs: false,
|
|
5
|
-
props: {
|
|
6
|
-
exact: {
|
|
7
|
-
type: Boolean,
|
|
8
|
-
default: false
|
|
9
|
-
},
|
|
10
|
-
matched: {
|
|
11
|
-
type: Boolean,
|
|
12
|
-
default: null
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
export {
|
|
17
|
-
_sfc_main as default
|
|
18
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { createElementBlock, openBlock, renderSlot } from "@poveste/vendors/vue";
|
|
2
|
-
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
const _sfc_main = {};
|
|
4
|
-
const _hoisted_1 = { class: "poveste-base-tag ptw-text-center ptw-text-xs ptw-mx-1 ptw-px-0.5 ptw-h-4 ptw-uppercase ptw-min-w-4 ptw-rounded-full ptw-bg-primary-500 ptw-text-white dark:ptw-text-black" };
|
|
5
|
-
function _sfc_render(_ctx, _cache) {
|
|
6
|
-
return openBlock(), createElementBlock("span", _hoisted_1, [
|
|
7
|
-
renderSlot(_ctx.$slots, "default")
|
|
8
|
-
]);
|
|
9
|
-
}
|
|
10
|
-
const BaseTag = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
11
|
-
export {
|
|
12
|
-
BaseTag as default
|
|
13
|
-
};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { defineComponent, reactive, ref, onMounted, createElementBlock, openBlock, withKeys, withModifiers, createElementVNode, toDisplayString, Fragment, renderList, createBlock, resolveDynamicComponent, createVNode, withCtx, nextTick } from "@poveste/vendors/vue";
|
|
2
|
-
import { getCommandContext, executeCommand } from "../../util/commands.js";
|
|
3
|
-
import "../base/BaseButton.vue.js";
|
|
4
|
-
import "../base/BaseKeyboardShortcut.vue.js";
|
|
5
|
-
import "./PromptSelect.vue.js";
|
|
6
|
-
import "./PromptText.vue.js";
|
|
7
|
-
import _sfc_main$1 from "./PromptSelect.vue2.js";
|
|
8
|
-
import _sfc_main$2 from "./PromptText.vue2.js";
|
|
9
|
-
import _sfc_main$3 from "../base/BaseButton.vue2.js";
|
|
10
|
-
import _sfc_main$4 from "../base/BaseKeyboardShortcut.vue2.js";
|
|
11
|
-
"use strict";
|
|
12
|
-
const _hoisted_1 = { class: "ptw-p-4 ptw-opacity-70" };
|
|
13
|
-
const _hoisted_2 = { class: "ptw-flex ptw-justify-end ptw-gap-2 ptw-p-2" };
|
|
14
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
|
-
__name: "CommandPrompts",
|
|
16
|
-
props: {
|
|
17
|
-
command: {}
|
|
18
|
-
},
|
|
19
|
-
emits: ["close"],
|
|
20
|
-
setup(__props, { emit: __emit }) {
|
|
21
|
-
const props = __props;
|
|
22
|
-
const emit = __emit;
|
|
23
|
-
const promptTypes = {
|
|
24
|
-
text: _sfc_main$2,
|
|
25
|
-
select: _sfc_main$1
|
|
26
|
-
};
|
|
27
|
-
const answers = reactive({});
|
|
28
|
-
for (const prompt of props.command.prompts) {
|
|
29
|
-
let defaultValue;
|
|
30
|
-
if (typeof prompt.defaultValue === "function") {
|
|
31
|
-
defaultValue = prompt.defaultValue(answers);
|
|
32
|
-
} else {
|
|
33
|
-
defaultValue = prompt.defaultValue;
|
|
34
|
-
}
|
|
35
|
-
answers[prompt.field] = defaultValue;
|
|
36
|
-
}
|
|
37
|
-
function submit() {
|
|
38
|
-
const params = props.command.getParams ? props.command.getParams({ ...getCommandContext(), answers }) : answers;
|
|
39
|
-
executeCommand(props.command, params);
|
|
40
|
-
emit("close");
|
|
41
|
-
}
|
|
42
|
-
const promptComps = ref([]);
|
|
43
|
-
function focusPrompt(index) {
|
|
44
|
-
nextTick(() => {
|
|
45
|
-
promptComps.value[index]?.focus?.();
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
onMounted(() => {
|
|
49
|
-
focusPrompt(0);
|
|
50
|
-
});
|
|
51
|
-
return (_ctx, _cache) => {
|
|
52
|
-
return openBlock(), createElementBlock("form", {
|
|
53
|
-
class: "poveste-command-prompts ptw-flex ptw-flex-col",
|
|
54
|
-
onSubmit: _cache[0] || (_cache[0] = withModifiers(($event) => submit(), ["prevent"])),
|
|
55
|
-
onKeyup: _cache[1] || (_cache[1] = withKeys(($event) => _ctx.$emit("close"), ["escape"]))
|
|
56
|
-
}, [
|
|
57
|
-
createElementVNode("div", _hoisted_1, toDisplayString(__props.command.label), 1),
|
|
58
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.command.prompts, (prompt, index) => {
|
|
59
|
-
return openBlock(), createBlock(resolveDynamicComponent(promptTypes[prompt.type]), {
|
|
60
|
-
key: prompt.field,
|
|
61
|
-
ref_for: true,
|
|
62
|
-
ref_key: "promptComps",
|
|
63
|
-
ref: promptComps,
|
|
64
|
-
modelValue: answers[prompt.field],
|
|
65
|
-
"onUpdate:modelValue": ($event) => answers[prompt.field] = $event,
|
|
66
|
-
prompt,
|
|
67
|
-
answers,
|
|
68
|
-
index,
|
|
69
|
-
class: "hover:ptw-bg-gray-500/10 focus-within:ptw-bg-gray-500/5",
|
|
70
|
-
onNext: ($event) => focusPrompt(index + 1)
|
|
71
|
-
}, null, 40, ["modelValue", "onUpdate:modelValue", "prompt", "answers", "index", "onNext"]);
|
|
72
|
-
}), 128)),
|
|
73
|
-
createElementVNode("div", _hoisted_2, [
|
|
74
|
-
createVNode(_sfc_main$3, {
|
|
75
|
-
type: "submit",
|
|
76
|
-
class: "ptw-px-4 ptw-py-2 ptw-flex ptw-items-start ptw-gap-2"
|
|
77
|
-
}, {
|
|
78
|
-
default: withCtx(() => [
|
|
79
|
-
createVNode(_sfc_main$4, { shortcut: "Enter" }),
|
|
80
|
-
_cache[2] || (_cache[2] = createElementVNode("span", null, "Submit", -1))
|
|
81
|
-
]),
|
|
82
|
-
_: 1
|
|
83
|
-
})
|
|
84
|
-
])
|
|
85
|
-
], 32);
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
export {
|
|
90
|
-
_sfc_main as default
|
|
91
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { defineComponent, defineAsyncComponent, createElementBlock, createCommentVNode, openBlock, createElementVNode, createVNode, unref } from "@poveste/vendors/vue";
|
|
2
|
-
import { useCommandStore } from "../../stores/command.js";
|
|
3
|
-
"use strict";
|
|
4
|
-
const _hoisted_1 = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "poveste-command-prompts-modal ptw-fixed ptw-inset-0 ptw-bg-white/80 dark:ptw-bg-gray-900/80 ptw-z-20"
|
|
7
|
-
};
|
|
8
|
-
const _hoisted_2 = { class: "ptw-bg-white dark:ptw-bg-gray-900 md:ptw-mt-16 md:ptw-mx-auto ptw-w-screen ptw-max-w-[512px] ptw-max-h-[80vh] ptw-overflow-y-auto ptw-scroll-smooth ptw-shadow-xl ptw-border ptw-border-gray-200 dark:ptw-border-gray-750 ptw-rounded-lg ptw-relative ptw-divide-y ptw-divide-gray-200 dark:ptw-divide-gray-850" };
|
|
9
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
-
__name: "CommandPromptsModal",
|
|
11
|
-
props: {
|
|
12
|
-
shown: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
default: false
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
emits: {
|
|
18
|
-
close: () => true
|
|
19
|
-
},
|
|
20
|
-
setup(__props, { emit: __emit }) {
|
|
21
|
-
const CommandPrompts = defineAsyncComponent(() => import("./CommandPrompts.vue.js"));
|
|
22
|
-
const emit = __emit;
|
|
23
|
-
function close() {
|
|
24
|
-
emit("close");
|
|
25
|
-
}
|
|
26
|
-
const commandStore = useCommandStore();
|
|
27
|
-
return (_ctx, _cache) => {
|
|
28
|
-
return __props.shown ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
29
|
-
createElementVNode("div", {
|
|
30
|
-
class: "ptw-absolute ptw-inset-0",
|
|
31
|
-
onClick: _cache[0] || (_cache[0] = ($event) => close())
|
|
32
|
-
}),
|
|
33
|
-
createElementVNode("div", _hoisted_2, [
|
|
34
|
-
createVNode(unref(CommandPrompts), {
|
|
35
|
-
command: unref(commandStore).selectedCommand,
|
|
36
|
-
onClose: _cache[1] || (_cache[1] = ($event) => close())
|
|
37
|
-
}, null, 8, ["command"])
|
|
38
|
-
])
|
|
39
|
-
])) : createCommentVNode("", true);
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
export {
|
|
44
|
-
_sfc_main as default
|
|
45
|
-
};
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, watchEffect, createElementBlock, openBlock, withDirectives, createElementVNode, vModelText, createCommentVNode, toDisplayString, createTextVNode, createVNode, withKeys, withModifiers, unref, Fragment, renderList, normalizeClass, createBlock } from "@poveste/vendors/vue";
|
|
2
|
-
import { Icon } from "@poveste/vendors/iconify";
|
|
3
|
-
import { useSelection } from "../../util/select.js";
|
|
4
|
-
import "../base/BaseKeyboardShortcut.vue.js";
|
|
5
|
-
import _sfc_main$1 from "../base/BaseKeyboardShortcut.vue2.js";
|
|
6
|
-
"use strict";
|
|
7
|
-
const _hoisted_1 = { class: "poveste-prompt-select ptw-relative ptw-group" };
|
|
8
|
-
const _hoisted_2 = ["required"];
|
|
9
|
-
const _hoisted_3 = { class: "ptw-flex ptw-flex-col ptw-gap-2 ptw-p-2" };
|
|
10
|
-
const _hoisted_4 = { class: "ptw-px-2 ptw-flex" };
|
|
11
|
-
const _hoisted_5 = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: "ptw-opacity-70"
|
|
14
|
-
};
|
|
15
|
-
const _hoisted_6 = { class: "ptw-opacity-40 ptw-text-sm ptw-ml-auto ptw-invisible group-focus-within:ptw-visible" };
|
|
16
|
-
const _hoisted_7 = { class: "ptw-overflow-auto max-h-[300px] ptw-mb-2" };
|
|
17
|
-
const _hoisted_8 = ["onClick"];
|
|
18
|
-
const _hoisted_9 = { class: "ptw-flex-1" };
|
|
19
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
|
-
__name: "PromptSelect",
|
|
21
|
-
props: {
|
|
22
|
-
modelValue: {},
|
|
23
|
-
prompt: {},
|
|
24
|
-
answers: {}
|
|
25
|
-
},
|
|
26
|
-
emits: ["update:modelValue", "next"],
|
|
27
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
28
|
-
const props = __props;
|
|
29
|
-
const emit = __emit;
|
|
30
|
-
const model = computed({
|
|
31
|
-
get: () => props.modelValue,
|
|
32
|
-
set: (value) => {
|
|
33
|
-
emit("update:modelValue", value);
|
|
34
|
-
emit("next");
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
const input = ref();
|
|
38
|
-
function focus() {
|
|
39
|
-
input.value?.focus();
|
|
40
|
-
input.value?.select();
|
|
41
|
-
}
|
|
42
|
-
__expose({
|
|
43
|
-
focus
|
|
44
|
-
});
|
|
45
|
-
const search = ref("");
|
|
46
|
-
const options = ref([]);
|
|
47
|
-
let requestId = 0;
|
|
48
|
-
watchEffect(async () => {
|
|
49
|
-
if (typeof props.prompt.options === "function") {
|
|
50
|
-
const rId = ++requestId;
|
|
51
|
-
const result = await props.prompt.options(search.value, props.answers);
|
|
52
|
-
if (rId === requestId) {
|
|
53
|
-
options.value = result;
|
|
54
|
-
}
|
|
55
|
-
} else {
|
|
56
|
-
options.value = props.prompt.options;
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
const formattedOptions = computed(() => {
|
|
60
|
-
return options.value.map((option) => {
|
|
61
|
-
if (typeof option === "string") {
|
|
62
|
-
return {
|
|
63
|
-
value: option,
|
|
64
|
-
label: option
|
|
65
|
-
};
|
|
66
|
-
} else {
|
|
67
|
-
return option;
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
const {
|
|
72
|
-
selectedIndex,
|
|
73
|
-
selectNext,
|
|
74
|
-
selectPrevious
|
|
75
|
-
} = useSelection(formattedOptions);
|
|
76
|
-
function selectIndex(index) {
|
|
77
|
-
const result = formattedOptions.value[index].value;
|
|
78
|
-
if (result) {
|
|
79
|
-
model.value = result;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return (_ctx, _cache) => {
|
|
83
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
84
|
-
withDirectives(createElementVNode("input", {
|
|
85
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
86
|
-
required: __props.prompt.required,
|
|
87
|
-
tabindex: "-1",
|
|
88
|
-
class: "ptw-absolute ptw-inset-0 ptw-opacity-0 ptw-pointer-events-none"
|
|
89
|
-
}, null, 8, _hoisted_2), [
|
|
90
|
-
[vModelText, model.value]
|
|
91
|
-
]),
|
|
92
|
-
createElementVNode("label", _hoisted_3, [
|
|
93
|
-
createElementVNode("span", _hoisted_4, [
|
|
94
|
-
createElementVNode("span", null, toDisplayString(__props.prompt.label), 1),
|
|
95
|
-
__props.prompt.required ? (openBlock(), createElementBlock("span", _hoisted_5, "*")) : createCommentVNode("", true),
|
|
96
|
-
createElementVNode("span", _hoisted_6, [
|
|
97
|
-
_cache[5] || (_cache[5] = createTextVNode(" Press ", -1)),
|
|
98
|
-
createVNode(_sfc_main$1, { shortcut: "Space" }),
|
|
99
|
-
_cache[6] || (_cache[6] = createTextVNode(" to select ", -1))
|
|
100
|
-
])
|
|
101
|
-
]),
|
|
102
|
-
withDirectives(createElementVNode("input", {
|
|
103
|
-
ref_key: "input",
|
|
104
|
-
ref: input,
|
|
105
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => search.value = $event),
|
|
106
|
-
class: "ptw-bg-transparent ptw-w-full ptw-p-2 ptw-border ptw-border-gray-500/50 focus:ptw-border-primary-500/50 ptw-rounded ptw-outline-none",
|
|
107
|
-
onKeydown: [
|
|
108
|
-
_cache[2] || (_cache[2] = withKeys(withModifiers(($event) => unref(selectNext)(), ["prevent"]), ["down"])),
|
|
109
|
-
_cache[3] || (_cache[3] = withKeys(withModifiers(($event) => unref(selectPrevious)(), ["prevent"]), ["up"])),
|
|
110
|
-
_cache[4] || (_cache[4] = withKeys(withModifiers(($event) => selectIndex(unref(selectedIndex)), ["prevent"]), ["space"]))
|
|
111
|
-
]
|
|
112
|
-
}, null, 544), [
|
|
113
|
-
[vModelText, search.value]
|
|
114
|
-
])
|
|
115
|
-
]),
|
|
116
|
-
createElementVNode("div", _hoisted_7, [
|
|
117
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(formattedOptions.value, (option, index) => {
|
|
118
|
-
return openBlock(), createElementBlock("button", {
|
|
119
|
-
key: option.value,
|
|
120
|
-
type: "button",
|
|
121
|
-
tabindex: "-1",
|
|
122
|
-
class: normalizeClass([[
|
|
123
|
-
model.value === option.value ? "ptw-bg-primary-500/20" : index === unref(selectedIndex) ? "ptw-bg-primary-500/10" : "ptw-bg-transparent"
|
|
124
|
-
], "ptw-w-full ptw-text-left ptw-px-4 ptw-py-2 hover:ptw-bg-primary-500/10 ptw-flex ptw-items-center"]),
|
|
125
|
-
onClick: ($event) => model.value = option.value
|
|
126
|
-
}, [
|
|
127
|
-
createElementVNode("span", _hoisted_9, toDisplayString(option.label), 1),
|
|
128
|
-
model.value === option.value ? (openBlock(), createBlock(unref(Icon), {
|
|
129
|
-
key: 0,
|
|
130
|
-
icon: "carbon:checkmark",
|
|
131
|
-
class: "ptw-w-4 ptw-h-4 ptw-text-primary-500"
|
|
132
|
-
})) : createCommentVNode("", true)
|
|
133
|
-
], 10, _hoisted_8);
|
|
134
|
-
}), 128))
|
|
135
|
-
])
|
|
136
|
-
]);
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
export {
|
|
141
|
-
_sfc_main as default
|
|
142
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, watch, createElementBlock, openBlock, createElementVNode, withDirectives, createCommentVNode, toDisplayString, vModelText } from "@poveste/vendors/vue";
|
|
2
|
-
"use strict";
|
|
3
|
-
const _hoisted_1 = { class: "poveste-prompt-text" };
|
|
4
|
-
const _hoisted_2 = { class: "ptw-flex ptw-flex-col ptw-gap-2 ptw-p-2" };
|
|
5
|
-
const _hoisted_3 = { class: "ptw-px-2" };
|
|
6
|
-
const _hoisted_4 = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "ptw-opacity-70"
|
|
9
|
-
};
|
|
10
|
-
const _hoisted_5 = ["required"];
|
|
11
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
-
__name: "PromptText",
|
|
13
|
-
props: {
|
|
14
|
-
modelValue: {},
|
|
15
|
-
prompt: {},
|
|
16
|
-
answers: {}
|
|
17
|
-
},
|
|
18
|
-
emits: ["update:modelValue"],
|
|
19
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
20
|
-
const props = __props;
|
|
21
|
-
const emit = __emit;
|
|
22
|
-
const model = computed({
|
|
23
|
-
get: () => props.modelValue,
|
|
24
|
-
set: (value) => emit("update:modelValue", value)
|
|
25
|
-
});
|
|
26
|
-
const input = ref();
|
|
27
|
-
function focus() {
|
|
28
|
-
input.value?.focus();
|
|
29
|
-
input.value?.select();
|
|
30
|
-
}
|
|
31
|
-
__expose({
|
|
32
|
-
focus
|
|
33
|
-
});
|
|
34
|
-
const defaultValue = computed(() => {
|
|
35
|
-
if (typeof props.prompt.defaultValue === "function") {
|
|
36
|
-
return props.prompt.defaultValue(props.answers);
|
|
37
|
-
} else {
|
|
38
|
-
return props.prompt.defaultValue;
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
watch(defaultValue, (value) => {
|
|
42
|
-
model.value = value;
|
|
43
|
-
});
|
|
44
|
-
return (_ctx, _cache) => {
|
|
45
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
46
|
-
createElementVNode("label", _hoisted_2, [
|
|
47
|
-
createElementVNode("span", _hoisted_3, [
|
|
48
|
-
createElementVNode("span", null, toDisplayString(__props.prompt.label), 1),
|
|
49
|
-
__props.prompt.required ? (openBlock(), createElementBlock("span", _hoisted_4, "*")) : createCommentVNode("", true)
|
|
50
|
-
]),
|
|
51
|
-
withDirectives(createElementVNode("input", {
|
|
52
|
-
ref_key: "input",
|
|
53
|
-
ref: input,
|
|
54
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
55
|
-
class: "ptw-bg-transparent ptw-w-full ptw-p-2 ptw-border ptw-border-gray-500/50 focus:ptw-border-primary-500/50 ptw-rounded ptw-outline-none",
|
|
56
|
-
required: __props.prompt.required
|
|
57
|
-
}, null, 8, _hoisted_5), [
|
|
58
|
-
[vModelText, model.value]
|
|
59
|
-
])
|
|
60
|
-
])
|
|
61
|
-
]);
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
export {
|
|
66
|
-
_sfc_main as default
|
|
67
|
-
};
|