histoire 0.8.2 → 0.9.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/client.d.ts +1 -3
- package/client.js +1 -0
- package/dist/node/alias.d.ts +0 -1
- package/dist/node/alias.js +5 -6
- package/dist/node/build.js +1 -1
- package/dist/node/builtin-plugins/tailwind-tokens.js +19 -12
- package/dist/node/collect/run.js +4 -6
- package/dist/node/config.d.ts +9 -0
- package/dist/node/config.js +14 -0
- package/dist/node/context.d.ts +3 -7
- package/dist/node/context.js +2 -0
- package/dist/node/plugin.d.ts +5 -1
- package/dist/node/stories.js +15 -1
- package/dist/node/vite.d.ts +4 -0
- package/dist/node/vite.js +44 -9
- package/package.json +11 -21
- package/src/node/alias.ts +5 -6
- package/src/node/build.ts +1 -1
- package/src/node/builtin-plugins/tailwind-tokens.ts +19 -12
- package/src/node/collect/run.ts +4 -8
- package/src/node/config.ts +24 -0
- package/src/node/context.ts +7 -2
- package/src/node/plugin.ts +5 -1
- package/src/node/stories.ts +18 -1
- package/src/node/vite.ts +53 -9
- package/tsconfig.json +2 -11
- package/dist/bundled/App.js +0 -166
- package/dist/bundled/_virtual/plugin-vue_export-helper.js +0 -8
- package/dist/bundled/api.js +0 -1
- package/dist/bundled/assets/histoire-text-dark.js +0 -2
- package/dist/bundled/assets/histoire-text.js +0 -2
- package/dist/bundled/assets/histoire.js +0 -2
- package/dist/bundled/components/HomeView.js +0 -24
- package/dist/bundled/components/app/AppHeader.js +0 -67
- package/dist/bundled/components/app/AppLogo.js +0 -26
- package/dist/bundled/components/app/Breadcrumb.js +0 -95
- package/dist/bundled/components/app/Breadcrumb.vue_vue_type_style_index_0_scoped_true_lang.js +0 -2
- package/dist/bundled/components/app/InitialLoading.js +0 -48
- package/dist/bundled/components/app/MobileOverlay.js +0 -41
- package/dist/bundled/components/base/BaseCheckbox.js +0 -75
- package/dist/bundled/components/base/BaseEmpty.js +0 -13
- package/dist/bundled/components/base/BaseEmpty.vue_vue_type_style_index_0_scoped_true_lang.js +0 -2
- package/dist/bundled/components/base/BaseListItemLink.js +0 -50
- package/dist/bundled/components/base/BaseOverflowMenu.js +0 -97
- package/dist/bundled/components/base/BaseOverflowTab.js +0 -45
- package/dist/bundled/components/base/BaseSelect.js +0 -88
- package/dist/bundled/components/base/BaseSplitPane.js +0 -184
- package/dist/bundled/components/base/BaseSplitPane.vue_vue_type_style_index_0_scoped_true_lang.js +0 -2
- package/dist/bundled/components/base/BaseTab.js +0 -45
- package/dist/bundled/components/misc/CheckerboardPattern.js +0 -41
- package/dist/bundled/components/misc/HatchedPattern.js +0 -11
- package/dist/bundled/components/misc/HatchedPattern.vue_vue_type_style_index_0_scoped_true_lang.js +0 -2
- package/dist/bundled/components/panel/ControlsComponentPropItem.js +0 -98
- package/dist/bundled/components/panel/ControlsComponentProps.js +0 -42
- package/dist/bundled/components/panel/PaneTabs.js +0 -110
- package/dist/bundled/components/panel/StatePresets.js +0 -184
- package/dist/bundled/components/panel/StoryControls.js +0 -66
- package/dist/bundled/components/panel/StoryDocs.js +0 -48
- package/dist/bundled/components/panel/StoryEvent.js +0 -56
- package/dist/bundled/components/panel/StoryEvents.js +0 -49
- package/dist/bundled/components/panel/StorySidePanel.js +0 -68
- package/dist/bundled/components/panel/StorySourceCode.js +0 -110
- package/dist/bundled/components/panel/StorySourceCode.vue_vue_type_style_index_0_scoped_true_lang.js +0 -2
- package/dist/bundled/components/search/SearchItem.js +0 -113
- package/dist/bundled/components/search/SearchItem.vue_vue_type_style_index_0_scoped_true_lang.js +0 -2
- package/dist/bundled/components/search/SearchLoading.js +0 -19
- package/dist/bundled/components/search/SearchModal.js +0 -46
- package/dist/bundled/components/search/SearchPane.js +0 -263
- package/dist/bundled/components/search/search-docs-data.js +0 -7
- package/dist/bundled/components/search/search-title-data.js +0 -7
- package/dist/bundled/components/story/StoryResponsivePreview.js +0 -180
- package/dist/bundled/components/story/StoryResponsivePreview.vue_vue_type_style_index_0_scoped_true_lang.js +0 -2
- package/dist/bundled/components/story/StoryVariantGrid.js +0 -94
- package/dist/bundled/components/story/StoryVariantGridItem.js +0 -106
- package/dist/bundled/components/story/StoryVariantGridItem.vue_vue_type_style_index_0_scoped_true_lang.js +0 -2
- package/dist/bundled/components/story/StoryVariantListItem.js +0 -58
- package/dist/bundled/components/story/StoryVariantListItem.vue_vue_type_style_index_0_scoped_true_lang.js +0 -2
- package/dist/bundled/components/story/StoryVariantSingle.js +0 -115
- package/dist/bundled/components/story/StoryVariantSingle.vue_vue_type_style_index_0_scoped_true_lang.js +0 -2
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.js +0 -43
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.js +0 -119
- package/dist/bundled/components/story/StoryVariantSingleView.js +0 -49
- package/dist/bundled/components/story/StoryView.js +0 -107
- package/dist/bundled/components/story/StoryViewer.js +0 -57
- package/dist/bundled/components/story/StoryViewer.vue_vue_type_style_index_0_scoped_true_lang.js +0 -2
- package/dist/bundled/components/toolbar/StoryVariantBackground.js +0 -85
- package/dist/bundled/components/toolbar/StoryVariantBackground.vue_vue_type_style_index_0_scoped_true_lang.js +0 -2
- package/dist/bundled/components/toolbar/StoryVariantNewTab.js +0 -33
- package/dist/bundled/components/toolbar/StoryVariantResponsiveSize.js +0 -129
- package/dist/bundled/components/toolbar/StoryVariantTitle.js +0 -24
- package/dist/bundled/components/tree/StoryGroup.js +0 -74
- package/dist/bundled/components/tree/StoryList.js +0 -37
- package/dist/bundled/components/tree/StoryListFolder.js +0 -89
- package/dist/bundled/components/tree/StoryListFolder.vue_vue_type_style_index_0_scoped_true_lang.js +0 -2
- package/dist/bundled/components/tree/StoryListItem.js +0 -72
- package/dist/bundled/components/tree/StoryListItem.vue_vue_type_style_index_0_scoped_true_lang.js +0 -2
- package/dist/bundled/index.js +0 -29
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/common.js +0 -40
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang/en.js +0 -5
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang/latin/advanced.js +0 -11
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang/latin/balance.js +0 -26
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang/latin/simple.js +0 -10
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang.js +0 -50
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/type.js +0 -8
- package/dist/bundled/router.js +0 -28
- package/dist/bundled/sandbox.js +0 -87
- package/dist/bundled/stores/events.js +0 -29
- package/dist/bundled/stores/folder.js +0 -46
- package/dist/bundled/stores/preview-settings.js +0 -15
- package/dist/bundled/stores/story.js +0 -43
- package/dist/bundled/style.css +0 -102
- package/dist/bundled/util/config.js +0 -4
- package/dist/bundled/util/const.js +0 -5
- package/dist/bundled/util/dark.js +0 -4
- package/dist/bundled/util/env.js +0 -2
- package/dist/bundled/util/events.js +0 -32
- package/dist/bundled/util/keyboard.js +0 -84
- package/dist/bundled/util/mapping.js +0 -78
- package/dist/bundled/util/preview-settings.js +0 -6
- package/dist/bundled/util/responsive.js +0 -3
- package/dist/bundled/util/sandbox.js +0 -8
- package/dist/bundled/util/scroll.js +0 -28
- package/dist/bundled/util/state.js +0 -27
- package/dist/bundled/util/tooltip.js +0 -12
- package/dist/bundled/util/variant.js +0 -35
- package/dist/client/app/App.vue +0 -162
- package/dist/client/app/api.d.ts +0 -1
- package/dist/client/app/api.js +0 -1
- package/dist/client/app/assets/histoire-text-dark.svg +0 -89
- package/dist/client/app/assets/histoire-text.svg +0 -89
- package/dist/client/app/assets/histoire.svg +0 -51
- package/dist/client/app/components/HomeView.vue +0 -17
- package/dist/client/app/components/app/AppHeader.vue +0 -64
- package/dist/client/app/components/app/AppLogo.vue +0 -24
- package/dist/client/app/components/app/Breadcrumb.vue +0 -98
- package/dist/client/app/components/app/InitialLoading.vue +0 -44
- package/dist/client/app/components/app/MobileOverlay.vue +0 -33
- package/dist/client/app/components/base/BaseCheckbox.vue +0 -77
- package/dist/client/app/components/base/BaseCopyIcon.vue +0 -34
- package/dist/client/app/components/base/BaseEmpty.vue +0 -21
- package/dist/client/app/components/base/BaseListItemLink.vue +0 -55
- package/dist/client/app/components/base/BaseOverflowMenu.vue +0 -119
- package/dist/client/app/components/base/BaseOverflowTab.vue +0 -46
- package/dist/client/app/components/base/BaseSelect.vue +0 -72
- package/dist/client/app/components/base/BaseSplitPane.vue +0 -240
- package/dist/client/app/components/base/BaseTab.vue +0 -46
- package/dist/client/app/components/misc/CheckerboardPattern.vue +0 -32
- package/dist/client/app/components/misc/HatchedPattern.vue +0 -13
- package/dist/client/app/components/panel/ControlsComponentPropItem.vue +0 -103
- package/dist/client/app/components/panel/ControlsComponentProps.vue +0 -34
- package/dist/client/app/components/panel/PaneTabs.vue +0 -64
- package/dist/client/app/components/panel/StatePresets.vue +0 -196
- package/dist/client/app/components/panel/StoryControls.vue +0 -68
- package/dist/client/app/components/panel/StoryDocs.vue +0 -45
- package/dist/client/app/components/panel/StoryEvent.vue +0 -54
- package/dist/client/app/components/panel/StoryEvents.vue +0 -45
- package/dist/client/app/components/panel/StorySidePanel.vue +0 -66
- package/dist/client/app/components/panel/StorySourceCode.vue +0 -116
- package/dist/client/app/components/search/SearchItem.vue +0 -110
- package/dist/client/app/components/search/SearchLoading.vue +0 -16
- package/dist/client/app/components/search/SearchModal.vue +0 -43
- package/dist/client/app/components/search/SearchPane.vue +0 -293
- package/dist/client/app/components/search/search-docs-data.d.ts +0 -3
- package/dist/client/app/components/search/search-docs-data.js +0 -7
- package/dist/client/app/components/search/search-title-data.d.ts +0 -3
- package/dist/client/app/components/search/search-title-data.js +0 -7
- package/dist/client/app/components/search/types.d.ts +0 -7
- package/dist/client/app/components/search/types.js +0 -1
- package/dist/client/app/components/story/StoryResponsivePreview.vue +0 -204
- package/dist/client/app/components/story/StoryVariantGrid.vue +0 -112
- package/dist/client/app/components/story/StoryVariantGridItem.vue +0 -110
- package/dist/client/app/components/story/StoryVariantListItem.vue +0 -50
- package/dist/client/app/components/story/StoryVariantSingle.vue +0 -105
- package/dist/client/app/components/story/StoryVariantSinglePreviewNative.vue +0 -42
- package/dist/client/app/components/story/StoryVariantSinglePreviewRemote.vue +0 -139
- package/dist/client/app/components/story/StoryVariantSingleView.vue +0 -52
- package/dist/client/app/components/story/StoryView.vue +0 -96
- package/dist/client/app/components/story/StoryViewer.vue +0 -53
- package/dist/client/app/components/toolbar/StoryVariantBackground.vue +0 -67
- package/dist/client/app/components/toolbar/StoryVariantNewTab.vue +0 -29
- package/dist/client/app/components/toolbar/StoryVariantResponsiveSize.vue +0 -82
- package/dist/client/app/components/toolbar/StoryVariantTitle.vue +0 -21
- package/dist/client/app/components/tree/StoryGroup.vue +0 -75
- package/dist/client/app/components/tree/StoryList.vue +0 -35
- package/dist/client/app/components/tree/StoryListFolder.vue +0 -89
- package/dist/client/app/components/tree/StoryListItem.vue +0 -71
- package/dist/client/app/index.d.ts +0 -2
- package/dist/client/app/index.js +0 -28
- package/dist/client/app/router.d.ts +0 -2
- package/dist/client/app/router.js +0 -26
- package/dist/client/app/sandbox.d.ts +0 -1
- package/dist/client/app/sandbox.js +0 -87
- package/dist/client/app/stores/events.d.ts +0 -29
- package/dist/client/app/stores/events.js +0 -25
- package/dist/client/app/stores/folder.d.ts +0 -10
- package/dist/client/app/stores/folder.js +0 -47
- package/dist/client/app/stores/preview-settings.d.ts +0 -8
- package/dist/client/app/stores/preview-settings.js +0 -14
- package/dist/client/app/stores/story.d.ts +0 -362
- package/dist/client/app/stores/story.js +0 -39
- package/dist/client/app/style/floating-vue.pcss +0 -34
- package/dist/client/app/style/main.pcss +0 -86
- package/dist/client/app/style/sandbox.css +0 -19
- package/dist/client/app/style/transitions.pcss +0 -51
- package/dist/client/app/types.d.ts +0 -34
- package/dist/client/app/types.js +0 -1
- package/dist/client/app/util/config.d.ts +0 -3
- package/dist/client/app/util/config.js +0 -4
- package/dist/client/app/util/const.d.ts +0 -4
- package/dist/client/app/util/const.js +0 -4
- package/dist/client/app/util/dark.d.ts +0 -2
- package/dist/client/app/util/dark.js +0 -3
- package/dist/client/app/util/env.d.ts +0 -1
- package/dist/client/app/util/env.js +0 -1
- package/dist/client/app/util/events.d.ts +0 -1
- package/dist/client/app/util/events.js +0 -31
- package/dist/client/app/util/keyboard.d.ts +0 -8
- package/dist/client/app/util/keyboard.js +0 -82
- package/dist/client/app/util/mapping.d.ts +0 -3
- package/dist/client/app/util/mapping.js +0 -69
- package/dist/client/app/util/preview-settings.d.ts +0 -9
- package/dist/client/app/util/preview-settings.js +0 -5
- package/dist/client/app/util/responsive.d.ts +0 -1
- package/dist/client/app/util/responsive.js +0 -2
- package/dist/client/app/util/sandbox.d.ts +0 -2
- package/dist/client/app/util/sandbox.js +0 -7
- package/dist/client/app/util/scroll.d.ts +0 -4
- package/dist/client/app/util/scroll.js +0 -27
- package/dist/client/app/util/state.d.ts +0 -1
- package/dist/client/app/util/state.js +0 -27
- package/dist/client/app/util/tooltip.d.ts +0 -6
- package/dist/client/app/util/tooltip.js +0 -11
- package/dist/client/app/util/variant.d.ts +0 -18
- package/dist/client/app/util/variant.js +0 -17
- package/dist/client/bundle-index.js +0 -5
- package/dist/client/bundle-main.js +0 -5
- package/dist/client/bundle-sandbox.js +0 -2
- package/dist/client/index.d.ts +0 -9
- package/dist/client/index.js +0 -4
- package/dist/style.css +0 -2382
- package/postcss.config.cjs +0 -8
- package/scripts/copy.mjs +0 -12
- package/scripts/watchAndCopy.mjs +0 -15
- package/src/client/app/App.vue +0 -162
- package/src/client/app/api.ts +0 -1
- package/src/client/app/assets/histoire-text-dark.svg +0 -89
- package/src/client/app/assets/histoire-text.svg +0 -89
- package/src/client/app/assets/histoire.svg +0 -51
- package/src/client/app/components/HomeView.vue +0 -17
- package/src/client/app/components/app/AppHeader.vue +0 -64
- package/src/client/app/components/app/AppLogo.vue +0 -24
- package/src/client/app/components/app/Breadcrumb.vue +0 -98
- package/src/client/app/components/app/InitialLoading.vue +0 -44
- package/src/client/app/components/app/MobileOverlay.vue +0 -33
- package/src/client/app/components/base/BaseCheckbox.vue +0 -77
- package/src/client/app/components/base/BaseCopyIcon.vue +0 -34
- package/src/client/app/components/base/BaseEmpty.vue +0 -21
- package/src/client/app/components/base/BaseListItemLink.vue +0 -55
- package/src/client/app/components/base/BaseOverflowMenu.vue +0 -119
- package/src/client/app/components/base/BaseOverflowTab.vue +0 -46
- package/src/client/app/components/base/BaseSelect.vue +0 -72
- package/src/client/app/components/base/BaseSplitPane.vue +0 -240
- package/src/client/app/components/base/BaseTab.vue +0 -46
- package/src/client/app/components/misc/CheckerboardPattern.vue +0 -32
- package/src/client/app/components/misc/HatchedPattern.vue +0 -13
- package/src/client/app/components/panel/ControlsComponentPropItem.vue +0 -103
- package/src/client/app/components/panel/ControlsComponentProps.vue +0 -34
- package/src/client/app/components/panel/PaneTabs.vue +0 -64
- package/src/client/app/components/panel/StatePresets.vue +0 -196
- package/src/client/app/components/panel/StoryControls.vue +0 -68
- package/src/client/app/components/panel/StoryDocs.vue +0 -45
- package/src/client/app/components/panel/StoryEvent.vue +0 -54
- package/src/client/app/components/panel/StoryEvents.vue +0 -45
- package/src/client/app/components/panel/StorySidePanel.vue +0 -66
- package/src/client/app/components/panel/StorySourceCode.vue +0 -116
- package/src/client/app/components/search/SearchItem.vue +0 -110
- package/src/client/app/components/search/SearchLoading.vue +0 -16
- package/src/client/app/components/search/SearchModal.vue +0 -43
- package/src/client/app/components/search/SearchPane.vue +0 -293
- package/src/client/app/components/search/search-docs-data.ts +0 -10
- package/src/client/app/components/search/search-title-data.ts +0 -10
- package/src/client/app/components/search/types.ts +0 -4
- package/src/client/app/components/story/StoryResponsivePreview.vue +0 -204
- package/src/client/app/components/story/StoryVariantGrid.vue +0 -112
- package/src/client/app/components/story/StoryVariantGridItem.vue +0 -110
- package/src/client/app/components/story/StoryVariantListItem.vue +0 -50
- package/src/client/app/components/story/StoryVariantSingle.vue +0 -105
- package/src/client/app/components/story/StoryVariantSinglePreviewNative.vue +0 -42
- package/src/client/app/components/story/StoryVariantSinglePreviewRemote.vue +0 -139
- package/src/client/app/components/story/StoryVariantSingleView.vue +0 -52
- package/src/client/app/components/story/StoryView.vue +0 -96
- package/src/client/app/components/story/StoryViewer.vue +0 -53
- package/src/client/app/components/toolbar/StoryVariantBackground.vue +0 -67
- package/src/client/app/components/toolbar/StoryVariantNewTab.vue +0 -29
- package/src/client/app/components/toolbar/StoryVariantResponsiveSize.vue +0 -82
- package/src/client/app/components/toolbar/StoryVariantTitle.vue +0 -21
- package/src/client/app/components/tree/StoryGroup.vue +0 -75
- package/src/client/app/components/tree/StoryList.vue +0 -35
- package/src/client/app/components/tree/StoryListFolder.vue +0 -89
- package/src/client/app/components/tree/StoryListItem.vue +0 -71
- package/src/client/app/index.ts +0 -30
- package/src/client/app/router.ts +0 -29
- package/src/client/app/sandbox.ts +0 -95
- package/src/client/app/stores/events.ts +0 -36
- package/src/client/app/stores/folder.ts +0 -59
- package/src/client/app/stores/preview-settings.ts +0 -17
- package/src/client/app/stores/story.ts +0 -47
- package/src/client/app/style/floating-vue.pcss +0 -34
- package/src/client/app/style/main.pcss +0 -86
- package/src/client/app/style/sandbox.css +0 -19
- package/src/client/app/style/transitions.pcss +0 -51
- package/src/client/app/types.ts +0 -46
- package/src/client/app/util/config.ts +0 -6
- package/src/client/app/util/const.ts +0 -4
- package/src/client/app/util/dark.ts +0 -4
- package/src/client/app/util/env.ts +0 -1
- package/src/client/app/util/events.ts +0 -30
- package/src/client/app/util/keyboard.ts +0 -99
- package/src/client/app/util/mapping.ts +0 -74
- package/src/client/app/util/preview-settings.ts +0 -8
- package/src/client/app/util/responsive.ts +0 -3
- package/src/client/app/util/sandbox.ts +0 -10
- package/src/client/app/util/scroll.ts +0 -31
- package/src/client/app/util/state.ts +0 -36
- package/src/client/app/util/tooltip.ts +0 -13
- package/src/client/app/util/variant.ts +0 -20
- package/src/client/bundle-index.js +0 -5
- package/src/client/bundle-main.js +0 -5
- package/src/client/bundle-sandbox.js +0 -2
- package/src/client/index.ts +0 -13
- package/src/client/shim.d.ts +0 -7
- package/tailwind.config.cjs +0 -126
- package/vite.config.ts +0 -87
- package/vue.d.ts +0 -1
|
@@ -1,362 +0,0 @@
|
|
|
1
|
-
import { Story, Variant } from '../types';
|
|
2
|
-
export declare const useStoryStore: import("pinia").StoreDefinition<"story", import("pinia")._UnwrapAll<Pick<{
|
|
3
|
-
stories: import("vue").Ref<{
|
|
4
|
-
id: string;
|
|
5
|
-
title: string;
|
|
6
|
-
group?: string;
|
|
7
|
-
variants: {
|
|
8
|
-
id: string;
|
|
9
|
-
title: string;
|
|
10
|
-
icon?: string;
|
|
11
|
-
iconColor?: string;
|
|
12
|
-
setupApp?: (payload: any) => unknown;
|
|
13
|
-
slots?: () => Readonly<any>;
|
|
14
|
-
state: any;
|
|
15
|
-
source?: string;
|
|
16
|
-
responsiveDisabled?: boolean;
|
|
17
|
-
autoPropsDisabled?: boolean;
|
|
18
|
-
configReady?: boolean;
|
|
19
|
-
previewReady?: boolean;
|
|
20
|
-
}[];
|
|
21
|
-
layout?: {
|
|
22
|
-
type: "single";
|
|
23
|
-
iframe?: boolean;
|
|
24
|
-
} | {
|
|
25
|
-
type: "grid";
|
|
26
|
-
width?: string | number;
|
|
27
|
-
};
|
|
28
|
-
icon?: string;
|
|
29
|
-
iconColor?: string;
|
|
30
|
-
docsOnly?: boolean;
|
|
31
|
-
file?: {
|
|
32
|
-
id: string;
|
|
33
|
-
framework: string;
|
|
34
|
-
component: any;
|
|
35
|
-
story: any;
|
|
36
|
-
path: string[];
|
|
37
|
-
};
|
|
38
|
-
lastSelectedVariant?: {
|
|
39
|
-
id: string;
|
|
40
|
-
title: string;
|
|
41
|
-
icon?: string;
|
|
42
|
-
iconColor?: string;
|
|
43
|
-
setupApp?: (payload: any) => unknown;
|
|
44
|
-
slots?: () => Readonly<any>;
|
|
45
|
-
state: any;
|
|
46
|
-
source?: string;
|
|
47
|
-
responsiveDisabled?: boolean;
|
|
48
|
-
autoPropsDisabled?: boolean;
|
|
49
|
-
configReady?: boolean;
|
|
50
|
-
previewReady?: boolean;
|
|
51
|
-
};
|
|
52
|
-
slots?: () => Readonly<any>;
|
|
53
|
-
}[]>;
|
|
54
|
-
setStories: (value: Story[]) => void;
|
|
55
|
-
currentStory: import("vue").ComputedRef<{
|
|
56
|
-
id: string;
|
|
57
|
-
title: string;
|
|
58
|
-
group?: string;
|
|
59
|
-
variants: {
|
|
60
|
-
id: string;
|
|
61
|
-
title: string;
|
|
62
|
-
icon?: string;
|
|
63
|
-
iconColor?: string;
|
|
64
|
-
setupApp?: (payload: any) => unknown;
|
|
65
|
-
slots?: () => Readonly<any>;
|
|
66
|
-
state: any;
|
|
67
|
-
source?: string;
|
|
68
|
-
responsiveDisabled?: boolean;
|
|
69
|
-
autoPropsDisabled?: boolean;
|
|
70
|
-
configReady?: boolean;
|
|
71
|
-
previewReady?: boolean;
|
|
72
|
-
}[];
|
|
73
|
-
layout?: {
|
|
74
|
-
type: "single";
|
|
75
|
-
iframe?: boolean;
|
|
76
|
-
} | {
|
|
77
|
-
type: "grid";
|
|
78
|
-
width?: string | number;
|
|
79
|
-
};
|
|
80
|
-
icon?: string;
|
|
81
|
-
iconColor?: string;
|
|
82
|
-
docsOnly?: boolean;
|
|
83
|
-
file?: {
|
|
84
|
-
id: string;
|
|
85
|
-
framework: string;
|
|
86
|
-
component: any;
|
|
87
|
-
story: any;
|
|
88
|
-
path: string[];
|
|
89
|
-
};
|
|
90
|
-
lastSelectedVariant?: {
|
|
91
|
-
id: string;
|
|
92
|
-
title: string;
|
|
93
|
-
icon?: string;
|
|
94
|
-
iconColor?: string;
|
|
95
|
-
setupApp?: (payload: any) => unknown;
|
|
96
|
-
slots?: () => Readonly<any>;
|
|
97
|
-
state: any;
|
|
98
|
-
source?: string;
|
|
99
|
-
responsiveDisabled?: boolean;
|
|
100
|
-
autoPropsDisabled?: boolean;
|
|
101
|
-
configReady?: boolean;
|
|
102
|
-
previewReady?: boolean;
|
|
103
|
-
};
|
|
104
|
-
slots?: () => Readonly<any>;
|
|
105
|
-
}>;
|
|
106
|
-
currentVariant: import("vue").ComputedRef<{
|
|
107
|
-
id: string;
|
|
108
|
-
title: string;
|
|
109
|
-
icon?: string;
|
|
110
|
-
iconColor?: string;
|
|
111
|
-
setupApp?: (payload: any) => unknown;
|
|
112
|
-
slots?: () => Readonly<any>;
|
|
113
|
-
state: any;
|
|
114
|
-
source?: string;
|
|
115
|
-
responsiveDisabled?: boolean;
|
|
116
|
-
autoPropsDisabled?: boolean;
|
|
117
|
-
configReady?: boolean;
|
|
118
|
-
previewReady?: boolean;
|
|
119
|
-
}>;
|
|
120
|
-
getStoryById: (id: string) => Story;
|
|
121
|
-
getVariantById: (idWithStoryId: string) => Variant;
|
|
122
|
-
}, "stories">>, import("pinia")._UnwrapAll<Pick<{
|
|
123
|
-
stories: import("vue").Ref<{
|
|
124
|
-
id: string;
|
|
125
|
-
title: string;
|
|
126
|
-
group?: string;
|
|
127
|
-
variants: {
|
|
128
|
-
id: string;
|
|
129
|
-
title: string;
|
|
130
|
-
icon?: string;
|
|
131
|
-
iconColor?: string;
|
|
132
|
-
setupApp?: (payload: any) => unknown;
|
|
133
|
-
slots?: () => Readonly<any>;
|
|
134
|
-
state: any;
|
|
135
|
-
source?: string;
|
|
136
|
-
responsiveDisabled?: boolean;
|
|
137
|
-
autoPropsDisabled?: boolean;
|
|
138
|
-
configReady?: boolean;
|
|
139
|
-
previewReady?: boolean;
|
|
140
|
-
}[];
|
|
141
|
-
layout?: {
|
|
142
|
-
type: "single";
|
|
143
|
-
iframe?: boolean;
|
|
144
|
-
} | {
|
|
145
|
-
type: "grid";
|
|
146
|
-
width?: string | number;
|
|
147
|
-
};
|
|
148
|
-
icon?: string;
|
|
149
|
-
iconColor?: string;
|
|
150
|
-
docsOnly?: boolean;
|
|
151
|
-
file?: {
|
|
152
|
-
id: string;
|
|
153
|
-
framework: string;
|
|
154
|
-
component: any;
|
|
155
|
-
story: any;
|
|
156
|
-
path: string[];
|
|
157
|
-
};
|
|
158
|
-
lastSelectedVariant?: {
|
|
159
|
-
id: string;
|
|
160
|
-
title: string;
|
|
161
|
-
icon?: string;
|
|
162
|
-
iconColor?: string;
|
|
163
|
-
setupApp?: (payload: any) => unknown;
|
|
164
|
-
slots?: () => Readonly<any>;
|
|
165
|
-
state: any;
|
|
166
|
-
source?: string;
|
|
167
|
-
responsiveDisabled?: boolean;
|
|
168
|
-
autoPropsDisabled?: boolean;
|
|
169
|
-
configReady?: boolean;
|
|
170
|
-
previewReady?: boolean;
|
|
171
|
-
};
|
|
172
|
-
slots?: () => Readonly<any>;
|
|
173
|
-
}[]>;
|
|
174
|
-
setStories: (value: Story[]) => void;
|
|
175
|
-
currentStory: import("vue").ComputedRef<{
|
|
176
|
-
id: string;
|
|
177
|
-
title: string;
|
|
178
|
-
group?: string;
|
|
179
|
-
variants: {
|
|
180
|
-
id: string;
|
|
181
|
-
title: string;
|
|
182
|
-
icon?: string;
|
|
183
|
-
iconColor?: string;
|
|
184
|
-
setupApp?: (payload: any) => unknown;
|
|
185
|
-
slots?: () => Readonly<any>;
|
|
186
|
-
state: any;
|
|
187
|
-
source?: string;
|
|
188
|
-
responsiveDisabled?: boolean;
|
|
189
|
-
autoPropsDisabled?: boolean;
|
|
190
|
-
configReady?: boolean;
|
|
191
|
-
previewReady?: boolean;
|
|
192
|
-
}[];
|
|
193
|
-
layout?: {
|
|
194
|
-
type: "single";
|
|
195
|
-
iframe?: boolean;
|
|
196
|
-
} | {
|
|
197
|
-
type: "grid";
|
|
198
|
-
width?: string | number;
|
|
199
|
-
};
|
|
200
|
-
icon?: string;
|
|
201
|
-
iconColor?: string;
|
|
202
|
-
docsOnly?: boolean;
|
|
203
|
-
file?: {
|
|
204
|
-
id: string;
|
|
205
|
-
framework: string;
|
|
206
|
-
component: any;
|
|
207
|
-
story: any;
|
|
208
|
-
path: string[];
|
|
209
|
-
};
|
|
210
|
-
lastSelectedVariant?: {
|
|
211
|
-
id: string;
|
|
212
|
-
title: string;
|
|
213
|
-
icon?: string;
|
|
214
|
-
iconColor?: string;
|
|
215
|
-
setupApp?: (payload: any) => unknown;
|
|
216
|
-
slots?: () => Readonly<any>;
|
|
217
|
-
state: any;
|
|
218
|
-
source?: string;
|
|
219
|
-
responsiveDisabled?: boolean;
|
|
220
|
-
autoPropsDisabled?: boolean;
|
|
221
|
-
configReady?: boolean;
|
|
222
|
-
previewReady?: boolean;
|
|
223
|
-
};
|
|
224
|
-
slots?: () => Readonly<any>;
|
|
225
|
-
}>;
|
|
226
|
-
currentVariant: import("vue").ComputedRef<{
|
|
227
|
-
id: string;
|
|
228
|
-
title: string;
|
|
229
|
-
icon?: string;
|
|
230
|
-
iconColor?: string;
|
|
231
|
-
setupApp?: (payload: any) => unknown;
|
|
232
|
-
slots?: () => Readonly<any>;
|
|
233
|
-
state: any;
|
|
234
|
-
source?: string;
|
|
235
|
-
responsiveDisabled?: boolean;
|
|
236
|
-
autoPropsDisabled?: boolean;
|
|
237
|
-
configReady?: boolean;
|
|
238
|
-
previewReady?: boolean;
|
|
239
|
-
}>;
|
|
240
|
-
getStoryById: (id: string) => Story;
|
|
241
|
-
getVariantById: (idWithStoryId: string) => Variant;
|
|
242
|
-
}, "currentStory" | "currentVariant">>, Pick<{
|
|
243
|
-
stories: import("vue").Ref<{
|
|
244
|
-
id: string;
|
|
245
|
-
title: string;
|
|
246
|
-
group?: string;
|
|
247
|
-
variants: {
|
|
248
|
-
id: string;
|
|
249
|
-
title: string;
|
|
250
|
-
icon?: string;
|
|
251
|
-
iconColor?: string;
|
|
252
|
-
setupApp?: (payload: any) => unknown;
|
|
253
|
-
slots?: () => Readonly<any>;
|
|
254
|
-
state: any;
|
|
255
|
-
source?: string;
|
|
256
|
-
responsiveDisabled?: boolean;
|
|
257
|
-
autoPropsDisabled?: boolean;
|
|
258
|
-
configReady?: boolean;
|
|
259
|
-
previewReady?: boolean;
|
|
260
|
-
}[];
|
|
261
|
-
layout?: {
|
|
262
|
-
type: "single";
|
|
263
|
-
iframe?: boolean;
|
|
264
|
-
} | {
|
|
265
|
-
type: "grid";
|
|
266
|
-
width?: string | number;
|
|
267
|
-
};
|
|
268
|
-
icon?: string;
|
|
269
|
-
iconColor?: string;
|
|
270
|
-
docsOnly?: boolean;
|
|
271
|
-
file?: {
|
|
272
|
-
id: string;
|
|
273
|
-
framework: string;
|
|
274
|
-
component: any;
|
|
275
|
-
story: any;
|
|
276
|
-
path: string[];
|
|
277
|
-
};
|
|
278
|
-
lastSelectedVariant?: {
|
|
279
|
-
id: string;
|
|
280
|
-
title: string;
|
|
281
|
-
icon?: string;
|
|
282
|
-
iconColor?: string;
|
|
283
|
-
setupApp?: (payload: any) => unknown;
|
|
284
|
-
slots?: () => Readonly<any>;
|
|
285
|
-
state: any;
|
|
286
|
-
source?: string;
|
|
287
|
-
responsiveDisabled?: boolean;
|
|
288
|
-
autoPropsDisabled?: boolean;
|
|
289
|
-
configReady?: boolean;
|
|
290
|
-
previewReady?: boolean;
|
|
291
|
-
};
|
|
292
|
-
slots?: () => Readonly<any>;
|
|
293
|
-
}[]>;
|
|
294
|
-
setStories: (value: Story[]) => void;
|
|
295
|
-
currentStory: import("vue").ComputedRef<{
|
|
296
|
-
id: string;
|
|
297
|
-
title: string;
|
|
298
|
-
group?: string;
|
|
299
|
-
variants: {
|
|
300
|
-
id: string;
|
|
301
|
-
title: string;
|
|
302
|
-
icon?: string;
|
|
303
|
-
iconColor?: string;
|
|
304
|
-
setupApp?: (payload: any) => unknown;
|
|
305
|
-
slots?: () => Readonly<any>;
|
|
306
|
-
state: any;
|
|
307
|
-
source?: string;
|
|
308
|
-
responsiveDisabled?: boolean;
|
|
309
|
-
autoPropsDisabled?: boolean;
|
|
310
|
-
configReady?: boolean;
|
|
311
|
-
previewReady?: boolean;
|
|
312
|
-
}[];
|
|
313
|
-
layout?: {
|
|
314
|
-
type: "single";
|
|
315
|
-
iframe?: boolean;
|
|
316
|
-
} | {
|
|
317
|
-
type: "grid";
|
|
318
|
-
width?: string | number;
|
|
319
|
-
};
|
|
320
|
-
icon?: string;
|
|
321
|
-
iconColor?: string;
|
|
322
|
-
docsOnly?: boolean;
|
|
323
|
-
file?: {
|
|
324
|
-
id: string;
|
|
325
|
-
framework: string;
|
|
326
|
-
component: any;
|
|
327
|
-
story: any;
|
|
328
|
-
path: string[];
|
|
329
|
-
};
|
|
330
|
-
lastSelectedVariant?: {
|
|
331
|
-
id: string;
|
|
332
|
-
title: string;
|
|
333
|
-
icon?: string;
|
|
334
|
-
iconColor?: string;
|
|
335
|
-
setupApp?: (payload: any) => unknown;
|
|
336
|
-
slots?: () => Readonly<any>;
|
|
337
|
-
state: any;
|
|
338
|
-
source?: string;
|
|
339
|
-
responsiveDisabled?: boolean;
|
|
340
|
-
autoPropsDisabled?: boolean;
|
|
341
|
-
configReady?: boolean;
|
|
342
|
-
previewReady?: boolean;
|
|
343
|
-
};
|
|
344
|
-
slots?: () => Readonly<any>;
|
|
345
|
-
}>;
|
|
346
|
-
currentVariant: import("vue").ComputedRef<{
|
|
347
|
-
id: string;
|
|
348
|
-
title: string;
|
|
349
|
-
icon?: string;
|
|
350
|
-
iconColor?: string;
|
|
351
|
-
setupApp?: (payload: any) => unknown;
|
|
352
|
-
slots?: () => Readonly<any>;
|
|
353
|
-
state: any;
|
|
354
|
-
source?: string;
|
|
355
|
-
responsiveDisabled?: boolean;
|
|
356
|
-
autoPropsDisabled?: boolean;
|
|
357
|
-
configReady?: boolean;
|
|
358
|
-
previewReady?: boolean;
|
|
359
|
-
}>;
|
|
360
|
-
getStoryById: (id: string) => Story;
|
|
361
|
-
getVariantById: (idWithStoryId: string) => Variant;
|
|
362
|
-
}, "setStories" | "getStoryById" | "getVariantById">>;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { defineStore } from 'pinia';
|
|
2
|
-
import { computed, ref } from 'vue';
|
|
3
|
-
import { router } from '../router';
|
|
4
|
-
export const useStoryStore = defineStore('story', () => {
|
|
5
|
-
const stories = ref([]);
|
|
6
|
-
function setStories(value) {
|
|
7
|
-
stories.value = value;
|
|
8
|
-
}
|
|
9
|
-
const currentStory = computed(() => stories.value.find(s => s.id === router.currentRoute.value.params.storyId));
|
|
10
|
-
const currentVariant = computed(() => currentStory.value?.variants.find(v => v.id === router.currentRoute.value.query.variantId));
|
|
11
|
-
const maps = computed(() => {
|
|
12
|
-
const storyMap = new Map();
|
|
13
|
-
const variantMap = new Map();
|
|
14
|
-
for (const story of stories.value) {
|
|
15
|
-
storyMap.set(story.id, story);
|
|
16
|
-
for (const variant of story.variants) {
|
|
17
|
-
variantMap.set(`${story.id}:${variant.id}`, variant);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return {
|
|
21
|
-
stories: storyMap,
|
|
22
|
-
variants: variantMap,
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
function getStoryById(id) {
|
|
26
|
-
return maps.value.stories.get(id);
|
|
27
|
-
}
|
|
28
|
-
function getVariantById(idWithStoryId) {
|
|
29
|
-
return maps.value.variants.get(idWithStoryId);
|
|
30
|
-
}
|
|
31
|
-
return {
|
|
32
|
-
stories,
|
|
33
|
-
setStories,
|
|
34
|
-
currentStory,
|
|
35
|
-
currentVariant,
|
|
36
|
-
getStoryById,
|
|
37
|
-
getVariantById,
|
|
38
|
-
};
|
|
39
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/* @TODO custom themes */
|
|
2
|
-
|
|
3
|
-
.v-popper {
|
|
4
|
-
line-height: 0;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.v-popper--theme-dropdown {
|
|
8
|
-
.htw-dark & {
|
|
9
|
-
.v-popper__inner {
|
|
10
|
-
@apply htw-bg-gray-700 htw-border-gray-850 htw-text-gray-100;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.v-popper__arrow-inner {
|
|
14
|
-
@apply htw-border-gray-700;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.v-popper__arrow-outer {
|
|
18
|
-
@apply htw-border-gray-850;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&.v-popper__popper--show-from .v-popper__wrapper {
|
|
23
|
-
transform: scale(.75);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&.v-popper__popper--show-to .v-popper__wrapper {
|
|
27
|
-
transform: none;
|
|
28
|
-
transition: transform .15s cubic-bezier(0, 1, .5, 1);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.v-popper__popper:focus-visible {
|
|
33
|
-
outline: none;
|
|
34
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
@import url('https://fonts.googleapis.com/css2?family=Lato&display=swap');
|
|
2
|
-
@import 'floating-vue/dist/style.css';
|
|
3
|
-
@import '@histoire/controls/dist/style.css';
|
|
4
|
-
|
|
5
|
-
@import 'floating-vue.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
|
-
}
|
|
16
|
-
|
|
17
|
-
a,
|
|
18
|
-
input,
|
|
19
|
-
button {
|
|
20
|
-
color: inherit;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
a {
|
|
24
|
-
text-decoration: inherit;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
input {
|
|
28
|
-
font-family: inherit;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
a,
|
|
32
|
-
button {
|
|
33
|
-
user-select: none;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
@tailwind base;
|
|
37
|
-
@tailwind components;
|
|
38
|
-
@tailwind utilities;
|
|
39
|
-
|
|
40
|
-
body,
|
|
41
|
-
pre {
|
|
42
|
-
margin: 0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
html,
|
|
46
|
-
body,
|
|
47
|
-
#app {
|
|
48
|
-
height: 100%;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
html {
|
|
52
|
-
font-family: 'Lato', sans-serif;
|
|
53
|
-
font-size: 1rem;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
body {
|
|
57
|
-
font-size: 1.125rem;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
@media (min-width: 640px) {
|
|
61
|
-
body {
|
|
62
|
-
font-size: .875rem;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.__histoire-sandbox {
|
|
67
|
-
contain: content;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.__histoire-code .shiki {
|
|
71
|
-
background: transparent !important;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.htw-prose {
|
|
75
|
-
h1, h2, h3, h4 {
|
|
76
|
-
&:not(:hover) {
|
|
77
|
-
.header-anchor[aria-hidden="true"] {
|
|
78
|
-
visibility: hidden;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
hr {
|
|
84
|
-
margin: 1rem 0;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
@import '@histoire/controls/dist/style.css';
|
|
2
|
-
|
|
3
|
-
html,
|
|
4
|
-
body {
|
|
5
|
-
background: transparent !important;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
body {
|
|
9
|
-
margin: 0;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
html {
|
|
13
|
-
font-size: .875rem;
|
|
14
|
-
font-family: 'Lato', sans-serif;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.htw-sandbox-hidden {
|
|
18
|
-
display: none;
|
|
19
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
.__histoire-scale-x {
|
|
2
|
-
&-enter-active,
|
|
3
|
-
&-leave-active {
|
|
4
|
-
transition: transform .15s, opacity .15s;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
&-enter-from,
|
|
8
|
-
&-leave-to {
|
|
9
|
-
transform: scaleX(0);
|
|
10
|
-
opacity: 0;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.__histoire-scale-y {
|
|
15
|
-
&-enter-active,
|
|
16
|
-
&-leave-active {
|
|
17
|
-
transition: transform .15s, opacity .15s;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&-enter-from,
|
|
21
|
-
&-leave-to {
|
|
22
|
-
transform: scaleY(0);
|
|
23
|
-
opacity: 0;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.__histoire-fade {
|
|
28
|
-
&-enter-active,
|
|
29
|
-
&-leave-active {
|
|
30
|
-
transition: opacity .15s;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&-enter-from,
|
|
34
|
-
&-leave-to {
|
|
35
|
-
opacity: 0;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.__histoire-fade-bottom {
|
|
40
|
-
&-enter-active,
|
|
41
|
-
&-leave-active {
|
|
42
|
-
transition: transform .15s, opacity .15s;
|
|
43
|
-
transform: translateY(0px);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&-enter-from,
|
|
47
|
-
&-leave-to {
|
|
48
|
-
transform: translateY(32px);
|
|
49
|
-
opacity: 0;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { RouteLocationRaw } from 'vue-router';
|
|
2
|
-
export type { StoryFile, StoryLayout, Story, Variant, } from '@histoire/shared';
|
|
3
|
-
export declare type TreeLeaf = {
|
|
4
|
-
title: string;
|
|
5
|
-
index: number;
|
|
6
|
-
};
|
|
7
|
-
export declare type TreeFolder = {
|
|
8
|
-
title: string;
|
|
9
|
-
children: (TreeFolder | TreeLeaf)[];
|
|
10
|
-
};
|
|
11
|
-
export interface TreeGroup {
|
|
12
|
-
group: true;
|
|
13
|
-
id: string;
|
|
14
|
-
title: string;
|
|
15
|
-
children: (TreeFolder | TreeLeaf)[];
|
|
16
|
-
}
|
|
17
|
-
export declare type Tree = (TreeGroup | TreeFolder | TreeLeaf)[];
|
|
18
|
-
export interface SearchResult {
|
|
19
|
-
kind: 'story' | 'variant';
|
|
20
|
-
rank: number;
|
|
21
|
-
id: string;
|
|
22
|
-
title: string;
|
|
23
|
-
route: RouteLocationRaw;
|
|
24
|
-
path?: string[];
|
|
25
|
-
icon?: string;
|
|
26
|
-
iconColor?: string;
|
|
27
|
-
}
|
|
28
|
-
export interface PreviewSettings {
|
|
29
|
-
responsiveWidth: number;
|
|
30
|
-
responsiveHeight: number;
|
|
31
|
-
rotate: boolean;
|
|
32
|
-
backgroundColor: string;
|
|
33
|
-
checkerboard: boolean;
|
|
34
|
-
}
|
package/dist/client/app/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isMac: boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const isMac = navigator.platform.toLowerCase().includes('mac');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function hstEvent(name: string, argument: any): Promise<void>;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { EVENT_SEND } from './const';
|
|
2
|
-
export async function hstEvent(name, argument) {
|
|
3
|
-
console.log('[histoire] Event fired', { name, argument });
|
|
4
|
-
const event = {
|
|
5
|
-
name,
|
|
6
|
-
argument: JSON.parse(stringifyEvent(argument)), // Needed for HTMLEvent that can't be cloned
|
|
7
|
-
};
|
|
8
|
-
if (location.href.includes('__sandbox')) {
|
|
9
|
-
window.parent?.postMessage({
|
|
10
|
-
type: EVENT_SEND,
|
|
11
|
-
event,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
const { useEventsStore } = await import('../stores/events.js');
|
|
16
|
-
useEventsStore().addEvent(event);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
function stringifyEvent(e) {
|
|
20
|
-
const obj = {};
|
|
21
|
-
for (const k in e) {
|
|
22
|
-
obj[k] = e[k];
|
|
23
|
-
}
|
|
24
|
-
return JSON.stringify(obj, (k, v) => {
|
|
25
|
-
if (v instanceof Node)
|
|
26
|
-
return 'Node';
|
|
27
|
-
if (v instanceof Window)
|
|
28
|
-
return 'Window';
|
|
29
|
-
return v;
|
|
30
|
-
}, ' ');
|
|
31
|
-
}
|