@stencil/storybook-plugin 0.0.6 → 0.0.8

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/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- import './globals';
2
1
  export * from './types.js';
3
2
  export * from './portable-stories.js';
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import './globals';
1
+ /// <reference path="../@types/rollup-parseAst.d.ts" />
2
2
  export * from './types.js';
3
3
  export * from './portable-stories.js';
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { VNode } from '@stencil/core';
1
+ import { VNode, JSX as StencilJSX } from '@stencil/core';
2
2
  import { StorybookConfigVite } from '@storybook/builder-vite';
3
3
  import { WebRenderer } from '@storybook/types';
4
4
  export type { Args, ArgTypes, Parameters, StrictArgs } from '@storybook/types';
@@ -52,3 +52,18 @@ export type StorybookConfig = Omit<StorybookConfigBase, 'framework'> & {
52
52
  name: '@stencil/storybook-plugin';
53
53
  };
54
54
  } & StorybookConfigVite;
55
+ /**
56
+ * Extend the JSX namespace to include StencilJSX.IntrinsicElements, StencilJSX.Element, and StencilJSX.ElementClass.
57
+ * This is necessary to allow the use of Stencil components in Storybook.
58
+ * Without we get are getting type errors.
59
+ */
60
+ declare global {
61
+ namespace JSX {
62
+ interface IntrinsicElements extends StencilJSX.IntrinsicElements {
63
+ }
64
+ interface Element extends StencilJSX.Element {
65
+ }
66
+ interface ElementClass {
67
+ }
68
+ }
69
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/storybook-plugin",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "Storybook plugin for Stencil",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/stenciljs/storybook",
@@ -71,7 +71,7 @@
71
71
  "@storybook/types": "^8.6.12",
72
72
  "preact-render-to-string": "^6.5.13",
73
73
  "react-docgen-typescript": "^2.2.2",
74
- "unplugin-stencil": "^0.2.2"
74
+ "unplugin-stencil": "^0.2.3"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "@stencil/core": "^4.30.0"