@stencil/core 5.0.0-alpha.5 → 5.0.0-alpha.6

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 (43) hide show
  1. package/dist/{client-Dnio47yQ.mjs → client-fWOou5EW.mjs} +2324 -2125
  2. package/dist/compiler/index.d.mts +5 -5
  3. package/dist/compiler/index.mjs +2 -2
  4. package/dist/compiler/utils/index.d.mts +2 -2
  5. package/dist/compiler/utils/index.mjs +3 -3
  6. package/dist/{compiler-Dxri2g8Z.mjs → compiler-CdUbDTbV.mjs} +13329 -12670
  7. package/dist/declarations/stencil-public-compiler.d.ts +254 -121
  8. package/dist/declarations/stencil-public-docs.d.ts +10 -0
  9. package/dist/declarations/stencil-public-runtime.d.ts +49 -12
  10. package/dist/{index-D5zaocDq.d.mts → index-D8vvsppY.d.mts} +228 -180
  11. package/dist/{index-D61XZw0f.d.ts → index-Dap2E02-.d.ts} +82 -31
  12. package/dist/{index-Dat4djoo.d.mts → index-UUlemGuu.d.mts} +13 -2
  13. package/dist/index.d.mts +0 -1
  14. package/dist/index.mjs +1 -1
  15. package/dist/jsx-runtime.d.mts +18 -0
  16. package/dist/jsx-runtime.mjs +2 -0
  17. package/dist/{node-pj6rF4Wt.mjs → node-klLZLdDe.mjs} +59 -55
  18. package/dist/{regular-expression-D0_N0PGa.mjs → regular-expression-DUdhF3Ei.mjs} +72 -6
  19. package/dist/runtime/app-data/index.d.ts +1 -1
  20. package/dist/runtime/app-data/index.js +15 -9
  21. package/dist/{runtime-CKyUrF4i.js → runtime/client/lazy.js} +2539 -2199
  22. package/dist/runtime/client/{index.d.ts → runtime.d.ts} +49 -40
  23. package/dist/runtime/client/{index.js → runtime.js} +2401 -2185
  24. package/dist/runtime/index.d.ts +20 -3
  25. package/dist/runtime/index.js +4956 -2
  26. package/dist/runtime/server/index.d.mts +30 -39
  27. package/dist/runtime/server/index.mjs +2369 -2185
  28. package/dist/runtime/server/runner.d.mts +4 -6
  29. package/dist/runtime/server/runner.mjs +307 -361
  30. package/dist/signals/index.d.ts +47 -0
  31. package/dist/signals/index.js +199 -0
  32. package/dist/sys/node/index.d.mts +1 -1
  33. package/dist/sys/node/index.mjs +1 -1
  34. package/dist/sys/node/worker.mjs +2 -2
  35. package/dist/testing/index.d.mts +97 -3
  36. package/dist/testing/index.mjs +199 -47
  37. package/dist/{validation-BA8nzXu_.mjs → validation-2QipI30K.mjs} +21 -32
  38. package/package.json +41 -27
  39. package/dist/index-D-XN9HW_.d.ts +0 -30
  40. package/dist/jsx-runtime-B3vQbWIW.d.ts +0 -28
  41. package/dist/jsx-runtime.d.ts +0 -2
  42. package/dist/jsx-runtime.js +0 -2
  43. /package/dist/{chunk-CjcI7cDX.mjs → chunk-z9aeyW2b.mjs} +0 -0
@@ -1,4 +1,5 @@
1
1
  import { ListenTargetOptions, ResolutionHandler } from "./stencil-public-runtime.js";
2
+ import { InputOptions, SourceMap as RolldownSourceMap } from "rolldown";
2
3
  //#region src/utils/result.d.ts
3
4
  /**
4
5
  * A Result wraps up a success state and a failure state, allowing you to
@@ -670,6 +671,103 @@ interface PrintLine {
670
671
  errorCharStart: number;
671
672
  errorLength?: number;
672
673
  }
674
+ interface BuildFeatures {
675
+ style: boolean;
676
+ mode: boolean;
677
+ formAssociated: boolean;
678
+ shadowDom: boolean;
679
+ shadowDelegatesFocus: boolean;
680
+ shadowModeClosed: boolean;
681
+ shadowSlotAssignmentManual: boolean;
682
+ scoped: boolean;
683
+ /**
684
+ * Every component has a render function
685
+ */
686
+ allRenderFn: boolean;
687
+ /**
688
+ * At least one component has a render function
689
+ */
690
+ hasRenderFn: boolean;
691
+ vdomRender: boolean;
692
+ vdomAttribute: boolean;
693
+ vdomClass: boolean;
694
+ vdomFunctional: boolean;
695
+ vdomKey: boolean;
696
+ vdomListener: boolean;
697
+ vdomPropOrAttr: boolean;
698
+ vdomRef: boolean;
699
+ vdomStyle: boolean;
700
+ vdomText: boolean;
701
+ vdomXlink: boolean;
702
+ vdomSignals: boolean;
703
+ slotRelocation: boolean;
704
+ patchAll: boolean;
705
+ patchChildren: boolean;
706
+ patchClone: boolean;
707
+ patchInsert: boolean;
708
+ slot: boolean;
709
+ svg: boolean;
710
+ element: boolean;
711
+ event: boolean;
712
+ hostListener: boolean;
713
+ hostListenerTargetWindow: boolean;
714
+ hostListenerTargetDocument: boolean;
715
+ hostListenerTargetBody: boolean;
716
+ hostListenerTarget: boolean;
717
+ method: boolean;
718
+ prop: boolean;
719
+ propChangeCallback: boolean;
720
+ propMutable: boolean;
721
+ state: boolean;
722
+ member: boolean;
723
+ updatable: boolean;
724
+ propBoolean: boolean;
725
+ propNumber: boolean;
726
+ propString: boolean;
727
+ serializer: boolean;
728
+ deserializer: boolean;
729
+ lifecycle: boolean;
730
+ asyncLoading: boolean;
731
+ observeAttribute: boolean;
732
+ reflect: boolean;
733
+ taskQueue: boolean;
734
+ }
735
+ interface BuildConditionals extends Partial<BuildFeatures> {
736
+ hotModuleReplacement?: boolean;
737
+ isDebug?: boolean;
738
+ isTesting?: boolean;
739
+ isDev?: boolean;
740
+ devTools?: boolean;
741
+ invisiblePrehydration?: boolean;
742
+ hydrateServerSide?: boolean;
743
+ hydrateClientSide?: boolean;
744
+ lifecycleDOMEvents?: boolean;
745
+ cssAnnotations?: boolean;
746
+ lazyLoad?: boolean;
747
+ profile?: boolean;
748
+ constructableCSS?: boolean;
749
+ /** True when `extras.lightDomPatches === true` - enables `applyLightDomPatches` shortcut. */
750
+ lightDomPatches?: boolean;
751
+ /** Patch `childNodes`/`children` getters on light-dom slotted components. */
752
+ slotChildNodes?: boolean;
753
+ /** Patch `cloneNode()` on light-dom slotted components. */
754
+ slotCloneNode?: boolean;
755
+ /** Patch `appendChild`/`insertBefore`/`removeChild` on light-dom slotted components. */
756
+ slotDomMutations?: boolean;
757
+ /** Patch `textContent` on light-dom slotted components. */
758
+ slotTextContent?: boolean;
759
+ hydratedAttribute?: boolean;
760
+ hydratedClass?: boolean;
761
+ hydratedSelectorName?: string;
762
+ /** True when a global-style input contains `@import "stencil-hydrate"` - suppresses dynamic style injection in the loader. */
763
+ staticHydrationStyles?: boolean;
764
+ initializeNextTick?: boolean;
765
+ asyncQueue?: boolean;
766
+ additionalTagTransformers?: boolean | 'prod';
767
+ signalBacking?: boolean;
768
+ /** True when JSX signal bypass is active - text nodes and attributes backed by Signal objects update the DOM directly. Auto-enabled when `signalBacking: true`. */
769
+ vdomSignals?: boolean;
770
+ }
673
771
  type ModuleFormat = 'amd' | 'cjs' | 'es' | 'iife' | 'system' | 'umd' | 'commonjs' | 'esm' | 'module' | 'systemjs';
674
772
  interface RolldownResultModule {
675
773
  id: string;
@@ -718,6 +816,8 @@ interface BuildCtx {
718
816
  ssrAppFilePath: string;
719
817
  indexBuildCount: number;
720
818
  indexDoc: Document;
819
+ /** All non-entry HTML files found in srcDir, keyed by path relative to srcDir */
820
+ htmlDocs: Map<string, Document>;
721
821
  isRebuild: boolean;
722
822
  /**
723
823
  * A collection of Stencil's intermediate representation of components, tied to the current build
@@ -767,8 +867,6 @@ interface CompilerBuildStats {
767
867
  options: {
768
868
  minifyJs: boolean;
769
869
  minifyCss: boolean;
770
- hashFileNames: boolean;
771
- hashedFileNameLength: number;
772
870
  };
773
871
  formats: {
774
872
  esmBrowser: ReadonlyArray<CompilerBuildStatBundle>;
@@ -817,16 +915,6 @@ interface RolldownChunkResult {
817
915
  moduleFormat: ModuleFormat;
818
916
  map?: RolldownSourceMap;
819
917
  }
820
- interface RolldownSourceMap {
821
- file: string;
822
- mappings: string;
823
- names: string[];
824
- sources: string[];
825
- sourcesContent: string[];
826
- version: number;
827
- toString(): string;
828
- toUrl(): string;
829
- }
830
918
  interface BundleModule {
831
919
  entryKey: string;
832
920
  rolldownResult: RolldownChunkResult;
@@ -862,6 +950,7 @@ interface CollectionCompilerMeta {
862
950
  bundles?: {
863
951
  components: string[];
864
952
  }[];
953
+ buildFlags?: Partial<BuildConditionals>;
865
954
  }
866
955
  interface CollectionCompilerVersion {
867
956
  name: string;
@@ -1008,6 +1097,7 @@ interface ComponentCompilerFeatures {
1008
1097
  hasVdomStyle: boolean;
1009
1098
  hasVdomText: boolean;
1010
1099
  hasVdomXlink: boolean;
1100
+ hasSignalsImport: boolean;
1011
1101
  hasWatchCallback: boolean;
1012
1102
  htmlAttrNames: string[];
1013
1103
  htmlTagNames: string[];
@@ -1105,6 +1195,7 @@ interface ComponentCompilerMeta extends ComponentCompilerFeatures {
1105
1195
  states: ComponentCompilerState[];
1106
1196
  styleDocs: CompilerStyleDoc[];
1107
1197
  styles: StyleCompiler[];
1198
+ globalStyles: ComponentGlobalStyle[];
1108
1199
  tagName: string;
1109
1200
  virtualProperties: ComponentCompilerVirtualProperty[];
1110
1201
  watchers: ComponentCompilerChangeHandler[];
@@ -1121,7 +1212,7 @@ type Encapsulation = 'shadow' | 'scoped' | 'none';
1121
1212
  * These enable proper slot behavior when not using native Shadow DOM.
1122
1213
  */
1123
1214
  interface ComponentPatches {
1124
- /** Apply all slot patches (equivalent to experimentalSlotFixes) */
1215
+ /** Apply all slot patches (equivalent to lightDomPatches) */
1125
1216
  all?: boolean;
1126
1217
  /** Patch child node accessors (children, firstChild, lastChild, etc.) */
1127
1218
  children?: boolean;
@@ -1181,6 +1272,11 @@ interface ComponentCompilerPropertyComplexType {
1181
1272
  * annotation in the original source file.
1182
1273
  */
1183
1274
  references: ComponentCompilerTypeReferences;
1275
+ /**
1276
+ * @internal TypeScript AST node used for semantic type analysis during compilation.
1277
+ * Not serialized, only used internally for improved type renaming logic.
1278
+ */
1279
+ _astNode?: any;
1184
1280
  }
1185
1281
  /**
1186
1282
  * A record of `ComponentCompilerTypeReference` entities.
@@ -1274,6 +1370,11 @@ interface ComponentCompilerMethodComplexType {
1274
1370
  parameters: JsonDocMethodParameter[];
1275
1371
  references: ComponentCompilerTypeReferences;
1276
1372
  return: string;
1373
+ /**
1374
+ * @internal TypeScript AST method node used for semantic type analysis during compilation.
1375
+ * Not serialized, only used internally for improved type renaming logic.
1376
+ */
1377
+ _astNode?: any;
1277
1378
  }
1278
1379
  interface ComponentCompilerChangeHandler {
1279
1380
  propName: string;
@@ -1438,6 +1539,7 @@ interface Module {
1438
1539
  hasVdomStyle: boolean;
1439
1540
  hasVdomText: boolean;
1440
1541
  hasVdomXlink: boolean;
1542
+ hasSignalsImport: boolean;
1441
1543
  }
1442
1544
  interface PrerenderUrlResults {
1443
1545
  anchorUrls: string[];
@@ -1470,6 +1572,12 @@ interface ExternalStyleCompiler {
1470
1572
  relativePath: string;
1471
1573
  originalComponentPath: string;
1472
1574
  }
1575
+ interface ComponentGlobalStyle {
1576
+ /** Absolute path to the CSS file, or null for inline styles */
1577
+ absolutePath: string | null;
1578
+ /** Raw inline CSS string, or null for file-based styles */
1579
+ styleStr: string | null;
1580
+ }
1473
1581
  /**
1474
1582
  * Input CSS to be transformed into ESM
1475
1583
  */
@@ -1534,9 +1642,7 @@ interface PackageJsonData {
1534
1642
  module?: string;
1535
1643
  'jsnext:main'?: string;
1536
1644
  unpkg?: string;
1537
- /** @deprecated Use `stencilRebundle` instead. Kept for reading v4 dependencies. */
1538
1645
  collection?: string;
1539
- stencilRebundle?: string;
1540
1646
  types?: string;
1541
1647
  files?: string[];
1542
1648
  ['dist-tags']?: {
@@ -1661,20 +1767,6 @@ interface StencilConfig {
1661
1767
  * @default false
1662
1768
  */
1663
1769
  generateExportMaps?: boolean;
1664
- /**
1665
- * When the hashFileNames config is set to true, and it is a production build,
1666
- * the hashedFileNameLength config is used to determine how many characters the file name's hash should be.
1667
- */
1668
- hashedFileNameLength?: number;
1669
- /**
1670
- * During production builds, the content of each generated file is hashed to represent the content,
1671
- * and the hashed value is used as the filename. If the content isn't updated between builds,
1672
- * then it receives the same filename. When the content is updated, then the filename is different.
1673
- *
1674
- * By doing this, deployed apps can "forever-cache" the build directory and take full advantage of
1675
- * content delivery networks (CDNs) and heavily caching files for faster apps.
1676
- */
1677
- hashFileNames?: boolean;
1678
1770
  /**
1679
1771
  * The namespace config is a string representing a namespace for the app.
1680
1772
  * For apps that are not meant to be a library of reusable components,
@@ -1865,6 +1957,23 @@ interface StencilConfig {
1865
1957
  * Set whether unused dependencies should be excluded from the built output.
1866
1958
  */
1867
1959
  excludeUnusedDependencies?: boolean;
1960
+ /**
1961
+ * Explicitly declare which npm packages are Stencil collections to be re-bundled into this project.
1962
+ *
1963
+ * Without this option, collection ingestion is triggered only by a side-effect import:
1964
+ * ```ts
1965
+ * import '@ionic/core';
1966
+ * ```
1967
+ * @example
1968
+ * ```ts
1969
+ * export const config: Config = {
1970
+ * collections: ['@ionic/core', '@my-org/design-system'],
1971
+ * };
1972
+ * ```
1973
+ *
1974
+ * @default []
1975
+ */
1976
+ collections?: string[];
1868
1977
  stencilCoreResolvedId?: string;
1869
1978
  }
1870
1979
  interface ConfigExtrasBase {
@@ -1872,7 +1981,7 @@ interface ConfigExtrasBase {
1872
1981
  * Projects that use a Stencil library built using the `dist` output target may have trouble lazily
1873
1982
  * loading components when using a bundler such as Vite or Parcel. Setting this flag to `true` will change how Stencil
1874
1983
  * lazily loads components in a way that works with additional bundlers. Setting this flag to `true` will increase
1875
- * the size of the compiled output. Defaults to `false`.
1984
+ * the size of the compiled output. Defaults to `true`.
1876
1985
  */
1877
1986
  enableImportInjection?: boolean;
1878
1987
  /**
@@ -1891,49 +2000,49 @@ interface ConfigExtrasBase {
1891
2000
  */
1892
2001
  additionalTagTransformers?: boolean | 'prod';
1893
2002
  /**
1894
- * Experimental flag.
1895
- * Updates the behavior of scoped components to align more closely with the behavior of the native
1896
- * Shadow DOM when using `slot`s.
2003
+ * Replace `@State` and `@Prop` internals with `@preact/signals-core` signal primitives.
2004
+ * Enables cross-framework reactive interop - component state becomes subscribable by
2005
+ * Solid, Angular, Preact and any TC39-signal-compatible library without event/attribute
2006
+ * roundtrips. No API changes required in component code.
1897
2007
  * Defaults to `false`.
1898
2008
  */
1899
- experimentalScopedSlotChanges?: boolean;
1900
- }
1901
- type ConfigExtrasSlotFixes<ExperimentalFixesEnabled extends boolean, IndividualFlags extends boolean> = {
1902
- /**
1903
- * By default, the slot polyfill does not update `appendChild()` so that it appends
1904
- * new child nodes into the correct child slot like how shadow dom works. This is an opt-in
1905
- * polyfill for those who need it when using `element.appendChild(node)` and expecting the
1906
- * child to be appended in the same location shadow dom would. This is not required for
1907
- * IE11 or Edge 18, but can be enabled if the app is using `appendChild()`. Defaults to `false`.
1908
- */
1909
- appendChildSlotFix?: IndividualFlags;
2009
+ signalBacking?: boolean;
1910
2010
  /**
1911
- * By default, the runtime does not polyfill `cloneNode()` when cloning a component
1912
- * that uses the slot polyfill. This is an opt-in polyfill for those who need it.
1913
- * This is not required for IE11 or Edge 18, but can be enabled if the app is using
1914
- * `cloneNode()` and unexpected node are being cloned due to the slot polyfill
1915
- * simulating shadow dom. Defaults to `false`.
2011
+ * Enable JSX signal bypass: `Signal` objects passed as JSX text children or attribute values
2012
+ * subscribe directly to DOM nodes, bypassing the vdom diff on signal changes.
2013
+ * Also enables `<Show>` from `@stencil/core/signals`.
2014
+ * Auto-enabled when `signalBacking: true`. Defaults to `false`.
1916
2015
  */
1917
- cloneNodeFix?: IndividualFlags;
1918
- /**
1919
- * Experimental flag to align the behavior of invoking `textContent` on a scoped component to act more like a
1920
- * component that uses the shadow DOM. Defaults to `false`
1921
- */
1922
- scopedSlotTextContentFix?: IndividualFlags;
1923
- /**
1924
- * For browsers that do not support shadow dom (IE11 and Edge 18 and below), slot is polyfilled
1925
- * to simulate the same behavior. However, the host element's `childNodes` and `children`
1926
- * getters are not patched to only show the child nodes and elements of the default slot.
1927
- * Defaults to `false`.
1928
- */
1929
- slotChildNodesFix?: IndividualFlags;
2016
+ vdomSignals?: boolean;
2017
+ }
2018
+ /**
2019
+ * DOM patches for light-dom / scoped components that use `<slot>`.
2020
+ *
2021
+ * These patches shield the component's slot machinery from framework DOM mutations
2022
+ * (e.g. when Angular or React insert / remove nodes they route directly to the host
2023
+ * element, bypassing the slot polyfill) and prevent hydration errors when a framework
2024
+ * encounters Stencil's internal slot reference nodes during SSR reconciliation.
2025
+ *
2026
+ * Patches are only applied at runtime when a component is both non-shadow **and**
2027
+ * declares at least one `<slot>`, so enabling them has no effect on pure shadow-DOM
2028
+ * components.
2029
+ *
2030
+ * Set to `true` (default) to enable all patches, `false` to disable all, or an object
2031
+ * for granular control.
2032
+ */
2033
+ type LightDomPatches = {
2034
+ /** Patches `childNodes`/`children` getters to return only slotted content. */childNodes?: boolean; /** Patches `cloneNode()` to correctly deep-clone slotted content. */
2035
+ cloneNode?: boolean; /** Patches `appendChild()`, `insertBefore()`, and `removeChild()` to route to the correct slot. */
2036
+ domMutations?: boolean; /** Patches `textContent` to act like shadow DOM (reads/writes slotted text only). */
2037
+ textContent?: boolean;
2038
+ };
2039
+ type ConfigExtras = ConfigExtrasBase & {
1930
2040
  /**
1931
- * Enables all slot-related fixes such as {@link slotChildNodesFix}, and
1932
- * {@link scopedSlotTextContentFix}.
2041
+ * DOM patches for light-dom / scoped components that use `<slot>`.
2042
+ * See {@link LightDomPatches} for granular control. Defaults to `true`.
1933
2043
  */
1934
- experimentalSlotFixes?: ExperimentalFixesEnabled;
2044
+ lightDomPatches?: boolean | LightDomPatches;
1935
2045
  };
1936
- type ConfigExtras = ConfigExtrasBase & (ConfigExtrasSlotFixes<true, true> | ConfigExtrasSlotFixes<false, boolean>);
1937
2046
  interface Config extends StencilConfig {
1938
2047
  buildAppCore?: boolean;
1939
2048
  configPath?: string;
@@ -2036,7 +2145,7 @@ type RequireFields<T, K extends keyof T> = T & { [P in K]-?: T[P] };
2036
2145
  /**
2037
2146
  * Fields in {@link Config} to make required for {@link ValidatedConfig}
2038
2147
  */
2039
- type StrictConfigFields = keyof Pick<Config, 'cacheDir' | 'devServer' | 'extras' | 'fsNamespace' | 'hashFileNames' | 'hashedFileNameLength' | 'hydratedFlag' | 'logLevel' | 'logger' | 'minifyCss' | 'minifyJs' | 'namespace' | 'outputTargets' | 'packageJsonFilePath' | 'rolldownConfig' | 'rootDir' | 'srcDir' | 'srcIndexHtml' | 'sys' | 'transformAliasedImportPaths'>;
2148
+ type StrictConfigFields = keyof Pick<Config, 'cacheDir' | 'devServer' | 'extras' | 'fsNamespace' | 'hydratedFlag' | 'logLevel' | 'logger' | 'minifyCss' | 'minifyJs' | 'namespace' | 'outputTargets' | 'packageJsonFilePath' | 'rolldownConfig' | 'rootDir' | 'srcDir' | 'srcIndexHtml' | 'sys' | 'transformAliasedImportPaths'>;
2040
2149
  /**
2041
2150
  * A version of {@link Config} that makes certain fields required. This type represents a valid configuration entity.
2042
2151
  * When a configuration is received by the user, it is a bag of unverified data. In order to make stricter guarantees
@@ -2867,18 +2976,18 @@ interface ResolveModuleIdResults {
2867
2976
  * A controller which provides for communication and coordination between
2868
2977
  * threaded workers.
2869
2978
  */
2870
- interface WorkerMainController {
2979
+ interface WorkerMainController<T extends Record<string, (...args: any[]) => Promise<any>> = Record<string, (...args: any[]) => Promise<any>>> {
2871
2980
  /**
2872
2981
  * Send a given set of arguments to a worker
2873
2982
  */
2874
- send(...args: any[]): Promise<any>;
2983
+ send<K extends keyof T>(methodName: K, ...args: Parameters<T[K]>): ReturnType<T[K]>;
2875
2984
  /**
2876
2985
  * Handle a particular method
2877
2986
  *
2878
2987
  * @param name of the method to be passed to a worker
2879
2988
  * @returns a Promise wrapping the results
2880
2989
  */
2881
- handler(name: string): (...args: any[]) => Promise<any>;
2990
+ handler<K extends keyof T>(name: K): T[K];
2882
2991
  /**
2883
2992
  * Destroy the worker represented by this instance, rejecting all outstanding
2884
2993
  * tasks and killing the child process.
@@ -2945,6 +3054,7 @@ interface BuildNoChangeResults {
2945
3054
  interface CompilerBuildResults {
2946
3055
  buildId: number;
2947
3056
  componentGraph?: BuildResultsComponentGraph;
3057
+ components: ComponentCompilerMeta[];
2948
3058
  diagnostics: Diagnostic[];
2949
3059
  dirsAdded: string[];
2950
3060
  dirsDeleted: string[];
@@ -3141,8 +3251,9 @@ interface CopyTask {
3141
3251
  */
3142
3252
  dest?: string;
3143
3253
  /**
3144
- * An optional array of glob patterns to exclude from the copy operation.
3145
- * @default ['**\/__mocks__/**', '**\/__fixtures__/**', '**\/dist/**', '**\/.{idea,git,cache,output,temp}/**', '**\/.ds_store', '**\/.gitignore', '**\/desktop.ini', '**\/thumbs.db']
3254
+ * Additional glob patterns to exclude from the copy operation, merged with
3255
+ * the built-in defaults: `__mocks__`, `__fixtures__`, `dist`, hidden dirs,
3256
+ * `.ds_store`, `.gitignore`, `desktop.ini`, `thumbs.db`.
3146
3257
  */
3147
3258
  ignore?: string[];
3148
3259
  /**
@@ -3221,39 +3332,12 @@ interface StencilDocsConfig {
3221
3332
  };
3222
3333
  };
3223
3334
  }
3224
- interface NodeResolveConfig {
3225
- exportConditions?: string[];
3226
- browser?: boolean;
3227
- moduleDirectories?: string[];
3228
- modulePaths?: string[];
3229
- dedupe?: string[] | ((importee: string) => boolean);
3230
- extensions?: readonly string[];
3231
- jail?: string;
3232
- mainFields?: readonly string[];
3233
- modulesOnly?: boolean;
3234
- preferBuiltins?: boolean | ((module: string) => boolean);
3235
- resolveOnly?: ReadonlyArray<string | RegExp> | null | ((module: string) => boolean);
3236
- rootDir?: string;
3237
- allowExportsFolderMapping?: boolean;
3238
- }
3335
+ /** Options for rolldown's built-in module resolver, passed directly to rolldown's `resolve` input option. */
3336
+ type NodeResolveConfig = NonNullable<InputOptions['resolve']>;
3239
3337
  interface RolldownConfig {
3240
- inputOptions?: RolldownInputOptions;
3241
- outputOptions?: RolldownOutputOptions;
3242
- }
3243
- interface RolldownInputOptions {
3244
- context?: string;
3245
- moduleContext?: ((id: string) => string) | {
3246
- [id: string]: string;
3247
- };
3248
3338
  treeshake?: boolean;
3249
- maxParallelFileOps?: number;
3250
3339
  external?: (string | RegExp)[] | string | RegExp | ((source: string, importer: string | undefined, isResolved: boolean) => boolean | null | undefined);
3251
3340
  }
3252
- interface RolldownOutputOptions {
3253
- globals?: {
3254
- [name: string]: string;
3255
- } | ((name: string) => string);
3256
- }
3257
3341
  /**
3258
3342
  * This sets the log level hierarchy for our terminal logger, ranging from
3259
3343
  * most to least verbose.
@@ -3359,6 +3443,28 @@ interface OutputTargetLoaderBundle extends OutputTargetBaseNext {
3359
3443
  * @default 'loader' (relative to output directory)
3360
3444
  */
3361
3445
  loaderPath?: string;
3446
+ /**
3447
+ * Hash the filenames of generated chunks based on their content.
3448
+ * Enables forever-caching of CDN-served bundles.
3449
+ *
3450
+ * @default true in production, false in dev mode
3451
+ */
3452
+ hashFileNames?: boolean;
3453
+ /**
3454
+ * Number of characters to use for the content hash in filenames.
3455
+ *
3456
+ * @default 8
3457
+ */
3458
+ hashedFileNameLength?: number;
3459
+ /**
3460
+ * When `true`, marks `@stencil/core` as an external dependency in the bundler (ESM/CJS)
3461
+ * distribution output. Consumers must provide `@stencil/core` themselves.
3462
+ *
3463
+ * Has no effect on the browser/CDN build - the runtime is always bundled there.
3464
+ *
3465
+ * @default false
3466
+ */
3467
+ externalRuntime?: boolean;
3362
3468
  }
3363
3469
  /**
3364
3470
  * Output target for generating Stencil component source for downstream re-bundling.
@@ -3372,14 +3478,14 @@ interface OutputTargetLoaderBundle extends OutputTargetBaseNext {
3372
3478
  * @example
3373
3479
  * ```typescript
3374
3480
  * {
3375
- * type: 'stencil-rebundle',
3376
- * dir: 'dist/stencil-rebundle',
3481
+ * type: 'collection',
3482
+ * dir: 'dist/collection',
3377
3483
  * transformAliasedImportPaths: true
3378
3484
  * }
3379
3485
  * ```
3380
3486
  */
3381
- interface OutputTargetStencilRebundle extends OutputTargetBaseNext {
3382
- type: 'stencil-rebundle';
3487
+ interface OutputTargetCollection extends OutputTargetBaseNext {
3488
+ type: 'collection';
3383
3489
  empty?: boolean;
3384
3490
  /**
3385
3491
  * When `true` this flag will transform aliased import paths defined in
@@ -3433,6 +3539,12 @@ interface OutputTargetDistLazy extends OutputTargetBase {
3433
3539
  loaderDir?: string;
3434
3540
  typesDir?: string;
3435
3541
  empty?: boolean;
3542
+ /** Inherited from parent output target (loader-bundle or www). Only meaningful for browser builds. */
3543
+ hashFileNames?: boolean;
3544
+ /** Inherited from parent output target (loader-bundle or www). */
3545
+ hashedFileNameLength?: number;
3546
+ /** Inherited from loader-bundle. When true, @stencil/core is external in this bundler output. */
3547
+ externalRuntime?: boolean;
3436
3548
  }
3437
3549
  /**
3438
3550
  * Output target for global styles.
@@ -3543,6 +3655,13 @@ interface OutputTargetSsr extends OutputTargetBase {
3543
3655
  */
3544
3656
  cjs?: boolean;
3545
3657
  }
3658
+ interface OutputTargetSsrWasm extends OutputTargetBase {
3659
+ type: 'ssr-wasm';
3660
+ /** Output directory. @default 'dist/ssr-wasm' */
3661
+ dir?: string;
3662
+ empty?: boolean;
3663
+ minify?: boolean;
3664
+ }
3546
3665
  interface OutputTargetCustom extends OutputTargetBase {
3547
3666
  type: 'custom';
3548
3667
  name: string;
@@ -3696,7 +3815,7 @@ interface OutputTargetStandalone extends OutputTargetBaseNext {
3696
3815
  * 2. File names are not hashed.
3697
3816
  * 3. File minification will follow the behavior defined at the root of the Stencil config.
3698
3817
  *
3699
- * @default true
3818
+ * @default false
3700
3819
  */
3701
3820
  externalRuntime?: boolean;
3702
3821
  copy?: CopyTask[];
@@ -3767,7 +3886,7 @@ interface OutputTargetBase {
3767
3886
  */
3768
3887
  skipInDev?: boolean;
3769
3888
  }
3770
- type OutputTargetBuild = OutputTargetStencilRebundle | OutputTargetDistLazy;
3889
+ type OutputTargetBuild = OutputTargetCollection | OutputTargetDistLazy;
3771
3890
  interface OutputTargetCopy extends OutputTargetBase {
3772
3891
  type: 'copy';
3773
3892
  dir: string;
@@ -3853,8 +3972,21 @@ interface OutputTargetWww extends OutputTargetBase {
3853
3972
  */
3854
3973
  serviceWorker?: ServiceWorkerConfig | null | false;
3855
3974
  appDir?: string;
3975
+ /**
3976
+ * Hash the filenames of generated chunks based on their content.
3977
+ * Enables forever-caching of CDN-served bundles.
3978
+ *
3979
+ * @default true in production, false in dev mode
3980
+ */
3981
+ hashFileNames?: boolean;
3982
+ /**
3983
+ * Number of characters to use for the content hash in filenames.
3984
+ *
3985
+ * @default 8
3986
+ */
3987
+ hashedFileNameLength?: number;
3856
3988
  }
3857
- type OutputTarget = OutputTargetCopy | OutputTargetCustom | OutputTargetLoaderBundle | OutputTargetStandalone | OutputTargetSsr | OutputTargetStencilRebundle | OutputTargetTypes | OutputTargetGlobalStyle | OutputTargetAssets | OutputTargetDistLazy | OutputTargetDocsJson | OutputTargetDocsCustom | OutputTargetDocsReadme | OutputTargetDocsVscode | OutputTargetDocsCustomElementsManifest | OutputTargetWww | OutputTargetStats;
3989
+ type OutputTarget = OutputTargetCopy | OutputTargetCustom | OutputTargetLoaderBundle | OutputTargetStandalone | OutputTargetSsr | OutputTargetSsrWasm | OutputTargetCollection | OutputTargetTypes | OutputTargetGlobalStyle | OutputTargetAssets | OutputTargetDistLazy | OutputTargetDocsJson | OutputTargetDocsCustom | OutputTargetDocsReadme | OutputTargetDocsVscode | OutputTargetDocsCustomElementsManifest | OutputTargetWww | OutputTargetStats;
3858
3990
  /**
3859
3991
  * Our custom configuration interface for generated caching Service Workers
3860
3992
  * using the Workbox library (see https://developer.chrome.com/docs/workbox/).
@@ -3949,17 +4081,6 @@ interface WorkerOptions {
3949
4081
  maxConcurrentTasksPerWorker?: number;
3950
4082
  logger?: Logger;
3951
4083
  }
3952
- interface RolldownInterface {
3953
- rolldown: {
3954
- (config: any): Promise<any>;
3955
- };
3956
- plugins: {
3957
- nodeResolve(opts: any): any;
3958
- replace(opts: any): any;
3959
- commonjs(opts: any): any;
3960
- json(): any;
3961
- };
3962
- }
3963
4084
  interface ResolveModuleOptions {
3964
4085
  manuallyResolve?: boolean;
3965
4086
  packageJson?: boolean;
@@ -4041,6 +4162,18 @@ interface Compiler {
4041
4162
  createWatcher(): Promise<CompilerWatcher>;
4042
4163
  destroy(): Promise<void>;
4043
4164
  sys: CompilerSystem;
4165
+ /**
4166
+ * @internal - Testing only. Access to the in-memory filesystem
4167
+ */
4168
+ fs?: InMemoryFileSystem;
4169
+ /**
4170
+ * @internal - Testing only. Access to the validated configuration
4171
+ */
4172
+ config?: ValidatedConfig;
4173
+ /**
4174
+ * @internal - Testing only. Access to the compiler context
4175
+ */
4176
+ compilerCtx?: CompilerCtx;
4044
4177
  }
4045
4178
  interface CompilerWatcher extends BuildOnEvents {
4046
4179
  start: () => Promise<WatcherCloseResults>;
@@ -4081,7 +4214,7 @@ interface TranspileOptions {
4081
4214
  componentMetadata?: 'runtimestatic' | 'compilerstatic' | string | undefined;
4082
4215
  /**
4083
4216
  * The actual internal import path for any `@stencil/core` imports.
4084
- * Default is `@stencil/core/runtime/client`.
4217
+ * Default is `@stencil/core/runtime/client/standalone`.
4085
4218
  */
4086
4219
  coreImportPath?: string;
4087
4220
  /**
@@ -4238,4 +4371,4 @@ interface CliInitOptions {
4238
4371
  sys: CompilerSystem;
4239
4372
  }
4240
4373
  //#endregion
4241
- export { AutoprefixerOptions, BuildEmitEvents, BuildEvents, BuildLog, BuildNoChangeResults, BuildOnEventRemove, BuildOnEvents, BuildOutput, BuildResultsComponentGraph, CacheStorage, CliInitOptions, CompileScriptMinifyOptions, CompileTarget, Compiler, CompilerBuildResults, CompilerBuildStart, CompilerDependency, CompilerEventBuildFinish, CompilerEventBuildLog, CompilerEventBuildNoChange, CompilerEventBuildStart, CompilerEventDirAdd, CompilerEventDirDelete, CompilerEventFileAdd, CompilerEventFileDelete, CompilerEventFileUpdate, CompilerEventFsChange, CompilerEventName, CompilerFileWatcher, CompilerFileWatcherCallback, CompilerFileWatcherEvent, CompilerFsStats, CompilerRequest, CompilerRequestResponse, CompilerSystem, CompilerSystemCreateDirectoryOptions, CompilerSystemCreateDirectoryResults, CompilerSystemRealpathResults, CompilerSystemRemoveDirectoryOptions, CompilerSystemRemoveDirectoryResults, CompilerSystemRemoveFileResults, CompilerSystemRenameResults, CompilerSystemRenamedPath, CompilerSystemWriteFileResults, CompilerWatcher, Config, ConfigBundle, ConfigExtras, CopyResults, CopyTask, Credentials, CustomElementsExportBehavior, CustomElementsExportBehaviorOptions, DevServer, DevServerConfig, DevServerEditor, Diagnostic, FsWatchResults, HistoryApiFallback, HmrStyleUpdate, HotModuleReplacement, HydrateDocumentOptions, HydrateFactoryOptions, HydratedFlag, JsonDocMethodParameter, JsonDocs, JsonDocsComponent, JsonDocsCustomState, JsonDocsDependencyGraph, JsonDocsEvent, JsonDocsListener, JsonDocsMethod, JsonDocsMethodReturn, JsonDocsPart, JsonDocsProp, JsonDocsSlot, JsonDocsStyle, JsonDocsTag, JsonDocsTypeLibrary, JsonDocsUsage, JsonDocsValue, LOG_LEVELS, LazyRequire, LoadConfigInit, LoadConfigResults, LogLevel, Logger, LoggerLineUpdater, LoggerTimeSpan, NodeResolveConfig, OptimizeCssInput, OptimizeCssOutput, OptimizeJsInput, OptimizeJsOutput, OutputTarget, OutputTargetAssets, OutputTargetBase, OutputTargetBaseNext, OutputTargetBuild, OutputTargetCopy, OutputTargetCustom, OutputTargetDistLazy, OutputTargetDocsCustom, OutputTargetDocsCustomElementsManifest, OutputTargetDocsJson, OutputTargetDocsReadme, OutputTargetDocsVscode, OutputTargetGlobalStyle, OutputTargetLoaderBundle, OutputTargetSsr, OutputTargetStandalone, OutputTargetStats, OutputTargetStencilRebundle, OutputTargetTypes, OutputTargetWww, PageReloadStrategy, ParsedPath, PlatformPath, PrerenderConfig, PrerenderHydrateOptions, PrerenderOptions, PrerenderResults, PrerenderStartOptions, ResolveModuleIdOptions, ResolveModuleIdResults, ResolveModuleOptions, RobotsTxtOpts, RobotsTxtResults, RolldownConfig, RolldownInputOptions, RolldownInterface, RolldownOutputOptions, SerializeDocumentOptions, ServiceWorkerConfig, SitemapXmpOpts, SitemapXmpResults, SsrDocumentOptions, SsrFactoryOptions, StencilConfig, StencilDevServerConfig, StencilDocsConfig, StyleDoc, SystemDetails, TransformOptions, TranspileOnlyResults, TranspileOptions, TranspileResults, UnvalidatedConfig, ValidatedConfig, WatcherCloseResults, WorkerMainController, WorkerOptions };
4374
+ export { AutoprefixerOptions, BuildEmitEvents, BuildEvents, BuildLog, BuildNoChangeResults, BuildOnEventRemove, BuildOnEvents, BuildOutput, BuildResultsComponentGraph, CacheStorage, CliInitOptions, CompileScriptMinifyOptions, CompileTarget, Compiler, CompilerBuildResults, CompilerBuildStart, CompilerDependency, CompilerEventBuildFinish, CompilerEventBuildLog, CompilerEventBuildNoChange, CompilerEventBuildStart, CompilerEventDirAdd, CompilerEventDirDelete, CompilerEventFileAdd, CompilerEventFileDelete, CompilerEventFileUpdate, CompilerEventFsChange, CompilerEventName, CompilerFileWatcher, CompilerFileWatcherCallback, CompilerFileWatcherEvent, CompilerFsStats, CompilerRequest, CompilerRequestResponse, CompilerSystem, CompilerSystemCreateDirectoryOptions, CompilerSystemCreateDirectoryResults, CompilerSystemRealpathResults, CompilerSystemRemoveDirectoryOptions, CompilerSystemRemoveDirectoryResults, CompilerSystemRemoveFileResults, CompilerSystemRenameResults, CompilerSystemRenamedPath, CompilerSystemWriteFileResults, CompilerWatcher, Config, ConfigBundle, ConfigExtras, CopyResults, CopyTask, Credentials, CustomElementsExportBehavior, CustomElementsExportBehaviorOptions, DevServer, DevServerConfig, DevServerEditor, Diagnostic, FsWatchResults, HistoryApiFallback, HmrStyleUpdate, HotModuleReplacement, HydrateDocumentOptions, HydrateFactoryOptions, HydratedFlag, JsonDocMethodParameter, JsonDocs, JsonDocsComponent, JsonDocsCustomState, JsonDocsDependencyGraph, JsonDocsEvent, JsonDocsListener, JsonDocsMethod, JsonDocsMethodReturn, JsonDocsPart, JsonDocsProp, JsonDocsSlot, JsonDocsStyle, JsonDocsTag, JsonDocsTypeLibrary, JsonDocsUsage, JsonDocsValue, LOG_LEVELS, LazyRequire, LoadConfigInit, LoadConfigResults, LogLevel, Logger, LoggerLineUpdater, LoggerTimeSpan, NodeResolveConfig, OptimizeCssInput, OptimizeCssOutput, OptimizeJsInput, OptimizeJsOutput, OutputTarget, OutputTargetAssets, OutputTargetBase, OutputTargetBaseNext, OutputTargetBuild, OutputTargetCollection, OutputTargetCopy, OutputTargetCustom, OutputTargetDistLazy, OutputTargetDocsCustom, OutputTargetDocsCustomElementsManifest, OutputTargetDocsJson, OutputTargetDocsReadme, OutputTargetDocsVscode, OutputTargetGlobalStyle, OutputTargetLoaderBundle, OutputTargetSsr, OutputTargetSsrWasm, OutputTargetStandalone, OutputTargetStats, OutputTargetTypes, OutputTargetWww, PageReloadStrategy, ParsedPath, PlatformPath, PrerenderConfig, PrerenderHydrateOptions, PrerenderOptions, PrerenderResults, PrerenderStartOptions, ResolveModuleIdOptions, ResolveModuleIdResults, ResolveModuleOptions, RobotsTxtOpts, RobotsTxtResults, RolldownConfig, SerializeDocumentOptions, ServiceWorkerConfig, SitemapXmpOpts, SitemapXmpResults, SsrDocumentOptions, SsrFactoryOptions, StencilConfig, StencilDevServerConfig, StencilDocsConfig, StyleDoc, SystemDetails, TransformOptions, TranspileOnlyResults, TranspileOptions, TranspileResults, UnvalidatedConfig, ValidatedConfig, WatcherCloseResults, WorkerMainController, WorkerOptions };
@@ -20,6 +20,11 @@ interface ComponentCompilerPropertyComplexType {
20
20
  * annotation in the original source file.
21
21
  */
22
22
  references: ComponentCompilerTypeReferences;
23
+ /**
24
+ * @internal TypeScript AST node used for semantic type analysis during compilation.
25
+ * Not serialized, only used internally for improved type renaming logic.
26
+ */
27
+ _astNode?: any;
23
28
  }
24
29
  /**
25
30
  * A record of `ComponentCompilerTypeReference` entities.
@@ -90,6 +95,11 @@ interface ComponentCompilerMethodComplexType {
90
95
  parameters: JsonDocMethodParameter[];
91
96
  references: ComponentCompilerTypeReferences;
92
97
  return: string;
98
+ /**
99
+ * @internal TypeScript AST method node used for semantic type analysis during compilation.
100
+ * Not serialized, only used internally for improved type renaming logic.
101
+ */
102
+ _astNode?: any;
93
103
  }
94
104
  //#endregion
95
105
  //#region src/declarations/stencil-public-docs.d.ts