@poveste/app 0.1.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/LICENSE +22 -0
- package/dist/app/assets/histoire-text-dark.svg +89 -0
- package/dist/app/assets/histoire-text.svg +89 -0
- package/dist/app/assets/histoire.svg +51 -0
- package/dist/app/style/floating.pcss +34 -0
- package/dist/app/style/main.pcss +100 -0
- package/dist/app/style/sandbox.css +24 -0
- package/dist/app/style/transitions.pcss +51 -0
- package/dist/bundle-index.js +1 -0
- package/dist/bundle-main-dev.js +4 -0
- package/dist/bundle-main.js +5 -0
- package/dist/bundle-sandbox-dev.js +2 -0
- package/dist/bundle-sandbox.js +2 -0
- package/dist/bundled/App.vue.js +5 -0
- package/dist/bundled/App.vue2.js +167 -0
- package/dist/bundled/_virtual/_plugin-vue_export-helper.js +10 -0
- package/dist/bundled/api.js +12 -0
- package/dist/bundled/app.css +116 -0
- package/dist/bundled/assets/histoire-text-dark.svg.js +4 -0
- package/dist/bundled/assets/histoire-text.svg.js +4 -0
- package/dist/bundled/assets/histoire.svg.js +4 -0
- package/dist/bundled/components/HomeView.vue.js +5 -0
- package/dist/bundled/components/HomeView.vue2.js +66 -0
- package/dist/bundled/components/app/AppHeader.vue.js +5 -0
- package/dist/bundled/components/app/AppHeader.vue2.js +71 -0
- package/dist/bundled/components/app/AppLogo.vue.js +5 -0
- package/dist/bundled/components/app/AppLogo.vue2.js +29 -0
- package/dist/bundled/components/app/Breadcrumb.vue.js +8 -0
- package/dist/bundled/components/app/Breadcrumb.vue2.js +91 -0
- package/dist/bundled/components/app/HomeCounter.vue.js +5 -0
- package/dist/bundled/components/app/HomeCounter.vue2.js +42 -0
- package/dist/bundled/components/app/InitialLoading.vue.js +5 -0
- package/dist/bundled/components/app/InitialLoading.vue2.js +51 -0
- package/dist/bundled/components/app/MobileOverlay.vue.js +5 -0
- package/dist/bundled/components/app/MobileOverlay.vue2.js +45 -0
- package/dist/bundled/components/base/BaseButton.vue.js +5 -0
- package/dist/bundled/components/base/BaseButton.vue2.js +39 -0
- package/dist/bundled/components/base/BaseCheckbox.vue.js +5 -0
- package/dist/bundled/components/base/BaseCheckbox.vue2.js +78 -0
- package/dist/bundled/components/base/BaseEmpty.vue.js +14 -0
- package/dist/bundled/components/base/BaseIcon.vue.js +8 -0
- package/dist/bundled/components/base/BaseIcon.vue2.js +29 -0
- package/dist/bundled/components/base/BaseKeyboardShortcut.vue.js +5 -0
- package/dist/bundled/components/base/BaseKeyboardShortcut.vue2.js +20 -0
- package/dist/bundled/components/base/BaseListItem.vue.js +5 -0
- package/dist/bundled/components/base/BaseListItem.vue2.js +33 -0
- package/dist/bundled/components/base/BaseListItemLink.vue.js +33 -0
- package/dist/bundled/components/base/BaseListItemLink.vue2.js +26 -0
- package/dist/bundled/components/base/BaseOverflowMenu.vue.js +5 -0
- package/dist/bundled/components/base/BaseOverflowMenu.vue2.js +100 -0
- package/dist/bundled/components/base/BaseOverflowTab.vue.js +36 -0
- package/dist/bundled/components/base/BaseOverflowTab.vue2.js +18 -0
- package/dist/bundled/components/base/BaseSelect.vue.js +5 -0
- package/dist/bundled/components/base/BaseSelect.vue2.js +77 -0
- package/dist/bundled/components/base/BaseSplitPane.vue.js +8 -0
- package/dist/bundled/components/base/BaseSplitPane.vue2.js +183 -0
- package/dist/bundled/components/base/BaseTab.vue.js +36 -0
- package/dist/bundled/components/base/BaseTab.vue2.js +18 -0
- package/dist/bundled/components/base/BaseTag.vue.js +13 -0
- package/dist/bundled/components/command/CommandPrompts.vue.js +5 -0
- package/dist/bundled/components/command/CommandPrompts.vue2.js +91 -0
- package/dist/bundled/components/command/CommandPromptsModal.vue.js +5 -0
- package/dist/bundled/components/command/CommandPromptsModal.vue2.js +45 -0
- package/dist/bundled/components/command/PromptSelect.vue.js +5 -0
- package/dist/bundled/components/command/PromptSelect.vue2.js +142 -0
- package/dist/bundled/components/command/PromptText.vue.js +5 -0
- package/dist/bundled/components/command/PromptText.vue2.js +67 -0
- package/dist/bundled/components/misc/CheckerboardPattern.vue.js +40 -0
- package/dist/bundled/components/misc/HatchedPattern.vue.js +12 -0
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue.js +5 -0
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue2.js +72 -0
- package/dist/bundled/components/panel/ControlsComponentProps.vue.js +5 -0
- package/dist/bundled/components/panel/ControlsComponentProps.vue2.js +45 -0
- package/dist/bundled/components/panel/ControlsComponentState.vue.js +5 -0
- package/dist/bundled/components/panel/ControlsComponentState.vue2.js +41 -0
- package/dist/bundled/components/panel/ControlsComponentStateItem.vue.js +5 -0
- package/dist/bundled/components/panel/ControlsComponentStateItem.vue2.js +46 -0
- package/dist/bundled/components/panel/PaneTabs.vue.js +5 -0
- package/dist/bundled/components/panel/PaneTabs.vue2.js +114 -0
- package/dist/bundled/components/panel/StatePresets.vue.js +5 -0
- package/dist/bundled/components/panel/StatePresets.vue2.js +193 -0
- package/dist/bundled/components/panel/StoryControls.vue.js +5 -0
- package/dist/bundled/components/panel/StoryControls.vue2.js +87 -0
- package/dist/bundled/components/panel/StoryDocs.vue.js +7 -0
- package/dist/bundled/components/panel/StoryDocs.vue2.js +161 -0
- package/dist/bundled/components/panel/StoryEvent.vue.js +5 -0
- package/dist/bundled/components/panel/StoryEvent.vue2.js +59 -0
- package/dist/bundled/components/panel/StoryEvents.vue.js +5 -0
- package/dist/bundled/components/panel/StoryEvents.vue2.js +53 -0
- package/dist/bundled/components/panel/StorySidePanel.vue.js +5 -0
- package/dist/bundled/components/panel/StorySidePanel.vue2.js +83 -0
- package/dist/bundled/components/panel/StorySourceCode.vue.js +8 -0
- package/dist/bundled/components/panel/StorySourceCode.vue2.js +204 -0
- package/dist/bundled/components/search/SearchItem.vue.js +8 -0
- package/dist/bundled/components/search/SearchItem.vue2.js +93 -0
- package/dist/bundled/components/search/SearchItemContent.vue.js +5 -0
- package/dist/bundled/components/search/SearchItemContent.vue2.js +71 -0
- package/dist/bundled/components/search/SearchLoading.vue.js +5 -0
- package/dist/bundled/components/search/SearchLoading.vue2.js +21 -0
- package/dist/bundled/components/search/SearchModal.vue.js +5 -0
- package/dist/bundled/components/search/SearchModal.vue2.js +51 -0
- package/dist/bundled/components/search/SearchPane.vue.js +5 -0
- package/dist/bundled/components/search/SearchPane.vue2.js +272 -0
- package/dist/bundled/components/search/search-docs-data.js +11 -0
- package/dist/bundled/components/search/search-title-data.js +11 -0
- package/dist/bundled/components/story/GenericMountStory.vue.js +5 -0
- package/dist/bundled/components/story/GenericMountStory.vue2.js +34 -0
- package/dist/bundled/components/story/GenericRenderStory.vue.js +5 -0
- package/dist/bundled/components/story/GenericRenderStory.vue2.js +39 -0
- package/dist/bundled/components/story/StoryResponsivePreview.vue.js +8 -0
- package/dist/bundled/components/story/StoryResponsivePreview.vue2.js +207 -0
- package/dist/bundled/components/story/StoryVariantGrid.vue.js +5 -0
- package/dist/bundled/components/story/StoryVariantGrid.vue2.js +146 -0
- package/dist/bundled/components/story/StoryVariantGridItem.vue.js +8 -0
- package/dist/bundled/components/story/StoryVariantGridItem.vue2.js +153 -0
- package/dist/bundled/components/story/StoryVariantListItem.vue.js +8 -0
- package/dist/bundled/components/story/StoryVariantListItem.vue2.js +55 -0
- package/dist/bundled/components/story/StoryVariantSingle.vue.js +8 -0
- package/dist/bundled/components/story/StoryVariantSingle.vue2.js +107 -0
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue.js +5 -0
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue2.js +70 -0
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue.js +5 -0
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue2.js +128 -0
- package/dist/bundled/components/story/StoryVariantSingleView.vue.js +5 -0
- package/dist/bundled/components/story/StoryVariantSingleView.vue2.js +66 -0
- package/dist/bundled/components/story/StoryView.vue.js +5 -0
- package/dist/bundled/components/story/StoryView.vue2.js +104 -0
- package/dist/bundled/components/story/StoryViewer.vue.js +8 -0
- package/dist/bundled/components/story/StoryViewer.vue2.js +55 -0
- package/dist/bundled/components/toolbar/DevOnlyToolbarOpenInEditor.vue.js +5 -0
- package/dist/bundled/components/toolbar/DevOnlyToolbarOpenInEditor.vue2.js +31 -0
- package/dist/bundled/components/toolbar/ToolbarBackground.vue.js +8 -0
- package/dist/bundled/components/toolbar/ToolbarBackground.vue2.js +98 -0
- package/dist/bundled/components/toolbar/ToolbarNewTab.vue.js +5 -0
- package/dist/bundled/components/toolbar/ToolbarNewTab.vue2.js +36 -0
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue.js +5 -0
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue2.js +127 -0
- package/dist/bundled/components/toolbar/ToolbarTextDirection.vue.js +5 -0
- package/dist/bundled/components/toolbar/ToolbarTextDirection.vue2.js +27 -0
- package/dist/bundled/components/toolbar/ToolbarTitle.vue.js +5 -0
- package/dist/bundled/components/toolbar/ToolbarTitle.vue2.js +26 -0
- package/dist/bundled/components/tree/StoryGroup.vue.js +5 -0
- package/dist/bundled/components/tree/StoryGroup.vue2.js +74 -0
- package/dist/bundled/components/tree/StoryList.vue.js +5 -0
- package/dist/bundled/components/tree/StoryList.vue2.js +41 -0
- package/dist/bundled/components/tree/StoryListFolder.vue.js +8 -0
- package/dist/bundled/components/tree/StoryListFolder.vue2.js +86 -0
- package/dist/bundled/components/tree/StoryListItem.vue.js +8 -0
- package/dist/bundled/components/tree/StoryListItem.vue2.js +69 -0
- package/dist/bundled/index.js +35 -0
- package/dist/bundled/plugin.js +49 -0
- package/dist/bundled/router.js +32 -0
- package/dist/bundled/sandbox.js +87 -0
- package/dist/bundled/stores/command.js +25 -0
- package/dist/bundled/stores/events.js +29 -0
- package/dist/bundled/stores/folder.js +54 -0
- package/dist/bundled/stores/preview-settings.js +19 -0
- package/dist/bundled/stores/story.js +43 -0
- package/dist/bundled/util/commands.js +57 -0
- package/dist/bundled/util/config.js +8 -0
- package/dist/bundled/util/const.js +10 -0
- package/dist/bundled/util/dark.js +28 -0
- package/dist/bundled/util/docs.js +26 -0
- package/dist/bundled/util/env.js +4 -0
- package/dist/bundled/util/events.js +33 -0
- package/dist/bundled/util/keyboard.js +90 -0
- package/dist/bundled/util/mapping.js +70 -0
- package/dist/bundled/util/open-in-editor.js +6 -0
- package/dist/bundled/util/preview-settings.js +21 -0
- package/dist/bundled/util/responsive.js +6 -0
- package/dist/bundled/util/sandbox.js +11 -0
- package/dist/bundled/util/scroll.js +31 -0
- package/dist/bundled/util/select.js +28 -0
- package/dist/bundled/util/state.js +41 -0
- package/dist/bundled/util/tooltip.js +15 -0
- package/dist/bundled/util/variant.js +21 -0
- package/dist/style.css +2626 -0
- package/package.json +56 -0
- package/postcss-scope-wrapper.cjs +35 -0
- package/postcss.config.cjs +9 -0
- package/scripts/copy.mjs +12 -0
- package/scripts/watchAndCopy.mjs +15 -0
- package/src/app/App.vue +172 -0
- package/src/app/api.ts +9 -0
- package/src/app/assets/histoire-text-dark.svg +89 -0
- package/src/app/assets/histoire-text.svg +89 -0
- package/src/app/assets/histoire.svg +51 -0
- package/src/app/components/HomeView.vue +61 -0
- package/src/app/components/app/AppHeader.vue +65 -0
- package/src/app/components/app/AppLogo.vue +25 -0
- package/src/app/components/app/Breadcrumb.vue +98 -0
- package/src/app/components/app/HomeCounter.vue +39 -0
- package/src/app/components/app/InitialLoading.vue +44 -0
- package/src/app/components/app/MobileOverlay.vue +33 -0
- package/src/app/components/base/BaseButton.vue +33 -0
- package/src/app/components/base/BaseCheckbox.vue +76 -0
- package/src/app/components/base/BaseCopyIcon.vue +34 -0
- package/src/app/components/base/BaseEmpty.vue +21 -0
- package/src/app/components/base/BaseIcon.vue +31 -0
- package/src/app/components/base/BaseKeyboardShortcut.vue +16 -0
- package/src/app/components/base/BaseListItem.vue +30 -0
- package/src/app/components/base/BaseListItemLink.vue +56 -0
- package/src/app/components/base/BaseOverflowMenu.vue +119 -0
- package/src/app/components/base/BaseOverflowTab.vue +47 -0
- package/src/app/components/base/BaseSelect.vue +75 -0
- package/src/app/components/base/BaseSplitPane.vue +244 -0
- package/src/app/components/base/BaseTab.vue +47 -0
- package/src/app/components/base/BaseTag.vue +5 -0
- package/src/app/components/command/CommandPrompts.vue +95 -0
- package/src/app/components/command/CommandPromptsModal.vue +41 -0
- package/src/app/components/command/PromptSelect.vue +142 -0
- package/src/app/components/command/PromptText.vue +65 -0
- package/src/app/components/misc/CheckerboardPattern.vue +32 -0
- package/src/app/components/misc/HatchedPattern.vue +13 -0
- package/src/app/components/panel/ControlsComponentPropItem.vue +73 -0
- package/src/app/components/panel/ControlsComponentProps.vue +34 -0
- package/src/app/components/panel/ControlsComponentState.vue +38 -0
- package/src/app/components/panel/ControlsComponentStateItem.vue +44 -0
- package/src/app/components/panel/PaneTabs.vue +84 -0
- package/src/app/components/panel/StatePresets.vue +199 -0
- package/src/app/components/panel/StoryControls.vue +97 -0
- package/src/app/components/panel/StoryDocs.vue +202 -0
- package/src/app/components/panel/StoryEvent.vue +54 -0
- package/src/app/components/panel/StoryEvents.vue +48 -0
- package/src/app/components/panel/StorySidePanel.vue +76 -0
- package/src/app/components/panel/StorySourceCode.vue +248 -0
- package/src/app/components/search/SearchItem.vue +89 -0
- package/src/app/components/search/SearchItemContent.vue +67 -0
- package/src/app/components/search/SearchLoading.vue +16 -0
- package/src/app/components/search/SearchModal.vue +44 -0
- package/src/app/components/search/SearchPane.vue +319 -0
- package/src/app/components/search/search-docs-data.ts +9 -0
- package/src/app/components/search/search-title-data.ts +9 -0
- package/src/app/components/search/types.ts +4 -0
- package/src/app/components/story/GenericMountStory.vue +35 -0
- package/src/app/components/story/GenericRenderStory.vue +41 -0
- package/src/app/components/story/StoryResponsivePreview.vue +216 -0
- package/src/app/components/story/StoryVariantGrid.vue +169 -0
- package/src/app/components/story/StoryVariantGridItem.vue +163 -0
- package/src/app/components/story/StoryVariantListItem.vue +52 -0
- package/src/app/components/story/StoryVariantSingle.vue +105 -0
- package/src/app/components/story/StoryVariantSinglePreviewNative.vue +66 -0
- package/src/app/components/story/StoryVariantSinglePreviewRemote.vue +143 -0
- package/src/app/components/story/StoryVariantSingleView.vue +61 -0
- package/src/app/components/story/StoryView.vue +110 -0
- package/src/app/components/story/StoryViewer.vue +52 -0
- package/src/app/components/toolbar/DevOnlyToolbarOpenInEditor.vue +23 -0
- package/src/app/components/toolbar/ToolbarBackground.vue +81 -0
- package/src/app/components/toolbar/ToolbarNewTab.vue +29 -0
- package/src/app/components/toolbar/ToolbarResponsiveSize.vue +82 -0
- package/src/app/components/toolbar/ToolbarTextDirection.vue +19 -0
- package/src/app/components/toolbar/ToolbarTitle.vue +21 -0
- package/src/app/components/tree/StoryGroup.vue +73 -0
- package/src/app/components/tree/StoryList.vue +35 -0
- package/src/app/components/tree/StoryListFolder.vue +88 -0
- package/src/app/components/tree/StoryListItem.vue +72 -0
- package/src/app/index.ts +33 -0
- package/src/app/plugin.ts +59 -0
- package/src/app/router.ts +29 -0
- package/src/app/sandbox.ts +101 -0
- package/src/app/stores/command.ts +26 -0
- package/src/app/stores/events.ts +36 -0
- package/src/app/stores/folder.ts +63 -0
- package/src/app/stores/preview-settings.ts +18 -0
- package/src/app/stores/story.ts +47 -0
- package/src/app/style/floating.pcss +34 -0
- package/src/app/style/main.pcss +100 -0
- package/src/app/style/sandbox.css +24 -0
- package/src/app/style/transitions.pcss +51 -0
- package/src/app/types.ts +72 -0
- package/src/app/util/commands.ts +57 -0
- package/src/app/util/config.ts +5 -0
- package/src/app/util/const.ts +4 -0
- package/src/app/util/dark.ts +27 -0
- package/src/app/util/docs.ts +27 -0
- package/src/app/util/env.ts +1 -0
- package/src/app/util/events.ts +31 -0
- package/src/app/util/keyboard.ts +103 -0
- package/src/app/util/mapping.ts +80 -0
- package/src/app/util/open-in-editor.ts +3 -0
- package/src/app/util/preview-settings.ts +23 -0
- package/src/app/util/responsive.ts +3 -0
- package/src/app/util/sandbox.ts +9 -0
- package/src/app/util/scroll.ts +32 -0
- package/src/app/util/select.ts +30 -0
- package/src/app/util/state.ts +45 -0
- package/src/app/util/tooltip.ts +13 -0
- package/src/app/util/variant.ts +21 -0
- package/src/bundle-index.js +1 -0
- package/src/bundle-main-dev.js +4 -0
- package/src/bundle-main.js +5 -0
- package/src/bundle-sandbox-dev.js +2 -0
- package/src/bundle-sandbox.js +2 -0
- package/src/index.ts +1 -0
- package/src/shim.d.ts +10 -0
- package/src/virtual.d.ts +7 -0
- package/tailwind.config.cjs +137 -0
- package/tsconfig.json +53 -0
- package/vite.config.ts +88 -0
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@poveste/app",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "Pre-bundled UI for Poveste",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Sorin Gitlan"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"url": "https://github.com/poveste-dev/poveste.git",
|
|
12
|
+
"type": "git",
|
|
13
|
+
"directory": "packages/poveste-app"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"default": "./dist/bundle-index.js"
|
|
22
|
+
},
|
|
23
|
+
"./*": "./*"
|
|
24
|
+
},
|
|
25
|
+
"types": "./src/index.ts",
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"fuse.js": "^7.0.0",
|
|
28
|
+
"shiki": "^3.0.0",
|
|
29
|
+
"@poveste/controls": "^0.1.0",
|
|
30
|
+
"@poveste/vendors": "^0.1.0",
|
|
31
|
+
"@poveste/shared": "^0.1.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@tailwindcss/typography": "^0.5.15",
|
|
35
|
+
"@types/fs-extra": "^11.0.4",
|
|
36
|
+
"@types/node": "^22.10.1",
|
|
37
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
38
|
+
"autoprefixer": "^10.4.20",
|
|
39
|
+
"chokidar": "^4.0.1",
|
|
40
|
+
"concurrently": "^9.1.0",
|
|
41
|
+
"fs-extra": "^11.2.0",
|
|
42
|
+
"globby": "^14.0.2",
|
|
43
|
+
"pathe": "^1.1.2",
|
|
44
|
+
"postcss": "^8.4.49",
|
|
45
|
+
"postcss-import": "^16.1.0",
|
|
46
|
+
"tailwindcss": "^3.4.16",
|
|
47
|
+
"typescript": "5.6.3",
|
|
48
|
+
"vite": "^7.3.0",
|
|
49
|
+
"vue": "^3.5.26"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "rimraf dist && vite build && pnpm run build:css && node ./scripts/copy.mjs",
|
|
53
|
+
"build:css": "tailwindcss -i src/app/style/main.pcss -o ./dist/style.css -c tailwind.config.cjs --postcss postcss.config.cjs",
|
|
54
|
+
"watch": "concurrently \"vite build --watch\" \"pnpm run build:css --watch\" \"node ./scripts/watchAndCopy.mjs\""
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function isImportRule(node) {
|
|
2
|
+
return node.type === 'atrule' && node.name === 'import'
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
module.exports = (opts = {}) => {
|
|
6
|
+
const { from = ':root', to } = opts
|
|
7
|
+
let params = `(${from})`
|
|
8
|
+
if (to) {
|
|
9
|
+
params += ` to (${to})`
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return {
|
|
13
|
+
postcssPlugin: 'postcss-scope-wrapper',
|
|
14
|
+
Once(root, { AtRule }) {
|
|
15
|
+
const scopeRule = new AtRule({
|
|
16
|
+
name: 'scope',
|
|
17
|
+
params,
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
const nodesToMove = root.nodes.filter(node => !isImportRule(node))
|
|
21
|
+
|
|
22
|
+
nodesToMove.forEach((node) => {
|
|
23
|
+
if (node.type === 'rule') {
|
|
24
|
+
node.selectors = node.selectors
|
|
25
|
+
.map(selector => (['html', ':root'].includes(selector) ? ':scope' : selector))
|
|
26
|
+
}
|
|
27
|
+
scopeRule.append(node)
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
root.append(scopeRule)
|
|
31
|
+
},
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
module.exports.postcss = true
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
plugins: [
|
|
3
|
+
require('postcss-import'),
|
|
4
|
+
require('tailwindcss/nesting'),
|
|
5
|
+
require('tailwindcss')('./tailwind.config.cjs'),
|
|
6
|
+
require('autoprefixer'),
|
|
7
|
+
require('./postcss-scope-wrapper.cjs')({ from: ':root', to: '.__histoire-render-story:not(.__histoire-render-custom-controls)' }),
|
|
8
|
+
],
|
|
9
|
+
}
|
package/scripts/copy.mjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import fs from 'fs-extra'
|
|
2
|
+
import { globbySync } from 'globby'
|
|
3
|
+
import { normalizePath } from 'vite'
|
|
4
|
+
|
|
5
|
+
function toDist(file) {
|
|
6
|
+
return normalizePath(file).replace(/^src\//, 'dist/')
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
globbySync('src/**/*').forEach((file) => {
|
|
10
|
+
if (file.endsWith('.vue') || file.endsWith('.ts') || file.endsWith('tsconfig.json')) return
|
|
11
|
+
fs.copy(file, toDist(file))
|
|
12
|
+
})
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import chokidar from 'chokidar'
|
|
2
|
+
import fs from 'fs-extra'
|
|
3
|
+
import { normalizePath } from 'vite'
|
|
4
|
+
|
|
5
|
+
function toDist(file) {
|
|
6
|
+
return normalizePath(file).replace(/^src\//, 'dist/')
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// copy non ts files, such as an html or css, to the dist directory whenever
|
|
10
|
+
// they change.
|
|
11
|
+
chokidar
|
|
12
|
+
.watch('src/**/!(*.ts|*.vue|tsconfig.json)')
|
|
13
|
+
.on('change', file => fs.copy(file, toDist(file)))
|
|
14
|
+
.on('add', file => fs.copy(file, toDist(file)))
|
|
15
|
+
.on('unlink', file => fs.remove(toDist(file)))
|
package/src/app/App.vue
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export default {
|
|
3
|
+
name: 'PovesteApp',
|
|
4
|
+
}
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import type { StoryFile, Tree } from './types'
|
|
9
|
+
import { useTitle } from '@vueuse/core'
|
|
10
|
+
import { onUpdate, files as rawFiles, tree as rawTree } from 'virtual:$histoire-stories'
|
|
11
|
+
import { computed, onMounted, ref, watch } from 'vue'
|
|
12
|
+
import AppHeader from './components/app/AppHeader.vue'
|
|
13
|
+
import Breadcrumb from './components/app/Breadcrumb.vue'
|
|
14
|
+
import InitialLoading from './components/app/InitialLoading.vue'
|
|
15
|
+
import BaseSplitPane from './components/base/BaseSplitPane.vue'
|
|
16
|
+
import CommandPromptsModal from './components/command/CommandPromptsModal.vue'
|
|
17
|
+
import SearchModal from './components/search/SearchModal.vue'
|
|
18
|
+
import GenericMountStory from './components/story/GenericMountStory.vue'
|
|
19
|
+
import StoryList from './components/tree/StoryList.vue'
|
|
20
|
+
import { useCommandStore } from './stores/command'
|
|
21
|
+
import { useStoryStore } from './stores/story'
|
|
22
|
+
import { histoireConfig } from './util/config'
|
|
23
|
+
import { onKeyboardShortcut } from './util/keyboard'
|
|
24
|
+
import { mapFile } from './util/mapping'
|
|
25
|
+
import { isMobile } from './util/responsive'
|
|
26
|
+
|
|
27
|
+
const files = ref<StoryFile[]>(rawFiles.map(file => mapFile(file)))
|
|
28
|
+
const tree = ref<Tree>(rawTree)
|
|
29
|
+
|
|
30
|
+
onUpdate((newFiles: StoryFile[], newTree: Tree) => {
|
|
31
|
+
loading.value = false
|
|
32
|
+
files.value = newFiles.map((file) => {
|
|
33
|
+
const existingFile = files.value.find(f => f.id === file.id)
|
|
34
|
+
return mapFile(file, existingFile)
|
|
35
|
+
})
|
|
36
|
+
tree.value = newTree
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
const stories = computed(() => files.value.reduce((acc, file) => {
|
|
40
|
+
acc.push(file.story)
|
|
41
|
+
return acc
|
|
42
|
+
}, []))
|
|
43
|
+
|
|
44
|
+
// Store
|
|
45
|
+
|
|
46
|
+
const storyStore = useStoryStore()
|
|
47
|
+
watch(stories, (value) => {
|
|
48
|
+
storyStore.setStories(value)
|
|
49
|
+
}, {
|
|
50
|
+
immediate: true,
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
useTitle(computed(() => {
|
|
54
|
+
if (storyStore.currentStory) {
|
|
55
|
+
let title = storyStore.currentStory.title
|
|
56
|
+
if (storyStore.currentVariant) {
|
|
57
|
+
title += ` › ${storyStore.currentVariant.title}`
|
|
58
|
+
}
|
|
59
|
+
return `${title} | ${histoireConfig.theme.title}`
|
|
60
|
+
}
|
|
61
|
+
return histoireConfig.theme.title
|
|
62
|
+
}))
|
|
63
|
+
|
|
64
|
+
// Search
|
|
65
|
+
|
|
66
|
+
const loadSearch = ref(false)
|
|
67
|
+
const isSearchOpen = ref(false)
|
|
68
|
+
|
|
69
|
+
watch(isSearchOpen, (value) => {
|
|
70
|
+
if (value) {
|
|
71
|
+
loadSearch.value = true
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
onKeyboardShortcut(['ctrl+k', 'meta+k'], (event) => {
|
|
76
|
+
isSearchOpen.value = true
|
|
77
|
+
event.preventDefault()
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
const loading = ref(false)
|
|
81
|
+
|
|
82
|
+
if (import.meta.hot && !rawFiles.length) {
|
|
83
|
+
loading.value = true
|
|
84
|
+
import.meta.hot.on('histoire:all-stories-loaded', () => {
|
|
85
|
+
loading.value = false
|
|
86
|
+
})
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const mounted = ref(false)
|
|
90
|
+
onMounted(() => {
|
|
91
|
+
mounted.value = true
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
const commandStore = useCommandStore()
|
|
95
|
+
</script>
|
|
96
|
+
|
|
97
|
+
<template>
|
|
98
|
+
<div
|
|
99
|
+
v-if="storyStore.currentStory"
|
|
100
|
+
class="histoire-app htw-hidden"
|
|
101
|
+
>
|
|
102
|
+
<GenericMountStory
|
|
103
|
+
:key="storyStore.currentStory.id"
|
|
104
|
+
:story="storyStore.currentStory"
|
|
105
|
+
/>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<div
|
|
109
|
+
class="htw-h-screen htw-bg-white dark:htw-bg-gray-700 dark:htw-text-gray-100"
|
|
110
|
+
:style="{
|
|
111
|
+
// Prevent flash of content
|
|
112
|
+
opacity: mounted ? 1 : 0,
|
|
113
|
+
}"
|
|
114
|
+
>
|
|
115
|
+
<div
|
|
116
|
+
v-if="isMobile"
|
|
117
|
+
class="htw-h-full htw-flex htw-flex-col htw-divide-y htw-divide-gray-100 dark:htw-divide-gray-800"
|
|
118
|
+
>
|
|
119
|
+
<AppHeader @search="isSearchOpen = true" />
|
|
120
|
+
<Breadcrumb
|
|
121
|
+
:tree="tree"
|
|
122
|
+
:stories="stories"
|
|
123
|
+
/>
|
|
124
|
+
<RouterView class="htw-grow" />
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<BaseSplitPane
|
|
128
|
+
v-else
|
|
129
|
+
save-id="main-horiz"
|
|
130
|
+
:min="5"
|
|
131
|
+
:max="50"
|
|
132
|
+
:default-split="15"
|
|
133
|
+
class="htw-h-full"
|
|
134
|
+
>
|
|
135
|
+
<template #first>
|
|
136
|
+
<div class="htw-flex htw-flex-col htw-h-full htw-bg-gray-100 dark:htw-bg-gray-750 __histoire-pane-shadow-from-right">
|
|
137
|
+
<AppHeader
|
|
138
|
+
class="htw-flex-none"
|
|
139
|
+
@search="isSearchOpen = true"
|
|
140
|
+
/>
|
|
141
|
+
<StoryList
|
|
142
|
+
:tree="tree"
|
|
143
|
+
:stories="stories"
|
|
144
|
+
class="htw-flex-1"
|
|
145
|
+
/>
|
|
146
|
+
</div>
|
|
147
|
+
</template>
|
|
148
|
+
|
|
149
|
+
<template #last>
|
|
150
|
+
<RouterView />
|
|
151
|
+
</template>
|
|
152
|
+
</BaseSplitPane>
|
|
153
|
+
|
|
154
|
+
<SearchModal
|
|
155
|
+
v-if="loadSearch"
|
|
156
|
+
:shown="isSearchOpen"
|
|
157
|
+
@close="isSearchOpen = false"
|
|
158
|
+
/>
|
|
159
|
+
|
|
160
|
+
<CommandPromptsModal
|
|
161
|
+
v-if="__HISTOIRE_DEV__"
|
|
162
|
+
:shown="commandStore.showPromptsModal"
|
|
163
|
+
@close="commandStore.showPromptsModal = false"
|
|
164
|
+
/>
|
|
165
|
+
</div>
|
|
166
|
+
|
|
167
|
+
<transition name="__histoire-fade">
|
|
168
|
+
<InitialLoading
|
|
169
|
+
v-if="loading"
|
|
170
|
+
/>
|
|
171
|
+
</transition>
|
|
172
|
+
</template>
|
package/src/app/api.ts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
3
|
+
|
|
4
|
+
<svg
|
|
5
|
+
width="1536"
|
|
6
|
+
height="512"
|
|
7
|
+
viewBox="0 0 1536 512"
|
|
8
|
+
version="1.1"
|
|
9
|
+
id="svg5"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
|
12
|
+
<defs
|
|
13
|
+
id="defs2" />
|
|
14
|
+
<g
|
|
15
|
+
id="layer1">
|
|
16
|
+
<rect
|
|
17
|
+
style="opacity:0.5;fill:#34d399;fill-opacity:1;stroke-width:1.00375"
|
|
18
|
+
id="rect1372"
|
|
19
|
+
width="314.30923"
|
|
20
|
+
height="406.60901"
|
|
21
|
+
x="-26.565063"
|
|
22
|
+
y="134.75079"
|
|
23
|
+
transform="rotate(-23.821262)"
|
|
24
|
+
ry="8" />
|
|
25
|
+
<rect
|
|
26
|
+
style="fill:#34d399;fill-opacity:1;stroke-width:1.00375"
|
|
27
|
+
id="rect850"
|
|
28
|
+
width="314.30923"
|
|
29
|
+
height="406.60901"
|
|
30
|
+
x="77.571838"
|
|
31
|
+
y="72.808708"
|
|
32
|
+
ry="8"
|
|
33
|
+
transform="rotate(-4.5744534)" />
|
|
34
|
+
</g>
|
|
35
|
+
<g
|
|
36
|
+
id="layer3">
|
|
37
|
+
<path
|
|
38
|
+
id="path1657-3"
|
|
39
|
+
style="display:inline;fill:#adedd6;fill-opacity:1;stroke:#adedd6;stroke-width:8.34923;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
40
|
+
d="M 359.38947,355.95134 320.72935,176.52942 238.34613,238.94118 Z M 273.64124,273.06608 152.59788,156.05591 191.25804,335.47786 Z" />
|
|
41
|
+
<g
|
|
42
|
+
aria-label="Histoire"
|
|
43
|
+
id="text1821-4"
|
|
44
|
+
style="font-size:231.926px;line-height:1.25;font-family:Sen;-inkscape-font-specification:Sen;fill:#adedd6;fill-opacity:1;stroke-width:5.79813"
|
|
45
|
+
transform="matrix(1.1500556,0,0,1.1500556,-105.40156,-38.414233)">
|
|
46
|
+
<path
|
|
47
|
+
d="M 693.87591,344.24783 V 181.89964 h 25.04801 v 162.34819 z m -105.99018,0 V 181.89964 h 25.04801 v 162.34819 z m 10.90052,-68.88202 v -24.1203 h 106.22211 v 24.1203 z"
|
|
48
|
+
style="font-family:'Lexend Deca';-inkscape-font-specification:'Lexend Deca';fill:#adedd6;fill-opacity:1"
|
|
49
|
+
id="path16857" />
|
|
50
|
+
<path
|
|
51
|
+
d="M 762.294,344.24783 V 222.48669 h 23.88838 v 121.76114 z m 11.5963,-148.66456 q -7.65356,0 -11.82822,-3.94274 -4.17467,-3.94274 -4.17467,-11.13245 0,-6.72585 4.17467,-10.90052 4.40659,-4.17467 11.82822,-4.17467 7.65356,0 11.82823,3.94274 4.17466,3.94275 4.17466,11.13245 0,6.72585 -4.40659,10.90052 -4.17467,4.17467 -11.5963,4.17467 z"
|
|
52
|
+
style="font-family:'Lexend Deca';-inkscape-font-specification:'Lexend Deca';fill:#adedd6;fill-opacity:1"
|
|
53
|
+
id="path16859" />
|
|
54
|
+
<path
|
|
55
|
+
d="m 863.41371,346.56709 q -15.30711,0 -27.59919,-5.33429 -12.29208,-5.3343 -20.40949,-15.77097 l 16.23482,-13.91556 q 6.95778,8.11741 15.07519,11.82822 8.34934,3.47889 18.78601,3.47889 4.17466,0 7.65355,-0.9277 3.71082,-1.15963 6.26201,-3.24696 2.78311,-2.08734 4.17466,-4.87045 1.39156,-3.01504 1.39156,-6.49393 0,-6.03007 -4.40659,-9.74089 -2.31926,-1.62348 -7.42164,-3.47889 -4.87044,-2.08733 -12.75593,-4.17467 -13.4517,-3.47889 -22.03297,-7.88548 -8.58126,-4.4066 -13.21978,-9.97282 -3.47889,-4.40659 -5.10237,-9.50897 -1.62348,-5.33429 -1.62348,-11.59629 0,-7.65356 3.24696,-13.91556 3.47889,-6.49393 9.27704,-11.13245 6.03008,-4.87045 13.91556,-7.42163 8.11741,-2.55119 17.16253,-2.55119 8.58126,0 16.93059,2.31926 8.58126,2.31926 15.77097,6.72585 7.18971,4.4066 12.06015,10.43667 l -13.68363,15.07519 q -4.4066,-4.40659 -9.74089,-7.65355 -5.10237,-3.47889 -10.43667,-5.3343 -5.3343,-1.85541 -9.74089,-1.85541 -4.87045,0 -8.81319,0.9277 -3.94274,0.92771 -6.72586,2.78312 -2.55118,1.8554 -3.94274,4.63852 -1.39155,2.78311 -1.39155,6.262 0.23192,3.01504 1.39155,5.79815 1.39156,2.55118 3.71082,4.40659 2.55118,1.85541 7.65356,3.94274 5.10237,2.08734 12.98785,3.94274 11.5963,3.01504 19.01793,6.72586 7.65356,3.47889 12.06015,8.11741 4.63852,4.40659 6.49393,10.20474 1.85541,5.79815 1.85541,12.98786 0,10.43667 -6.03008,18.786 -5.79815,8.11741 -15.77096,12.75593 -9.97282,4.63852 -22.2649,4.63852 z"
|
|
56
|
+
style="font-family:'Lexend Deca';-inkscape-font-specification:'Lexend Deca';fill:#adedd6;fill-opacity:1"
|
|
57
|
+
id="path16861" />
|
|
58
|
+
<path
|
|
59
|
+
d="M 948.99398,344.24783 V 191.4086 h 23.88838 v 152.83923 z m -25.27993,-98.56854 v -23.1926 h 77.46325 v 23.1926 z"
|
|
60
|
+
style="font-family:'Lexend Deca';-inkscape-font-specification:'Lexend Deca';fill:#adedd6;fill-opacity:1"
|
|
61
|
+
id="path16863" />
|
|
62
|
+
<path
|
|
63
|
+
d="m 1076.5528,346.56709 q -17.8583,0 -32.0058,-8.11741 -13.9156,-8.34933 -22.033,-22.49682 -8.1174,-14.37941 -8.1174,-32.70156 0,-18.32216 8.1174,-32.46964 8.1174,-14.37941 22.033,-22.49682 14.1475,-8.34934 32.0058,-8.34934 17.6263,0 31.5419,8.34934 14.1475,8.11741 22.2649,22.49682 8.1174,14.14748 8.1174,32.46964 0,18.32215 -8.1174,32.70156 -8.1174,14.14749 -22.2649,22.49682 -13.9156,8.11741 -31.5419,8.11741 z m 0,-21.80104 q 10.9005,0 19.4818,-5.3343 8.5812,-5.56622 13.4517,-14.84326 4.8704,-9.50897 4.6385,-21.33719 0.2319,-12.06016 -4.6385,-21.33719 -4.8705,-9.50897 -13.4517,-14.84327 -8.5813,-5.3343 -19.4818,-5.3343 -10.9005,0 -19.7137,5.56623 -8.5813,5.3343 -13.4517,14.84326 -4.8705,9.27704 -4.6386,21.10527 -0.2319,11.82822 4.6386,21.33719 4.8704,9.27704 13.4517,14.84326 8.8132,5.3343 19.7137,5.3343 z"
|
|
64
|
+
style="font-family:'Lexend Deca';-inkscape-font-specification:'Lexend Deca';fill:#adedd6;fill-opacity:1"
|
|
65
|
+
id="path16865" />
|
|
66
|
+
<path
|
|
67
|
+
d="M 1168.3954,344.24783 V 222.48669 h 23.8884 v 121.76114 z m 11.5963,-148.66456 q -7.6536,0 -11.8282,-3.94274 -4.1747,-3.94274 -4.1747,-11.13245 0,-6.72585 4.1747,-10.90052 4.4065,-4.17467 11.8282,-4.17467 7.6535,0 11.8282,3.94274 4.1747,3.94275 4.1747,11.13245 0,6.72585 -4.4066,10.90052 -4.1747,4.17467 -11.5963,4.17467 z"
|
|
68
|
+
style="font-family:'Lexend Deca';-inkscape-font-specification:'Lexend Deca';fill:#adedd6;fill-opacity:1"
|
|
69
|
+
id="path16867" />
|
|
70
|
+
<path
|
|
71
|
+
d="M 1228.928,344.24783 V 222.48669 h 24.1203 v 38.26779 l -2.3192,-9.27704 q 2.5512,-8.81319 8.5812,-16.0029 6.262,-7.1897 14.1475,-11.36437 8.1174,-4.17467 16.6987,-4.17467 3.9427,0 7.4216,0.69578 3.7109,0.69578 5.7982,1.62348 l -6.262,25.97571 q -2.7831,-1.15963 -6.262,-1.85541 -3.247,-0.9277 -6.4939,-0.9277 -6.262,0 -12.0602,2.55119 -5.5662,2.31926 -9.9728,6.72585 -4.1747,4.17467 -6.7259,9.97282 -2.5512,5.56622 -2.5512,12.29207 v 67.25854 z"
|
|
72
|
+
style="font-family:'Lexend Deca';-inkscape-font-specification:'Lexend Deca';fill:#adedd6;fill-opacity:1"
|
|
73
|
+
id="path16869" />
|
|
74
|
+
<path
|
|
75
|
+
d="m 1374.1134,346.56709 q -18.786,0 -33.3973,-7.88548 -14.3794,-8.11741 -22.7288,-22.03297 -8.1174,-13.91556 -8.1174,-32.00579 0,-14.37941 4.6386,-26.20763 4.6385,-11.82823 12.7559,-20.40949 8.3493,-8.81319 19.7137,-13.45171 11.5963,-4.87045 25.048,-4.87045 11.8282,0 22.033,4.63852 10.2047,4.4066 17.6263,12.29208 7.6536,7.88549 11.5963,18.78601 4.1747,10.66859 3.9428,23.42452 l -0.2319,10.20475 h -99.4963 l -5.3343,-19.01794 h 84.1891 l -3.4788,3.94275 v -5.56623 q -0.6958,-7.65355 -5.1024,-13.68363 -4.4066,-6.03008 -11.1325,-9.50897 -6.7258,-3.47889 -14.6113,-3.47889 -12.524,0 -21.1053,4.87045 -8.5812,4.63852 -12.9878,13.91556 -4.4066,9.04511 -4.4066,22.49682 0,12.75593 5.3343,22.2649 5.3343,9.27704 15.0752,14.37941 9.7409,5.10237 22.4968,5.10237 9.0451,0 16.6987,-3.01504 7.8855,-3.01504 16.9306,-10.90052 l 12.0601,16.9306 q -5.5662,5.56622 -13.6836,9.74089 -7.8855,4.17467 -16.9306,6.72585 -8.8132,2.31926 -17.3945,2.31926 z"
|
|
76
|
+
style="font-family:'Lexend Deca';-inkscape-font-specification:'Lexend Deca';fill:#adedd6;fill-opacity:1"
|
|
77
|
+
id="path16871" />
|
|
78
|
+
</g>
|
|
79
|
+
</g>
|
|
80
|
+
<g
|
|
81
|
+
id="layer2"
|
|
82
|
+
style="display:none">
|
|
83
|
+
<path
|
|
84
|
+
id="path1657"
|
|
85
|
+
style="fill:#b4fae2;fill-opacity:1;stroke:#b4fae2;stroke-width:8;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
86
|
+
d="m 296,103.98242 -135.53125,177.9668 h 88.70117 z M 262.83008,230.05078 216,408.01758 351.53125,230.05078 Z"
|
|
87
|
+
transform="rotate(-4.156553,256,256.00691)" />
|
|
88
|
+
</g>
|
|
89
|
+
</svg>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
3
|
+
|
|
4
|
+
<svg
|
|
5
|
+
width="1536"
|
|
6
|
+
height="512"
|
|
7
|
+
viewBox="0 0 1536 512"
|
|
8
|
+
version="1.1"
|
|
9
|
+
id="svg5"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
|
12
|
+
<defs
|
|
13
|
+
id="defs2" />
|
|
14
|
+
<g
|
|
15
|
+
id="layer1">
|
|
16
|
+
<rect
|
|
17
|
+
style="opacity:0.5;fill:#34d399;fill-opacity:1;stroke-width:1.00375"
|
|
18
|
+
id="rect1372"
|
|
19
|
+
width="314.30923"
|
|
20
|
+
height="406.60901"
|
|
21
|
+
x="-26.565063"
|
|
22
|
+
y="134.75079"
|
|
23
|
+
transform="rotate(-23.821262)"
|
|
24
|
+
ry="8" />
|
|
25
|
+
<rect
|
|
26
|
+
style="fill:#34d399;fill-opacity:1;stroke-width:1.00375"
|
|
27
|
+
id="rect850"
|
|
28
|
+
width="314.30923"
|
|
29
|
+
height="406.60901"
|
|
30
|
+
x="77.571838"
|
|
31
|
+
y="72.808708"
|
|
32
|
+
ry="8"
|
|
33
|
+
transform="rotate(-4.5744534)" />
|
|
34
|
+
</g>
|
|
35
|
+
<g
|
|
36
|
+
id="layer3">
|
|
37
|
+
<path
|
|
38
|
+
id="path1657-3"
|
|
39
|
+
style="display:inline;fill:#adedd6;fill-opacity:1;stroke:#adedd6;stroke-width:8.34923;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
40
|
+
d="M 359.38947,355.95134 320.72935,176.52942 238.34613,238.94118 Z M 273.64124,273.06608 152.59788,156.05591 191.25804,335.47786 Z" />
|
|
41
|
+
<g
|
|
42
|
+
aria-label="Histoire"
|
|
43
|
+
id="text1821"
|
|
44
|
+
style="font-size:231.926px;line-height:1.25;font-family:Sen;-inkscape-font-specification:Sen;fill:#2bc78e;stroke-width:5.79813;fill-opacity:1"
|
|
45
|
+
transform="matrix(1.1500556,0,0,1.1500556,-105.40156,-38.414233)">
|
|
46
|
+
<path
|
|
47
|
+
d="M 693.87591,344.24783 V 181.89964 h 25.04801 v 162.34819 z m -105.99018,0 V 181.89964 h 25.04801 v 162.34819 z m 10.90052,-68.88202 v -24.1203 h 106.22211 v 24.1203 z"
|
|
48
|
+
style="font-family:'Lexend Deca';-inkscape-font-specification:'Lexend Deca';fill:#2bc78e;fill-opacity:1"
|
|
49
|
+
id="path16857" />
|
|
50
|
+
<path
|
|
51
|
+
d="M 762.294,344.24783 V 222.48669 h 23.88838 v 121.76114 z m 11.5963,-148.66456 q -7.65356,0 -11.82822,-3.94274 -4.17467,-3.94274 -4.17467,-11.13245 0,-6.72585 4.17467,-10.90052 4.40659,-4.17467 11.82822,-4.17467 7.65356,0 11.82823,3.94274 4.17466,3.94275 4.17466,11.13245 0,6.72585 -4.40659,10.90052 -4.17467,4.17467 -11.5963,4.17467 z"
|
|
52
|
+
style="font-family:'Lexend Deca';-inkscape-font-specification:'Lexend Deca';fill:#2bc78e;fill-opacity:1"
|
|
53
|
+
id="path16859" />
|
|
54
|
+
<path
|
|
55
|
+
d="m 863.41371,346.56709 q -15.30711,0 -27.59919,-5.33429 -12.29208,-5.3343 -20.40949,-15.77097 l 16.23482,-13.91556 q 6.95778,8.11741 15.07519,11.82822 8.34934,3.47889 18.78601,3.47889 4.17466,0 7.65355,-0.9277 3.71082,-1.15963 6.26201,-3.24696 2.78311,-2.08734 4.17466,-4.87045 1.39156,-3.01504 1.39156,-6.49393 0,-6.03007 -4.40659,-9.74089 -2.31926,-1.62348 -7.42164,-3.47889 -4.87044,-2.08733 -12.75593,-4.17467 -13.4517,-3.47889 -22.03297,-7.88548 -8.58126,-4.4066 -13.21978,-9.97282 -3.47889,-4.40659 -5.10237,-9.50897 -1.62348,-5.33429 -1.62348,-11.59629 0,-7.65356 3.24696,-13.91556 3.47889,-6.49393 9.27704,-11.13245 6.03008,-4.87045 13.91556,-7.42163 8.11741,-2.55119 17.16253,-2.55119 8.58126,0 16.93059,2.31926 8.58126,2.31926 15.77097,6.72585 7.18971,4.4066 12.06015,10.43667 l -13.68363,15.07519 q -4.4066,-4.40659 -9.74089,-7.65355 -5.10237,-3.47889 -10.43667,-5.3343 -5.3343,-1.85541 -9.74089,-1.85541 -4.87045,0 -8.81319,0.9277 -3.94274,0.92771 -6.72586,2.78312 -2.55118,1.8554 -3.94274,4.63852 -1.39155,2.78311 -1.39155,6.262 0.23192,3.01504 1.39155,5.79815 1.39156,2.55118 3.71082,4.40659 2.55118,1.85541 7.65356,3.94274 5.10237,2.08734 12.98785,3.94274 11.5963,3.01504 19.01793,6.72586 7.65356,3.47889 12.06015,8.11741 4.63852,4.40659 6.49393,10.20474 1.85541,5.79815 1.85541,12.98786 0,10.43667 -6.03008,18.786 -5.79815,8.11741 -15.77096,12.75593 -9.97282,4.63852 -22.2649,4.63852 z"
|
|
56
|
+
style="font-family:'Lexend Deca';-inkscape-font-specification:'Lexend Deca';fill:#2bc78e;fill-opacity:1"
|
|
57
|
+
id="path16861" />
|
|
58
|
+
<path
|
|
59
|
+
d="M 948.99398,344.24783 V 191.4086 h 23.88838 v 152.83923 z m -25.27993,-98.56854 v -23.1926 h 77.46325 v 23.1926 z"
|
|
60
|
+
style="font-family:'Lexend Deca';-inkscape-font-specification:'Lexend Deca';fill:#2bc78e;fill-opacity:1"
|
|
61
|
+
id="path16863" />
|
|
62
|
+
<path
|
|
63
|
+
d="m 1076.5528,346.56709 q -17.8583,0 -32.0058,-8.11741 -13.9156,-8.34933 -22.033,-22.49682 -8.1174,-14.37941 -8.1174,-32.70156 0,-18.32216 8.1174,-32.46964 8.1174,-14.37941 22.033,-22.49682 14.1475,-8.34934 32.0058,-8.34934 17.6263,0 31.5419,8.34934 14.1475,8.11741 22.2649,22.49682 8.1174,14.14748 8.1174,32.46964 0,18.32215 -8.1174,32.70156 -8.1174,14.14749 -22.2649,22.49682 -13.9156,8.11741 -31.5419,8.11741 z m 0,-21.80104 q 10.9005,0 19.4818,-5.3343 8.5812,-5.56622 13.4517,-14.84326 4.8704,-9.50897 4.6385,-21.33719 0.2319,-12.06016 -4.6385,-21.33719 -4.8705,-9.50897 -13.4517,-14.84327 -8.5813,-5.3343 -19.4818,-5.3343 -10.9005,0 -19.7137,5.56623 -8.5813,5.3343 -13.4517,14.84326 -4.8705,9.27704 -4.6386,21.10527 -0.2319,11.82822 4.6386,21.33719 4.8704,9.27704 13.4517,14.84326 8.8132,5.3343 19.7137,5.3343 z"
|
|
64
|
+
style="font-family:'Lexend Deca';-inkscape-font-specification:'Lexend Deca';fill:#2bc78e;fill-opacity:1"
|
|
65
|
+
id="path16865" />
|
|
66
|
+
<path
|
|
67
|
+
d="M 1168.3954,344.24783 V 222.48669 h 23.8884 v 121.76114 z m 11.5963,-148.66456 q -7.6536,0 -11.8282,-3.94274 -4.1747,-3.94274 -4.1747,-11.13245 0,-6.72585 4.1747,-10.90052 4.4065,-4.17467 11.8282,-4.17467 7.6535,0 11.8282,3.94274 4.1747,3.94275 4.1747,11.13245 0,6.72585 -4.4066,10.90052 -4.1747,4.17467 -11.5963,4.17467 z"
|
|
68
|
+
style="font-family:'Lexend Deca';-inkscape-font-specification:'Lexend Deca';fill:#2bc78e;fill-opacity:1"
|
|
69
|
+
id="path16867" />
|
|
70
|
+
<path
|
|
71
|
+
d="M 1228.928,344.24783 V 222.48669 h 24.1203 v 38.26779 l -2.3192,-9.27704 q 2.5512,-8.81319 8.5812,-16.0029 6.262,-7.1897 14.1475,-11.36437 8.1174,-4.17467 16.6987,-4.17467 3.9427,0 7.4216,0.69578 3.7109,0.69578 5.7982,1.62348 l -6.262,25.97571 q -2.7831,-1.15963 -6.262,-1.85541 -3.247,-0.9277 -6.4939,-0.9277 -6.262,0 -12.0602,2.55119 -5.5662,2.31926 -9.9728,6.72585 -4.1747,4.17467 -6.7259,9.97282 -2.5512,5.56622 -2.5512,12.29207 v 67.25854 z"
|
|
72
|
+
style="font-family:'Lexend Deca';-inkscape-font-specification:'Lexend Deca';fill:#2bc78e;fill-opacity:1"
|
|
73
|
+
id="path16869" />
|
|
74
|
+
<path
|
|
75
|
+
d="m 1374.1134,346.56709 q -18.786,0 -33.3973,-7.88548 -14.3794,-8.11741 -22.7288,-22.03297 -8.1174,-13.91556 -8.1174,-32.00579 0,-14.37941 4.6386,-26.20763 4.6385,-11.82823 12.7559,-20.40949 8.3493,-8.81319 19.7137,-13.45171 11.5963,-4.87045 25.048,-4.87045 11.8282,0 22.033,4.63852 10.2047,4.4066 17.6263,12.29208 7.6536,7.88549 11.5963,18.78601 4.1747,10.66859 3.9428,23.42452 l -0.2319,10.20475 h -99.4963 l -5.3343,-19.01794 h 84.1891 l -3.4788,3.94275 v -5.56623 q -0.6958,-7.65355 -5.1024,-13.68363 -4.4066,-6.03008 -11.1325,-9.50897 -6.7258,-3.47889 -14.6113,-3.47889 -12.524,0 -21.1053,4.87045 -8.5812,4.63852 -12.9878,13.91556 -4.4066,9.04511 -4.4066,22.49682 0,12.75593 5.3343,22.2649 5.3343,9.27704 15.0752,14.37941 9.7409,5.10237 22.4968,5.10237 9.0451,0 16.6987,-3.01504 7.8855,-3.01504 16.9306,-10.90052 l 12.0601,16.9306 q -5.5662,5.56622 -13.6836,9.74089 -7.8855,4.17467 -16.9306,6.72585 -8.8132,2.31926 -17.3945,2.31926 z"
|
|
76
|
+
style="font-family:'Lexend Deca';-inkscape-font-specification:'Lexend Deca';fill:#2bc78e;fill-opacity:1"
|
|
77
|
+
id="path16871" />
|
|
78
|
+
</g>
|
|
79
|
+
</g>
|
|
80
|
+
<g
|
|
81
|
+
id="layer2"
|
|
82
|
+
style="display:none">
|
|
83
|
+
<path
|
|
84
|
+
id="path1657"
|
|
85
|
+
style="fill:#b4fae2;fill-opacity:1;stroke:#b4fae2;stroke-width:8;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
86
|
+
d="m 296,103.98242 -135.53125,177.9668 h 88.70117 z M 262.83008,230.05078 216,408.01758 351.53125,230.05078 Z"
|
|
87
|
+
transform="rotate(-4.156553,256,256.00691)" />
|
|
88
|
+
</g>
|
|
89
|
+
</svg>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
3
|
+
|
|
4
|
+
<svg
|
|
5
|
+
width="512"
|
|
6
|
+
height="512"
|
|
7
|
+
viewBox="0 0 512 512"
|
|
8
|
+
version="1.1"
|
|
9
|
+
id="svg5"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
|
12
|
+
<defs
|
|
13
|
+
id="defs2" />
|
|
14
|
+
<g
|
|
15
|
+
id="layer1">
|
|
16
|
+
<rect
|
|
17
|
+
style="opacity:0.5;fill:#34d399;fill-opacity:1;stroke-width:1.00375"
|
|
18
|
+
id="rect1372"
|
|
19
|
+
width="314.30923"
|
|
20
|
+
height="406.60901"
|
|
21
|
+
x="-26.565063"
|
|
22
|
+
y="134.75079"
|
|
23
|
+
transform="rotate(-23.821262)"
|
|
24
|
+
ry="8" />
|
|
25
|
+
<rect
|
|
26
|
+
style="fill:#34d399;fill-opacity:1;stroke-width:1.00375"
|
|
27
|
+
id="rect850"
|
|
28
|
+
width="314.30923"
|
|
29
|
+
height="406.60901"
|
|
30
|
+
x="77.571838"
|
|
31
|
+
y="72.808708"
|
|
32
|
+
ry="8"
|
|
33
|
+
transform="rotate(-4.5744534)" />
|
|
34
|
+
</g>
|
|
35
|
+
<g
|
|
36
|
+
id="layer3">
|
|
37
|
+
<path
|
|
38
|
+
id="path1657-3"
|
|
39
|
+
style="display:inline;fill:#b4fae2;fill-opacity:1;stroke:#b4fae2;stroke-width:8.34923;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
40
|
+
d="M 359.38947,355.95134 320.72935,176.52942 238.34613,238.94118 Z M 273.64124,273.06608 152.59788,156.05591 191.25804,335.47786 Z" />
|
|
41
|
+
</g>
|
|
42
|
+
<g
|
|
43
|
+
id="layer2"
|
|
44
|
+
style="display:none">
|
|
45
|
+
<path
|
|
46
|
+
id="path1657"
|
|
47
|
+
style="fill:#b4fae2;fill-opacity:1;stroke:#b4fae2;stroke-width:8;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
48
|
+
d="m 296,103.98242 -135.53125,177.9668 h 88.70117 z M 262.83008,230.05078 216,408.01758 351.53125,230.05078 Z"
|
|
49
|
+
transform="rotate(-4.156553,256,256.00691)" />
|
|
50
|
+
</g>
|
|
51
|
+
</svg>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import PovesteLogo from '../assets/histoire.svg'
|
|
4
|
+
import { useStoryStore } from '../stores/story'
|
|
5
|
+
import { customLogos, histoireConfig } from '../util/config'
|
|
6
|
+
import HomeCounter from './app/HomeCounter.vue'
|
|
7
|
+
|
|
8
|
+
const logoUrl = computed(() => histoireConfig.theme?.logo?.square ? customLogos.square : PovesteLogo)
|
|
9
|
+
const storyStore = useStoryStore()
|
|
10
|
+
|
|
11
|
+
const stats = computed(() => {
|
|
12
|
+
let storyCount = 0
|
|
13
|
+
let variantCount = 0
|
|
14
|
+
let docsCount = 0;
|
|
15
|
+
|
|
16
|
+
(storyStore.stories || []).forEach((story) => {
|
|
17
|
+
if (story.docsOnly) {
|
|
18
|
+
docsCount++
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
storyCount++
|
|
22
|
+
if (story.variants) {
|
|
23
|
+
variantCount += story.variants.length
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
storyCount,
|
|
30
|
+
variantCount,
|
|
31
|
+
docsCount,
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<template>
|
|
37
|
+
<div class="histoire-home-view htw-flex md:htw-flex-col htw-gap-12 htw-items-center htw-justify-center htw-h-full">
|
|
38
|
+
<img
|
|
39
|
+
:src="logoUrl"
|
|
40
|
+
alt="Logo"
|
|
41
|
+
class="htw-w-64 htw-h-64 htw-opacity-25 htw-mb-8 htw-hidden md:htw-block"
|
|
42
|
+
>
|
|
43
|
+
<div class="htw-flex !md:htw-flex-col htw-flex-wrap htw-justify-evenly htw-gap-2 htw-px-4 htw-py-2 htw-bg-gray-100 dark:htw-bg-gray-750 htw-rounded htw-border htw-border-gray-500/30">
|
|
44
|
+
<HomeCounter
|
|
45
|
+
title="Stories"
|
|
46
|
+
icon="carbon:cube"
|
|
47
|
+
:count="stats.storyCount"
|
|
48
|
+
/>
|
|
49
|
+
<HomeCounter
|
|
50
|
+
title="Variants"
|
|
51
|
+
icon="carbon:cube-view"
|
|
52
|
+
:count="stats.variantCount"
|
|
53
|
+
/>
|
|
54
|
+
<HomeCounter
|
|
55
|
+
title="Documents"
|
|
56
|
+
icon="carbon:document-blank"
|
|
57
|
+
:count="stats.docsCount"
|
|
58
|
+
/>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</template>
|