@poveste/app 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/style/floating.pcss +16 -10
- package/dist/app/style/main.pcss +190 -30
- package/dist/app/style/sandbox.css +3 -1
- package/dist/app/style/transitions.pcss +49 -50
- package/dist/bundled/App.js +5 -0
- package/dist/bundled/App.vue_vue_type_script_setup_true_lang.js +169 -0
- package/dist/bundled/_virtual/_plugin-vue_export-helper.js +7 -9
- package/dist/bundled/api.js +5 -9
- package/dist/bundled/app.css +40 -39
- package/dist/bundled/assets/poveste-text-dark.js +4 -0
- package/dist/bundled/assets/poveste-text.js +4 -0
- package/dist/bundled/assets/poveste.js +4 -0
- package/dist/bundled/components/HomeView.js +5 -0
- package/dist/bundled/components/HomeView.vue_vue_type_script_setup_true_lang.js +58 -0
- package/dist/bundled/components/app/AppActions.js +5 -0
- package/dist/bundled/components/app/AppActions.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/bundled/components/app/AppHeader.js +5 -0
- package/dist/bundled/components/app/AppHeader.vue_vue_type_script_setup_true_lang.js +21 -0
- package/dist/bundled/components/app/AppLogo.js +5 -0
- package/dist/bundled/components/app/AppLogo.vue_vue_type_script_setup_true_lang.js +26 -0
- package/dist/bundled/components/app/Breadcrumb.js +7 -0
- package/dist/bundled/components/app/Breadcrumb.vue_vue_type_script_setup_true_lang.js +68 -0
- package/dist/bundled/components/app/HomeCounter.js +5 -0
- package/dist/bundled/components/app/HomeCounter.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/bundled/components/app/InitialLoading.js +5 -0
- package/dist/bundled/components/app/InitialLoading.vue_vue_type_script_setup_true_lang.js +34 -0
- package/dist/bundled/components/app/MobileOverlay.js +5 -0
- package/dist/bundled/components/app/MobileOverlay.vue_vue_type_script_setup_true_lang.js +34 -0
- package/dist/bundled/components/app/TopBar.js +5 -0
- package/dist/bundled/components/app/TopBar.vue_vue_type_script_setup_true_lang.js +65 -0
- package/dist/bundled/components/app/TopBarChip.js +11 -0
- package/dist/bundled/components/app/TopBarChipItem.js +11 -0
- package/dist/bundled/components/base/BaseButton.js +5 -0
- package/dist/bundled/components/base/BaseButton.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/bundled/components/base/BaseCheckbox.js +5 -0
- package/dist/bundled/components/base/BaseCheckbox.vue_vue_type_script_setup_true_lang.js +53 -0
- package/dist/bundled/components/base/BaseEmpty.js +12 -0
- package/dist/bundled/components/base/BaseIcon.js +7 -0
- package/dist/bundled/components/base/BaseIcon.vue_vue_type_script_setup_true_lang.js +26 -0
- package/dist/bundled/components/base/BaseKeyboardShortcut.js +5 -0
- package/dist/bundled/components/base/BaseKeyboardShortcut.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/bundled/components/base/BaseListItem.js +5 -0
- package/dist/bundled/components/base/BaseListItem.vue_vue_type_script_setup_true_lang.js +22 -0
- package/dist/bundled/components/base/BaseListItemLink.js +24 -0
- package/dist/bundled/components/base/BaseListItemLink.vue_vue_type_script_lang.js +19 -0
- package/dist/bundled/components/base/BaseOverflowMenu.js +5 -0
- package/dist/bundled/components/base/BaseOverflowMenu.vue_vue_type_script_setup_true_lang.js +95 -0
- package/dist/bundled/components/base/BaseOverflowTab.js +26 -0
- package/dist/bundled/components/base/BaseOverflowTab.vue_vue_type_script_lang.js +17 -0
- package/dist/bundled/components/base/BaseSelect.js +5 -0
- package/dist/bundled/components/base/BaseSelect.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/bundled/components/base/BaseSplitPane.js +7 -0
- package/dist/bundled/components/base/BaseSplitPane.vue_vue_type_script_setup_true_lang.js +159 -0
- package/dist/bundled/components/base/BaseTab.js +26 -0
- package/dist/bundled/components/base/BaseTab.vue_vue_type_script_lang.js +17 -0
- package/dist/bundled/components/base/BaseTag.js +11 -0
- package/dist/bundled/components/command/CommandPrompts.js +5 -0
- package/dist/bundled/components/command/CommandPrompts.vue_vue_type_script_setup_true_lang.js +86 -0
- package/dist/bundled/components/command/CommandPromptsModal.js +5 -0
- package/dist/bundled/components/command/CommandPromptsModal.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/bundled/components/command/PromptSelect.js +5 -0
- package/dist/bundled/components/command/PromptSelect.vue_vue_type_script_setup_true_lang.js +111 -0
- package/dist/bundled/components/command/PromptText.js +5 -0
- package/dist/bundled/components/command/PromptText.vue_vue_type_script_setup_true_lang.js +51 -0
- package/dist/bundled/components/layout/LayoutItem.js +5 -0
- package/dist/bundled/components/layout/LayoutItem.vue_vue_type_script_setup_true_lang.js +42 -0
- package/dist/bundled/components/layout/LayoutItemGroup.js +5 -0
- package/dist/bundled/components/layout/LayoutItemGroup.vue_vue_type_script_setup_true_lang.js +19 -0
- package/dist/bundled/components/layout/LayoutModal.js +5 -0
- package/dist/bundled/components/layout/LayoutModal.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/bundled/components/layout/LayoutPane.js +5 -0
- package/dist/bundled/components/layout/LayoutPane.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/bundled/components/misc/CheckerboardPattern.js +34 -0
- package/dist/bundled/components/misc/HatchedPattern.js +12 -0
- package/dist/bundled/components/panel/ControlsComponentPropItem.js +5 -0
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue_vue_type_script_setup_true_lang.js +60 -0
- package/dist/bundled/components/panel/ControlsComponentProps.js +5 -0
- package/dist/bundled/components/panel/ControlsComponentProps.vue_vue_type_script_setup_true_lang.js +39 -0
- package/dist/bundled/components/panel/ControlsComponentState.js +5 -0
- package/dist/bundled/components/panel/ControlsComponentState.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/bundled/components/panel/ControlsComponentStateItem.js +5 -0
- package/dist/bundled/components/panel/ControlsComponentStateItem.vue_vue_type_script_setup_true_lang.js +40 -0
- package/dist/bundled/components/panel/PaneTabs.js +5 -0
- package/dist/bundled/components/panel/PaneTabs.vue_vue_type_script_setup_true_lang.js +137 -0
- package/dist/bundled/components/panel/StatePresets.js +5 -0
- package/dist/bundled/components/panel/StatePresets.vue_vue_type_script_setup_true_lang.js +147 -0
- package/dist/bundled/components/panel/StoryControls.js +5 -0
- package/dist/bundled/components/panel/StoryControls.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/bundled/components/panel/StoryDocs.js +5 -0
- package/dist/bundled/components/panel/StoryDocs.vue_vue_type_script_setup_true_lang.js +130 -0
- package/dist/bundled/components/panel/StoryEvent.js +5 -0
- package/dist/bundled/components/panel/StoryEvent.vue_vue_type_script_setup_true_lang.js +36 -0
- package/dist/bundled/components/panel/StoryEvents.js +5 -0
- package/dist/bundled/components/panel/StoryEvents.vue_vue_type_script_setup_true_lang.js +42 -0
- package/dist/bundled/components/panel/StorySidePanel.js +5 -0
- package/dist/bundled/components/panel/StorySidePanel.vue_vue_type_script_setup_true_lang.js +69 -0
- package/dist/bundled/components/panel/StorySourceCode.js +7 -0
- package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_script_setup_true_lang.js +146 -0
- package/dist/bundled/components/search/SearchItem.js +7 -0
- package/dist/bundled/components/search/SearchItem.vue_vue_type_script_setup_true_lang.js +67 -0
- package/dist/bundled/components/search/SearchItemContent.js +5 -0
- package/dist/bundled/components/search/SearchItemContent.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/bundled/components/search/SearchLoading.js +5 -0
- package/dist/bundled/components/search/SearchLoading.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/bundled/components/search/SearchModal.js +5 -0
- package/dist/bundled/components/search/SearchModal.vue_vue_type_script_setup_true_lang.js +38 -0
- package/dist/bundled/components/search/SearchPane.js +5 -0
- package/dist/bundled/components/search/SearchPane.vue_vue_type_script_setup_true_lang.js +229 -0
- package/dist/bundled/components/search/search-docs-data.js +6 -8
- package/dist/bundled/components/search/search-title-data.js +7 -9
- package/dist/bundled/components/story/GenericMountStory.js +5 -0
- package/dist/bundled/components/story/GenericMountStory.vue_vue_type_script_setup_true_lang.js +27 -0
- package/dist/bundled/components/story/GenericRenderStory.js +5 -0
- package/dist/bundled/components/story/GenericRenderStory.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/bundled/components/story/StoryResponsivePreview.js +7 -0
- package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_script_setup_true_lang.js +170 -0
- package/dist/bundled/components/story/StoryVariantGrid.js +5 -0
- package/dist/bundled/components/story/StoryVariantGrid.vue_vue_type_script_setup_true_lang.js +99 -0
- package/dist/bundled/components/story/StoryVariantGridItem.js +7 -0
- package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_script_setup_true_lang.js +142 -0
- package/dist/bundled/components/story/StoryVariantListItem.js +7 -0
- package/dist/bundled/components/story/StoryVariantListItem.vue_vue_type_script_setup_true_lang.js +44 -0
- package/dist/bundled/components/story/StoryVariantSingle.js +7 -0
- package/dist/bundled/components/story/StoryVariantSingle.vue_vue_type_script_setup_true_lang.js +76 -0
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.js +5 -0
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue_vue_type_script_setup_true_lang.js +68 -0
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.js +5 -0
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue_vue_type_script_setup_true_lang.js +134 -0
- package/dist/bundled/components/story/StoryVariantSingleView.js +5 -0
- package/dist/bundled/components/story/StoryVariantSingleView.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/bundled/components/story/StoryView.js +5 -0
- package/dist/bundled/components/story/StoryView.vue_vue_type_script_setup_true_lang.js +95 -0
- package/dist/bundled/components/story/StoryViewer.js +7 -0
- package/dist/bundled/components/story/StoryViewer.vue_vue_type_script_setup_true_lang.js +43 -0
- package/dist/bundled/components/toolbar/DevOnlyToolbarOpenInEditor.js +5 -0
- package/dist/bundled/components/toolbar/DevOnlyToolbarOpenInEditor.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/bundled/components/toolbar/ToolbarBackground.js +7 -0
- package/dist/bundled/components/toolbar/ToolbarBackground.vue_vue_type_script_setup_true_lang.js +109 -0
- package/dist/bundled/components/toolbar/ToolbarNewTab.js +5 -0
- package/dist/bundled/components/toolbar/ToolbarNewTab.vue_vue_type_script_setup_true_lang.js +34 -0
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.js +5 -0
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue_vue_type_script_setup_true_lang.js +93 -0
- package/dist/bundled/components/toolbar/ToolbarTextDirection.js +5 -0
- package/dist/bundled/components/toolbar/ToolbarTextDirection.vue_vue_type_script_setup_true_lang.js +26 -0
- package/dist/bundled/components/toolbar/ToolbarTitle.js +7 -0
- package/dist/bundled/components/toolbar/ToolbarTitle.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/bundled/components/tree/StoryGroup.js +5 -0
- package/dist/bundled/components/tree/StoryGroup.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/bundled/components/tree/StoryList.js +5 -0
- package/dist/bundled/components/tree/StoryList.vue_vue_type_script_setup_true_lang.js +33 -0
- package/dist/bundled/components/tree/StoryListFolder.js +7 -0
- package/dist/bundled/components/tree/StoryListFolder.vue_vue_type_script_setup_true_lang.js +67 -0
- package/dist/bundled/components/tree/StoryListItem.js +7 -0
- package/dist/bundled/components/tree/StoryListItem.vue_vue_type_script_setup_true_lang.js +58 -0
- package/dist/bundled/index.js +24 -33
- package/dist/bundled/plugin.js +43 -46
- package/dist/bundled/router.js +20 -28
- package/dist/bundled/sandbox.js +85 -99
- package/dist/bundled/stores/command.js +21 -23
- package/dist/bundled/stores/events.js +26 -27
- package/dist/bundled/stores/folder.js +37 -51
- package/dist/bundled/stores/layout.js +9 -13
- package/dist/bundled/stores/preview-settings.js +28 -31
- package/dist/bundled/stores/story.js +54 -41
- package/dist/bundled/util/color-scheme.js +29 -21
- package/dist/bundled/util/commands.js +39 -50
- package/dist/bundled/util/config.js +5 -7
- package/dist/bundled/util/const.js +8 -12
- package/dist/bundled/util/dark.js +16 -20
- package/dist/bundled/util/docs.js +14 -23
- package/dist/bundled/util/env.js +4 -4
- package/dist/bundled/util/events.js +22 -28
- package/dist/bundled/util/highlighter.js +23 -0
- package/dist/bundled/util/keyboard.js +89 -103
- package/dist/bundled/util/mapping.js +49 -64
- package/dist/bundled/util/open-in-editor.js +4 -4
- package/dist/bundled/util/preview-settings.js +23 -26
- package/dist/bundled/util/responsive.js +4 -5
- package/dist/bundled/util/sandbox.js +7 -8
- package/dist/bundled/util/scroll.js +20 -28
- package/dist/bundled/util/select.js +21 -26
- package/dist/bundled/util/state.js +25 -36
- package/dist/bundled/util/tooltip.js +8 -9
- package/dist/bundled/util/variant.js +14 -17
- package/dist/style.css +2805 -2953
- package/package.json +12 -9
- package/src/__tests__/postcss-scope-wrapper.spec.ts +65 -0
- package/src/app/App.vue +16 -16
- package/src/app/components/HomeView.vue +3 -3
- package/src/app/components/app/AppActions.vue +3 -3
- package/src/app/components/app/AppHeader.vue +4 -4
- package/src/app/components/app/Breadcrumb.vue +8 -8
- package/src/app/components/app/HomeCounter.vue +5 -5
- package/src/app/components/app/InitialLoading.vue +5 -5
- package/src/app/components/app/MobileOverlay.vue +5 -5
- package/src/app/components/app/TopBar.vue +4 -4
- package/src/app/components/app/TopBarChip.vue +1 -1
- package/src/app/components/app/TopBarChipItem.vue +1 -1
- package/src/app/components/base/BaseButton.vue +3 -3
- package/src/app/components/base/BaseCheckbox.vue +9 -9
- package/src/app/components/base/BaseCopyIcon.vue +1 -1
- package/src/app/components/base/BaseEmpty.vue +4 -4
- package/src/app/components/base/BaseKeyboardShortcut.vue +1 -1
- package/src/app/components/base/BaseListItem.vue +3 -3
- package/src/app/components/base/BaseListItemLink.vue +3 -3
- package/src/app/components/base/BaseOverflowMenu.vue +4 -4
- package/src/app/components/base/BaseOverflowTab.vue +3 -3
- package/src/app/components/base/BaseSelect.vue +6 -6
- package/src/app/components/base/BaseSplitPane.vue +18 -18
- package/src/app/components/base/BaseTab.vue +3 -3
- package/src/app/components/base/BaseTag.vue +1 -1
- package/src/app/components/command/CommandPrompts.vue +5 -5
- package/src/app/components/command/CommandPromptsModal.vue +5 -5
- package/src/app/components/command/PromptSelect.vue +14 -14
- package/src/app/components/command/PromptText.vue +4 -4
- package/src/app/components/layout/LayoutItem.vue +4 -4
- package/src/app/components/layout/LayoutItemGroup.vue +1 -1
- package/src/app/components/layout/LayoutModal.vue +7 -7
- package/src/app/components/layout/LayoutPane.vue +1 -1
- package/src/app/components/panel/ControlsComponentPropItem.vue +2 -2
- package/src/app/components/panel/ControlsComponentProps.vue +3 -3
- package/src/app/components/panel/ControlsComponentState.vue +2 -2
- package/src/app/components/panel/PaneTabs.vue +4 -4
- package/src/app/components/panel/StatePresets.vue +16 -16
- package/src/app/components/panel/StoryControls.vue +7 -8
- package/src/app/components/panel/StoryDocs.vue +5 -5
- package/src/app/components/panel/StoryEvent.vue +7 -7
- package/src/app/components/panel/StoryEvents.vue +1 -1
- package/src/app/components/panel/StorySidePanel.vue +6 -6
- package/src/app/components/panel/StorySourceCode.vue +31 -33
- package/src/app/components/search/SearchItem.vue +5 -17
- package/src/app/components/search/SearchItemContent.vue +9 -9
- package/src/app/components/search/SearchLoading.vue +2 -2
- package/src/app/components/search/SearchModal.vue +9 -9
- package/src/app/components/search/SearchPane.vue +41 -17
- package/src/app/components/story/StoryResponsivePreview.vue +27 -27
- package/src/app/components/story/StoryVariantGrid.vue +5 -5
- package/src/app/components/story/StoryVariantGridItem.vue +21 -21
- package/src/app/components/story/StoryVariantListItem.vue +4 -4
- package/src/app/components/story/StoryVariantSingle.vue +9 -9
- package/src/app/components/story/StoryVariantSinglePreviewNative.vue +7 -8
- package/src/app/components/story/StoryVariantSinglePreviewRemote.vue +15 -14
- package/src/app/components/story/StoryVariantSingleView.vue +1 -1
- package/src/app/components/story/StoryView.vue +5 -5
- package/src/app/components/story/StoryViewer.vue +1 -1
- package/src/app/components/toolbar/DevOnlyToolbarOpenInEditor.vue +1 -1
- package/src/app/components/toolbar/ToolbarBackground.vue +16 -16
- package/src/app/components/toolbar/ToolbarNewTab.vue +1 -1
- package/src/app/components/toolbar/ToolbarResponsiveSize.vue +14 -14
- package/src/app/components/toolbar/ToolbarTextDirection.vue +1 -1
- package/src/app/components/toolbar/ToolbarTitle.vue +6 -6
- package/src/app/components/tree/StoryGroup.vue +5 -5
- package/src/app/components/tree/StoryList.vue +1 -1
- package/src/app/components/tree/StoryListFolder.vue +6 -6
- package/src/app/components/tree/StoryListItem.vue +6 -6
- package/src/app/sandbox.ts +36 -10
- package/src/app/stores/story.ts +17 -0
- package/src/app/style/floating.pcss +16 -10
- package/src/app/style/main.pcss +190 -30
- package/src/app/style/sandbox.css +3 -1
- package/src/app/style/transitions.pcss +49 -50
- package/src/app/util/env.ts +5 -0
- package/src/app/util/events.ts +0 -1
- package/src/app/util/highlighter.ts +32 -0
- package/src/app/util/scroll.ts +2 -1
- package/src/app/util/tooltip.ts +2 -2
- package/dist/bundled/App.vue.js +0 -5
- package/dist/bundled/App.vue2.js +0 -211
- package/dist/bundled/assets/poveste-text-dark.svg.js +0 -4
- package/dist/bundled/assets/poveste-text.svg.js +0 -4
- package/dist/bundled/assets/poveste.svg.js +0 -4
- package/dist/bundled/components/HomeView.vue.js +0 -5
- package/dist/bundled/components/HomeView.vue2.js +0 -66
- package/dist/bundled/components/app/AppActions.vue.js +0 -5
- package/dist/bundled/components/app/AppActions.vue2.js +0 -76
- package/dist/bundled/components/app/AppHeader.vue.js +0 -5
- package/dist/bundled/components/app/AppHeader.vue2.js +0 -29
- package/dist/bundled/components/app/AppLogo.vue.js +0 -5
- package/dist/bundled/components/app/AppLogo.vue2.js +0 -29
- package/dist/bundled/components/app/Breadcrumb.vue.js +0 -8
- package/dist/bundled/components/app/Breadcrumb.vue2.js +0 -91
- package/dist/bundled/components/app/HomeCounter.vue.js +0 -5
- package/dist/bundled/components/app/HomeCounter.vue2.js +0 -42
- package/dist/bundled/components/app/InitialLoading.vue.js +0 -5
- package/dist/bundled/components/app/InitialLoading.vue2.js +0 -51
- package/dist/bundled/components/app/MobileOverlay.vue.js +0 -5
- package/dist/bundled/components/app/MobileOverlay.vue2.js +0 -45
- package/dist/bundled/components/app/TopBar.vue.js +0 -5
- package/dist/bundled/components/app/TopBar.vue2.js +0 -73
- package/dist/bundled/components/app/TopBarChip.vue.js +0 -13
- package/dist/bundled/components/app/TopBarChipItem.vue.js +0 -13
- package/dist/bundled/components/base/BaseButton.vue.js +0 -5
- package/dist/bundled/components/base/BaseButton.vue2.js +0 -39
- package/dist/bundled/components/base/BaseCheckbox.vue.js +0 -5
- package/dist/bundled/components/base/BaseCheckbox.vue2.js +0 -78
- package/dist/bundled/components/base/BaseEmpty.vue.js +0 -14
- package/dist/bundled/components/base/BaseIcon.vue.js +0 -8
- package/dist/bundled/components/base/BaseIcon.vue2.js +0 -29
- package/dist/bundled/components/base/BaseKeyboardShortcut.vue.js +0 -5
- package/dist/bundled/components/base/BaseKeyboardShortcut.vue2.js +0 -20
- package/dist/bundled/components/base/BaseListItem.vue.js +0 -5
- package/dist/bundled/components/base/BaseListItem.vue2.js +0 -33
- package/dist/bundled/components/base/BaseListItemLink.vue.js +0 -33
- package/dist/bundled/components/base/BaseListItemLink.vue2.js +0 -26
- package/dist/bundled/components/base/BaseOverflowMenu.vue.js +0 -5
- package/dist/bundled/components/base/BaseOverflowMenu.vue2.js +0 -100
- package/dist/bundled/components/base/BaseOverflowTab.vue.js +0 -36
- package/dist/bundled/components/base/BaseOverflowTab.vue2.js +0 -18
- package/dist/bundled/components/base/BaseSelect.vue.js +0 -5
- package/dist/bundled/components/base/BaseSelect.vue2.js +0 -77
- package/dist/bundled/components/base/BaseSplitPane.vue.js +0 -8
- package/dist/bundled/components/base/BaseSplitPane.vue2.js +0 -187
- package/dist/bundled/components/base/BaseTab.vue.js +0 -36
- package/dist/bundled/components/base/BaseTab.vue2.js +0 -18
- package/dist/bundled/components/base/BaseTag.vue.js +0 -13
- package/dist/bundled/components/command/CommandPrompts.vue.js +0 -5
- package/dist/bundled/components/command/CommandPrompts.vue2.js +0 -91
- package/dist/bundled/components/command/CommandPromptsModal.vue.js +0 -5
- package/dist/bundled/components/command/CommandPromptsModal.vue2.js +0 -45
- package/dist/bundled/components/command/PromptSelect.vue.js +0 -5
- package/dist/bundled/components/command/PromptSelect.vue2.js +0 -142
- package/dist/bundled/components/command/PromptText.vue.js +0 -5
- package/dist/bundled/components/command/PromptText.vue2.js +0 -67
- package/dist/bundled/components/layout/LayoutItem.vue.js +0 -5
- package/dist/bundled/components/layout/LayoutItem.vue2.js +0 -44
- package/dist/bundled/components/layout/LayoutItemGroup.vue.js +0 -5
- package/dist/bundled/components/layout/LayoutItemGroup.vue2.js +0 -25
- package/dist/bundled/components/layout/LayoutModal.vue.js +0 -5
- package/dist/bundled/components/layout/LayoutModal.vue2.js +0 -68
- package/dist/bundled/components/layout/LayoutPane.vue.js +0 -5
- package/dist/bundled/components/layout/LayoutPane.vue2.js +0 -59
- package/dist/bundled/components/misc/CheckerboardPattern.vue.js +0 -40
- package/dist/bundled/components/misc/HatchedPattern.vue.js +0 -12
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue.js +0 -5
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue2.js +0 -72
- package/dist/bundled/components/panel/ControlsComponentProps.vue.js +0 -5
- package/dist/bundled/components/panel/ControlsComponentProps.vue2.js +0 -45
- package/dist/bundled/components/panel/ControlsComponentState.vue.js +0 -5
- package/dist/bundled/components/panel/ControlsComponentState.vue2.js +0 -41
- package/dist/bundled/components/panel/ControlsComponentStateItem.vue.js +0 -5
- package/dist/bundled/components/panel/ControlsComponentStateItem.vue2.js +0 -46
- package/dist/bundled/components/panel/PaneTabs.vue.js +0 -5
- package/dist/bundled/components/panel/PaneTabs.vue2.js +0 -114
- package/dist/bundled/components/panel/StatePresets.vue.js +0 -5
- package/dist/bundled/components/panel/StatePresets.vue2.js +0 -193
- package/dist/bundled/components/panel/StoryControls.vue.js +0 -5
- package/dist/bundled/components/panel/StoryControls.vue2.js +0 -87
- package/dist/bundled/components/panel/StoryDocs.vue.js +0 -7
- package/dist/bundled/components/panel/StoryDocs.vue2.js +0 -161
- package/dist/bundled/components/panel/StoryEvent.vue.js +0 -5
- package/dist/bundled/components/panel/StoryEvent.vue2.js +0 -59
- package/dist/bundled/components/panel/StoryEvents.vue.js +0 -5
- package/dist/bundled/components/panel/StoryEvents.vue2.js +0 -53
- package/dist/bundled/components/panel/StorySidePanel.vue.js +0 -5
- package/dist/bundled/components/panel/StorySidePanel.vue2.js +0 -94
- package/dist/bundled/components/panel/StorySourceCode.vue.js +0 -8
- package/dist/bundled/components/panel/StorySourceCode.vue2.js +0 -204
- package/dist/bundled/components/search/SearchItem.vue.js +0 -8
- package/dist/bundled/components/search/SearchItem.vue2.js +0 -93
- package/dist/bundled/components/search/SearchItemContent.vue.js +0 -5
- package/dist/bundled/components/search/SearchItemContent.vue2.js +0 -71
- package/dist/bundled/components/search/SearchLoading.vue.js +0 -5
- package/dist/bundled/components/search/SearchLoading.vue2.js +0 -21
- package/dist/bundled/components/search/SearchModal.vue.js +0 -5
- package/dist/bundled/components/search/SearchModal.vue2.js +0 -51
- package/dist/bundled/components/search/SearchPane.vue.js +0 -5
- package/dist/bundled/components/search/SearchPane.vue2.js +0 -272
- package/dist/bundled/components/story/GenericMountStory.vue.js +0 -5
- package/dist/bundled/components/story/GenericMountStory.vue2.js +0 -34
- package/dist/bundled/components/story/GenericRenderStory.vue.js +0 -5
- package/dist/bundled/components/story/GenericRenderStory.vue2.js +0 -39
- package/dist/bundled/components/story/StoryResponsivePreview.vue.js +0 -8
- package/dist/bundled/components/story/StoryResponsivePreview.vue2.js +0 -207
- package/dist/bundled/components/story/StoryVariantGrid.vue.js +0 -5
- package/dist/bundled/components/story/StoryVariantGrid.vue2.js +0 -127
- package/dist/bundled/components/story/StoryVariantGridItem.vue.js +0 -8
- package/dist/bundled/components/story/StoryVariantGridItem.vue2.js +0 -170
- package/dist/bundled/components/story/StoryVariantListItem.vue.js +0 -8
- package/dist/bundled/components/story/StoryVariantListItem.vue2.js +0 -55
- package/dist/bundled/components/story/StoryVariantSingle.vue.js +0 -8
- package/dist/bundled/components/story/StoryVariantSingle.vue2.js +0 -107
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue.js +0 -5
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue2.js +0 -73
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue.js +0 -5
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue2.js +0 -153
- package/dist/bundled/components/story/StoryVariantSingleView.vue.js +0 -5
- package/dist/bundled/components/story/StoryVariantSingleView.vue2.js +0 -35
- package/dist/bundled/components/story/StoryView.vue.js +0 -5
- package/dist/bundled/components/story/StoryView.vue2.js +0 -114
- package/dist/bundled/components/story/StoryViewer.vue.js +0 -8
- package/dist/bundled/components/story/StoryViewer.vue2.js +0 -55
- package/dist/bundled/components/toolbar/DevOnlyToolbarOpenInEditor.vue.js +0 -5
- package/dist/bundled/components/toolbar/DevOnlyToolbarOpenInEditor.vue2.js +0 -35
- package/dist/bundled/components/toolbar/ToolbarBackground.vue.js +0 -8
- package/dist/bundled/components/toolbar/ToolbarBackground.vue2.js +0 -127
- package/dist/bundled/components/toolbar/ToolbarNewTab.vue.js +0 -5
- package/dist/bundled/components/toolbar/ToolbarNewTab.vue2.js +0 -39
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue.js +0 -5
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue2.js +0 -127
- package/dist/bundled/components/toolbar/ToolbarTextDirection.vue.js +0 -5
- package/dist/bundled/components/toolbar/ToolbarTextDirection.vue2.js +0 -31
- package/dist/bundled/components/toolbar/ToolbarTitle.vue.js +0 -8
- package/dist/bundled/components/toolbar/ToolbarTitle.vue2.js +0 -49
- package/dist/bundled/components/tree/StoryGroup.vue.js +0 -5
- package/dist/bundled/components/tree/StoryGroup.vue2.js +0 -74
- package/dist/bundled/components/tree/StoryList.vue.js +0 -5
- package/dist/bundled/components/tree/StoryList.vue2.js +0 -41
- package/dist/bundled/components/tree/StoryListFolder.vue.js +0 -8
- package/dist/bundled/components/tree/StoryListFolder.vue2.js +0 -86
- package/dist/bundled/components/tree/StoryListItem.vue.js +0 -8
- package/dist/bundled/components/tree/StoryListItem.vue2.js +0 -69
|
@@ -13,46 +13,46 @@ const settings = usePreviewSettingsStore().currentSettings
|
|
|
13
13
|
placement="bottom-end"
|
|
14
14
|
:skidding="6"
|
|
15
15
|
:disabled="!povesteConfig.responsivePresets?.length"
|
|
16
|
-
class="poveste-toolbar-responsive-size
|
|
16
|
+
class="poveste-toolbar-responsive-size flex-none"
|
|
17
17
|
>
|
|
18
18
|
<div
|
|
19
19
|
v-tooltip="'Responsive sizes'"
|
|
20
|
-
class="
|
|
20
|
+
class="flex items-center gap-1 px-2.5 py-1.5 text-gray-900 dark:text-gray-100 transition-colors group"
|
|
21
21
|
:class="{
|
|
22
|
-
'hover:
|
|
22
|
+
'hover:bg-white/50 dark:hover:bg-white/10 hover:text-primary-500 dark:hover:text-primary-400 cursor-pointer': povesteConfig.responsivePresets?.length,
|
|
23
23
|
}"
|
|
24
24
|
>
|
|
25
25
|
<Icon
|
|
26
26
|
icon="carbon:devices"
|
|
27
|
-
class="
|
|
27
|
+
class="w-4 h-4"
|
|
28
28
|
/>
|
|
29
29
|
<Icon
|
|
30
30
|
icon="carbon:chevron-down"
|
|
31
|
-
class="
|
|
31
|
+
class="w-3 h-3 opacity-40 group-hover:opacity-70"
|
|
32
32
|
/>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
<template #popper="{ hide }">
|
|
36
|
-
<div class="
|
|
36
|
+
<div class="flex flex-col items-stretch">
|
|
37
37
|
<BaseCheckbox v-model="settings.rotate">
|
|
38
38
|
Rotate
|
|
39
39
|
</BaseCheckbox>
|
|
40
40
|
|
|
41
|
-
<div class="
|
|
41
|
+
<div class="flex items-center gap-2 px-4 py-3">
|
|
42
42
|
<input
|
|
43
43
|
v-model.number="settings.responsiveWidth"
|
|
44
44
|
v-tooltip="'Responsive width (px)'"
|
|
45
45
|
type="number"
|
|
46
|
-
class="
|
|
46
|
+
class="bg-transparent border border-gray-200 dark:border-gray-850 rounded w-20 opacity-50 focus:opacity-100 flex-1 min-w-0"
|
|
47
47
|
step="16"
|
|
48
48
|
placeholder="Auto"
|
|
49
49
|
>
|
|
50
|
-
<span class="
|
|
50
|
+
<span class="opacity-50">×</span>
|
|
51
51
|
<input
|
|
52
52
|
v-model.number="settings.responsiveHeight"
|
|
53
53
|
v-tooltip="'Responsive height (px)'"
|
|
54
54
|
type="number"
|
|
55
|
-
class="
|
|
55
|
+
class="bg-transparent border border-gray-200 dark:border-gray-850 rounded w-20 opacity-50 focus:opacity-100 flex-1 min-w-0"
|
|
56
56
|
step="16"
|
|
57
57
|
placeholder="Auto"
|
|
58
58
|
>
|
|
@@ -61,16 +61,16 @@ const settings = usePreviewSettingsStore().currentSettings
|
|
|
61
61
|
<button
|
|
62
62
|
v-for="(preset, index) in povesteConfig.responsivePresets"
|
|
63
63
|
:key="index"
|
|
64
|
-
class="
|
|
64
|
+
class="px-4 py-3 cursor-pointer text-left flex gap-4"
|
|
65
65
|
:class="[
|
|
66
66
|
settings.responsiveWidth === preset.width && settings.responsiveHeight === preset.height
|
|
67
|
-
? '
|
|
68
|
-
: '
|
|
67
|
+
? 'bg-primary-500 hover:bg-primary-600 text-white dark:text-black'
|
|
68
|
+
: 'bg-transparent hover:bg-primary-100 dark:hover:bg-primary-700',
|
|
69
69
|
]"
|
|
70
70
|
@click="settings.responsiveWidth = preset.width;settings.responsiveHeight = preset.height;hide()"
|
|
71
71
|
>
|
|
72
72
|
{{ preset.label }}
|
|
73
|
-
<span class="
|
|
73
|
+
<span class="ml-auto opacity-70 flex gap-1">
|
|
74
74
|
<span v-if="preset.width">{{ preset.width }}<span v-if="!preset.height">px</span></span>
|
|
75
75
|
<span v-if="preset.width && preset.height">x</span>
|
|
76
76
|
<span v-if="preset.height">{{ preset.height }}<span v-if="!preset.width">px</span></span>
|
|
@@ -14,7 +14,7 @@ const settings = usePreviewSettingsStore().currentSettings
|
|
|
14
14
|
>
|
|
15
15
|
<Icon
|
|
16
16
|
:icon="settings.textDirection === 'ltr' ? 'fluent:text-paragraph-direction-right-16-regular' : 'fluent:text-paragraph-direction-left-16-regular'"
|
|
17
|
-
class="
|
|
17
|
+
class="w-4 h-4"
|
|
18
18
|
/>
|
|
19
19
|
</TopBarChipItem>
|
|
20
20
|
</template>
|
|
@@ -20,19 +20,19 @@ const subtitle = computed(() => {
|
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<template>
|
|
23
|
-
<div class="poveste-toolbar-title
|
|
23
|
+
<div class="poveste-toolbar-title flex items-center gap-2 min-w-0">
|
|
24
24
|
<Icon
|
|
25
25
|
:icon="icon"
|
|
26
|
-
class="
|
|
26
|
+
class="w-4 h-4 flex-none"
|
|
27
27
|
:class="[
|
|
28
|
-
iconColor ? 'bind-icon-color' : '
|
|
28
|
+
iconColor ? 'bind-icon-color' : 'text-gray-500 dark:text-gray-400',
|
|
29
29
|
]"
|
|
30
30
|
/>
|
|
31
|
-
<div class="
|
|
32
|
-
<span class="
|
|
31
|
+
<div class="flex flex-col justify-center min-w-0 leading-tight text-center h-[2.25rem]">
|
|
32
|
+
<span class="truncate text-sm font-medium text-gray-900 dark:text-gray-100">{{ title }}</span>
|
|
33
33
|
<span
|
|
34
34
|
v-if="subtitle"
|
|
35
|
-
class="
|
|
35
|
+
class="truncate text-xs text-gray-500 dark:text-gray-400"
|
|
36
36
|
>{{ subtitle }}</span>
|
|
37
37
|
</div>
|
|
38
38
|
</div>
|
|
@@ -27,23 +27,23 @@ function toggleOpen() {
|
|
|
27
27
|
<template>
|
|
28
28
|
<div
|
|
29
29
|
data-test-id="story-group"
|
|
30
|
-
class="poveste-story-group
|
|
30
|
+
class="poveste-story-group my-2 first:mt-0 last:mb-0 group"
|
|
31
31
|
>
|
|
32
32
|
<template v-if="group.title">
|
|
33
|
-
<div class="
|
|
33
|
+
<div class="h-[1px] bg-gray-500/10 mx-6 mb-2 group-first:hidden" />
|
|
34
34
|
<div
|
|
35
35
|
role="button"
|
|
36
36
|
tabindex="0"
|
|
37
|
-
class="
|
|
37
|
+
class="px-0.5 py-2 md:py-1.5 mx-1 rounded-sm hover:bg-primary-100 dark:hover:bg-primary-900 cursor-pointer select-none flex items-center gap-2 min-w-0 opacity-50 hover:opacity-100"
|
|
38
38
|
@click="toggleOpen"
|
|
39
39
|
@keyup.enter="toggleOpen"
|
|
40
40
|
@keyup.space="toggleOpen"
|
|
41
41
|
>
|
|
42
42
|
<Icon
|
|
43
43
|
:icon="isFolderOpen ? 'ri:subtract-line' : 'ri:add-line'"
|
|
44
|
-
class="
|
|
44
|
+
class="w-4 h-4 ml-4 rounded-sm border border-gray-500/40"
|
|
45
45
|
/>
|
|
46
|
-
<span class="
|
|
46
|
+
<span class="truncate">{{ group.title }}</span>
|
|
47
47
|
</div>
|
|
48
48
|
</template>
|
|
49
49
|
|
|
@@ -37,22 +37,22 @@ const folderPadding = computed(() => {
|
|
|
37
37
|
<div
|
|
38
38
|
role="button"
|
|
39
39
|
tabindex="0"
|
|
40
|
-
class="poveste-story-list-folder-button
|
|
40
|
+
class="poveste-story-list-folder-button px-0.5 py-2 md:py-1.5 mx-1 rounded-sm hover:bg-primary-100 dark:hover:bg-primary-900 cursor-pointer select-none flex"
|
|
41
41
|
@click="toggleOpen"
|
|
42
42
|
@keyup.enter="toggleOpen"
|
|
43
43
|
@keyup.space="toggleOpen"
|
|
44
44
|
>
|
|
45
|
-
<span class="bind-tree-padding
|
|
46
|
-
<span class="
|
|
45
|
+
<span class="bind-tree-padding flex items-center gap-2 min-w-0">
|
|
46
|
+
<span class="flex flex-none items-center opacity-30 [.poveste-story-list-folder-button:hover_&]:opacity-100 ml-4 w-4 h-4 rounded-sm border border-gray-500/40">
|
|
47
47
|
<Icon
|
|
48
48
|
icon="carbon:caret-right"
|
|
49
|
-
class="
|
|
49
|
+
class="w-full h-full transition-transform duration-150"
|
|
50
50
|
:class="{
|
|
51
|
-
'
|
|
51
|
+
'rotate-90': isFolderOpen,
|
|
52
52
|
}"
|
|
53
53
|
/>
|
|
54
54
|
</span>
|
|
55
|
-
<span class="
|
|
55
|
+
<span class="truncate">{{ folder.title }}</span>
|
|
56
56
|
</span>
|
|
57
57
|
</div>
|
|
58
58
|
|
|
@@ -37,23 +37,23 @@ useScrollOnActive(isActive, el)
|
|
|
37
37
|
storyId: story.id,
|
|
38
38
|
},
|
|
39
39
|
}"
|
|
40
|
-
class="
|
|
40
|
+
class="pl-0.5 pr-2 py-2 md:py-1.5 mx-1 rounded-sm"
|
|
41
41
|
>
|
|
42
|
-
<span class="bind-tree-margin
|
|
42
|
+
<span class="bind-tree-margin flex items-center gap-2 pl-4 min-w-0">
|
|
43
43
|
<Icon
|
|
44
44
|
:icon="story.icon ?? 'carbon:cube'"
|
|
45
|
-
class="
|
|
45
|
+
class="w-5 h-5 sm:w-4 sm:h-4 flex-none"
|
|
46
46
|
:class="{
|
|
47
|
-
'
|
|
47
|
+
'text-primary-500': !active && !story.iconColor,
|
|
48
48
|
'bind-icon-color': !active && story.iconColor,
|
|
49
49
|
}"
|
|
50
50
|
/>
|
|
51
|
-
<span class="
|
|
51
|
+
<span class="truncate">{{ story.title }}</span>
|
|
52
52
|
</span>
|
|
53
53
|
|
|
54
54
|
<span
|
|
55
55
|
v-if="!story.docsOnly"
|
|
56
|
-
class="
|
|
56
|
+
class="opacity-40 text-sm"
|
|
57
57
|
>
|
|
58
58
|
{{ story.variants.length }}
|
|
59
59
|
</span>
|
package/src/app/sandbox.ts
CHANGED
|
@@ -33,14 +33,36 @@ if (storedSettings) {
|
|
|
33
33
|
const prefersDark = usePreferredDark()
|
|
34
34
|
const previewDark = computed(() => resolvePreviewDark(receivedSettings.colorScheme, prefersDark.value, isDark.value))
|
|
35
35
|
|
|
36
|
+
// `sandboxDarkClass` is poveste's own deprecated config option, superseded by
|
|
37
|
+
// `theme.darkClass`. Still honoured on purpose: dropping it would silently stop
|
|
38
|
+
// applying the class for anyone who set it. Removing the option is a breaking
|
|
39
|
+
// config change and belongs to a major, not here.
|
|
40
|
+
/*
|
|
41
|
+
* The class also has to land *inside* the story's `@scope` root, not only on
|
|
42
|
+
* `<html>` (#101).
|
|
43
|
+
*
|
|
44
|
+
* User CSS is wrapped in `@scope (.__poveste-render-story)`, and `<html>` sits
|
|
45
|
+
* above that root, so `@scope` cannot match it. A rule shaped like
|
|
46
|
+
* `.dark .foo { … }` — which is what Tailwind's `darkMode: 'class'` and most
|
|
47
|
+
* hand-written dark styling produce — is therefore inert, with no error and no
|
|
48
|
+
* warning to say so.
|
|
49
|
+
*
|
|
50
|
+
* Putting it on the scope root itself is *not* enough: a descendant combinator
|
|
51
|
+
* needs the ancestor to be matchable in scope too, and the root does not
|
|
52
|
+
* qualify. `#app` is strictly inside the root, which does.
|
|
53
|
+
*
|
|
54
|
+
* It stays on `<html>` as well, for user CSS that is not scope-wrapped and for
|
|
55
|
+
* anyone keying off `html.dark`.
|
|
56
|
+
*/
|
|
57
|
+
const darkClassTargets = [document.documentElement, document.querySelector('#app')]
|
|
58
|
+
|
|
36
59
|
watch(previewDark, (value) => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
document.documentElement.classList.remove(povesteConfig.theme.darkClass)
|
|
60
|
+
for (const el of darkClassTargets) {
|
|
61
|
+
if (!el) continue
|
|
62
|
+
|
|
63
|
+
// eslint-disable-next-line ts/no-deprecated
|
|
64
|
+
el.classList.toggle(povesteConfig.sandboxDarkClass, value)
|
|
65
|
+
el.classList.toggle(povesteConfig.theme.darkClass, value)
|
|
44
66
|
}
|
|
45
67
|
}, {
|
|
46
68
|
immediate: true,
|
|
@@ -53,6 +75,11 @@ const app = createApp({
|
|
|
53
75
|
const story = computed(() => file.value.story)
|
|
54
76
|
const variant = computed(() => story.value?.variants.find(v => v.id === query.variantId))
|
|
55
77
|
|
|
78
|
+
// `synced` is the sandbox end of the same flag the host holds, with the same
|
|
79
|
+
// #95 caveat: only set it when the apply will actually provoke the watcher
|
|
80
|
+
// below, which is what `applyState`'s return value reports. Set it
|
|
81
|
+
// unconditionally and an apply that changes nothing leaves it stuck, so the
|
|
82
|
+
// next edit the story makes never reaches the host.
|
|
56
83
|
let synced = false
|
|
57
84
|
let mounted = false
|
|
58
85
|
|
|
@@ -60,8 +87,7 @@ const app = createApp({
|
|
|
60
87
|
// console.log('[sandbox] received message', event.data)
|
|
61
88
|
if (event.data?.type === STATE_SYNC) {
|
|
62
89
|
if (!mounted) return
|
|
63
|
-
synced =
|
|
64
|
-
applyState(variant.value.state, event.data.state)
|
|
90
|
+
synced = applyState(variant.value.state, event.data.state)
|
|
65
91
|
}
|
|
66
92
|
else if (event.data?.type === PREVIEW_SETTINGS_SYNC) {
|
|
67
93
|
applyPreviewSettings(event.data.settings)
|
|
@@ -93,7 +119,7 @@ const app = createApp({
|
|
|
93
119
|
|
|
94
120
|
render() {
|
|
95
121
|
return [
|
|
96
|
-
h('div', { class: '
|
|
122
|
+
h('div', { class: '__poveste-sandbox-hidden' }, [
|
|
97
123
|
h(GenericMountStory, {
|
|
98
124
|
key: file.value.story.id,
|
|
99
125
|
story: file.value.story,
|
package/src/app/stores/story.ts
CHANGED
|
@@ -36,6 +36,22 @@ export const useStoryStore = defineStore('story', () => {
|
|
|
36
36
|
return maps.value.variants.get(idWithStoryId)
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Whether a variant's preview has finished mounting. The preview components
|
|
41
|
+
* report it and `StorySidePanel` waits on it, so it has to be reachable from
|
|
42
|
+
* both — and it stays a field on the variant rather than a map in here
|
|
43
|
+
* because it pairs with `configReady`, which the framework plugins write from
|
|
44
|
+
* inside the sandbox. The side panel reads the two together; splitting them
|
|
45
|
+
* across two owners would make that condition harder to follow, not easier.
|
|
46
|
+
*
|
|
47
|
+
* What does belong here is the write. This store owns the variant objects,
|
|
48
|
+
* so a component reaching into one of its own props to flip the flag was the
|
|
49
|
+
* part that needed to go.
|
|
50
|
+
*/
|
|
51
|
+
function setPreviewReady(variant: Variant, value: boolean) {
|
|
52
|
+
variant.previewReady = value
|
|
53
|
+
}
|
|
54
|
+
|
|
39
55
|
return {
|
|
40
56
|
stories,
|
|
41
57
|
setStories,
|
|
@@ -43,5 +59,6 @@ export const useStoryStore = defineStore('story', () => {
|
|
|
43
59
|
currentVariant,
|
|
44
60
|
getStoryById,
|
|
45
61
|
getVariantById,
|
|
62
|
+
setPreviewReady,
|
|
46
63
|
}
|
|
47
64
|
})
|
|
@@ -5,18 +5,24 @@
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.v-popper--theme-dropdown {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
/*
|
|
9
|
+
* Written with the `dark:` variant rather than a `.ptw-dark &` descendant
|
|
10
|
+
* rule. The chrome CSS is wrapped in `@scope`, and `.ptw-dark` sits on
|
|
11
|
+
* `<html>` — above the scope root — so a descendant rule keyed on it never
|
|
12
|
+
* matches and the dropdown silently falls back to floating-vue's stock light
|
|
13
|
+
* theme. `dark:` compiles to `&:where(.ptw-dark, .ptw-dark *)`, which puts the
|
|
14
|
+
* condition on the subject and survives the wrapper. See #101.
|
|
15
|
+
*/
|
|
16
|
+
.v-popper__inner {
|
|
17
|
+
@apply dark:bg-gray-700 dark:border-gray-850 dark:text-gray-100;
|
|
18
|
+
}
|
|
12
19
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
20
|
+
.v-popper__arrow-inner {
|
|
21
|
+
@apply dark:border-gray-700;
|
|
22
|
+
}
|
|
16
23
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
24
|
+
.v-popper__arrow-outer {
|
|
25
|
+
@apply dark:border-gray-850;
|
|
20
26
|
}
|
|
21
27
|
|
|
22
28
|
&.v-popper__popper--show-from .v-popper__wrapper {
|
package/src/app/style/main.pcss
CHANGED
|
@@ -2,40 +2,115 @@
|
|
|
2
2
|
@import 'floating-vue/dist/style.css';
|
|
3
3
|
@import '@poveste/controls/dist/index.es.css';
|
|
4
4
|
|
|
5
|
-
@import 'floating.pcss';
|
|
6
|
-
@import 'transitions.pcss';
|
|
7
|
-
|
|
8
|
-
*,
|
|
9
|
-
::before,
|
|
10
|
-
::after {
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
border-width: 0;
|
|
13
|
-
border-style: solid;
|
|
14
|
-
border-color: #e5e7eb;
|
|
15
|
-
}
|
|
5
|
+
@import './floating.pcss';
|
|
6
|
+
@import './transitions.pcss';
|
|
16
7
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
/*
|
|
9
|
+
* Tailwind v4. Preflight is intentionally omitted (was `corePlugins.preflight:
|
|
10
|
+
* false` in v3) — the manual reset below replaces it. The `ptw-` utility prefix
|
|
11
|
+
* is gone; chrome/story isolation is handled by @scope (postcss-scope-wrapper, #27).
|
|
12
|
+
*/
|
|
13
|
+
@layer theme, base, components, utilities;
|
|
14
|
+
@import 'tailwindcss/theme.css' layer(theme);
|
|
15
|
+
@import 'tailwindcss/utilities.css' layer(utilities);
|
|
22
16
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
/* v4 auto-detection only scans this package; the app renders controls, so their
|
|
18
|
+
utility classes must be generated here too (was a content glob in v3). */
|
|
19
|
+
@source "../../../../poveste-controls/src";
|
|
26
20
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
/* The markdown renderer builds the docs code-block chrome as an HTML string, so
|
|
22
|
+
its utility classes live in a package v4 never scans. */
|
|
23
|
+
@source "../../../../poveste/src/node/markdown.ts";
|
|
24
|
+
|
|
25
|
+
/* TODO(#36): port the v3 typography theme() customization to v4 CSS. */
|
|
26
|
+
@plugin '@tailwindcss/typography';
|
|
27
|
+
|
|
28
|
+
/* Chrome dark mode. Deliberately a distinct class from the story-side
|
|
29
|
+
`theme.darkClass` default (`dark`) so chrome and story themes stay independent —
|
|
30
|
+
in v3 the `ptw-` prefix applied to the dark class and kept them separate. */
|
|
31
|
+
@custom-variant dark (&:where(.ptw-dark, .ptw-dark *));
|
|
30
32
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
@theme {
|
|
34
|
+
/*
|
|
35
|
+
* primary + gray are themable at runtime: resolved-theme.ts injects
|
|
36
|
+
* --_poveste-color-<name>-<key> as space-separated RGB channels, and v4's
|
|
37
|
+
* native color-mix handles opacity (replacing the v3 withOpacityValue shim).
|
|
38
|
+
*/
|
|
39
|
+
--color-primary-50: rgb(var(--_poveste-color-primary-50));
|
|
40
|
+
--color-primary-100: rgb(var(--_poveste-color-primary-100));
|
|
41
|
+
--color-primary-200: rgb(var(--_poveste-color-primary-200));
|
|
42
|
+
--color-primary-300: rgb(var(--_poveste-color-primary-300));
|
|
43
|
+
--color-primary-400: rgb(var(--_poveste-color-primary-400));
|
|
44
|
+
--color-primary-500: rgb(var(--_poveste-color-primary-500));
|
|
45
|
+
--color-primary-600: rgb(var(--_poveste-color-primary-600));
|
|
46
|
+
--color-primary-700: rgb(var(--_poveste-color-primary-700));
|
|
47
|
+
--color-primary-800: rgb(var(--_poveste-color-primary-800));
|
|
48
|
+
--color-primary-900: rgb(var(--_poveste-color-primary-900));
|
|
49
|
+
|
|
50
|
+
--color-gray-50: rgb(var(--_poveste-color-gray-50));
|
|
51
|
+
--color-gray-100: rgb(var(--_poveste-color-gray-100));
|
|
52
|
+
--color-gray-200: rgb(var(--_poveste-color-gray-200));
|
|
53
|
+
--color-gray-300: rgb(var(--_poveste-color-gray-300));
|
|
54
|
+
--color-gray-400: rgb(var(--_poveste-color-gray-400));
|
|
55
|
+
--color-gray-500: rgb(var(--_poveste-color-gray-500));
|
|
56
|
+
--color-gray-600: rgb(var(--_poveste-color-gray-600));
|
|
57
|
+
--color-gray-700: rgb(var(--_poveste-color-gray-700));
|
|
58
|
+
--color-gray-750: rgb(var(--_poveste-color-gray-750));
|
|
59
|
+
--color-gray-800: rgb(var(--_poveste-color-gray-800));
|
|
60
|
+
--color-gray-850: rgb(var(--_poveste-color-gray-850));
|
|
61
|
+
--color-gray-900: rgb(var(--_poveste-color-gray-900));
|
|
62
|
+
--color-gray-950: rgb(var(--_poveste-color-gray-950));
|
|
63
|
+
|
|
64
|
+
/* border radius (ported from the root v3 config) */
|
|
65
|
+
--radius-sm: 0.25rem;
|
|
66
|
+
--radius: 0.375rem;
|
|
67
|
+
--radius-md: 0.5rem;
|
|
68
|
+
--radius-lg: 0.75rem;
|
|
69
|
+
--radius-xl: 1rem;
|
|
70
|
+
--radius-2xl: 1.5rem;
|
|
71
|
+
--radius-3xl: 2rem;
|
|
34
72
|
}
|
|
35
73
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
74
|
+
/*
|
|
75
|
+
* Manual reset — replaces Preflight, which is intentionally disabled.
|
|
76
|
+
*
|
|
77
|
+
* MUST stay inside `@layer base`. Unlayered rules beat *every* layered rule
|
|
78
|
+
* regardless of specificity, so an unlayered `* { border-width: 0 }` silently
|
|
79
|
+
* defeats `.border` in `@layer utilities` — every border in the app renders at
|
|
80
|
+
* zero width. In v3 this block was safe unlayered because `@tailwind utilities`
|
|
81
|
+
* emitted unlayered rules that won on specificity; v4 puts them in a real
|
|
82
|
+
* cascade layer, which inverts the outcome. Same trap for the `a`/`input`/
|
|
83
|
+
* `button` rules below vs. text-colour and font utilities.
|
|
84
|
+
*/
|
|
85
|
+
@layer base {
|
|
86
|
+
*,
|
|
87
|
+
::before,
|
|
88
|
+
::after {
|
|
89
|
+
box-sizing: border-box;
|
|
90
|
+
border-width: 0;
|
|
91
|
+
border-style: solid;
|
|
92
|
+
border-color: #e5e7eb;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
a,
|
|
96
|
+
input,
|
|
97
|
+
button {
|
|
98
|
+
color: inherit;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
a {
|
|
102
|
+
text-decoration: inherit;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
input, button {
|
|
106
|
+
font-family: inherit;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
a,
|
|
110
|
+
button {
|
|
111
|
+
user-select: none;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
39
114
|
|
|
40
115
|
@layer base {
|
|
41
116
|
body,
|
|
@@ -73,7 +148,7 @@ button {
|
|
|
73
148
|
background: transparent !important;
|
|
74
149
|
}
|
|
75
150
|
|
|
76
|
-
.
|
|
151
|
+
.prose {
|
|
77
152
|
h1, h2, h3, h4 {
|
|
78
153
|
&:not(:hover) {
|
|
79
154
|
.header-anchor[aria-hidden="true"] {
|
|
@@ -93,8 +168,93 @@ button {
|
|
|
93
168
|
background-repeat: no-repeat;
|
|
94
169
|
background-position: right;
|
|
95
170
|
|
|
96
|
-
|
|
171
|
+
/* Subject-side, not `.ptw-dark &` — see the note in floating.pcss. */
|
|
172
|
+
&:where(.ptw-dark, .ptw-dark *) {
|
|
97
173
|
background-image: linear-gradient(to left, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0));
|
|
98
174
|
}
|
|
99
175
|
}
|
|
100
176
|
}
|
|
177
|
+
|
|
178
|
+
/*
|
|
179
|
+
* Typography (@tailwindcss/typography) customization — ported from the v3
|
|
180
|
+
* `theme.extend.typography` JS config to CSS. Unlayered so it overrides the
|
|
181
|
+
* plugin's layered defaults. Needs a visual pass on the docs/markdown pages.
|
|
182
|
+
*/
|
|
183
|
+
.prose {
|
|
184
|
+
--tw-prose-invert-quote-borders: var(--color-gray-800);
|
|
185
|
+
--tw-prose-invert-hr: var(--color-gray-800);
|
|
186
|
+
--tw-prose-invert-bullets: var(--color-gray-500);
|
|
187
|
+
|
|
188
|
+
/*
|
|
189
|
+
* The guard repeats what the plugin puts on every rule it generates, so
|
|
190
|
+
* `not-prose` opts out of ours too. In v3 these lived in
|
|
191
|
+
* `theme.extend.typography` and the plugin added it for us; hand-written CSS
|
|
192
|
+
* gets nothing.
|
|
193
|
+
*
|
|
194
|
+
* `:where()` keeps the guard at zero specificity, so every selector below
|
|
195
|
+
* weighs exactly what its unguarded form did.
|
|
196
|
+
*/
|
|
197
|
+
& :not(:where([class~='not-prose'], [class~='not-prose'] *)) {
|
|
198
|
+
&:is(a) {
|
|
199
|
+
color: var(--color-primary-500);
|
|
200
|
+
text-decoration: none;
|
|
201
|
+
|
|
202
|
+
&:hover {
|
|
203
|
+
text-decoration: underline;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
&:is(h1, h2, h3, h4, th) {
|
|
208
|
+
margin-bottom: 0.75rem;
|
|
209
|
+
|
|
210
|
+
&:not(:first-child) {
|
|
211
|
+
margin-top: 1.25rem;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&:is(blockquote) {
|
|
216
|
+
margin-left: 0;
|
|
217
|
+
margin-right: 0;
|
|
218
|
+
background-color: var(--color-gray-100);
|
|
219
|
+
padding: 0.25rem 0.375rem;
|
|
220
|
+
|
|
221
|
+
&:where(.ptw-dark, .ptw-dark *) {
|
|
222
|
+
background-color: var(--color-gray-750);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
& p:first-child {
|
|
226
|
+
margin-top: 0;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
& p:last-child {
|
|
230
|
+
margin-bottom: 0;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
&:is(li) {
|
|
235
|
+
margin-top: 0.1rem;
|
|
236
|
+
margin-bottom: 0.1rem;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/*
|
|
240
|
+
* Inline code only. markdown-it wraps the highlighted output in
|
|
241
|
+
* `<pre><code class="language-x">`, and that `code` is the parent of the
|
|
242
|
+
* `not-prose` island rather than part of it, so the guard above misses it —
|
|
243
|
+
* as does the island itself for shiki's own `code`, which sits in a `pre`
|
|
244
|
+
* too. The plugin's `pre code` reset would have handled both, but it lives
|
|
245
|
+
* in a cascade layer and this rule is unlayered: unlayered wins outright,
|
|
246
|
+
* the same inversion as #104.
|
|
247
|
+
*/
|
|
248
|
+
&:is(code):not(:where(pre *)) {
|
|
249
|
+
background-color: color-mix(in oklab, var(--color-gray-500) 20%, transparent);
|
|
250
|
+
font-weight: normal;
|
|
251
|
+
padding: 0.05rem 0.5rem;
|
|
252
|
+
border-radius: 0.25rem;
|
|
253
|
+
font-size: 0.8rem;
|
|
254
|
+
|
|
255
|
+
&::before, &::after {
|
|
256
|
+
display: none;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
@@ -14,7 +14,9 @@ html {
|
|
|
14
14
|
font-family: 'Noto Sans Display', system-ui, sans-serif;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.
|
|
17
|
+
/* Namespaced: sandbox.css is not @scope-wrapped, so this rule shares the
|
|
18
|
+
document with user story markup. */
|
|
19
|
+
.__poveste-sandbox-hidden {
|
|
18
20
|
display: none;
|
|
19
21
|
}
|
|
20
22
|
|