@stencil/storybook-plugin 0.5.9 → 0.6.0-dev.1783515311.4f8a25b

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.
Files changed (103) hide show
  1. package/README.md +42 -138
  2. package/dist/docs/{index.d.ts → index.d.mts} +2 -4
  3. package/dist/docs/index.d.mts.map +1 -0
  4. package/dist/{docs-DFb4MYCm.js → docs/index.mjs} +17 -30
  5. package/dist/docs/index.mjs.map +1 -0
  6. package/dist/{entry-preview-C1JSJAGq.js → entry-preview-6xYusSlJ.mjs} +19 -22
  7. package/dist/entry-preview-6xYusSlJ.mjs.map +1 -0
  8. package/dist/entry-preview-argtypes.d.mts +14 -0
  9. package/dist/entry-preview-argtypes.d.mts.map +1 -0
  10. package/dist/entry-preview-argtypes.mjs +165 -0
  11. package/dist/entry-preview-argtypes.mjs.map +1 -0
  12. package/dist/entry-preview-auto-docs.d.mts +1 -0
  13. package/dist/entry-preview-auto-docs.mjs +11 -0
  14. package/dist/entry-preview-auto-docs.mjs.map +1 -0
  15. package/dist/{entry-preview-docs.d.ts → entry-preview-docs.d.mts} +2 -4
  16. package/dist/entry-preview-docs.d.mts.map +1 -0
  17. package/dist/{entry-preview-docs.js → entry-preview-docs.mjs} +3 -4
  18. package/dist/entry-preview-docs.mjs.map +1 -0
  19. package/dist/{entry-preview.d.ts → entry-preview.d.mts} +2 -5
  20. package/dist/entry-preview.d.mts.map +1 -0
  21. package/dist/entry-preview.mjs +2 -0
  22. package/dist/framework-api-oAIB4EMV.mjs +27 -0
  23. package/dist/framework-api-oAIB4EMV.mjs.map +1 -0
  24. package/dist/index.d.mts +677 -0
  25. package/dist/index.d.mts.map +1 -0
  26. package/dist/index.mjs +32 -0
  27. package/dist/index.mjs.map +1 -0
  28. package/dist/node/{index.d.ts → index.d.mts} +2 -4
  29. package/dist/node/index.d.mts.map +1 -0
  30. package/dist/node/{index.js → index.mjs} +2 -2
  31. package/dist/node/index.mjs.map +1 -0
  32. package/dist/{preset.d.ts → preset.d.mts} +2 -4
  33. package/dist/preset.d.mts.map +1 -0
  34. package/dist/preset.mjs +35 -0
  35. package/dist/preset.mjs.map +1 -0
  36. package/dist/{rollup-parseAst-t-4tfMPG.d.ts → rollup-parseAst-DL0ij9mb.d.mts} +1 -1
  37. package/dist/rollup-parseAst-DL0ij9mb.d.mts.map +1 -0
  38. package/dist/{types-BZP9npQ9.d.cts → types-KTmT9_JX.d.mts} +2 -2
  39. package/dist/types-KTmT9_JX.d.mts.map +1 -0
  40. package/dist/wizard.d.mts +7 -0
  41. package/dist/wizard.d.mts.map +1 -0
  42. package/dist/wizard.mjs +159 -0
  43. package/dist/wizard.mjs.map +1 -0
  44. package/package.json +34 -35
  45. package/preset.js +1 -2
  46. package/dist/chunk-CsX-DzYB.cjs +0 -42
  47. package/dist/docs/index.cjs +0 -4
  48. package/dist/docs/index.d.cts +0 -15
  49. package/dist/docs/index.d.cts.map +0 -1
  50. package/dist/docs/index.d.ts.map +0 -1
  51. package/dist/docs/index.js +0 -3
  52. package/dist/docs-DFb4MYCm.js.map +0 -1
  53. package/dist/docs-ONVKsKI9.cjs +0 -97
  54. package/dist/docs-ONVKsKI9.cjs.map +0 -1
  55. package/dist/entry-preview-C0ipNwpw.cjs +0 -85
  56. package/dist/entry-preview-C0ipNwpw.cjs.map +0 -1
  57. package/dist/entry-preview-C1JSJAGq.js.map +0 -1
  58. package/dist/entry-preview-argtypes.cjs +0 -182
  59. package/dist/entry-preview-argtypes.cjs.map +0 -1
  60. package/dist/entry-preview-argtypes.d.cts +0 -19
  61. package/dist/entry-preview-argtypes.d.cts.map +0 -1
  62. package/dist/entry-preview-argtypes.d.ts +0 -19
  63. package/dist/entry-preview-argtypes.d.ts.map +0 -1
  64. package/dist/entry-preview-argtypes.js +0 -181
  65. package/dist/entry-preview-argtypes.js.map +0 -1
  66. package/dist/entry-preview-docs.cjs +0 -19
  67. package/dist/entry-preview-docs.cjs.map +0 -1
  68. package/dist/entry-preview-docs.d.cts +0 -11
  69. package/dist/entry-preview-docs.d.cts.map +0 -1
  70. package/dist/entry-preview-docs.d.ts.map +0 -1
  71. package/dist/entry-preview-docs.js.map +0 -1
  72. package/dist/entry-preview.cjs +0 -6
  73. package/dist/entry-preview.d.cts +0 -20
  74. package/dist/entry-preview.d.cts.map +0 -1
  75. package/dist/entry-preview.d.ts.map +0 -1
  76. package/dist/entry-preview.js +0 -3
  77. package/dist/index.cjs +0 -9
  78. package/dist/index.d.cts +0 -65
  79. package/dist/index.d.cts.map +0 -1
  80. package/dist/index.d.ts +0 -40
  81. package/dist/index.d.ts.map +0 -1
  82. package/dist/index.js +0 -5
  83. package/dist/node/index.cjs +0 -9
  84. package/dist/node/index.cjs.map +0 -1
  85. package/dist/node/index.d.cts +0 -9
  86. package/dist/node/index.d.cts.map +0 -1
  87. package/dist/node/index.d.ts.map +0 -1
  88. package/dist/node/index.js.map +0 -1
  89. package/dist/preset.cjs +0 -35
  90. package/dist/preset.cjs.map +0 -1
  91. package/dist/preset.d.cts +0 -11
  92. package/dist/preset.d.cts.map +0 -1
  93. package/dist/preset.d.ts.map +0 -1
  94. package/dist/preset.js +0 -32
  95. package/dist/preset.js.map +0 -1
  96. package/dist/rollup-parseAst-t-4tfMPG.d.ts.map +0 -1
  97. package/dist/src-BBcTbcCa.js +0 -55
  98. package/dist/src-BBcTbcCa.js.map +0 -1
  99. package/dist/src-D0dJRYm2.cjs +0 -91
  100. package/dist/src-D0dJRYm2.cjs.map +0 -1
  101. package/dist/types-BZP9npQ9.d.cts.map +0 -1
  102. package/dist/types-DqHtEV5w.d.ts +0 -71
  103. package/dist/types-DqHtEV5w.d.ts.map +0 -1
@@ -0,0 +1,677 @@
1
+ import { a as StencilRenderer, c as StoryObj, i as Preview, l as StorybookConfig, n as Loader, o as StoryContext, r as Meta, s as StoryFn, t as Decorator } from "./types-KTmT9_JX.mjs";
2
+ import { NamedOrDefaultProjectAnnotations, NormalizedProjectAnnotations } from "storybook/internal/types";
3
+
4
+ //#region ../../node_modules/.pnpm/custom-elements-manifest@2.1.0/node_modules/custom-elements-manifest/schema.d.ts
5
+ /**
6
+ * @license
7
+ * Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
8
+ * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
9
+ * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
10
+ * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
11
+ * Code distributed by Google as part of the polymer project is also
12
+ * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
13
+ */
14
+ /**
15
+ * @license
16
+ * Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
17
+ * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
18
+ * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
19
+ * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
20
+ * Code distributed by Google as part of the polymer project is also
21
+ * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
22
+ */
23
+ /**
24
+ * The top-level interface of a custom elements manifest file.
25
+ *
26
+ * Because custom elements are JavaScript classes, describing a custom element
27
+ * may require describing arbitrary JavaScript concepts like modules, classes,
28
+ * functions, etc. So custom elements manifests are capable of documenting
29
+ * the elements in a package, as well as those JavaScript concepts.
30
+ *
31
+ * The modules described in a package should be the public entrypoints that
32
+ * other packages may import from. Multiple modules may export the same object
33
+ * via re-exports, but in most cases a package should document the single
34
+ * canonical export that should be used.
35
+ */
36
+ interface Package {
37
+ /**
38
+ * The version of the schema used in this file.
39
+ */
40
+ schemaVersion: string;
41
+ /**
42
+ * The Markdown to use for the main readme of this package.
43
+ *
44
+ * This can be used to override the readme used by Github or npm if that
45
+ * file contains information irrelevant to custom element catalogs and
46
+ * documentation viewers.
47
+ */
48
+ readme?: string;
49
+ /**
50
+ * An array of the modules this package contains.
51
+ */
52
+ modules: Array<Module>;
53
+ /**
54
+ * Whether the package is deprecated.
55
+ * If the value is a string, it's the reason for the deprecation.
56
+ */
57
+ deprecated?: boolean | string;
58
+ }
59
+ // This type may expand in the future to include JSON, CSS, or HTML
60
+ // modules.
61
+ type Module = JavaScriptModule;
62
+ interface JavaScriptModule {
63
+ kind: 'javascript-module';
64
+ /**
65
+ * Path to the javascript file needed to be imported.
66
+ * (not the path for example to a typescript file.)
67
+ */
68
+ path: string;
69
+ /**
70
+ * A markdown summary suitable for display in a listing.
71
+ */
72
+ summary?: string;
73
+ /**
74
+ * A markdown description of the module.
75
+ */
76
+ description?: string;
77
+ /**
78
+ * The declarations of a module.
79
+ *
80
+ * For documentation purposes, all declarations that are reachable from
81
+ * exports should be described here. Ie, functions and objects that may be
82
+ * properties of exported objects, or passed as arguments to functions.
83
+ */
84
+ declarations?: Array<Declaration>;
85
+ /**
86
+ * The exports of a module. This includes JavaScript exports and
87
+ * custom element definitions.
88
+ */
89
+ exports?: Array<Export>;
90
+ /**
91
+ * Whether the module is deprecated.
92
+ * If the value is a string, it's the reason for the deprecation.
93
+ */
94
+ deprecated?: boolean | string;
95
+ }
96
+ type Export = JavaScriptExport | CustomElementExport;
97
+ interface JavaScriptExport {
98
+ kind: 'js';
99
+ /**
100
+ * The name of the exported symbol.
101
+ *
102
+ * JavaScript has a number of ways to export objects which determine the
103
+ * correct name to use.
104
+ *
105
+ * - Default exports must use the name "default".
106
+ * - Named exports use the name that is exported. If the export is renamed
107
+ * with the "as" clause, use the exported name.
108
+ * - Aggregating exports (`* from`) should use the name `*`
109
+ */
110
+ name: string;
111
+ /**
112
+ * A reference to the exported declaration.
113
+ *
114
+ * In the case of aggregating exports, the reference's `module` field must be
115
+ * defined and the `name` field must be `"*"`.
116
+ */
117
+ declaration: Reference;
118
+ /**
119
+ * Whether the export is deprecated. For example, the name of the export was changed.
120
+ * If the value is a string, it's the reason for the deprecation.
121
+ */
122
+ deprecated?: boolean | string;
123
+ }
124
+ /**
125
+ * A global custom element defintion, ie the result of a
126
+ * `customElements.define()` call.
127
+ *
128
+ * This is represented as an export because a definition makes the element
129
+ * available outside of the module it's defined it.
130
+ */
131
+ interface CustomElementExport {
132
+ kind: 'custom-element-definition';
133
+ /**
134
+ * The tag name of the custom element.
135
+ */
136
+ name: string;
137
+ /**
138
+ * A reference to the class or other declaration that implements the
139
+ * custom element.
140
+ */
141
+ declaration: Reference;
142
+ /**
143
+ * Whether the custom-element export is deprecated.
144
+ * For example, a future version will not register the custom element in this file.
145
+ * If the value is a string, it's the reason for the deprecation.
146
+ */
147
+ deprecated?: boolean | string;
148
+ }
149
+ type Declaration = ClassDeclaration | FunctionDeclaration | MixinDeclaration | VariableDeclaration | CustomElementDeclaration | CustomElementMixinDeclaration;
150
+ /**
151
+ * A reference to an export of a module.
152
+ *
153
+ * All references are required to be publically accessible, so the canonical
154
+ * representation of a reference is the export it's available from.
155
+ *
156
+ * `package` should generally refer to an npm package name. If `package` is
157
+ * undefined then the reference is local to this package. If `module` is
158
+ * undefined the reference is local to the containing module.
159
+ *
160
+ * References to global symbols like `Array`, `HTMLElement`, or `Event` should
161
+ * use a `package` name of `"global:"`.
162
+ */
163
+ interface Reference {
164
+ name: string;
165
+ package?: string;
166
+ module?: string;
167
+ }
168
+ /**
169
+ * A reference to the source of a declaration or member.
170
+ */
171
+ interface SourceReference {
172
+ /**
173
+ * An absolute URL to the source (ie. a GitHub URL).
174
+ */
175
+ href: string;
176
+ }
177
+ /**
178
+ * A description of a custom element class.
179
+ *
180
+ * Custom elements are JavaScript classes, so this extends from
181
+ * `ClassDeclaration` and adds custom-element-specific features like
182
+ * attributes, events, and slots.
183
+ *
184
+ * Note that `tagName` in this interface is optional. Tag names are not
185
+ * neccessarily part of a custom element class, but belong to the definition
186
+ * (often called the "registration") or the `customElements.define()` call.
187
+ *
188
+ * Because classes and tag names can only be registered once, there's a
189
+ * one-to-one relationship between classes and tag names. For ease of use,
190
+ * we allow the tag name here.
191
+ *
192
+ * Some packages define and register custom elements in separate modules. In
193
+ * these cases one `Module` should contain the `CustomElement` without a
194
+ * tagName, and another `Module` should contain the
195
+ * `CustomElementExport`.
196
+ */
197
+ // Note: this needs to be an interface to be included in the generated JSON
198
+ // Schema output.
199
+ interface CustomElementDeclaration extends ClassDeclaration, CustomElement {}
200
+ /**
201
+ * The additional fields that a custom element adds to classes and mixins.
202
+ */
203
+ interface CustomElement extends ClassLike {
204
+ /**
205
+ * An optional tag name that should be specified if this is a
206
+ * self-registering element.
207
+ *
208
+ * Self-registering elements must also include a CustomElementExport
209
+ * in the module's exports.
210
+ */
211
+ tagName?: string;
212
+ /**
213
+ * The attributes that this element is known to understand.
214
+ */
215
+ attributes?: Attribute[];
216
+ /**
217
+ * The events that this element fires.
218
+ */
219
+ events?: Event[];
220
+ /**
221
+ * The shadow dom content slots that this element accepts.
222
+ */
223
+ slots?: Slot[];
224
+ cssParts?: CssPart[];
225
+ cssProperties?: CssCustomProperty[];
226
+ cssStates?: CssCustomState[];
227
+ demos?: Demo[];
228
+ /**
229
+ * Distinguishes a regular JavaScript class from a
230
+ * custom element class
231
+ */
232
+ customElement: true;
233
+ }
234
+ interface Attribute {
235
+ name: string;
236
+ /**
237
+ * A markdown summary suitable for display in a listing.
238
+ */
239
+ summary?: string;
240
+ /**
241
+ * A markdown description.
242
+ */
243
+ description?: string;
244
+ inheritedFrom?: Reference;
245
+ /**
246
+ * The type that the attribute will be serialized/deserialized as.
247
+ */
248
+ type?: Type;
249
+ /**
250
+ * The default value of the attribute, if any.
251
+ *
252
+ * As attributes are always strings, this is the actual value, not a human
253
+ * readable description.
254
+ */
255
+ default?: string;
256
+ /**
257
+ * The name of the field this attribute is associated with, if any.
258
+ */
259
+ fieldName?: string;
260
+ /**
261
+ * Whether the attribute is deprecated.
262
+ * If the value is a string, it's the reason for the deprecation.
263
+ */
264
+ deprecated?: boolean | string;
265
+ }
266
+ interface Event {
267
+ name: string;
268
+ /**
269
+ * A markdown summary suitable for display in a listing.
270
+ */
271
+ summary?: string;
272
+ /**
273
+ * A markdown description.
274
+ */
275
+ description?: string;
276
+ /**
277
+ * The type of the event object that's fired.
278
+ */
279
+ type: Type;
280
+ inheritedFrom?: Reference;
281
+ /**
282
+ * Whether the event is deprecated.
283
+ * If the value is a string, it's the reason for the deprecation.
284
+ */
285
+ deprecated?: boolean | string;
286
+ }
287
+ interface Slot {
288
+ /**
289
+ * The slot name, or the empty string for an unnamed slot.
290
+ */
291
+ name: string;
292
+ /**
293
+ * A markdown summary suitable for display in a listing.
294
+ */
295
+ summary?: string;
296
+ /**
297
+ * A markdown description.
298
+ */
299
+ description?: string;
300
+ /**
301
+ * Whether the slot is deprecated.
302
+ * If the value is a string, it's the reason for the deprecation.
303
+ */
304
+ deprecated?: boolean | string;
305
+ }
306
+ /**
307
+ * The description of a CSS Part
308
+ */
309
+ interface CssPart {
310
+ name: string;
311
+ /**
312
+ * A markdown summary suitable for display in a listing.
313
+ */
314
+ summary?: string;
315
+ /**
316
+ * A markdown description.
317
+ */
318
+ description?: string;
319
+ /**
320
+ * Whether the CSS shadow part is deprecated.
321
+ * If the value is a string, it's the reason for the deprecation.
322
+ */
323
+ deprecated?: boolean | string;
324
+ }
325
+ /**
326
+ * The description of a CSS Custom State
327
+ * https://developer.mozilla.org/en-US/docs/Web/API/CustomStateSet
328
+ */
329
+ interface CssCustomState {
330
+ /**
331
+ * The name of the state. Note: Unlike CSS custom properties, custom states
332
+ * do not have a leading `--`.
333
+ */
334
+ name: string;
335
+ /**
336
+ * A markdown summary suitable for display in a listing.
337
+ */
338
+ summary?: string;
339
+ /**
340
+ * A markdown description.
341
+ */
342
+ description?: string;
343
+ /**
344
+ * Whether the CSS custom state is deprecated.
345
+ * If the value is a string, it's the reason for the deprecation.
346
+ */
347
+ deprecated?: boolean | string;
348
+ }
349
+ interface CssCustomProperty {
350
+ /**
351
+ * The name of the property, including leading `--`.
352
+ */
353
+ name: string;
354
+ /**
355
+ * The expected syntax of the defined property. Defaults to "*".
356
+ *
357
+ * The syntax must be a valid CSS [syntax string](https://developer.mozilla.org/en-US/docs/Web/CSS/@property/syntax)
358
+ * as defined in the CSS Properties and Values API.
359
+ *
360
+ * Examples:
361
+ *
362
+ * "<color>": accepts a color
363
+ * "<length> | <percentage>": accepts lengths or percentages but not calc expressions with a combination of the two
364
+ * "small | medium | large": accepts one of these values set as custom idents.
365
+ * "*": any valid token
366
+ */
367
+ syntax?: string;
368
+ default?: string;
369
+ /**
370
+ * A markdown summary suitable for display in a listing.
371
+ */
372
+ summary?: string;
373
+ /**
374
+ * A markdown description.
375
+ */
376
+ description?: string;
377
+ /**
378
+ * Whether the CSS custom property is deprecated.
379
+ * If the value is a string, it's the reason for the deprecation.
380
+ */
381
+ deprecated?: boolean | string;
382
+ }
383
+ interface Type {
384
+ /**
385
+ * The full string representation of the type, in whatever type syntax is
386
+ * used, such as JSDoc, Closure, or TypeScript.
387
+ */
388
+ text: string;
389
+ /**
390
+ * An array of references to the types in the type string.
391
+ *
392
+ * These references have optional indices into the type string so that tools
393
+ * can understand the references in the type string independently of the type
394
+ * system and syntax. For example, a documentation viewer could display the
395
+ * type `Array<FooElement | BarElement>` with cross-references to `FooElement`
396
+ * and `BarElement` without understanding arrays, generics, or union types.
397
+ */
398
+ references?: TypeReference[];
399
+ source?: SourceReference;
400
+ }
401
+ /**
402
+ * A reference that is associated with a type string and optionally a range
403
+ * within the string.
404
+ *
405
+ * Start and end must both be present or not present. If they're present, they
406
+ * are indices into the associated type string. If they are missing, the entire
407
+ * type string is the symbol referenced and the name should match the type
408
+ * string.
409
+ */
410
+ interface TypeReference extends Reference {
411
+ start?: number;
412
+ end?: number;
413
+ }
414
+ /**
415
+ * The common interface of classes and mixins.
416
+ */
417
+ interface ClassLike {
418
+ name: string;
419
+ /**
420
+ * A markdown summary suitable for display in a listing.
421
+ */
422
+ summary?: string;
423
+ /**
424
+ * A markdown description of the class.
425
+ */
426
+ description?: string;
427
+ /**
428
+ * The superclass of this class.
429
+ *
430
+ * If this class is defined with mixin applications, the prototype chain
431
+ * includes the mixin applications and the true superclass is computed
432
+ * from them.
433
+ */
434
+ superclass?: Reference;
435
+ /**
436
+ * Any class mixins applied in the extends clause of this class.
437
+ *
438
+ * If mixins are applied in the class definition, then the true superclass
439
+ * of this class is the result of applying mixins in order to the superclass.
440
+ *
441
+ * Mixins must be listed in order of their application to the superclass or
442
+ * previous mixin application. This means that the innermost mixin is listed
443
+ * first. This may read backwards from the common order in JavaScript, but
444
+ * matches the order of language used to describe mixin application, like
445
+ * "S with A, B".
446
+ *
447
+ * @example
448
+ *
449
+ * ```javascript
450
+ * class T extends B(A(S)) {}
451
+ * ```
452
+ *
453
+ * is described by:
454
+ * ```json
455
+ * {
456
+ * "kind": "class",
457
+ * "superclass": {
458
+ * "name": "S"
459
+ * },
460
+ * "mixins": [
461
+ * {
462
+ * "name": "A"
463
+ * },
464
+ * {
465
+ * "name": "B"
466
+ * },
467
+ * ]
468
+ * }
469
+ * ```
470
+ */
471
+ mixins?: Array<Reference>;
472
+ members?: Array<ClassMember>;
473
+ source?: SourceReference;
474
+ /**
475
+ * Whether the class or mixin is deprecated.
476
+ * If the value is a string, it's the reason for the deprecation.
477
+ */
478
+ deprecated?: boolean | string;
479
+ }
480
+ interface ClassDeclaration extends ClassLike {
481
+ kind: 'class';
482
+ }
483
+ type ClassMember = ClassField | ClassMethod;
484
+ /**
485
+ * The common interface of variables, class fields, and function
486
+ * parameters.
487
+ */
488
+ interface PropertyLike {
489
+ name: string;
490
+ /**
491
+ * A markdown summary suitable for display in a listing.
492
+ */
493
+ summary?: string;
494
+ /**
495
+ * A markdown description of the field.
496
+ */
497
+ description?: string;
498
+ type?: Type;
499
+ default?: string;
500
+ /**
501
+ * Whether the property is deprecated.
502
+ * If the value is a string, it's the reason for the deprecation.
503
+ */
504
+ deprecated?: boolean | string;
505
+ /**
506
+ * Whether the property is read-only.
507
+ */
508
+ readonly?: boolean;
509
+ }
510
+ interface ClassField extends PropertyLike {
511
+ kind: 'field';
512
+ static?: boolean;
513
+ privacy?: Privacy;
514
+ inheritedFrom?: Reference;
515
+ source?: SourceReference;
516
+ }
517
+ interface ClassMethod extends FunctionLike {
518
+ kind: 'method';
519
+ static?: boolean;
520
+ privacy?: Privacy;
521
+ inheritedFrom?: Reference;
522
+ source?: SourceReference;
523
+ }
524
+ /**
525
+ * A description of a class mixin.
526
+ *
527
+ * Mixins are functions which generate a new subclass of a given superclass.
528
+ * This interfaces describes the class and custom element features that
529
+ * are added by the mixin. As such, it extends the CustomElement interface and
530
+ * ClassLike interface.
531
+ *
532
+ * Since mixins are functions, it also extends the FunctionLike interface. This
533
+ * means a mixin is callable, and has parameters and a return type.
534
+ *
535
+ * The return type is often hard or impossible to accurately describe in type
536
+ * systems like TypeScript. It requires generics and an `extends` operator
537
+ * that TypeScript lacks. Therefore it's recommended that the return type is
538
+ * left empty. The most common form of a mixin function takes a single
539
+ * argument, so consumers of this interface should assume that the return type
540
+ * is the single argument subclassed by this declaration.
541
+ *
542
+ * A mixin should not have a superclass. If a mixins composes other mixins,
543
+ * they should be listed in the `mixins` field.
544
+ *
545
+ * See [this article]{@link https://justinfagnani.com/2015/12/21/real-mixins-with-javascript-classes/}
546
+ * for more information on the classmixin pattern in JavaScript.
547
+ *
548
+ * @example
549
+ *
550
+ * This JavaScript mixin declaration:
551
+ * ```javascript
552
+ * const MyMixin = (base) => class extends base {
553
+ * foo() { ... }
554
+ * }
555
+ * ```
556
+ *
557
+ * Is described by this JSON:
558
+ * ```json
559
+ * {
560
+ * "kind": "mixin",
561
+ * "name": "MyMixin",
562
+ * "parameters": [
563
+ * {
564
+ * "name": "base",
565
+ * }
566
+ * ],
567
+ * "members": [
568
+ * {
569
+ * "kind": "method",
570
+ * "name": "foo",
571
+ * }
572
+ * ]
573
+ * }
574
+ * ```
575
+ */
576
+ interface MixinDeclaration extends ClassLike, FunctionLike {
577
+ kind: 'mixin';
578
+ }
579
+ /**
580
+ * A class mixin that also adds custom element related properties.
581
+ */
582
+ // Note: this needs to be an interface to be included in the generated JSON
583
+ // Schema output.
584
+ interface CustomElementMixinDeclaration extends MixinDeclaration, CustomElement {}
585
+ interface VariableDeclaration extends PropertyLike {
586
+ kind: 'variable';
587
+ source?: SourceReference;
588
+ }
589
+ interface FunctionDeclaration extends FunctionLike {
590
+ kind: 'function';
591
+ source?: SourceReference;
592
+ }
593
+ interface Parameter extends PropertyLike {
594
+ /**
595
+ * Whether the parameter is optional. Undefined implies non-optional.
596
+ */
597
+ optional?: boolean;
598
+ /**
599
+ * Whether the parameter is a rest parameter. Only the last parameter may be a rest parameter.
600
+ * Undefined implies single parameter.
601
+ */
602
+ rest?: boolean;
603
+ }
604
+ interface FunctionLike {
605
+ name: string;
606
+ /**
607
+ * A markdown summary suitable for display in a listing.
608
+ */
609
+ summary?: string;
610
+ /**
611
+ * A markdown description.
612
+ */
613
+ description?: string;
614
+ /**
615
+ * Whether the function is deprecated.
616
+ * If the value is a string, it's the reason for the deprecation.
617
+ */
618
+ deprecated?: boolean | string;
619
+ parameters?: Parameter[];
620
+ return?: {
621
+ type?: Type;
622
+ /**
623
+ * A markdown summary suitable for display in a listing.
624
+ */
625
+ summary?: string;
626
+ /**
627
+ * A markdown description.
628
+ */
629
+ description?: string;
630
+ };
631
+ }
632
+ type Privacy = 'public' | 'private' | 'protected';
633
+ interface Demo {
634
+ /**
635
+ * A markdown description of the demo.
636
+ */
637
+ description?: string;
638
+ /**
639
+ * Relative URL of the demo if it's published with the package. Absolute URL
640
+ * if it's hosted.
641
+ */
642
+ url: string;
643
+ source?: SourceReference;
644
+ }
645
+ //#endregion
646
+ //#region src/framework-api.d.ts
647
+ declare function isValidComponent(tagName: string): boolean;
648
+ declare function isValidMetaData(cem: unknown): cem is Package;
649
+ /** @param customElements `any` for now as spec is not super stable yet */
650
+ declare function setCustomElements(customElements: any): void;
651
+ declare function setCustomElementsManifest(cem: Package): void;
652
+ declare function getCustomElements(): Package | undefined;
653
+ //#endregion
654
+ //#region src/portable-stories.d.ts
655
+ /**
656
+ * Function that sets the globalConfig of your storybook. The global config is the preview module of
657
+ * your .storybook folder.
658
+ *
659
+ * It should be run a single time, so that your global config (e.g. decorators) is applied to your
660
+ * stories when using `composeStories` or `composeStory`.
661
+ *
662
+ * Example:
663
+ *
664
+ * ```jsx
665
+ * // setup-file.js
666
+ * import { setProjectAnnotations } from '@storybook/web-components';
667
+ * import projectAnnotations from './.storybook/preview';
668
+ *
669
+ * setProjectAnnotations(projectAnnotations);
670
+ * ```
671
+ *
672
+ * @param projectAnnotations - E.g. (import projectAnnotations from '../.storybook/preview')
673
+ */
674
+ declare function setProjectAnnotations(projectAnnotations: NamedOrDefaultProjectAnnotations<any> | NamedOrDefaultProjectAnnotations<any>[]): NormalizedProjectAnnotations<StencilRenderer<unknown>>;
675
+ //#endregion
676
+ export { Decorator, Loader, Meta, Preview, StencilRenderer, StoryContext, StoryFn, StoryObj, StorybookConfig, getCustomElements, isValidComponent, isValidMetaData, setCustomElements, setCustomElementsManifest, setProjectAnnotations };
677
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":["schemaVersion","readme","modules","Array","Module","deprecated","JavaScriptModule","kind","path","summary","description","declarations","Declaration","exports","Export","JavaScriptExport","CustomElementExport","name","declaration","Reference","ClassDeclaration","FunctionDeclaration","MixinDeclaration","VariableDeclaration","CustomElementDeclaration","CustomElementMixinDeclaration","package","module","href","CustomElement","ClassLike","tagName","attributes","Attribute","events","Event","slots","Slot","cssParts","CssPart","cssProperties","CssCustomProperty","cssStates","CssCustomState","demos","Demo","customElement","inheritedFrom","type","Type","default","fieldName","syntax","text","references","TypeReference","source","SourceReference","start","end","superclass","mixins","members","ClassMember","ClassField","ClassMethod","readonly","PropertyLike","static","privacy","Privacy","attribute","reflects","FunctionLike","optional","rest","parameters","Parameter","return","url"],"sources":["../../../node_modules/.pnpm/custom-elements-manifest@2.1.0/node_modules/custom-elements-manifest/schema.d.ts","../src/framework-api.ts","../src/portable-stories.tsx"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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