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.
@@ -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, () => [
@@ -10,5 +10,5 @@ declare const _default: import("@histoire/vendors/vue").DefineComponent<{
10
10
  type: _PropType<Story>;
11
11
  required: true;
12
12
  };
13
- }>>, {}>;
13
+ }>>, {}, {}>;
14
14
  export default _default;
@@ -34,5 +34,5 @@ declare const _default: import("@histoire/vendors/vue").DefineComponent<{
34
34
  onReady?: () => any;
35
35
  }, {
36
36
  slotName: string;
37
- }>;
37
+ }, {}>;
38
38
  export default _default;
@@ -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.16.4",
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.0.0",
47
+ "defu": "^6.1.2",
48
48
  "diacritics": "^1.3.0",
49
49
  "flexsearch": "0.7.21",
50
- "fs-extra": "^10.0.1",
51
- "globby": "^13.1.1",
50
+ "fs-extra": "^10.1.0",
51
+ "globby": "^13.2.2",
52
52
  "gray-matter": "^4.0.3",
53
- "jiti": "^1.18.2",
53
+ "jiti": "^1.19.1",
54
54
  "jsdom": "^20.0.3",
55
55
  "markdown-it": "^12.3.2",
56
- "markdown-it-anchor": "^8.6.2",
57
- "markdown-it-attrs": "^4.1.3",
58
- "markdown-it-emoji": "^2.0.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.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.2",
65
+ "sirv": "^2.0.3",
66
66
  "vite-node": "0.28.4",
67
- "@histoire/app": "^0.16.4",
68
- "@histoire/controls": "^0.16.4",
69
- "@histoire/vendors": "^0.16.0",
70
- "@histoire/shared": "^0.16.4"
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.32",
82
- "esbuild": "^0.18.19",
83
- "rollup": "^3.5.1",
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.8"
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:open": "peeky open",
91
- "test": "peeky run"
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, () => [
@@ -1,4 +1,4 @@
1
- import { describe, test, expect } from '@peeky/test'
1
+ import { describe, test, expect } from 'vitest'
2
2
  import { makeTree } from './tree'
3
3
  import { getDefaultConfig } from './config'
4
4
  import type { StoryFile } from './types'
@@ -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)
package/tsconfig.json CHANGED
@@ -12,8 +12,7 @@
12
12
  "resolveJsonModule": true,
13
13
  "skipLibCheck": true,
14
14
  "types": [
15
- "node",
16
- "@peeky/test"
15
+ "node"
17
16
  ],
18
17
  "lib": [
19
18
  "ESNext",