@stencil/core 5.0.0-beta.14 → 5.0.0-beta.16
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.
- package/dist/{client-CAQvc3hT.mjs → client-BUal4Vkx.mjs} +50 -39
- package/dist/compiler/browser.d.ts +13 -24
- package/dist/compiler/browser.js +119 -154
- package/dist/compiler/index.d.mts +25 -2
- package/dist/compiler/index.mjs +3 -3
- package/dist/compiler/utils/index.d.mts +1 -1
- package/dist/{compiler-Bit_AiP4.mjs → compiler-BIPF8u8e.mjs} +341 -214
- package/dist/declarations/stencil-public-compiler.d.ts +27 -37
- package/dist/{index-BilaSOF5.d.mts → index-Bj4ASC2H.d.mts} +27 -37
- package/dist/{index-BBJVAnzJ.d.mts → index-CRmTySCS.d.mts} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/{node-Bw9pHJOq.mjs → node-DGo5Qu7U.mjs} +2 -6
- package/dist/runtime/client/lazy.js +71 -73
- package/dist/runtime/client/runtime.d.ts +4 -4
- package/dist/runtime/client/runtime.js +71 -73
- package/dist/runtime/index.js +71 -73
- package/dist/runtime/server/index.d.mts +4 -4
- package/dist/runtime/server/index.mjs +81 -81
- package/dist/runtime/server/runner.d.mts +4 -4
- package/dist/sys/node/index.d.mts +1 -1
- package/dist/sys/node/index.mjs +1 -1
- package/dist/sys/node/worker.mjs +2 -2
- package/dist/testing/index.d.mts +22 -32
- package/dist/testing/index.mjs +11 -18
- package/package.json +4 -4
|
@@ -1789,8 +1789,7 @@ interface StencilConfig {
|
|
|
1789
1789
|
* Will generate {@link https://nodejs.org/api/packages.html#packages_exports export map} entry points
|
|
1790
1790
|
* for each component in the build when `true`.
|
|
1791
1791
|
*
|
|
1792
|
-
*
|
|
1793
|
-
* whenever a config file is present - set this explicitly to opt an existing project in or out.
|
|
1792
|
+
* @default false
|
|
1794
1793
|
*/
|
|
1795
1794
|
generateExportMaps?: boolean;
|
|
1796
1795
|
/**
|
|
@@ -2648,7 +2647,7 @@ interface SerializeDocumentOptions extends SsrDocumentOptions {
|
|
|
2648
2647
|
* Note that this is "approximate", in that HTML may often not be able
|
|
2649
2648
|
* to be split at an exact line width. Additionally, new lines created
|
|
2650
2649
|
* is where HTML naturally already has whitespace, such as before an
|
|
2651
|
-
* attribute or spaces between words. Defaults to `100
|
|
2650
|
+
* attribute or spaces between words. Defaults to no wrapping (`100` when prerendering).
|
|
2652
2651
|
*/
|
|
2653
2652
|
approximateLineWidth?: number;
|
|
2654
2653
|
/**
|
|
@@ -2666,12 +2665,12 @@ interface SerializeDocumentOptions extends SsrDocumentOptions {
|
|
|
2666
2665
|
prettyHtml?: boolean;
|
|
2667
2666
|
/**
|
|
2668
2667
|
* Remove quotes from attribute values when possible.
|
|
2669
|
-
* Defaults to `true
|
|
2668
|
+
* Defaults to `false` (`true` when prerendering).
|
|
2670
2669
|
*/
|
|
2671
2670
|
removeAttributeQuotes?: boolean;
|
|
2672
2671
|
/**
|
|
2673
2672
|
* Remove the `=""` from standardized `boolean` attributes,
|
|
2674
|
-
* such as `hidden` or `checked`. Defaults to `true
|
|
2673
|
+
* such as `hidden` or `checked`. Defaults to `false` (`true` when prerendering).
|
|
2675
2674
|
*/
|
|
2676
2675
|
removeBooleanAttributeQuotes?: boolean;
|
|
2677
2676
|
/**
|
|
@@ -2680,7 +2679,7 @@ interface SerializeDocumentOptions extends SsrDocumentOptions {
|
|
|
2680
2679
|
*/
|
|
2681
2680
|
removeEmptyAttributes?: boolean;
|
|
2682
2681
|
/**
|
|
2683
|
-
* Remove HTML comments. Defaults to `true
|
|
2682
|
+
* Remove HTML comments. Defaults to `false` (`true` when prerendering).
|
|
2684
2683
|
*/
|
|
2685
2684
|
removeHtmlComments?: boolean;
|
|
2686
2685
|
/**
|
|
@@ -2779,7 +2778,7 @@ interface CompilerSystem {
|
|
|
2779
2778
|
name: 'node' | 'in-memory';
|
|
2780
2779
|
version: string;
|
|
2781
2780
|
events?: BuildEvents;
|
|
2782
|
-
details
|
|
2781
|
+
details: SystemDetails;
|
|
2783
2782
|
/**
|
|
2784
2783
|
* Add a callback which will be ran when destroy() is called.
|
|
2785
2784
|
*/
|
|
@@ -2792,14 +2791,15 @@ interface CompilerSystem {
|
|
|
2792
2791
|
* SYNC! Always returns a boolean, does not throw.
|
|
2793
2792
|
*/
|
|
2794
2793
|
accessSync(p: string): boolean;
|
|
2795
|
-
applyGlobalPatch?(fromDir: string): Promise<void>;
|
|
2796
2794
|
applyPrerenderGlobalPatch?(opts: {
|
|
2797
2795
|
devServerHostUrl: string;
|
|
2798
2796
|
window: any;
|
|
2799
2797
|
}): void;
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2798
|
+
/**
|
|
2799
|
+
* Check npm for a newer Stencil version. Resolves a function that logs the result.
|
|
2800
|
+
*/
|
|
2801
|
+
checkVersion(logger: Logger, currentVersion: string): Promise<() => void>;
|
|
2802
|
+
copy(copyTasks: Required<CopyTask>[], srcDir: string): Promise<CopyResults>;
|
|
2803
2803
|
/**
|
|
2804
2804
|
* Always returns a boolean if the files were copied or not. Does not throw.
|
|
2805
2805
|
*/
|
|
@@ -2824,7 +2824,7 @@ interface CompilerSystem {
|
|
|
2824
2824
|
/**
|
|
2825
2825
|
* Each platform has a different way to dynamically import modules.
|
|
2826
2826
|
*/
|
|
2827
|
-
dynamicImport
|
|
2827
|
+
dynamicImport(p: string): Promise<any>;
|
|
2828
2828
|
/**
|
|
2829
2829
|
* Creates the worker controller for the current system.
|
|
2830
2830
|
*
|
|
@@ -2838,20 +2838,14 @@ interface CompilerSystem {
|
|
|
2838
2838
|
* process.exit()
|
|
2839
2839
|
*/
|
|
2840
2840
|
exit(exitCode: number): Promise<void>;
|
|
2841
|
-
/**
|
|
2842
|
-
* Optionally provide a fetch() function rather than using the built-in fetch().
|
|
2843
|
-
* First arg is a url string or Request object (RequestInfo).
|
|
2844
|
-
* Second arg is the RequestInit. Returns the Response object
|
|
2845
|
-
*/
|
|
2846
|
-
fetch?(input: string | any, init?: any): Promise<any>;
|
|
2847
2841
|
/**
|
|
2848
2842
|
* Generates a sha1 digest encoded as HEX
|
|
2849
2843
|
*/
|
|
2850
|
-
generateContentHash
|
|
2844
|
+
generateContentHash(content: string | any, length?: number): Promise<string>;
|
|
2851
2845
|
/**
|
|
2852
2846
|
* Generates a sha1 digest encoded as HEX from a file path
|
|
2853
2847
|
*/
|
|
2854
|
-
generateFileHash
|
|
2848
|
+
generateFileHash(filePath: string | any, length?: number): Promise<string>;
|
|
2855
2849
|
/**
|
|
2856
2850
|
* Get the current directory.
|
|
2857
2851
|
*/
|
|
@@ -2860,7 +2854,6 @@ interface CompilerSystem {
|
|
|
2860
2854
|
* The compiler's executing path.
|
|
2861
2855
|
*/
|
|
2862
2856
|
getCompilerExecutingPath(): string;
|
|
2863
|
-
getEnvironmentVar?(key: string): string;
|
|
2864
2857
|
/**
|
|
2865
2858
|
* Gets the absolute file path when for a dependency module.
|
|
2866
2859
|
*/
|
|
@@ -2899,11 +2892,7 @@ interface CompilerSystem {
|
|
|
2899
2892
|
* Normalize file system path.
|
|
2900
2893
|
*/
|
|
2901
2894
|
normalizePath(p: string): string;
|
|
2902
|
-
onProcessInterrupt
|
|
2903
|
-
parseYarnLockFile?: (content: string) => {
|
|
2904
|
-
type: 'success' | 'merge' | 'conflict';
|
|
2905
|
-
object: any;
|
|
2906
|
-
};
|
|
2895
|
+
onProcessInterrupt(cb: () => void): void;
|
|
2907
2896
|
platformPath: PlatformPath;
|
|
2908
2897
|
/**
|
|
2909
2898
|
* All return paths are full normalized paths, not just the basenames. Always returns an array, does not throw.
|
|
@@ -2939,6 +2928,9 @@ interface CompilerSystem {
|
|
|
2939
2928
|
* Rename old path to new path. Does not throw.
|
|
2940
2929
|
*/
|
|
2941
2930
|
rename(oldPath: string, newPath: string): Promise<CompilerSystemRenameResults>;
|
|
2931
|
+
/**
|
|
2932
|
+
* Assigned by the compiler. Used by plugins (e.g. `@stencil/sass`) to resolve `~` imports.
|
|
2933
|
+
*/
|
|
2942
2934
|
resolveModuleId?(opts: ResolveModuleIdOptions): Promise<ResolveModuleIdResults>;
|
|
2943
2935
|
resolvePath(p: string): string;
|
|
2944
2936
|
/**
|
|
@@ -3589,7 +3581,7 @@ interface OutputTargetCollection extends OutputTargetBaseNext {
|
|
|
3589
3581
|
* When `true` this flag will transform aliased import paths defined in
|
|
3590
3582
|
* a project's `tsconfig.json` to relative import paths in the compiled output.
|
|
3591
3583
|
*
|
|
3592
|
-
* Paths will be left in aliased format if `false
|
|
3584
|
+
* Paths will be left in aliased format if `false`. Defaults to `true`.
|
|
3593
3585
|
*
|
|
3594
3586
|
* @example
|
|
3595
3587
|
* // tsconfig.json
|
|
@@ -3691,11 +3683,11 @@ interface OutputTargetGlobalStyle extends OutputTargetBaseNext {
|
|
|
3691
3683
|
* Controls whether this global stylesheet is injected into component shadow DOMs
|
|
3692
3684
|
* as a constructable stylesheet at runtime.
|
|
3693
3685
|
*
|
|
3694
|
-
* - `'none'
|
|
3686
|
+
* - `'none'`: Don't inject - stylesheet must be loaded externally (e.g., via `<link>`)
|
|
3695
3687
|
* - `'client'`: Inject only in client builds, not SSR (reduces SSR output size)
|
|
3696
3688
|
* - `'all'`: Inject in both client and SSR builds
|
|
3697
3689
|
*
|
|
3698
|
-
* @default 'none'
|
|
3690
|
+
* @default 'client' when the stylesheet comes from `globalStyle` (or an auto-detected `src/global.*`), 'none' when `input` is set
|
|
3699
3691
|
*/
|
|
3700
3692
|
inject?: 'none' | 'client' | 'all';
|
|
3701
3693
|
}
|
|
@@ -3894,7 +3886,7 @@ interface OutputTargetDocsAgentSkill extends OutputTargetBase {
|
|
|
3894
3886
|
/**
|
|
3895
3887
|
* The skill's name, used in the `SKILL.md` frontmatter.
|
|
3896
3888
|
*
|
|
3897
|
-
* Defaults to
|
|
3889
|
+
* Defaults to {@link Config.namespace}, lowercased, with anything other than letters and numbers replaced by `-`.
|
|
3898
3890
|
*/
|
|
3899
3891
|
name?: string;
|
|
3900
3892
|
/**
|
|
@@ -4022,8 +4014,10 @@ interface OutputTargetBase {
|
|
|
4022
4014
|
* This improves dev build times by not generating production-only artifacts.
|
|
4023
4015
|
*
|
|
4024
4016
|
* Defaults vary by output target type:
|
|
4025
|
-
* - `loader-bundle`: `
|
|
4026
|
-
* - `standalone`: `true`
|
|
4017
|
+
* - `loader-bundle`: `true` (skips the npm distribution files; the browser bundle always builds)
|
|
4018
|
+
* - `standalone`: `true` if `loader-bundle` is also configured, otherwise `false`
|
|
4019
|
+
* - `types`, `collection`, `ssr-wasm`: `true` (skips in dev)
|
|
4020
|
+
* - `assets`, `global-style`: `false` (always runs)
|
|
4027
4021
|
* - `ssr`: `true` (skips in dev, unless `devServer.ssr` is enabled)
|
|
4028
4022
|
* - `docs-*`: `true` (skips in dev)
|
|
4029
4023
|
* - `custom`: `true` (skips in dev)
|
|
@@ -4218,10 +4212,6 @@ interface Diagnostic {
|
|
|
4218
4212
|
relFilePath?: string | undefined;
|
|
4219
4213
|
type: string;
|
|
4220
4214
|
}
|
|
4221
|
-
interface CacheStorage {
|
|
4222
|
-
get(key: string): Promise<any>;
|
|
4223
|
-
set(key: string, value: any): Promise<void>;
|
|
4224
|
-
}
|
|
4225
4215
|
interface WorkerOptions {
|
|
4226
4216
|
maxConcurrentWorkers?: number;
|
|
4227
4217
|
maxConcurrentTasksPerWorker?: number;
|
|
@@ -4559,4 +4549,4 @@ interface CliInitOptions {
|
|
|
4559
4549
|
sys: CompilerSystem;
|
|
4560
4550
|
}
|
|
4561
4551
|
//#endregion
|
|
4562
|
-
export { AutoprefixerOptions, BuildEmitEvents, BuildEvents, BuildLog, BuildNoChangeResults, BuildOnEventRemove, BuildOnEvents, BuildOutput, BuildOverrides, BuildResultsComponentGraph,
|
|
4552
|
+
export { AutoprefixerOptions, BuildEmitEvents, BuildEvents, BuildLog, BuildNoChangeResults, BuildOnEventRemove, BuildOnEvents, BuildOutput, BuildOverrides, BuildResultsComponentGraph, 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, ConfigCompat, CopyResults, CopyTask, Credentials, CustomElementsExportBehavior, CustomElementsExportBehaviorOptions, DevServer, DevServerConfig, DevServerEditor, Diagnostic, DocsReadmeCustomColumn, FsWatchResults, HistoryApiFallback, HmrGlobalStyleUpdate, 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, LightDomPatches, LoadConfigInit, LoadConfigResults, LogLevel, Logger, LoggerLineUpdater, LoggerTimeSpan, ModeConfig, NodeResolveConfig, OptimizeCssInput, OptimizeCssOutput, OptimizeJsInput, OptimizeJsOutput, OutputTarget, OutputTargetAssets, OutputTargetBase, OutputTargetBaseNext, OutputTargetBuild, OutputTargetCollection, OutputTargetCopy, OutputTargetCustom, OutputTargetDistLazy, OutputTargetDocsAgentSkill, 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, ValidatedOutputTargetWww, WatcherCloseResults, WorkerMainController, WorkerOptions };
|
|
@@ -1807,8 +1807,7 @@ interface StencilConfig {
|
|
|
1807
1807
|
* Will generate {@link https://nodejs.org/api/packages.html#packages_exports export map} entry points
|
|
1808
1808
|
* for each component in the build when `true`.
|
|
1809
1809
|
*
|
|
1810
|
-
*
|
|
1811
|
-
* whenever a config file is present - set this explicitly to opt an existing project in or out.
|
|
1810
|
+
* @default false
|
|
1812
1811
|
*/
|
|
1813
1812
|
generateExportMaps?: boolean;
|
|
1814
1813
|
/**
|
|
@@ -2666,7 +2665,7 @@ interface SerializeDocumentOptions extends SsrDocumentOptions {
|
|
|
2666
2665
|
* Note that this is "approximate", in that HTML may often not be able
|
|
2667
2666
|
* to be split at an exact line width. Additionally, new lines created
|
|
2668
2667
|
* is where HTML naturally already has whitespace, such as before an
|
|
2669
|
-
* attribute or spaces between words. Defaults to `100
|
|
2668
|
+
* attribute or spaces between words. Defaults to no wrapping (`100` when prerendering).
|
|
2670
2669
|
*/
|
|
2671
2670
|
approximateLineWidth?: number;
|
|
2672
2671
|
/**
|
|
@@ -2684,12 +2683,12 @@ interface SerializeDocumentOptions extends SsrDocumentOptions {
|
|
|
2684
2683
|
prettyHtml?: boolean;
|
|
2685
2684
|
/**
|
|
2686
2685
|
* Remove quotes from attribute values when possible.
|
|
2687
|
-
* Defaults to `true
|
|
2686
|
+
* Defaults to `false` (`true` when prerendering).
|
|
2688
2687
|
*/
|
|
2689
2688
|
removeAttributeQuotes?: boolean;
|
|
2690
2689
|
/**
|
|
2691
2690
|
* Remove the `=""` from standardized `boolean` attributes,
|
|
2692
|
-
* such as `hidden` or `checked`. Defaults to `true
|
|
2691
|
+
* such as `hidden` or `checked`. Defaults to `false` (`true` when prerendering).
|
|
2693
2692
|
*/
|
|
2694
2693
|
removeBooleanAttributeQuotes?: boolean;
|
|
2695
2694
|
/**
|
|
@@ -2698,7 +2697,7 @@ interface SerializeDocumentOptions extends SsrDocumentOptions {
|
|
|
2698
2697
|
*/
|
|
2699
2698
|
removeEmptyAttributes?: boolean;
|
|
2700
2699
|
/**
|
|
2701
|
-
* Remove HTML comments. Defaults to `true
|
|
2700
|
+
* Remove HTML comments. Defaults to `false` (`true` when prerendering).
|
|
2702
2701
|
*/
|
|
2703
2702
|
removeHtmlComments?: boolean;
|
|
2704
2703
|
/**
|
|
@@ -2797,7 +2796,7 @@ interface CompilerSystem {
|
|
|
2797
2796
|
name: 'node' | 'in-memory';
|
|
2798
2797
|
version: string;
|
|
2799
2798
|
events?: BuildEvents;
|
|
2800
|
-
details
|
|
2799
|
+
details: SystemDetails;
|
|
2801
2800
|
/**
|
|
2802
2801
|
* Add a callback which will be ran when destroy() is called.
|
|
2803
2802
|
*/
|
|
@@ -2810,14 +2809,15 @@ interface CompilerSystem {
|
|
|
2810
2809
|
* SYNC! Always returns a boolean, does not throw.
|
|
2811
2810
|
*/
|
|
2812
2811
|
accessSync(p: string): boolean;
|
|
2813
|
-
applyGlobalPatch?(fromDir: string): Promise<void>;
|
|
2814
2812
|
applyPrerenderGlobalPatch?(opts: {
|
|
2815
2813
|
devServerHostUrl: string;
|
|
2816
2814
|
window: any;
|
|
2817
2815
|
}): void;
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2816
|
+
/**
|
|
2817
|
+
* Check npm for a newer Stencil version. Resolves a function that logs the result.
|
|
2818
|
+
*/
|
|
2819
|
+
checkVersion(logger: Logger, currentVersion: string): Promise<() => void>;
|
|
2820
|
+
copy(copyTasks: Required<CopyTask>[], srcDir: string): Promise<CopyResults>;
|
|
2821
2821
|
/**
|
|
2822
2822
|
* Always returns a boolean if the files were copied or not. Does not throw.
|
|
2823
2823
|
*/
|
|
@@ -2842,7 +2842,7 @@ interface CompilerSystem {
|
|
|
2842
2842
|
/**
|
|
2843
2843
|
* Each platform has a different way to dynamically import modules.
|
|
2844
2844
|
*/
|
|
2845
|
-
dynamicImport
|
|
2845
|
+
dynamicImport(p: string): Promise<any>;
|
|
2846
2846
|
/**
|
|
2847
2847
|
* Creates the worker controller for the current system.
|
|
2848
2848
|
*
|
|
@@ -2856,20 +2856,14 @@ interface CompilerSystem {
|
|
|
2856
2856
|
* process.exit()
|
|
2857
2857
|
*/
|
|
2858
2858
|
exit(exitCode: number): Promise<void>;
|
|
2859
|
-
/**
|
|
2860
|
-
* Optionally provide a fetch() function rather than using the built-in fetch().
|
|
2861
|
-
* First arg is a url string or Request object (RequestInfo).
|
|
2862
|
-
* Second arg is the RequestInit. Returns the Response object
|
|
2863
|
-
*/
|
|
2864
|
-
fetch?(input: string | any, init?: any): Promise<any>;
|
|
2865
2859
|
/**
|
|
2866
2860
|
* Generates a sha1 digest encoded as HEX
|
|
2867
2861
|
*/
|
|
2868
|
-
generateContentHash
|
|
2862
|
+
generateContentHash(content: string | any, length?: number): Promise<string>;
|
|
2869
2863
|
/**
|
|
2870
2864
|
* Generates a sha1 digest encoded as HEX from a file path
|
|
2871
2865
|
*/
|
|
2872
|
-
generateFileHash
|
|
2866
|
+
generateFileHash(filePath: string | any, length?: number): Promise<string>;
|
|
2873
2867
|
/**
|
|
2874
2868
|
* Get the current directory.
|
|
2875
2869
|
*/
|
|
@@ -2878,7 +2872,6 @@ interface CompilerSystem {
|
|
|
2878
2872
|
* The compiler's executing path.
|
|
2879
2873
|
*/
|
|
2880
2874
|
getCompilerExecutingPath(): string;
|
|
2881
|
-
getEnvironmentVar?(key: string): string;
|
|
2882
2875
|
/**
|
|
2883
2876
|
* Gets the absolute file path when for a dependency module.
|
|
2884
2877
|
*/
|
|
@@ -2917,11 +2910,7 @@ interface CompilerSystem {
|
|
|
2917
2910
|
* Normalize file system path.
|
|
2918
2911
|
*/
|
|
2919
2912
|
normalizePath(p: string): string;
|
|
2920
|
-
onProcessInterrupt
|
|
2921
|
-
parseYarnLockFile?: (content: string) => {
|
|
2922
|
-
type: 'success' | 'merge' | 'conflict';
|
|
2923
|
-
object: any;
|
|
2924
|
-
};
|
|
2913
|
+
onProcessInterrupt(cb: () => void): void;
|
|
2925
2914
|
platformPath: PlatformPath;
|
|
2926
2915
|
/**
|
|
2927
2916
|
* All return paths are full normalized paths, not just the basenames. Always returns an array, does not throw.
|
|
@@ -2957,6 +2946,9 @@ interface CompilerSystem {
|
|
|
2957
2946
|
* Rename old path to new path. Does not throw.
|
|
2958
2947
|
*/
|
|
2959
2948
|
rename(oldPath: string, newPath: string): Promise<CompilerSystemRenameResults>;
|
|
2949
|
+
/**
|
|
2950
|
+
* Assigned by the compiler. Used by plugins (e.g. `@stencil/sass`) to resolve `~` imports.
|
|
2951
|
+
*/
|
|
2960
2952
|
resolveModuleId?(opts: ResolveModuleIdOptions): Promise<ResolveModuleIdResults>;
|
|
2961
2953
|
resolvePath(p: string): string;
|
|
2962
2954
|
/**
|
|
@@ -3607,7 +3599,7 @@ interface OutputTargetCollection extends OutputTargetBaseNext {
|
|
|
3607
3599
|
* When `true` this flag will transform aliased import paths defined in
|
|
3608
3600
|
* a project's `tsconfig.json` to relative import paths in the compiled output.
|
|
3609
3601
|
*
|
|
3610
|
-
* Paths will be left in aliased format if `false
|
|
3602
|
+
* Paths will be left in aliased format if `false`. Defaults to `true`.
|
|
3611
3603
|
*
|
|
3612
3604
|
* @example
|
|
3613
3605
|
* // tsconfig.json
|
|
@@ -3709,11 +3701,11 @@ interface OutputTargetGlobalStyle extends OutputTargetBaseNext {
|
|
|
3709
3701
|
* Controls whether this global stylesheet is injected into component shadow DOMs
|
|
3710
3702
|
* as a constructable stylesheet at runtime.
|
|
3711
3703
|
*
|
|
3712
|
-
* - `'none'
|
|
3704
|
+
* - `'none'`: Don't inject - stylesheet must be loaded externally (e.g., via `<link>`)
|
|
3713
3705
|
* - `'client'`: Inject only in client builds, not SSR (reduces SSR output size)
|
|
3714
3706
|
* - `'all'`: Inject in both client and SSR builds
|
|
3715
3707
|
*
|
|
3716
|
-
* @default 'none'
|
|
3708
|
+
* @default 'client' when the stylesheet comes from `globalStyle` (or an auto-detected `src/global.*`), 'none' when `input` is set
|
|
3717
3709
|
*/
|
|
3718
3710
|
inject?: 'none' | 'client' | 'all';
|
|
3719
3711
|
}
|
|
@@ -3912,7 +3904,7 @@ interface OutputTargetDocsAgentSkill extends OutputTargetBase {
|
|
|
3912
3904
|
/**
|
|
3913
3905
|
* The skill's name, used in the `SKILL.md` frontmatter.
|
|
3914
3906
|
*
|
|
3915
|
-
* Defaults to
|
|
3907
|
+
* Defaults to {@link Config.namespace}, lowercased, with anything other than letters and numbers replaced by `-`.
|
|
3916
3908
|
*/
|
|
3917
3909
|
name?: string;
|
|
3918
3910
|
/**
|
|
@@ -4040,8 +4032,10 @@ interface OutputTargetBase {
|
|
|
4040
4032
|
* This improves dev build times by not generating production-only artifacts.
|
|
4041
4033
|
*
|
|
4042
4034
|
* Defaults vary by output target type:
|
|
4043
|
-
* - `loader-bundle`: `
|
|
4044
|
-
* - `standalone`: `true`
|
|
4035
|
+
* - `loader-bundle`: `true` (skips the npm distribution files; the browser bundle always builds)
|
|
4036
|
+
* - `standalone`: `true` if `loader-bundle` is also configured, otherwise `false`
|
|
4037
|
+
* - `types`, `collection`, `ssr-wasm`: `true` (skips in dev)
|
|
4038
|
+
* - `assets`, `global-style`: `false` (always runs)
|
|
4045
4039
|
* - `ssr`: `true` (skips in dev, unless `devServer.ssr` is enabled)
|
|
4046
4040
|
* - `docs-*`: `true` (skips in dev)
|
|
4047
4041
|
* - `custom`: `true` (skips in dev)
|
|
@@ -4236,10 +4230,6 @@ interface Diagnostic$1 {
|
|
|
4236
4230
|
relFilePath?: string | undefined;
|
|
4237
4231
|
type: string;
|
|
4238
4232
|
}
|
|
4239
|
-
interface CacheStorage {
|
|
4240
|
-
get(key: string): Promise<any>;
|
|
4241
|
-
set(key: string, value: any): Promise<void>;
|
|
4242
|
-
}
|
|
4243
4233
|
interface WorkerOptions {
|
|
4244
4234
|
maxConcurrentWorkers?: number;
|
|
4245
4235
|
maxConcurrentTasksPerWorker?: number;
|
|
@@ -6213,4 +6203,4 @@ type MsgToWorker<T extends WorkerContextMethod> = IPCSerializable<{
|
|
|
6213
6203
|
*/
|
|
6214
6204
|
type WorkerMsgHandler = <T extends WorkerContextMethod>(msgToWorker: MsgToWorker<T>) => ReturnType<CompilerWorkerContext[T]>;
|
|
6215
6205
|
//#endregion
|
|
6216
|
-
export {
|
|
6206
|
+
export { CompilerSystemRemoveDirectoryResults as $, GLOBAL_STYLE as $i, VNode as $n, isOutputTargetDocsAgentSkill as $r, OutputTargetDocsJson as $t, CompilerDependency as A, createOnWarnFn as Ai, StencilConfig as An, isJsxFile as Ar, LoadConfigResults as At, CompilerEventFsChange as B, COLLECTION_MANIFEST_FILE_NAME as Bi, ValidatedOutputTargetWww as Bn, result_d_exports as Br, OptimizeJsOutput as Bt, BuildResultsComponentGraph as C, shouldIgnoreError as Ci, RolldownConfig as Cn, addDocBlock as Cr, HydrateDocumentOptions as Ct, Compiler as D, augmentDiagnosticWithNode as Di, SitemapXmpResults as Dn, hasDependency as Dr, LazyRequire as Dt, CompileTarget as E, splitLineBreaks as Ei, SitemapXmpOpts as En, getTextDocs as Er, LOG_LEVELS as Et, CompilerEventDirAdd as F, stringifyRuntimeData as Fi, TranspileOnlyResults as Fn, readPackageJson as Fr, ModeConfig as Ft, CompilerFsStats as G, DOCS_AGENT_SKILL as Gi, ErrorHandler as Gn, getComponentsDtsTypesFilePath as Gr, OutputTargetBuild as Gt, CompilerFileWatcher as H, CUSTOM as Hi, WorkerMainController as Hn, filterActiveTargets as Hr, OutputTargetAssets as Ht, CompilerEventDirDelete as I, ASSETS as Ii, TranspileOptions as In, getInlineSourceMappingUrlLinker as Ir, NodeResolveConfig as It, CompilerSystem as J, DOCS_JSON as Ji, RafCallback as Jn, isOutputTargetCollection as Jr, OutputTargetCustom as Jt, CompilerRequest as K, DOCS_CUSTOM as Ki, FunctionalComponent as Kn, getComponentsFromModules as Kr, OutputTargetCollection as Kt, CompilerEventFileAdd as L, CMP_FLAGS as Li, TranspileResults as Ln, getSourceMappingUrlForEndOfFile as Lr, OptimizeCssInput as Lt, CompilerEventBuildLog as M, loadRolldownDiagnostics as Mi, StencilDocsConfig as Mn, isTsxFile as Mr, Logger as Mt, CompilerEventBuildNoChange as N, formatComponentRuntimeMeta as Ni, SystemDetails as Nn, parsePackageJson as Nr, LoggerLineUpdater as Nt, CompilerBuildResults as O, loadTypeScriptDiagnostic as Oi, SsrDocumentOptions as On, isDtsFile as Or, LightDomPatches as Ot, CompilerEventBuildStart as P, formatLazyBundleRuntimeMeta as Pi, TransformOptions as Pn, readOnlyArrayHasStringMember as Pr, LoggerTimeSpan as Pt, CompilerSystemRemoveDirectoryOptions as Q, GENERATED_DTS as Qi, UserBuildConditionals as Qn, isOutputTargetDocs as Qr, OutputTargetDocsCustomElementsManifest as Qt, CompilerEventFileDelete as R, COLLECTION as Ri, UnvalidatedConfig as Rn, getSourceMappingUrlLinker as Rr, OptimizeCssOutput as Rt, BuildOverrides as S, hasWarning as Si, RobotsTxtResults as Sn, ParsePackageJsonResult as Sr, HotModuleReplacement as St, CompileScriptMinifyOptions as T, normalizeDiagnostics as Ti, ServiceWorkerConfig as Tn, generatePreamble as Tr, HydratedFlag as Tt, CompilerFileWatcherCallback as U, DEFAULT_STYLE_MODE as Ui, WorkerOptions as Un, filterExcludedComponents as Ur, OutputTargetBase as Ut, CompilerEventName as V, COPY as Vi, WatcherCloseResults as Vn, FilterComponentsResult as Vr, OutputTarget as Vt, CompilerFileWatcherEvent as W, DIST_LAZY as Wi, ComponentInterface as Wn, getComponentsDtsSrcFilePath as Wr, OutputTargetBaseNext as Wt, CompilerSystemCreateDirectoryResults as X, DOCS_VSCODE as Xi, ResolutionHandler as Xn, isOutputTargetCustom as Xr, OutputTargetDocsAgentSkill as Xt, CompilerSystemCreateDirectoryOptions as Y, DOCS_README as Yi, ReactiveControllerHostInterface as Yn, isOutputTargetCopy as Yr, OutputTargetDistLazy as Yt, CompilerSystemRealpathResults as Z, EVENT_FLAGS as Zi, TagTransformer as Zn, isOutputTargetDistLazy as Zr, OutputTargetDocsCustom as Zt, BuildLog as _, buildError as _i, PrerenderStartOptions as _n, StyleDoc as _r, DocsReadmeCustomColumn as _t, ComponentGlobalStyle as a, NODE_TYPES as aa, isOutputTargetGlobalStyle as ai, OutputTargetSsrWasm as an, JsonDocsEvent as ar, Config as at, BuildOnEvents as b, catchError as bi, ResolveModuleOptions as bn, validateComponentModes as br, HmrGlobalStyleUpdate as bt, PackageJsonData as c, STANDALONE as ca, isOutputTargetSsrWasm as ci, OutputTargetTypes as cn, JsonDocsMethodReturn as cr, CopyResults as ct, RuntimeRef as d, SVG_NS as da, isOutputTargetTypes as di, ParsedPath as dn, JsonDocsSlot as dr, CustomElementsExportBehavior as dt, HOST_FLAGS as ea, isOutputTargetDocsCustom as ei, OutputTargetDocsReadme as en, JsonDocMethodParameter as er, CompilerSystemRemoveFileResults as et, SsrResults as f, TYPES as fa, isOutputTargetWww as fi, PlatformPath as fn, JsonDocsStyle as fr, CustomElementsExportBehaviorOptions as ft, BuildEvents as g, XLINK_NS as ga, TASK_CANCELED_MSG as gi, PrerenderResults as gn, JsonDocsValue as gr, Diagnostic$1 as gt, BuildEmitEvents as h, WWW as ha, shouldExcludeComponent as hi, PrerenderOptions as hn, JsonDocsUsage as hr, DevServerEditor as ht, ComponentCompilerTypeReferences as i, MEMBER_FLAGS as ia, isOutputTargetDocsVscode as ii, OutputTargetSsr as in, JsonDocsDependencyGraph as ir, CompilerWatcher as it, CompilerEventBuildFinish as j, isRolldownError as ji, StencilDevServerConfig as jn, isTsFile as jr, LogLevel as jt, CompilerBuildStart as k, loadTypeScriptDiagnostics as ki, SsrFactoryOptions as kn, isJsFile as kr, LoadConfigInit as kt, PrintLine as l, STATS as la, isOutputTargetStandalone as li, OutputTargetWww as ln, JsonDocsPart as lr, CopyTask as lt, AutoprefixerOptions as m, WATCH_FLAGS as ma, relativeImport as mi, PrerenderHydrateOptions as mn, JsonDocsTypeLibrary as mr, DevServerConfig as mt, CompilerWorkerContext as n, LISTENER_FLAGS as na, isOutputTargetDocsJson as ni, OutputTargetGlobalStyle as nn, JsonDocsComponent as nr, CompilerSystemRenamedPath as nt, HostElement as o, SSR as oa, isOutputTargetLoaderBundle as oi, OutputTargetStandalone as on, JsonDocsListener as or, ConfigBundle as ot, WorkerMsgHandler as p, VALID_CONFIG_OUTPUT_TARGETS as pa, isValidConfigOutputTarget as pi, PrerenderConfig as pn, JsonDocsTag as pr, DevServer as pt, CompilerRequestResponse as q, DOCS_CUSTOM_ELEMENTS_MANIFEST as qi, MixedInCtor as qn, isOutputTargetAssets as qr, OutputTargetCopy as qt, ComponentCompilerMeta as r, LOADER_BUNDLE as ra, isOutputTargetDocsReadme as ri, OutputTargetLoaderBundle as rn, JsonDocsCustomState as rr, CompilerSystemWriteFileResults as rt, LazyBundlesRuntimeData as s, SSR_WASM as sa, isOutputTargetSsr as si, OutputTargetStats as sn, JsonDocsMethod as sr, ConfigCompat as st, ChildType as t, HTML_NS as ta, isOutputTargetDocsCustomElementsManifest as ti, OutputTargetDocsVscode as tn, JsonDocs as tr, CompilerSystemRenameResults as tt, PropsType as u, STYLE_EXT as ua, isOutputTargetStats as ui, PageReloadStrategy as un, JsonDocsProp as ur, Credentials as ut, BuildNoChangeResults as v, buildJsonFileError as vi, ResolveModuleIdOptions as vn, FsWriteResults as vr, FsWatchResults as vt, CliInitOptions as w, escapeHtml as wi, SerializeDocumentOptions as wn, createJsVarName as wr, HydrateFactoryOptions as wt, BuildOutput as x, hasError as xi, RobotsTxtOpts as xn, validateComponentTag as xr, HmrStyleUpdate as xt, BuildOnEventRemove as y, buildWarn as yi, ResolveModuleIdResults as yn, ModeValidationError as yr, HistoryApiFallback as yt, CompilerEventFileUpdate as z, COLLECTION_APP_DATA_FILE_NAME as zi, ValidatedConfig as zn, rolldownToStencilSourceMap as zr, OptimizeJsInput as zt };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $n as
|
|
1
|
+
import { $n as VNode, Gn as ErrorHandler, Jn as RafCallback, Kn as FunctionalComponent, Qn as UserBuildConditionals, Xn as ResolutionHandler, Zn as TagTransformer, d as RuntimeRef, o as HostElement, t as ChildType, u as PropsType } from "./index-Bj4ASC2H.mjs";
|
|
2
2
|
//#region src/client/client-build.d.ts
|
|
3
3
|
declare const Build: UserBuildConditionals;
|
|
4
4
|
//#endregion
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as setErrorHandler, _ as getAssetPath, a as transformTag, b as writeTask, c as Mixin, d as Host, f as h, g as getShadowRoot, h as getElement, i as setTagTransformer, l as getMode, m as getRenderingRef, o as render, p as forceUpdate, s as ReactiveControllerHost, u as setMode, v as setAssetPath,
|
|
1
|
+
import { C as Build, S as setErrorHandler, _ as getAssetPath, a as transformTag, b as writeTask, c as Mixin, d as Host, f as h, g as getShadowRoot, h as getElement, i as setTagTransformer, l as getMode, m as getRenderingRef, o as render, p as forceUpdate, s as ReactiveControllerHost, u as setMode, v as setAssetPath, x as setPlatformHelpers, y as readTask } from "./client-BUal4Vkx.mjs";
|
|
2
2
|
import { t as Fragment } from "./fragment-Di1hWOC8.mjs";
|
|
3
3
|
//#region src/client/client-decorators.ts
|
|
4
4
|
/**
|
package/dist/jsx-runtime.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { n as __require } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
|
-
import "./client-
|
|
2
|
+
import "./client-BUal4Vkx.mjs";
|
|
3
3
|
import { c as isFunction, f as isString, m as noop, r as flatOne } from "./helpers-Cpp3qc3u.mjs";
|
|
4
4
|
import { $ as catchError, K as normalizePath, X as buildError, Y as TASK_CANCELED_MSG, nt as shouldIgnoreError, rt as isGlob } from "./util-IKfWWLJo.mjs";
|
|
5
5
|
import fs from "node:fs";
|
|
6
6
|
import nodePath from "node:path";
|
|
7
7
|
import { pathToFileURL } from "node:url";
|
|
8
8
|
import path from "path";
|
|
9
|
-
import * as cp from "child_process";
|
|
10
9
|
import chalk from "chalk";
|
|
11
10
|
import { createHash } from "node:crypto";
|
|
12
11
|
import * as os from "node:os";
|
|
@@ -20,6 +19,7 @@ import satisfies from "semver/functions/satisfies.js";
|
|
|
20
19
|
import { cpus as cpus$1, tmpdir as tmpdir$1 } from "os";
|
|
21
20
|
import semverLt from "semver/functions/lt.js";
|
|
22
21
|
import { EventEmitter } from "events";
|
|
22
|
+
import * as cp from "child_process";
|
|
23
23
|
//#region src/compiler/events.ts
|
|
24
24
|
const buildEvents = () => {
|
|
25
25
|
const evCallbacks = [];
|
|
@@ -1429,7 +1429,6 @@ function createNodeSys(c = {}) {
|
|
|
1429
1429
|
opts.window.Request = global.Request;
|
|
1430
1430
|
opts.window.Response = global.Response;
|
|
1431
1431
|
},
|
|
1432
|
-
fetch: global.fetch,
|
|
1433
1432
|
checkVersion,
|
|
1434
1433
|
copyFile(src, dst) {
|
|
1435
1434
|
return new Promise((resolve) => {
|
|
@@ -1507,9 +1506,6 @@ function createNodeSys(c = {}) {
|
|
|
1507
1506
|
getCompilerExecutingPath() {
|
|
1508
1507
|
return compilerExecutingPath;
|
|
1509
1508
|
},
|
|
1510
|
-
getEnvironmentVar(key) {
|
|
1511
|
-
return process.env[key];
|
|
1512
|
-
},
|
|
1513
1509
|
getLocalModulePath() {
|
|
1514
1510
|
return null;
|
|
1515
1511
|
},
|
|
@@ -7,11 +7,80 @@ const BUILD = {
|
|
|
7
7
|
lazyLoad: true
|
|
8
8
|
};
|
|
9
9
|
//#endregion
|
|
10
|
+
//#region src/runtime/runtime-constants.ts
|
|
11
|
+
/**
|
|
12
|
+
* Bit flags for recording various properties of VDom nodes
|
|
13
|
+
*/
|
|
14
|
+
const VNODE_FLAGS = {
|
|
15
|
+
/**
|
|
16
|
+
* Whether or not a vdom node is a slot reference
|
|
17
|
+
*/
|
|
18
|
+
isSlotReference: 1,
|
|
19
|
+
/**
|
|
20
|
+
* Whether or not a slot element has fallback content
|
|
21
|
+
*/
|
|
22
|
+
isSlotFallback: 2,
|
|
23
|
+
/**
|
|
24
|
+
* Whether or not an element is a host element
|
|
25
|
+
*/
|
|
26
|
+
isHost: 4
|
|
27
|
+
};
|
|
28
|
+
const PROXY_FLAGS = {
|
|
29
|
+
isElementConstructor: 1,
|
|
30
|
+
proxyState: 2
|
|
31
|
+
};
|
|
32
|
+
const PLATFORM_FLAGS = {
|
|
33
|
+
/**
|
|
34
|
+
* designates a node in the DOM as being actively moved by the runtime
|
|
35
|
+
*/
|
|
36
|
+
isTmpDisconnected: 1,
|
|
37
|
+
appLoaded: 2,
|
|
38
|
+
queueSync: 4,
|
|
39
|
+
queueMask: 6
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* A (subset) of node types which are relevant for the Stencil runtime. These
|
|
43
|
+
* values are based on the values which can possibly be returned by the
|
|
44
|
+
* `.nodeType` property of a DOM node. See here for details:
|
|
45
|
+
*
|
|
46
|
+
* {@link https://dom.spec.whatwg.org/#ref-for-dom-node-nodetype%E2%91%A0}
|
|
47
|
+
*/
|
|
48
|
+
const NODE_TYPE = {
|
|
49
|
+
ElementNode: 1,
|
|
50
|
+
TextNode: 3,
|
|
51
|
+
CommentNode: 8,
|
|
52
|
+
DocumentNode: 9,
|
|
53
|
+
DocumentTypeNode: 10,
|
|
54
|
+
DocumentFragment: 11
|
|
55
|
+
};
|
|
56
|
+
const HYDRATE_ID = "s-id";
|
|
57
|
+
const HYDRATED_STYLE_ID = "sty-id";
|
|
58
|
+
const HYDRATE_CHILD_ID = "c-id";
|
|
59
|
+
const HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
60
|
+
/**
|
|
61
|
+
* Constant for styles to be globally applied to `slot-fb` elements for pseudo-slot behavior.
|
|
62
|
+
*
|
|
63
|
+
* Two cascading rules must be used instead of a `:not()` selector due to Stencil browser
|
|
64
|
+
* support as of Stencil v4.
|
|
65
|
+
*/
|
|
66
|
+
const SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
67
|
+
const XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
68
|
+
/**
|
|
69
|
+
* Minimum delay, in milliseconds, before retrying a failed lazy component load.
|
|
70
|
+
*/
|
|
71
|
+
const LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
|
|
72
|
+
const FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
73
|
+
"formAssociatedCallback",
|
|
74
|
+
"formResetCallback",
|
|
75
|
+
"formDisabledCallback",
|
|
76
|
+
"formStateRestoreCallback"
|
|
77
|
+
];
|
|
78
|
+
//#endregion
|
|
10
79
|
//#region src/client/client-build.ts
|
|
11
80
|
const Build = {
|
|
12
|
-
isDev: BUILD.isDev,
|
|
13
81
|
isBrowser: true,
|
|
14
82
|
isServer: false,
|
|
83
|
+
isDev: BUILD.isDev,
|
|
15
84
|
isTesting: BUILD.isTesting
|
|
16
85
|
};
|
|
17
86
|
//#endregion
|
|
@@ -498,75 +567,6 @@ const modeResolver = [];
|
|
|
498
567
|
const setScopedSSR = (_opts) => {};
|
|
499
568
|
const needsScopedSSR = () => false;
|
|
500
569
|
//#endregion
|
|
501
|
-
//#region src/runtime/runtime-constants.ts
|
|
502
|
-
/**
|
|
503
|
-
* Bit flags for recording various properties of VDom nodes
|
|
504
|
-
*/
|
|
505
|
-
const VNODE_FLAGS = {
|
|
506
|
-
/**
|
|
507
|
-
* Whether or not a vdom node is a slot reference
|
|
508
|
-
*/
|
|
509
|
-
isSlotReference: 1,
|
|
510
|
-
/**
|
|
511
|
-
* Whether or not a slot element has fallback content
|
|
512
|
-
*/
|
|
513
|
-
isSlotFallback: 2,
|
|
514
|
-
/**
|
|
515
|
-
* Whether or not an element is a host element
|
|
516
|
-
*/
|
|
517
|
-
isHost: 4
|
|
518
|
-
};
|
|
519
|
-
const PROXY_FLAGS = {
|
|
520
|
-
isElementConstructor: 1,
|
|
521
|
-
proxyState: 2
|
|
522
|
-
};
|
|
523
|
-
const PLATFORM_FLAGS = {
|
|
524
|
-
/**
|
|
525
|
-
* designates a node in the DOM as being actively moved by the runtime
|
|
526
|
-
*/
|
|
527
|
-
isTmpDisconnected: 1,
|
|
528
|
-
appLoaded: 2,
|
|
529
|
-
queueSync: 4,
|
|
530
|
-
queueMask: 6
|
|
531
|
-
};
|
|
532
|
-
/**
|
|
533
|
-
* A (subset) of node types which are relevant for the Stencil runtime. These
|
|
534
|
-
* values are based on the values which can possibly be returned by the
|
|
535
|
-
* `.nodeType` property of a DOM node. See here for details:
|
|
536
|
-
*
|
|
537
|
-
* {@link https://dom.spec.whatwg.org/#ref-for-dom-node-nodetype%E2%91%A0}
|
|
538
|
-
*/
|
|
539
|
-
const NODE_TYPE = {
|
|
540
|
-
ElementNode: 1,
|
|
541
|
-
TextNode: 3,
|
|
542
|
-
CommentNode: 8,
|
|
543
|
-
DocumentNode: 9,
|
|
544
|
-
DocumentTypeNode: 10,
|
|
545
|
-
DocumentFragment: 11
|
|
546
|
-
};
|
|
547
|
-
const HYDRATE_ID = "s-id";
|
|
548
|
-
const HYDRATED_STYLE_ID = "sty-id";
|
|
549
|
-
const HYDRATE_CHILD_ID = "c-id";
|
|
550
|
-
const HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
551
|
-
/**
|
|
552
|
-
* Constant for styles to be globally applied to `slot-fb` elements for pseudo-slot behavior.
|
|
553
|
-
*
|
|
554
|
-
* Two cascading rules must be used instead of a `:not()` selector due to Stencil browser
|
|
555
|
-
* support as of Stencil v4.
|
|
556
|
-
*/
|
|
557
|
-
const SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
558
|
-
const XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
559
|
-
/**
|
|
560
|
-
* Minimum delay, in milliseconds, before retrying a failed lazy component load.
|
|
561
|
-
*/
|
|
562
|
-
const LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
|
|
563
|
-
const FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
564
|
-
"formAssociatedCallback",
|
|
565
|
-
"formResetCallback",
|
|
566
|
-
"formDisabledCallback",
|
|
567
|
-
"formStateRestoreCallback"
|
|
568
|
-
];
|
|
569
|
-
//#endregion
|
|
570
570
|
//#region src/client/client-window.ts
|
|
571
571
|
const win = typeof window !== "undefined" ? window : {};
|
|
572
572
|
const H = win.HTMLElement || class {};
|
|
@@ -3237,9 +3237,7 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
3237
3237
|
if (classData && !(BUILD.vdomSignals && isSignalLike(classData))) vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
|
|
3238
3238
|
}
|
|
3239
3239
|
}
|
|
3240
|
-
if (BUILD.isDev && vNodeChildren.some(isHost)) consoleDevError(`The <Host> must be the single root component
|
|
3241
|
-
- You are NOT using hostData() and <Host> in the same component.
|
|
3242
|
-
- <Host> is used once, and it's the single root component of the render() function.`);
|
|
3240
|
+
if (BUILD.isDev && vNodeChildren.some(isHost)) consoleDevError(`The <Host> must be used once, and be the single root component of the render() function.`);
|
|
3243
3241
|
if (BUILD.vdomFunctional && typeof nodeName === "function") return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
|
|
3244
3242
|
const vnode = newVNode(nodeName, null);
|
|
3245
3243
|
vnode.$attrs$ = vnodeData;
|