@histoire/app 0.17.17 → 1.0.0-alpha.2
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/main.pcss +1 -1
- package/dist/app/style/sandbox.css +1 -1
- package/dist/bundle-main-dev.js +1 -1
- package/dist/bundle-main.js +2 -2
- package/dist/bundled/App.vue2.js +11 -11
- package/dist/bundled/{style.css → app.css} +41 -41
- package/dist/bundled/components/HomeView.vue2.js +2 -2
- package/dist/bundled/components/app/AppHeader.vue2.js +2 -2
- package/dist/bundled/components/app/AppLogo.vue2.js +3 -3
- package/dist/bundled/components/app/Breadcrumb.vue.js +2 -2
- package/dist/bundled/components/app/Breadcrumb.vue2.js +7 -9
- package/dist/bundled/components/app/HomeCounter.vue2.js +1 -1
- package/dist/bundled/components/app/InitialLoading.vue2.js +1 -1
- package/dist/bundled/components/app/MobileOverlay.vue2.js +1 -1
- package/dist/bundled/components/base/BaseButton.vue2.js +1 -1
- package/dist/bundled/components/base/BaseCheckbox.vue2.js +1 -1
- package/dist/bundled/components/base/BaseEmpty.vue.js +2 -3
- package/dist/bundled/components/base/BaseIcon.vue.js +1 -1
- package/dist/bundled/components/base/BaseIcon.vue2.js +1 -2
- package/dist/bundled/components/base/BaseKeyboardShortcut.vue2.js +1 -1
- package/dist/bundled/components/base/BaseListItem.vue2.js +1 -1
- package/dist/bundled/components/base/BaseListItemLink.vue.js +1 -1
- package/dist/bundled/components/base/BaseOverflowMenu.vue2.js +2 -2
- package/dist/bundled/components/base/BaseOverflowTab.vue.js +1 -1
- package/dist/bundled/components/base/BaseSelect.vue2.js +3 -3
- package/dist/bundled/components/base/BaseSplitPane.vue.js +1 -1
- package/dist/bundled/components/base/BaseSplitPane.vue2.js +2 -4
- package/dist/bundled/components/base/BaseTab.vue.js +1 -1
- package/dist/bundled/components/base/BaseTag.vue.js +1 -1
- package/dist/bundled/components/command/CommandPrompts.vue2.js +12 -16
- package/dist/bundled/components/command/CommandPromptsModal.vue2.js +1 -1
- package/dist/bundled/components/command/PromptSelect.vue2.js +3 -3
- package/dist/bundled/components/command/PromptText.vue2.js +1 -1
- package/dist/bundled/components/misc/CheckerboardPattern.vue.js +31 -34
- package/dist/bundled/components/misc/HatchedPattern.vue.js +2 -3
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue2.js +2 -2
- package/dist/bundled/components/panel/ControlsComponentProps.vue2.js +3 -5
- package/dist/bundled/components/panel/ControlsComponentState.vue2.js +2 -3
- package/dist/bundled/components/panel/ControlsComponentStateItem.vue2.js +1 -1
- package/dist/bundled/components/panel/PaneTabs.vue2.js +12 -12
- package/dist/bundled/components/panel/StatePresets.vue2.js +4 -5
- package/dist/bundled/components/panel/StoryControls.vue2.js +6 -7
- package/dist/bundled/components/panel/StoryDocs.vue2.js +5 -5
- package/dist/bundled/components/panel/StoryEvent.vue2.js +1 -1
- package/dist/bundled/components/panel/StoryEvents.vue2.js +3 -3
- package/dist/bundled/components/panel/StorySidePanel.vue2.js +11 -13
- package/dist/bundled/components/panel/StorySourceCode.vue.js +2 -2
- package/dist/bundled/components/panel/StorySourceCode.vue2.js +16 -21
- package/dist/bundled/components/search/SearchItem.vue.js +2 -2
- package/dist/bundled/components/search/SearchItem.vue2.js +4 -6
- package/dist/bundled/components/search/SearchItemContent.vue2.js +1 -1
- package/dist/bundled/components/search/SearchLoading.vue2.js +2 -2
- package/dist/bundled/components/search/SearchModal.vue2.js +1 -1
- package/dist/bundled/components/search/SearchPane.vue2.js +42 -60
- package/dist/bundled/components/search/search-docs-data.js +1 -1
- package/dist/bundled/components/search/search-title-data.js +1 -1
- package/dist/bundled/components/story/GenericMountStory.vue2.js +1 -1
- package/dist/bundled/components/story/GenericRenderStory.vue2.js +1 -1
- package/dist/bundled/components/story/StoryResponsivePreview.vue.js +2 -2
- package/dist/bundled/components/story/StoryResponsivePreview.vue2.js +7 -10
- package/dist/bundled/components/story/StoryVariantGrid.vue2.js +5 -8
- package/dist/bundled/components/story/StoryVariantGridItem.vue.js +2 -2
- package/dist/bundled/components/story/StoryVariantGridItem.vue2.js +13 -15
- package/dist/bundled/components/story/StoryVariantListItem.vue.js +2 -2
- package/dist/bundled/components/story/StoryVariantListItem.vue2.js +3 -4
- package/dist/bundled/components/story/StoryVariantSingle.vue.js +2 -2
- package/dist/bundled/components/story/StoryVariantSingle.vue2.js +2 -3
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue2.js +3 -3
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue2.js +4 -4
- package/dist/bundled/components/story/StoryVariantSingleView.vue2.js +5 -5
- package/dist/bundled/components/story/StoryView.vue2.js +5 -5
- package/dist/bundled/components/story/StoryViewer.vue.js +2 -2
- package/dist/bundled/components/story/StoryViewer.vue2.js +3 -4
- package/dist/bundled/components/toolbar/DevOnlyToolbarOpenInEditor.vue2.js +1 -1
- package/dist/bundled/components/toolbar/ToolbarBackground.vue.js +1 -1
- package/dist/bundled/components/toolbar/ToolbarBackground.vue2.js +3 -4
- package/dist/bundled/components/toolbar/ToolbarNewTab.vue2.js +1 -1
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue2.js +17 -18
- package/dist/bundled/components/toolbar/ToolbarTextDirection.vue2.js +1 -1
- package/dist/bundled/components/toolbar/ToolbarTitle.vue2.js +1 -1
- package/dist/bundled/components/tree/StoryGroup.vue2.js +8 -10
- package/dist/bundled/components/tree/StoryList.vue2.js +3 -3
- package/dist/bundled/components/tree/StoryListFolder.vue.js +2 -2
- package/dist/bundled/components/tree/StoryListFolder.vue2.js +11 -13
- package/dist/bundled/components/tree/StoryListItem.vue.js +2 -2
- package/dist/bundled/components/tree/StoryListItem.vue2.js +4 -5
- package/dist/bundled/index.js +4 -4
- package/dist/bundled/plugin.js +1 -2
- package/dist/bundled/sandbox.js +14 -19
- package/dist/bundled/stores/folder.js +1 -1
- package/dist/bundled/stores/preview-settings.js +1 -1
- package/dist/bundled/util/dark.js +1 -1
- package/dist/bundled/util/events.js +2 -4
- package/dist/bundled/util/scroll.js +1 -1
- package/dist/style.css +281 -293
- package/package.json +22 -23
- package/src/app/App.vue +11 -11
- package/src/app/api.ts +2 -2
- package/src/app/components/HomeView.vue +1 -1
- package/src/app/components/app/AppHeader.vue +1 -1
- package/src/app/components/app/AppLogo.vue +3 -3
- package/src/app/components/app/Breadcrumb.vue +2 -2
- package/src/app/components/base/BaseOverflowMenu.vue +2 -2
- package/src/app/components/base/BaseSelect.vue +2 -2
- package/src/app/components/command/CommandPrompts.vue +3 -6
- package/src/app/components/command/PromptSelect.vue +1 -1
- package/src/app/components/panel/ControlsComponentPropItem.vue +3 -3
- package/src/app/components/panel/ControlsComponentProps.vue +1 -1
- package/src/app/components/panel/ControlsComponentState.vue +2 -2
- package/src/app/components/panel/ControlsComponentStateItem.vue +2 -2
- package/src/app/components/panel/PaneTabs.vue +2 -2
- package/src/app/components/panel/StatePresets.vue +4 -4
- package/src/app/components/panel/StoryControls.vue +4 -4
- package/src/app/components/panel/StoryDocs.vue +5 -5
- package/src/app/components/panel/StoryEvent.vue +1 -1
- package/src/app/components/panel/StoryEvents.vue +2 -2
- package/src/app/components/panel/StorySidePanel.vue +2 -2
- package/src/app/components/panel/StorySourceCode.vue +6 -6
- package/src/app/components/search/SearchItem.vue +2 -2
- package/src/app/components/search/SearchItemContent.vue +1 -1
- package/src/app/components/search/SearchPane.vue +49 -61
- package/src/app/components/search/search-docs-data.ts +2 -2
- package/src/app/components/search/search-title-data.ts +2 -2
- package/src/app/components/search/types.ts +1 -1
- package/src/app/components/story/GenericMountStory.vue +1 -1
- package/src/app/components/story/GenericRenderStory.vue +1 -1
- package/src/app/components/story/StoryResponsivePreview.vue +5 -5
- package/src/app/components/story/StoryVariantGrid.vue +1 -1
- package/src/app/components/story/StoryVariantGridItem.vue +8 -8
- package/src/app/components/story/StoryVariantListItem.vue +3 -3
- package/src/app/components/story/StoryVariantSingle.vue +1 -1
- package/src/app/components/story/StoryVariantSinglePreviewNative.vue +3 -3
- package/src/app/components/story/StoryVariantSinglePreviewRemote.vue +6 -6
- package/src/app/components/story/StoryVariantSingleView.vue +4 -4
- package/src/app/components/story/StoryView.vue +4 -4
- package/src/app/components/story/StoryViewer.vue +1 -1
- package/src/app/components/toolbar/ToolbarNewTab.vue +1 -1
- package/src/app/components/toolbar/ToolbarTitle.vue +1 -1
- package/src/app/components/tree/StoryGroup.vue +2 -2
- package/src/app/components/tree/StoryList.vue +2 -2
- package/src/app/components/tree/StoryListFolder.vue +1 -1
- package/src/app/components/tree/StoryListItem.vue +2 -2
- package/src/app/index.ts +4 -4
- package/src/app/sandbox.ts +10 -14
- package/src/app/stores/folder.ts +1 -1
- package/src/app/stores/preview-settings.ts +2 -2
- package/src/app/stores/story.ts +1 -1
- package/src/app/style/main.pcss +1 -1
- package/src/app/style/sandbox.css +1 -1
- package/src/app/types.ts +1 -1
- package/src/app/util/dark.ts +1 -1
- package/src/app/util/docs.ts +1 -1
- package/src/app/util/keyboard.ts +1 -1
- package/src/app/util/mapping.ts +1 -1
- package/src/app/util/preview-settings.ts +1 -1
- package/src/app/util/sandbox.ts +1 -1
- package/src/app/util/scroll.ts +1 -1
- package/src/app/util/variant.ts +1 -1
- package/src/bundle-main-dev.js +1 -1
- package/src/bundle-main.js +2 -2
- package/tailwind.config.cjs +1 -1
- package/vite.config.ts +2 -2
- package/dist/bundled/components/app/Breadcrumb.vue3.js +0 -1
- package/dist/bundled/components/base/BaseEmpty.vue2.js +0 -1
- package/dist/bundled/components/base/BaseIcon.vue3.js +0 -1
- package/dist/bundled/components/base/BaseSplitPane.vue3.js +0 -1
- package/dist/bundled/components/misc/HatchedPattern.vue2.js +0 -1
- package/dist/bundled/components/panel/StorySourceCode.vue3.js +0 -1
- package/dist/bundled/components/search/SearchItem.vue3.js +0 -1
- package/dist/bundled/components/story/StoryResponsivePreview.vue3.js +0 -1
- package/dist/bundled/components/story/StoryVariantGridItem.vue3.js +0 -1
- package/dist/bundled/components/story/StoryVariantListItem.vue3.js +0 -1
- package/dist/bundled/components/story/StoryVariantSingle.vue3.js +0 -1
- package/dist/bundled/components/story/StoryViewer.vue3.js +0 -1
- package/dist/bundled/components/toolbar/ToolbarBackground.vue3.js +0 -1
- package/dist/bundled/components/tree/StoryListFolder.vue3.js +0 -1
- package/dist/bundled/components/tree/StoryListItem.vue3.js +0 -1
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/common.js +0 -52
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang/en.js +0 -10
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang/latin/advanced.js +0 -16
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang/latin/balance.js +0 -31
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang/latin/simple.js +0 -15
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/lang.js +0 -60
- package/dist/bundled/node_modules/.pnpm/flexsearch@0.7.21/node_modules/flexsearch/dist/module/type.js +0 -11
|
@@ -5,9 +5,9 @@ export default {
|
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<script lang="ts" setup>
|
|
8
|
+
import type { Story } from '../../types'
|
|
8
9
|
import { clientSupportPlugins } from 'virtual:$histoire-support-plugins-client'
|
|
9
10
|
import { markRaw, ref, watchEffect } from 'vue'
|
|
10
|
-
import type { Story } from '../../types'
|
|
11
11
|
|
|
12
12
|
const props = defineProps<{
|
|
13
13
|
story: Story
|
|
@@ -5,9 +5,9 @@ export default {
|
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<script lang="ts" setup>
|
|
8
|
+
import type { Story } from '../../types'
|
|
8
9
|
import { clientSupportPlugins } from 'virtual:$histoire-support-plugins-client'
|
|
9
10
|
import { markRaw, ref, watchEffect } from 'vue'
|
|
10
|
-
import type { Story } from '../../types'
|
|
11
11
|
|
|
12
12
|
const props = defineProps<{
|
|
13
13
|
story: Story
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import type { Ref } from 'vue'
|
|
3
|
-
import {
|
|
4
|
-
import { useEventListener } from '@vueuse/core'
|
|
3
|
+
import type { Variant } from '../../types'
|
|
5
4
|
import { Icon } from '@iconify/vue'
|
|
5
|
+
import { useEventListener } from '@vueuse/core'
|
|
6
6
|
import { VTooltip as vTooltip } from 'floating-vue'
|
|
7
|
-
import
|
|
8
|
-
import CheckerboardPattern from '../misc/CheckerboardPattern.vue'
|
|
7
|
+
import { computed, onUnmounted, ref } from 'vue'
|
|
9
8
|
import { usePreviewSettingsStore } from '../../stores/preview-settings'
|
|
10
|
-
import
|
|
9
|
+
import CheckerboardPattern from '../misc/CheckerboardPattern.vue'
|
|
10
|
+
import HatchedPattern from '../misc/HatchedPattern.vue'
|
|
11
11
|
|
|
12
12
|
const props = defineProps<{
|
|
13
13
|
variant: Variant
|
|
@@ -3,9 +3,9 @@ import { useResizeObserver } from '@vueuse/core'
|
|
|
3
3
|
import { computed, onMounted, ref, watch } from 'vue'
|
|
4
4
|
import { useStoryStore } from '../../stores/story'
|
|
5
5
|
import { isMobile } from '../../util/responsive'
|
|
6
|
+
import DevOnlyToolbarOpenInEditor from '../toolbar/DevOnlyToolbarOpenInEditor.vue'
|
|
6
7
|
import ToolbarBackground from '../toolbar/ToolbarBackground.vue'
|
|
7
8
|
import ToolbarTextDirection from '../toolbar/ToolbarTextDirection.vue'
|
|
8
|
-
import DevOnlyToolbarOpenInEditor from '../toolbar/DevOnlyToolbarOpenInEditor.vue'
|
|
9
9
|
import StoryVariantGridItem from './StoryVariantGridItem.vue'
|
|
10
10
|
|
|
11
11
|
const storyStore = useStoryStore()
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import type { PropType } from 'vue'
|
|
3
|
-
import {
|
|
3
|
+
import type { Story, Variant } from '../../types'
|
|
4
|
+
import { HstCopyIcon } from '@histoire/controls'
|
|
4
5
|
import { Icon } from '@iconify/vue'
|
|
5
|
-
import { useRouter } from 'vue-router'
|
|
6
6
|
import { useResizeObserver } from '@vueuse/core'
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import type { Story, Variant } from '../../types'
|
|
10
|
-
import { useScrollOnActive } from '../../util/scroll'
|
|
7
|
+
import { computed, ref, toRefs } from 'vue'
|
|
8
|
+
import { useRouter } from 'vue-router'
|
|
11
9
|
import { usePreviewSettingsStore } from '../../stores/preview-settings'
|
|
12
|
-
import { getContrastColor } from '../../util/preview-settings'
|
|
13
10
|
import { histoireConfig } from '../../util/config'
|
|
14
11
|
import { isDark } from '../../util/dark'
|
|
15
12
|
import { getSourceCode } from '../../util/docs'
|
|
16
|
-
import
|
|
13
|
+
import { getContrastColor } from '../../util/preview-settings'
|
|
14
|
+
import { useScrollOnActive } from '../../util/scroll'
|
|
15
|
+
import { useCurrentVariantRoute } from '../../util/variant'
|
|
17
16
|
import CheckerboardPattern from '../misc/CheckerboardPattern.vue'
|
|
17
|
+
import ToolbarNewTab from '../toolbar/ToolbarNewTab.vue'
|
|
18
18
|
import GenericRenderStory from './GenericRenderStory.vue'
|
|
19
19
|
|
|
20
20
|
const props = defineProps({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import type { PropType } from 'vue'
|
|
3
|
-
import {
|
|
3
|
+
import type { Variant } from '../../types'
|
|
4
4
|
import { Icon } from '@iconify/vue'
|
|
5
|
+
import { ref, toRefs } from 'vue'
|
|
6
|
+
import { useScrollOnActive } from '../../util/scroll'
|
|
5
7
|
import { useCurrentVariantRoute } from '../../util/variant'
|
|
6
|
-
import type { Variant } from '../../types'
|
|
7
8
|
import BaseListItemLink from '../base/BaseListItemLink.vue'
|
|
8
|
-
import { useScrollOnActive } from '../../util/scroll'
|
|
9
9
|
|
|
10
10
|
const props = defineProps({
|
|
11
11
|
variant: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { computed } from 'vue'
|
|
3
2
|
import { Icon } from '@iconify/vue'
|
|
3
|
+
import { computed } from 'vue'
|
|
4
4
|
import { useStoryStore } from '../../stores/story'
|
|
5
5
|
import { isMobile } from '../../util/responsive'
|
|
6
6
|
import BaseSplitPane from '../base/BaseSplitPane.vue'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { computed } from 'vue'
|
|
3
2
|
import type { Story, Variant } from '../../types'
|
|
4
|
-
import {
|
|
5
|
-
import { histoireConfig } from '../../util/config'
|
|
3
|
+
import { computed } from 'vue'
|
|
6
4
|
import { usePreviewSettingsStore } from '../../stores/preview-settings'
|
|
5
|
+
import { histoireConfig } from '../../util/config'
|
|
6
|
+
import { isDark } from '../../util/dark'
|
|
7
7
|
import { getContrastColor } from '../../util/preview-settings'
|
|
8
8
|
import GenericRenderStory from './GenericRenderStory.vue'
|
|
9
9
|
import StoryResponsivePreview from './StoryResponsivePreview.vue'
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { HstEvent } from '../../stores/events'
|
|
3
|
+
import type { Story, Variant } from '../../types'
|
|
4
4
|
import { applyState } from '@histoire/shared'
|
|
5
|
+
import { useEventListener } from '@vueuse/core'
|
|
6
|
+
import { computed, ref, toRaw, watch } from 'vue'
|
|
7
|
+
import { useEventsStore } from '../../stores/events'
|
|
8
|
+
import { usePreviewSettingsStore } from '../../stores/preview-settings'
|
|
5
9
|
import { EVENT_SEND, PREVIEW_SETTINGS_SYNC, SANDBOX_READY, STATE_SYNC } from '../../util/const'
|
|
6
|
-
import type { Story, Variant } from '../../types'
|
|
7
10
|
import { getSandboxUrl } from '../../util/sandbox'
|
|
8
|
-
import { usePreviewSettingsStore } from '../../stores/preview-settings'
|
|
9
|
-
import type { HstEvent } from '../../stores/events'
|
|
10
|
-
import { useEventsStore } from '../../stores/events'
|
|
11
11
|
import { toRawDeep } from '../../util/state'
|
|
12
12
|
import StoryResponsivePreview from './StoryResponsivePreview.vue'
|
|
13
13
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import type { Story, Variant } from '../../types'
|
|
3
3
|
import { isMobile } from '../../util/responsive'
|
|
4
|
-
import
|
|
5
|
-
import ToolbarResponsiveSize from '../toolbar/ToolbarResponsiveSize.vue'
|
|
4
|
+
import DevOnlyToolbarOpenInEditor from '../toolbar/DevOnlyToolbarOpenInEditor.vue'
|
|
6
5
|
import ToolbarBackground from '../toolbar/ToolbarBackground.vue'
|
|
7
|
-
import ToolbarTextDirection from '../toolbar/ToolbarTextDirection.vue'
|
|
8
6
|
import ToolbarNewTab from '../toolbar/ToolbarNewTab.vue'
|
|
9
|
-
import
|
|
7
|
+
import ToolbarResponsiveSize from '../toolbar/ToolbarResponsiveSize.vue'
|
|
8
|
+
import ToolbarTextDirection from '../toolbar/ToolbarTextDirection.vue'
|
|
9
|
+
import ToolbarTitle from '../toolbar/ToolbarTitle.vue'
|
|
10
10
|
import StoryVariantSinglePreviewNative from './StoryVariantSinglePreviewNative.vue'
|
|
11
11
|
import StoryVariantSinglePreviewRemote from './StoryVariantSinglePreviewRemote.vue'
|
|
12
12
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
import { Icon } from '@iconify/vue'
|
|
2
3
|
import { ref, watch } from 'vue'
|
|
3
4
|
import { useRoute, useRouter } from 'vue-router'
|
|
4
|
-
import { Icon } from '@iconify/vue'
|
|
5
5
|
import { useStoryStore } from '../../stores/story'
|
|
6
6
|
|
|
7
|
-
import BaseSplitPane from '../base/BaseSplitPane.vue'
|
|
8
|
-
import BaseEmpty from '../base/BaseEmpty.vue'
|
|
9
7
|
import { isMobile } from '../../util/responsive'
|
|
10
|
-
import
|
|
8
|
+
import BaseEmpty from '../base/BaseEmpty.vue'
|
|
9
|
+
import BaseSplitPane from '../base/BaseSplitPane.vue'
|
|
11
10
|
import StoryDocs from '../panel/StoryDocs.vue'
|
|
11
|
+
import StorySidePanel from '../panel/StorySidePanel.vue'
|
|
12
12
|
import StoryViewer from './StoryViewer.vue'
|
|
13
13
|
|
|
14
14
|
const storyStore = useStoryStore()
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { computed, ref, watch } from 'vue'
|
|
3
3
|
import { useStoryStore } from '../../stores/story'
|
|
4
4
|
import MobileOverlay from '../app/MobileOverlay.vue'
|
|
5
|
-
import StoryVariantListItem from './StoryVariantListItem.vue'
|
|
6
5
|
import StoryVariantGrid from './StoryVariantGrid.vue'
|
|
6
|
+
import StoryVariantListItem from './StoryVariantListItem.vue'
|
|
7
7
|
import StoryVariantSingle from './StoryVariantSingle.vue'
|
|
8
8
|
|
|
9
9
|
const storyStore = useStoryStore()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
import type { Story, Variant } from '../../types'
|
|
2
3
|
import { Icon } from '@iconify/vue'
|
|
3
4
|
import { computed } from 'vue'
|
|
4
|
-
import type { Story, Variant } from '../../types'
|
|
5
5
|
import { getSandboxUrl } from '../../util/sandbox'
|
|
6
6
|
|
|
7
7
|
const props = defineProps<{
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
import type { Story, TreeGroup } from '../../types'
|
|
2
3
|
import { Icon } from '@iconify/vue'
|
|
3
4
|
import { computed, withDefaults } from 'vue'
|
|
4
|
-
import type { Story, TreeGroup } from '../../types'
|
|
5
5
|
import { useFolderStore } from '../../stores/folder'
|
|
6
|
-
import StoryListItem from './StoryListItem.vue'
|
|
7
6
|
import StoryListFolder from './StoryListFolder.vue'
|
|
7
|
+
import StoryListItem from './StoryListItem.vue'
|
|
8
8
|
|
|
9
9
|
const props = withDefaults(defineProps<{
|
|
10
10
|
path?: Array<string>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import type { Story, Tree, TreeFolder, TreeGroup, TreeLeaf } from '../../types'
|
|
3
|
-
import StoryListItem from './StoryListItem.vue'
|
|
4
|
-
import StoryListFolder from './StoryListFolder.vue'
|
|
5
3
|
import StoryGroup from './StoryGroup.vue'
|
|
4
|
+
import StoryListFolder from './StoryListFolder.vue'
|
|
5
|
+
import StoryListItem from './StoryListItem.vue'
|
|
6
6
|
|
|
7
7
|
defineProps<{
|
|
8
8
|
tree: Tree
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
import type { Story, TreeFolder, TreeLeaf } from '../../types'
|
|
2
3
|
import { Icon } from '@iconify/vue'
|
|
3
4
|
import { computed, withDefaults } from 'vue'
|
|
4
|
-
import type { Story, TreeFolder, TreeLeaf } from '../../types'
|
|
5
5
|
import { useFolderStore } from '../../stores/folder'
|
|
6
6
|
import StoryListItem from './StoryListItem.vue'
|
|
7
7
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
import type { Story } from '../../types'
|
|
2
3
|
import { Icon } from '@iconify/vue'
|
|
3
4
|
import { computed, ref, withDefaults } from 'vue'
|
|
4
5
|
import { useRoute } from 'vue-router'
|
|
5
|
-
import BaseListItemLink from '../base/BaseListItemLink.vue'
|
|
6
|
-
import type { Story } from '../../types'
|
|
7
6
|
import { useScrollOnActive } from '../../util/scroll'
|
|
7
|
+
import BaseListItemLink from '../base/BaseListItemLink.vue'
|
|
8
8
|
|
|
9
9
|
const props = withDefaults(defineProps<{
|
|
10
10
|
story: Story
|
package/src/app/index.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import 'virtual:$histoire-theme'
|
|
2
|
-
import { createApp } from 'vue'
|
|
3
|
-
import { createPinia } from 'pinia'
|
|
4
1
|
import FloatingVue from 'floating-vue'
|
|
2
|
+
import { createPinia } from 'pinia'
|
|
3
|
+
import { createApp } from 'vue'
|
|
5
4
|
import App from './App.vue'
|
|
6
|
-
import { router } from './router'
|
|
7
5
|
import { setupPluginApi } from './plugin.js'
|
|
6
|
+
import { router } from './router'
|
|
7
|
+
import 'virtual:$histoire-theme'
|
|
8
8
|
|
|
9
9
|
export async function mountMainApp() {
|
|
10
10
|
const app = createApp(App)
|
package/src/app/sandbox.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { computed, createApp, h, onMounted, ref, watch } from 'vue'
|
|
3
|
-
import { createPinia } from 'pinia'
|
|
1
|
+
import type { StoryFile } from './types'
|
|
4
2
|
import { applyState } from '@histoire/shared'
|
|
3
|
+
import { createPinia } from 'pinia'
|
|
5
4
|
import { files } from 'virtual:$histoire-stories'
|
|
5
|
+
import { computed, createApp, h, onMounted, ref, watch } from 'vue'
|
|
6
|
+
import { parseQuery } from 'vue-router'
|
|
6
7
|
import GenericMountStory from './components/story/GenericMountStory.vue'
|
|
7
8
|
import GenericRenderStory from './components/story/GenericRenderStory.vue'
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
9
|
+
import { setupPluginApi } from './plugin.js'
|
|
10
|
+
import { histoireConfig } from './util/config.js'
|
|
10
11
|
import { PREVIEW_SETTINGS_SYNC, SANDBOX_READY, STATE_SYNC } from './util/const.js'
|
|
11
|
-
import { applyPreviewSettings } from './util/preview-settings.js'
|
|
12
12
|
import { isDark } from './util/dark.js'
|
|
13
|
-
import {
|
|
13
|
+
import { mapFile } from './util/mapping'
|
|
14
|
+
import { applyPreviewSettings } from './util/preview-settings.js'
|
|
14
15
|
import { toRawDeep } from './util/state.js'
|
|
15
|
-
import { setupPluginApi } from './plugin.js'
|
|
16
16
|
|
|
17
17
|
const query = parseQuery(window.location.search)
|
|
18
18
|
const file = ref<StoryFile>(mapFile(files.find(f => f.id === query.storyId)))
|
|
@@ -71,15 +71,11 @@ const app = createApp({
|
|
|
71
71
|
}),
|
|
72
72
|
]),
|
|
73
73
|
this.story && this.variant
|
|
74
|
-
? h(GenericRenderStory, {
|
|
75
|
-
story: this.story,
|
|
76
|
-
variant: this.variant,
|
|
77
|
-
onReady: () => {
|
|
74
|
+
? h(GenericRenderStory, { story: this.story, variant: this.variant, onReady: () => {
|
|
78
75
|
window.parent?.postMessage({
|
|
79
76
|
type: SANDBOX_READY,
|
|
80
77
|
})
|
|
81
|
-
}
|
|
82
|
-
})
|
|
78
|
+
} })
|
|
83
79
|
: null,
|
|
84
80
|
]
|
|
85
81
|
},
|
package/src/app/stores/folder.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineStore } from 'pinia'
|
|
2
|
-
import { useStorage } from '@vueuse/core'
|
|
3
1
|
import type { PreviewSettings } from '../types'
|
|
2
|
+
import { useStorage } from '@vueuse/core'
|
|
3
|
+
import { defineStore } from 'pinia'
|
|
4
4
|
|
|
5
5
|
export const usePreviewSettingsStore = defineStore('preview-settings', () => {
|
|
6
6
|
const currentSettings = useStorage<PreviewSettings>('_histoire-sandbox-settings-v3', {
|
package/src/app/stores/story.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { Story, Variant } from '../types'
|
|
1
2
|
import { defineStore } from 'pinia'
|
|
2
3
|
import { computed, ref } from 'vue'
|
|
3
4
|
import { router } from '../router'
|
|
4
|
-
import type { Story, Variant } from '../types'
|
|
5
5
|
|
|
6
6
|
export const useStoryStore = defineStore('story', () => {
|
|
7
7
|
const stories = ref<Story[]>([])
|
package/src/app/style/main.pcss
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Display&display=swap');
|
|
2
2
|
@import 'floating-vue/dist/style.css';
|
|
3
|
-
@import '@histoire/controls/dist/
|
|
3
|
+
@import '@histoire/controls/dist/index.es.css';
|
|
4
4
|
|
|
5
5
|
@import 'floating.pcss';
|
|
6
6
|
@import 'transitions.pcss';
|
package/src/app/types.ts
CHANGED
package/src/app/util/dark.ts
CHANGED
package/src/app/util/docs.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { Story, Variant } from '../types'
|
|
1
2
|
import { unindent } from '@histoire/shared'
|
|
2
3
|
import { clientSupportPlugins } from 'virtual:$histoire-support-plugins-client'
|
|
3
|
-
import type { Story, Variant } from '../types'
|
|
4
4
|
|
|
5
5
|
export async function getSourceCode(story: Story, variant: Variant) {
|
|
6
6
|
if (variant.source) {
|
package/src/app/util/keyboard.ts
CHANGED
package/src/app/util/mapping.ts
CHANGED
package/src/app/util/sandbox.ts
CHANGED
package/src/app/util/scroll.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Ref } from 'vue'
|
|
2
|
-
import { onMounted, watch } from 'vue'
|
|
3
2
|
import scrollIntoView from 'scroll-into-view-if-needed'
|
|
3
|
+
import { onMounted, watch } from 'vue'
|
|
4
4
|
|
|
5
5
|
export function useScrollOnActive(active: Ref<boolean>, el: Ref<HTMLElement>) {
|
|
6
6
|
watch(active, (value) => {
|
package/src/app/util/variant.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Ref } from 'vue'
|
|
2
|
+
import type { Variant } from '../types'
|
|
2
3
|
import { computed } from 'vue'
|
|
3
4
|
import { useRoute } from 'vue-router'
|
|
4
|
-
import type { Variant } from '../types'
|
|
5
5
|
|
|
6
6
|
export function useCurrentVariantRoute(variant: Ref<Variant>) {
|
|
7
7
|
const route = useRoute()
|
package/src/bundle-main-dev.js
CHANGED
package/src/bundle-main.js
CHANGED
package/tailwind.config.cjs
CHANGED
package/vite.config.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineConfig } from 'vite'
|
|
2
1
|
import vue from '@vitejs/plugin-vue'
|
|
3
2
|
import fs from 'fs-extra'
|
|
4
3
|
import { globbySync } from 'globby'
|
|
4
|
+
import { defineConfig } from 'vite'
|
|
5
5
|
|
|
6
6
|
export default defineConfig({
|
|
7
7
|
plugins: [
|
|
@@ -56,7 +56,7 @@ export default defineConfig({
|
|
|
56
56
|
external: [
|
|
57
57
|
/\$histoire/,
|
|
58
58
|
/@histoire/,
|
|
59
|
-
// eslint-disable-next-line ts/no-
|
|
59
|
+
// eslint-disable-next-line ts/no-require-imports
|
|
60
60
|
...Object.keys(require('./package.json').dependencies),
|
|
61
61
|
],
|
|
62
62
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
function parse_option(a, b) {
|
|
2
|
-
return "undefined" == typeof a ? b : a;
|
|
3
|
-
}
|
|
4
|
-
function create_object_array(a) {
|
|
5
|
-
const b = Array(a);
|
|
6
|
-
for (let c = 0; c < a; c++)
|
|
7
|
-
b[c] = create_object();
|
|
8
|
-
return b;
|
|
9
|
-
}
|
|
10
|
-
function create_arrays(a) {
|
|
11
|
-
const b = Array(a);
|
|
12
|
-
for (let c = 0; c < a; c++)
|
|
13
|
-
b[c] = [];
|
|
14
|
-
return b;
|
|
15
|
-
}
|
|
16
|
-
function get_keys(a) {
|
|
17
|
-
return Object.keys(a);
|
|
18
|
-
}
|
|
19
|
-
function create_object() {
|
|
20
|
-
return /* @__PURE__ */ Object.create(null);
|
|
21
|
-
}
|
|
22
|
-
function concat(a) {
|
|
23
|
-
return [].concat.apply([], a);
|
|
24
|
-
}
|
|
25
|
-
function sort_by_length_down(c, a) {
|
|
26
|
-
return a.length - c.length;
|
|
27
|
-
}
|
|
28
|
-
function is_array(a) {
|
|
29
|
-
return a.constructor === Array;
|
|
30
|
-
}
|
|
31
|
-
function is_string(a) {
|
|
32
|
-
return "string" == typeof a;
|
|
33
|
-
}
|
|
34
|
-
function is_object(a) {
|
|
35
|
-
return "object" == typeof a;
|
|
36
|
-
}
|
|
37
|
-
function is_function(a) {
|
|
38
|
-
return "function" == typeof a;
|
|
39
|
-
}
|
|
40
|
-
export {
|
|
41
|
-
concat,
|
|
42
|
-
create_arrays,
|
|
43
|
-
create_object,
|
|
44
|
-
create_object_array,
|
|
45
|
-
get_keys,
|
|
46
|
-
is_array,
|
|
47
|
-
is_function,
|
|
48
|
-
is_object,
|
|
49
|
-
is_string,
|
|
50
|
-
parse_option,
|
|
51
|
-
sort_by_length_down
|
|
52
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
const filter = ["a", "about", "above", "after", "again", "against", "all", "also", "am", "an", "and", "any", "are", "aren't", "as", "at", "be", "because", "been", "before", "being", "below", "both", "but", "by", "can", "cannot", "can't", "come", "could", "couldn't", "did", "didn't", "do", "does", "doesn't", "doing", "dont", "down", "during", "each", "even", "few", "first", "for", "from", "further", "get", "go", "had", "hadn't", "has", "hasn't", "have", "haven't", "having", "he", "hed", "her", "here", "here's", "hers", "herself", "hes", "him", "himself", "his", "how", "how's", "i", "id", "if", "ill", "im", "in", "into", "is", "isn't", "it", "it's", "itself", "i've", "just", "know", "let's", "like", "make", "me", "more", "most", "mustn't", "my", "myself", "new", "no", "nor", "not", "now", "of", "off", "on", "once", "only", "or", "other", "ought", "our", "our's", "ourselves", "out", "over", "own", "same", "say", "see", "shan't", "she", "she'd", "shell", "shes", "should", "shouldn't", "so", "some", "such", "than", "that", "that's", "the", "their", "theirs", "them", "themselves", "then", "there", "there's", "these", "they", "they'd", "they'll", "they're", "they've", "this", "those", "through", "time", "to", "too", "until", "up", "us", "very", "want", "was", "wasn't", "way", "we", "wed", "well", "were", "weren't", "we've", "what", "what's", "when", "when's", "where", "where's", "which", "while", "who", "whom", "who's", "why", "why's", "will", "with", "won't", "would", "wouldn't", "you", "you'd", "you'll", "your", "you're", "your's", "yourself", "yourselves", "you've"];
|
|
2
|
-
const stemmer = { ational: "ate", iveness: "ive", fulness: "ful", ousness: "ous", ization: "ize", tional: "tion", biliti: "ble", icate: "ic", ative: "", alize: "al", iciti: "ic", entli: "ent", ousli: "ous", alism: "al", ation: "ate", aliti: "al", iviti: "ive", ement: "", enci: "ence", anci: "ance", izer: "ize", alli: "al", ator: "ate", logi: "log", ical: "ic", ance: "", ence: "", ness: "", able: "", ible: "", ment: "", eli: "e", bli: "ble", ful: "", ant: "", ent: "", ism: "", ate: "", iti: "", ous: "", ive: "", ize: "", al: "", ou: "", er: "", ic: "" };
|
|
3
|
-
const matcher = {};
|
|
4
|
-
const language = { filter, stemmer, matcher };
|
|
5
|
-
export {
|
|
6
|
-
language as default,
|
|
7
|
-
filter,
|
|
8
|
-
matcher,
|
|
9
|
-
stemmer
|
|
10
|
-
};
|