@stencil/core 5.0.0-alpha.16 → 5.0.0-alpha.17

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.
@@ -4301,27 +4301,50 @@ interface TranspileOptions {
4301
4301
  */
4302
4302
  additionalTagTransformers?: boolean;
4303
4303
  /**
4304
- * A map of virtual file paths to source text for modules that the component
4305
- * under transpilation extends from. When provided, `transpile()` builds a
4306
- * minimal multi-file TypeScript program from these sources so that
4307
- * {@link https://stenciljs.com/docs/component-lifecycle inheritance chains}
4308
- * can be resolved without requiring the parent files to exist on disk.
4309
- *
4310
- * Keys are the same import paths used in the component's `import` statements
4311
- * (relative paths are resolved against `currentDirectory`). Values are the
4312
- * TypeScript/JavaScript source text of that module.
4304
+ * Callback used to resolve parent-class source for inheritance-chain analysis.
4305
+ * Called when a component's `extends` clause references a class from another
4306
+ * module. Return the resolved absolute path and source text of that module,
4307
+ * or `null` to skip inheritance resolution for that specifier.
4313
4308
  *
4314
4309
  * @example
4315
4310
  * ```ts
4316
4311
  * transpile(myComponentCode, {
4317
- * extraFiles: {
4318
- * './base-component.ts': baseComponentSourceText,
4312
+ * resolveImport: (specifier, importer) => {
4313
+ * const resolved = require.resolve(specifier, { paths: [path.dirname(importer)] });
4314
+ * return { code: fs.readFileSync(resolved, 'utf8'), path: resolved };
4319
4315
  * },
4320
4316
  * });
4321
4317
  * ```
4322
4318
  */
4323
- extraFiles?: Record<string, string>;
4319
+ resolveImport?: (specifier: string, importer: string) => {
4320
+ code: string;
4321
+ path: string;
4322
+ } | null;
4323
+ /**
4324
+ * When `true` class declarations at the end of a `@Component` inheritance chain
4325
+ * * that have no `extends` clause * will get `extends HTMLElement` injected, and a minimal
4326
+ * `constructor() { super(); }`. Any stencil static meta-getters are also stripped.
4327
+ */
4328
+ transformAsBaseClass?: boolean;
4329
+ /**
4330
+ * Overrides for Stencil's BUILD feature flags in the generated output.
4331
+ * When set, a BUILD mutation statement is prepended to the compiled code so
4332
+ * that the specified flags take effect for this component at runtime.
4333
+ */
4334
+ buildOverrides?: BuildOverrides;
4324
4335
  }
4336
+ /**
4337
+ * Keys of {@link BuildConditionals} that can be meaningfully overridden at
4338
+ * transpile time — config-driven flags that are not derived from component
4339
+ * scanning or runtime environment detection.
4340
+ */
4341
+ type BuildOverrideKeys = 'hotModuleReplacement' | 'signalBacking' | 'vdomSignals' | 'lightDomPatches' | 'slotChildNodes' | 'slotCloneNode' | 'slotDomMutations' | 'slotTextContent' | 'lifecycleDOMEvents' | 'initializeNextTick';
4342
+ /**
4343
+ * Subset of Stencil's BUILD feature flags that can be overridden at transpile
4344
+ * time. Derived from {@link BuildConditionals} via `Pick` so the field list
4345
+ * and types stay in sync with the authoritative definition.
4346
+ */
4347
+ type BuildOverrides = Pick<BuildConditionals, BuildOverrideKeys>;
4325
4348
  type CompileTarget = 'latest' | 'esnext' | 'es2020' | 'es2019' | 'es2018' | 'es2017' | 'es2015' | string | undefined;
4326
4349
  interface TranspileResults {
4327
4350
  code: string;
@@ -4348,9 +4371,16 @@ interface TransformOptions {
4348
4371
  styleImportData: 'queryparams' | null;
4349
4372
  target?: string;
4350
4373
  /**
4351
- * @see {@link TranspileOptions.extraFiles}
4374
+ * @see {@link TranspileOptions.resolveImport}
4352
4375
  */
4353
- extraFiles?: Record<string, string>;
4376
+ resolveImport?: (specifier: string, importer: string) => {
4377
+ code: string;
4378
+ path: string;
4379
+ } | null;
4380
+ /** @see {@link TranspileOptions.transformAsBaseClass} */
4381
+ transformAsBaseClass?: boolean;
4382
+ /** @see {@link TranspileOptions.buildOverrides} */
4383
+ buildOverrides?: BuildOverrides;
4354
4384
  }
4355
4385
  interface CompileScriptMinifyOptions {
4356
4386
  target?: CompileTarget;
@@ -4371,4 +4401,4 @@ interface CliInitOptions {
4371
4401
  sys: CompilerSystem;
4372
4402
  }
4373
4403
  //#endregion
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, ConfigCompat, 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, LightDomPatches, 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, ValidatedOutputTargetWww, WatcherCloseResults, WorkerMainController, WorkerOptions };
4404
+ export { AutoprefixerOptions, BuildEmitEvents, BuildEvents, BuildLog, BuildNoChangeResults, BuildOnEventRemove, BuildOnEvents, BuildOutput, BuildOverrides, 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, ConfigCompat, 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, LightDomPatches, 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, ValidatedOutputTargetWww, WatcherCloseResults, WorkerMainController, WorkerOptions };
@@ -1,4 +1,4 @@
1
- import { Et as HostElement, cn as RuntimeRef, da as FunctionalComponent, fa as RafCallback, ga as VNode, ha as UserBuildConditionals, ma as TagTransformer, p as ChildType, pa as ResolutionHandler, ua as ErrorHandler } from "./index-vY35H18z.mjs";
1
+ import { Et as HostElement, _a as VNode, cn as RuntimeRef, da as ErrorHandler, fa as FunctionalComponent, ga as UserBuildConditionals, ha as TagTransformer, ma as ResolutionHandler, p as ChildType, pa as RafCallback } from "./index-F3IidHM1.mjs";
2
2
 
3
3
  //#region src/client/client-build.d.ts
4
4
  declare const Build: UserBuildConditionals;
@@ -4354,27 +4354,50 @@ interface TranspileOptions {
4354
4354
  */
4355
4355
  additionalTagTransformers?: boolean;
4356
4356
  /**
4357
- * A map of virtual file paths to source text for modules that the component
4358
- * under transpilation extends from. When provided, `transpile()` builds a
4359
- * minimal multi-file TypeScript program from these sources so that
4360
- * {@link https://stenciljs.com/docs/component-lifecycle inheritance chains}
4361
- * can be resolved without requiring the parent files to exist on disk.
4362
- *
4363
- * Keys are the same import paths used in the component's `import` statements
4364
- * (relative paths are resolved against `currentDirectory`). Values are the
4365
- * TypeScript/JavaScript source text of that module.
4357
+ * Callback used to resolve parent-class source for inheritance-chain analysis.
4358
+ * Called when a component's `extends` clause references a class from another
4359
+ * module. Return the resolved absolute path and source text of that module,
4360
+ * or `null` to skip inheritance resolution for that specifier.
4366
4361
  *
4367
4362
  * @example
4368
4363
  * ```ts
4369
4364
  * transpile(myComponentCode, {
4370
- * extraFiles: {
4371
- * './base-component.ts': baseComponentSourceText,
4365
+ * resolveImport: (specifier, importer) => {
4366
+ * const resolved = require.resolve(specifier, { paths: [path.dirname(importer)] });
4367
+ * return { code: fs.readFileSync(resolved, 'utf8'), path: resolved };
4372
4368
  * },
4373
4369
  * });
4374
4370
  * ```
4375
4371
  */
4376
- extraFiles?: Record<string, string>;
4372
+ resolveImport?: (specifier: string, importer: string) => {
4373
+ code: string;
4374
+ path: string;
4375
+ } | null;
4376
+ /**
4377
+ * When `true` class declarations at the end of a `@Component` inheritance chain
4378
+ * * that have no `extends` clause * will get `extends HTMLElement` injected, and a minimal
4379
+ * `constructor() { super(); }`. Any stencil static meta-getters are also stripped.
4380
+ */
4381
+ transformAsBaseClass?: boolean;
4382
+ /**
4383
+ * Overrides for Stencil's BUILD feature flags in the generated output.
4384
+ * When set, a BUILD mutation statement is prepended to the compiled code so
4385
+ * that the specified flags take effect for this component at runtime.
4386
+ */
4387
+ buildOverrides?: BuildOverrides;
4377
4388
  }
4389
+ /**
4390
+ * Keys of {@link BuildConditionals} that can be meaningfully overridden at
4391
+ * transpile time — config-driven flags that are not derived from component
4392
+ * scanning or runtime environment detection.
4393
+ */
4394
+ type BuildOverrideKeys = 'hotModuleReplacement' | 'signalBacking' | 'vdomSignals' | 'lightDomPatches' | 'slotChildNodes' | 'slotCloneNode' | 'slotDomMutations' | 'slotTextContent' | 'lifecycleDOMEvents' | 'initializeNextTick';
4395
+ /**
4396
+ * Subset of Stencil's BUILD feature flags that can be overridden at transpile
4397
+ * time. Derived from {@link BuildConditionals} via `Pick` so the field list
4398
+ * and types stay in sync with the authoritative definition.
4399
+ */
4400
+ type BuildOverrides = Pick<BuildConditionals, BuildOverrideKeys>;
4378
4401
  type CompileTarget = 'latest' | 'esnext' | 'es2020' | 'es2019' | 'es2018' | 'es2017' | 'es2015' | string | undefined;
4379
4402
  interface TranspileResults {
4380
4403
  code: string;
@@ -4401,9 +4424,16 @@ interface TransformOptions {
4401
4424
  styleImportData: 'queryparams' | null;
4402
4425
  target?: string;
4403
4426
  /**
4404
- * @see {@link TranspileOptions.extraFiles}
4427
+ * @see {@link TranspileOptions.resolveImport}
4405
4428
  */
4406
- extraFiles?: Record<string, string>;
4429
+ resolveImport?: (specifier: string, importer: string) => {
4430
+ code: string;
4431
+ path: string;
4432
+ } | null;
4433
+ /** @see {@link TranspileOptions.transformAsBaseClass} */
4434
+ transformAsBaseClass?: boolean;
4435
+ /** @see {@link TranspileOptions.buildOverrides} */
4436
+ buildOverrides?: BuildOverrides;
4407
4437
  }
4408
4438
  interface CompileScriptMinifyOptions {
4409
4439
  target?: CompileTarget;
@@ -6522,4 +6552,4 @@ interface ValidateTypesResults {
6522
6552
  filePaths: string[];
6523
6553
  }
6524
6554
  //#endregion
6525
- export { ComponentCompilerVirtualProperty as $, getInlineSourceMappingUrlLinker as $a, SystemDetails as $i, CompilerBuildStart as $n, loadTypeScriptDiagnostic as $o, LogLevel as $r, SSR_WASM as $s, PropsType as $t, CompilerStyleDoc as A, JsonDocsTag as Aa, PageReloadStrategy as Ai, TypesMemberNameData as An, isOutputTargetGlobalStyle as Ao, ConfigBundle as Ar, CMP_FLAGS as As, JsDoc as At, ComponentCompilerMeta as B, createJsVarName as Ba, ResolveModuleOptions as Bi, BuildEvents as Bn, shouldExcludeComponent as Bo, Diagnostic$1 as Br, DOCS_JSON as Bs, OptimizeJsResult as Bt, CompilerBuildStatBundle as C, JsonDocsListener as Ca, OutputTargetLoaderBundle as Ci, StyleCompiler as Cn, isOutputTargetDistLazy as Co, CompilerSystemRemoveDirectoryResults as Cr, toDashCase as Cs, EntryModule as Ct, CompilerJsDoc as D, JsonDocsProp as Da, OutputTargetStats as Di, TranspileModuleResults as Dn, isOutputTargetDocsJson as Do, CompilerSystemWriteFileResults as Dr, formatLazyBundleRuntimeMeta as Ds, HostRef as Dt, CompilerCtx as E, JsonDocsPart as Ea, OutputTargetStandalone as Ei, TransformCssToEsmOutput as En, isOutputTargetDocsCustomElementsManifest as Eo, CompilerSystemRenamedPath as Er, formatComponentRuntimeMeta as Es, HostElement as Et, ComponentCompilerData as F, FsWriteResults as Fa, PrerenderOptions as Fi, Workbox as Fn, isOutputTargetStats as Fo, CustomElementsExportBehavior as Fr, CUSTOM as Fs, ModuleMap as Ft, ComponentCompilerPropertyType as G, isJsFile as Ga, ServiceWorkerConfig as Gi, BuildOutput as Gn, catchError as Go, HydrateDocumentOptions as Gr, GLOBAL_STYLE as Gs, Plugin as Gt, ComponentCompilerMethodComplexType as H, getTextDocs as Ha, RobotsTxtResults as Hi, BuildNoChangeResults as Hn, buildError as Ho, HistoryApiFallback as Hr, DOCS_VSCODE as Hs, ParsedImport as Ht, ComponentCompilerEvent as I, InMemoryFileSystem as Ia, PrerenderResults as Ii, WorkerContextMethod as In, isOutputTargetTypes as Io, CustomElementsExportBehaviorOptions as Ir, DEFAULT_STYLE_MODE as Is, MsgFromWorker as It, ComponentCompilerStaticEvent as J, isTsxFile as Ja, SsrDocumentOptions as Ji, CliInitOptions as Jn, shouldIgnoreError as Jo, LOG_LEVELS as Jr, LISTENER_FLAGS as Js, PluginTransformationDescriptor as Jt, ComponentCompilerReferencedType as K, isJsxFile as Ka, SitemapXmpOpts as Ki, BuildResultsComponentGraph as Kn, hasError as Ko, HydrateFactoryOptions as Kr, HOST_FLAGS as Ks, PluginCtx as Kt, ComponentCompilerEventComplexType as L, validateComponentTag as La, PrerenderStartOptions as Li, WorkerMsgHandler as Ln, isOutputTargetWww as Lo, DevServer as Lr, DIST_LAZY as Ls, MsgToWorker as Lt, CompilerWorkerTask as M, JsonDocsUsage as Ma, PlatformPath as Mi, UpdatedLazyBuildCtx as Mn, isOutputTargetSsr as Mo, CopyResults as Mr, COLLECTION_APP_DATA_FILE_NAME as Ms, LazyBundlesRuntimeData as Mt, ComponentCompilerChangeHandler as N, JsonDocsValue as Na, PrerenderConfig as Ni, VNodeProdData as Nn, isOutputTargetSsrWasm as No, CopyTask as Nr, COLLECTION_MANIFEST_FILE_NAME as Ns, Module as Nt, CompilerJsDocTagInfo as O, JsonDocsSlot as Oa, OutputTargetTypes as Oi, TypeInfo as On, isOutputTargetDocsReadme as Oo, CompilerWatcher as Or, stringifyRuntimeData as Os, ImportData as Ot, ComponentCompilerCustomState as P, StyleDoc as Pa, PrerenderHydrateOptions as Pi, ValidateTypesResults as Pn, isOutputTargetStandalone as Po, Credentials as Pr, COPY as Ps, ModuleFormat as Pt, ComponentCompilerTypeReferences as Q, isRemoteUrl as Qa, StencilDocsConfig as Qi, CompilerBuildResults as Qn, augmentDiagnosticWithNode as Qo, LoadConfigResults as Qr, SSR as Qs, PrintLine as Qt, ComponentCompilerFeatures as R, ParsePackageJsonResult as Ra, ResolveModuleIdOptions as Ri, AutoprefixerOptions as Rn, isValidConfigOutputTarget as Ro, DevServerConfig as Rr, DOCS_CUSTOM as Rs, NewSpecPageOptions as Rt, CompilerAssetDir as S, JsonDocsEvent as Sa, OutputTargetGlobalStyle as Si, StencilDocument as Sn, isOutputTargetCustom as So, CompilerSystemRemoveDirectoryOptions as Sr, toCamelCase as Ss, Encapsulation as St, CompilerBuildStats as T, JsonDocsMethodReturn as Ta, OutputTargetSsrWasm as Ti, TransformCssToEsmInput as Tn, isOutputTargetDocsCustom as To, CompilerSystemRenameResults as Tr, unique as Ts, ExternalStyleCompiler as Tt, ComponentCompilerProperty as U, hasDependency as Ua, RolldownConfig as Ui, BuildOnEventRemove as Un, buildJsonFileError as Uo, HmrStyleUpdate as Ur, EVENT_FLAGS as Us, PatchedSlotNode as Ut, ComponentCompilerMethod as V, generatePreamble as Va, RobotsTxtOpts as Vi, BuildLog as Vn, TASK_CANCELED_MSG as Vo, FsWatchResults as Vr, DOCS_README as Vs, PackageJsonData as Vt, ComponentCompilerPropertyComplexType as W, isDtsFile as Wa, SerializeDocumentOptions as Wi, BuildOnEvents as Wn, buildWarn as Wo, HotModuleReplacement as Wr, GENERATED_DTS as Ws, PlatformRuntime as Wt, ComponentCompilerStaticProperty as X, readOnlyArrayHasStringMember as Xa, StencilConfig as Xi, CompileTarget as Xn, normalizeDiagnostics as Xo, LightDomPatches as Xr, MEMBER_FLAGS as Xs, PrerenderUrlRequest as Xt, ComponentCompilerStaticMethod as Y, parsePackageJson as Ya, SsrFactoryOptions as Yi, CompileScriptMinifyOptions as Yn, escapeHtml as Yo, LazyRequire as Yr, LOADER_BUNDLE as Ys, PrerenderManager as Yt, ComponentCompilerTypeReference as Z, readPackageJson as Za, StencilDevServerConfig as Zi, Compiler as Zn, splitLineBreaks as Zo, LoadConfigInit as Zr, NODE_TYPES as Zs, PrerenderUrlResults as Zt, CollectionCompilerVersion as _, JsonDocMethodParameter as _a, OutputTargetDocsCustom as _i, SsrImgElement as _n, getComponentsDtsTypesFilePath as _o, CompilerRequestResponse as _r, isString as _s, ComponentTestingConstructor as _t, BuildCtx as a, ValidatedConfig as aa, VALID_CONFIG_OUTPUT_TARGETS as ac, OptimizeCssOutput as ai, RolldownResults as an, queryNonceMetaTagContent as ao, CompilerEventDirAdd as ar, isGlob as as, ComponentConstructorProperties as at, CollectionDependencyManifest as b, JsonDocsCustomState as ba, OutputTargetDocsReadme as bi, SsrStaticData as bn, isOutputTargetCollection as bo, CompilerSystemCreateDirectoryResults as br, pluck as bs, CssTransformCacheEntry as bt, BuildStyleUpdate as c, WorkerMainController as ca, XLINK_NS as cc, OutputTarget as ci, RuntimeRef as cn, normalizeFsPath as co, CompilerEventFileDelete as cr, flatOne as cs, ComponentGlobalStyle as ct, BundleModuleOutput as d, FunctionalComponent as da, OutputTargetBaseNext as di, SourceMap$1 as dn, relative as do, CompilerEventName as dr, isComplexType as ds, ComponentRuntimeHostListener as dt, TransformOptions as ea, STANDALONE as ec, Logger as ei, RenderNode as en, getSourceMappingUrlForEndOfFile as eo, CompilerDependency as er, loadTypeScriptDiagnostics as es, ComponentConstructor as et, Cache as f, RafCallback as fa, OutputTargetBuild as fi, SourceTarget as fn, resolve as fo, CompilerFileWatcher as fr, isDef as fs, ComponentRuntimeMember as ft, CollectionCompilerMeta as g, VNode as ga, OutputTargetDistLazy as gi, SsrElement as gn, getComponentsDtsSrcFilePath as go, CompilerRequest as gr, isObject as gs, ComponentRuntimeReflectingAttr as gt, CollectionCompiler as h, UserBuildConditionals as ha, OutputTargetCustom as hi, SsrComponent as hn, filterExcludedComponents as ho, CompilerFsStats as hr, isNumber as hs, ComponentRuntimeMetaCompact as ht, BuildConditionals as i, UnvalidatedConfig as ia, TYPES as ic, OptimizeCssInput as ii, RolldownResultModule as in, escapeRegExpSpecialCharacters as io, CompilerEventBuildStart as ir, isRootPath as is, ComponentConstructorListener as it, CompilerWorkerContext as j, JsonDocsTypeLibrary as ja, ParsedPath as ji, TypesModule as jn, isOutputTargetLoaderBundle as jo, ConfigCompat as jr, COLLECTION as js, LazyBundleRuntimeData as jt, CompilerModeStyles as k, JsonDocsStyle as ka, OutputTargetWww as ki, TypesImportData as kn, isOutputTargetDocsVscode as ko, Config as kr, ASSETS as ks, JSDocTagInfo as kt, BuildTask as l, WorkerOptions as la, byteSize as lc, OutputTargetAssets as li, SerializeImportData as ln, normalizeFsPathQuery as lo, CompilerEventFileUpdate as lr, fromEntries as ls, ComponentNativeConstructor as lt, CollectionBundleManifest as m, TagTransformer as ma, OutputTargetCopy as mi, SsrAnchorElement as mn, filterActiveTargets as mo, CompilerFileWatcherEvent as mr, isIterable as ms, ComponentRuntimeMeta as mt, AssetsMeta as n, TranspileOptions as na, STYLE_EXT as nc, LoggerTimeSpan as ni, RolldownChunkResult as nn, rolldownToStencilSourceMap as no, CompilerEventBuildLog as nr, isRolldownError as ns, ComponentConstructorEncapsulation as nt, BuildFeatures as o, ValidatedOutputTargetWww as oa, WATCH_FLAGS as oc, OptimizeJsInput as oi, RolldownSourceMap as on, join as oo, CompilerEventDirDelete as or, dashToPascalCase as os, ComponentConstructorProperty as ot, ChildType as p, ResolutionHandler as pa, OutputTargetCollection as pi, SpecPage as pn, FilterComponentsResult as po, CompilerFileWatcherCallback as pr, isFunction as ps, ComponentRuntimeMembers as pt, ComponentCompilerState as q, isTsFile as qa, SitemapXmpResults as qi, CacheStorage as qn, hasWarning as qo, HydratedFlag as qr, HTML_NS as qs, PluginTransformResults as qt, BuildComponent as r, TranspileResults as ra, SVG_NS as rc, NodeResolveConfig as ri, RolldownResult as rn, result_d_exports as ro, CompilerEventBuildNoChange as rr, loadRolldownDiagnostics as rs, ComponentConstructorEvent as rt, BuildSourceGraph as s, WatcherCloseResults as sa, WWW as sc, OptimizeJsOutput as si, RootAppliedStyleMap as sn, normalize as so, CompilerEventFileAdd as sr, escapeWithPattern as ss, ComponentConstructorPropertyType as st, AnyHTMLElement as t, TranspileOnlyResults as ta, STATS as tc, LoggerLineUpdater as ti, RolldownAssetResult as tn, getSourceMappingUrlLinker as to, CompilerEventBuildFinish as tr, createOnWarnFn as ts, ComponentConstructorChangeHandlers as tt, BundleModule as u, ErrorHandler as ua, OutputTargetBase as ui, SerializedEvent as un, normalizePath as uo, CompilerEventFsChange as ur, isBoolean as us, ComponentPatches as ut, CollectionComponentEntryPath as v, JsonDocs as va, OutputTargetDocsCustomElementsManifest as vi, SsrResults as vn, getComponentsFromModules as vo, CompilerSystem as vr, mergeIntoWith as vs, CssImportData as vt, CompilerBuildStatCollection as w, JsonDocsMethod as wa, OutputTargetSsr as wi, StyleMap as wn, isOutputTargetDocs as wo, CompilerSystemRemoveFileResults as wr, toTitleCase as ws, EventInitDict as wt, CollectionManifest as x, JsonDocsDependencyGraph as xa, OutputTargetDocsVscode as xi, SsrStyleElement as xn, isOutputTargetCopy as xo, CompilerSystemRealpathResults as xr, sortBy as xs, DocData as xt, CollectionDependencyData as y, JsonDocsComponent as ya, OutputTargetDocsJson as yi, SsrScriptElement as yn, isOutputTargetAssets as yo, CompilerSystemCreateDirectoryOptions as yr, noop as ys, CssToEsmImportData as yt, ComponentCompilerListener as z, addDocBlock as za, ResolveModuleIdResults as zi, BuildEmitEvents as zn, relativeImport as zo, DevServerEditor as zr, DOCS_CUSTOM_ELEMENTS_MANIFEST as zs, NodeMap as zt };
6555
+ export { ComponentCompilerVirtualProperty as $, isRemoteUrl as $a, StencilDocsConfig as $i, CompilerBuildResults as $n, augmentDiagnosticWithNode as $o, LoadConfigResults as $r, SSR as $s, PropsType as $t, CompilerStyleDoc as A, JsonDocsStyle as Aa, OutputTargetWww as Ai, TypesMemberNameData as An, isOutputTargetDocsVscode as Ao, Config as Ar, ASSETS as As, JsDoc as At, ComponentCompilerMeta as B, addDocBlock as Ba, ResolveModuleIdResults as Bi, BuildEvents as Bn, relativeImport as Bo, DevServerEditor as Br, DOCS_CUSTOM_ELEMENTS_MANIFEST as Bs, OptimizeJsResult as Bt, CompilerBuildStatBundle as C, JsonDocsEvent as Ca, OutputTargetGlobalStyle as Ci, StyleCompiler as Cn, isOutputTargetCustom as Co, CompilerSystemRemoveDirectoryOptions as Cr, toCamelCase as Cs, EntryModule as Ct, CompilerJsDoc as D, JsonDocsPart as Da, OutputTargetStandalone as Di, TranspileModuleResults as Dn, isOutputTargetDocsCustomElementsManifest as Do, CompilerSystemRenamedPath as Dr, formatComponentRuntimeMeta as Ds, HostRef as Dt, CompilerCtx as E, JsonDocsMethodReturn as Ea, OutputTargetSsrWasm as Ei, TransformCssToEsmOutput as En, isOutputTargetDocsCustom as Eo, CompilerSystemRenameResults as Er, unique as Es, HostElement as Et, ComponentCompilerData as F, StyleDoc as Fa, PrerenderHydrateOptions as Fi, Workbox as Fn, isOutputTargetStandalone as Fo, Credentials as Fr, COPY as Fs, ModuleMap as Ft, ComponentCompilerPropertyType as G, isDtsFile as Ga, SerializeDocumentOptions as Gi, BuildOutput as Gn, buildWarn as Go, HotModuleReplacement as Gr, GENERATED_DTS as Gs, Plugin as Gt, ComponentCompilerMethodComplexType as H, generatePreamble as Ha, RobotsTxtOpts as Hi, BuildNoChangeResults as Hn, TASK_CANCELED_MSG as Ho, FsWatchResults as Hr, DOCS_README as Hs, ParsedImport as Ht, ComponentCompilerEvent as I, FsWriteResults as Ia, PrerenderOptions as Ii, WorkerContextMethod as In, isOutputTargetStats as Io, CustomElementsExportBehavior as Ir, CUSTOM as Is, MsgFromWorker as It, ComponentCompilerStaticEvent as J, isTsFile as Ja, SitemapXmpResults as Ji, CacheStorage as Jn, hasWarning as Jo, HydratedFlag as Jr, HTML_NS as Js, PluginTransformationDescriptor as Jt, ComponentCompilerReferencedType as K, isJsFile as Ka, ServiceWorkerConfig as Ki, BuildOverrides as Kn, catchError as Ko, HydrateDocumentOptions as Kr, GLOBAL_STYLE as Ks, PluginCtx as Kt, ComponentCompilerEventComplexType as L, InMemoryFileSystem as La, PrerenderResults as Li, WorkerMsgHandler as Ln, isOutputTargetTypes as Lo, CustomElementsExportBehaviorOptions as Lr, DEFAULT_STYLE_MODE as Ls, MsgToWorker as Lt, CompilerWorkerTask as M, JsonDocsTypeLibrary as Ma, ParsedPath as Mi, UpdatedLazyBuildCtx as Mn, isOutputTargetLoaderBundle as Mo, ConfigCompat as Mr, COLLECTION as Ms, LazyBundlesRuntimeData as Mt, ComponentCompilerChangeHandler as N, JsonDocsUsage as Na, PlatformPath as Ni, VNodeProdData as Nn, isOutputTargetSsr as No, CopyResults as Nr, COLLECTION_APP_DATA_FILE_NAME as Ns, Module as Nt, CompilerJsDocTagInfo as O, JsonDocsProp as Oa, OutputTargetStats as Oi, TypeInfo as On, isOutputTargetDocsJson as Oo, CompilerSystemWriteFileResults as Or, formatLazyBundleRuntimeMeta as Os, ImportData as Ot, ComponentCompilerCustomState as P, JsonDocsValue as Pa, PrerenderConfig as Pi, ValidateTypesResults as Pn, isOutputTargetSsrWasm as Po, CopyTask as Pr, COLLECTION_MANIFEST_FILE_NAME as Ps, ModuleFormat as Pt, ComponentCompilerTypeReferences as Q, readPackageJson as Qa, StencilDevServerConfig as Qi, Compiler as Qn, splitLineBreaks as Qo, LoadConfigInit as Qr, NODE_TYPES as Qs, PrintLine as Qt, ComponentCompilerFeatures as R, validateComponentTag as Ra, PrerenderStartOptions as Ri, AutoprefixerOptions as Rn, isOutputTargetWww as Ro, DevServer as Rr, DIST_LAZY as Rs, NewSpecPageOptions as Rt, CompilerAssetDir as S, JsonDocsDependencyGraph as Sa, OutputTargetDocsVscode as Si, StencilDocument as Sn, isOutputTargetCopy as So, CompilerSystemRealpathResults as Sr, sortBy as Ss, Encapsulation as St, CompilerBuildStats as T, JsonDocsMethod as Ta, OutputTargetSsr as Ti, TransformCssToEsmInput as Tn, isOutputTargetDocs as To, CompilerSystemRemoveFileResults as Tr, toTitleCase as Ts, ExternalStyleCompiler as Tt, ComponentCompilerProperty as U, getTextDocs as Ua, RobotsTxtResults as Ui, BuildOnEventRemove as Un, buildError as Uo, HistoryApiFallback as Ur, DOCS_VSCODE as Us, PatchedSlotNode as Ut, ComponentCompilerMethod as V, createJsVarName as Va, ResolveModuleOptions as Vi, BuildLog as Vn, shouldExcludeComponent as Vo, Diagnostic$1 as Vr, DOCS_JSON as Vs, PackageJsonData as Vt, ComponentCompilerPropertyComplexType as W, hasDependency as Wa, RolldownConfig as Wi, BuildOnEvents as Wn, buildJsonFileError as Wo, HmrStyleUpdate as Wr, EVENT_FLAGS as Ws, PlatformRuntime as Wt, ComponentCompilerStaticProperty as X, parsePackageJson as Xa, SsrFactoryOptions as Xi, CompileScriptMinifyOptions as Xn, escapeHtml as Xo, LazyRequire as Xr, LOADER_BUNDLE as Xs, PrerenderUrlRequest as Xt, ComponentCompilerStaticMethod as Y, isTsxFile as Ya, SsrDocumentOptions as Yi, CliInitOptions as Yn, shouldIgnoreError as Yo, LOG_LEVELS as Yr, LISTENER_FLAGS as Ys, PrerenderManager as Yt, ComponentCompilerTypeReference as Z, readOnlyArrayHasStringMember as Za, StencilConfig as Zi, CompileTarget as Zn, normalizeDiagnostics as Zo, LightDomPatches as Zr, MEMBER_FLAGS as Zs, PrerenderUrlResults as Zt, CollectionCompilerVersion as _, VNode as _a, OutputTargetDistLazy as _i, SsrImgElement as _n, getComponentsDtsSrcFilePath as _o, CompilerRequest as _r, isObject as _s, ComponentTestingConstructor as _t, BuildCtx as a, UnvalidatedConfig as aa, TYPES as ac, OptimizeCssInput as ai, RolldownResults as an, escapeRegExpSpecialCharacters as ao, CompilerEventBuildStart as ar, isRootPath as as, ComponentConstructorProperties as at, CollectionDependencyManifest as b, JsonDocsComponent as ba, OutputTargetDocsJson as bi, SsrStaticData as bn, isOutputTargetAssets as bo, CompilerSystemCreateDirectoryOptions as br, noop as bs, CssTransformCacheEntry as bt, BuildStyleUpdate as c, WatcherCloseResults as ca, WWW as cc, OptimizeJsOutput as ci, RuntimeRef as cn, normalize as co, CompilerEventFileAdd as cr, escapeWithPattern as cs, ComponentGlobalStyle as ct, BundleModuleOutput as d, ErrorHandler as da, OutputTargetBase as di, SourceMap$1 as dn, normalizePath as do, CompilerEventFsChange as dr, isBoolean as ds, ComponentRuntimeHostListener as dt, SystemDetails as ea, SSR_WASM as ec, LogLevel as ei, RenderNode as en, getInlineSourceMappingUrlLinker as eo, CompilerBuildStart as er, loadTypeScriptDiagnostic as es, ComponentConstructor as et, Cache as f, FunctionalComponent as fa, OutputTargetBaseNext as fi, SourceTarget as fn, relative as fo, CompilerEventName as fr, isComplexType as fs, ComponentRuntimeMember as ft, CollectionCompilerMeta as g, UserBuildConditionals as ga, OutputTargetCustom as gi, SsrElement as gn, filterExcludedComponents as go, CompilerFsStats as gr, isNumber as gs, ComponentRuntimeReflectingAttr as gt, CollectionCompiler as h, TagTransformer as ha, OutputTargetCopy as hi, SsrComponent as hn, filterActiveTargets as ho, CompilerFileWatcherEvent as hr, isIterable as hs, ComponentRuntimeMetaCompact as ht, BuildConditionals as i, TranspileResults as ia, SVG_NS as ic, NodeResolveConfig as ii, RolldownResultModule as in, result_d_exports as io, CompilerEventBuildNoChange as ir, loadRolldownDiagnostics as is, ComponentConstructorListener as it, CompilerWorkerContext as j, JsonDocsTag as ja, PageReloadStrategy as ji, TypesModule as jn, isOutputTargetGlobalStyle as jo, ConfigBundle as jr, CMP_FLAGS as js, LazyBundleRuntimeData as jt, CompilerModeStyles as k, JsonDocsSlot as ka, OutputTargetTypes as ki, TypesImportData as kn, isOutputTargetDocsReadme as ko, CompilerWatcher as kr, stringifyRuntimeData as ks, JSDocTagInfo as kt, BuildTask as l, WorkerMainController as la, XLINK_NS as lc, OutputTarget as li, SerializeImportData as ln, normalizeFsPath as lo, CompilerEventFileDelete as lr, flatOne as ls, ComponentNativeConstructor as lt, CollectionBundleManifest as m, ResolutionHandler as ma, OutputTargetCollection as mi, SsrAnchorElement as mn, FilterComponentsResult as mo, CompilerFileWatcherCallback as mr, isFunction as ms, ComponentRuntimeMeta as mt, AssetsMeta as n, TranspileOnlyResults as na, STATS as nc, LoggerLineUpdater as ni, RolldownChunkResult as nn, getSourceMappingUrlLinker as no, CompilerEventBuildFinish as nr, createOnWarnFn as ns, ComponentConstructorEncapsulation as nt, BuildFeatures as o, ValidatedConfig as oa, VALID_CONFIG_OUTPUT_TARGETS as oc, OptimizeCssOutput as oi, RolldownSourceMap as on, queryNonceMetaTagContent as oo, CompilerEventDirAdd as or, isGlob as os, ComponentConstructorProperty as ot, ChildType as p, RafCallback as pa, OutputTargetBuild as pi, SpecPage as pn, resolve as po, CompilerFileWatcher as pr, isDef as ps, ComponentRuntimeMembers as pt, ComponentCompilerState as q, isJsxFile as qa, SitemapXmpOpts as qi, BuildResultsComponentGraph as qn, hasError as qo, HydrateFactoryOptions as qr, HOST_FLAGS as qs, PluginTransformResults as qt, BuildComponent as r, TranspileOptions as ra, STYLE_EXT as rc, LoggerTimeSpan as ri, RolldownResult as rn, rolldownToStencilSourceMap as ro, CompilerEventBuildLog as rr, isRolldownError as rs, ComponentConstructorEvent as rt, BuildSourceGraph as s, ValidatedOutputTargetWww as sa, WATCH_FLAGS as sc, OptimizeJsInput as si, RootAppliedStyleMap as sn, join as so, CompilerEventDirDelete as sr, dashToPascalCase as ss, ComponentConstructorPropertyType as st, AnyHTMLElement as t, TransformOptions as ta, STANDALONE as tc, Logger as ti, RolldownAssetResult as tn, getSourceMappingUrlForEndOfFile as to, CompilerDependency as tr, loadTypeScriptDiagnostics as ts, ComponentConstructorChangeHandlers as tt, BundleModule as u, WorkerOptions as ua, byteSize as uc, OutputTargetAssets as ui, SerializedEvent as un, normalizeFsPathQuery as uo, CompilerEventFileUpdate as ur, fromEntries as us, ComponentPatches as ut, CollectionComponentEntryPath as v, JsonDocMethodParameter as va, OutputTargetDocsCustom as vi, SsrResults as vn, getComponentsDtsTypesFilePath as vo, CompilerRequestResponse as vr, isString as vs, CssImportData as vt, CompilerBuildStatCollection as w, JsonDocsListener as wa, OutputTargetLoaderBundle as wi, StyleMap as wn, isOutputTargetDistLazy as wo, CompilerSystemRemoveDirectoryResults as wr, toDashCase as ws, EventInitDict as wt, CollectionManifest as x, JsonDocsCustomState as xa, OutputTargetDocsReadme as xi, SsrStyleElement as xn, isOutputTargetCollection as xo, CompilerSystemCreateDirectoryResults as xr, pluck as xs, DocData as xt, CollectionDependencyData as y, JsonDocs as ya, OutputTargetDocsCustomElementsManifest as yi, SsrScriptElement as yn, getComponentsFromModules as yo, CompilerSystem as yr, mergeIntoWith as ys, CssToEsmImportData as yt, ComponentCompilerListener as z, ParsePackageJsonResult as za, ResolveModuleIdOptions as zi, BuildEmitEvents as zn, isValidConfigOutputTarget as zo, DevServerConfig as zr, DOCS_CUSTOM as zs, NodeMap as zt };
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { B as Event, C as setAssetPath, E as setPlatformHelpers, G as State, H as Method, I as AttachInternals, J as Build, K as Watch, L as AttrDeserialize, N as setErrorHandler, R as Component, S as getAssetPath, T as writeTask, U as Prop, V as Listen, W as PropSerialize, a as transformTag, b as getElement, c as Fragment, d as setMode, g as getRenderingRef, h as forceUpdate, i as setTagTransformer, m as h, o as render, p as Host, q as resolveVar, s as Mixin, u as getMode, w as readTask, x as getShadowRoot, z as Element } from "./client-DI9mAOBd.mjs";
1
+ import { B as Event, C as setAssetPath, E as setPlatformHelpers, G as State, H as Method, I as AttachInternals, J as Build, K as Watch, L as AttrDeserialize, N as setErrorHandler, R as Component, S as getAssetPath, T as writeTask, U as Prop, V as Listen, W as PropSerialize, a as transformTag, b as getElement, c as Fragment, d as setMode, g as getRenderingRef, h as forceUpdate, i as setTagTransformer, m as h, o as render, p as Host, q as resolveVar, s as Mixin, u as getMode, w as readTask, x as getShadowRoot, z as Element } from "./client-CgXNkftm.mjs";
2
2
  export { AttachInternals, AttrDeserialize, Build, Component, Element, Event, Fragment, Host, Listen, Method, Mixin, Prop, PropSerialize, State, Watch, forceUpdate, getAssetPath, getElement, getMode, getRenderingRef, getShadowRoot, h, readTask, render, resolveVar, setAssetPath, setErrorHandler, setMode, setPlatformHelpers, setTagTransformer, transformTag, writeTask };
@@ -1,2 +1,2 @@
1
- import { c as Fragment, n as jsxDEV, r as jsxs, t as jsx } from "./client-DI9mAOBd.mjs";
1
+ import { c as Fragment, n as jsxDEV, r as jsxs, t as jsx } from "./client-CgXNkftm.mjs";
2
2
  export { Fragment, jsx, jsxDEV, jsxs };
@@ -1,5 +1,5 @@
1
1
  import { n as __require } from "./chunk-z9aeyW2b.mjs";
2
- import "./client-DI9mAOBd.mjs";
2
+ import "./client-CgXNkftm.mjs";
3
3
  import { h as noop, i as flatOne, l as isFunction, p as isString } from "./regular-expression-CFVJOTUh.mjs";
4
4
  import { St as isGlob, _t as catchError, bt as shouldIgnoreError, it as normalizePath, mt as buildError, pt as TASK_CANCELED_MSG } from "./validation-ByxKj8bC.mjs";
5
5
  import fs from "node:fs";
@@ -1603,7 +1603,12 @@ const hydrateScopedToShadow = () => {
1603
1603
  if (!win.document) return;
1604
1604
  const styleElements = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
1605
1605
  let i = 0;
1606
- for (; i < styleElements.length; i++) registerStyle(styleElements[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styleElements[i].innerHTML), true);
1606
+ for (; i < styleElements.length; i++) {
1607
+ const scopeId = styleElements[i].getAttribute(HYDRATED_STYLE_ID);
1608
+ const existing = styles.get(scopeId);
1609
+ const allowCS = existing !== void 0 ? existing instanceof CSSStyleSheet : true;
1610
+ registerStyle(scopeId, convertScopedToShadow(styleElements[i].innerHTML), allowCS);
1611
+ }
1607
1612
  };
1608
1613
  //#endregion
1609
1614
  //#region src/utils/helpers.ts
@@ -4519,7 +4524,6 @@ const hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
4519
4524
  };
4520
4525
  const hmrStandalone = async (hostElement, cmpMeta, hmrVersionId) => {
4521
4526
  const modulePath = hostElement.constructor.__stencil_module__;
4522
- console.log(`[Stencil HMR] hmrStandalone <${cmpMeta.$tagName$}> modulePath:`, modulePath);
4523
4527
  if (!modulePath) {
4524
4528
  console.warn(`[Stencil HMR] No __stencil_module__ on <${cmpMeta.$tagName$}> constructor - was this built with devMode?`);
4525
4529
  return;
@@ -4532,9 +4536,17 @@ const hmrStandalone = async (hostElement, cmpMeta, hmrVersionId) => {
4532
4536
  const NewClass = Object.values(newModule).find((v) => typeof v === "function" && v.is === cmpMeta.$tagName$) ?? newModule.default;
4533
4537
  if (!NewClass) return;
4534
4538
  const ctor = customElements.get(cmpMeta.$tagName$);
4535
- if (ctor) for (const key of Object.getOwnPropertyNames(NewClass.prototype)) {
4536
- if (key === "constructor") continue;
4537
- Object.defineProperty(ctor.prototype, key, Object.getOwnPropertyDescriptor(NewClass.prototype, key));
4539
+ if (ctor) {
4540
+ for (const key of Object.getOwnPropertyNames(NewClass.prototype)) {
4541
+ if (key === "constructor") continue;
4542
+ Object.defineProperty(ctor.prototype, key, Object.getOwnPropertyDescriptor(NewClass.prototype, key));
4543
+ }
4544
+ const styleDesc = Object.getOwnPropertyDescriptor(NewClass, "style");
4545
+ if (styleDesc) {
4546
+ Object.defineProperty(ctor, "style", styleDesc);
4547
+ const newStyle = NewClass.style;
4548
+ if (newStyle) registerStyle(getScopeId(cmpMeta), newStyle, !!(cmpMeta.$flags$ & CMP_FLAGS.shadowDomEncapsulation));
4549
+ }
4538
4550
  }
4539
4551
  document.querySelectorAll(cmpMeta.$tagName$).forEach((el) => {
4540
4552
  if (BUILD.hostListener) {
@@ -4554,7 +4566,9 @@ const hmrStandalone = async (hostElement, cmpMeta, hmrVersionId) => {
4554
4566
  //#endregion
4555
4567
  //#region src/runtime/bootstrap-standalone.ts
4556
4568
  const defineCustomElement = (Cstr, compactMeta) => {
4557
- customElements.define(transformTag(compactMeta[1]), proxyCustomElement(Cstr, compactMeta));
4569
+ const tag = transformTag(compactMeta[1]);
4570
+ const proxied = proxyCustomElement(Cstr, compactMeta);
4571
+ if (!customElements.get(tag)) customElements.define(tag, proxied);
4558
4572
  };
4559
4573
  const proxyCustomElement = (Cstr, compactMeta) => {
4560
4574
  if (BUILD.profile && performance.mark && performance.getEntriesByName("st:app:start", "mark").length === 0) performance.mark("st:app:start");
@@ -1597,7 +1597,12 @@ const hydrateScopedToShadow = () => {
1597
1597
  if (!win.document) return;
1598
1598
  const styleElements = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
1599
1599
  let i = 0;
1600
- for (; i < styleElements.length; i++) registerStyle(styleElements[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styleElements[i].innerHTML), true);
1600
+ for (; i < styleElements.length; i++) {
1601
+ const scopeId = styleElements[i].getAttribute(HYDRATED_STYLE_ID);
1602
+ const existing = styles.get(scopeId);
1603
+ const allowCS = existing !== void 0 ? existing instanceof CSSStyleSheet : true;
1604
+ registerStyle(scopeId, convertScopedToShadow(styleElements[i].innerHTML), allowCS);
1605
+ }
1601
1606
  };
1602
1607
  //#endregion
1603
1608
  //#region src/utils/helpers.ts
@@ -4513,7 +4518,6 @@ const hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
4513
4518
  };
4514
4519
  const hmrStandalone = async (hostElement, cmpMeta, hmrVersionId) => {
4515
4520
  const modulePath = hostElement.constructor.__stencil_module__;
4516
- console.log(`[Stencil HMR] hmrStandalone <${cmpMeta.$tagName$}> modulePath:`, modulePath);
4517
4521
  if (!modulePath) {
4518
4522
  console.warn(`[Stencil HMR] No __stencil_module__ on <${cmpMeta.$tagName$}> constructor - was this built with devMode?`);
4519
4523
  return;
@@ -4526,9 +4530,17 @@ const hmrStandalone = async (hostElement, cmpMeta, hmrVersionId) => {
4526
4530
  const NewClass = Object.values(newModule).find((v) => typeof v === "function" && v.is === cmpMeta.$tagName$) ?? newModule.default;
4527
4531
  if (!NewClass) return;
4528
4532
  const ctor = customElements.get(cmpMeta.$tagName$);
4529
- if (ctor) for (const key of Object.getOwnPropertyNames(NewClass.prototype)) {
4530
- if (key === "constructor") continue;
4531
- Object.defineProperty(ctor.prototype, key, Object.getOwnPropertyDescriptor(NewClass.prototype, key));
4533
+ if (ctor) {
4534
+ for (const key of Object.getOwnPropertyNames(NewClass.prototype)) {
4535
+ if (key === "constructor") continue;
4536
+ Object.defineProperty(ctor.prototype, key, Object.getOwnPropertyDescriptor(NewClass.prototype, key));
4537
+ }
4538
+ const styleDesc = Object.getOwnPropertyDescriptor(NewClass, "style");
4539
+ if (styleDesc) {
4540
+ Object.defineProperty(ctor, "style", styleDesc);
4541
+ const newStyle = NewClass.style;
4542
+ if (newStyle) registerStyle(getScopeId(cmpMeta), newStyle, !!(cmpMeta.$flags$ & CMP_FLAGS.shadowDomEncapsulation));
4543
+ }
4532
4544
  }
4533
4545
  document.querySelectorAll(cmpMeta.$tagName$).forEach((el) => {
4534
4546
  if (BUILD$1.hostListener) {
@@ -4548,7 +4560,9 @@ const hmrStandalone = async (hostElement, cmpMeta, hmrVersionId) => {
4548
4560
  //#endregion
4549
4561
  //#region src/runtime/bootstrap-standalone.ts
4550
4562
  const defineCustomElement = (Cstr, compactMeta) => {
4551
- customElements.define(transformTag(compactMeta[1]), proxyCustomElement(Cstr, compactMeta));
4563
+ const tag = transformTag(compactMeta[1]);
4564
+ const proxied = proxyCustomElement(Cstr, compactMeta);
4565
+ if (!customElements.get(tag)) customElements.define(tag, proxied);
4552
4566
  };
4553
4567
  const proxyCustomElement = (Cstr, compactMeta) => {
4554
4568
  if (BUILD$1.profile && performance.mark && performance.getEntriesByName("st:app:start", "mark").length === 0) performance.mark("st:app:start");
@@ -1468,7 +1468,12 @@ const hydrateScopedToShadow = () => {
1468
1468
  if (!win.document) return;
1469
1469
  const styleElements = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
1470
1470
  let i = 0;
1471
- for (; i < styleElements.length; i++) registerStyle(styleElements[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styleElements[i].innerHTML), true);
1471
+ for (; i < styleElements.length; i++) {
1472
+ const scopeId = styleElements[i].getAttribute(HYDRATED_STYLE_ID);
1473
+ const existing = styles.get(scopeId);
1474
+ const allowCS = existing !== void 0 ? existing instanceof CSSStyleSheet : true;
1475
+ registerStyle(scopeId, convertScopedToShadow(styleElements[i].innerHTML), allowCS);
1476
+ }
1472
1477
  };
1473
1478
  //#endregion
1474
1479
  //#region src/utils/helpers.ts
@@ -4384,7 +4389,6 @@ const hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
4384
4389
  };
4385
4390
  const hmrStandalone = async (hostElement, cmpMeta, hmrVersionId) => {
4386
4391
  const modulePath = hostElement.constructor.__stencil_module__;
4387
- console.log(`[Stencil HMR] hmrStandalone <${cmpMeta.$tagName$}> modulePath:`, modulePath);
4388
4392
  if (!modulePath) {
4389
4393
  console.warn(`[Stencil HMR] No __stencil_module__ on <${cmpMeta.$tagName$}> constructor - was this built with devMode?`);
4390
4394
  return;
@@ -4397,9 +4401,17 @@ const hmrStandalone = async (hostElement, cmpMeta, hmrVersionId) => {
4397
4401
  const NewClass = Object.values(newModule).find((v) => typeof v === "function" && v.is === cmpMeta.$tagName$) ?? newModule.default;
4398
4402
  if (!NewClass) return;
4399
4403
  const ctor = customElements.get(cmpMeta.$tagName$);
4400
- if (ctor) for (const key of Object.getOwnPropertyNames(NewClass.prototype)) {
4401
- if (key === "constructor") continue;
4402
- Object.defineProperty(ctor.prototype, key, Object.getOwnPropertyDescriptor(NewClass.prototype, key));
4404
+ if (ctor) {
4405
+ for (const key of Object.getOwnPropertyNames(NewClass.prototype)) {
4406
+ if (key === "constructor") continue;
4407
+ Object.defineProperty(ctor.prototype, key, Object.getOwnPropertyDescriptor(NewClass.prototype, key));
4408
+ }
4409
+ const styleDesc = Object.getOwnPropertyDescriptor(NewClass, "style");
4410
+ if (styleDesc) {
4411
+ Object.defineProperty(ctor, "style", styleDesc);
4412
+ const newStyle = NewClass.style;
4413
+ if (newStyle) registerStyle(getScopeId(cmpMeta), newStyle, !!(cmpMeta.$flags$ & CMP_FLAGS.shadowDomEncapsulation));
4414
+ }
4403
4415
  }
4404
4416
  document.querySelectorAll(cmpMeta.$tagName$).forEach((el) => {
4405
4417
  if (BUILD.hostListener) {
@@ -4419,7 +4431,9 @@ const hmrStandalone = async (hostElement, cmpMeta, hmrVersionId) => {
4419
4431
  //#endregion
4420
4432
  //#region src/runtime/bootstrap-standalone.ts
4421
4433
  const defineCustomElement = (Cstr, compactMeta) => {
4422
- customElements.define(transformTag(compactMeta[1]), proxyCustomElement(Cstr, compactMeta));
4434
+ const tag = transformTag(compactMeta[1]);
4435
+ const proxied = proxyCustomElement(Cstr, compactMeta);
4436
+ if (!customElements.get(tag)) customElements.define(tag, proxied);
4423
4437
  };
4424
4438
  const proxyCustomElement = (Cstr, compactMeta) => {
4425
4439
  if (BUILD.profile && performance.mark && performance.getEntriesByName("st:app:start", "mark").length === 0) performance.mark("st:app:start");
@@ -1245,7 +1245,12 @@ const hydrateScopedToShadow = () => {
1245
1245
  if (!win.document) return;
1246
1246
  const styleElements = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
1247
1247
  let i = 0;
1248
- for (; i < styleElements.length; i++) registerStyle(styleElements[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styleElements[i].innerHTML), true);
1248
+ for (; i < styleElements.length; i++) {
1249
+ const scopeId = styleElements[i].getAttribute(HYDRATED_STYLE_ID);
1250
+ const existing = styles.get(scopeId);
1251
+ const allowCS = existing !== void 0 ? existing instanceof CSSStyleSheet : true;
1252
+ registerStyle(scopeId, convertScopedToShadow(styleElements[i].innerHTML), allowCS);
1253
+ }
1249
1254
  };
1250
1255
  //#endregion
1251
1256
  //#region src/utils/helpers.ts
@@ -4151,7 +4156,6 @@ const hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
4151
4156
  };
4152
4157
  const hmrStandalone = async (hostElement, cmpMeta, hmrVersionId) => {
4153
4158
  const modulePath = hostElement.constructor.__stencil_module__;
4154
- console.log(`[Stencil HMR] hmrStandalone <${cmpMeta.$tagName$}> modulePath:`, modulePath);
4155
4159
  if (!modulePath) {
4156
4160
  console.warn(`[Stencil HMR] No __stencil_module__ on <${cmpMeta.$tagName$}> constructor - was this built with devMode?`);
4157
4161
  return;
@@ -4164,9 +4168,17 @@ const hmrStandalone = async (hostElement, cmpMeta, hmrVersionId) => {
4164
4168
  const NewClass = Object.values(newModule).find((v) => typeof v === "function" && v.is === cmpMeta.$tagName$) ?? newModule.default;
4165
4169
  if (!NewClass) return;
4166
4170
  const ctor = customElements.get(cmpMeta.$tagName$);
4167
- if (ctor) for (const key of Object.getOwnPropertyNames(NewClass.prototype)) {
4168
- if (key === "constructor") continue;
4169
- Object.defineProperty(ctor.prototype, key, Object.getOwnPropertyDescriptor(NewClass.prototype, key));
4171
+ if (ctor) {
4172
+ for (const key of Object.getOwnPropertyNames(NewClass.prototype)) {
4173
+ if (key === "constructor") continue;
4174
+ Object.defineProperty(ctor.prototype, key, Object.getOwnPropertyDescriptor(NewClass.prototype, key));
4175
+ }
4176
+ const styleDesc = Object.getOwnPropertyDescriptor(NewClass, "style");
4177
+ if (styleDesc) {
4178
+ Object.defineProperty(ctor, "style", styleDesc);
4179
+ const newStyle = NewClass.style;
4180
+ if (newStyle) registerStyle(getScopeId(cmpMeta), newStyle, !!(cmpMeta.$flags$ & CMP_FLAGS.shadowDomEncapsulation));
4181
+ }
4170
4182
  }
4171
4183
  document.querySelectorAll(cmpMeta.$tagName$).forEach((el) => {
4172
4184
  if (BUILD$1.hostListener) {
@@ -4186,7 +4198,9 @@ const hmrStandalone = async (hostElement, cmpMeta, hmrVersionId) => {
4186
4198
  //#endregion
4187
4199
  //#region src/runtime/bootstrap-standalone.ts
4188
4200
  const defineCustomElement = (Cstr, compactMeta) => {
4189
- customElements.define(transformTag(compactMeta[1]), proxyCustomElement(Cstr, compactMeta));
4201
+ const tag = transformTag(compactMeta[1]);
4202
+ const proxied = proxyCustomElement(Cstr, compactMeta);
4203
+ if (!customElements.get(tag)) customElements.define(tag, proxied);
4190
4204
  };
4191
4205
  const proxyCustomElement = (Cstr, compactMeta) => {
4192
4206
  if (BUILD$1.profile && performance.mark && performance.getEntriesByName("st:app:start", "mark").length === 0) performance.mark("st:app:start");
@@ -1,4 +1,4 @@
1
- import { ei as Logger, vr as CompilerSystem } from "../../index-vY35H18z.mjs";
1
+ import { ti as Logger, yr as CompilerSystem } from "../../index-F3IidHM1.mjs";
2
2
 
3
3
  //#region src/sys/node/logger/index.d.ts
4
4
  /**
@@ -1,2 +1,2 @@
1
- import { n as setupNodeProcess, r as createNodeLogger, t as createNodeSys } from "../../node-BdyxhldJ.mjs";
1
+ import { n as setupNodeProcess, r as createNodeLogger, t as createNodeSys } from "../../node-jFf98r0u.mjs";
2
2
  export { createNodeLogger, createNodeSys, setupNodeProcess };
@@ -1,5 +1,5 @@
1
- import { l as createWorkerMessageHandler } from "../../compiler-ip-l8MSx.mjs";
2
- import { t as createNodeSys } from "../../node-BdyxhldJ.mjs";
1
+ import { l as createWorkerMessageHandler } from "../../compiler-CXWiPNlE.mjs";
2
+ import { t as createNodeSys } from "../../node-jFf98r0u.mjs";
3
3
  //#region src/sys/node/node-worker-thread.ts
4
4
  /**
5
5
  * Initialize a worker thread, setting up various machinery for managing
@@ -1,5 +1,5 @@
1
- import { $r as LogLevel, B as ComponentCompilerMeta, Br as Diagnostic, Dt as HostRef, E as CompilerCtx, Et as HostElement, Nt as Module, Rt as NewSpecPageOptions, Zn as Compiler, Zr as LoadConfigInit, a as BuildCtx, aa as ValidatedConfig, cn as RuntimeRef, ei as Logger, fa as RafCallback, ha as UserBuildConditionals, ia as UnvalidatedConfig, kr as Config, mt as ComponentRuntimeMeta, ni as LoggerTimeSpan, pn as SpecPage, ua as ErrorHandler, vr as CompilerSystem } from "../index-vY35H18z.mjs";
2
- import { a as h, b as Env, d as getMode, g as getElement, h as createEvent, i as Host, m as Fragment, o as forceUpdate, p as Mixin, s as getRenderingRef, v as getAssetPath, y as setAssetPath } from "../index-BvkyxSY6.mjs";
1
+ import { Ar as Config, B as ComponentCompilerMeta, Dt as HostRef, E as CompilerCtx, Et as HostElement, Nt as Module, Qn as Compiler, Qr as LoadConfigInit, Rt as NewSpecPageOptions, Vr as Diagnostic, a as BuildCtx, aa as UnvalidatedConfig, cn as RuntimeRef, da as ErrorHandler, ei as LogLevel, ga as UserBuildConditionals, mt as ComponentRuntimeMeta, oa as ValidatedConfig, pa as RafCallback, pn as SpecPage, ri as LoggerTimeSpan, ti as Logger, yr as CompilerSystem } from "../index-F3IidHM1.mjs";
2
+ import { a as h, b as Env, d as getMode, g as getElement, h as createEvent, i as Host, m as Fragment, o as forceUpdate, p as Mixin, s as getRenderingRef, v as getAssetPath, y as setAssetPath } from "../index-3fu7WQs4.mjs";
3
3
  import { Mock } from "vitest";
4
4
 
5
5
  //#region src/testing/testing-logger.d.ts
@@ -1,8 +1,8 @@
1
- import { A as HYDRATE_ID, C as setAssetPath, D as DEFAULT_DOC_DATA, F as reWireGetterSetter, M as STENCIL_DOC_DATA, P as getHostRef$1, S as getAssetPath, X as Env, Y as BUILD, _ as insertBefore, b as getElement, c as Fragment, g as getRenderingRef, h as forceUpdate, j as NODE_TYPE, k as HYDRATE_CHILD_ID, l as bootstrapLazy, m as h, p as Host, s as Mixin, u as getMode, v as renderVdom, y as createEvent } from "../client-DI9mAOBd.mjs";
1
+ import { A as HYDRATE_ID, C as setAssetPath, D as DEFAULT_DOC_DATA, F as reWireGetterSetter, M as STENCIL_DOC_DATA, P as getHostRef$1, S as getAssetPath, X as Env, Y as BUILD, _ as insertBefore, b as getElement, c as Fragment, g as getRenderingRef, h as forceUpdate, j as NODE_TYPE, k as HYDRATE_CHILD_ID, l as bootstrapLazy, m as h, p as Host, s as Mixin, u as getMode, v as renderVdom, y as createEvent } from "../client-CgXNkftm.mjs";
2
2
  import { L as EVENT_FLAGS, h as noop, w as CMP_FLAGS } from "../regular-expression-CFVJOTUh.mjs";
3
- import { _ as getBuildFeatures, c as createWorkerContext, g as BuildContext, h as Cache, i as createSystem, o as loadConfig, p as createInMemoryFs, s as createCompiler } from "../compiler-ip-l8MSx.mjs";
3
+ import { b as getBuildFeatures, c as createWorkerContext, h as Cache, i as createSystem, o as loadConfig, p as createInMemoryFs, s as createCompiler, v as BuildContext } from "../compiler-CXWiPNlE.mjs";
4
4
  import { wt as formatLazyBundleRuntimeMeta } from "../validation-ByxKj8bC.mjs";
5
- import { o as buildEvents } from "../node-BdyxhldJ.mjs";
5
+ import { o as buildEvents } from "../node-jFf98r0u.mjs";
6
6
  import fs from "node:fs";
7
7
  import path from "node:path";
8
8
  import { fileURLToPath } from "node:url";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core",
3
- "version": "5.0.0-alpha.16",
3
+ "version": "5.0.0-alpha.17",
4
4
  "description": "A Compiler for Web Components and Progressive Web Apps",
5
5
  "keywords": [
6
6
  "components",
@@ -121,9 +121,9 @@
121
121
  "terser": "^5.0.0",
122
122
  "tinyglobby": "^0.2.0",
123
123
  "typescript": ">4.0.0 <7.0.0",
124
- "@stencil/cli": "5.0.0-alpha.16",
125
- "@stencil/mock-doc": "5.0.0-alpha.16",
126
- "@stencil/dev-server": "5.0.0-alpha.16"
124
+ "@stencil/cli": "5.0.0-alpha.17",
125
+ "@stencil/dev-server": "5.0.0-alpha.17",
126
+ "@stencil/mock-doc": "5.0.0-alpha.17"
127
127
  },
128
128
  "devDependencies": {
129
129
  "@ionic/prettier-config": "^4.0.0",