@stencil/storybook-plugin 0.5.2 → 0.5.4

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.
@@ -4,9 +4,12 @@ import { DecoratorFunction } from "storybook/internal/types";
4
4
 
5
5
  //#region src/docs/render-html.d.ts
6
6
  declare const renderHTML: (vnode: VNode) => string;
7
+ //# sourceMappingURL=render-html.d.ts.map
7
8
  //#endregion
8
9
  //#region src/docs/source-decorator.d.ts
9
10
  declare const sourceDecorator: DecoratorFunction<StencilRenderer<unknown>>;
11
+ //# sourceMappingURL=source-decorator.d.ts.map
12
+
10
13
  //#endregion
11
14
  export { renderHTML, sourceDecorator };
12
15
  //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/docs/render-html.ts","../../src/docs/source-decorator.ts"],"sourcesContent":[],"mappings":";;;;;cAqCa,oBAAqB;;;;cCpBrB,iBAAiB,kBAAkB"}
@@ -4,9 +4,12 @@ import { DecoratorFunction } from "storybook/internal/types";
4
4
 
5
5
  //#region src/docs/render-html.d.ts
6
6
  declare const renderHTML: (vnode: VNode) => string;
7
+ //# sourceMappingURL=render-html.d.ts.map
7
8
  //#endregion
8
9
  //#region src/docs/source-decorator.d.ts
9
10
  declare const sourceDecorator: DecoratorFunction<StencilRenderer<unknown>>;
11
+ //# sourceMappingURL=source-decorator.d.ts.map
12
+
10
13
  //#endregion
11
14
  export { renderHTML, sourceDecorator };
12
15
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/docs/render-html.ts","../../src/docs/source-decorator.ts"],"sourcesContent":[],"mappings":";;;;;cAqCa,oBAAqB;;;;cCpBrB,iBAAiB,kBAAkB"}
@@ -29,13 +29,26 @@ const inferSBType = (prop) => {
29
29
  required: prop.required
30
30
  };
31
31
  };
32
+ const mapPropOptions = (prop) => prop.values.filter((value) => ["string", "number"].includes(value.type)).map(({ value }) => value);
32
33
  const inferControlType = (prop) => {
33
34
  switch (prop.type) {
34
- case "string": return { type: "text" };
35
- case "number": return { type: "number" };
36
- case "boolean": return { type: "boolean" };
37
- case "Date": return { type: "date" };
38
- default: return { type: "object" };
35
+ case "string":
36
+ case "string | undefined": return { type: "text" };
37
+ case "number":
38
+ case "number | undefined": return { type: "number" };
39
+ case "boolean":
40
+ case "boolean | undefined": return { type: "boolean" };
41
+ case "Date":
42
+ case "Date | string": return { type: "date" };
43
+ case "function":
44
+ case "function | undefined":
45
+ case "void":
46
+ case "void | undefined": return null;
47
+ default:
48
+ const values = mapPropOptions(prop);
49
+ if (values.length === 0) return { type: "object" };
50
+ if (values.length < 5) return { type: "radio" };
51
+ return { type: "select" };
39
52
  }
40
53
  };
41
54
 
@@ -90,6 +103,7 @@ const mapProps = (props) => props.reduce((acc, prop) => {
90
103
  type: { summary: prop.complexType?.original },
91
104
  defaultValue: { summary: prop.default }
92
105
  },
106
+ options: mapPropOptions(prop),
93
107
  type: inferSBType(prop)
94
108
  };
95
109
  return acc;
@@ -1 +1 @@
1
- {"version":3,"file":"entry-preview-argtypes.cjs","names":["prop: JsonDocsProp","scalarTypes: SBScalarType['name'][]","data: T[]","category: string","methods: JsonDocsMethod[]","events: JsonDocsEvent[]","chr: string","props: JsonDocsProp[]","tagName: string","manifest: JsonDocs","customElements: JsonDocs","component: any","argTypesEnhancers: ArgTypesEnhancer<StencilRenderer<unknown>>[]","enhanceArgTypes"],"sources":["../src/docs/infer-type.ts","../src/docs/custom-elements.ts","../src/entry-preview-argtypes.ts"],"sourcesContent":["import type { JsonDocsProp } from '@stencil/core/internal';\nimport type { SBType, SBScalarType, InputType } from 'storybook/internal/types';\n\nexport const inferSBType = (prop: JsonDocsProp): SBType => {\n const scalarTypes: SBScalarType['name'][] = ['string', 'number', 'boolean', 'symbol'];\n if (prop.type.toLowerCase() in scalarTypes) {\n return { name: prop.type.toLowerCase(), raw: prop.type, required: prop.required } as SBScalarType;\n }\n\n if (/^\\(.*\\)\\s*=>\\s*.*$/.test(prop.type)) {\n return { name: 'function', raw: prop.type, required: prop.required };\n }\n\n return { name: 'other', value: prop.type, raw: prop.type, required: prop.required };\n};\n\nexport const inferControlType = (prop: JsonDocsProp): InputType['control'] => {\n switch (prop.type) {\n case 'string':\n return { type: 'text' };\n case 'number':\n return { type: 'number' };\n case 'boolean':\n return { type: 'boolean' };\n case 'Date':\n return { type: 'date' };\n default:\n return { type: 'object' };\n }\n};\n","import type {\n JsonDocs,\n JsonDocsEvent,\n JsonDocsMethod,\n JsonDocsPart,\n JsonDocsProp,\n JsonDocsSlot,\n JsonDocsStyle,\n} from '@stencil/core/internal';\nimport { logger } from 'storybook/internal/client-logger';\nimport type { ArgTypes } from 'storybook/internal/types';\n\nimport { getCustomElements, isValidComponent, isValidMetaData } from '..';\nimport { inferControlType, inferSBType } from './infer-type';\n\nconst mapData = <T extends JsonDocsPart>(data: T[], category: string): ArgTypes =>\n data.reduce<ArgTypes>((acc, item) => {\n acc[item.name] = {\n name: item.name,\n description: item.docs,\n control: false,\n table: {\n category,\n },\n };\n return acc;\n }, {});\n\nconst mapMethods = (methods: JsonDocsMethod[]): ArgTypes =>\n methods.reduce<ArgTypes>((acc, method) => {\n acc[method.name] = {\n name: method.name,\n description: method.docs,\n control: null,\n type: { name: 'function' },\n table: {\n category: 'methods',\n type: { summary: method.signature },\n },\n };\n return acc;\n }, {});\n\nconst mapEvent = (events: JsonDocsEvent[]): ArgTypes =>\n events.reduce<ArgTypes>((acc, event) => {\n let name = event.event\n .replace(/(-|_|:|\\.|\\s)+(.)?/g, (_match, _separator, chr: string) => {\n return chr ? chr.toUpperCase() : '';\n })\n .replace(/^([A-Z])/, (match) => match.toLowerCase());\n\n name = `on${name.charAt(0).toUpperCase() + name.slice(1)}`;\n\n acc[name] = {\n name,\n description: event.docs,\n control: null,\n table: {\n category: 'events',\n type: { summary: event.detail },\n },\n type: { name: 'function' },\n };\n\n return acc;\n }, {});\n\nconst mapProps = (props: JsonDocsProp[]): ArgTypes =>\n props.reduce<ArgTypes>((acc, prop) => {\n acc[prop.name] = {\n name: prop.attr || prop.name,\n description: prop.docs,\n control: inferControlType(prop),\n table: {\n category: 'properties',\n type: { summary: prop.complexType?.original },\n defaultValue: { summary: prop.default },\n },\n type: inferSBType(prop),\n };\n\n return acc;\n }, {});\n\nconst getMetaData = (tagName: string, manifest: JsonDocs) => {\n if (!isValidComponent(tagName) || !isValidMetaData(manifest)) {\n return null;\n }\n const metaData = manifest.components.find((component) => component.tag.toUpperCase() === tagName.toUpperCase());\n if (!metaData) {\n logger.warn(`Component not found in custom-elements.json: ${tagName}`);\n }\n return metaData;\n};\n\nexport const extractArgTypesFromElements = (tagName: string, customElements: JsonDocs) => {\n const metaData = getMetaData(tagName, customElements);\n return (\n metaData && {\n ...mapProps(metaData.props),\n ...mapEvent(metaData.events),\n ...mapMethods(metaData.methods),\n ...mapData<JsonDocsSlot>(metaData.slots, 'slots'),\n ...mapData<JsonDocsPart>(metaData.parts, 'parts'),\n ...mapData<JsonDocsStyle>(metaData.styles, 'styles'),\n }\n );\n};\n\nexport const extractArgTypes = (component: any) => {\n const cem = getCustomElements();\n // Handle both string references (lazy loading) and class references (auto-define)\n const tagName = typeof component === 'string' ? component : component?.is;\n return extractArgTypesFromElements(tagName, cem);\n};\n\nexport const extractComponentDescription = (component: any) => {\n // Handle both string references (lazy loading) and class references (auto-define)\n const tagName = typeof component === 'string' ? component : component?.is;\n const metaData = getMetaData(tagName, getCustomElements());\n return metaData && metaData.docs;\n};\n","import { enhanceArgTypes } from 'storybook/internal/docs-tools';\nimport type { ArgTypesEnhancer } from 'storybook/internal/types';\n\nimport { extractArgTypes, extractComponentDescription } from './docs/custom-elements';\nimport type { StencilRenderer } from './types';\n\nexport const parameters = {\n docs: {\n extractArgTypes,\n extractComponentDescription,\n },\n};\n\nexport const argTypesEnhancers: ArgTypesEnhancer<StencilRenderer<unknown>>[] = [enhanceArgTypes];"],"mapp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QAAQ;EACjD,GAAG,QAAsB,SAAS,OAAO,QAAQ;EACjD,GAAG,QAAuB,SAAS,QAAQ,SAAS;CACrD;AAEJ;AAED,MAAa,kBAAkB,CAACC,cAAmB;CACjD,MAAM,MAAM,+BAAmB;CAE/B,MAAM,iBAAiB,cAAc,WAAW,YAAY,WAAW;AACvE,QAAO,4BAA4B,SAAS,IAAI;AACjD;AAED,MAAa,8BAA8B,CAACA,cAAmB;CAE7D,MAAM,iBAAiB,cAAc,WAAW,YAAY,WAAW;CACvE,MAAM,WAAW,YAAY,SAAS,+BAAmB,CAAC;AAC1D,QAAO,YAAY,SAAS;AAC7B;;;;ACnHD,MAAa,aAAa,EACxB,MAAM;CACJ;CACA;AACD,EACF;AAED,MAAaC,oBAAkE,CAACC,6CAAgB"}
1
+ {"version":3,"file":"entry-preview-argtypes.cjs","names":["prop: JsonDocsProp","scalarTypes: SBScalarType['name'][]","data: T[]","category: string","methods: JsonDocsMethod[]","events: JsonDocsEvent[]","chr: string","props: JsonDocsProp[]","tagName: string","manifest: JsonDocs","customElements: JsonDocs","component: any","argTypesEnhancers: ArgTypesEnhancer<StencilRenderer<unknown>>[]","enhanceArgTypes"],"sources":["../src/docs/infer-type.ts","../src/docs/custom-elements.ts","../src/entry-preview-argtypes.ts"],"sourcesContent":["import type { JsonDocsProp } from '@stencil/core/internal';\nimport type { InputType, SBScalarType, SBType } from 'storybook/internal/types';\n\nexport const inferSBType = (prop: JsonDocsProp): SBType => {\n const scalarTypes: SBScalarType['name'][] = ['string', 'number', 'boolean', 'symbol'];\n if (prop.type.toLowerCase() in scalarTypes) {\n return { name: prop.type.toLowerCase(), raw: prop.type, required: prop.required } as SBScalarType;\n }\n\n if (/^\\(.*\\)\\s*=>\\s*.*$/.test(prop.type)) {\n return { name: 'function', raw: prop.type, required: prop.required };\n }\n\n return { name: 'other', value: prop.type, raw: prop.type, required: prop.required };\n};\n\nexport const mapPropOptions = (prop: JsonDocsProp) =>\n prop.values.filter((value) => ['string', 'number'].includes(value.type)).map(({ value }) => value);\n\nexport const inferControlType = (prop: JsonDocsProp): InputType['control'] => {\n switch (prop.type) {\n case 'string':\n case 'string | undefined':\n return { type: 'text' };\n case 'number':\n case 'number | undefined':\n return { type: 'number' };\n case 'boolean':\n case 'boolean | undefined':\n return { type: 'boolean' };\n case 'Date':\n case 'Date | string':\n return { type: 'date' };\n case 'function':\n case 'function | undefined':\n case 'void':\n case 'void | undefined':\n return null;\n default:\n const values = mapPropOptions(prop);\n\n if (values.length === 0) {\n return { type: 'object' };\n }\n if (values.length < 5) {\n return { type: 'radio' };\n }\n return { type: 'select' };\n }\n};\n","import type {\n JsonDocs,\n JsonDocsEvent,\n JsonDocsMethod,\n JsonDocsPart,\n JsonDocsProp,\n JsonDocsSlot,\n JsonDocsStyle,\n} from '@stencil/core/internal';\nimport { logger } from 'storybook/internal/client-logger';\nimport type { ArgTypes } from 'storybook/internal/types';\n\nimport { getCustomElements, isValidComponent, isValidMetaData } from '..';\nimport { inferControlType, inferSBType, mapPropOptions } from './infer-type';\n\nconst mapData = <T extends JsonDocsPart>(data: T[], category: string): ArgTypes =>\n data.reduce<ArgTypes>((acc, item) => {\n acc[item.name] = {\n name: item.name,\n description: item.docs,\n control: false,\n table: {\n category,\n },\n };\n return acc;\n }, {});\n\nconst mapMethods = (methods: JsonDocsMethod[]): ArgTypes =>\n methods.reduce<ArgTypes>((acc, method) => {\n acc[method.name] = {\n name: method.name,\n description: method.docs,\n control: null,\n type: { name: 'function' },\n table: {\n category: 'methods',\n type: { summary: method.signature },\n },\n };\n return acc;\n }, {});\n\nconst mapEvent = (events: JsonDocsEvent[]): ArgTypes =>\n events.reduce<ArgTypes>((acc, event) => {\n let name = event.event\n .replace(/(-|_|:|\\.|\\s)+(.)?/g, (_match, _separator, chr: string) => {\n return chr ? chr.toUpperCase() : '';\n })\n .replace(/^([A-Z])/, (match) => match.toLowerCase());\n\n name = `on${name.charAt(0).toUpperCase() + name.slice(1)}`;\n\n acc[name] = {\n name,\n description: event.docs,\n control: null,\n table: {\n category: 'events',\n type: { summary: event.detail },\n },\n type: { name: 'function' },\n };\n\n return acc;\n }, {});\n\nconst mapProps = (props: JsonDocsProp[]): ArgTypes =>\n props.reduce<ArgTypes>((acc, prop) => {\n acc[prop.name] = {\n name: prop.attr || prop.name,\n description: prop.docs,\n control: inferControlType(prop),\n table: {\n category: 'properties',\n type: { summary: prop.complexType?.original },\n defaultValue: { summary: prop.default },\n },\n options: mapPropOptions(prop),\n type: inferSBType(prop),\n };\n\n return acc;\n }, {});\n\nconst getMetaData = (tagName: string, manifest: JsonDocs) => {\n if (!isValidComponent(tagName) || !isValidMetaData(manifest)) {\n return null;\n }\n const metaData = manifest.components.find((component) => component.tag.toUpperCase() === tagName.toUpperCase());\n if (!metaData) {\n logger.warn(`Component not found in custom-elements.json: ${tagName}`);\n }\n return metaData;\n};\n\nexport const extractArgTypesFromElements = (tagName: string, customElements: JsonDocs) => {\n const metaData = getMetaData(tagName, customElements);\n return (\n metaData && {\n ...mapProps(metaData.props),\n ...mapEvent(metaData.events),\n ...mapMethods(metaData.methods),\n ...mapData<JsonDocsSlot>(metaData.slots, 'slots'),\n ...mapData<JsonDocsPart>(metaData.parts, 'parts'),\n ...mapData<JsonDocsStyle>(metaData.styles, 'styles'),\n }\n );\n};\n\nexport const extractArgTypes = (component: any) => {\n const cem = getCustomElements();\n // Handle both string references (lazy loading) and class references (auto-define)\n const tagName = typeof component === 'string' ? component : component?.is;\n return extractArgTypesFromElements(tagName, cem);\n};\n\nexport const extractComponentDescription = (component: any) => {\n // Handle both string references (lazy loading) and class references (auto-define)\n const tagName = typeof component === 'string' ? component : component?.is;\n const metaData = getMetaData(tagName, getCustomElements());\n return metaData && metaData.docs;\n};\n","import { enhanceArgTypes } from 'storybook/internal/docs-tools';\nimport type { ArgTypesEnhancer } from 'storybook/internal/types';\n\nimport { extractArgTypes, extractComponentDescription } from './docs/custom-elements';\nimport type { StencilRenderer } from './types';\n\nexport const parameters = {\n docs: {\n extractArgTypes,\n extractComponentDescription,\n },\n};\n\nexport const argTypesEnhancers: ArgTypesEnhancer<StencilRenderer<unknown>>[] = [enhanceArgTypes];"],"mappings":";;;;;;;AAGA,MAAa,cAAc,CAACA,SAA+B;CACzD,MAAMC,cAAsC;EAAC;EAAU;EAAU;EAAW;CAAS;AACrF,KAAI,KAAK,KAAK,aAAa,IAAI,YAC7B,QAAO;EAAE,MAAM,KAAK,KAAK,aAAa;EAAE,KAAK,KAAK;EAAM,UAAU,KAAK;CAAU;AAGnF,KAAI,qBAAqB,KAAK,KAAK,KAAK,CACtC,QAAO;EAAE,MAAM;EAAY,KAAK,KAAK;EAAM,UAAU,KAAK;CAAU;AAGtE,QAAO;EAAE,MAAM;EAAS,OAAO,KAAK;EAAM,KAAK,KAAK;EAAM,UAAU,KAAK;CAAU;AACpF;AAED,MAAa,iBAAiB,CAACD,SAC7B,KAAK,OAAO,OAAO,CAAC,UAAU,CAAC,UAAU,QAAS,EAAC,SAAS,MAAM,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,MAAM;AAEpG,MAAa,mBAAmB,CAACA,SAA6C;AAC5E,SAAQ,KAAK,MAAb;EACE,KAAK;EACL,KAAK,qBACH,QAAO,EAAE,MAAM,OAAQ;EACzB,KAAK;EACL,KAAK,qBACH,QAAO,EAAE,MAAM,SAAU;EAC3B,KAAK;EACL,KAAK,sBACH,QAAO,EAAE,MAAM,UAAW;EAC5B,KAAK;EACL,KAAK,gBACH,QAAO,EAAE,MAAM,OAAQ;EACzB,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,mBACH,QAAO;EACT;GACE,MAAM,SAAS,eAAe,KAAK;AAEnC,OAAI,OAAO,WAAW,EACpB,QAAO,EAAE,MAAM,SAAU;AAE3B,OAAI,OAAO,SAAS,EAClB,QAAO,EAAE,MAAM,QAAS;AAE1B,UAAO,EAAE,MAAM,SAAU;CAC5B;AACF;;;;AClCD,MAAM,UAAU,CAAyBE,MAAWC,aAClD,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Y,KAAK;CACxB;AAED,QAAO;AACR,GAAE,CAAE,EAAC;AAER,MAAM,cAAc,CAACC,SAAiBC,aAAuB;AAC3D,MAAK,6BAAiB,QAAQ,KAAK,4BAAgB,SAAS,CAC1D,QAAO;CAET,MAAM,WAAW,SAAS,WAAW,KAAK,CAAC,cAAc,UAAU,IAAI,aAAa,KAAK,QAAQ,aAAa,CAAC;AAC/G,MAAK,SACH,yCAAO,MAAM,+CAA+C,QAAQ,EAAE;AAExE,QAAO;AACR;AAED,MAAa,8BAA8B,CAACD,SAAiBE,mBAA6B;CACxF,MAAM,WAAW,YAAY,SAAS,eAAe;AACrD,QACE,YAAY;EACV,GAAG,SAAS,SAAS,MAAM;EAC3B,GAAG,SAAS,SAAS,OAAO;EAC5B,GAAG,WAAW,SAAS,QAAQ;EAC/B,GAAG,QAAsB,SAAS,OAAO,QAAQ;EACjD,GAAG,QAAsB,SAAS,OAAO,QAAQ;EACjD,GAAG,QAAuB,SAAS,QAAQ,SAAS;CACrD;AAEJ;AAED,MAAa,kBAAkB,CAACC,cAAmB;CACjD,MAAM,MAAM,+BAAmB;CAE/B,MAAM,iBAAiB,cAAc,WAAW,YAAY,WAAW;AACvE,QAAO,4BAA4B,SAAS,IAAI;AACjD;AAED,MAAa,8BAA8B,CAACA,cAAmB;CAE7D,MAAM,iBAAiB,cAAc,WAAW,YAAY,WAAW;CACvE,MAAM,WAAW,YAAY,SAAS,+BAAmB,CAAC;AAC1D,QAAO,YAAY,SAAS;AAC7B;;;;ACpHD,MAAa,aAAa,EACxB,MAAM;CACJ;CACA;AACD,EACF;AAED,MAAaC,oBAAkE,CAACC,6CAAgB"}
@@ -12,6 +12,8 @@ declare const parameters: {
12
12
  };
13
13
  };
14
14
  declare const argTypesEnhancers: ArgTypesEnhancer<StencilRenderer<unknown>>[];
15
+ //# sourceMappingURL=entry-preview-argtypes.d.ts.map
16
+
15
17
  //#endregion
16
18
  export { argTypesEnhancers, parameters };
17
19
  //# sourceMappingURL=entry-preview-argtypes.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-preview-argtypes.d.cts","names":[],"sources":["../src/entry-preview-argtypes.ts"],"sourcesContent":[],"mappings":";;;;;cAMa;;;MAAA,CAAA,CAAA,EAAA,MAKZ,CAAA,EAAA,uBAAA,CAAA,SAAA;IAEY,CAAA;IAAmF,2BAAA,EAAA,CAAA,SAAA,EAAA,GAAA,EAAA,GAAA,MAAA;EAAA,CAAA;CAAhC;AAAhB,cAAnC,iBAAmC,EAAhB,gBAAgB,CAAC,eAAD,CAAA,OAAA,CAAA,CAAA,EAAA"}
@@ -12,6 +12,8 @@ declare const parameters: {
12
12
  };
13
13
  };
14
14
  declare const argTypesEnhancers: ArgTypesEnhancer<StencilRenderer<unknown>>[];
15
+ //# sourceMappingURL=entry-preview-argtypes.d.ts.map
16
+
15
17
  //#endregion
16
18
  export { argTypesEnhancers, parameters };
17
19
  //# sourceMappingURL=entry-preview-argtypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-preview-argtypes.d.ts","names":[],"sources":["../src/entry-preview-argtypes.ts"],"sourcesContent":[],"mappings":";;;;;cAMa;;;MAAA,CAAA,CAAA,EAAA,MAKZ,CAAA,EAAA,uBAAA,CAAA,SAAA;IAEY,CAAA;IAAmF,2BAAA,EAAA,CAAA,SAAA,EAAA,GAAA,EAAA,GAAA,MAAA;EAAA,CAAA;CAAhC;AAAhB,cAAnC,iBAAmC,EAAhB,gBAAgB,CAAC,eAAD,CAAA,OAAA,CAAA,CAAA,EAAA"}
@@ -29,13 +29,26 @@ const inferSBType = (prop) => {
29
29
  required: prop.required
30
30
  };
31
31
  };
32
+ const mapPropOptions = (prop) => prop.values.filter((value) => ["string", "number"].includes(value.type)).map(({ value }) => value);
32
33
  const inferControlType = (prop) => {
33
34
  switch (prop.type) {
34
- case "string": return { type: "text" };
35
- case "number": return { type: "number" };
36
- case "boolean": return { type: "boolean" };
37
- case "Date": return { type: "date" };
38
- default: return { type: "object" };
35
+ case "string":
36
+ case "string | undefined": return { type: "text" };
37
+ case "number":
38
+ case "number | undefined": return { type: "number" };
39
+ case "boolean":
40
+ case "boolean | undefined": return { type: "boolean" };
41
+ case "Date":
42
+ case "Date | string": return { type: "date" };
43
+ case "function":
44
+ case "function | undefined":
45
+ case "void":
46
+ case "void | undefined": return null;
47
+ default:
48
+ const values = mapPropOptions(prop);
49
+ if (values.length === 0) return { type: "object" };
50
+ if (values.length < 5) return { type: "radio" };
51
+ return { type: "select" };
39
52
  }
40
53
  };
41
54
 
@@ -90,6 +103,7 @@ const mapProps = (props) => props.reduce((acc, prop) => {
90
103
  type: { summary: prop.complexType?.original },
91
104
  defaultValue: { summary: prop.default }
92
105
  },
106
+ options: mapPropOptions(prop),
93
107
  type: inferSBType(prop)
94
108
  };
95
109
  return acc;
@@ -1 +1 @@
1
- {"version":3,"file":"entry-preview-argtypes.js","names":["prop: JsonDocsProp","scalarTypes: SBScalarType['name'][]","data: T[]","category: string","methods: JsonDocsMethod[]","events: JsonDocsEvent[]","chr: string","props: JsonDocsProp[]","tagName: string","manifest: JsonDocs","customElements: JsonDocs","component: any","argTypesEnhancers: ArgTypesEnhancer<StencilRenderer<unknown>>[]"],"sources":["../src/docs/infer-type.ts","../src/docs/custom-elements.ts","../src/entry-preview-argtypes.ts"],"sourcesContent":["import type { JsonDocsProp } from '@stencil/core/internal';\nimport type { SBType, SBScalarType, InputType } from 'storybook/internal/types';\n\nexport const inferSBType = (prop: JsonDocsProp): SBType => {\n const scalarTypes: SBScalarType['name'][] = ['string', 'number', 'boolean', 'symbol'];\n if (prop.type.toLowerCase() in scalarTypes) {\n return { name: prop.type.toLowerCase(), raw: prop.type, required: prop.required } as SBScalarType;\n }\n\n if (/^\\(.*\\)\\s*=>\\s*.*$/.test(prop.type)) {\n return { name: 'function', raw: prop.type, required: prop.required };\n }\n\n return { name: 'other', value: prop.type, raw: prop.type, required: prop.required };\n};\n\nexport const inferControlType = (prop: JsonDocsProp): InputType['control'] => {\n switch (prop.type) {\n case 'string':\n return { type: 'text' };\n case 'number':\n return { type: 'number' };\n case 'boolean':\n return { type: 'boolean' };\n case 'Date':\n return { type: 'date' };\n default:\n return { type: 'object' };\n }\n};\n","import type {\n JsonDocs,\n JsonDocsEvent,\n JsonDocsMethod,\n JsonDocsPart,\n JsonDocsProp,\n JsonDocsSlot,\n JsonDocsStyle,\n} from '@stencil/core/internal';\nimport { logger } from 'storybook/internal/client-logger';\nimport type { ArgTypes } from 'storybook/internal/types';\n\nimport { getCustomElements, isValidComponent, isValidMetaData } from '..';\nimport { inferControlType, inferSBType } from './infer-type';\n\nconst mapData = <T extends JsonDocsPart>(data: T[], category: string): ArgTypes =>\n data.reduce<ArgTypes>((acc, item) => {\n acc[item.name] = {\n name: item.name,\n description: item.docs,\n control: false,\n table: {\n category,\n },\n };\n return acc;\n }, {});\n\nconst mapMethods = (methods: JsonDocsMethod[]): ArgTypes =>\n methods.reduce<ArgTypes>((acc, method) => {\n acc[method.name] = {\n name: method.name,\n description: method.docs,\n control: null,\n type: { name: 'function' },\n table: {\n category: 'methods',\n type: { summary: method.signature },\n },\n };\n return acc;\n }, {});\n\nconst mapEvent = (events: JsonDocsEvent[]): ArgTypes =>\n events.reduce<ArgTypes>((acc, event) => {\n let name = event.event\n .replace(/(-|_|:|\\.|\\s)+(.)?/g, (_match, _separator, chr: string) => {\n return chr ? chr.toUpperCase() : '';\n })\n .replace(/^([A-Z])/, (match) => match.toLowerCase());\n\n name = `on${name.charAt(0).toUpperCase() + name.slice(1)}`;\n\n acc[name] = {\n name,\n description: event.docs,\n control: null,\n table: {\n category: 'events',\n type: { summary: event.detail },\n },\n type: { name: 'function' },\n };\n\n return acc;\n }, {});\n\nconst mapProps = (props: JsonDocsProp[]): ArgTypes =>\n props.reduce<ArgTypes>((acc, prop) => {\n acc[prop.name] = {\n name: prop.attr || prop.name,\n description: prop.docs,\n control: inferControlType(prop),\n table: {\n category: 'properties',\n type: { summary: prop.complexType?.original },\n defaultValue: { summary: prop.default },\n },\n type: inferSBType(prop),\n };\n\n return acc;\n }, {});\n\nconst getMetaData = (tagName: string, manifest: JsonDocs) => {\n if (!isValidComponent(tagName) || !isValidMetaData(manifest)) {\n return null;\n }\n const metaData = manifest.components.find((component) => component.tag.toUpperCase() === tagName.toUpperCase());\n if (!metaData) {\n logger.warn(`Component not found in custom-elements.json: ${tagName}`);\n }\n return metaData;\n};\n\nexport const extractArgTypesFromElements = (tagName: string, customElements: JsonDocs) => {\n const metaData = getMetaData(tagName, customElements);\n return (\n metaData && {\n ...mapProps(metaData.props),\n ...mapEvent(metaData.events),\n ...mapMethods(metaData.methods),\n ...mapData<JsonDocsSlot>(metaData.slots, 'slots'),\n ...mapData<JsonDocsPart>(metaData.parts, 'parts'),\n ...mapData<JsonDocsStyle>(metaData.styles, 'styles'),\n }\n );\n};\n\nexport const extractArgTypes = (component: any) => {\n const cem = getCustomElements();\n // Handle both string references (lazy loading) and class references (auto-define)\n const tagName = typeof component === 'string' ? component : component?.is;\n return extractArgTypesFromElements(tagName, cem);\n};\n\nexport const extractComponentDescription = (component: any) => {\n // Handle both string references (lazy loading) and class references (auto-define)\n const tagName = typeof component === 'string' ? component : component?.is;\n const metaData = getMetaData(tagName, getCustomElements());\n return metaData && metaData.docs;\n};\n","import { enhanceArgTypes } from 'storybook/internal/docs-tools';\nimport type { ArgTypesEnhancer } from 'storybook/internal/types';\n\nimport { extractArgTypes, extractComponentDescription } from './docs/custom-elements';\nimport type { StencilRenderer } from './types';\n\nexport const parameters = {\n docs: {\n extractArgTypes,\n extractComponentDescription,\n },\n};\n\nexport const argTypesEnhancers: ArgTypesEnhancer<StencilRenderer<unknown>>[] = [enhanceArgTypes];"],"mappings":";;;;;;;AAGA,MAAa,cAAc,CAACA,SAA+B;CACzD,MAAMC,cAAsC;EAAC;EAAU;EAAU;EAAW;CAAS;AACrF,KAAI,KAAK,KAAK,aAAa,IAAI,YAC7B,QAAO;EAAE,MAAM,KAAK,KAAK,aAAa;EAAE,KAAK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WAAW,YAAY,WAAW;AACvE,QAAO,4BAA4B,SAAS,IAAI;AACjD;AAED,MAAa,8BAA8B,CAACA,cAAmB;CAE7D,MAAM,iBAAiB,cAAc,WAAW,YAAY,WAAW;CACvE,MAAM,WAAW,YAAY,SAAS,mBAAmB,CAAC;AAC1D,QAAO,YAAY,SAAS;AAC7B;;;;ACnHD,MAAa,aAAa,EACxB,MAAM;CACJ;CACA;AACD,EACF;AAED,MAAaC,oBAAkE,CAAC,eAAgB"}
1
+ {"version":3,"file":"entry-preview-argtypes.js","names":["prop: JsonDocsProp","scalarTypes: SBScalarType['name'][]","data: T[]","category: string","methods: JsonDocsMethod[]","events: JsonDocsEvent[]","chr: string","props: JsonDocsProp[]","tagName: string","manifest: JsonDocs","customElements: JsonDocs","component: any","argTypesEnhancers: ArgTypesEnhancer<StencilRenderer<unknown>>[]"],"sources":["../src/docs/infer-type.ts","../src/docs/custom-elements.ts","../src/entry-preview-argtypes.ts"],"sourcesContent":["import type { JsonDocsProp } from '@stencil/core/internal';\nimport type { InputType, SBScalarType, SBType } from 'storybook/internal/types';\n\nexport const inferSBType = (prop: JsonDocsProp): SBType => {\n const scalarTypes: SBScalarType['name'][] = ['string', 'number', 'boolean', 'symbol'];\n if (prop.type.toLowerCase() in scalarTypes) {\n return { name: prop.type.toLowerCase(), raw: prop.type, required: prop.required } as SBScalarType;\n }\n\n if (/^\\(.*\\)\\s*=>\\s*.*$/.test(prop.type)) {\n return { name: 'function', raw: prop.type, required: prop.required };\n }\n\n return { name: 'other', value: prop.type, raw: prop.type, required: prop.required };\n};\n\nexport const mapPropOptions = (prop: JsonDocsProp) =>\n prop.values.filter((value) => ['string', 'number'].includes(value.type)).map(({ value }) => value);\n\nexport const inferControlType = (prop: JsonDocsProp): InputType['control'] => {\n switch (prop.type) {\n case 'string':\n case 'string | undefined':\n return { type: 'text' };\n case 'number':\n case 'number | undefined':\n return { type: 'number' };\n case 'boolean':\n case 'boolean | undefined':\n return { type: 'boolean' };\n case 'Date':\n case 'Date | string':\n return { type: 'date' };\n case 'function':\n case 'function | undefined':\n case 'void':\n case 'void | undefined':\n return null;\n default:\n const values = mapPropOptions(prop);\n\n if (values.length === 0) {\n return { type: 'object' };\n }\n if (values.length < 5) {\n return { type: 'radio' };\n }\n return { type: 'select' };\n }\n};\n","import type {\n JsonDocs,\n JsonDocsEvent,\n JsonDocsMethod,\n JsonDocsPart,\n JsonDocsProp,\n JsonDocsSlot,\n JsonDocsStyle,\n} from '@stencil/core/internal';\nimport { logger } from 'storybook/internal/client-logger';\nimport type { ArgTypes } from 'storybook/internal/types';\n\nimport { getCustomElements, isValidComponent, isValidMetaData } from '..';\nimport { inferControlType, inferSBType, mapPropOptions } from './infer-type';\n\nconst mapData = <T extends JsonDocsPart>(data: T[], category: string): ArgTypes =>\n data.reduce<ArgTypes>((acc, item) => {\n acc[item.name] = {\n name: item.name,\n description: item.docs,\n control: false,\n table: {\n category,\n },\n };\n return acc;\n }, {});\n\nconst mapMethods = (methods: JsonDocsMethod[]): ArgTypes =>\n methods.reduce<ArgTypes>((acc, method) => {\n acc[method.name] = {\n name: method.name,\n description: method.docs,\n control: null,\n type: { name: 'function' },\n table: {\n category: 'methods',\n type: { summary: method.signature },\n },\n };\n return acc;\n }, {});\n\nconst mapEvent = (events: JsonDocsEvent[]): ArgTypes =>\n events.reduce<ArgTypes>((acc, event) => {\n let name = event.event\n .replace(/(-|_|:|\\.|\\s)+(.)?/g, (_match, _separator, chr: string) => {\n return chr ? chr.toUpperCase() : '';\n })\n .replace(/^([A-Z])/, (match) => match.toLowerCase());\n\n name = `on${name.charAt(0).toUpperCase() + name.slice(1)}`;\n\n acc[name] = {\n name,\n description: event.docs,\n control: null,\n table: {\n category: 'events',\n type: { summary: event.detail },\n },\n type: { name: 'function' },\n };\n\n return acc;\n }, {});\n\nconst mapProps = (props: JsonDocsProp[]): ArgTypes =>\n props.reduce<ArgTypes>((acc, prop) => {\n acc[prop.name] = {\n name: prop.attr || prop.name,\n description: prop.docs,\n control: inferControlType(prop),\n table: {\n category: 'properties',\n type: { summary: prop.complexType?.original },\n defaultValue: { summary: prop.default },\n },\n options: mapPropOptions(prop),\n type: inferSBType(prop),\n };\n\n return acc;\n }, {});\n\nconst getMetaData = (tagName: string, manifest: JsonDocs) => {\n if (!isValidComponent(tagName) || !isValidMetaData(manifest)) {\n return null;\n }\n const metaData = manifest.components.find((component) => component.tag.toUpperCase() === tagName.toUpperCase());\n if (!metaData) {\n logger.warn(`Component not found in custom-elements.json: ${tagName}`);\n }\n return metaData;\n};\n\nexport const extractArgTypesFromElements = (tagName: string, customElements: JsonDocs) => {\n const metaData = getMetaData(tagName, customElements);\n return (\n metaData && {\n ...mapProps(metaData.props),\n ...mapEvent(metaData.events),\n ...mapMethods(metaData.methods),\n ...mapData<JsonDocsSlot>(metaData.slots, 'slots'),\n ...mapData<JsonDocsPart>(metaData.parts, 'parts'),\n ...mapData<JsonDocsStyle>(metaData.styles, 'styles'),\n }\n );\n};\n\nexport const extractArgTypes = (component: any) => {\n const cem = getCustomElements();\n // Handle both string references (lazy loading) and class references (auto-define)\n const tagName = typeof component === 'string' ? component : component?.is;\n return extractArgTypesFromElements(tagName, cem);\n};\n\nexport const extractComponentDescription = (component: any) => {\n // Handle both string references (lazy loading) and class references (auto-define)\n const tagName = typeof component === 'string' ? component : component?.is;\n const metaData = getMetaData(tagName, getCustomElements());\n return metaData && metaData.docs;\n};\n","import { enhanceArgTypes } from 'storybook/internal/docs-tools';\nimport type { ArgTypesEnhancer } from 'storybook/internal/types';\n\nimport { extractArgTypes, extractComponentDescription } from './docs/custom-elements';\nimport type { StencilRenderer } from './types';\n\nexport const parameters = {\n docs: {\n extractArgTypes,\n extractComponentDescription,\n },\n};\n\nexport const argTypesEnhancers: ArgTypesEnhancer<StencilRenderer<unknown>>[] = [enhanceArgTypes];"],"mappings":";;;;;;;AAGA,MAAa,cAAc,CAACA,SAA+B;CACzD,MAAMC,cAAsC;EAAC;EAAU;EAAU;EAAW;CAAS;AACr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U,IAAI,aAAa,KAAK,QAAQ,aAAa,CAAC;AAC/G,MAAK,SACH,QAAO,MAAM,+CAA+C,QAAQ,EAAE;AAExE,QAAO;AACR;AAED,MAAa,8BAA8B,CAACD,SAAiBE,mBAA6B;CACxF,MAAM,WAAW,YAAY,SAAS,eAAe;AACrD,QACE,YAAY;EACV,GAAG,SAAS,SAAS,MAAM;EAC3B,GAAG,SAAS,SAAS,OAAO;EAC5B,GAAG,WAAW,SAAS,QAAQ;EAC/B,GAAG,QAAsB,SAAS,OAAO,QAAQ;EACjD,GAAG,QAAsB,SAAS,OAAO,QAAQ;EACjD,GAAG,QAAuB,SAAS,QAAQ,SAAS;CACrD;AAEJ;AAED,MAAa,kBAAkB,CAACC,cAAmB;CACjD,MAAM,MAAM,mBAAmB;CAE/B,MAAM,iBAAiB,cAAc,WAAW,YAAY,WAAW;AACvE,QAAO,4BAA4B,SAAS,IAAI;AACjD;AAED,MAAa,8BAA8B,CAACA,cAAmB;CAE7D,MAAM,iBAAiB,cAAc,WAAW,YAAY,WAAW;CACvE,MAAM,WAAW,YAAY,SAAS,mBAAmB,CAAC;AAC1D,QAAO,YAAY,SAAS;AAC7B;;;;ACpHD,MAAa,aAAa,EACxB,MAAM;CACJ;CACA;AACD,EACF;AAED,MAAaC,oBAAkE,CAAC,eAAgB"}
@@ -4,6 +4,8 @@ import { DecoratorFunction, Parameters } from "storybook/internal/types";
4
4
  //#region src/entry-preview-docs.d.ts
5
5
  declare const decorators: DecoratorFunction<StencilRenderer<unknown>>[];
6
6
  declare const parameters: Parameters;
7
+ //# sourceMappingURL=entry-preview-docs.d.ts.map
8
+
7
9
  //#endregion
8
10
  export { decorators, parameters };
9
11
  //# sourceMappingURL=entry-preview-docs.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-preview-docs.d.cts","names":[],"sources":["../src/entry-preview-docs.ts"],"sourcesContent":[],"mappings":";;;;cAKa,YAAY,kBAAkB;cAE9B,YAAY;AAFzB"}
@@ -4,6 +4,8 @@ import { DecoratorFunction, Parameters } from "storybook/internal/types";
4
4
  //#region src/entry-preview-docs.d.ts
5
5
  declare const decorators: DecoratorFunction<StencilRenderer<unknown>>[];
6
6
  declare const parameters: Parameters;
7
+ //# sourceMappingURL=entry-preview-docs.d.ts.map
8
+
7
9
  //#endregion
8
10
  export { decorators, parameters };
9
11
  //# sourceMappingURL=entry-preview-docs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-preview-docs.d.ts","names":[],"sources":["../src/entry-preview-docs.ts"],"sourcesContent":[],"mappings":";;;;cAKa,YAAY,kBAAkB;cAE9B,YAAY;AAFzB"}
@@ -8,10 +8,13 @@ declare function renderToCanvas({
8
8
  showMain,
9
9
  storyContext
10
10
  }: RenderContext<StencilRenderer<unknown>>, canvasElement: StencilRenderer<unknown>['canvasElement']): void;
11
+ //# sourceMappingURL=render.d.ts.map
11
12
  //#endregion
12
13
  //#region src/entry-preview.d.ts
13
14
  declare const parameters: Parameters;
14
15
  declare const argTypesEnhancers: ArgTypesEnhancer[];
16
+ //# sourceMappingURL=entry-preview.d.ts.map
17
+
15
18
  //#endregion
16
19
  export { argTypesEnhancers, parameters, render, renderToCanvas };
17
20
  //# sourceMappingURL=entry-preview.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-preview.d.cts","names":[],"sources":["../src/render.ts","../src/entry-preview.ts"],"sourcesContent":[],"mappings":";;;;cAMa,QAAQ,YAAY;iBAwCjB,cAAA;;;;GACuB,cAAc,0CACpC;AA1CjB;;;cCHa,YAAY;cAIZ,mBAAmB;ADDhC"}
@@ -8,10 +8,13 @@ declare function renderToCanvas({
8
8
  showMain,
9
9
  storyContext
10
10
  }: RenderContext<StencilRenderer<unknown>>, canvasElement: StencilRenderer<unknown>['canvasElement']): void;
11
+ //# sourceMappingURL=render.d.ts.map
11
12
  //#endregion
12
13
  //#region src/entry-preview.d.ts
13
14
  declare const parameters: Parameters;
14
15
  declare const argTypesEnhancers: ArgTypesEnhancer[];
16
+ //# sourceMappingURL=entry-preview.d.ts.map
17
+
15
18
  //#endregion
16
19
  export { argTypesEnhancers, parameters, render, renderToCanvas };
17
20
  //# sourceMappingURL=entry-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-preview.d.ts","names":[],"sources":["../src/render.ts","../src/entry-preview.ts"],"sourcesContent":[],"mappings":";;;;cAMa,QAAQ,YAAY;iBAwCjB,cAAA;;;;GACuB,cAAc,0CACpC;AA1CjB;;;cCHa,YAAY;cAIZ,mBAAmB;ADDhC"}
package/dist/index.d.cts CHANGED
@@ -34,6 +34,8 @@ declare function isValidMetaData(customElements: JsonDocs): boolean;
34
34
  declare function setCustomElements(customElements: any): void;
35
35
  declare function setCustomElementsManifest(customElements: any): void;
36
36
  declare function getCustomElements(): any;
37
+ //# sourceMappingURL=framework-api.d.ts.map
38
+
37
39
  //#endregion
38
40
  //#region src/portable-stories.d.ts
39
41
  /**
@@ -56,6 +58,8 @@ declare function getCustomElements(): any;
56
58
  * @param projectAnnotations - E.g. (import projectAnnotations from '../.storybook/preview')
57
59
  */
58
60
  declare function setProjectAnnotations(projectAnnotations: NamedOrDefaultProjectAnnotations<any> | NamedOrDefaultProjectAnnotations<any>[]): NormalizedProjectAnnotations<StencilRenderer<unknown>>;
61
+ //# sourceMappingURL=portable-stories.d.ts.map
62
+
59
63
  //#endregion
60
64
  export { Decorator, Loader, Meta, Preview, StencilRenderer, StoryContext, StoryFn, StoryObj, StorybookConfig, getCustomElements, isValidComponent, isValidMetaData, setCustomElements, setCustomElementsManifest, setProjectAnnotations };
61
65
  //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":["Promise","sideEffect"],"sources":["../@types/rollup-parseAst.d.ts","../src/framework-api.ts","../src/portable-stories.tsx"],"sourcesContent":["/**\n * Extra type definitions for rollup/parseAst in cases the Rollup version between\n * `@stencil/storybook-plugin` and `unplugin-stencil` is different. This may cause\n * the following type error:\n *\n * ```\n * [ ERROR ] TypeScript: node_modules/vite/dist/node/index.d.ts:5:41\n * Cannot find module 'rollup/parseAst' or its corresponding type\n * declarations.\n *\n * L4: export { rollup as Rollup };\n * L5: export { parseAst, parseAstAsync } from 'rollup/parseAst';\n * L6: import * as http from 'node:http';\n * ```\n *\n * This file is a workaround to make sure the type definitions are available when\n * importing `rollup/parseAst` in `unplugin-stencil`.\n */\ndeclare module 'rollup/parseAst' {\n export function parseAst(code: string, options?: any): any;\n export function parseAstAsync(code: string, options?: any): Promise<any>;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAoBqE;;;;ACjBrE;AAUA;AAaA;AAIA;AAIA;;;8DDd8DA;AES9D;;;iBD1BgB,gBAAA;iBAUA,eAAA,iBAAgC;;iBAahC,iBAAA;iBAIA,yBAAA;iBAIA,iBAAA,CAAA;;;;;;;;;;;;ADdqD;;;;ACjBrE;AAUA;AAaA;AAIA;AAIA;;;;ACLgB,iBAAA,qBAAA,CAAqB,kBAAA,EACf,gCADe,CAAA,GAAA,CAAA,GACyB,gCADzB,CAAA,GAAA,CAAA,EAAA,CAAA,EAElC,4BAFkC,CAEL,eAFK,CAAA,OAAA,CAAA,CAAA"}
package/dist/index.d.ts CHANGED
@@ -10,6 +10,8 @@ declare function isValidMetaData(customElements: JsonDocs): boolean;
10
10
  declare function setCustomElements(customElements: any): void;
11
11
  declare function setCustomElementsManifest(customElements: any): void;
12
12
  declare function getCustomElements(): any;
13
+ //# sourceMappingURL=framework-api.d.ts.map
14
+
13
15
  //#endregion
14
16
  //#region src/portable-stories.d.ts
15
17
  /**
@@ -32,6 +34,7 @@ declare function getCustomElements(): any;
32
34
  * @param projectAnnotations - E.g. (import projectAnnotations from '../.storybook/preview')
33
35
  */
34
36
  declare function setProjectAnnotations(projectAnnotations: NamedOrDefaultProjectAnnotations<any> | NamedOrDefaultProjectAnnotations<any>[]): NormalizedProjectAnnotations<StencilRenderer<unknown>>;
37
+ //# sourceMappingURL=portable-stories.d.ts.map
35
38
  //#endregion
36
39
  export { Decorator, Loader, Meta, Preview, StencilRenderer, StoryContext, StoryFn, StoryObj, StorybookConfig, getCustomElements, isValidComponent, isValidMetaData, setCustomElements, setCustomElementsManifest, setProjectAnnotations };
37
40
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/framework-api.ts","../src/portable-stories.tsx"],"sourcesContent":[],"mappings":";;;;;;iBAGgB,gBAAA;iBAUA,eAAA,iBAAgC;;iBAahC,iBAAA;iBAIA,yBAAA;AA3BA,iBA+BA,iBAAA,CAAA,CA/BgB,EAAA,GAAA;AAUhC;;;;;;;;AAVA;AAUA;AAaA;AAIA;AAIA;;;;ACLA;;;;;;AAE+B;iBAFf,qBAAA,qBACM,wCAAwC,0CAC3D,6BAA6B"}
@@ -2,6 +2,8 @@ import { StorybookConfig } from "../types-BZP9npQ9.cjs";
2
2
 
3
3
  //#region src/node/index.d.ts
4
4
  declare function defineMain(config: StorybookConfig): StorybookConfig;
5
+ //# sourceMappingURL=index.d.ts.map
6
+
5
7
  //#endregion
6
8
  export { defineMain };
7
9
  //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/node/index.ts"],"sourcesContent":[],"mappings":";;;iBAEgB,UAAA,SAAmB,kBAAe"}
@@ -2,6 +2,8 @@ import { StorybookConfig } from "../types-DqHtEV5w.js";
2
2
 
3
3
  //#region src/node/index.d.ts
4
4
  declare function defineMain(config: StorybookConfig): StorybookConfig;
5
+ //# sourceMappingURL=index.d.ts.map
6
+
5
7
  //#endregion
6
8
  export { defineMain };
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/node/index.ts"],"sourcesContent":[],"mappings":";;;iBAEgB,UAAA,SAAmB,kBAAe"}
package/dist/preset.d.cts CHANGED
@@ -4,6 +4,8 @@ import { StorybookConfig } from "./types-BZP9npQ9.cjs";
4
4
  declare const core: StorybookConfig['core'];
5
5
  declare const viteFinal: StorybookConfig['viteFinal'];
6
6
  declare const previewAnnotations: StorybookConfig['previewAnnotations'];
7
+ //# sourceMappingURL=preset.d.ts.map
8
+
7
9
  //#endregion
8
10
  export { core, previewAnnotations, viteFinal };
9
11
  //# sourceMappingURL=preset.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preset.d.cts","names":[],"sources":["../src/preset.ts"],"sourcesContent":[],"mappings":";;;cAkBa,MAAM;cAKN,WAAW;AALX,cA6BA,kBA7BqB,EA6BD,eA7BC,CAAA,oBAAA,CAAA;AAKlC"}
package/dist/preset.d.ts CHANGED
@@ -4,6 +4,8 @@ import { StorybookConfig } from "./types-DqHtEV5w.js";
4
4
  declare const core: StorybookConfig['core'];
5
5
  declare const viteFinal: StorybookConfig['viteFinal'];
6
6
  declare const previewAnnotations: StorybookConfig['previewAnnotations'];
7
+ //# sourceMappingURL=preset.d.ts.map
8
+
7
9
  //#endregion
8
10
  export { core, previewAnnotations, viteFinal };
9
11
  //# sourceMappingURL=preset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preset.d.ts","names":[],"sources":["../src/preset.ts"],"sourcesContent":[],"mappings":";;;cAkBa,MAAM;cAKN,WAAW;AALX,cA6BA,kBA7BqB,EA6BD,eA7BC,CAAA,oBAAA,CAAA;AAKlC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rollup-parseAst-t-4tfMPG.d.ts","names":["Promise","sideEffect"],"sources":["../@types/rollup-parseAst.d.ts"],"sourcesContent":["/**\n * Extra type definitions for rollup/parseAst in cases the Rollup version between\n * `@stencil/storybook-plugin` and `unplugin-stencil` is different. This may cause\n * the following type error:\n *\n * ```\n * [ ERROR ] TypeScript: node_modules/vite/dist/node/index.d.ts:5:41\n * Cannot find module 'rollup/parseAst' or its corresponding type\n * declarations.\n *\n * L4: export { rollup as Rollup };\n * L5: export { parseAst, parseAstAsync } from 'rollup/parseAst';\n * L6: import * as http from 'node:http';\n * ```\n *\n * This file is a workaround to make sure the type definitions are available when\n * importing `rollup/parseAst` in `unplugin-stencil`.\n */\ndeclare module 'rollup/parseAst' {\n export function parseAst(code: string, options?: any): any;\n export function parseAstAsync(code: string, options?: any): Promise<any>;\n}\n"],"mappings":";;;;;;AAoBqE;;;;;;;;;;;;;;;8DAAPA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-BZP9npQ9.d.cts","names":[],"sources":["../src/types.ts"],"sourcesContent":[],"mappings":";;;;;UAgBU,MAAA;;EAAA,UAAM,EAAA,MAAA;EAOX,YAAA,EAAW,MAAA;EAAA,KAAA,CAAA,EAAA,MAAA;;KAAX,WAAA,GAOD,MAAA,GAAA,MAAA,GAAA,OAAA,GAAA,IAAA,GAAA,SAAA,GADA,QACA,GAAA,MAAA,GACA,WADA,EAAA,GAEA,OAFA,CAEQ,WAFR,CAAA,GAGA,KAHA;KAKC,iBAJD,CAAA,KAAA,CAAA,GAI4B,KAJ5B,SAAA;EAAW,QACH,EAAA,GAAA;CAAW,GAAA,KAAnB,GAAA;EAAO,QACP,CAAA,EAOa,WAPb;AAAK,CAAA;AAAA,KASJ,WAPA,CAAA,KAAA,CAAA,GAAiB,CAOK,KAPL,SAOmB,MAPnB,CAAA,GAAA,EAAA,GAAA,CAAA,GAQlB,IARkB,CAQb,KARa,EAAA,GAAA,MAAA,GAAA,CAAA,GAAA,OAAA,SASF,KATE,GAAA,CAAA,CAAA,GAWhB,KAXgB,CAAA,GAYpB,iBAZoB,CAYF,KAZE,CAAA;KAcjB,iBAdiB,CAAA,IAAA,OAAA,CAAA,GAAA;EAAA,QAAU,CAAA,KAAA,EAed,CAfc,EAAA,GAAA,EAAA,MAAA,GAAA,IAAA,EAAA,KAAA,EAAA,MAAA,EAAA,GAAA,CAAA,EAe8B,MAf9B,CAAA,EAeuC,KAfvC;CAAK,CAAA,UAKpB,CAAA;AAAW,KAYvB,SAZuB,CAAA,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,CAAA,EA6B8E,KA7B9E,CAAA;AACuB,KA8BxB,iBAAA,GAAkB,IA9BM,CA8BD,eA9BC,EAAA,WAAA,CAAA,GAAA;EAAC,SAAX,EAAA,2BAAA,GAAA;IAAX,IAAA,EAAA,2BAAA;EAAU,CAAA;CAChB,GA+BL,mBAlCwC;AAAW;AAMvD;;;;AAAwC,KAmCnC,gBAAA,GAAmB,GAAA,CAAW,iBAnCK;AAMxC,KA8BK,cAAA,GAAiB,GAAA,CAAW,OA9BjB;QAAA,MAAA,CAAA;EAAA,UAAS,GAAA,CAAA;IAA6C,UAAA,iBAAA,SAkC9B,gBAlC8B,CAAA,CAAhB;IAAwB,UAAA,OAAA,SAmChD,cAnCgD,CAAA,CAA7C;IAAoB,UAAA,YAAA,CAAA,CAOzC;EAAO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/storybook-plugin",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "Storybook plugin for Stencil",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/stenciljs/storybook",