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

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 (56) hide show
  1. package/README.md +94 -0
  2. package/dist/app-data/index.d.ts +2 -0
  3. package/dist/{runtime/app-data → app-data}/index.js +17 -11
  4. package/dist/{client-CSm3x5ke.mjs → client-D1MsT-Rp.mjs} +2717 -2424
  5. package/dist/compiler/index.d.mts +170 -6
  6. package/dist/compiler/index.mjs +4 -3
  7. package/dist/compiler/utils/index.d.mts +272 -2
  8. package/dist/compiler/utils/index.mjs +4 -3
  9. package/dist/{compiler-D6iP7Bzb.mjs → compiler-DPnvX_cT.mjs} +14953 -12327
  10. package/dist/declarations/stencil-ext-modules.d.ts +5 -5
  11. package/dist/declarations/stencil-public-compiler.d.ts +728 -287
  12. package/dist/declarations/stencil-public-compiler.js +2 -3
  13. package/dist/declarations/stencil-public-docs.d.ts +19 -0
  14. package/dist/declarations/stencil-public-runtime.d.ts +131 -17
  15. package/dist/fragment-Di1hWOC8.mjs +4 -0
  16. package/dist/{index-tUR6pD3J.d.mts → index-BHj3EBl2.d.mts} +1052 -668
  17. package/dist/{index-CyrGY82h.d.ts → index-D2PAsXxx.d.ts} +215 -40
  18. package/dist/index-VK8okIiF.d.mts +108 -0
  19. package/dist/index.d.mts +4 -1
  20. package/dist/index.mjs +91 -2
  21. package/dist/jsx-runtime.d.mts +18 -0
  22. package/dist/jsx-runtime.mjs +3 -0
  23. package/dist/{node-Bg-mO5dw.mjs → node-BQR4L-TG.mjs} +76 -73
  24. package/dist/reactive-controller-BdCpSAQP.d.mts +13 -0
  25. package/dist/{regular-expression-D5pGVpCu.mjs → regular-expression-XqU5zmPp.mjs} +141 -31
  26. package/dist/{chunk-CjcI7cDX.mjs → rolldown-runtime-BhDjJH2R.mjs} +1 -1
  27. package/dist/{runtime-BBCnuprF.js → runtime/client/lazy.js} +2987 -2443
  28. package/dist/runtime/client/{index.d.ts → runtime.d.ts} +228 -83
  29. package/dist/runtime/client/{index.js → runtime.js} +2852 -2432
  30. package/dist/runtime/index.d.ts +48 -29
  31. package/dist/runtime/index.js +5069 -2
  32. package/dist/runtime/server/index.d.mts +182 -75
  33. package/dist/runtime/server/index.mjs +2769 -2283
  34. package/dist/runtime/server/runner.d.mts +47 -32
  35. package/dist/runtime/server/runner.mjs +563 -687
  36. package/dist/signals/index.d.ts +49 -0
  37. package/dist/signals/index.js +199 -0
  38. package/dist/sys/node/index.d.mts +1 -2
  39. package/dist/sys/node/index.mjs +1 -1
  40. package/dist/sys/node/worker.d.mts +1 -1
  41. package/dist/sys/node/worker.mjs +6 -3
  42. package/dist/testing/index.d.mts +98 -9
  43. package/dist/testing/index.mjs +395 -70
  44. package/dist/util-BIa-iHnt.mjs +724 -0
  45. package/dist/validation-Dd3g77T5.mjs +778 -0
  46. package/package.json +49 -36
  47. package/dist/index-CXHCTQNt.d.mts +0 -190
  48. package/dist/index-hS-KBdAP.d.ts +0 -30
  49. package/dist/jsx-runtime-DlDkTqps.d.ts +0 -28
  50. package/dist/jsx-runtime.d.ts +0 -2
  51. package/dist/jsx-runtime.js +0 -2
  52. package/dist/runtime/app-data/index.d.ts +0 -2
  53. package/dist/validation-Byxie0Uk.mjs +0 -1445
  54. /package/{LICENSE.md → LICENSE} +0 -0
  55. /package/dist/{runtime/app-globals → app-globals}/index.d.ts +0 -0
  56. /package/dist/{runtime/app-globals → app-globals}/index.js +0 -0
@@ -1,16 +1,6 @@
1
1
  import { Diagnostic, Node as Node$1 } from "typescript";
2
- import { RolldownError, SourceMap } from "rolldown";
2
+ import { InputOptions, RolldownError, SourceMap, SourceMap as RolldownSourceMap } from "rolldown";
3
3
  import { Serializable } from "child_process";
4
-
5
- //#region src/utils/byte-size.d.ts
6
- /**
7
- * Used to learn the size of a string in bytes.
8
- *
9
- * @param str The string to measure
10
- * @returns number
11
- */
12
- declare const byteSize: (str: string) => number;
13
- //#endregion
14
4
  //#region src/utils/constants.d.ts
15
5
  declare const MEMBER_FLAGS: {
16
6
  readonly String: number;
@@ -56,6 +46,18 @@ declare const HOST_FLAGS: {
56
46
  readonly isWatchReady: number;
57
47
  readonly isListenReady: number;
58
48
  readonly needsRerender: number;
49
+ /**
50
+ * Set once this component's real (lazy-loaded) `connectedCallback` has fired for
51
+ * the first time. Lets a descendant skip creating/awaiting a connect-promise for
52
+ * an ancestor that's already connected. See {@link HostRef.$onFirstConnectResolve$}.
53
+ */
54
+ readonly hasFiredConnected: number;
55
+ /**
56
+ * Set when a lazy component's dynamic `import()` fails to resolve a
57
+ * constructor. Distinct from `hasInitializedComponent` being unset, which
58
+ * is true while an initialization attempt is merely queued/in-flight.
59
+ */
60
+ readonly hasFailedLoad: number;
59
61
  readonly devOnRender: number;
60
62
  readonly devOnDidLoad: number;
61
63
  };
@@ -80,13 +82,6 @@ declare const CMP_FLAGS: {
80
82
  * Used to determine if a component does not use the shadow DOM _and_ has `<slot/>` tags in its markup.
81
83
  */
82
84
  readonly hasSlotRelocation: number;
83
- /**
84
- * Determines if a shim for the shadow DOM is necessary.
85
- *
86
- * The shim should only be needed if a component requires {@link shadowDomEncapsulation} and if any output
87
- * target-specific criteria are met. Refer to this flag's usage to determine each output target's criteria.
88
- */
89
- readonly needsShadowDomShim: number;
90
85
  /**
91
86
  * Determines if `delegatesFocus` is enabled for a component that uses the shadow DOM.
92
87
  * e.g. `shadow: { delegatesFocus: true }` is set on the `@Component()` decorator
@@ -97,10 +92,7 @@ declare const CMP_FLAGS: {
97
92
  */
98
93
  readonly hasMode: number;
99
94
  /**
100
- * Determines if styles must be scoped due to either:
101
- * 1. A component is using scoped stylesheets ({@link scopedCssEncapsulation})
102
- * 2. A component is using the shadow DOM _and_ the output target's rules for requiring a shadow DOM shim have been
103
- * met ({@link needsShadowDomShim})
95
+ * Determines if styles must be scoped - i.e. the component uses scoped stylesheets.
104
96
  */
105
97
  readonly needsScopedEncapsulation: number;
106
98
  /**
@@ -167,6 +159,7 @@ declare const XLINK_NS = "http://www.w3.org/1999/xlink";
167
159
  * File names and value
168
160
  */
169
161
  declare const COLLECTION_MANIFEST_FILE_NAME = "collection-manifest.json";
162
+ declare const COLLECTION_APP_DATA_FILE_NAME = "app-data.js";
170
163
  /**
171
164
  * Constant for the 'copy' output target
172
165
  */
@@ -176,37 +169,54 @@ declare const COPY = "copy";
176
169
  */
177
170
  declare const CUSTOM = "custom";
178
171
  /**
179
- * Constant for the 'dist' output target
172
+ * Constant for the 'loader-bundle' output target
173
+ * (formerly 'dist' in v4)
180
174
  */
181
- declare const DIST = "dist";
175
+ declare const LOADER_BUNDLE = "loader-bundle";
182
176
  /**
183
- * Constant for the 'dist-collection' output target
177
+ * Constant for the 'standalone' output target
178
+ * (formerly 'dist-custom-elements' in v4)
184
179
  */
185
- declare const DIST_COLLECTION = "dist-collection";
180
+ declare const STANDALONE = "standalone";
186
181
  /**
187
- * Constant for the 'dist-custom-elements' output target
182
+ * Constant for the 'ssr' output target
183
+ * (formerly 'dist-hydrate-script' in v4)
188
184
  */
189
- declare const DIST_CUSTOM_ELEMENTS = "dist-custom-elements";
185
+ declare const SSR = "ssr";
190
186
  /**
191
- * Constant for the 'dist-types' output target
187
+ * Constant for the 'ssr-wasm' output target.
188
+ * Compiles the SSR script to a WASM binary via javy for use in any WASM-capable host
189
+ * (PHP, Java, Ruby, Go, etc.) without requiring a JavaScript runtime.
192
190
  */
193
- declare const DIST_TYPES = "dist-types";
191
+ declare const SSR_WASM = "ssr-wasm";
194
192
  /**
195
- * Constant for the 'dist-hydrate-script' output target
193
+ * Constant for the 'collection' output target
194
+ * (formerly 'dist-collection' sub-output in v4)
195
+ *
196
+ * Contains transpiled source + metadata for downstream Stencil projects
197
+ * to re-compile/bundle.
196
198
  */
197
- declare const DIST_HYDRATE_SCRIPT = "dist-hydrate-script";
199
+ declare const COLLECTION = "collection";
198
200
  /**
199
- * Constant for the 'dist-lazy' output target
201
+ * Constant for the 'types' output target
202
+ * (formerly 'dist-types' sub-output in v4)
200
203
  */
201
- declare const DIST_LAZY = "dist-lazy";
204
+ declare const TYPES = "types";
202
205
  /**
203
- * Constant for the 'dist-lazy-loader' output target
206
+ * Constant for the 'global-style' output target
207
+ * Outputs global styles to a unified location available to all distributions.
204
208
  */
205
- declare const DIST_LAZY_LOADER = "dist-lazy-loader";
209
+ declare const GLOBAL_STYLE = "global-style";
206
210
  /**
207
- * Constant for the 'dist-global-styles' output target
211
+ * Constant for the 'assets' output target
212
+ * Copies component assetsDirs to a unified location available to all distributions.
208
213
  */
209
- declare const DIST_GLOBAL_STYLES = "dist-global-styles";
214
+ declare const ASSETS = "assets";
215
+ /**
216
+ * Internal constant for the 'dist-lazy' output target
217
+ * (used by loader-bundle and www)
218
+ */
219
+ declare const DIST_LAZY = "dist-lazy";
210
220
  /**
211
221
  * Constant for the 'docs-custom' output target
212
222
  */
@@ -227,6 +237,10 @@ declare const DOCS_VSCODE = "docs-vscode";
227
237
  * Constant for the 'docs-custom-elements-manifest' output target
228
238
  */
229
239
  declare const DOCS_CUSTOM_ELEMENTS_MANIFEST = "docs-custom-elements-manifest";
240
+ /**
241
+ * Constant for the 'docs-agent-skill' output target
242
+ */
243
+ declare const DOCS_AGENT_SKILL = "docs-agent-skill";
230
244
  /**
231
245
  * Constant for the 'stats' output target
232
246
  */
@@ -238,13 +252,14 @@ declare const WWW = "www";
238
252
  /**
239
253
  * Valid output targets to specify in a Stencil config.
240
254
  *
241
- * Note that there are some output targets (e.g. `DIST_TYPES`) which are
242
- * programmatically set as output targets by the compiler when other output
243
- * targets (in that case `DIST`) are set, but which are _not_ supported in a
244
- * Stencil config. This is enforced in the output target validation code.
255
+ * Note that some internal output targets (e.g. `DIST_LAZY`, `DIST_GLOBAL_STYLES`)
256
+ * are programmatically created by the compiler and are not user-configurable.
257
+ *
258
+ * In v5, `TYPES` and `COLLECTION` are auto-generated in production builds unless explicitly configured.
245
259
  */
246
- declare const VALID_CONFIG_OUTPUT_TARGETS: readonly ["www", "dist", "dist-collection", "dist-custom-elements", "dist-lazy", "dist-hydrate-script", "docs-json", "docs-readme", "docs-vscode", "docs-custom", "docs-custom-elements-manifest", "copy", "custom", "stats"];
260
+ declare const VALID_CONFIG_OUTPUT_TARGETS: readonly ["www", "loader-bundle", "standalone", "ssr", "ssr-wasm", "collection", "types", "global-style", "assets", "dist", "dist-custom-elements", "dist-hydrate-script", "dist-collection", "dist-types", "docs-json", "docs-readme", "docs-vscode", "docs-custom", "docs-custom-elements-manifest", "docs-agent-skill", "copy", "custom", "stats"];
247
261
  declare const GENERATED_DTS = "components.d.ts";
262
+ declare const STYLE_EXT: string[];
248
263
  /**
249
264
  * DOM Node types
250
265
  *
@@ -283,162 +298,8 @@ declare const formatLazyBundleRuntimeMeta: (bundleId: any, cmps: ComponentCompil
283
298
  declare const formatComponentRuntimeMeta: (compilerMeta: ComponentCompilerMeta, includeMethods: boolean) => ComponentRuntimeMetaCompact;
284
299
  declare const stringifyRuntimeData: (data: any) => string;
285
300
  //#endregion
286
- //#region src/utils/helpers.d.ts
287
- /**
288
- * Check if a value is defined (not null and not undefined).
289
- *
290
- * @param v - the value to check
291
- * @returns true if the value is defined
292
- */
293
- declare const isDef: (v: any) => boolean;
294
- /**
295
- * Convert a string from PascalCase to dash-case
296
- *
297
- * @param str the string to convert
298
- * @returns a converted string
299
- */
300
- declare const toDashCase: (str: string) => string;
301
- /**
302
- * Convert a string from dash-case / kebab-case to PascalCase (or CamelCase,
303
- * or whatever you call it!)
304
- *
305
- * @param str a string to convert
306
- * @returns a converted string
307
- */
308
- declare const dashToPascalCase: (str: string) => string;
309
- /**
310
- * Convert a string to 'camelCase'
311
- *
312
- * @param str the string to convert
313
- * @returns the converted string
314
- */
315
- declare const toCamelCase: (str: string) => string;
316
- /**
317
- * Capitalize the first letter of a string
318
- *
319
- * @param str the string to capitalize
320
- * @returns a capitalized string
321
- */
322
- declare const toTitleCase: (str: string) => string;
323
- /**
324
- * Escapes all occurrences of a specified pattern in a string.
325
- * This function replaces all matches of a given pattern in the input text with a specified replacement string.
326
- * It can handle both string and regular expression patterns and allows toggling between global and single-match replacements.
327
- *
328
- * @param text - The input string to process.
329
- * @param pattern - The pattern to search for in the input string. Can be a regular expression or a string.
330
- * @param replacement - The string to replace each match with.
331
- * @param replaceAll - Whether to replace all occurrences (true) or just the first occurrence (false). Defaults to true.
332
- * @returns The processed string with the replacements applied.
333
- */
334
- declare const escapeWithPattern: (text: string, pattern: RegExp | string, replacement: string, replaceAll?: boolean) => string;
335
- /**
336
- * This is just a no-op, don't expect it to do anything.
337
- */
338
- declare const noop: () => any;
339
- /**
340
- * Check whether a value is a 'complex type', defined here as an object or a
341
- * function.
342
- *
343
- * @param o the value to check
344
- * @returns whether it's a complex type or not
345
- */
346
- declare const isComplexType: (o: unknown) => boolean;
347
- /**
348
- * Sort an array without mutating it in-place (as `Array.prototype.sort`
349
- * unfortunately does)
350
- *
351
- * @param array the array you'd like to sort
352
- * @param prop a function for deriving sortable values (strings or numbers)
353
- * from array members
354
- * @returns a new array of all items `x` in `array` ordered by `prop(x)`
355
- */
356
- declare const sortBy: <T>(array: T[], prop: (item: T) => string | number) => T[];
357
- /**
358
- * A polyfill of sorts for `Array.prototype.flat` which will return the result
359
- * of calling that method if present and, if not, return an equivalent based on
360
- * `Array.prototype.reduce`.
361
- *
362
- * @param array the array to flatten (one level)
363
- * @returns a flattened array
364
- */
365
- declare const flatOne: <T>(array: T[][]) => T[];
366
- /**
367
- * Deduplicate an array, retaining items at the earliest position in which
368
- * they appear.
369
- *
370
- * So `unique([1,3,2,1,1,4])` would be `[1,3,2,4]`.
371
- *
372
- * @param array the array to deduplicate
373
- * @param predicate an optional function used to generate the key used to
374
- * determine uniqueness
375
- * @returns a new, deduplicated array
376
- */
377
- declare const unique: <T, K>(array: T[], predicate?: (item: T) => K) => T[];
378
- /**
379
- * Merge elements of an array into an existing array, using a predicate to
380
- * determine uniqueness and only adding elements when they are not present in
381
- * the first array.
382
- *
383
- * **Note**: this mutates the target array! This is intentional to avoid
384
- * unnecessary array allocation, but be sure that it's what you want!
385
- *
386
- * @param target the target array, to which new unique items should be added
387
- * @param newItems a list of new items, some (or all!) of which may be added
388
- * @param mergeWith a predicate function which reduces the items in `target`
389
- * and `newItems` to a value which can be equated with `===` for the purposes
390
- * of determining uniqueness
391
- */
392
- declare function mergeIntoWith<T1, T2>(target: T1[], newItems: T1[], mergeWith: (item: T1) => T2): void;
393
- /**
394
- * A utility for building an object from an iterable very similar to
395
- * `Object.fromEntries`
396
- *
397
- * @param entries an iterable object holding entries (key-value tuples) to
398
- * plop into a new object
399
- * @returns an object containing those entries
400
- */
401
- declare const fromEntries: <V>(entries: IterableIterator<[string, V]>) => Record<string, V>;
402
- /**
403
- * Based on a given object, create a new object which has only the specified
404
- * key-value pairs included in it.
405
- *
406
- * @param obj the object from which to take values
407
- * @param keys a set of keys to take
408
- * @returns an object mapping `key` to `obj[key]` if `obj[key]` is truthy for
409
- * every `key` in `keys`
410
- */
411
- declare const pluck: (obj: {
412
- [key: string]: any;
413
- }, keys: string[]) => {
414
- [key: string]: any;
415
- };
416
- declare const isBoolean: (v: any) => v is boolean;
417
- declare const isFunction: (v: any) => v is Function;
418
- declare const isNumber: (v: any) => v is number;
419
- declare const isObject: (val: object) => val is object;
420
- declare const isString: (v: any) => v is string;
421
- declare const isIterable: <T>(v: any) => v is Iterable<T>;
422
- //#endregion
423
- //#region src/utils/is-glob.d.ts
424
- /**
425
- * Check if a string is a glob pattern (e.g. 'src/*.js' or something like that)
426
- *
427
- * @param str a string to check
428
- * @returns whether the string is a glob pattern or not
429
- */
430
- declare const isGlob: (str: string) => boolean;
431
- //#endregion
432
- //#region src/utils/is-root-path.d.ts
433
- /**
434
- * Checks if the path is the Operating System (OS) root path, such as "/" or "C:\". This function does not take the OS
435
- * the code is running on into account when performing this evaluation.
436
- * @param p the path to check
437
- * @returns `true` if the path is an OS root path, `false` otherwise
438
- */
439
- declare const isRootPath: (p: string) => boolean;
440
- //#endregion
441
301
  //#region src/utils/logger/logger-rolldown.d.ts
302
+ declare const isRolldownError: (e: unknown) => e is RolldownError;
442
303
  declare const loadRolldownDiagnostics: (config: ValidatedConfig, compilerCtx: CompilerCtx, buildCtx: BuildCtx, rolldownError: RolldownError) => void;
443
304
  declare const createOnWarnFn: (diagnostics: Diagnostic$1[], bundleModulesFiles?: Module[]) => (warning: {
444
305
  code?: string;
@@ -523,7 +384,8 @@ declare const buildWarn: (diagnostics: Diagnostic$1[]) => Diagnostic$1;
523
384
  * @param jsonFilePath the path to the JSON file where the error occurred
524
385
  * @param msg the error message
525
386
  * @param jsonField the key for the field which caused the error, used for finding
526
- * the error line in the original JSON file
387
+ * the error line in the original JSON file. Only root-level keys (with minimal
388
+ * indentation, typically 2 spaces) are highlighted to avoid matching nested keys.
527
389
  * @returns a reference to the newly-created diagnostic
528
390
  */
529
391
  declare const buildJsonFileError: (compilerCtx: CompilerCtx, diagnostics: Diagnostic$1[], jsonFilePath: string, msg: string, jsonField: string) => Diagnostic$1;
@@ -577,39 +439,32 @@ declare const filterExcludedComponents: (components: ComponentCompilerMeta[], co
577
439
  declare const relativeImport: (pathFrom: string, pathTo: string, ext?: string, addPrefix?: boolean) => string;
578
440
  declare const getComponentsDtsSrcFilePath: (config: ValidatedConfig) => string;
579
441
  /**
580
- * Helper to get an appropriate file path for `components.d.ts` for a `"dist"`
581
- * or `"dist-types"` output target.
442
+ * Helper to get an appropriate file path for `components.d.ts` for an output target.
582
443
  *
583
- * @param outputTarget the output target of interest
444
+ * @param typesDir the directory where types are generated
584
445
  * @returns a properly-formatted path
585
446
  */
586
- declare const getComponentsDtsTypesFilePath: (outputTarget: Required<OutputTargetDist> | OutputTargetDistTypes) => string;
587
- declare const isOutputTargetDist: (o: OutputTarget) => o is OutputTargetDist;
588
- declare const isOutputTargetDistCollection: (o: OutputTarget) => o is OutputTargetDistCollection;
589
- declare const isOutputTargetDistCustomElements: (o: OutputTarget) => o is OutputTargetDistCustomElements;
447
+ declare const getComponentsDtsTypesFilePath: (typesDir: string) => string;
448
+ declare const isOutputTargetLoaderBundle: (o: OutputTarget) => o is OutputTargetLoaderBundle;
449
+ declare const isOutputTargetStandalone: (o: OutputTarget) => o is OutputTargetStandalone;
450
+ declare const isOutputTargetSsr: (o: OutputTarget) => o is OutputTargetSsr;
451
+ declare const isOutputTargetSsrWasm: (o: OutputTarget) => o is OutputTargetSsrWasm;
452
+ declare const isOutputTargetCollection: (o: OutputTarget) => o is OutputTargetCollection;
453
+ declare const isOutputTargetTypes: (o: OutputTarget) => o is OutputTargetTypes;
454
+ declare const isOutputTargetGlobalStyle: (o: OutputTarget) => o is OutputTargetGlobalStyle;
455
+ declare const isOutputTargetAssets: (o: OutputTarget) => o is OutputTargetAssets;
590
456
  declare const isOutputTargetCopy: (o: OutputTarget) => o is OutputTargetCopy;
591
457
  declare const isOutputTargetDistLazy: (o: OutputTarget) => o is OutputTargetDistLazy;
592
- declare const isOutputTargetDistLazyLoader: (o: OutputTarget) => o is OutputTargetDistLazyLoader;
593
- declare const isOutputTargetDistGlobalStyles: (o: OutputTarget) => o is OutputTargetDistGlobalStyles;
594
- declare const isOutputTargetHydrate: (o: OutputTarget) => o is OutputTargetHydrate;
595
458
  declare const isOutputTargetCustom: (o: OutputTarget) => o is OutputTargetCustom;
596
- declare const isOutputTargetDocs: (o: OutputTarget) => o is OutputTargetDocsJson | OutputTargetDocsReadme | OutputTargetDocsVscode | OutputTargetDocsCustom | OutputTargetDocsCustomElementsManifest;
459
+ declare const isOutputTargetDocs: (o: OutputTarget) => o is OutputTargetDocsJson | OutputTargetDocsReadme | OutputTargetDocsVscode | OutputTargetDocsCustom | OutputTargetDocsCustomElementsManifest | OutputTargetDocsAgentSkill;
597
460
  declare const isOutputTargetDocsReadme: (o: OutputTarget) => o is OutputTargetDocsReadme;
598
461
  declare const isOutputTargetDocsJson: (o: OutputTarget) => o is OutputTargetDocsJson;
599
462
  declare const isOutputTargetDocsCustom: (o: OutputTarget) => o is OutputTargetDocsCustom;
600
463
  declare const isOutputTargetDocsVscode: (o: OutputTarget) => o is OutputTargetDocsVscode;
601
464
  declare const isOutputTargetDocsCustomElementsManifest: (o: OutputTarget) => o is OutputTargetDocsCustomElementsManifest;
465
+ declare const isOutputTargetDocsAgentSkill: (o: OutputTarget) => o is OutputTargetDocsAgentSkill;
602
466
  declare const isOutputTargetWww: (o: OutputTarget) => o is OutputTargetWww;
603
467
  declare const isOutputTargetStats: (o: OutputTarget) => o is OutputTargetStats;
604
- declare const isOutputTargetDistTypes: (o: OutputTarget) => o is OutputTargetDistTypes;
605
- /**
606
- * Checks whether or not the supplied output target's type matches one of the eligible primary
607
- * package output target types (i.e. it can have `isPrimaryPackageOutputTarget: true` in its config).
608
- *
609
- * @param o The output target to check.
610
- * @returns Whether the output target type is one of the "primary" output targets.
611
- */
612
- declare const isEligiblePrimaryPackageOutputTarget: (o: OutputTarget) => o is EligiblePrimaryPackageOutputTarget;
613
468
  /**
614
469
  * Retrieve the Stencil component compiler metadata from a collection of Stencil {@link d.Module}s
615
470
  * @param moduleFiles the collection of `Module`s to retrieve the metadata from
@@ -624,100 +479,16 @@ type ValidConfigOutputTarget = (typeof VALID_CONFIG_OUTPUT_TARGETS)[number];
624
479
  * @returns whether or not the targetType is a valid, configurable output target.
625
480
  */
626
481
  declare function isValidConfigOutputTarget(targetType: string): targetType is ValidConfigOutputTarget;
627
- //#endregion
628
- //#region src/utils/path.d.ts
629
- /**
630
- * Convert Windows backslash paths to slash paths: foo\\bar ➔ foo/bar
631
- * Forward-slash paths can be used in Windows as long as they're not
632
- * extended-length paths and don't contain any non-ascii characters.
633
- * This was created since the path methods in Node.js outputs \\ paths on Windows.
634
- * @param path the Windows-based path to convert
635
- * @param relativize whether or not a relative path should have `./` prepended
636
- * @returns the converted path
637
- */
638
- declare const normalizePath: (path: string, relativize?: boolean) => string;
639
- /**
640
- * Same as normalizePath(), expect it'll also strip any query strings
641
- * from the path name. So /dir/file.css?tag=cmp-a becomes /dir/file.css
642
- * @param p the path to normalize
643
- * @returns the normalized path, sans any query strings
644
- */
645
- declare const normalizeFsPath: (p: string) => string;
646
- declare const normalizeFsPathQuery: (importPath: string) => {
647
- filePath: string;
648
- ext: string;
649
- format: string;
650
- };
651
482
  /**
652
- * A wrapped version of node.js' {@link path.relative} which adds our custom
653
- * normalization logic. This solves the relative path between `from` and `to`!
483
+ * Filter output targets based on devMode and their skipInDev setting.
484
+ * In dev mode, targets with `skipInDev: true` are filtered out.
485
+ * In prod mode, all targets are included.
654
486
  *
655
- * The calculation of the returned path follows that of Node's logic, with one exception - if the calculated path
656
- * results in an empty string, a string of length one with a period (`'.'`) is returned.
657
- *
658
- * @throws the underlying node.js function can throw if either path is not a
659
- * string
660
- * @param from the path where relative resolution starts
661
- * @param to the destination path
662
- * @returns the resolved relative path
663
- */
664
- declare function relative(from: string, to: string): string;
665
- /**
666
- * A wrapped version of node.js' {@link path.join} which adds our custom
667
- * normalization logic. This joins all the arguments (path fragments) into a
668
- * single path.
669
- *
670
- * The calculation of the returned path follows that of Node's logic, with one exception - any trailing slashes will
671
- * be removed from the calculated path.
672
- *
673
- * @throws the underlying node function will throw if any argument is not a
674
- * string
675
- * @param paths the paths to join together
676
- * @returns a joined path!
487
+ * @param targets Array of output targets to filter
488
+ * @param devMode Whether we're in dev mode
489
+ * @returns Filtered array of active targets
677
490
  */
678
- declare function join(...paths: string[]): string;
679
- /**
680
- * A wrapped version of node.js' {@link path.resolve} which adds our custom
681
- * normalization logic. This resolves a path to a given (relative or absolute)
682
- * path.
683
- *
684
- * @throws the underlying node function will throw if any argument is not a
685
- * string
686
- * @param paths a path or path fragments to resolve
687
- * @returns a resolved path!
688
- */
689
- declare function resolve(...paths: string[]): string;
690
- /**
691
- * A wrapped version of node.js' {@link path.normalize} which adds our custom
692
- * normalization logic. This normalizes a path, de-duping repeated segment
693
- * separators and resolving `'..'` segments.
694
- *
695
- * @throws the underlying node function will throw if the argument is not a
696
- * string
697
- * @param toNormalize a path to normalize
698
- * @returns a normalized path!
699
- */
700
- declare function normalize(toNormalize: string): string;
701
- //#endregion
702
- //#region src/utils/query-nonce-meta-tag-content.d.ts
703
- /**
704
- * Helper method for querying a `meta` tag that contains a nonce value
705
- * out of a DOM's head.
706
- *
707
- * @param doc The DOM containing the `head` to query against
708
- * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
709
- * exists or the tag has no content.
710
- */
711
- declare function queryNonceMetaTagContent(doc: Document): string | undefined;
712
- //#endregion
713
- //#region src/utils/regular-expression.d.ts
714
- /**
715
- * Utility function that will escape all regular expression special characters in a string.
716
- *
717
- * @param text The string potentially containing special characters.
718
- * @returns The string with all special characters escaped.
719
- */
720
- declare const escapeRegExpSpecialCharacters: (text: string) => string;
491
+ declare const filterActiveTargets: <T extends OutputTarget>(targets: T[], devMode: boolean) => T[];
721
492
  declare namespace result_d_exports {
722
493
  export { Result, err, map, ok, unwrap, unwrapErr };
723
494
  }
@@ -864,18 +635,6 @@ declare const getInlineSourceMappingUrlLinker: (sourceMapContents: string) => st
864
635
  */
865
636
  declare const getSourceMappingUrlForEndOfFile: (url: string) => string;
866
637
  //#endregion
867
- //#region src/utils/url-paths.d.ts
868
- /**
869
- * Determines whether a string should be considered a remote url or not.
870
- *
871
- * This helper only checks the provided string to evaluate is one of a few pre-defined schemes, and should not be
872
- * considered all-encompassing
873
- *
874
- * @param p the string to evaluate
875
- * @returns `true` if the provided string is a remote url, `false` otherwise
876
- */
877
- declare const isRemoteUrl: (p: string) => boolean;
878
- //#endregion
879
638
  //#region src/utils/util.d.ts
880
639
  /**
881
640
  * Create a stylistically-appropriate JS variable name from a filename
@@ -974,6 +733,21 @@ declare const parsePackageJson: (pkgJsonStr: string, pkgJsonFilePath: string) =>
974
733
  declare const readOnlyArrayHasStringMember: <T extends string>(readOnlyArray: ReadonlyArray<T>, maybeMember: T | string) => maybeMember is T;
975
734
  //#endregion
976
735
  //#region src/utils/validation.d.ts
736
+ /**
737
+ * The result of an invalid `modes` check on a component's `styleUrls`/`styles`.
738
+ */
739
+ interface ModeValidationError {
740
+ propName: 'styleUrls' | 'styles';
741
+ message: string;
742
+ }
743
+ /**
744
+ * Validates the mode keys used in a component's `styleUrls`/`styles` against a
745
+ * `config.modes` allowlist, if one is declared.
746
+ * @param configModes the `config.modes` allowlist (mixed string/{@link d.ModeConfig} entries)
747
+ * @param componentOptions the `@Component()` decorator options for a single component
748
+ * @returns a validation error if a used mode is unknown or a required mode is missing, undefined otherwise
749
+ */
750
+ declare const validateComponentModes: (configModes: (string | ModeConfig)[] | undefined, componentOptions: Pick<ComponentOptions, "styleUrls" | "styles">) => ModeValidationError | undefined;
977
751
  /**
978
752
  * Validates that a component tag meets required naming conventions to be used for a web component
979
753
  * @param tag the tag to validate
@@ -1156,10 +930,6 @@ declare const createInMemoryFs: (sys: CompilerSystem) => {
1156
930
  * `[ source, destination ]`
1157
931
  */
1158
932
  type FileCopyTuple = [string, string];
1159
- /**
1160
- * Collected instructions for all pending filesystem operations saved
1161
- * to the in-memory filesystem.
1162
- */
1163
933
  /**
1164
934
  * Results from committing pending filesystem operations
1165
935
  */
@@ -1170,14 +940,6 @@ interface FsCommitResults {
1170
940
  dirsDeleted: string[];
1171
941
  dirsAdded: string[];
1172
942
  }
1173
- /**
1174
- * Given the current state of the in-memory proxy filesystem, collect all of
1175
- * the changes that need to be made in order to commit the currently-pending
1176
- * operations (e.g. write, copy, delete) to the OS filesystem.
1177
- *
1178
- * @param items the storage data structure for the in-memory FS cache
1179
- * @returns a collection of all the operations that need to be done
1180
- */
1181
943
  //#endregion
1182
944
  //#region src/declarations/stencil-public-docs.d.ts
1183
945
  /**
@@ -1200,6 +962,13 @@ interface JsonDocs {
1200
962
  * The metadata for the JSDocs for each component in a Stencil project
1201
963
  */
1202
964
  components: JsonDocsComponent[];
965
+ /**
966
+ * Project-level usage content, collected from markdown files in a `usage`
967
+ * directory at the project's {@link Config.srcDir} root (as opposed to
968
+ * per-component usage content, which lives in {@link JsonDocsComponent.usage}).
969
+ * Keyed by file name (without extension), same shape as component usage.
970
+ */
971
+ usage?: JsonDocsUsage;
1203
972
  /**
1204
973
  * The timestamp at which the metadata was generated, in the format YYYY-MM-DDThh:mm:ss
1205
974
  */
@@ -1580,6 +1349,142 @@ interface StyleDoc {
1580
1349
  }
1581
1350
  //#endregion
1582
1351
  //#region src/declarations/stencil-public-runtime.d.ts
1352
+ interface ComponentOptions {
1353
+ /**
1354
+ * Tag name of the web component. Ideally, the tag name must be globally unique,
1355
+ * so it's recommended to choose an unique prefix for all your components within the same collection.
1356
+ *
1357
+ * In addition, tag name must contain a '-'
1358
+ */
1359
+ tag: string;
1360
+ /**
1361
+ * Encapsulation strategy for the component. Determines how styles and DOM are isolated.
1362
+ *
1363
+ * @example
1364
+ * ```tsx
1365
+ * // Shadow DOM (recommended for isolation)
1366
+ * encapsulation: { type: 'shadow' }
1367
+ * encapsulation: { type: 'shadow', mode: 'closed', delegatesFocus: true }
1368
+ *
1369
+ * // Scoped styles (class-based isolation without Shadow DOM)
1370
+ * encapsulation: { type: 'scoped' }
1371
+ *
1372
+ * // No encapsulation (light DOM)
1373
+ * encapsulation: { type: 'none' }
1374
+ * encapsulation: { type: 'none', patches: ['all'] } // with slot patches
1375
+ * ```
1376
+ *
1377
+ * If not specified, defaults to `{ type: 'none' }` (no encapsulation).
1378
+ */
1379
+ encapsulation?: EncapsulationOptions;
1380
+ /**
1381
+ * Relative URL to some external stylesheet file. It should be a `.css` file unless some
1382
+ * external plugin is installed like `@stencil/sass`.
1383
+ */
1384
+ styleUrl?: string;
1385
+ /**
1386
+ * Similar as `styleUrl` but allows to specify different stylesheets for different modes.
1387
+ */
1388
+ styleUrls?: string[] | ModeStyles;
1389
+ /**
1390
+ * String that contains inlined CSS instead of using an external stylesheet.
1391
+ * The performance characteristics of this feature are the same as using an external stylesheet.
1392
+ *
1393
+ * Notice, you can't use sass, or less, only `css` is allowed using `styles`, use `styleUrl` is you need more advanced features.
1394
+ */
1395
+ styles?: string | {
1396
+ [modeName: string]: any;
1397
+ };
1398
+ /**
1399
+ * Array of relative links to folders of assets required by the component.
1400
+ */
1401
+ assetsDirs?: string[];
1402
+ /**
1403
+ * Relative URL to an external stylesheet providing document-level styles for this component.
1404
+ * Unlike `styleUrl`, these styles are not scoped to shadow/scoped DOM - they are collected
1405
+ * at build time and injected wherever `@import "stencil-globals"` appears in a global stylesheet.
1406
+ *
1407
+ * Useful for
1408
+ * - pre-first-js-render styles (combatting cumulative layout shift)
1409
+ * - host element and slotted content style
1410
+ * - 'css-only' CEs - those that don't use a JS runtime at all
1411
+ *
1412
+ * @example
1413
+ * ```tsx
1414
+ * @Component({ tag: 'my-button', globalStyleUrl: './my-button.global.css' })
1415
+ * ```
1416
+ */
1417
+ globalStyleUrl?: string;
1418
+ /**
1419
+ * Inline CSS string providing document-level styles for this component.
1420
+ * Collected at build time and injected wherever `@import "stencil-globals"` appears.
1421
+ * @see globalStyleUrl
1422
+ */
1423
+ globalStyle?: string;
1424
+ }
1425
+ /**
1426
+ * Shadow DOM encapsulation options for the `encapsulation` property.
1427
+ * Uses native Shadow DOM for style and DOM isolation.
1428
+ */
1429
+ interface ShadowEncapsulation {
1430
+ type: 'shadow';
1431
+ /**
1432
+ * The mode of the shadow root. Defaults to `'open'`.
1433
+ * - `'open'`: The shadow root is accessible via `element.shadowRoot`
1434
+ * - `'closed'`: The shadow root is not accessible via `element.shadowRoot`
1435
+ */
1436
+ mode?: 'open' | 'closed';
1437
+ /**
1438
+ * When set to `true`, specifies behavior that mitigates custom element issues
1439
+ * around focusability. When a non-focusable part of the shadow DOM is clicked, the first
1440
+ * focusable part is given focus, and the shadow host is given any available `:focus` styling.
1441
+ */
1442
+ delegatesFocus?: boolean;
1443
+ /**
1444
+ * Sets the slot assignment mode for the shadow root. When set to `'manual'`, enables imperative
1445
+ * slotting using the `HTMLSlotElement.assign()` method. Defaults to `'named'` for standard
1446
+ * declarative slotting behavior.
1447
+ */
1448
+ slotAssignment?: 'manual' | 'named';
1449
+ }
1450
+ /**
1451
+ * Patch types for non-shadow DOM components that use slots.
1452
+ * - `'all'`: Apply all slot-related patches (equivalent to `lightDomPatches: true`)
1453
+ * - `'children'`: Patch child node accessors (children, firstChild, lastChild, etc.)
1454
+ * - `'clone'`: Patch `cloneNode()` to handle slotted content
1455
+ * - `'insert'`: Patch `appendChild()`, `insertBefore()`, etc. for slot relocation
1456
+ */
1457
+ type SlotPatch = 'all' | 'children' | 'clone' | 'insert';
1458
+ /**
1459
+ * No encapsulation - component renders to light DOM with optional slot patches.
1460
+ */
1461
+ interface NoneEncapsulation {
1462
+ type: 'none';
1463
+ /**
1464
+ * Patches to apply for slot handling in light DOM.
1465
+ * Only relevant if the component uses `<slot>` elements.
1466
+ */
1467
+ patches?: SlotPatch[];
1468
+ }
1469
+ /**
1470
+ * Scoped CSS encapsulation - styles are scoped via class names without Shadow DOM.
1471
+ */
1472
+ interface ScopedEncapsulation {
1473
+ type: 'scoped';
1474
+ /**
1475
+ * Patches to apply for slot handling with scoped styles.
1476
+ * Only relevant if the component uses `<slot>` elements.
1477
+ */
1478
+ patches?: SlotPatch[];
1479
+ }
1480
+ /**
1481
+ * Encapsulation options for the `@Component()` decorator.
1482
+ * Determines how styles and DOM are isolated for the component.
1483
+ */
1484
+ type EncapsulationOptions = ShadowEncapsulation | NoneEncapsulation | ScopedEncapsulation;
1485
+ interface ModeStyles {
1486
+ [modeName: string]: string | string[];
1487
+ }
1583
1488
  type ListenTargetOptions = 'body' | 'document' | 'window';
1584
1489
  interface UserBuildConditionals {
1585
1490
  isDev: boolean;
@@ -1590,6 +1495,27 @@ interface UserBuildConditionals {
1590
1495
  type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
1591
1496
  type ErrorHandler = (err: any, element?: HTMLElement) => void;
1592
1497
  type TagTransformer = (tag: string) => string;
1498
+ /**
1499
+ * A constructor type that can be used as the base for mixin factories.
1500
+ *
1501
+ * ```ts
1502
+ * import { MixedInCtor } from '@stencil/core';
1503
+ *
1504
+ * const AFactoryFn = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
1505
+ * ```
1506
+ */
1507
+ type MixedInCtor<T = {}> = new (...args: any[]) => T;
1508
+ /**
1509
+ * A map of `@Prop`/`@State` property names to their new and previous
1510
+ * values, passed to `componentShouldUpdate` once per render cycle.
1511
+ *
1512
+ * Pass `this` as `T` to type `changes` against your component's own
1513
+ * members, e.g. `componentShouldUpdate(changes: ComponentShouldUpdateChanges<this>)`.
1514
+ */
1515
+ type ComponentShouldUpdateChanges<T = any> = { [K in Extract<keyof T, string>]?: {
1516
+ newVal: T[K];
1517
+ oldVal: T[K];
1518
+ }; };
1593
1519
  interface ComponentInterface {
1594
1520
  connectedCallback?(): void;
1595
1521
  disconnectedCallback?(): void;
@@ -1615,14 +1541,18 @@ interface ComponentInterface {
1615
1541
  */
1616
1542
  componentDidLoad?(): void;
1617
1543
  /**
1618
- * A `@Prop` or `@State` property changed and a rerender is about to be requested.
1544
+ * One or more `@Prop` or `@State` properties changed and a rerender is
1545
+ * about to be requested. `changes` contains every property that changed
1546
+ * since the last render, keyed by property name.
1619
1547
  *
1620
- * Called multiple times throughout the life of
1621
- * the component as its properties change.
1548
+ * Called once per render cycle, batching all properties that changed
1549
+ * synchronously since the last render.
1550
+ *
1551
+ * Return `false` to prevent the pending render.
1622
1552
  *
1623
1553
  * componentShouldUpdate is not called on the first render.
1624
1554
  */
1625
- componentShouldUpdate?(newVal: any, oldVal: any, propName: string): boolean | void;
1555
+ componentShouldUpdate?(changes: ComponentShouldUpdateChanges<this>): boolean | void;
1626
1556
  /**
1627
1557
  * The component is about to update and re-render.
1628
1558
  *
@@ -1645,6 +1575,36 @@ interface ComponentInterface {
1645
1575
  render?(): any;
1646
1576
  [memberName: string]: any;
1647
1577
  }
1578
+ /**
1579
+ * A reusable behavior that hooks into a `ReactiveControllerHost`'s lifecycle. Modeled after Lit's
1580
+ * `ReactiveController` pattern: implement the hooks you need, then register an instance with a host
1581
+ * via `host.addController(this)`.
1582
+ */
1583
+ interface ReactiveController {
1584
+ hostConnected?(): void;
1585
+ hostDisconnected?(): void;
1586
+ hostWillLoad?(): Promise<void> | void;
1587
+ hostDidLoad?(): void;
1588
+ hostWillRender?(): Promise<void> | void;
1589
+ hostDidRender?(): void;
1590
+ hostWillUpdate?(): Promise<void> | void;
1591
+ hostDidUpdate?(): void;
1592
+ }
1593
+ /**
1594
+ * The shape added to a component by mixing in `ReactiveControllerHost` (see below).
1595
+ */
1596
+ interface ReactiveControllerHostInterface extends ComponentInterface, HTMLElement {
1597
+ readonly controllers: ReadonlySet<ReactiveController>;
1598
+ addController(controller: ReactiveController): void;
1599
+ removeController(controller: ReactiveController): void;
1600
+ requestUpdate(): void;
1601
+ /**
1602
+ * Resolves once the next pending render commits. Matches the shape of Lit's
1603
+ * `ReactiveControllerHost.updateComplete`, for interop with controllers written against Lit's API
1604
+ * (e.g. `@lit/context`).
1605
+ */
1606
+ readonly updateComplete: Promise<boolean>;
1607
+ }
1648
1608
  interface RafCallback {
1649
1609
  (timeStamp: number): void;
1650
1610
  }
@@ -1689,7 +1649,7 @@ interface FunctionalUtilities {
1689
1649
  map: (children: VNode[], cb: (vnode: ChildNode$1, index: number, array: ChildNode$1[]) => ChildNode$1) => VNode[];
1690
1650
  }
1691
1651
  interface FunctionalComponent<T = {}> {
1692
- (props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[] | null;
1652
+ (props: T, children: VNode[], utils: FunctionalUtilities): VNode | null;
1693
1653
  }
1694
1654
  /**
1695
1655
  * A Child VDOM node
@@ -1700,7 +1660,7 @@ interface FunctionalComponent<T = {}> {
1700
1660
  * {@link FunctionalUtilities}).
1701
1661
  */
1702
1662
  interface ChildNode$1 {
1703
- vtag?: string | number | Function;
1663
+ vtag?: string | number | Function | symbol | null;
1704
1664
  vkey?: string | number;
1705
1665
  vtext?: string;
1706
1666
  vchildren?: VNode[];
@@ -1712,13 +1672,15 @@ interface ChildNode$1 {
1712
1672
  */
1713
1673
  interface VNode {
1714
1674
  $flags$: number;
1715
- $tag$: string | number | Function;
1675
+ $tag$: string | number | Function | symbol | null;
1716
1676
  $elm$: any;
1717
1677
  $text$: string;
1718
1678
  $children$: VNode[];
1719
1679
  $attrs$?: any;
1720
1680
  $name$?: string;
1721
1681
  $key$?: string | number;
1682
+ /** Signal reference for vdom bypass: signal text nodes store the signal here. */
1683
+ $signal$?: any;
1722
1684
  }
1723
1685
  //#endregion
1724
1686
  //#region src/declarations/stencil-public-compiler.d.ts
@@ -1805,20 +1767,6 @@ interface StencilConfig {
1805
1767
  * @default false
1806
1768
  */
1807
1769
  generateExportMaps?: boolean;
1808
- /**
1809
- * When the hashFileNames config is set to true, and it is a production build,
1810
- * the hashedFileNameLength config is used to determine how many characters the file name's hash should be.
1811
- */
1812
- hashedFileNameLength?: number;
1813
- /**
1814
- * During production builds, the content of each generated file is hashed to represent the content,
1815
- * and the hashed value is used as the filename. If the content isn't updated between builds,
1816
- * then it receives the same filename. When the content is updated, then the filename is different.
1817
- *
1818
- * By doing this, deployed apps can "forever-cache" the build directory and take full advantage of
1819
- * content delivery networks (CDNs) and heavily caching files for faster apps.
1820
- */
1821
- hashFileNames?: boolean;
1822
1770
  /**
1823
1771
  * The namespace config is a string representing a namespace for the app.
1824
1772
  * For apps that are not meant to be a library of reusable components,
@@ -1859,16 +1807,6 @@ interface StencilConfig {
1859
1807
  * This behavior defaults to `true`, but may be opted-out of by setting this flag to `false`.
1860
1808
  */
1861
1809
  transformAliasedImportPaths?: boolean;
1862
- /**
1863
- * When `true`, Stencil will suppress diagnostics which warn about public members using reserved names
1864
- * (for example, decorating a method named `focus` with `@Method()`). Defaults to `false`.
1865
- */
1866
- suppressReservedPublicNameWarnings?: boolean;
1867
- /**
1868
- * When `true`, we will validate a project's `package.json` based on the output target the user has designated
1869
- * as `isPrimaryPackageOutputTarget: true` in their Stencil config.
1870
- */
1871
- validatePrimaryPackageOutputTarget?: boolean;
1872
1810
  /**
1873
1811
  * Passes custom configuration down to the "@rolldown/plugin-node-resolve" that Stencil uses under the hood.
1874
1812
  * For further information: https://stenciljs.com/docs/module-bundling
@@ -1888,24 +1826,24 @@ interface StencilConfig {
1888
1826
  * Defaults to `false` in dev mode and `true` in production mode.
1889
1827
  */
1890
1828
  minifyCss?: boolean;
1891
- /**
1892
- * Forces Stencil to run in `dev` mode if the value is `true` and `production` mode
1893
- * if it's `false`.
1894
- *
1895
- * Defaults to `false` (ie. production) unless the `--dev` flag is used in the CLI.
1896
- */
1897
- devMode?: boolean;
1898
1829
  /**
1899
1830
  * Object to provide a custom logger. By default a `logger` is already provided for the
1900
1831
  * platform the compiler is running on, such as NodeJS or a browser.
1901
1832
  */
1902
1833
  logger?: Logger;
1903
1834
  /**
1904
- * Config to add extra runtime for DOM features that require more polyfills. Note
1905
- * that not all DOM APIs are fully polyfilled when using the slot polyfill. These
1906
- * are opt-in since not all users will require the additional runtime.
1835
+ * Compatibility and workaround flags for framework/bundler edge cases
1836
+ * and rarely-needed diagnostic suppressions.
1837
+ */
1838
+ compat?: ConfigCompat;
1839
+ /**
1840
+ * Replace `@State` and `@Prop` internals with `@preact/signals-core` signal primitives.
1841
+ * Enables cross-framework reactive interop - component state becomes subscribable by
1842
+ * Solid, Angular, Preact and any TC39-signal-compatible library without event/attribute
1843
+ * roundtrips. No API changes required in component code.
1844
+ * Defaults to `false`.
1907
1845
  */
1908
- extras?: ConfigExtras;
1846
+ signalBacking?: boolean;
1909
1847
  /**
1910
1848
  * The hydrated flag identifies if a component and all of its child components
1911
1849
  * have finished hydrating. This helps prevent any flash of unstyled content (FOUC)
@@ -1970,14 +1908,6 @@ interface StencilConfig {
1970
1908
  after?: any[];
1971
1909
  };
1972
1910
  entryComponentsHint?: string[];
1973
- /**
1974
- * Sets whether Stencil will write files to `dist/` during the build or not.
1975
- *
1976
- * By default this value is set to the opposite value of {@link devMode},
1977
- * i.e. it will be `true` when building for production and `false` when
1978
- * building for development.
1979
- */
1980
- buildDist?: boolean;
1981
1911
  buildLogFilePath?: string;
1982
1912
  devInspector?: boolean;
1983
1913
  devServer?: StencilDevServerConfig;
@@ -2005,7 +1935,7 @@ interface StencilConfig {
2005
1935
  * An array of component tag names to exclude from production builds.
2006
1936
  * Useful to remove test, demo or experimental components from final output.
2007
1937
  *
2008
- * **Note:** Exclusion only applies to production builds (default, or when `--prod` is used).
1938
+ * **Note:** Exclusion only applies to production builds (the default).
2009
1939
  * Development builds (with `--dev` flag) will include all components to support local testing.
2010
1940
  *
2011
1941
  * Supports glob patterns for matching multiple components:
@@ -2029,14 +1959,78 @@ interface StencilConfig {
2029
1959
  * Set whether unused dependencies should be excluded from the built output.
2030
1960
  */
2031
1961
  excludeUnusedDependencies?: boolean;
2032
- stencilCoreResolvedId?: string;
1962
+ /**
1963
+ * Declares the set of valid style "modes" (e.g. `ios`, `md`) used by mode-keyed
1964
+ * `styleUrls`/`styles` in `@Component()`. When set, the compiler validates that
1965
+ * every mode key used in a component matches one of these entries, catching typos
1966
+ * at build time. Entries marked `required` must be present on every component that
1967
+ * defines any mode-keyed styles.
1968
+ *
1969
+ * @example
1970
+ * ```ts
1971
+ * export const config: Config = {
1972
+ * modes: ['ios', { mode: 'md', required: true }],
1973
+ * };
1974
+ * ```
1975
+ *
1976
+ * @default []
1977
+ */
1978
+ modes?: (string | ModeConfig)[];
1979
+ /**
1980
+ * Explicitly declare which npm packages are Stencil collections to be re-bundled into this project.
1981
+ *
1982
+ * Without this option, collection ingestion is triggered only by a side-effect import:
1983
+ * ```ts
1984
+ * import '@ionic/core';
1985
+ * ```
1986
+ * @example
1987
+ * ```ts
1988
+ * export const config: Config = {
1989
+ * collections: ['@ionic/core', '@my-org/design-system'],
1990
+ * };
1991
+ * ```
1992
+ *
1993
+ * @default []
1994
+ */
1995
+ collections?: string[];
2033
1996
  }
2034
- interface ConfigExtrasBase {
1997
+ /**
1998
+ * DOM patches for light-dom / scoped components that use `<slot>`.
1999
+ *
2000
+ * These patches shield the component's slot machinery from framework DOM mutations
2001
+ * (e.g. when Angular or React insert / remove nodes they route directly to the host
2002
+ * element, bypassing the slot polyfill) and prevent hydration errors when a framework
2003
+ * encounters Stencil's internal slot reference nodes during SSR reconciliation.
2004
+ *
2005
+ * Patches are only applied at runtime when a component is both non-shadow **and**
2006
+ * declares at least one `<slot>`, so enabling them has no effect on pure shadow-DOM
2007
+ * components.
2008
+ *
2009
+ * Set to `true` (default) to enable all patches, `false` to disable all, or an object
2010
+ * for granular control.
2011
+ */
2012
+ type LightDomPatches = {
2013
+ /** Patches `childNodes`/`children` getters to return only slotted content. */
2014
+ childNodes?: boolean;
2015
+ /** Patches `cloneNode()` to correctly deep-clone slotted content. */
2016
+ cloneNode?: boolean;
2017
+ /** Patches `appendChild()`, `insertBefore()`, and `removeChild()` to route to the correct slot. */
2018
+ domMutations?: boolean;
2019
+ /** Patches `textContent` to act like shadow DOM (reads/writes slotted text only). */
2020
+ textContent?: boolean;
2021
+ };
2022
+ /**
2023
+ * Compatibility and workaround flags, primarily for shielding non-shadow DOM components
2024
+ * from consuming frameworks that mutate internals they don't know about, plus other
2025
+ * framework/bundler integration edge cases and rarely-needed diagnostic suppressions.
2026
+ * These are opt-in behaviors that aren't needed by every project.
2027
+ */
2028
+ interface ConfigCompat {
2035
2029
  /**
2036
2030
  * Projects that use a Stencil library built using the `dist` output target may have trouble lazily
2037
2031
  * loading components when using a bundler such as Vite or Parcel. Setting this flag to `true` will change how Stencil
2038
2032
  * lazily loads components in a way that works with additional bundlers. Setting this flag to `true` will increase
2039
- * the size of the compiled output. Defaults to `false`.
2033
+ * the size of the compiled output. Defaults to `true`.
2040
2034
  */
2041
2035
  enableImportInjection?: boolean;
2042
2036
  /**
@@ -2051,70 +2045,27 @@ interface ConfigExtrasBase {
2051
2045
  */
2052
2046
  initializeNextTick?: boolean;
2053
2047
  /**
2054
- * Adds `transformTag` calls to css strings and querySelector(All) calls
2048
+ * Adds `transformTag` calls to css strings and querySelector(All) calls.
2049
+ * Use `'prod'` to enable only in production builds.
2055
2050
  */
2056
2051
  additionalTagTransformers?: boolean | 'prod';
2057
2052
  /**
2058
- * Experimental flag.
2059
- * Updates the behavior of scoped components to align more closely with the behavior of the native
2060
- * Shadow DOM when using `slot`s.
2061
- * Defaults to `false`.
2053
+ * DOM patches for light-dom / scoped components that use `<slot>`.
2054
+ * See {@link LightDomPatches} for granular control. Defaults to `true`.
2062
2055
  */
2063
- experimentalScopedSlotChanges?: boolean;
2056
+ lightDomPatches?: boolean | LightDomPatches;
2064
2057
  /**
2065
- * By default Stencil turns the stylesheet provided to `globalStyle` into a constructable stylesheet
2066
- * and adds it to each component when rendered on the client which can be useful for sharing styles
2067
- * efficiently across components.
2068
- *
2069
- * If you want Stencil to also add the `globalStyle` to each component when rendering on the server
2070
- * then set this to `true`. If your `globalStyle` sheet is large then doing this may bloat the size
2071
- * of your SSR output when using declarative-shadow-dom.
2072
- *
2073
- * Setting this to `false` will prevent Stencil from adding any `globalStyle` to each component.
2074
- *
2075
- * Defaults to `'client'`.
2076
- */
2077
- addGlobalStyleToComponents?: boolean | 'client';
2078
- }
2079
- type ConfigExtrasSlotFixes<ExperimentalFixesEnabled extends boolean, IndividualFlags extends boolean> = {
2080
- /**
2081
- * By default, the slot polyfill does not update `appendChild()` so that it appends
2082
- * new child nodes into the correct child slot like how shadow dom works. This is an opt-in
2083
- * polyfill for those who need it when using `element.appendChild(node)` and expecting the
2084
- * child to be appended in the same location shadow dom would. This is not required for
2085
- * IE11 or Edge 18, but can be enabled if the app is using `appendChild()`. Defaults to `false`.
2086
- */
2087
- appendChildSlotFix?: IndividualFlags;
2088
- /**
2089
- * By default, the runtime does not polyfill `cloneNode()` when cloning a component
2090
- * that uses the slot polyfill. This is an opt-in polyfill for those who need it.
2091
- * This is not required for IE11 or Edge 18, but can be enabled if the app is using
2092
- * `cloneNode()` and unexpected node are being cloned due to the slot polyfill
2093
- * simulating shadow dom. Defaults to `false`.
2094
- */
2095
- cloneNodeFix?: IndividualFlags;
2096
- /**
2097
- * Experimental flag to align the behavior of invoking `textContent` on a scoped component to act more like a
2098
- * component that uses the shadow DOM. Defaults to `false`
2099
- */
2100
- scopedSlotTextContentFix?: IndividualFlags;
2101
- /**
2102
- * For browsers that do not support shadow dom (IE11 and Edge 18 and below), slot is polyfilled
2103
- * to simulate the same behavior. However, the host element's `childNodes` and `children`
2104
- * getters are not patched to only show the child nodes and elements of the default slot.
2105
- * Defaults to `false`.
2058
+ * When `true`, Stencil will suppress diagnostics which warn about public members using reserved names
2059
+ * (for example, decorating a method named `focus` with `@Method()`). Defaults to `false`.
2106
2060
  */
2107
- slotChildNodesFix?: IndividualFlags;
2061
+ suppressPublicNameWarnings?: boolean;
2108
2062
  /**
2109
- * Enables all slot-related fixes such as {@link slotChildNodesFix}, and
2110
- * {@link scopedSlotTextContentFix}.
2063
+ * When `true`, Stencil will suppress diagnostics which warn about event names conflicting with native DOM event names. Defaults to `false`.
2111
2064
  */
2112
- experimentalSlotFixes?: ExperimentalFixesEnabled;
2113
- };
2114
- type ConfigExtras = ConfigExtrasBase & (ConfigExtrasSlotFixes<true, true> | ConfigExtrasSlotFixes<false, boolean>);
2065
+ suppressEventNameWarnings?: boolean;
2066
+ }
2115
2067
  interface Config extends StencilConfig {
2116
2068
  buildAppCore?: boolean;
2117
- buildDocs?: boolean;
2118
2069
  configPath?: string;
2119
2070
  writeLog?: boolean;
2120
2071
  devServer?: DevServerConfig;
@@ -2128,6 +2079,11 @@ interface Config extends StencilConfig {
2128
2079
  tsWatchOptions?: any;
2129
2080
  _isValidated?: boolean;
2130
2081
  _isTesting?: boolean;
2082
+ /**
2083
+ * Internal flag set when --docs CLI flag is used.
2084
+ * Forces docs output targets to build even in dev mode.
2085
+ */
2086
+ _docsFlag?: boolean;
2131
2087
  /**
2132
2088
  * Whether running in a CI environment (disables interactive features, adjusts worker count)
2133
2089
  */
@@ -2206,11 +2162,11 @@ type UnvalidatedConfig = Loose<Config>;
2206
2162
  * type ReqFieldFoo = RequireFields<Foo, 'bar'>; // { bar: number, baz?: string }
2207
2163
  * ```
2208
2164
  */
2209
- type RequireFields<T, K extends keyof T> = T & { [P in K]-?: T[P] };
2165
+ type RequireFields<T, K extends keyof T> = T & { [P in K]-?: T[P]; };
2210
2166
  /**
2211
2167
  * Fields in {@link Config} to make required for {@link ValidatedConfig}
2212
2168
  */
2213
- type StrictConfigFields = keyof Pick<Config, 'cacheDir' | 'devMode' | 'devServer' | 'extras' | 'fsNamespace' | 'hashFileNames' | 'hashedFileNameLength' | 'hydratedFlag' | 'logLevel' | 'logger' | 'minifyCss' | 'minifyJs' | 'namespace' | 'outputTargets' | 'packageJsonFilePath' | 'rolldownConfig' | 'rootDir' | 'srcDir' | 'srcIndexHtml' | 'sys' | 'transformAliasedImportPaths' | 'validatePrimaryPackageOutputTarget'>;
2169
+ type StrictConfigFields = keyof Pick<Config, 'cacheDir' | 'devServer' | 'compat' | 'fsNamespace' | 'hydratedFlag' | 'logLevel' | 'logger' | 'minifyCss' | 'minifyJs' | 'namespace' | 'outputTargets' | 'packageJsonFilePath' | 'rolldownConfig' | 'rootDir' | 'srcDir' | 'srcIndexHtml' | 'sys' | 'transformAliasedImportPaths'>;
2214
2170
  /**
2215
2171
  * A version of {@link Config} that makes certain fields required. This type represents a valid configuration entity.
2216
2172
  * When a configuration is received by the user, it is a bag of unverified data. In order to make stricter guarantees
@@ -2218,8 +2174,24 @@ type StrictConfigFields = keyof Pick<Config, 'cacheDir' | 'devMode' | 'devServer
2218
2174
  * validations have occurred at runtime.
2219
2175
  */
2220
2176
  type ValidatedConfig = RequireFields<Config, StrictConfigFields> & {
2177
+ /**
2178
+ * Whether the build is running in development mode.
2179
+ * Set by the `--dev` CLI flag. Not user-configurable in `stencil.config.ts`.
2180
+ */
2181
+ devMode: boolean;
2221
2182
  sourceMap: boolean;
2222
2183
  };
2184
+ interface ModeConfig {
2185
+ /**
2186
+ * The mode name, matched against `styleUrls`/`styles` object keys in `@Component()`.
2187
+ */
2188
+ mode: string;
2189
+ /**
2190
+ * When `true`, every component that defines mode-keyed `styleUrls` or `styles`
2191
+ * must include this mode. Defaults to `false`.
2192
+ */
2193
+ required?: boolean;
2194
+ }
2223
2195
  interface HydratedFlag {
2224
2196
  /**
2225
2197
  * Defaults to `hydrated`.
@@ -2422,11 +2394,11 @@ interface PrerenderConfig {
2422
2394
  * Run after each `document` is hydrated, but before it is serialized
2423
2395
  * into an HTML string. Hook is passed the `document` and its `URL`.
2424
2396
  */
2425
- afterHydrate?(document: Document, url: URL, results: PrerenderUrlResults): any | Promise<any>;
2397
+ afterSsr?(document: Document, url: URL, results: PrerenderUrlResults): any | Promise<any>;
2426
2398
  /**
2427
2399
  * Run before each `document` is hydrated. Hook is passed the `document` it's `URL`.
2428
2400
  */
2429
- beforeHydrate?(document: Document, url: URL): any | Promise<any>;
2401
+ beforeSsr?(document: Document, url: URL): any | Promise<any>;
2430
2402
  /**
2431
2403
  * Runs after the template Document object has serialize into an
2432
2404
  * HTML formatted string. Returns an HTML string to be used as the
@@ -2470,9 +2442,9 @@ interface PrerenderConfig {
2470
2442
  */
2471
2443
  filePath?(url: URL, filePath: string): string;
2472
2444
  /**
2473
- * Returns the hydrate options to use for each individual prerendered page.
2445
+ * Returns the prerender options to use for each individual prerendered page.
2474
2446
  */
2475
- hydrateOptions?(url: URL): PrerenderHydrateOptions;
2447
+ prerenderOptions?(url: URL): PrerenderOptions;
2476
2448
  /**
2477
2449
  * Returns the template file's content. The template is the base
2478
2450
  * HTML used for all prerendered pages.
@@ -2496,7 +2468,7 @@ interface PrerenderConfig {
2496
2468
  */
2497
2469
  trailingSlash?: boolean;
2498
2470
  }
2499
- interface HydrateDocumentOptions {
2471
+ interface SsrDocumentOptions {
2500
2472
  /**
2501
2473
  * Build ID that will be added to `<html data-stencil-build="BUILD_ID">`. By default
2502
2474
  * a random ID will be generated
@@ -2513,7 +2485,7 @@ interface HydrateDocumentOptions {
2513
2485
  * JavaScript to read the structure of the HTML and rebuild each
2514
2486
  * component. Defaults to `true`.
2515
2487
  */
2516
- clientHydrateAnnotations?: boolean;
2488
+ clientSsrAnnotations?: boolean;
2517
2489
  /**
2518
2490
  * Constrain `setTimeout()` to 1ms, but still async. Also
2519
2491
  * only allows `setInterval()` to fire once, also constrained to 1ms.
@@ -2612,10 +2584,19 @@ interface HydrateDocumentOptions {
2612
2584
  default: 'declarative-shadow-dom' | 'scoped';
2613
2585
  } | boolean;
2614
2586
  }
2615
- interface SerializeDocumentOptions extends HydrateDocumentOptions {
2587
+ /**
2588
+ * Backwards compat for v4
2589
+ * @deprecated - use SsrDocumentOptions instead
2590
+ */
2591
+ interface HydrateDocumentOptions extends SsrDocumentOptions {}
2592
+ interface SerializeDocumentOptions extends SsrDocumentOptions {
2616
2593
  /**
2617
2594
  * Runs after the `document` has been hydrated.
2618
2595
  */
2596
+ afterSsr?(document: any): any | Promise<any>;
2597
+ /**
2598
+ * @deprecated Use `afterSsr` instead.
2599
+ */
2619
2600
  afterHydrate?(document: any): any | Promise<any>;
2620
2601
  /**
2621
2602
  * Sets an approximate line width the HTML should attempt to stay within.
@@ -2628,6 +2609,10 @@ interface SerializeDocumentOptions extends HydrateDocumentOptions {
2628
2609
  /**
2629
2610
  * Runs before the `document` has been hydrated.
2630
2611
  */
2612
+ beforeSsr?(document: any): any | Promise<any>;
2613
+ /**
2614
+ * @deprecated Use `beforeSsr` instead.
2615
+ */
2631
2616
  beforeHydrate?(document: any): any | Promise<any>;
2632
2617
  /**
2633
2618
  * Format the HTML in a nicely indented format.
@@ -2665,12 +2650,17 @@ interface SerializeDocumentOptions extends HydrateDocumentOptions {
2665
2650
  */
2666
2651
  modes?: ResolutionHandler[];
2667
2652
  }
2668
- interface HydrateFactoryOptions extends SerializeDocumentOptions {
2653
+ interface SsrFactoryOptions extends SerializeDocumentOptions {
2669
2654
  serializeToHtml: boolean;
2670
2655
  destroyWindow: boolean;
2671
2656
  destroyDocument: boolean;
2672
2657
  }
2673
- interface PrerenderHydrateOptions extends SerializeDocumentOptions {
2658
+ /**
2659
+ * Backwards compat for v4
2660
+ * @deprecated - use SsrFactoryOptions instead
2661
+ */
2662
+ interface HydrateFactoryOptions extends SsrFactoryOptions {}
2663
+ interface PrerenderOptions extends SerializeDocumentOptions {
2674
2664
  /**
2675
2665
  * Adds `<link rel="modulepreload">` for modules that will eventually be requested.
2676
2666
  * Defaults to `true`.
@@ -2705,6 +2695,11 @@ interface PrerenderHydrateOptions extends SerializeDocumentOptions {
2705
2695
  */
2706
2696
  staticDocument?: boolean;
2707
2697
  }
2698
+ /**
2699
+ * v4 backwards compat
2700
+ * @deprecated - use PrerenderOptions instead
2701
+ */
2702
+ interface PrerenderHydrateOptions extends PrerenderOptions {}
2708
2703
  interface RobotsTxtOpts {
2709
2704
  urls: string[];
2710
2705
  sitemapUrl: string;
@@ -3013,18 +3008,18 @@ interface ResolveModuleIdResults {
3013
3008
  * A controller which provides for communication and coordination between
3014
3009
  * threaded workers.
3015
3010
  */
3016
- interface WorkerMainController {
3011
+ interface WorkerMainController<T extends Record<string, (...args: any[]) => Promise<any>> = Record<string, (...args: any[]) => Promise<any>>> {
3017
3012
  /**
3018
3013
  * Send a given set of arguments to a worker
3019
3014
  */
3020
- send(...args: any[]): Promise<any>;
3015
+ send<K extends keyof T>(methodName: K, ...args: Parameters<T[K]>): ReturnType<T[K]>;
3021
3016
  /**
3022
3017
  * Handle a particular method
3023
3018
  *
3024
3019
  * @param name of the method to be passed to a worker
3025
3020
  * @returns a Promise wrapping the results
3026
3021
  */
3027
- handler(name: string): (...args: any[]) => Promise<any>;
3022
+ handler<K extends keyof T>(name: K): T[K];
3028
3023
  /**
3029
3024
  * Destroy the worker represented by this instance, rejecting all outstanding
3030
3025
  * tasks and killing the child process.
@@ -3091,6 +3086,7 @@ interface BuildNoChangeResults {
3091
3086
  interface CompilerBuildResults {
3092
3087
  buildId: number;
3093
3088
  componentGraph?: BuildResultsComponentGraph;
3089
+ components: ComponentCompilerMeta[];
3094
3090
  diagnostics: Diagnostic$1[];
3095
3091
  dirsAdded: string[];
3096
3092
  dirsDeleted: string[];
@@ -3102,9 +3098,10 @@ interface CompilerBuildResults {
3102
3098
  hasError: boolean;
3103
3099
  hasSuccessfulBuild: boolean;
3104
3100
  hmr?: HotModuleReplacement;
3105
- hydrateAppFilePath?: string;
3101
+ ssrAppFilePath?: string;
3106
3102
  isRebuild: boolean;
3107
3103
  namespace: string;
3104
+ fsNamespace: string;
3108
3105
  outputs: BuildOutput[];
3109
3106
  rootDir: string;
3110
3107
  srcDir: string;
@@ -3265,8 +3262,8 @@ interface ConfigBundle {
3265
3262
  }
3266
3263
  /**
3267
3264
  * A file and/or directory copy operation that may be specified as part of
3268
- * certain output targets for Stencil (in particular `dist`,
3269
- * `dist-custom-elements`, and `www`).
3265
+ * certain output targets for Stencil (in particular `loader-bundle`,
3266
+ * `standalone`, and `www`).
3270
3267
  */
3271
3268
  interface CopyTask {
3272
3269
  /**
@@ -3287,8 +3284,9 @@ interface CopyTask {
3287
3284
  */
3288
3285
  dest?: string;
3289
3286
  /**
3290
- * An optional array of glob patterns to exclude from the copy operation.
3291
- * @default ['**\/__mocks__/**', '**\/__fixtures__/**', '**\/dist/**', '**\/.{idea,git,cache,output,temp}/**', '**\/.ds_store', '**\/.gitignore', '**\/desktop.ini', '**\/thumbs.db']
3287
+ * Additional glob patterns to exclude from the copy operation, merged with
3288
+ * the built-in defaults: `__mocks__`, `__fixtures__`, `dist`, hidden dirs,
3289
+ * `.ds_store`, `.gitignore`, `desktop.ini`, `thumbs.db`.
3292
3290
  */
3293
3291
  ignore?: string[];
3294
3292
  /**
@@ -3367,39 +3365,12 @@ interface StencilDocsConfig {
3367
3365
  };
3368
3366
  };
3369
3367
  }
3370
- interface NodeResolveConfig {
3371
- exportConditions?: string[];
3372
- browser?: boolean;
3373
- moduleDirectories?: string[];
3374
- modulePaths?: string[];
3375
- dedupe?: string[] | ((importee: string) => boolean);
3376
- extensions?: readonly string[];
3377
- jail?: string;
3378
- mainFields?: readonly string[];
3379
- modulesOnly?: boolean;
3380
- preferBuiltins?: boolean | ((module: string) => boolean);
3381
- resolveOnly?: ReadonlyArray<string | RegExp> | null | ((module: string) => boolean);
3382
- rootDir?: string;
3383
- allowExportsFolderMapping?: boolean;
3384
- }
3385
- interface RolldownConfig {
3386
- inputOptions?: RolldownInputOptions;
3387
- outputOptions?: RolldownOutputOptions;
3388
- }
3389
- interface RolldownInputOptions {
3390
- context?: string;
3391
- moduleContext?: ((id: string) => string) | {
3392
- [id: string]: string;
3393
- };
3368
+ /** Options for rolldown's built-in module resolver, passed directly to rolldown's `resolve` input option. */
3369
+ type NodeResolveConfig = NonNullable<InputOptions['resolve']>;
3370
+ interface RolldownConfig {
3394
3371
  treeshake?: boolean;
3395
- maxParallelFileOps?: number;
3396
3372
  external?: (string | RegExp)[] | string | RegExp | ((source: string, importer: string | undefined, isResolved: boolean) => boolean | null | undefined);
3397
3373
  }
3398
- interface RolldownOutputOptions {
3399
- globals?: {
3400
- [name: string]: string;
3401
- } | ((name: string) => string);
3402
- }
3403
3374
  /**
3404
3375
  * This sets the log level hierarchy for our terminal logger, ranging from
3405
3376
  * most to least verbose.
@@ -3464,57 +3435,91 @@ interface LoggerTimeSpan {
3464
3435
  duration(): number;
3465
3436
  finish(finishedMsg: string, color?: string, bold?: boolean, newLineSuffix?: boolean): number;
3466
3437
  }
3467
- interface OutputTargetDist extends OutputTargetValidationConfig {
3468
- type: 'dist';
3438
+ /**
3439
+ * Output target for generating lazy-loaded component bundles with a loader infrastructure.
3440
+ * This creates an optimized distribution for CDN usage and applications that benefit from
3441
+ * lazy-loading components on demand.
3442
+ *
3443
+ * Formerly known as 'dist' in v4.
3444
+ *
3445
+ * @example
3446
+ * ```typescript
3447
+ * {
3448
+ * type: 'loader-bundle',
3449
+ * dir: 'dist/loader-bundle'
3450
+ * }
3451
+ * ```
3452
+ */
3453
+ interface OutputTargetLoaderBundle extends OutputTargetBaseNext {
3454
+ type: 'loader-bundle';
3455
+ /**
3456
+ * Directory where lazy-loaded bundles will be written.
3457
+ * @default '' (root of output directory)
3458
+ */
3469
3459
  buildDir?: string;
3470
- collectionDir?: string | null;
3460
+ copy?: CopyTask[];
3461
+ empty?: boolean;
3471
3462
  /**
3472
- * When `true` this flag will transform aliased import paths defined in
3473
- * a project's `tsconfig.json` to relative import paths in the compiled output's
3474
- * `dist-collection` bundle if it is generated (i.e. `collectionDir` is set).
3475
- *
3476
- * Paths will be left in aliased format if `false`.
3463
+ * Whether to generate CommonJS (CJS) bundles.
3477
3464
  *
3478
- * @example
3479
- * // tsconfig.json
3480
- * {
3481
- * paths: {
3482
- * "@utils/*": ['/src/utils/*']
3483
- * }
3484
- * }
3465
+ * When `true`, generates CJS output in `cjs/` subdirectory.
3466
+ * When `false` (default in v5+), only ESM bundles are generated.
3485
3467
  *
3486
- * // Source file
3487
- * import * as dateUtils from '@utils/date-utils';
3488
- * // Output file
3489
- * import * as dateUtils from '../utils/date-utils';
3468
+ * @default false
3490
3469
  */
3491
- transformAliasedImportPathsInCollection?: boolean | null;
3492
- typesDir?: string;
3470
+ cjs?: boolean;
3493
3471
  /**
3494
- * Provide a custom path for the ESM loader directory, containing files you can import
3472
+ * Custom path for the loader directory; files you can import
3495
3473
  * in an initiation script within your application to register all your components for
3496
3474
  * lazy loading.
3497
3475
  *
3498
- * @default /dist/loader
3476
+ * @default 'loader' (relative to output directory)
3499
3477
  */
3500
- esmLoaderPath?: string;
3501
- copy?: CopyTask[];
3502
- empty?: boolean;
3478
+ loaderPath?: string;
3503
3479
  /**
3504
- * Whether to generate CommonJS (CJS) bundles.
3480
+ * Hash the filenames of generated chunks based on their content.
3481
+ * Enables forever-caching of CDN-served bundles.
3505
3482
  *
3506
- * When `true`, generates CJS output in `dist/cjs/` and `dist/index.cjs.js`.
3507
- * When `false` (default in v5+), only ESM bundles are generated.
3483
+ * @default true in production, false in dev mode
3484
+ */
3485
+ hashFileNames?: boolean;
3486
+ /**
3487
+ * Number of characters to use for the content hash in filenames.
3488
+ *
3489
+ * @default 8
3490
+ */
3491
+ hashedFileNameLength?: number;
3492
+ /**
3493
+ * When `true`, marks `@stencil/core` as an external dependency in the bundler (ESM/CJS)
3494
+ * distribution output. Consumers must provide `@stencil/core` themselves.
3495
+ *
3496
+ * Has no effect on the browser/CDN build - the runtime is always bundled there.
3508
3497
  *
3509
3498
  * @default false
3510
3499
  */
3511
- cjs?: boolean;
3500
+ externalRuntime?: boolean;
3512
3501
  }
3513
- interface OutputTargetDistCollection extends OutputTargetValidationConfig {
3514
- type: 'dist-collection';
3502
+ /**
3503
+ * Output target for generating Stencil component source for downstream re-bundling.
3504
+ * This output contains transpiled source code, component metadata, and configuration
3505
+ * that downstream Stencil projects can re-compile and bundle.
3506
+ *
3507
+ * Formerly 'dist-collection' sub-output in v4, now a first-class output target in v5.
3508
+ *
3509
+ * In production builds, this output is auto-generated unless explicitly configured.
3510
+ *
3511
+ * @example
3512
+ * ```typescript
3513
+ * {
3514
+ * type: 'collection',
3515
+ * dir: 'dist/collection',
3516
+ * transformAliasedImportPaths: true
3517
+ * }
3518
+ * ```
3519
+ */
3520
+ interface OutputTargetCollection extends OutputTargetBaseNext {
3521
+ type: 'collection';
3515
3522
  empty?: boolean;
3516
- dir: string;
3517
- collectionDir: string;
3518
3523
  /**
3519
3524
  * When `true` this flag will transform aliased import paths defined in
3520
3525
  * a project's `tsconfig.json` to relative import paths in the compiled output.
@@ -3536,10 +3541,25 @@ interface OutputTargetDistCollection extends OutputTargetValidationConfig {
3536
3541
  */
3537
3542
  transformAliasedImportPaths?: boolean | null;
3538
3543
  }
3539
- interface OutputTargetDistTypes extends OutputTargetValidationConfig {
3540
- type: 'dist-types';
3541
- dir: string;
3542
- typesDir: string;
3544
+ /**
3545
+ * Output target for generating TypeScript type definitions (.d.ts files).
3546
+ *
3547
+ * Formerly a sub-output of 'dist' and 'dist-custom-elements' in v4,
3548
+ * now a first-class output target in v5 that can be shared across multiple outputs.
3549
+ *
3550
+ * In production builds, this output is auto-generated unless explicitly configured.
3551
+ *
3552
+ * @example
3553
+ * ```typescript
3554
+ * {
3555
+ * type: 'types',
3556
+ * dir: 'dist/types'
3557
+ * }
3558
+ * ```
3559
+ */
3560
+ interface OutputTargetTypes extends OutputTargetBaseNext {
3561
+ type: 'types';
3562
+ empty?: boolean;
3543
3563
  }
3544
3564
  interface OutputTargetDistLazy extends OutputTargetBase {
3545
3565
  type: 'dist-lazy';
@@ -3549,22 +3569,106 @@ interface OutputTargetDistLazy extends OutputTargetBase {
3549
3569
  isBrowserBuild?: boolean;
3550
3570
  esmIndexFile?: string;
3551
3571
  cjsIndexFile?: string;
3572
+ loaderDir?: string;
3573
+ typesDir?: string;
3552
3574
  empty?: boolean;
3575
+ /** Inherited from parent output target (loader-bundle or www). Only meaningful for browser builds. */
3576
+ hashFileNames?: boolean;
3577
+ /** Inherited from parent output target (loader-bundle or www). */
3578
+ hashedFileNameLength?: number;
3579
+ /** Inherited from loader-bundle. When true, @stencil/core is external in this bundler output. */
3580
+ externalRuntime?: boolean;
3553
3581
  }
3554
- interface OutputTargetDistGlobalStyles extends OutputTargetBase {
3555
- type: 'dist-global-styles';
3556
- file: string;
3582
+ /**
3583
+ * Output target for global styles.
3584
+ * Generates a CSS file from an input stylesheet.
3585
+ *
3586
+ * Can be configured in two ways:
3587
+ * 1. **Implicit** (backwards compat): Set `globalStyle` in the config and this output is auto-generated
3588
+ * 2. **Explicit**: Define this output target with an `input` property
3589
+ *
3590
+ * Multiple `global-style` outputs are supported for building separate CSS bundles.
3591
+ *
3592
+ * @example
3593
+ * ```typescript
3594
+ * // Explicit configuration with custom input/output
3595
+ * {
3596
+ * type: 'global-style',
3597
+ * input: './src/theme.css',
3598
+ * fileName: 'theme.css',
3599
+ * dir: 'dist/assets',
3600
+ * copyToLoaderBrowser: false
3601
+ * }
3602
+ * ```
3603
+ */
3604
+ interface OutputTargetGlobalStyle extends OutputTargetBaseNext {
3605
+ type: 'global-style';
3606
+ /**
3607
+ * Path to the input CSS file to compile.
3608
+ * When specified, this takes precedence over the `globalStyle` config option.
3609
+ *
3610
+ * If neither `input` nor `globalStyle` config is set, no CSS will be built.
3611
+ */
3612
+ input?: string;
3613
+ /**
3614
+ * Output filename for the compiled CSS.
3615
+ * @default '{namespace}.css' when using globalStyle config, or basename of input file
3616
+ */
3617
+ fileName?: string;
3618
+ /**
3619
+ * When `true`, also copies the global style CSS to the loader-bundle browser directory
3620
+ * for backwards compatibility with existing CDN consumers who have hardcoded CSS paths.
3621
+ *
3622
+ * @default true
3623
+ */
3624
+ copyToLoaderBrowser?: boolean;
3625
+ /**
3626
+ * Controls whether this global stylesheet is injected into component shadow DOMs
3627
+ * as a constructable stylesheet at runtime.
3628
+ *
3629
+ * - `'none'` (default): Don't inject - stylesheet must be loaded externally (e.g., via `<link>`)
3630
+ * - `'client'`: Inject only in client builds, not SSR (reduces SSR output size)
3631
+ * - `'all'`: Inject in both client and SSR builds
3632
+ *
3633
+ * @default 'none'
3634
+ */
3635
+ inject?: 'none' | 'client' | 'all';
3557
3636
  }
3558
- interface OutputTargetDistLazyLoader extends OutputTargetBase {
3559
- type: 'dist-lazy-loader';
3560
- dir: string;
3561
- esmDir: string;
3562
- cjsDir?: string;
3563
- componentDts: string;
3564
- empty: boolean;
3637
+ /**
3638
+ * Output target for component assets.
3639
+ * Copies all component `assetsDirs` to a unified location.
3640
+ *
3641
+ * auto-generated when components have `assetsDirs` unless explicitly configured.
3642
+ * The output is placed in `dist/assets/` by default and is available to all distribution strategies.
3643
+ *
3644
+ * @example
3645
+ * ```typescript
3646
+ * {
3647
+ * type: 'assets',
3648
+ * dir: 'dist/assets'
3649
+ * }
3650
+ * ```
3651
+ */
3652
+ interface OutputTargetAssets extends OutputTargetBaseNext {
3653
+ type: 'assets';
3565
3654
  }
3566
- interface OutputTargetHydrate extends OutputTargetBase {
3567
- type: 'dist-hydrate-script';
3655
+ /**
3656
+ * Output target for server-side rendering (SSR) and hydration.
3657
+ * Generates a script that can be used for SSR and static site generation (prerendering).
3658
+ *
3659
+ * Formerly known as 'dist-hydrate-script' in v4.
3660
+ *
3661
+ * @example
3662
+ * ```typescript
3663
+ * {
3664
+ * type: 'ssr',
3665
+ * dir: 'dist/ssr',
3666
+ * minify: true
3667
+ * }
3668
+ * ```
3669
+ */
3670
+ interface OutputTargetSsr extends OutputTargetBase {
3671
+ type: 'ssr';
3568
3672
  dir?: string;
3569
3673
  /**
3570
3674
  * Module IDs that should not be bundled into the script.
@@ -3584,6 +3688,13 @@ interface OutputTargetHydrate extends OutputTargetBase {
3584
3688
  */
3585
3689
  cjs?: boolean;
3586
3690
  }
3691
+ interface OutputTargetSsrWasm extends OutputTargetBase {
3692
+ type: 'ssr-wasm';
3693
+ /** Output directory. @default 'dist/ssr-wasm' */
3694
+ dir?: string;
3695
+ empty?: boolean;
3696
+ minify?: boolean;
3697
+ }
3587
3698
  interface OutputTargetCustom extends OutputTargetBase {
3588
3699
  type: 'custom';
3589
3700
  name: string;
@@ -3641,6 +3752,22 @@ interface OutputTargetDocsReadme extends OutputTargetBase {
3641
3752
  overwriteExisting?: boolean | 'if-missing';
3642
3753
  footer?: string;
3643
3754
  strict?: boolean;
3755
+ /**
3756
+ * Add extra columns to the generated Properties/Events tables, e.g. to
3757
+ * surface custom JSDoc tags as a column of their own.
3758
+ */
3759
+ customColumns?: {
3760
+ props?: DocsReadmeCustomColumn<JsonDocsProp>[];
3761
+ events?: DocsReadmeCustomColumn<JsonDocsEvent>[];
3762
+ };
3763
+ }
3764
+ /**
3765
+ * A custom column to render in a `docs-readme` Properties/Events table.
3766
+ * `content` is invoked once per row.
3767
+ */
3768
+ interface DocsReadmeCustomColumn<T> {
3769
+ header: string;
3770
+ content: (member: T, cmp: JsonDocsComponent) => string;
3644
3771
  }
3645
3772
  interface OutputTargetDocsJson extends OutputTargetBase {
3646
3773
  type: 'docs-json';
@@ -3681,18 +3808,46 @@ interface OutputTargetDocsCustom extends OutputTargetBase {
3681
3808
  generator: (docs: JsonDocs, config: Config) => void | Promise<void>;
3682
3809
  strict?: boolean;
3683
3810
  }
3811
+ /**
3812
+ * Output target for generating an [Agent Skill](https://agentskills.io)
3813
+ * (`SKILL.md` + per-component reference files) describing a component
3814
+ * library, so AI coding agents can consume its API and usage examples
3815
+ * directly.
3816
+ */
3817
+ interface OutputTargetDocsAgentSkill extends OutputTargetBase {
3818
+ type: 'docs-agent-skill';
3819
+ /**
3820
+ * The root directory where the skill (`SKILL.md` + `components/*.md`) is written.
3821
+ *
3822
+ * defaults to `dist/skill`
3823
+ */
3824
+ dir?: string;
3825
+ /**
3826
+ * The skill's name, used in the `SKILL.md` frontmatter.
3827
+ *
3828
+ * Defaults to a kebab-cased form of {@link Config.namespace}.
3829
+ */
3830
+ name?: string;
3831
+ /**
3832
+ * The skill's description, used in the `SKILL.md` frontmatter - this is the
3833
+ * text agents use to decide when to load the skill.
3834
+ *
3835
+ * Defaults to an auto-generated sentence built from the project's
3836
+ * {@link JsonDocs.usage} (if present) or its component tags.
3837
+ */
3838
+ description?: string;
3839
+ }
3684
3840
  interface OutputTargetStats extends OutputTargetBase {
3685
3841
  type: 'stats';
3686
3842
  file?: string;
3687
3843
  }
3688
- interface OutputTargetBaseNext {
3689
- type: string;
3844
+ interface OutputTargetBaseNext extends OutputTargetBase {
3690
3845
  dir?: string;
3691
3846
  }
3692
3847
  /**
3693
3848
  * The collection of valid export behaviors.
3694
3849
  * Used to generate a type for typed configs as well as output target validation
3695
- * for the `dist-custom-elements` output target.
3850
+ * for the `standalone` output target.
3696
3851
  *
3697
3852
  * Adding a value to this const array will automatically add it as a valid option on the
3698
3853
  * output target configuration for `customElementsExportBehavior`.
@@ -3701,8 +3856,7 @@ interface OutputTargetBaseNext {
3701
3856
  * - `auto-define-custom-elements`: Enables the auto-definition of a component and its children (recursively) in the custom elements registry. This
3702
3857
  * functionality allows consumers to bypass the explicit call to define a component, its children, its children's
3703
3858
  * children, etc. Users of this flag should be aware that enabling this functionality may increase bundle size.
3704
- * - `bundle`: A `defineCustomElements` function will be exported from the distribution directory. This behavior was added to allow easy migration
3705
- * from `dist-custom-elements-bundle` to `dist-custom-elements`.
3859
+ * - `bundle`: A `defineCustomElements` function will be exported from the distribution directory.
3706
3860
  * - `single-export-module`: All components will be re-exported from the specified directory's root `index.js` file.
3707
3861
  */
3708
3862
  declare const CustomElementsExportBehaviorOptions: readonly ["default", "auto-define-custom-elements", "bundle", "single-export-module"];
@@ -3711,23 +3865,40 @@ declare const CustomElementsExportBehaviorOptions: readonly ["default", "auto-de
3711
3865
  * This is used on the output target config for intellisense in typed configs.
3712
3866
  */
3713
3867
  type CustomElementsExportBehavior = (typeof CustomElementsExportBehaviorOptions)[number];
3714
- interface OutputTargetDistCustomElements extends OutputTargetValidationConfig {
3715
- type: 'dist-custom-elements';
3868
+ /**
3869
+ * Output target for generating standalone component modules.
3870
+ * Each component is output as an individual ES module that can be directly imported.
3871
+ *
3872
+ * This output target is ideal for npm consumption and tree-shaking, as consumers
3873
+ * can import only the components they need.
3874
+ *
3875
+ * Formerly known as 'dist-custom-elements' in v4.
3876
+ *
3877
+ * @example
3878
+ * ```typescript
3879
+ * {
3880
+ * type: 'standalone',
3881
+ * dir: 'dist/standalone',
3882
+ * externalRuntime: true,
3883
+ * autoLoader: true
3884
+ * }
3885
+ * ```
3886
+ */
3887
+ interface OutputTargetStandalone extends OutputTargetBaseNext {
3888
+ type: 'standalone';
3716
3889
  empty?: boolean;
3717
3890
  /**
3718
3891
  * Triggers the following behaviors when enabled:
3719
3892
  * 1. All `@stencil/core/*` module references are treated as external during bundling.
3720
3893
  * 2. File names are not hashed.
3721
3894
  * 3. File minification will follow the behavior defined at the root of the Stencil config.
3895
+ *
3896
+ * @default false
3722
3897
  */
3723
3898
  externalRuntime?: boolean;
3724
3899
  copy?: CopyTask[];
3725
3900
  includeGlobalScripts?: boolean;
3726
3901
  minify?: boolean;
3727
- /**
3728
- * Enables the generation of type definition files for the output target.
3729
- */
3730
- generateTypeDeclarations?: boolean;
3731
3902
  /**
3732
3903
  * Define the export/definition behavior for the output target's generated output.
3733
3904
  * This controls if/how custom elements will be defined or where components will be exported from.
@@ -3738,6 +3909,8 @@ interface OutputTargetDistCustomElements extends OutputTargetValidationConfig {
3738
3909
  * Generate an auto-loader script that uses MutationObserver to lazily load
3739
3910
  * and define custom elements as they appear in the DOM.
3740
3911
  *
3912
+ * @default true
3913
+ *
3741
3914
  * When set to `true`, generates a `loader.js` file that auto-starts on import.
3742
3915
  * Can also be configured with an object for more control:
3743
3916
  * - `fileName`: Custom filename for the loader (default: 'loader.js')
@@ -3777,27 +3950,45 @@ interface OutputTargetBase {
3777
3950
  * A unique string to differentiate one output target from another
3778
3951
  */
3779
3952
  type: string;
3953
+ /**
3954
+ * When `true`, this output target will be skipped during development builds (`--dev`).
3955
+ * This improves dev build times by not generating production-only artifacts.
3956
+ *
3957
+ * Defaults vary by output target type:
3958
+ * - `loader-bundle`: `false` (always builds)
3959
+ * - `standalone`: `true` (skips in dev)
3960
+ * - `ssr`: `true` (skips in dev, unless `devServer.ssr` is enabled)
3961
+ * - `docs-*`: `true` (skips in dev)
3962
+ * - `custom`: `true` (skips in dev)
3963
+ * - `www`, `copy`, `stats`: `false` (always runs)
3964
+ */
3965
+ skipInDev?: boolean;
3780
3966
  }
3781
- /**
3782
- * Output targets that can have validation for common `package.json` field values
3783
- * (module, types, etc.). This allows them to be marked for validation in a project's Stencil config.
3784
- */
3785
- interface OutputTargetValidationConfig extends OutputTargetBaseNext {
3786
- isPrimaryPackageOutputTarget?: boolean;
3787
- }
3788
- type EligiblePrimaryPackageOutputTarget = OutputTargetDist | OutputTargetDistCustomElements | OutputTargetDistCollection | OutputTargetDistTypes;
3789
- type OutputTargetBuild = OutputTargetDistCollection | OutputTargetDistLazy;
3967
+ type OutputTargetBuild = OutputTargetCollection | OutputTargetDistLazy;
3790
3968
  interface OutputTargetCopy extends OutputTargetBase {
3791
3969
  type: 'copy';
3792
3970
  dir: string;
3793
3971
  copy?: CopyTask[];
3794
- copyAssets?: 'collection' | 'dist';
3795
3972
  }
3796
3973
  interface OutputTargetWww extends OutputTargetBase {
3797
3974
  /**
3798
3975
  * Webapp output target.
3799
3976
  */
3800
3977
  type: 'www';
3978
+ /**
3979
+ * Choose how components are bundled for the www output.
3980
+ *
3981
+ * - `'loader'` (default): Uses the loader-bundle architecture with chunk
3982
+ * splitting and a loader infrastructure. Best for production apps with many
3983
+ * components where you want optimal loading performance.
3984
+ *
3985
+ * - `'standalone'`: Uses standalone component modules with an auto-loader that
3986
+ * uses MutationObserver to dynamically import components as they appear in
3987
+ * the DOM. Simpler architecture, easier debugging, one module per component.
3988
+ *
3989
+ * Default: `'loader'`
3990
+ */
3991
+ bundleMode?: 'loader' | 'standalone';
3801
3992
  /**
3802
3993
  * The directory to write the app's JavaScript and CSS build
3803
3994
  * files to. The default is to place this directory as a child
@@ -3844,7 +4035,7 @@ interface OutputTargetWww extends OutputTargetBase {
3844
4035
  * Path to an external node module which has exports of the prerender config object.
3845
4036
  * ```
3846
4037
  * module.exports = {
3847
- * afterHydrate(document, url) {
4038
+ * afterSsr(document, url) {
3848
4039
  * document.title = `URL: ${url.href}`;
3849
4040
  * }
3850
4041
  * }
@@ -3852,15 +4043,35 @@ interface OutputTargetWww extends OutputTargetBase {
3852
4043
  */
3853
4044
  prerenderConfig?: string;
3854
4045
  /**
3855
- * Service worker config for production builds. During development builds
3856
- * service worker script will be injected to automatically deregister existing
3857
- * service workers. When set to `false` neither a service worker registration
3858
- * or deregistration will be added to the index.html.
4046
+ * Service worker config for production builds. In development mode, a script
4047
+ * to deregister existing service workers is always injected. Defaults to
4048
+ * `null` (disabled). Set to `true` to enable with default settings, or provide
4049
+ * a config object for custom settings.
3859
4050
  */
3860
- serviceWorker?: ServiceWorkerConfig | null | false;
4051
+ serviceWorker?: ServiceWorkerConfig | true | null;
3861
4052
  appDir?: string;
4053
+ /**
4054
+ * Hash the filenames of generated chunks based on their content.
4055
+ * Enables forever-caching of CDN-served bundles.
4056
+ *
4057
+ * @default true in production, false in dev mode
4058
+ */
4059
+ hashFileNames?: boolean;
4060
+ /**
4061
+ * Number of characters to use for the content hash in filenames.
4062
+ *
4063
+ * @default 8
4064
+ */
4065
+ hashedFileNameLength?: number;
3862
4066
  }
3863
- type OutputTarget = OutputTargetCopy | OutputTargetCustom | OutputTargetDist | OutputTargetDistCollection | OutputTargetDistCustomElements | OutputTargetDistLazy | OutputTargetDistGlobalStyles | OutputTargetDistLazyLoader | OutputTargetDocsJson | OutputTargetDocsCustom | OutputTargetDocsReadme | OutputTargetDocsVscode | OutputTargetDocsCustomElementsManifest | OutputTargetWww | OutputTargetHydrate | OutputTargetStats | OutputTargetDistTypes;
4067
+ type OutputTarget = OutputTargetCopy | OutputTargetCustom | OutputTargetLoaderBundle | OutputTargetStandalone | OutputTargetSsr | OutputTargetSsrWasm | OutputTargetCollection | OutputTargetTypes | OutputTargetGlobalStyle | OutputTargetAssets | OutputTargetDistLazy | OutputTargetDocsJson | OutputTargetDocsCustom | OutputTargetDocsReadme | OutputTargetDocsVscode | OutputTargetDocsCustomElementsManifest | OutputTargetDocsAgentSkill | OutputTargetWww | OutputTargetStats;
4068
+ /**
4069
+ * A post-validation form of {@link OutputTargetWww} where `serviceWorker`
4070
+ * has been normalized - `true` is resolved to a {@link ServiceWorkerConfig}.
4071
+ */
4072
+ type ValidatedOutputTargetWww = Omit<OutputTargetWww, 'serviceWorker'> & {
4073
+ serviceWorker?: ServiceWorkerConfig | null;
4074
+ };
3864
4075
  /**
3865
4076
  * Our custom configuration interface for generated caching Service Workers
3866
4077
  * using the Workbox library (see https://developer.chrome.com/docs/workbox/).
@@ -3908,12 +4119,6 @@ interface LoadConfigInit {
3908
4119
  configPath?: string;
3909
4120
  logger?: Logger;
3910
4121
  sys?: CompilerSystem;
3911
- /**
3912
- * When set to true, if the "tsconfig.json" file is not found
3913
- * it'll automatically generate and save a default tsconfig
3914
- * within the root directory.
3915
- */
3916
- initTsConfig?: boolean;
3917
4122
  }
3918
4123
  /**
3919
4124
  * Results from an attempt to load a config. The values on this interface
@@ -3955,24 +4160,13 @@ interface WorkerOptions {
3955
4160
  maxConcurrentTasksPerWorker?: number;
3956
4161
  logger?: Logger;
3957
4162
  }
3958
- interface RolldownInterface {
3959
- rolldown: {
3960
- (config: any): Promise<any>;
3961
- };
3962
- plugins: {
3963
- nodeResolve(opts: any): any;
3964
- replace(opts: any): any;
3965
- commonjs(opts: any): any;
3966
- json(): any;
3967
- };
3968
- }
3969
4163
  interface ResolveModuleOptions {
3970
4164
  manuallyResolve?: boolean;
3971
4165
  packageJson?: boolean;
3972
4166
  }
3973
4167
  interface PrerenderStartOptions {
3974
4168
  buildId?: string;
3975
- hydrateAppFilePath?: string;
4169
+ ssrAppFilePath?: string;
3976
4170
  componentGraph?: BuildResultsComponentGraph;
3977
4171
  srcIndexHtmlPath?: string;
3978
4172
  }
@@ -4047,6 +4241,18 @@ interface Compiler {
4047
4241
  createWatcher(): Promise<CompilerWatcher>;
4048
4242
  destroy(): Promise<void>;
4049
4243
  sys: CompilerSystem;
4244
+ /**
4245
+ * @internal - Testing only. Access to the in-memory filesystem
4246
+ */
4247
+ fs?: InMemoryFileSystem;
4248
+ /**
4249
+ * @internal - Testing only. Access to the validated configuration
4250
+ */
4251
+ config?: ValidatedConfig;
4252
+ /**
4253
+ * @internal - Testing only. Access to the compiler context
4254
+ */
4255
+ compilerCtx?: CompilerCtx;
4050
4256
  }
4051
4257
  interface CompilerWatcher extends BuildOnEvents {
4052
4258
  start: () => Promise<WatcherCloseResults>;
@@ -4087,7 +4293,7 @@ interface TranspileOptions {
4087
4293
  componentMetadata?: 'runtimestatic' | 'compilerstatic' | string | undefined;
4088
4294
  /**
4089
4295
  * The actual internal import path for any `@stencil/core` imports.
4090
- * Default is `@stencil/core/runtime/client`.
4296
+ * Default is `@stencil/core/runtime/client/standalone`.
4091
4297
  */
4092
4298
  coreImportPath?: string;
4093
4299
  /**
@@ -4173,7 +4379,51 @@ interface TranspileOptions {
4173
4379
  * Adds `transformTag` calls to css strings and querySelector(All) calls
4174
4380
  */
4175
4381
  additionalTagTransformers?: boolean;
4382
+ /**
4383
+ * Callback used to resolve parent-class source for inheritance-chain analysis.
4384
+ * Called when a component's `extends` clause references a class from another
4385
+ * module. Return the resolved absolute path and source text of that module,
4386
+ * or `null` to skip inheritance resolution for that specifier.
4387
+ *
4388
+ * @example
4389
+ * ```ts
4390
+ * transpile(myComponentCode, {
4391
+ * resolveImport: (specifier, importer) => {
4392
+ * const resolved = require.resolve(specifier, { paths: [path.dirname(importer)] });
4393
+ * return { code: fs.readFileSync(resolved, 'utf8'), path: resolved };
4394
+ * },
4395
+ * });
4396
+ * ```
4397
+ */
4398
+ resolveImport?: (specifier: string, importer: string) => {
4399
+ code: string;
4400
+ path: string;
4401
+ } | null;
4402
+ /**
4403
+ * When `true` class declarations at the end of a `@Component` inheritance chain
4404
+ * * that have no `extends` clause * will get `extends HTMLElement` injected, and a minimal
4405
+ * `constructor() { super(); }`. Any stencil static meta-getters are also stripped.
4406
+ */
4407
+ transformAsBaseClass?: boolean;
4408
+ /**
4409
+ * Overrides for Stencil's BUILD feature flags in the generated output.
4410
+ * When set, a BUILD mutation statement is prepended to the compiled code so
4411
+ * that the specified flags take effect for this component at runtime.
4412
+ */
4413
+ buildOverrides?: BuildOverrides;
4176
4414
  }
4415
+ /**
4416
+ * Keys of {@link BuildConditionals} that can be meaningfully overridden at
4417
+ * transpile time — config-driven flags that are not derived from component
4418
+ * scanning or runtime environment detection.
4419
+ */
4420
+ type BuildOverrideKeys = 'hotModuleReplacement' | 'signalBacking' | 'vdomSignals' | 'lightDomPatches' | 'slotChildNodes' | 'slotCloneNode' | 'slotDomMutations' | 'slotTextContent' | 'lifecycleDOMEvents' | 'initializeNextTick';
4421
+ /**
4422
+ * Subset of Stencil's BUILD feature flags that can be overridden at transpile
4423
+ * time. Derived from {@link BuildConditionals} via `Pick` so the field list
4424
+ * and types stay in sync with the authoritative definition.
4425
+ */
4426
+ type BuildOverrides = Pick<BuildConditionals, BuildOverrideKeys>;
4177
4427
  type CompileTarget = 'latest' | 'esnext' | 'es2020' | 'es2019' | 'es2018' | 'es2017' | 'es2015' | string | undefined;
4178
4428
  interface TranspileResults {
4179
4429
  code: string;
@@ -4199,6 +4449,17 @@ interface TransformOptions {
4199
4449
  style: 'static' | null;
4200
4450
  styleImportData: 'queryparams' | null;
4201
4451
  target?: string;
4452
+ /**
4453
+ * @see {@link TranspileOptions.resolveImport}
4454
+ */
4455
+ resolveImport?: (specifier: string, importer: string) => {
4456
+ code: string;
4457
+ path: string;
4458
+ } | null;
4459
+ /** @see {@link TranspileOptions.transformAsBaseClass} */
4460
+ transformAsBaseClass?: boolean;
4461
+ /** @see {@link TranspileOptions.buildOverrides} */
4462
+ buildOverrides?: BuildOverrides;
4202
4463
  }
4203
4464
  interface CompileScriptMinifyOptions {
4204
4465
  target?: CompileTarget;
@@ -4297,6 +4558,7 @@ interface BuildFeatures {
4297
4558
  vdomStyle: boolean;
4298
4559
  vdomText: boolean;
4299
4560
  vdomXlink: boolean;
4561
+ vdomSignals: boolean;
4300
4562
  slotRelocation: boolean;
4301
4563
  patchAll: boolean;
4302
4564
  patchChildren: boolean;
@@ -4343,21 +4605,27 @@ interface BuildConditionals extends Partial<BuildFeatures> {
4343
4605
  lazyLoad?: boolean;
4344
4606
  profile?: boolean;
4345
4607
  constructableCSS?: boolean;
4346
- appendChildSlotFix?: boolean;
4347
- slotChildNodesFix?: boolean;
4348
- scopedSlotTextContentFix?: boolean;
4349
- cloneNodeFix?: boolean;
4608
+ /** True when `compat.lightDomPatches === true` - enables `applyLightDomPatches` shortcut. */
4609
+ lightDomPatches?: boolean;
4610
+ /** Patch `childNodes`/`children` getters on light-dom slotted components. */
4611
+ slotChildNodes?: boolean;
4612
+ /** Patch `cloneNode()` on light-dom slotted components. */
4613
+ slotCloneNode?: boolean;
4614
+ /** Patch `appendChild`/`insertBefore`/`removeChild` on light-dom slotted components. */
4615
+ slotDomMutations?: boolean;
4616
+ /** Patch `textContent` on light-dom slotted components. */
4617
+ slotTextContent?: boolean;
4350
4618
  hydratedAttribute?: boolean;
4351
4619
  hydratedClass?: boolean;
4352
4620
  hydratedSelectorName?: string;
4621
+ /** True when a global-style input contains `@import "stencil-hydrate"` - suppresses dynamic style injection in the loader. */
4622
+ staticHydrationStyles?: boolean;
4353
4623
  initializeNextTick?: boolean;
4354
- shadowDomShim?: boolean;
4355
4624
  asyncQueue?: boolean;
4356
4625
  additionalTagTransformers?: boolean | 'prod';
4357
- attachStyles?: boolean;
4358
- experimentalSlotFixes?: boolean;
4359
- experimentalScopedSlotChanges?: boolean;
4360
- addGlobalStyleToComponents?: boolean | 'client';
4626
+ signalBacking?: boolean;
4627
+ /** True when JSX signal bypass is active - text nodes and attributes backed by Signal objects update the DOM directly. Auto-enabled when `signalBacking: true`. */
4628
+ vdomSignals?: boolean;
4361
4629
  }
4362
4630
  type ModuleFormat = 'amd' | 'cjs' | 'es' | 'iife' | 'system' | 'umd' | 'commonjs' | 'esm' | 'module' | 'systemjs';
4363
4631
  interface RolldownResultModule {
@@ -4408,15 +4676,17 @@ interface BuildCtx {
4408
4676
  hasScriptChanges: boolean;
4409
4677
  hasStyleChanges: boolean;
4410
4678
  hasWarning: boolean;
4411
- hydrateAppFilePath: string;
4679
+ ssrAppFilePath: string;
4412
4680
  indexBuildCount: number;
4413
4681
  indexDoc: Document;
4682
+ /** All non-entry HTML files found in srcDir, keyed by path relative to srcDir */
4683
+ htmlDocs: Map<string, Document>;
4414
4684
  isRebuild: boolean;
4415
4685
  /**
4416
4686
  * A collection of Stencil's intermediate representation of components, tied to the current build
4417
4687
  */
4418
4688
  moduleFiles: Module[];
4419
- packageJson: PackageJsonData;
4689
+ packageJson: PackageJsonData | null;
4420
4690
  pendingCopyTasks: Promise<CopyResults>[];
4421
4691
  progress(task: BuildTask): void;
4422
4692
  requiresFullBuild: boolean;
@@ -4460,8 +4730,6 @@ interface CompilerBuildStats {
4460
4730
  options: {
4461
4731
  minifyJs: boolean;
4462
4732
  minifyCss: boolean;
4463
- hashFileNames: boolean;
4464
- hashedFileNameLength: number;
4465
4733
  };
4466
4734
  formats: {
4467
4735
  esmBrowser: ReadonlyArray<CompilerBuildStatBundle>;
@@ -4497,12 +4765,6 @@ interface BuildComponent {
4497
4765
  dependencies?: string[];
4498
4766
  }
4499
4767
  type SourceTarget = 'es2017' | 'latest';
4500
- /**
4501
- * A note regarding Rolldown types:
4502
- * As of this writing, there is no great way to import external types for packages that are directly embedded in the
4503
- * Stencil source. As a result, some types are duplicated here for Rolldown that will be used within the codebase.
4504
- * Updates to rolldown may require these typings to be updated.
4505
- */
4506
4768
  type RolldownResult = RolldownChunkResult | RolldownAssetResult;
4507
4769
  interface RolldownAssetResult {
4508
4770
  type: 'asset';
@@ -4523,16 +4785,6 @@ interface RolldownChunkResult {
4523
4785
  moduleFormat: ModuleFormat;
4524
4786
  map?: RolldownSourceMap;
4525
4787
  }
4526
- interface RolldownSourceMap {
4527
- file: string;
4528
- mappings: string;
4529
- names: string[];
4530
- sources: string[];
4531
- sourcesContent: string[];
4532
- version: number;
4533
- toString(): string;
4534
- toUrl(): string;
4535
- }
4536
4788
  /**
4537
4789
  * Result of Stencil compressing, mangling, and otherwise 'minifying' JavaScript
4538
4790
  */
@@ -4576,6 +4828,7 @@ interface CollectionCompilerMeta {
4576
4828
  bundles?: {
4577
4829
  components: string[];
4578
4830
  }[];
4831
+ buildFlags?: Partial<BuildConditionals>;
4579
4832
  }
4580
4833
  interface CollectionCompilerVersion {
4581
4834
  name: string;
@@ -4594,6 +4847,8 @@ interface CollectionManifest {
4594
4847
  global?: string;
4595
4848
  compiler?: CollectionCompilerVersion;
4596
4849
  bundles?: CollectionBundleManifest[];
4850
+ /** Build flags the lib was compiled with. Consuming Stencil projects OR-merge these in. */
4851
+ buildFlags?: Partial<BuildConditionals>;
4597
4852
  }
4598
4853
  type CollectionComponentEntryPath = string;
4599
4854
  interface CollectionBundleManifest {
@@ -4612,6 +4867,25 @@ interface CollectionDependencyData {
4612
4867
  name: string;
4613
4868
  tags: string[];
4614
4869
  }
4870
+ /**
4871
+ * A memoized result of the SASS + Lightning CSS transformation for a single stylesheet, keyed by
4872
+ * the annotated Rolldown import id (e.g. `/path/to/comp.scss?tag=ion-button&encapsulation=shadow`).
4873
+ *
4874
+ * Storing this allows all output targets (customElements, lazy, hydrate) that process the same
4875
+ * stylesheets to share a single computation instead of repeating it N times.
4876
+ */
4877
+ interface CssTransformCacheEntry {
4878
+ /** Resolved file ID after plugin (SASS) transforms */
4879
+ pluginTransformId: string;
4880
+ /** CSS source produced by the SASS / plugin pipeline */
4881
+ pluginTransformCode: string;
4882
+ /** File dependencies discovered during the SASS transform (e.g. `@import`-ed partials) */
4883
+ pluginTransformDependencies: string[];
4884
+ /** Diagnostics emitted during the plugin transform pass */
4885
+ pluginTransformDiagnostics: Diagnostic$1[];
4886
+ /** Full output of the subsequent `transformCssToEsm` call */
4887
+ cssTransformOutput: TransformCssToEsmOutput;
4888
+ }
4615
4889
  interface CompilerCtx {
4616
4890
  version: number;
4617
4891
  activeBuildId: number;
@@ -4624,7 +4898,8 @@ interface CompilerCtx {
4624
4898
  addWatchFile: (path: string) => void;
4625
4899
  cache: Cache;
4626
4900
  cssModuleImports: Map<string, string[]>;
4627
- cachedGlobalStyle: string;
4901
+ /** Cache of built global styles, keyed by input file path */
4902
+ globalStyleCache: Map<string, string>;
4628
4903
  collections: CollectionCompilerMeta[];
4629
4904
  compilerOptions: any;
4630
4905
  events: BuildEvents;
@@ -4638,7 +4913,7 @@ interface CompilerCtx {
4638
4913
  moduleMap: ModuleMap;
4639
4914
  nodeMap: NodeMap;
4640
4915
  resolvedCollections: Set<string>;
4641
- rolldownCacheHydrate: any;
4916
+ rolldownCacheSsr: any;
4642
4917
  rolldownCacheLazy: any;
4643
4918
  rolldownCacheNative: any;
4644
4919
  styleModeNames: Set<string>;
@@ -4646,6 +4921,32 @@ interface CompilerCtx {
4646
4921
  changedFiles: Set<string>;
4647
4922
  worker?: CompilerWorkerContext;
4648
4923
  rolldownCache: Map<string, any>;
4924
+ /**
4925
+ * Cross-build cache for {@link ts.transpileModule} results.
4926
+ * Keyed by `"${bundleId}:${normalizedFilePath}"`. Invalidated for any
4927
+ * file that appears in {@link changedModules} after TypeScript re-emits.
4928
+ * @see transpileCache in compiler-ctx.ts
4929
+ */
4930
+ transpileCache: Map<string, {
4931
+ outputText: string;
4932
+ sourceMapText: string | null;
4933
+ }>;
4934
+ /**
4935
+ * Cross-build cache of the last style text pushed to the HMR client.
4936
+ * Keyed by getScopeId result (e.g. "ion-accordion$ios"). Used by
4937
+ * extTransformsPlugin to avoid re-pushing unchanged styles on every rebuild.
4938
+ */
4939
+ prevStylesMap: Map<string, string>;
4940
+ /**
4941
+ * Cross-output-target cache for the SASS + Lightning CSS computation.
4942
+ * Keyed by the annotated Rolldown import id. Null entries indicate that the
4943
+ * source file could not be read (propagated as a `null` return from the
4944
+ * transform hook).
4945
+ *
4946
+ * Entries are invalidated in `invalidateRolldownCaches` whenever a
4947
+ * source file or one of its SASS dependencies is modified.
4948
+ */
4949
+ cssTransformCache: Map<string, CssTransformCacheEntry | null>;
4649
4950
  reset(): void;
4650
4951
  }
4651
4952
  type NodeMap = WeakMap<any, ComponentCompilerMeta>;
@@ -4706,10 +5007,12 @@ interface ComponentCompilerFeatures {
4706
5007
  hasVdomStyle: boolean;
4707
5008
  hasVdomText: boolean;
4708
5009
  hasVdomXlink: boolean;
5010
+ hasSignalsImport: boolean;
4709
5011
  hasWatchCallback: boolean;
4710
5012
  htmlAttrNames: string[];
4711
5013
  htmlTagNames: string[];
4712
5014
  htmlParts: string[];
5015
+ htmlSlots: string[];
4713
5016
  isUpdateable: boolean;
4714
5017
  /**
4715
5018
  * A plain component is one that doesn't have:
@@ -4803,6 +5106,7 @@ interface ComponentCompilerMeta extends ComponentCompilerFeatures {
4803
5106
  states: ComponentCompilerState[];
4804
5107
  styleDocs: CompilerStyleDoc[];
4805
5108
  styles: StyleCompiler[];
5109
+ globalStyles: ComponentGlobalStyle[];
4806
5110
  tagName: string;
4807
5111
  virtualProperties: ComponentCompilerVirtualProperty[];
4808
5112
  watchers: ComponentCompilerChangeHandler[];
@@ -4819,7 +5123,7 @@ type Encapsulation = 'shadow' | 'scoped' | 'none';
4819
5123
  * These enable proper slot behavior when not using native Shadow DOM.
4820
5124
  */
4821
5125
  interface ComponentPatches {
4822
- /** Apply all slot patches (equivalent to experimentalSlotFixes) */
5126
+ /** Apply all slot patches (equivalent to lightDomPatches) */
4823
5127
  all?: boolean;
4824
5128
  /** Patch child node accessors (children, firstChild, lastChild, etc.) */
4825
5129
  children?: boolean;
@@ -4879,6 +5183,11 @@ interface ComponentCompilerPropertyComplexType {
4879
5183
  * annotation in the original source file.
4880
5184
  */
4881
5185
  references: ComponentCompilerTypeReferences;
5186
+ /**
5187
+ * @internal TypeScript AST node used for semantic type analysis during compilation.
5188
+ * Not serialized, only used internally for improved type renaming logic.
5189
+ */
5190
+ _astNode?: any;
4882
5191
  }
4883
5192
  /**
4884
5193
  * A record of `ComponentCompilerTypeReference` entities.
@@ -4972,6 +5281,11 @@ interface ComponentCompilerMethodComplexType {
4972
5281
  parameters: JsonDocMethodParameter[];
4973
5282
  references: ComponentCompilerTypeReferences;
4974
5283
  return: string;
5284
+ /**
5285
+ * @internal TypeScript AST method node used for semantic type analysis during compilation.
5286
+ * Not serialized, only used internally for improved type renaming logic.
5287
+ */
5288
+ _astNode?: any;
4975
5289
  }
4976
5290
  interface ComponentCompilerChangeHandler {
4977
5291
  propName: string;
@@ -5150,7 +5464,7 @@ interface HostElement extends HTMLElement {
5150
5464
  disconnectedCallback?: () => void;
5151
5465
  host?: Element;
5152
5466
  forceUpdate?: () => void;
5153
- __stencil__getHostRef?: () => HostRef;
5467
+ __s_ghr?: () => HostRef;
5154
5468
  /**
5155
5469
  * Unique stencil id for this element
5156
5470
  */
@@ -5204,9 +5518,18 @@ interface HostElement extends HTMLElement {
5204
5518
  * must be resolved for the top, ancestor component to be fully hydrated
5205
5519
  */
5206
5520
  ['s-p']?: Promise<void>[];
5521
+ /**
5522
+ * Pending Connects:
5523
+ * A list of {@link HostRef.$onFirstConnectPromise$} promises for descendants that
5524
+ * were already registered with this component (their nearest Stencil ancestor) by
5525
+ * the time this component's own initial `componentWillLoad` was scheduled. Awaited
5526
+ * so this component's `componentWillLoad` can't fire before those descendants'
5527
+ * real `connectedCallback`s have.
5528
+ */
5529
+ ['s-pc']?: Promise<void>[];
5207
5530
  componentOnReady?: () => Promise<this>;
5208
5531
  }
5209
- interface HydrateResults {
5532
+ interface SsrResults {
5210
5533
  buildId: string;
5211
5534
  diagnostics: Diagnostic$1[];
5212
5535
  url: string;
@@ -5218,42 +5541,42 @@ interface HydrateResults {
5218
5541
  search: string | null;
5219
5542
  hash: string | null;
5220
5543
  html: string | null;
5221
- components: HydrateComponent[];
5222
- anchors: HydrateAnchorElement[];
5223
- imgs: HydrateImgElement[];
5224
- scripts: HydrateScriptElement[];
5225
- styles: HydrateStyleElement[];
5226
- staticData: HydrateStaticData[];
5544
+ components: SsrComponent[];
5545
+ anchors: SsrAnchorElement[];
5546
+ imgs: SsrImgElement[];
5547
+ scripts: SsrScriptElement[];
5548
+ styles: SsrStyleElement[];
5549
+ staticData: SsrStaticData[];
5227
5550
  title: string | null;
5228
5551
  hydratedCount: number;
5229
5552
  httpStatus: number | null;
5230
5553
  }
5231
- interface HydrateComponent {
5554
+ interface SsrComponent {
5232
5555
  tag: string;
5233
5556
  mode: string;
5234
5557
  count: number;
5235
5558
  depth: number;
5236
5559
  }
5237
- interface HydrateElement {
5560
+ interface SsrElement {
5238
5561
  [attrName: string]: string | undefined;
5239
5562
  }
5240
- interface HydrateAnchorElement extends HydrateElement {
5563
+ interface SsrAnchorElement extends SsrElement {
5241
5564
  href?: string;
5242
5565
  target?: string;
5243
5566
  }
5244
- interface HydrateImgElement extends HydrateElement {
5567
+ interface SsrImgElement extends SsrElement {
5245
5568
  src?: string;
5246
5569
  }
5247
- interface HydrateScriptElement extends HydrateElement {
5570
+ interface SsrScriptElement extends SsrElement {
5248
5571
  src?: string;
5249
5572
  type?: string;
5250
5573
  }
5251
- interface HydrateStyleElement extends HydrateElement {
5574
+ interface SsrStyleElement extends SsrElement {
5252
5575
  id?: string;
5253
5576
  href?: string;
5254
5577
  content?: string;
5255
5578
  }
5256
- interface HydrateStaticData {
5579
+ interface SsrStaticData {
5257
5580
  id: string;
5258
5581
  type: string;
5259
5582
  content: string;
@@ -5315,6 +5638,7 @@ interface Module {
5315
5638
  htmlAttrNames: string[];
5316
5639
  htmlTagNames: string[];
5317
5640
  htmlParts: string[];
5641
+ htmlSlots: string[];
5318
5642
  isCollectionDependency: boolean;
5319
5643
  isLegacy: boolean;
5320
5644
  jsFilePath: string;
@@ -5344,6 +5668,7 @@ interface Module {
5344
5668
  hasVdomStyle: boolean;
5345
5669
  hasVdomText: boolean;
5346
5670
  hasVdomXlink: boolean;
5671
+ hasSignalsImport: boolean;
5347
5672
  }
5348
5673
  interface Plugin {
5349
5674
  name?: string;
@@ -5378,7 +5703,7 @@ interface PrerenderUrlRequest {
5378
5703
  baseUrl: string;
5379
5704
  componentGraphPath: string;
5380
5705
  devServerHostUrl: string;
5381
- hydrateAppFilePath: string;
5706
+ ssrAppFilePath: string;
5382
5707
  isDebug: boolean;
5383
5708
  prerenderConfigPath: string;
5384
5709
  staticSite: boolean;
@@ -5391,7 +5716,7 @@ interface PrerenderManager {
5391
5716
  prerenderUrlWorker: (prerenderRequest: PrerenderUrlRequest) => Promise<PrerenderUrlResults>;
5392
5717
  devServerHostUrl: string;
5393
5718
  diagnostics: Diagnostic$1[];
5394
- hydrateAppFilePath: string;
5719
+ ssrAppFilePath: string;
5395
5720
  isDebug: boolean;
5396
5721
  logCount: number;
5397
5722
  outputTarget: OutputTargetWww;
@@ -5444,6 +5769,11 @@ interface RenderNode extends HostElement {
5444
5769
  * Slot name of either the slot itself or the slotted node
5445
5770
  */
5446
5771
  ['s-sn']?: string;
5772
+ /**
5773
+ * `slot` attribute of a `<slot>` reference rendered as a text node (no fallback content),
5774
+ * since text nodes can't carry real DOM attributes.
5775
+ */
5776
+ ['s-sa']?: string;
5447
5777
  /**
5448
5778
  * Host element tag name:
5449
5779
  * The tag name of the host element that this
@@ -5496,64 +5826,64 @@ interface RenderNode extends HostElement {
5496
5826
  * Used to know the components encapsulation.
5497
5827
  * empty "" for shadow, "c" from scoped
5498
5828
  */
5499
- ['s-en']?: '' | /*shadow*/'c';
5829
+ ['s-en']?: '' | /*shadow*/ 'c';
5500
5830
  /**
5501
5831
  * On a `scoped: true` component
5502
- * with `experimentalSlotFixes` flag enabled,
5832
+ * with `lightDomPatches` flag enabled,
5503
5833
  * returns the internal `childNodes` of the component
5504
5834
  */
5505
5835
  readonly __childNodes?: NodeListOf<ChildNode>;
5506
5836
  /**
5507
5837
  * On a `scoped: true` component
5508
- * with `experimentalSlotFixes` flag enabled,
5838
+ * with `lightDomPatches` flag enabled,
5509
5839
  * returns the internal `children` of the component
5510
5840
  */
5511
5841
  readonly __children?: HTMLCollectionOf<Element>;
5512
5842
  /**
5513
5843
  * On a `scoped: true` component
5514
- * with `experimentalSlotFixes` flag enabled,
5844
+ * with `lightDomPatches` flag enabled,
5515
5845
  * returns the internal `firstChild` of the component
5516
5846
  */
5517
5847
  readonly __firstChild?: ChildNode;
5518
5848
  /**
5519
5849
  * On a `scoped: true` component
5520
- * with `experimentalSlotFixes` flag enabled,
5850
+ * with `lightDomPatches` flag enabled,
5521
5851
  * returns the internal `lastChild` of the component
5522
5852
  */
5523
5853
  readonly __lastChild?: ChildNode;
5524
5854
  /**
5525
5855
  * On a `scoped: true` component
5526
- * with `experimentalSlotFixes` flag enabled,
5856
+ * with `lightDomPatches` flag enabled,
5527
5857
  * returns the internal `textContent` of the component
5528
5858
  */
5529
5859
  __textContent?: string;
5530
5860
  /**
5531
5861
  * On a `scoped: true` component
5532
- * with `experimentalSlotFixes` flag enabled,
5862
+ * with `lightDomPatches` flag enabled,
5533
5863
  * gives access to the original `append` method
5534
5864
  */
5535
5865
  __append?: (...nodes: (Node | string)[]) => void;
5536
5866
  /**
5537
5867
  * On a `scoped: true` component
5538
- * with `experimentalSlotFixes` flag enabled,
5868
+ * with `lightDomPatches` flag enabled,
5539
5869
  * gives access to the original `prepend` method
5540
5870
  */
5541
5871
  __prepend?: (...nodes: (Node | string)[]) => void;
5542
5872
  /**
5543
5873
  * On a `scoped: true` component
5544
- * with `experimentalSlotFixes` flag enabled,
5874
+ * with `lightDomPatches` flag enabled,
5545
5875
  * gives access to the original `appendChild` method
5546
5876
  */
5547
5877
  __appendChild?: <T extends Node>(newChild: T) => T;
5548
5878
  /**
5549
5879
  * On a `scoped: true` component
5550
- * with `experimentalSlotFixes` flag enabled,
5880
+ * with `lightDomPatches` flag enabled,
5551
5881
  * gives access to the original `insertBefore` method
5552
5882
  */
5553
5883
  __insertBefore?: <T extends Node>(node: T, child: Node | null) => T;
5554
5884
  /**
5555
5885
  * On a `scoped: true` component
5556
- * with `experimentalSlotFixes` flag enabled,
5886
+ * with `lightDomPatches` flag enabled,
5557
5887
  * gives access to the original `removeChild` method
5558
5888
  */
5559
5889
  __removeChild?: <T extends Node>(child: T) => T;
@@ -5591,40 +5921,56 @@ interface PatchedSlotNode extends Node {
5591
5921
  ['s-sr']?: boolean;
5592
5922
  /**
5593
5923
  * On a `scoped: true` component
5594
- * with `experimentalSlotFixes` flag enabled,
5924
+ * with `lightDomPatches` flag enabled,
5595
5925
  * returns the actual `parentNode` of the component
5596
5926
  */
5597
5927
  __parentNode?: RenderNode;
5598
5928
  /**
5599
5929
  * On a `scoped: true` component
5600
- * with `experimentalSlotFixes` flag enabled,
5930
+ * with `lightDomPatches` flag enabled,
5601
5931
  * returns the actual `nextSibling` of the component
5602
5932
  */
5603
5933
  __nextSibling?: RenderNode;
5604
5934
  /**
5605
5935
  * On a `scoped: true` component
5606
- * with `experimentalSlotFixes` flag enabled,
5936
+ * with `lightDomPatches` flag enabled,
5607
5937
  * returns the actual `previousSibling` of the component
5608
5938
  */
5609
5939
  __previousSibling?: RenderNode;
5610
5940
  /**
5611
5941
  * On a `scoped: true` component
5612
- * with `experimentalSlotFixes` flag enabled,
5942
+ * with `lightDomPatches` flag enabled,
5613
5943
  * returns the actual `nextElementSibling` of the component
5614
5944
  */
5615
5945
  __nextElementSibling?: RenderNode;
5616
5946
  /**
5617
5947
  * On a `scoped: true` component
5618
- * with `experimentalSlotFixes` flag enabled,
5948
+ * with `lightDomPatches` flag enabled,
5619
5949
  * returns the actual `nextElementSibling` of the component
5620
5950
  */
5621
5951
  __previousElementSibling?: RenderNode;
5622
5952
  }
5623
5953
  type LazyBundlesRuntimeData = LazyBundleRuntimeData[];
5624
- type LazyBundleRuntimeData = [/** bundleIds */string, ComponentRuntimeMetaCompact[]];
5625
- type ComponentRuntimeMetaCompact = [/** flags */number, /** tagname */string, /** members */{
5954
+ type LazyBundleRuntimeData = [
5955
+ /** bundleIds */
5956
+ string, ComponentRuntimeMetaCompact[]];
5957
+ type ComponentRuntimeMetaCompact = [
5958
+ /** flags */
5959
+ number,
5960
+ /** tagname */
5961
+ string,
5962
+ /** members */
5963
+ {
5626
5964
  [memberName: string]: ComponentRuntimeMember;
5627
- }?, /** listeners */ComponentRuntimeHostListener[]?, /** watchers */ComponentConstructorChangeHandlers?, /** serializers */ComponentConstructorChangeHandlers?, /** deserializers */ComponentConstructorChangeHandlers?];
5965
+ }?,
5966
+ /** listeners */
5967
+ ComponentRuntimeHostListener[]?,
5968
+ /** watchers */
5969
+ ComponentConstructorChangeHandlers?,
5970
+ /** serializers */
5971
+ ComponentConstructorChangeHandlers?,
5972
+ /** deserializers */
5973
+ ComponentConstructorChangeHandlers?];
5628
5974
  /**
5629
5975
  * Runtime metadata for a Stencil component
5630
5976
  */
@@ -5716,7 +6062,7 @@ type ComponentRuntimeReflectingAttr = [string, string | undefined];
5716
6062
  * associated {@link HostRef} instance.
5717
6063
  */
5718
6064
  type RuntimeRef = HostElement | {
5719
- __stencil__getHostRef?: () => HostRef;
6065
+ __s_ghr?: () => HostRef;
5720
6066
  };
5721
6067
  /**
5722
6068
  * Interface used to track an Element, it's virtual Node (`VNode`), and other data
@@ -5727,6 +6073,14 @@ interface HostRef {
5727
6073
  $cmpMeta$: ComponentRuntimeMeta;
5728
6074
  $hostElement$: HostElement;
5729
6075
  $instanceValues$?: Map<string, any>;
6076
+ /**
6077
+ * Prop/state changes accumulated since the last render, flushed to
6078
+ * `componentShouldUpdate` once per render cycle.
6079
+ */
6080
+ $queuedPropChanges$?: ComponentShouldUpdateChanges;
6081
+ $signalValues$?: Map<string, import('@preact/signals-core').Signal<any>>;
6082
+ /** Dispose function that tears down all signal effects for this component. */
6083
+ $signalCleanup$?: () => void;
5730
6084
  $serializerValues$?: Map<string, string>;
5731
6085
  $lazyInstance$?: ComponentInterface;
5732
6086
  /**
@@ -5759,6 +6113,21 @@ interface HostRef {
5759
6113
  * It is called after {@link HostRef.$onInstancePromise$} resolves.
5760
6114
  */
5761
6115
  $onRenderResolve$?: () => void;
6116
+ /**
6117
+ * A promise that resolves once this component's real `connectedCallback` has fired
6118
+ * for the first time. Created lazily - either by a descendant that needs to wait for
6119
+ * this component's connection before firing its own real `connectedCallback`
6120
+ * ({@link HOST_FLAGS.hasFiredConnected}), or by this component registering itself
6121
+ * with its nearest Stencil ancestor's `s-pc` list. This is what lets a component's
6122
+ * real `connectedCallback` (and, transitively, a pending ancestor's initial
6123
+ * `componentWillLoad`) stay ordered correctly regardless of which of an
6124
+ * ancestor/descendant pair's lazy module happens to resolve first.
6125
+ */
6126
+ $onFirstConnectPromise$?: Promise<void>;
6127
+ /**
6128
+ * A callback which resolves {@link HostRef.$onFirstConnectPromise$}
6129
+ */
6130
+ $onFirstConnectResolve$?: () => void;
5762
6131
  $vnode$?: VNode;
5763
6132
  $queuedListeners$?: [string, any][];
5764
6133
  $rmListeners$?: (() => void)[];
@@ -5768,6 +6137,11 @@ interface HostRef {
5768
6137
  * Defer connectedCallback until after first render for components with slot relocation.
5769
6138
  */
5770
6139
  $deferredConnectedCallback$?: boolean;
6140
+ /**
6141
+ * The number of times this host's lazy component load has failed and been retried.
6142
+ * Used to give up retrying after {@link MAX_LAZY_LOAD_RETRIES} failed attempts.
6143
+ */
6144
+ $loadRetryCount$?: number;
5771
6145
  }
5772
6146
  interface PlatformRuntime {
5773
6147
  /**
@@ -5825,6 +6199,12 @@ interface ExternalStyleCompiler {
5825
6199
  relativePath: string;
5826
6200
  originalComponentPath: string;
5827
6201
  }
6202
+ interface ComponentGlobalStyle {
6203
+ /** Absolute path to the CSS file, or null for inline styles */
6204
+ absolutePath: string | null;
6205
+ /** Raw inline CSS string, or null for file-based styles */
6206
+ styleStr: string | null;
6207
+ }
5828
6208
  interface CompilerModeStyles {
5829
6209
  [modeName: string]: string[];
5830
6210
  }
@@ -5911,7 +6291,6 @@ interface PackageJsonData {
5911
6291
  browser?: string;
5912
6292
  module?: string;
5913
6293
  'jsnext:main'?: string;
5914
- 'collection:main'?: string;
5915
6294
  unpkg?: string;
5916
6295
  collection?: string;
5917
6296
  types?: string;
@@ -6049,10 +6428,6 @@ interface NewSpecPageOptions {
6049
6428
  * Sets the mocked `document.referrer`.
6050
6429
  */
6051
6430
  referrer?: string;
6052
- /**
6053
- * Manually set if the mocked document supports Shadow DOM or not. Default is `true`.
6054
- */
6055
- supportsShadowDom?: boolean;
6056
6431
  /**
6057
6432
  * When a component is pre-rendered it includes HTML annotations, such as `s-id` attributes and `<!-t.0->` comments. This information is used by client-side hydrating. Default is `false`.
6058
6433
  */
@@ -6069,11 +6444,6 @@ interface NewSpecPageOptions {
6069
6444
  * By default, any changes to component properties and attributes must `page.waitForChanges()` in order to test the updates. As an option, `autoApplyChanges` continuously flushes the queue on the background. Default is `false`.
6070
6445
  */
6071
6446
  autoApplyChanges?: boolean;
6072
- /**
6073
- * By default, styles are not attached to the DOM and they are not reflected in the serialized HTML.
6074
- * Setting this option to `true` will include the component's styles in the serializable output.
6075
- */
6076
- attachStyles?: boolean;
6077
6447
  /**
6078
6448
  * Set {@link BuildConditionals} for testing based off the metadata of the component under test.
6079
6449
  * When `true` all `BuildConditionals` will be assigned to the global testing `BUILD` object, regardless of their
@@ -6085,6 +6455,20 @@ interface NewSpecPageOptions {
6085
6455
  * the spec page.
6086
6456
  */
6087
6457
  platform?: Partial<PlatformRuntime>;
6458
+ /**
6459
+ * Controls how shadow DOM components are serialized during `hydrateServerSide`.
6460
+ * When set to `'scoped'`, shadow DOM components are rendered as scoped light DOM
6461
+ * (matching the behavior of `serializeShadowRoot: 'scoped'` in production SSR).
6462
+ * When set to `false`, shadow DOM components render with a real shadow root.
6463
+ * Default is `false`.
6464
+ */
6465
+ serializeShadowRoot?: 'scoped' | false;
6466
+ /**
6467
+ * Override individual {@link BuildConditionals} for this test. Applied after all other
6468
+ * BUILD setup so these values take final precedence. Useful for testing code paths that
6469
+ * are gated behind a build flag (e.g. `{ signalBacking: true }`).
6470
+ */
6471
+ buildFlags?: Partial<BuildConditionals>;
6088
6472
  }
6089
6473
  /**
6090
6474
  * A record of `TypesMemberNameData` entities.
@@ -6251,4 +6635,4 @@ interface ValidateTypesResults {
6251
6635
  filePaths: string[];
6252
6636
  }
6253
6637
  //#endregion
6254
- export { ComponentCompilerVirtualProperty as $, escapeRegExpSpecialCharacters as $a, TranspileOptions as $i, CompilerEventBuildFinish as $n, dashToPascalCase as $o, LoggerLineUpdater as $r, byteSize as $s, PluginTransformResults as $t, CompilerStyleDoc as A, StyleDoc as Aa, PrerenderConfig as Ai, UpdatedLazyBuildCtx as An, isOutputTargetStats as Ao, CopyResults as Ar, DIST_GLOBAL_STYLES as As, HydrateResults as At, ComponentCompilerMeta as B, isJsFile as Ba, RolldownInputOptions as Bi, BuildNoChangeResults as Bn, hasError as Bo, FsWatchResults as Br, EVENT_FLAGS as Bs, ModuleFormat as Bt, CompilerBuildStatBundle as C, JsonDocsProp as Ca, OutputTargetDocsVscode as Ci, TransformCssToEsmInput as Cn, isOutputTargetDocs as Co, CompilerSystemRenameResults as Cr, COLLECTION_MANIFEST_FILE_NAME as Cs, ExternalStyleCompiler as Ct, CompilerJsDoc as D, JsonDocsTypeLibrary as Da, PageReloadStrategy as Di, TypesImportData as Dn, isOutputTargetDocsReadme as Do, Config as Dr, DIST as Ds, HydrateComponent as Dt, CompilerCtx as E, JsonDocsTag as Ea, OutputTargetWww as Ei, TypeInfo as En, isOutputTargetDocsJson as Eo, CompilerWatcher as Er, DEFAULT_STYLE_MODE as Es, HydrateAnchorElement as Et, ComponentCompilerData as F, createJsVarName as Fa, ResolveModuleIdResults as Fi, WorkerMsgHandler as Fn, TASK_CANCELED_MSG as Fo, DevServer as Fr, DOCS_CUSTOM as Fs, JSDocTagInfo as Ft, ComponentCompilerPropertyType as G, readOnlyArrayHasStringMember as Ga, SitemapXmpOpts as Gi, CacheStorage as Gn, splitLineBreaks as Go, HydrateFactoryOptions as Gr, MEMBER_FLAGS as Gs, NodeMap as Gt, ComponentCompilerMethodComplexType as H, isTsFile as Ha, RolldownOutputOptions as Hi, BuildOnEvents as Hn, shouldIgnoreError as Ho, HmrStyleUpdate as Hr, HOST_FLAGS as Hs, MsgFromWorker as Ht, ComponentCompilerEvent as I, generatePreamble as Ia, ResolveModuleOptions as Ii, AutoprefixerOptions as In, buildError as Io, DevServerConfig as Ir, DOCS_CUSTOM_ELEMENTS_MANIFEST as Is, JsDoc as It, ComponentCompilerStaticEvent as J, getInlineSourceMappingUrlLinker as Ja, StencilDevServerConfig as Ji, CompileTarget as Jn, loadTypeScriptDiagnostics as Jo, LazyRequire as Jr, SVG_NS as Js, ParsedImport as Jt, ComponentCompilerReferencedType as K, readPackageJson as Ka, SitemapXmpResults as Ki, CliInitOptions as Kn, augmentDiagnosticWithNode as Ko, HydratedFlag as Kr, NODE_TYPES as Ks, OptimizeJsResult as Kt, ComponentCompilerEventComplexType as L, getTextDocs as La, RobotsTxtOpts as Li, BuildEmitEvents as Ln, buildJsonFileError as Lo, DevServerEditor as Lr, DOCS_JSON as Ls, LazyBundleRuntimeData as Lt, CompilerWorkerTask as M, validateComponentTag as Ma, PrerenderResults as Mi, ValidateTypesResults as Mn, isValidConfigOutputTarget as Mo, Credentials as Mr, DIST_LAZY as Ms, HydrateStaticData as Mt, ComponentCompilerChangeHandler as N, ParsePackageJsonResult as Na, PrerenderStartOptions as Ni, Workbox as Nn, relativeImport as No, CustomElementsExportBehavior as Nr, DIST_LAZY_LOADER as Ns, HydrateStyleElement as Nt, CompilerJsDocTagInfo as O, JsonDocsUsage as Oa, ParsedPath as Oi, TypesMemberNameData as On, isOutputTargetDocsVscode as Oo, ConfigBundle as Or, DIST_COLLECTION as Os, HydrateElement as Ot, ComponentCompilerCustomState as P, addDocBlock as Pa, ResolveModuleIdOptions as Pi, WorkerContextMethod as Pn, shouldExcludeComponent as Po, CustomElementsExportBehaviorOptions as Pr, DIST_TYPES as Ps, ImportData as Pt, ComponentCompilerTypeReferences as Q, result_d_exports as Qa, TranspileOnlyResults as Qi, CompilerDependency as Qn, isGlob as Qo, Logger as Qr, XLINK_NS as Qs, PluginCtx as Qt, ComponentCompilerFeatures as R, hasDependency as Ra, RobotsTxtResults as Ri, BuildEvents as Rn, buildWarn as Ro, Diagnostic$1 as Rr, DOCS_README as Rs, LazyBundlesRuntimeData as Rt, CompilerAssetDir as S, JsonDocsPart as Sa, OutputTargetDocsReadme as Si, StyleMap as Sn, isOutputTargetDistTypes as So, CompilerSystemRemoveFileResults as Sr, CMP_FLAGS as Ss, EventInitDict as St, CompilerBuildStats as T, JsonDocsStyle as Ta, OutputTargetStats as Ti, TranspileModuleResults as Tn, isOutputTargetDocsCustomElementsManifest as To, CompilerSystemWriteFileResults as Tr, CUSTOM as Ts, HostRef as Tt, ComponentCompilerProperty as U, isTsxFile as Ua, SerializeDocumentOptions as Ui, BuildOutput as Un, escapeHtml as Uo, HotModuleReplacement as Ur, HTML_NS as Us, MsgToWorker as Ut, ComponentCompilerMethod as V, isJsxFile as Va, RolldownInterface as Vi, BuildOnEventRemove as Vn, hasWarning as Vo, HistoryApiFallback as Vr, GENERATED_DTS as Vs, ModuleMap as Vt, ComponentCompilerPropertyComplexType as W, parsePackageJson as Wa, ServiceWorkerConfig as Wi, BuildResultsComponentGraph as Wn, normalizeDiagnostics as Wo, HydrateDocumentOptions as Wr, LISTENER_FLAGS as Ws, NewSpecPageOptions as Wt, ComponentCompilerStaticProperty as X, getSourceMappingUrlLinker as Xa, SystemDetails as Xi, CompilerBuildResults as Xn, loadRolldownDiagnostics as Xo, LoadConfigResults as Xr, WATCH_FLAGS as Xs, PlatformRuntime as Xt, ComponentCompilerStaticMethod as Y, getSourceMappingUrlForEndOfFile as Ya, StencilDocsConfig as Yi, Compiler as Yn, createOnWarnFn as Yo, LoadConfigInit as Yr, VALID_CONFIG_OUTPUT_TARGETS as Ys, PatchedSlotNode as Yt, ComponentCompilerTypeReference as Z, rolldownToStencilSourceMap as Za, TransformOptions as Zi, CompilerBuildStart as Zn, isRootPath as Zo, LogLevel as Zr, WWW as Zs, Plugin as Zt, CollectionCompilerVersion as _, JsonDocsDependencyGraph as _a, OutputTargetDistLazyLoader as _i, SourceMap$1 as _n, isOutputTargetDistCollection as _o, CompilerSystemCreateDirectoryOptions as _r, toTitleCase as _s, CssImportData as _t, BuildCtx as a, WorkerOptions as aa, OptimizeJsOutput as ai, PropsType as an, normalizePath as ao, CompilerEventFileAdd as ar, isDef as as, ComponentConstructorProperties as at, CollectionDependencyManifest as b, JsonDocsMethod as ba, OutputTargetDocsCustomElementsManifest as bi, StencilDocument as bn, isOutputTargetDistLazy as bo, CompilerSystemRemoveDirectoryOptions as br, formatLazyBundleRuntimeMeta as bs, Encapsulation as bt, BuildStyleUpdate as c, RafCallback as ca, OutputTargetBaseNext as ci, RolldownChunkResult as cn, FilterComponentsResult as co, CompilerEventFsChange as cr, isNumber as cs, ComponentNativeConstructor as ct, BundleModuleOutput as d, UserBuildConditionals as da, OutputTargetCustom as di, RolldownResults as dn, getComponentsDtsTypesFilePath as do, CompilerFileWatcherCallback as dr, mergeIntoWith as ds, ComponentRuntimeMember as dt, TranspileResults as ea, LoggerTimeSpan as ei, PluginTransformationDescriptor as en, queryNonceMetaTagContent as eo, CompilerEventBuildLog as er, escapeWithPattern as es, ComponentConstructor as et, Cache as f, VNode as fa, OutputTargetDist as fi, RolldownSourceMap as fn, getComponentsFromModules as fo, CompilerFileWatcherEvent as fr, noop as fs, ComponentRuntimeMembers as ft, CollectionCompilerMeta as g, JsonDocsCustomState as ga, OutputTargetDistLazy as gi, SerializedEvent as gn, isOutputTargetDist as go, CompilerSystem as gr, toDashCase as gs, ComponentTestingConstructor as gt, CollectionCompiler as h, JsonDocsComponent as ha, OutputTargetDistGlobalStyles as hi, SerializeImportData as hn, isOutputTargetCustom as ho, CompilerRequestResponse as hr, toCamelCase as hs, ComponentRuntimeReflectingAttr as ht, BuildConditionals as i, WorkerMainController as ia, OptimizeJsInput as ii, PrintLine as in, normalizeFsPathQuery as io, CompilerEventDirDelete as ir, isComplexType as is, ComponentConstructorListener as it, CompilerWorkerContext as j, FsWriteResults as ja, PrerenderHydrateOptions as ji, VNodeProdData as jn, isOutputTargetWww as jo, CopyTask as jr, DIST_HYDRATE_SCRIPT as js, HydrateScriptElement as jt, CompilerModeStyles as k, JsonDocsValue as ka, PlatformPath as ki, TypesModule as kn, isOutputTargetHydrate as ko, ConfigExtras as kr, DIST_CUSTOM_ELEMENTS as ks, HydrateImgElement as kt, BuildTask as l, ResolutionHandler as la, OutputTargetBuild as li, RolldownResult as ln, filterExcludedComponents as lo, CompilerEventName as lr, isObject as ls, ComponentPatches as lt, CollectionBundleManifest as m, JsonDocs as ma, OutputTargetDistCustomElements as mi, RuntimeRef as mn, isOutputTargetCopy as mo, CompilerRequest as mr, sortBy as ms, ComponentRuntimeMetaCompact as mt, AssetsMeta as n, ValidatedConfig as na, OptimizeCssInput as ni, PrerenderUrlRequest as nn, normalize as no, CompilerEventBuildStart as nr, fromEntries as ns, ComponentConstructorEncapsulation as nt, BuildFeatures as o, ErrorHandler as oa, OutputTarget as oi, RenderNode as on, relative as oo, CompilerEventFileDelete as or, isFunction as os, ComponentConstructorProperty as ot, ChildType as p, JsonDocMethodParameter as pa, OutputTargetDistCollection as pi, RootAppliedStyleMap as pn, isEligiblePrimaryPackageOutputTarget as po, CompilerFsStats as pr, pluck as ps, ComponentRuntimeMeta as pt, ComponentCompilerState as q, isRemoteUrl as qa, StencilConfig as qi, CompileScriptMinifyOptions as qn, loadTypeScriptDiagnostic as qo, LOG_LEVELS as qr, STATS as qs, PackageJsonData as qt, BuildComponent as r, WatcherCloseResults as ra, OptimizeCssOutput as ri, PrerenderUrlResults as rn, normalizeFsPath as ro, CompilerEventDirAdd as rr, isBoolean as rs, ComponentConstructorEvent as rt, BuildSourceGraph as s, FunctionalComponent as sa, OutputTargetBase as si, RolldownAssetResult as sn, resolve as so, CompilerEventFileUpdate as sr, isIterable as ss, ComponentConstructorPropertyType as st, AnyHTMLElement as t, UnvalidatedConfig as ta, NodeResolveConfig as ti, PrerenderManager as tn, join as to, CompilerEventBuildNoChange as tr, flatOne as ts, ComponentConstructorChangeHandlers as tt, BundleModule as u, TagTransformer as ua, OutputTargetCopy as ui, RolldownResultModule as un, getComponentsDtsSrcFilePath as uo, CompilerFileWatcher as ur, isString as us, ComponentRuntimeHostListener as ut, CollectionComponentEntryPath as v, JsonDocsEvent as va, OutputTargetDistTypes as vi, SourceTarget as vn, isOutputTargetDistCustomElements as vo, CompilerSystemCreateDirectoryResults as vr, unique as vs, CssToEsmImportData as vt, CompilerBuildStatCollection as w, JsonDocsSlot as wa, OutputTargetHydrate as wi, TransformCssToEsmOutput as wn, isOutputTargetDocsCustom as wo, CompilerSystemRenamedPath as wr, COPY as ws, HostElement as wt, CollectionManifest as x, JsonDocsMethodReturn as xa, OutputTargetDocsJson as xi, StyleCompiler as xn, isOutputTargetDistLazyLoader as xo, CompilerSystemRemoveDirectoryResults as xr, stringifyRuntimeData as xs, EntryModule as xt, CollectionDependencyData as y, JsonDocsListener as ya, OutputTargetDocsCustom as yi, SpecPage as yn, isOutputTargetDistGlobalStyles as yo, CompilerSystemRealpathResults as yr, formatComponentRuntimeMeta as ys, DocData as yt, ComponentCompilerListener as z, isDtsFile as za, RolldownConfig as zi, BuildLog as zn, catchError as zo, EligiblePrimaryPackageOutputTarget as zr, DOCS_VSCODE as zs, Module as zt };
6638
+ export { ComponentCompilerVirtualProperty as $, isDtsFile as $a, SsrFactoryOptions as $i, CompilerBuildResults as $n, loadTypeScriptDiagnostic as $o, LoadConfigInit as $r, PropsType as $t, CompilerStyleDoc as A, JsonDocsListener as Aa, OutputTargetStandalone as Ai, TypesMemberNameData as An, isOutputTargetGlobalStyle as Ao, Config as Ar, NODE_TYPES as As, JsDoc as At, ComponentCompilerMeta as B, JsonDocsValue as Ba, PrerenderResults as Bi, BuildEvents as Bn, shouldExcludeComponent as Bo, DevServerEditor as Br, WWW as Bs, OptimizeJsResult as Bt, CompilerBuildStatBundle as C, VNode as Ca, OutputTargetDocsJson as Ci, StyleCompiler as Cn, isOutputTargetDocs as Co, CompilerSystemRemoveDirectoryOptions as Cr, GENERATED_DTS as Cs, EntryModule as Ct, CompilerJsDoc as D, JsonDocsCustomState as Da, OutputTargetLoaderBundle as Di, TranspileModuleResults as Dn, isOutputTargetDocsJson as Do, CompilerSystemRenamedPath as Dr, LISTENER_FLAGS as Ds, HostRef as Dt, CompilerCtx as E, JsonDocsComponent as Ea, OutputTargetGlobalStyle as Ei, TransformCssToEsmOutput as En, isOutputTargetDocsCustomElementsManifest as Eo, CompilerSystemRenameResults as Er, HTML_NS as Es, HostElement as Et, ComponentCompilerData as F, JsonDocsSlot as Fa, ParsedPath as Fi, Workbox as Fn, isOutputTargetStats as Fo, Credentials as Fr, STYLE_EXT as Fs, ModuleMap as Ft, ComponentCompilerPropertyType as G, validateComponentModes as Ga, RobotsTxtOpts as Gi, BuildOutput as Gn, catchError as Go, HmrStyleUpdate as Gr, Plugin as Gt, ComponentCompilerMethodComplexType as H, FsWriteResults as Ha, ResolveModuleIdOptions as Hi, BuildNoChangeResults as Hn, buildError as Ho, DocsReadmeCustomColumn as Hr, ParsedImport as Ht, ComponentCompilerEvent as I, JsonDocsStyle as Ia, PlatformPath as Ii, WorkerContextMethod as In, isOutputTargetTypes as Io, CustomElementsExportBehavior as Ir, SVG_NS as Is, MsgFromWorker as It, ComponentCompilerStaticEvent as J, addDocBlock as Ja, SerializeDocumentOptions as Ji, CacheStorage as Jn, shouldIgnoreError as Jo, HydrateFactoryOptions as Jr, PluginTransformationDescriptor as Jt, ComponentCompilerReferencedType as K, validateComponentTag as Ka, RobotsTxtResults as Ki, BuildOverrides as Kn, hasError as Ko, HotModuleReplacement as Kr, PluginCtx as Kt, ComponentCompilerEventComplexType as L, JsonDocsTag as La, PrerenderConfig as Li, WorkerMsgHandler as Ln, isOutputTargetWww as Lo, CustomElementsExportBehaviorOptions as Lr, TYPES as Ls, MsgToWorker as Lt, CompilerWorkerTask as M, JsonDocsMethodReturn as Ma, OutputTargetTypes as Mi, UpdatedLazyBuildCtx as Mn, isOutputTargetSsr as Mo, ConfigCompat as Mr, SSR_WASM as Ms, LazyBundlesRuntimeData as Mt, ComponentCompilerChangeHandler as N, JsonDocsPart as Na, OutputTargetWww as Ni, VNodeProdData as Nn, isOutputTargetSsrWasm as No, CopyResults as Nr, STANDALONE as Ns, Module as Nt, CompilerJsDocTagInfo as O, JsonDocsDependencyGraph as Oa, OutputTargetSsr as Oi, TypeInfo as On, isOutputTargetDocsReadme as Oo, CompilerSystemWriteFileResults as Or, LOADER_BUNDLE as Os, ImportData as Ot, ComponentCompilerCustomState as P, JsonDocsProp as Pa, PageReloadStrategy as Pi, ValidateTypesResults as Pn, isOutputTargetStandalone as Po, CopyTask as Pr, STATS as Ps, ModuleFormat as Pt, ComponentCompilerTypeReferences as Q, hasDependency as Qa, SsrDocumentOptions as Qi, Compiler as Qn, augmentDiagnosticWithNode as Qo, LightDomPatches as Qr, PrintLine as Qt, ComponentCompilerFeatures as R, JsonDocsTypeLibrary as Ra, PrerenderHydrateOptions as Ri, AutoprefixerOptions as Rn, isValidConfigOutputTarget as Ro, DevServer as Rr, VALID_CONFIG_OUTPUT_TARGETS as Rs, NewSpecPageOptions as Rt, CompilerAssetDir as S, UserBuildConditionals as Sa, OutputTargetDocsCustomElementsManifest as Si, StencilDocument as Sn, isOutputTargetDistLazy as So, CompilerSystemRealpathResults as Sr, EVENT_FLAGS as Ss, Encapsulation as St, CompilerBuildStats as T, JsonDocs as Ta, OutputTargetDocsVscode as Ti, TransformCssToEsmInput as Tn, isOutputTargetDocsCustom as To, CompilerSystemRemoveFileResults as Tr, HOST_FLAGS as Ts, ExternalStyleCompiler as Tt, ComponentCompilerProperty as U, InMemoryFileSystem as Ua, ResolveModuleIdResults as Ui, BuildOnEventRemove as Un, buildJsonFileError as Uo, FsWatchResults as Ur, PatchedSlotNode as Ut, ComponentCompilerMethod as V, StyleDoc as Va, PrerenderStartOptions as Vi, BuildLog as Vn, TASK_CANCELED_MSG as Vo, Diagnostic$1 as Vr, XLINK_NS as Vs, PackageJsonData as Vt, ComponentCompilerPropertyComplexType as W, ModeValidationError as Wa, ResolveModuleOptions as Wi, BuildOnEvents as Wn, buildWarn as Wo, HistoryApiFallback as Wr, PlatformRuntime as Wt, ComponentCompilerStaticProperty as X, generatePreamble as Xa, SitemapXmpOpts as Xi, CompileScriptMinifyOptions as Xn, normalizeDiagnostics as Xo, LOG_LEVELS as Xr, PrerenderUrlRequest as Xt, ComponentCompilerStaticMethod as Y, createJsVarName as Ya, ServiceWorkerConfig as Yi, CliInitOptions as Yn, escapeHtml as Yo, HydratedFlag as Yr, PrerenderManager as Yt, ComponentCompilerTypeReference as Z, getTextDocs as Za, SitemapXmpResults as Zi, CompileTarget as Zn, splitLineBreaks as Zo, LazyRequire as Zr, PrerenderUrlResults as Zt, CollectionCompilerVersion as _, MixedInCtor as _a, OutputTargetCopy as _i, SsrImgElement as _n, getComponentsFromModules as _o, CompilerRequest as _r, DOCS_CUSTOM as _s, ComponentTestingConstructor as _t, BuildCtx as a, TranspileOnlyResults as aa, ModeConfig as ai, RolldownResults as an, readOnlyArrayHasStringMember as ao, CompilerEventBuildStart as ar, formatLazyBundleRuntimeMeta as as, ComponentConstructorProperties as at, CollectionDependencyManifest as b, ResolutionHandler as ba, OutputTargetDocsAgentSkill as bi, SsrStaticData as bn, isOutputTargetCopy as bo, CompilerSystemCreateDirectoryOptions as br, DOCS_README as bs, CssTransformCacheEntry as bt, BuildStyleUpdate as c, UnvalidatedConfig as ca, OptimizeCssOutput as ci, RuntimeRef as cn, getSourceMappingUrlForEndOfFile as co, CompilerEventFileAdd as cr, CMP_FLAGS as cs, ComponentGlobalStyle as ct, BundleModuleOutput as d, WatcherCloseResults as da, OutputTarget as di, SourceMap$1 as dn, result_d_exports as do, CompilerEventFsChange as dr, COLLECTION_MANIFEST_FILE_NAME as ds, ComponentRuntimeHostListener as dt, StencilConfig as ea, LoadConfigResults as ei, RenderNode as en, isJsFile as eo, CompilerBuildStart as er, loadTypeScriptDiagnostics as es, ComponentConstructor as et, Cache as f, WorkerMainController as fa, OutputTargetAssets as fi, SourceTarget as fn, FilterComponentsResult as fo, CompilerEventName as fr, COPY as fs, ComponentRuntimeMember as ft, CollectionCompilerMeta as g, FunctionalComponent as ga, OutputTargetCollection as gi, SsrElement as gn, getComponentsDtsTypesFilePath as go, CompilerFsStats as gr, DOCS_AGENT_SKILL as gs, ComponentRuntimeReflectingAttr as gt, CollectionCompiler as h, ErrorHandler as ha, OutputTargetBuild as hi, SsrComponent as hn, getComponentsDtsSrcFilePath as ho, CompilerFileWatcherEvent as hr, DIST_LAZY as hs, ComponentRuntimeMetaCompact as ht, BuildConditionals as i, TransformOptions as ia, LoggerTimeSpan as ii, RolldownResultModule as in, parsePackageJson as io, CompilerEventBuildNoChange as ir, formatComponentRuntimeMeta as is, ComponentConstructorListener as it, CompilerWorkerContext as j, JsonDocsMethod as ja, OutputTargetStats as ji, TypesModule as jn, isOutputTargetLoaderBundle as jo, ConfigBundle as jr, SSR as js, LazyBundleRuntimeData as jt, CompilerModeStyles as k, JsonDocsEvent as ka, OutputTargetSsrWasm as ki, TypesImportData as kn, isOutputTargetDocsVscode as ko, CompilerWatcher as kr, MEMBER_FLAGS as ks, JSDocTagInfo as kt, BuildTask as l, ValidatedConfig as la, OptimizeJsInput as li, SerializeImportData as ln, getSourceMappingUrlLinker as lo, CompilerEventFileDelete as lr, COLLECTION as ls, ComponentNativeConstructor as lt, CollectionBundleManifest as m, ComponentInterface as ma, OutputTargetBaseNext as mi, SsrAnchorElement as mn, filterExcludedComponents as mo, CompilerFileWatcherCallback as mr, DEFAULT_STYLE_MODE as ms, ComponentRuntimeMeta as mt, AssetsMeta as n, StencilDocsConfig as na, Logger as ni, RolldownChunkResult as nn, isTsFile as no, CompilerEventBuildFinish as nr, isRolldownError as ns, ComponentConstructorEncapsulation as nt, BuildFeatures as o, TranspileOptions as oa, NodeResolveConfig as oi, RolldownSourceMap as on, readPackageJson as oo, CompilerEventDirAdd as or, stringifyRuntimeData as os, ComponentConstructorProperty as ot, ChildType as p, WorkerOptions as pa, OutputTargetBase as pi, SpecPage as pn, filterActiveTargets as po, CompilerFileWatcher as pr, CUSTOM as ps, ComponentRuntimeMembers as pt, ComponentCompilerState as q, ParsePackageJsonResult as qa, RolldownConfig as qi, BuildResultsComponentGraph as qn, hasWarning as qo, HydrateDocumentOptions as qr, PluginTransformResults as qt, BuildComponent as r, SystemDetails as ra, LoggerLineUpdater as ri, RolldownResult as rn, isTsxFile as ro, CompilerEventBuildLog as rr, loadRolldownDiagnostics as rs, ComponentConstructorEvent as rt, BuildSourceGraph as s, TranspileResults as sa, OptimizeCssInput as si, RootAppliedStyleMap as sn, getInlineSourceMappingUrlLinker as so, CompilerEventDirDelete as sr, ASSETS as ss, ComponentConstructorPropertyType as st, AnyHTMLElement as t, StencilDevServerConfig as ta, LogLevel as ti, RolldownAssetResult as tn, isJsxFile as to, CompilerDependency as tr, createOnWarnFn as ts, ComponentConstructorChangeHandlers as tt, BundleModule as u, ValidatedOutputTargetWww as ua, OptimizeJsOutput as ui, SerializedEvent as un, rolldownToStencilSourceMap as uo, CompilerEventFileUpdate as ur, COLLECTION_APP_DATA_FILE_NAME as us, ComponentPatches as ut, CollectionComponentEntryPath as v, RafCallback as va, OutputTargetCustom as vi, SsrResults as vn, isOutputTargetAssets as vo, CompilerRequestResponse as vr, DOCS_CUSTOM_ELEMENTS_MANIFEST as vs, CssImportData as vt, CompilerBuildStatCollection as w, JsonDocMethodParameter as wa, OutputTargetDocsReadme as wi, StyleMap as wn, isOutputTargetDocsAgentSkill as wo, CompilerSystemRemoveDirectoryResults as wr, GLOBAL_STYLE as ws, EventInitDict as wt, CollectionManifest as x, TagTransformer as xa, OutputTargetDocsCustom as xi, SsrStyleElement as xn, isOutputTargetCustom as xo, CompilerSystemCreateDirectoryResults as xr, DOCS_VSCODE as xs, DocData as xt, CollectionDependencyData as y, ReactiveControllerHostInterface as ya, OutputTargetDistLazy as yi, SsrScriptElement as yn, isOutputTargetCollection as yo, CompilerSystem as yr, DOCS_JSON as ys, CssToEsmImportData as yt, ComponentCompilerListener as z, JsonDocsUsage as za, PrerenderOptions as zi, BuildEmitEvents as zn, relativeImport as zo, DevServerConfig as zr, WATCH_FLAGS as zs, NodeMap as zt };