@stencil/core 5.0.0-alpha.2 → 5.0.0-alpha.3

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 (42) hide show
  1. package/dist/{client-DucyoZT4.mjs → client-CSm3x5ke.mjs} +81 -60
  2. package/dist/compiler/index.d.mts +3 -3
  3. package/dist/compiler/index.mjs +2 -2
  4. package/dist/compiler/utils/index.d.mts +2 -2
  5. package/dist/compiler/utils/index.mjs +3 -3
  6. package/dist/{compiler-DyK1_szo.mjs → compiler-D6iP7Bzb.mjs} +1390 -1631
  7. package/dist/declarations/stencil-public-compiler.d.ts +4031 -2
  8. package/dist/declarations/stencil-public-compiler.js +0 -1
  9. package/dist/declarations/stencil-public-docs.d.ts +494 -1
  10. package/dist/declarations/stencil-public-runtime.d.ts +1943 -2
  11. package/dist/{index-fIuYTL9f.d.mts → index-CXHCTQNt.d.mts} +14 -2
  12. package/dist/{index-BONzXKJt.d.ts → index-CyrGY82h.d.ts} +5 -7
  13. package/dist/{index-CHjZtib0.d.ts → index-hS-KBdAP.d.ts} +1 -1
  14. package/dist/{index-D-LlB2nw.d.mts → index-tUR6pD3J.d.mts} +145 -809
  15. package/dist/index.d.mts +1 -0
  16. package/dist/index.mjs +2 -2
  17. package/dist/{jsx-runtime-DBzBJLKk.d.ts → jsx-runtime-DlDkTqps.d.ts} +1 -1
  18. package/dist/jsx-runtime.d.ts +1 -1
  19. package/dist/jsx-runtime.js +1 -1
  20. package/dist/{node-BWBQAh8C.mjs → node-Bg-mO5dw.mjs} +3 -14
  21. package/dist/regular-expression-D5pGVpCu.mjs +415 -0
  22. package/dist/runtime/app-data/index.d.ts +1 -1
  23. package/dist/runtime/app-data/index.js +1 -2
  24. package/dist/runtime/client/index.d.ts +14 -4
  25. package/dist/runtime/client/index.js +103 -205
  26. package/dist/runtime/index.d.ts +16 -4
  27. package/dist/runtime/index.js +2 -2
  28. package/dist/runtime/server/index.d.mts +1 -3
  29. package/dist/runtime/server/index.mjs +103 -205
  30. package/dist/runtime/server/runner.d.mts +1 -17
  31. package/dist/runtime/server/runner.mjs +12 -394
  32. package/dist/{runtime-CqlPYKjW.js → runtime-BBCnuprF.js} +103 -205
  33. package/dist/sys/node/index.d.mts +1 -1
  34. package/dist/sys/node/index.mjs +1 -1
  35. package/dist/sys/node/worker.mjs +2 -2
  36. package/dist/testing/index.d.mts +3 -3
  37. package/dist/testing/index.mjs +18 -17
  38. package/dist/{validation-BR7tMYEv.mjs → validation-Byxie0Uk.mjs} +28 -24
  39. package/package.json +9 -13
  40. package/dist/serialize-o-Sj1lvg.mjs +0 -792
  41. package/dist/stencil-public-compiler-C_X1iolo.d.ts +0 -4455
  42. package/dist/stencil-public-runtime-DlV8o7-z.d.ts +0 -1845
@@ -1,4 +1,3 @@
1
- import "./stencil-public-docs.js";
2
1
  //#region src/declarations/stencil-public-compiler.ts
3
2
  /**
4
3
  * This sets the log level hierarchy for our terminal logger, ranging from
@@ -1,2 +1,495 @@
1
- import { $n as JsonDocsValue, Bn as JsonDocsCustomState, Gn as JsonDocsMethodReturn, Hn as JsonDocsEvent, Jn as JsonDocsSlot, Kn as JsonDocsPart, Ln as JsonDocMethodParameter, Qn as JsonDocsUsage, Rn as JsonDocs, Un as JsonDocsListener, Vn as JsonDocsDependencyGraph, Wn as JsonDocsMethod, Xn as JsonDocsTag, Yn as JsonDocsStyle, Zn as JsonDocsTypeLibrary, er as StyleDoc, qn as JsonDocsProp, zn as JsonDocsComponent } from "../stencil-public-compiler-C_X1iolo.js";
1
+ //#region src/declarations/stencil-private.d.ts
2
+ /**
3
+ * Information about a type used in a Stencil component or exported
4
+ * from a Stencil project.
5
+ */
6
+ interface ComponentCompilerPropertyComplexType {
7
+ /**
8
+ * The string of the original type annotation in the Stencil source code
9
+ */
10
+ original: string;
11
+ /**
12
+ * A 'resolved' type, where e.g. imported types have been resolved and inlined
13
+ *
14
+ * For instance, an annotation like `(foo: Foo) => string;` will be
15
+ * converted to `(foo: { foo: string }) => string;`.
16
+ */
17
+ resolved: string;
18
+ /**
19
+ * A record of the types which were referenced in the assorted type
20
+ * annotation in the original source file.
21
+ */
22
+ references: ComponentCompilerTypeReferences;
23
+ }
24
+ /**
25
+ * A record of `ComponentCompilerTypeReference` entities.
26
+ *
27
+ * Each key in this record is intended to be the names of the types used by a component. However, this is not enforced
28
+ * by the type system (I.E. any string can be used as a key).
29
+ *
30
+ * Note any key can be a user defined type or a TypeScript standard type.
31
+ */
32
+ type ComponentCompilerTypeReferences = Record<string, ComponentCompilerTypeReference>;
33
+ /**
34
+ * Describes a reference to a type used by a component.
35
+ */
36
+ interface ComponentCompilerTypeReference {
37
+ /**
38
+ * A type may be defined:
39
+ * - locally (in the same file as the component that uses it)
40
+ * - globally
41
+ * - by importing it into a file (and is defined elsewhere)
42
+ */
43
+ location: 'local' | 'global' | 'import';
44
+ /**
45
+ * The path to the type reference, if applicable (global types should not need a path associated with them)
46
+ */
47
+ path?: string;
48
+ /**
49
+ * An ID for this type which is unique within a Stencil project.
50
+ */
51
+ id: string;
52
+ /**
53
+ * Whether this type was imported as a default import (e.g., `import MyEnum from './my-enum'`)
54
+ * vs a named import (e.g., `import { MyType } from './my-type'`)
55
+ */
56
+ isDefault?: boolean;
57
+ /**
58
+ * The name used in the import statement (before any user-defined alias).
59
+ * For `import { XAxisOption as moo }`, this would be "XAxisOption".
60
+ * This is the name exported by the source module.
61
+ */
62
+ referenceLocation?: string;
63
+ }
64
+ /**
65
+ * Information about a type which is referenced by another type on a Stencil
66
+ * component, for instance a {@link ComponentCompilerPropertyComplexType} or a
67
+ * {@link ComponentCompilerEventComplexType}.
68
+ */
69
+ interface ComponentCompilerReferencedType {
70
+ /**
71
+ * The path to the module where the type is declared.
72
+ */
73
+ path: string;
74
+ /**
75
+ * The string of the original type annotation in the Stencil source code
76
+ */
77
+ declaration: string;
78
+ /**
79
+ * An extracted docstring
80
+ */
81
+ docstring: string;
82
+ }
83
+ interface ComponentCompilerEventComplexType {
84
+ original: string;
85
+ resolved: string;
86
+ references: ComponentCompilerTypeReferences;
87
+ }
88
+ interface ComponentCompilerMethodComplexType {
89
+ signature: string;
90
+ parameters: JsonDocMethodParameter[];
91
+ references: ComponentCompilerTypeReferences;
92
+ return: string;
93
+ }
94
+ //#endregion
95
+ //#region src/declarations/stencil-public-docs.d.ts
96
+ /**
97
+ * The Type Library holds information about the types which are used in a
98
+ * Stencil project. During compilation, Stencil gathers information about the
99
+ * types which form part of a component's public API, such as properties
100
+ * decorated with `@Prop`, `@Event`, `@Watch`, etc. This type information is
101
+ * then added to the Type Library, where it can be accessed later on for
102
+ * generating documentation.
103
+ *
104
+ * This information is included in the file written by the `docs-json` output
105
+ * target (see {@link JsonDocs.typeLibrary}).
106
+ */
107
+ type JsonDocsTypeLibrary = Record<string, ComponentCompilerReferencedType>;
108
+ /**
109
+ * A container for JSDoc metadata for a project
110
+ */
111
+ interface JsonDocs {
112
+ /**
113
+ * The metadata for the JSDocs for each component in a Stencil project
114
+ */
115
+ components: JsonDocsComponent[];
116
+ /**
117
+ * The timestamp at which the metadata was generated, in the format YYYY-MM-DDThh:mm:ss
118
+ */
119
+ timestamp: string;
120
+ compiler: {
121
+ /**
122
+ * The name of the compiler that generated the metadata
123
+ */
124
+ name: string;
125
+ /**
126
+ * The version of the Stencil compiler that generated the metadata
127
+ */
128
+ version: string;
129
+ /**
130
+ * The version of TypeScript that was used to generate the metadata
131
+ */
132
+ typescriptVersion: string;
133
+ };
134
+ typeLibrary: JsonDocsTypeLibrary;
135
+ }
136
+ /**
137
+ * Container for JSDoc metadata for a single Stencil component
138
+ */
139
+ interface JsonDocsComponent {
140
+ /**
141
+ * The directory containing the Stencil component, minus the file name.
142
+ *
143
+ * @example /workspaces/stencil-project/src/components/my-component
144
+ */
145
+ dirPath?: string;
146
+ /**
147
+ * The name of the file containing the Stencil component, with no path
148
+ *
149
+ * @example my-component.tsx
150
+ */
151
+ fileName?: string;
152
+ /**
153
+ * The full path of the file containing the Stencil component
154
+ *
155
+ * @example /workspaces/stencil-project/src/components/my-component/my-component.tsx
156
+ */
157
+ filePath?: string;
158
+ /**
159
+ * The path to the component's `readme.md` file, including the filename
160
+ *
161
+ * @example /workspaces/stencil-project/src/components/my-component/readme.md
162
+ */
163
+ readmePath?: string;
164
+ /**
165
+ * The path to the component's `usage` directory
166
+ *
167
+ * @example /workspaces/stencil-project/src/components/my-component/usage/
168
+ */
169
+ usagesDir?: string;
170
+ /**
171
+ * The encapsulation strategy for a component
172
+ */
173
+ encapsulation: 'shadow' | 'scoped' | 'none';
174
+ /**
175
+ * The tag name for the component, for use in HTML
176
+ */
177
+ tag: string;
178
+ /**
179
+ * The contents of a component's `readme.md` that are user generated.
180
+ *
181
+ * Auto-generated contents are not stored in this reference.
182
+ */
183
+ readme: string;
184
+ /**
185
+ * The description of a Stencil component, found in the JSDoc that sits above the component's declaration
186
+ */
187
+ docs: string;
188
+ /**
189
+ * JSDoc tags found in the JSDoc comment written atop a component's declaration
190
+ */
191
+ docsTags: JsonDocsTag[];
192
+ /**
193
+ * The text from the class-level JSDoc for a Stencil component, if present.
194
+ */
195
+ overview?: string;
196
+ /**
197
+ * A mapping of usage example file names to their contents for the component.
198
+ */
199
+ usage: JsonDocsUsage;
200
+ /**
201
+ * Array of metadata for a component's `@Prop`s
202
+ */
203
+ props: JsonDocsProp[];
204
+ /**
205
+ * Array of metadata for a component's `@Method`s
206
+ */
207
+ methods: JsonDocsMethod[];
208
+ /**
209
+ * Array of metadata for a component's `@Event`s
210
+ */
211
+ events: JsonDocsEvent[];
212
+ /**
213
+ * Array of metadata for a component's `@Listen` handlers
214
+ */
215
+ listeners: JsonDocsListener[];
216
+ /**
217
+ * Array of metadata for a component's CSS styling information
218
+ */
219
+ styles: JsonDocsStyle[];
220
+ /**
221
+ * Array of component Slot information, generated from `@slot` tags
222
+ */
223
+ slots: JsonDocsSlot[];
224
+ /**
225
+ * Array of component Parts information, generate from `@part` tags
226
+ */
227
+ parts: JsonDocsPart[];
228
+ /**
229
+ * Array of custom states defined via @AttachInternals({ states: {...} })
230
+ */
231
+ customStates: JsonDocsCustomState[];
232
+ /**
233
+ * Array of metadata describing where the current component is used
234
+ */
235
+ dependents: string[];
236
+ /**
237
+ * Array of metadata listing the components which are used in current component
238
+ */
239
+ dependencies: string[];
240
+ /**
241
+ * Describes a tree of components coupling
242
+ */
243
+ dependencyGraph: JsonDocsDependencyGraph;
244
+ /**
245
+ * A deprecation reason/description found following a `@deprecated` tag
246
+ */
247
+ deprecation?: string;
248
+ }
249
+ interface JsonDocsDependencyGraph {
250
+ [tagName: string]: string[];
251
+ }
252
+ /**
253
+ * A descriptor for a single JSDoc tag found in a block comment
254
+ */
255
+ interface JsonDocsTag {
256
+ /**
257
+ * The tag name (immediately following the '@')
258
+ */
259
+ name: string;
260
+ /**
261
+ * The description that immediately follows the tag name
262
+ */
263
+ text?: string;
264
+ }
265
+ interface JsonDocsValue {
266
+ value?: string;
267
+ type: string;
268
+ }
269
+ /**
270
+ * A mapping of file names to their contents.
271
+ *
272
+ * This type is meant to be used when reading one or more usage markdown files associated with a component. For the
273
+ * given directory structure:
274
+ * ```
275
+ * src/components/my-component
276
+ * ├── my-component.tsx
277
+ * └── usage
278
+ * ├── bar.md
279
+ * └── foo.md
280
+ * ```
281
+ * an instance of this type would include the name of the markdown file, mapped to its contents:
282
+ * ```ts
283
+ * {
284
+ * 'bar': STRING_CONTENTS_OF_BAR.MD
285
+ * 'foo': STRING_CONTENTS_OF_FOO.MD
286
+ * }
287
+ * ```
288
+ */
289
+ interface JsonDocsUsage {
290
+ [key: string]: string;
291
+ }
292
+ /**
293
+ * An intermediate representation of a `@Prop` decorated member's JSDoc
294
+ */
295
+ interface JsonDocsProp {
296
+ /**
297
+ * the name of the prop
298
+ */
299
+ name: string;
300
+ complexType?: ComponentCompilerPropertyComplexType;
301
+ /**
302
+ * the type of the prop, in terms of the TypeScript type system (as opposed to JavaScript's or HTML's)
303
+ */
304
+ type: string;
305
+ /**
306
+ * `true` if the prop was configured as "mutable" where it was declared, `false` otherwise
307
+ */
308
+ mutable: boolean;
309
+ /**
310
+ * The name of the attribute that is exposed to configure a compiled web component
311
+ */
312
+ attr?: string;
313
+ /**
314
+ * `true` if the prop was configured to "reflect" back to HTML where it (the prop) was declared, `false` otherwise
315
+ */
316
+ reflectToAttr: boolean;
317
+ /**
318
+ * the JSDoc description text associated with the prop
319
+ */
320
+ docs: string;
321
+ /**
322
+ * JSDoc tags associated with the prop
323
+ */
324
+ docsTags: JsonDocsTag[];
325
+ /**
326
+ * The default value of the prop
327
+ */
328
+ default?: string;
329
+ /**
330
+ * Deprecation text associated with the prop. This is the text that immediately follows a `@deprecated` tag
331
+ */
332
+ deprecation?: string;
333
+ values: JsonDocsValue[];
334
+ /**
335
+ * `true` if a component is declared with a '?', `false` otherwise
336
+ *
337
+ * @example
338
+ * ```tsx
339
+ * @Prop() componentProps?: any;
340
+ * ```
341
+ */
342
+ optional: boolean;
343
+ /**
344
+ * `true` if a component is declared with a '!', `false` otherwise
345
+ *
346
+ * @example
347
+ * ```tsx
348
+ * @Prop() componentProps!: any;
349
+ * ```
350
+ */
351
+ required: boolean;
352
+ /**
353
+ * `true` if the prop has a `get()`. `false` otherwise
354
+ */
355
+ getter: boolean;
356
+ /**
357
+ * `true` if the prop has a `set()`. `false` otherwise
358
+ */
359
+ setter: boolean;
360
+ }
361
+ interface JsonDocsMethod {
362
+ name: string;
363
+ docs: string;
364
+ docsTags: JsonDocsTag[];
365
+ deprecation?: string;
366
+ signature: string;
367
+ returns: JsonDocsMethodReturn;
368
+ parameters: JsonDocMethodParameter[];
369
+ complexType: ComponentCompilerMethodComplexType;
370
+ }
371
+ interface JsonDocsMethodReturn {
372
+ type: string;
373
+ docs: string;
374
+ }
375
+ interface JsonDocMethodParameter {
376
+ name: string;
377
+ type: string;
378
+ docs: string;
379
+ }
380
+ interface JsonDocsEvent {
381
+ event: string;
382
+ bubbles: boolean;
383
+ cancelable: boolean;
384
+ composed: boolean;
385
+ complexType: ComponentCompilerEventComplexType;
386
+ docs: string;
387
+ docsTags: JsonDocsTag[];
388
+ deprecation?: string;
389
+ detail: string;
390
+ }
391
+ /**
392
+ * Type describing a CSS Style, as described by a JSDoc-style comment
393
+ */
394
+ interface JsonDocsStyle {
395
+ /**
396
+ * The name of the style
397
+ */
398
+ name: string;
399
+ /**
400
+ * The type/description associated with the style
401
+ */
402
+ docs: string;
403
+ /**
404
+ * The annotation used in the JSDoc of the style (e.g. `@prop`)
405
+ */
406
+ annotation: string;
407
+ /**
408
+ * The mode associated with the style
409
+ */
410
+ mode: string | undefined;
411
+ }
412
+ interface JsonDocsListener {
413
+ event: string;
414
+ target?: string;
415
+ capture: boolean;
416
+ passive: boolean;
417
+ }
418
+ /**
419
+ * A descriptor for a slot
420
+ *
421
+ * Objects of this type are translated from the JSDoc tag, `@slot`
422
+ */
423
+ interface JsonDocsSlot {
424
+ /**
425
+ * The name of the slot. Defaults to an empty string for an unnamed slot.
426
+ */
427
+ name: string;
428
+ /**
429
+ * A textual description of the slot.
430
+ */
431
+ docs: string;
432
+ }
433
+ /**
434
+ * A descriptor of a CSS Shadow Part
435
+ *
436
+ * Objects of this type are translated from the JSDoc tag, `@part`, or the 'part'
437
+ * attribute on a component in TSX
438
+ */
439
+ interface JsonDocsPart {
440
+ /**
441
+ * The name of the Shadow part
442
+ */
443
+ name: string;
444
+ /**
445
+ * A textual description of the Shadow part.
446
+ */
447
+ docs: string;
448
+ }
449
+ /**
450
+ * A descriptor for a Custom State defined via @AttachInternals({ states: {...} })
451
+ *
452
+ * Custom states are exposed via the ElementInternals.states CustomStateSet
453
+ * and can be targeted with the CSS `:state()` pseudo-class.
454
+ *
455
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CustomStateSet
456
+ */
457
+ interface JsonDocsCustomState {
458
+ /**
459
+ * The name of the custom state (without dashes)
460
+ */
461
+ name: string;
462
+ /**
463
+ * The initial/default value of the state
464
+ */
465
+ initialValue: boolean;
466
+ /**
467
+ * A textual description of the custom state
468
+ */
469
+ docs: string;
470
+ }
471
+ /**
472
+ * Represents a parsed block comment in a CSS, Sass, etc. file for a custom property.
473
+ */
474
+ interface StyleDoc {
475
+ /**
476
+ * The name of the CSS property
477
+ */
478
+ name: string;
479
+ /**
480
+ * The user-defined description of the CSS property
481
+ */
482
+ docs: string;
483
+ /**
484
+ * The JSDoc-style annotation (e.g. `@prop`) that was used in the block comment to detect the comment.
485
+ * Used to inform Stencil where the start of a new property's description starts (and where the previous description
486
+ * ends).
487
+ */
488
+ annotation: 'prop';
489
+ /**
490
+ * The Stencil style-mode that is associated with this property.
491
+ */
492
+ mode: string | undefined;
493
+ }
494
+ //#endregion
2
495
  export { JsonDocMethodParameter, JsonDocs, JsonDocsComponent, JsonDocsCustomState, JsonDocsDependencyGraph, JsonDocsEvent, JsonDocsListener, JsonDocsMethod, JsonDocsMethodReturn, JsonDocsPart, JsonDocsProp, JsonDocsSlot, JsonDocsStyle, JsonDocsTag, JsonDocsTypeLibrary, JsonDocsUsage, JsonDocsValue, StyleDoc };