histoire 0.16.4 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node/builtin-plugins/tailwind-tokens.js +2 -2
- package/dist/node/builtin-plugins/vanilla-support/MountStory.d.ts +1 -1
- package/dist/node/builtin-plugins/vanilla-support/RenderStory.d.ts +1 -1
- package/dist/node/virtual/resolved-generated-global-setup.js +1 -1
- package/package.json +21 -22
- package/src/node/builtin-plugins/tailwind-tokens.ts +2 -2
- package/src/node/tree.spec.ts +1 -1
- package/src/node/virtual/resolved-generated-global-setup.ts +1 -1
- package/tsconfig.json +1 -2
|
@@ -228,8 +228,8 @@ export default {
|
|
|
228
228
|
}, ({ token }) => h('div', {
|
|
229
229
|
class: '__hst-truncate',
|
|
230
230
|
style: {
|
|
231
|
-
fontSize: token.value[0],
|
|
232
|
-
...token.value[1]
|
|
231
|
+
fontSize: Array.isArray(token.value) ? token.value[0] : token.value,
|
|
232
|
+
...(Array.isArray(token.value) && typeof token.value[1] === "object" ? token.value[1] : { lineHeight: token.value[1] })
|
|
233
233
|
},
|
|
234
234
|
}, sampleText.value))),
|
|
235
235
|
onMountControls: (api) => mountApp(api, () => [
|
|
@@ -8,7 +8,7 @@ export const resolvedGeneratedGlobalSetup = (ctx) => {
|
|
|
8
8
|
// List
|
|
9
9
|
`const setupList = [${ctx.config.setupCode.map((c, index) => `setup_${index}`).join(', ')}]`,
|
|
10
10
|
// Setups
|
|
11
|
-
...ctx.supportPlugins.map(p => p.setupFn).map(fnName => `export async function ${fnName} (payload) {
|
|
11
|
+
...ctx.supportPlugins.map(p => p.setupFn).flat().map(fnName => `export async function ${fnName} (payload) {
|
|
12
12
|
for (const setup of setupList) {
|
|
13
13
|
if (setup?.${fnName}) {
|
|
14
14
|
await setup.${fnName}(payload)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "histoire",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "A fast story book powered by Vite",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -44,50 +44,49 @@
|
|
|
44
44
|
"change-case": "^4.1.2",
|
|
45
45
|
"chokidar": "^3.5.3",
|
|
46
46
|
"connect": "^3.7.0",
|
|
47
|
-
"defu": "^6.
|
|
47
|
+
"defu": "^6.1.2",
|
|
48
48
|
"diacritics": "^1.3.0",
|
|
49
49
|
"flexsearch": "0.7.21",
|
|
50
|
-
"fs-extra": "^10.0
|
|
51
|
-
"globby": "^13.
|
|
50
|
+
"fs-extra": "^10.1.0",
|
|
51
|
+
"globby": "^13.2.2",
|
|
52
52
|
"gray-matter": "^4.0.3",
|
|
53
|
-
"jiti": "^1.
|
|
53
|
+
"jiti": "^1.19.1",
|
|
54
54
|
"jsdom": "^20.0.3",
|
|
55
55
|
"markdown-it": "^12.3.2",
|
|
56
|
-
"markdown-it-anchor": "^8.6.
|
|
57
|
-
"markdown-it-attrs": "^4.1.
|
|
58
|
-
"markdown-it-emoji": "^2.0.
|
|
56
|
+
"markdown-it-anchor": "^8.6.7",
|
|
57
|
+
"markdown-it-attrs": "^4.1.6",
|
|
58
|
+
"markdown-it-emoji": "^2.0.2",
|
|
59
59
|
"micromatch": "^4.0.5",
|
|
60
|
-
"mrmime": "^1.0.
|
|
60
|
+
"mrmime": "^1.0.1",
|
|
61
61
|
"pathe": "^0.2.0",
|
|
62
62
|
"picocolors": "^1.0.0",
|
|
63
63
|
"sade": "^1.8.1",
|
|
64
64
|
"shiki-es": "^0.2.0",
|
|
65
|
-
"sirv": "^2.0.
|
|
65
|
+
"sirv": "^2.0.3",
|
|
66
66
|
"vite-node": "0.28.4",
|
|
67
|
-
"@histoire/app": "^0.
|
|
68
|
-
"@histoire/controls": "^0.
|
|
69
|
-
"@histoire/
|
|
70
|
-
"@histoire/
|
|
67
|
+
"@histoire/app": "^0.17.0",
|
|
68
|
+
"@histoire/controls": "^0.17.0",
|
|
69
|
+
"@histoire/shared": "^0.17.0",
|
|
70
|
+
"@histoire/vendors": "^0.17.0"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"vite": "^2.9.0 || ^3.0.0 || ^4.0.0"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@peeky/server": "^0.14.0",
|
|
77
|
-
"@peeky/test": "^0.14.1",
|
|
78
76
|
"@types/fs-extra": "^9.0.13",
|
|
79
77
|
"@types/markdown-it": "^12.2.3",
|
|
80
78
|
"@types/micromatch": "^4.0.2",
|
|
81
|
-
"@types/node": "^17.0.
|
|
82
|
-
"esbuild": "^0.18.
|
|
83
|
-
"rollup": "^3.
|
|
79
|
+
"@types/node": "^17.0.45",
|
|
80
|
+
"esbuild": "^0.18.20",
|
|
81
|
+
"rollup": "^3.28.0",
|
|
84
82
|
"typescript": "^4.9.5",
|
|
85
|
-
"vite": "^4.4.
|
|
83
|
+
"vite": "^4.4.9",
|
|
84
|
+
"vitest": "^0.34.1"
|
|
86
85
|
},
|
|
87
86
|
"scripts": {
|
|
88
87
|
"build": "rimraf dist && tsc -d",
|
|
89
88
|
"watch": "tsc -d -w --sourceMap",
|
|
90
|
-
"test
|
|
91
|
-
"test": "
|
|
89
|
+
"test": "vitest run",
|
|
90
|
+
"test:dev": "vitest"
|
|
92
91
|
}
|
|
93
92
|
}
|
|
@@ -239,8 +239,8 @@ export default {
|
|
|
239
239
|
}, ({ token }) => h('div', {
|
|
240
240
|
class: '__hst-truncate',
|
|
241
241
|
style: {
|
|
242
|
-
fontSize: token.value[0],
|
|
243
|
-
...token.value[1]
|
|
242
|
+
fontSize: Array.isArray(token.value) ? token.value[0] : token.value,
|
|
243
|
+
...(Array.isArray(token.value) && typeof token.value[1] === "object" ? token.value[1] : { lineHeight: token.value[1] })
|
|
244
244
|
},
|
|
245
245
|
}, sampleText.value))),
|
|
246
246
|
onMountControls: (api) => mountApp(api, () => [
|
package/src/node/tree.spec.ts
CHANGED
|
@@ -10,7 +10,7 @@ export const resolvedGeneratedGlobalSetup = (ctx: Context) => {
|
|
|
10
10
|
// List
|
|
11
11
|
`const setupList = [${ctx.config.setupCode.map((c, index) => `setup_${index}`).join(', ')}]`,
|
|
12
12
|
// Setups
|
|
13
|
-
...ctx.supportPlugins.map(p => p.setupFn).map(fnName => `export async function ${fnName} (payload) {
|
|
13
|
+
...ctx.supportPlugins.map(p => p.setupFn).flat().map(fnName => `export async function ${fnName} (payload) {
|
|
14
14
|
for (const setup of setupList) {
|
|
15
15
|
if (setup?.${fnName}) {
|
|
16
16
|
await setup.${fnName}(payload)
|