@stencil/storybook-plugin 0.5.9 → 0.6.1

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/preset.cjs CHANGED
@@ -11,7 +11,7 @@ const getAbsolutePath = (input) => (0, path.dirname)(require$1.resolve((0, path.
11
11
  const __dirname$1 = (0, path.dirname)((0, url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
12
12
  const renderer = (0, path.join)(__dirname$1, "entry-preview.js");
13
13
  const core = {
14
- builder: getAbsolutePath("@storybook/builder-vite"),
14
+ builder: (0, path.join)(getAbsolutePath("@storybook/builder-vite"), "dist", "index.js"),
15
15
  renderer
16
16
  };
17
17
  const viteFinal = async (defaultConfig, { configType }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"preset.cjs","names":["require","input: I","__dirname","core: StorybookConfig['core']","viteFinal: StorybookConfig['viteFinal']","previewAnnotations: StorybookConfig['previewAnnotations']","result: string[]"],"sources":["../src/preset.ts"],"sourcesContent":["/**\n * we can't prefix the Node.js imports with `node:` because it will break\n * within Storybook due to its Vite setup.\n */\nimport { createRequire } from 'module';\nimport { dirname, join } from 'path';\nimport stencil from 'unplugin-stencil/vite';\nimport { fileURLToPath } from 'url';\nimport { mergeConfig } from 'vite';\nimport { StorybookConfig } from './types';\n\nconst require = createRequire(import.meta.url);\nconst getAbsolutePath = <I extends string>(input: I): I => dirname(require.resolve(join(input, 'package.json'))) as any;\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nconst renderer = join(__dirname, 'entry-preview.js');\n\nexport const core: StorybookConfig['core'] = {\n builder: getAbsolutePath('@storybook/builder-vite'),\n renderer,\n};\n\nexport const viteFinal: StorybookConfig['viteFinal'] = async (defaultConfig, { configType }) => {\n const config = mergeConfig(defaultConfig, {\n build: {\n target: 'es2020',\n },\n plugins: [\n stencil({\n rootPath: defaultConfig.root,\n }),\n ],\n });\n if (configType === 'DEVELOPMENT') {\n return mergeConfig(config, {\n build: {\n rollupOptions: {\n external: ['@stencil/core'],\n },\n },\n });\n }\n\n return config;\n};\n\nexport const previewAnnotations: StorybookConfig['previewAnnotations'] = async (input = [], options) => {\n const docsEnabled = Object.keys(await options.presets.apply('docs', {}, options)).length > 0;\n const result: string[] = [];\n\n return result\n .concat(input)\n .concat([renderer, join(__dirname, 'entry-preview-argtypes.js')])\n .concat(docsEnabled ? [join(__dirname, 'entry-preview-docs.js')] : []);\n};\n"],"mappings":";;;;;;;;AAWA,MAAMA,YAAU,0EAA8B;AAC9C,MAAM,kBAAkB,CAAmBC,UAAgB,kBAAQ,UAAQ,QAAQ,eAAK,OAAO,eAAe,CAAC,CAAC;AAEhH,MAAMC,cAAY,kBAAQ,qEAA8B,CAAC;AAEzD,MAAM,WAAW,eAAKA,aAAW,mBAAmB;AAEpD,MAAaC,OAAgC;CAC3C,SAAS,gBAAgB,0BAA0B;CACnD;AACD;AAED,MAAaC,YAA0C,OAAO,eAAe,EAAE,YAAY,KAAK;CAC9F,MAAM,SAAS,sBAAY,eAAe;EACxC,OAAO,EACL,QAAQ,SACT;EACD,SAAS,CACP,mCAAQ,EACN,UAAU,cAAc,KACzB,EAAC,AACH;CACF,EAAC;AACF,KAAI,eAAe,cACjB,QAAO,sBAAY,QAAQ,EACzB,OAAO,EACL,eAAe,EACb,UAAU,CAAC,eAAgB,EAC5B,EACF,EACF,EAAC;AAGJ,QAAO;AACR;AAED,MAAaC,qBAA4D,OAAO,QAAQ,CAAE,GAAE,YAAY;CACtG,MAAM,cAAc,OAAO,KAAK,MAAM,QAAQ,QAAQ,MAAM,QAAQ,CAAE,GAAE,QAAQ,CAAC,CAAC,SAAS;CAC3F,MAAMC,SAAmB,CAAE;AAE3B,QAAO,OACJ,OAAO,MAAM,CACb,OAAO,CAAC,UAAU,eAAKJ,aAAW,4BAA4B,AAAC,EAAC,CAChE,OAAO,cAAc,CAAC,eAAKA,aAAW,wBAAwB,AAAC,IAAG,CAAE,EAAC;AACzE"}
1
+ {"version":3,"file":"preset.cjs","names":["require","input: I","__dirname","core: StorybookConfig['core']","viteFinal: StorybookConfig['viteFinal']","previewAnnotations: StorybookConfig['previewAnnotations']","result: string[]"],"sources":["../src/preset.ts"],"sourcesContent":["/**\n * we can't prefix the Node.js imports with `node:` because it will break\n * within Storybook due to its Vite setup.\n */\nimport { createRequire } from 'module';\nimport { dirname, join } from 'path';\nimport stencil from 'unplugin-stencil/vite';\nimport { fileURLToPath } from 'url';\nimport { mergeConfig } from 'vite';\nimport { StorybookConfig } from './types';\n\nconst require = createRequire(import.meta.url);\nconst getAbsolutePath = <I extends string>(input: I): I => dirname(require.resolve(join(input, 'package.json'))) as any;\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nconst renderer = join(__dirname, 'entry-preview.js');\n\nexport const core: StorybookConfig['core'] = {\n builder: join(getAbsolutePath('@storybook/builder-vite'), 'dist', 'index.js'),\n renderer,\n};\n\nexport const viteFinal: StorybookConfig['viteFinal'] = async (defaultConfig, { configType }) => {\n const config = mergeConfig(defaultConfig, {\n build: {\n target: 'es2020',\n },\n plugins: [\n stencil({\n rootPath: defaultConfig.root,\n }),\n ],\n });\n if (configType === 'DEVELOPMENT') {\n return mergeConfig(config, {\n build: {\n rollupOptions: {\n external: ['@stencil/core'],\n },\n },\n });\n }\n\n return config;\n};\n\nexport const previewAnnotations: StorybookConfig['previewAnnotations'] = async (input = [], options) => {\n const docsEnabled = Object.keys(await options.presets.apply('docs', {}, options)).length > 0;\n const result: string[] = [];\n\n return result\n .concat(input)\n .concat([renderer, join(__dirname, 'entry-preview-argtypes.js')])\n .concat(docsEnabled ? [join(__dirname, 'entry-preview-docs.js')] : []);\n};\n"],"mappings":";;;;;;;;AAWA,MAAMA,YAAU,0EAA8B;AAC9C,MAAM,kBAAkB,CAAmBC,UAAgB,kBAAQ,UAAQ,QAAQ,eAAK,OAAO,eAAe,CAAC,CAAC;AAEhH,MAAMC,cAAY,kBAAQ,qEAA8B,CAAC;AAEzD,MAAM,WAAW,eAAKA,aAAW,mBAAmB;AAEpD,MAAaC,OAAgC;CAC3C,SAAS,eAAK,gBAAgB,0BAA0B,EAAE,QAAQ,WAAW;CAC7E;AACD;AAED,MAAaC,YAA0C,OAAO,eAAe,EAAE,YAAY,KAAK;CAC9F,MAAM,SAAS,sBAAY,eAAe;EACxC,OAAO,EACL,QAAQ,SACT;EACD,SAAS,CACP,mCAAQ,EACN,UAAU,cAAc,KACzB,EAAC,AACH;CACF,EAAC;AACF,KAAI,eAAe,cACjB,QAAO,sBAAY,QAAQ,EACzB,OAAO,EACL,eAAe,EACb,UAAU,CAAC,eAAgB,EAC5B,EACF,EACF,EAAC;AAGJ,QAAO;AACR;AAED,MAAaC,qBAA4D,OAAO,QAAQ,CAAE,GAAE,YAAY;CACtG,MAAM,cAAc,OAAO,KAAK,MAAM,QAAQ,QAAQ,MAAM,QAAQ,CAAE,GAAE,QAAQ,CAAC,CAAC,SAAS;CAC3F,MAAMC,SAAmB,CAAE;AAE3B,QAAO,OACJ,OAAO,MAAM,CACb,OAAO,CAAC,UAAU,eAAKJ,aAAW,4BAA4B,AAAC,EAAC,CAChE,OAAO,cAAc,CAAC,eAAKA,aAAW,wBAAwB,AAAC,IAAG,CAAE,EAAC;AACzE"}
package/dist/preset.js CHANGED
@@ -10,7 +10,7 @@ const getAbsolutePath = (input) => dirname(require.resolve(join(input, "package.
10
10
  const __dirname = dirname(fileURLToPath(import.meta.url));
11
11
  const renderer = join(__dirname, "entry-preview.js");
12
12
  const core = {
13
- builder: getAbsolutePath("@storybook/builder-vite"),
13
+ builder: join(getAbsolutePath("@storybook/builder-vite"), "dist", "index.js"),
14
14
  renderer
15
15
  };
16
16
  const viteFinal = async (defaultConfig, { configType }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"preset.js","names":["input: I","core: StorybookConfig['core']","viteFinal: StorybookConfig['viteFinal']","previewAnnotations: StorybookConfig['previewAnnotations']","result: string[]"],"sources":["../src/preset.ts"],"sourcesContent":["/**\n * we can't prefix the Node.js imports with `node:` because it will break\n * within Storybook due to its Vite setup.\n */\nimport { createRequire } from 'module';\nimport { dirname, join } from 'path';\nimport stencil from 'unplugin-stencil/vite';\nimport { fileURLToPath } from 'url';\nimport { mergeConfig } from 'vite';\nimport { StorybookConfig } from './types';\n\nconst require = createRequire(import.meta.url);\nconst getAbsolutePath = <I extends string>(input: I): I => dirname(require.resolve(join(input, 'package.json'))) as any;\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nconst renderer = join(__dirname, 'entry-preview.js');\n\nexport const core: StorybookConfig['core'] = {\n builder: getAbsolutePath('@storybook/builder-vite'),\n renderer,\n};\n\nexport const viteFinal: StorybookConfig['viteFinal'] = async (defaultConfig, { configType }) => {\n const config = mergeConfig(defaultConfig, {\n build: {\n target: 'es2020',\n },\n plugins: [\n stencil({\n rootPath: defaultConfig.root,\n }),\n ],\n });\n if (configType === 'DEVELOPMENT') {\n return mergeConfig(config, {\n build: {\n rollupOptions: {\n external: ['@stencil/core'],\n },\n },\n });\n }\n\n return config;\n};\n\nexport const previewAnnotations: StorybookConfig['previewAnnotations'] = async (input = [], options) => {\n const docsEnabled = Object.keys(await options.presets.apply('docs', {}, options)).length > 0;\n const result: string[] = [];\n\n return result\n .concat(input)\n .concat([renderer, join(__dirname, 'entry-preview-argtypes.js')])\n .concat(docsEnabled ? [join(__dirname, 'entry-preview-docs.js')] : []);\n};\n"],"mappings":";;;;;;;AAWA,MAAM,UAAU,cAAc,OAAO,KAAK,IAAI;AAC9C,MAAM,kBAAkB,CAAmBA,UAAgB,QAAQ,QAAQ,QAAQ,KAAK,OAAO,eAAe,CAAC,CAAC;AAEhH,MAAM,YAAY,QAAQ,cAAc,OAAO,KAAK,IAAI,CAAC;AAEzD,MAAM,WAAW,KAAK,WAAW,mBAAmB;AAEpD,MAAaC,OAAgC;CAC3C,SAAS,gBAAgB,0BAA0B;CACnD;AACD;AAED,MAAaC,YAA0C,OAAO,eAAe,EAAE,YAAY,KAAK;CAC9F,MAAM,SAAS,YAAY,eAAe;EACxC,OAAO,EACL,QAAQ,SACT;EACD,SAAS,CACP,QAAQ,EACN,UAAU,cAAc,KACzB,EAAC,AACH;CACF,EAAC;AACF,KAAI,eAAe,cACjB,QAAO,YAAY,QAAQ,EACzB,OAAO,EACL,eAAe,EACb,UAAU,CAAC,eAAgB,EAC5B,EACF,EACF,EAAC;AAGJ,QAAO;AACR;AAED,MAAaC,qBAA4D,OAAO,QAAQ,CAAE,GAAE,YAAY;CACtG,MAAM,cAAc,OAAO,KAAK,MAAM,QAAQ,QAAQ,MAAM,QAAQ,CAAE,GAAE,QAAQ,CAAC,CAAC,SAAS;CAC3F,MAAMC,SAAmB,CAAE;AAE3B,QAAO,OACJ,OAAO,MAAM,CACb,OAAO,CAAC,UAAU,KAAK,WAAW,4BAA4B,AAAC,EAAC,CAChE,OAAO,cAAc,CAAC,KAAK,WAAW,wBAAwB,AAAC,IAAG,CAAE,EAAC;AACzE"}
1
+ {"version":3,"file":"preset.js","names":["input: I","core: StorybookConfig['core']","viteFinal: StorybookConfig['viteFinal']","previewAnnotations: StorybookConfig['previewAnnotations']","result: string[]"],"sources":["../src/preset.ts"],"sourcesContent":["/**\n * we can't prefix the Node.js imports with `node:` because it will break\n * within Storybook due to its Vite setup.\n */\nimport { createRequire } from 'module';\nimport { dirname, join } from 'path';\nimport stencil from 'unplugin-stencil/vite';\nimport { fileURLToPath } from 'url';\nimport { mergeConfig } from 'vite';\nimport { StorybookConfig } from './types';\n\nconst require = createRequire(import.meta.url);\nconst getAbsolutePath = <I extends string>(input: I): I => dirname(require.resolve(join(input, 'package.json'))) as any;\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nconst renderer = join(__dirname, 'entry-preview.js');\n\nexport const core: StorybookConfig['core'] = {\n builder: join(getAbsolutePath('@storybook/builder-vite'), 'dist', 'index.js'),\n renderer,\n};\n\nexport const viteFinal: StorybookConfig['viteFinal'] = async (defaultConfig, { configType }) => {\n const config = mergeConfig(defaultConfig, {\n build: {\n target: 'es2020',\n },\n plugins: [\n stencil({\n rootPath: defaultConfig.root,\n }),\n ],\n });\n if (configType === 'DEVELOPMENT') {\n return mergeConfig(config, {\n build: {\n rollupOptions: {\n external: ['@stencil/core'],\n },\n },\n });\n }\n\n return config;\n};\n\nexport const previewAnnotations: StorybookConfig['previewAnnotations'] = async (input = [], options) => {\n const docsEnabled = Object.keys(await options.presets.apply('docs', {}, options)).length > 0;\n const result: string[] = [];\n\n return result\n .concat(input)\n .concat([renderer, join(__dirname, 'entry-preview-argtypes.js')])\n .concat(docsEnabled ? [join(__dirname, 'entry-preview-docs.js')] : []);\n};\n"],"mappings":";;;;;;;AAWA,MAAM,UAAU,cAAc,OAAO,KAAK,IAAI;AAC9C,MAAM,kBAAkB,CAAmBA,UAAgB,QAAQ,QAAQ,QAAQ,KAAK,OAAO,eAAe,CAAC,CAAC;AAEhH,MAAM,YAAY,QAAQ,cAAc,OAAO,KAAK,IAAI,CAAC;AAEzD,MAAM,WAAW,KAAK,WAAW,mBAAmB;AAEpD,MAAaC,OAAgC;CAC3C,SAAS,KAAK,gBAAgB,0BAA0B,EAAE,QAAQ,WAAW;CAC7E;AACD;AAED,MAAaC,YAA0C,OAAO,eAAe,EAAE,YAAY,KAAK;CAC9F,MAAM,SAAS,YAAY,eAAe;EACxC,OAAO,EACL,QAAQ,SACT;EACD,SAAS,CACP,QAAQ,EACN,UAAU,cAAc,KACzB,EAAC,AACH;CACF,EAAC;AACF,KAAI,eAAe,cACjB,QAAO,YAAY,QAAQ,EACzB,OAAO,EACL,eAAe,EACb,UAAU,CAAC,eAAgB,EAC5B,EACF,EACF,EAAC;AAGJ,QAAO;AACR;AAED,MAAaC,qBAA4D,OAAO,QAAQ,CAAE,GAAE,YAAY;CACtG,MAAM,cAAc,OAAO,KAAK,MAAM,QAAQ,QAAQ,MAAM,QAAQ,CAAE,GAAE,QAAQ,CAAC,CAAC,SAAS;CAC3F,MAAMC,SAAmB,CAAE;AAE3B,QAAO,OACJ,OAAO,MAAM,CACb,OAAO,CAAC,UAAU,KAAK,WAAW,4BAA4B,AAAC,EAAC,CAChE,OAAO,cAAc,CAAC,KAAK,WAAW,wBAAwB,AAAC,IAAG,CAAE,EAAC;AACzE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/storybook-plugin",
3
- "version": "0.5.9",
3
+ "version": "0.6.1",
4
4
  "description": "Storybook plugin for Stencil",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/stenciljs/storybook",
@@ -64,17 +64,16 @@
64
64
  "build": "tsdown"
65
65
  },
66
66
  "dependencies": {
67
- "@storybook/addon-actions": "^9.0.8",
68
- "@storybook/builder-vite": "^9.0.8",
67
+ "@storybook/builder-vite": "^10.0.0",
69
68
  "@storybook/global": "^5.0.0",
70
- "@storybook/html": "^9.0.8",
69
+ "@storybook/html": "^10.0.0",
71
70
  "preact-render-to-string": "^6.5.13",
72
71
  "react-docgen-typescript": "^2.4.0",
73
72
  "unplugin-stencil": "^0.4.1"
74
73
  },
75
74
  "peerDependencies": {
76
75
  "@stencil/core": "^4.30.0",
77
- "storybook": "^9.0.5 || ^10.0.0"
76
+ "storybook": "^10.0.0"
78
77
  },
79
78
  "devDependencies": {
80
79
  "@stencil/core": "^4.33.1",
package/preset.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // This file seems to only be necessary for Windows
2
- export * from './dist/preset.js';
2
+ export { core, viteFinal, previewAnnotations } from './dist/preset.cjs';