@histoire/app 0.17.15 → 0.17.17
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/bundled/App.vue2.js +1 -1
- package/dist/bundled/components/app/AppHeader.vue2.js +1 -1
- package/dist/bundled/components/app/AppLogo.vue2.js +1 -1
- package/dist/bundled/components/app/Breadcrumb.vue.js +1 -1
- package/dist/bundled/components/app/Breadcrumb.vue2.js +3 -3
- package/dist/bundled/components/app/HomeCounter.vue2.js +2 -7
- package/dist/bundled/components/base/BaseCheckbox.vue2.js +1 -2
- package/dist/bundled/components/base/BaseIcon.vue.js +1 -1
- package/dist/bundled/components/base/BaseIcon.vue2.js +1 -1
- package/dist/bundled/components/base/BaseOverflowMenu.vue2.js +4 -4
- package/dist/bundled/components/base/BaseSplitPane.vue.js +1 -1
- package/dist/bundled/components/base/BaseSplitPane.vue2.js +2 -3
- package/dist/bundled/components/panel/PaneTabs.vue2.js +1 -1
- package/dist/bundled/components/panel/StoryDocs.vue2.js +4 -4
- package/dist/bundled/components/panel/StorySourceCode.vue.js +1 -1
- package/dist/bundled/components/panel/StorySourceCode.vue2.js +1 -1
- package/dist/bundled/components/search/SearchItem.vue.js +1 -1
- package/dist/bundled/components/search/SearchItem.vue2.js +2 -2
- package/dist/bundled/components/search/SearchPane.vue2.js +2 -2
- package/dist/bundled/components/story/StoryResponsivePreview.vue.js +1 -1
- package/dist/bundled/components/story/StoryResponsivePreview.vue2.js +8 -7
- package/dist/bundled/components/story/StoryVariantGrid.vue2.js +4 -4
- package/dist/bundled/components/story/StoryVariantGridItem.vue.js +1 -1
- package/dist/bundled/components/story/StoryVariantGridItem.vue2.js +6 -7
- package/dist/bundled/components/story/StoryVariantListItem.vue.js +1 -1
- package/dist/bundled/components/story/StoryVariantListItem.vue2.js +3 -3
- package/dist/bundled/components/story/StoryVariantSingle.vue.js +1 -1
- package/dist/bundled/components/story/StoryVariantSingle.vue2.js +5 -5
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue2.js +1 -1
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue2.js +1 -1
- package/dist/bundled/components/story/StoryView.vue2.js +1 -1
- package/dist/bundled/components/story/StoryViewer.vue.js +1 -1
- package/dist/bundled/components/story/StoryViewer.vue2.js +3 -3
- package/dist/bundled/components/tree/StoryGroup.vue2.js +2 -2
- package/dist/bundled/components/tree/StoryListFolder.vue.js +1 -1
- package/dist/bundled/components/tree/StoryListFolder.vue2.js +4 -4
- package/dist/bundled/components/tree/StoryListItem.vue.js +1 -1
- package/dist/bundled/components/tree/StoryListItem.vue2.js +5 -5
- package/dist/bundled/sandbox.js +1 -1
- package/dist/bundled/style.css +36 -36
- package/dist/bundled/util/commands.js +1 -1
- package/dist/bundled/util/state.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +7 -7
- package/scripts/copy.mjs +1 -1
- package/scripts/watchAndCopy.mjs +4 -4
- package/src/app/App.vue +6 -6
- package/src/app/api.ts +1 -1
- package/src/app/components/HomeView.vue +4 -3
- 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 +4 -4
- package/src/app/components/app/HomeCounter.vue +1 -10
- package/src/app/components/app/MobileOverlay.vue +1 -1
- package/src/app/components/base/BaseCheckbox.vue +2 -3
- package/src/app/components/base/BaseIcon.vue +2 -2
- package/src/app/components/base/BaseKeyboardShortcut.vue +1 -1
- package/src/app/components/base/BaseListItem.vue +2 -2
- package/src/app/components/base/BaseListItemLink.vue +3 -3
- package/src/app/components/base/BaseOverflowMenu.vue +4 -4
- package/src/app/components/base/BaseSelect.vue +5 -4
- package/src/app/components/base/BaseSplitPane.vue +19 -15
- package/src/app/components/command/CommandPrompts.vue +6 -5
- package/src/app/components/command/CommandPromptsModal.vue +2 -1
- package/src/app/components/command/PromptSelect.vue +6 -4
- package/src/app/components/command/PromptText.vue +4 -3
- package/src/app/components/panel/ControlsComponentPropItem.vue +1 -1
- package/src/app/components/panel/ControlsComponentProps.vue +1 -1
- package/src/app/components/panel/ControlsComponentState.vue +1 -1
- package/src/app/components/panel/PaneTabs.vue +1 -1
- package/src/app/components/panel/StatePresets.vue +13 -10
- package/src/app/components/panel/StoryControls.vue +2 -2
- package/src/app/components/panel/StoryDocs.vue +28 -24
- package/src/app/components/panel/StoryEvent.vue +2 -2
- package/src/app/components/panel/StoryEvents.vue +2 -2
- package/src/app/components/panel/StorySourceCode.vue +10 -6
- package/src/app/components/search/SearchItem.vue +4 -3
- package/src/app/components/search/SearchItemContent.vue +3 -3
- package/src/app/components/search/SearchModal.vue +2 -1
- package/src/app/components/search/SearchPane.vue +18 -18
- 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/story/GenericMountStory.vue +1 -1
- package/src/app/components/story/GenericRenderStory.vue +3 -2
- package/src/app/components/story/StoryResponsivePreview.vue +16 -14
- package/src/app/components/story/StoryVariantGrid.vue +9 -8
- package/src/app/components/story/StoryVariantGridItem.vue +7 -7
- package/src/app/components/story/StoryVariantListItem.vue +3 -2
- package/src/app/components/story/StoryVariantSingle.vue +3 -3
- package/src/app/components/story/StoryVariantSinglePreviewNative.vue +2 -2
- package/src/app/components/story/StoryVariantSinglePreviewRemote.vue +10 -10
- package/src/app/components/story/StoryView.vue +4 -4
- package/src/app/components/story/StoryViewer.vue +2 -3
- package/src/app/components/toolbar/ToolbarNewTab.vue +1 -1
- package/src/app/components/tree/StoryGroup.vue +4 -4
- package/src/app/components/tree/StoryList.vue +1 -1
- package/src/app/components/tree/StoryListFolder.vue +4 -4
- package/src/app/components/tree/StoryListItem.vue +3 -3
- package/src/app/index.ts +2 -3
- package/src/app/plugin.ts +4 -3
- package/src/app/router.ts +2 -2
- package/src/app/sandbox.ts +12 -11
- package/src/app/stores/command.ts +4 -3
- package/src/app/stores/events.ts +4 -4
- package/src/app/stores/folder.ts +9 -7
- package/src/app/stores/story.ts +4 -4
- package/src/app/types.ts +2 -2
- package/src/app/util/commands.ts +5 -4
- package/src/app/util/dark.ts +2 -2
- package/src/app/util/docs.ts +6 -4
- package/src/app/util/events.ts +4 -3
- package/src/app/util/keyboard.ts +9 -8
- package/src/app/util/mapping.ts +8 -5
- package/src/app/util/open-in-editor.ts +1 -1
- package/src/app/util/preview-settings.ts +3 -3
- package/src/app/util/sandbox.ts +2 -3
- package/src/app/util/scroll.ts +5 -4
- package/src/app/util/select.ts +5 -4
- package/src/app/util/state.ts +6 -5
- package/src/app/util/tooltip.ts +2 -2
- package/src/app/util/variant.ts +3 -2
- package/src/shim.d.ts +0 -6
- package/src/virtual.d.ts +1 -0
- package/tailwind.config.cjs +19 -20
- package/tsconfig.json +26 -26
- package/vite.config.ts +7 -6
package/src/virtual.d.ts
CHANGED
package/tailwind.config.cjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
const inheritedConfig = require('../../tailwind.config.cjs')
|
|
3
1
|
const defaultColors = require('tailwindcss/colors')
|
|
4
2
|
const path = require('pathe')
|
|
3
|
+
const inheritedConfig = require('../../tailwind.config.cjs')
|
|
5
4
|
|
|
6
5
|
// Colors
|
|
7
6
|
|
|
8
|
-
function withOpacityValue
|
|
7
|
+
function withOpacityValue(variable) {
|
|
9
8
|
return ({ opacityValue }) => {
|
|
10
9
|
if (opacityValue === undefined) {
|
|
11
10
|
return `rgb(var(${variable}))`
|
|
@@ -73,12 +72,12 @@ module.exports.theme.colors = colors
|
|
|
73
72
|
|
|
74
73
|
module.exports.plugins.push(require('@tailwindcss/typography'))
|
|
75
74
|
// prose-a:htw-text-primary-500 prose-headings:htw-mb-2 prose-headings:htw-mt-4 first:prose-headings:htw-mt-0 prose-blockquote:htw-ml-0
|
|
76
|
-
module.exports.theme.extend.typography =
|
|
75
|
+
module.exports.theme.extend.typography = theme => ({
|
|
77
76
|
DEFAULT: {
|
|
78
77
|
css: {
|
|
79
|
-
a: {
|
|
80
|
-
color: theme('colors.primary-500'),
|
|
81
|
-
textDecoration: 'none',
|
|
78
|
+
'a': {
|
|
79
|
+
'color': theme('colors.primary-500'),
|
|
80
|
+
'textDecoration': 'none',
|
|
82
81
|
|
|
83
82
|
'&:hover': {
|
|
84
83
|
textDecoration: 'underline',
|
|
@@ -86,7 +85,7 @@ module.exports.theme.extend.typography = (theme) => ({
|
|
|
86
85
|
},
|
|
87
86
|
|
|
88
87
|
'h1, h2, h3, h4, th': {
|
|
89
|
-
marginBottom: '0.75rem',
|
|
88
|
+
'marginBottom': '0.75rem',
|
|
90
89
|
|
|
91
90
|
'&:not(:first-child)': {
|
|
92
91
|
marginTop: '1.25rem',
|
|
@@ -96,11 +95,11 @@ module.exports.theme.extend.typography = (theme) => ({
|
|
|
96
95
|
'--tw-prose-invert-quote-borders': theme('colors.gray-800'),
|
|
97
96
|
'--tw-prose-invert-hr': theme('colors.gray-800'),
|
|
98
97
|
|
|
99
|
-
blockquote: {
|
|
100
|
-
marginLeft: 0,
|
|
101
|
-
marginRight: 0,
|
|
102
|
-
backgroundColor: theme('colors.gray-100'),
|
|
103
|
-
padding: '.25rem .375rem',
|
|
98
|
+
'blockquote': {
|
|
99
|
+
'marginLeft': 0,
|
|
100
|
+
'marginRight': 0,
|
|
101
|
+
'backgroundColor': theme('colors.gray-100'),
|
|
102
|
+
'padding': '.25rem .375rem',
|
|
104
103
|
|
|
105
104
|
'& p:first-child': {
|
|
106
105
|
marginTop: 0,
|
|
@@ -117,17 +116,17 @@ module.exports.theme.extend.typography = (theme) => ({
|
|
|
117
116
|
|
|
118
117
|
'--tw-prose-invert-bullets': theme('colors.gray-500'),
|
|
119
118
|
|
|
120
|
-
li: {
|
|
119
|
+
'li': {
|
|
121
120
|
marginTop: '0.1rem',
|
|
122
121
|
marginBottom: '0.1rem',
|
|
123
122
|
},
|
|
124
123
|
|
|
125
|
-
code: {
|
|
126
|
-
backgroundColor: theme('colors.gray-500 / 20%'),
|
|
127
|
-
fontWeight: 'normal',
|
|
128
|
-
padding: '0.05rem 0.5rem',
|
|
129
|
-
borderRadius: '0.25rem',
|
|
130
|
-
fontSize: '0.8rem',
|
|
124
|
+
'code': {
|
|
125
|
+
'backgroundColor': theme('colors.gray-500 / 20%'),
|
|
126
|
+
'fontWeight': 'normal',
|
|
127
|
+
'padding': '0.05rem 0.5rem',
|
|
128
|
+
'borderRadius': '0.25rem',
|
|
129
|
+
'fontSize': '0.8rem',
|
|
131
130
|
|
|
132
131
|
'&::before, &::after': {
|
|
133
132
|
display: 'none',
|
package/tsconfig.json
CHANGED
|
@@ -1,35 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"target": "ESNext",
|
|
4
|
-
|
|
5
|
-
"
|
|
6
|
-
"outDir": "dist",
|
|
7
|
-
"rootDir": "src",
|
|
8
|
-
"baseUrl": ".",
|
|
9
|
-
"allowSyntheticDefaultImports": true,
|
|
10
|
-
"esModuleInterop": true,
|
|
11
|
-
"removeComments": false,
|
|
12
|
-
"resolveJsonModule": true,
|
|
13
|
-
"skipLibCheck": true,
|
|
14
|
-
"types": [
|
|
15
|
-
"node"
|
|
16
|
-
],
|
|
4
|
+
// Volar
|
|
5
|
+
"jsx": "preserve",
|
|
17
6
|
"lib": [
|
|
18
7
|
"ESNext",
|
|
19
8
|
"DOM",
|
|
20
|
-
"DOM.Iterable"
|
|
9
|
+
"DOM.Iterable"
|
|
21
10
|
],
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
"noImplicitAny": false,
|
|
27
|
-
"noImplicitThis": true,
|
|
28
|
-
"alwaysStrict": true,
|
|
29
|
-
"strictBindCallApply": true,
|
|
30
|
-
"strictFunctionTypes": true,
|
|
31
|
-
// Volar
|
|
32
|
-
"jsx": "preserve",
|
|
11
|
+
"baseUrl": ".",
|
|
12
|
+
"rootDir": "src",
|
|
13
|
+
"module": "ESNext",
|
|
14
|
+
"moduleResolution": "node",
|
|
33
15
|
// Alias
|
|
34
16
|
"paths": {
|
|
35
17
|
"floating-vue": ["node_modules/@histoire/vendors/floating-vue"],
|
|
@@ -39,7 +21,25 @@
|
|
|
39
21
|
"vue-router": ["node_modules/@histoire/vendors/vue-router"],
|
|
40
22
|
"@vueuse/core": ["node_modules/@histoire/vendors/vue-use"],
|
|
41
23
|
"vue": ["node_modules/@histoire/vendors/vue"]
|
|
42
|
-
}
|
|
24
|
+
},
|
|
25
|
+
"resolveJsonModule": true,
|
|
26
|
+
"types": [
|
|
27
|
+
"node"
|
|
28
|
+
],
|
|
29
|
+
"strictBindCallApply": true,
|
|
30
|
+
"strictFunctionTypes": true,
|
|
31
|
+
"alwaysStrict": true,
|
|
32
|
+
// Strict
|
|
33
|
+
"noImplicitAny": false,
|
|
34
|
+
"noImplicitThis": true,
|
|
35
|
+
"declaration": false,
|
|
36
|
+
"outDir": "dist",
|
|
37
|
+
"removeComments": false,
|
|
38
|
+
"sourceMap": false,
|
|
39
|
+
"allowSyntheticDefaultImports": true,
|
|
40
|
+
"esModuleInterop": true,
|
|
41
|
+
"skipLibCheck": true,
|
|
42
|
+
"preserveWatchOutput": true
|
|
43
43
|
},
|
|
44
44
|
"include": [
|
|
45
45
|
"src"
|
package/vite.config.ts
CHANGED
|
@@ -9,14 +9,14 @@ export default defineConfig({
|
|
|
9
9
|
{
|
|
10
10
|
name: 'histoire:preserve:import.meta',
|
|
11
11
|
enforce: 'pre',
|
|
12
|
-
transform
|
|
12
|
+
transform(code) {
|
|
13
13
|
if (code.includes('import.meta')) {
|
|
14
14
|
return {
|
|
15
15
|
code: code.replace(/import\.meta/g, 'import__meta'),
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
|
-
closeBundle
|
|
19
|
+
closeBundle() {
|
|
20
20
|
try {
|
|
21
21
|
const files = globbySync('./dist/bundled/**/*.js')
|
|
22
22
|
for (const file of files) {
|
|
@@ -25,7 +25,8 @@ export default defineConfig({
|
|
|
25
25
|
fs.writeFileSync(file, content.replace(/import__meta/g, 'import.meta'), 'utf-8')
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
}
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
29
30
|
console.error(e)
|
|
30
31
|
}
|
|
31
32
|
},
|
|
@@ -36,11 +37,11 @@ export default defineConfig({
|
|
|
36
37
|
alias: {
|
|
37
38
|
'floating-vue': '@histoire/vendors/floating-vue',
|
|
38
39
|
'@iconify/vue': '@histoire/vendors/iconify',
|
|
39
|
-
pinia: '@histoire/vendors/pinia',
|
|
40
|
+
'pinia': '@histoire/vendors/pinia',
|
|
40
41
|
'scroll-into-view-if-needed': '@histoire/vendors/scroll',
|
|
41
42
|
'vue-router': '@histoire/vendors/vue-router',
|
|
42
43
|
'@vueuse/core': '@histoire/vendors/vue-use',
|
|
43
|
-
vue: '@histoire/vendors/vue',
|
|
44
|
+
'vue': '@histoire/vendors/vue',
|
|
44
45
|
},
|
|
45
46
|
},
|
|
46
47
|
|
|
@@ -55,7 +56,7 @@ export default defineConfig({
|
|
|
55
56
|
external: [
|
|
56
57
|
/\$histoire/,
|
|
57
58
|
/@histoire/,
|
|
58
|
-
// eslint-disable-next-line
|
|
59
|
+
// eslint-disable-next-line ts/no-var-requires, ts/no-require-imports
|
|
59
60
|
...Object.keys(require('./package.json').dependencies),
|
|
60
61
|
],
|
|
61
62
|
|