@stencil/core 5.0.0-beta.19 → 5.0.0-beta.20
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-BUal4Vkx.mjs → client-CVXS3JZ-.mjs} +8 -2
- package/dist/compiler/browser.js +1 -1
- package/dist/compiler/index.d.mts +1 -1
- package/dist/compiler/index.mjs +2 -2
- package/dist/compiler/utils/index.d.mts +1 -1
- package/dist/{compiler-CsCXc_9d.mjs → compiler-CUsOl_Kw.mjs} +10 -14
- package/dist/declarations/stencil-public-compiler.d.ts +1 -1
- package/dist/declarations/stencil-public-runtime.d.ts +1 -1
- package/dist/{index-DVRMGB2z.d.mts → index-B9-Byy8z.d.mts} +1 -1
- package/dist/{index-ObycKlsk.d.mts → index-Dz1G9pWZ.d.mts} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/{node-DGo5Qu7U.mjs → node-Bz2SOK7_.mjs} +5 -30
- package/dist/runtime/client/lazy.js +14 -7
- package/dist/runtime/client/runtime.d.ts +1 -1
- package/dist/runtime/client/runtime.js +14 -7
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +14 -7
- package/dist/runtime/server/index.d.mts +1 -1
- package/dist/runtime/server/index.mjs +34 -27
- package/dist/runtime/server/runner.mjs +8 -1
- 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 +1 -1
- package/dist/testing/index.mjs +13 -6
- package/package.json +7 -4
|
@@ -753,6 +753,11 @@ const emitEvent = (elm, name, opts) => {
|
|
|
753
753
|
return ev;
|
|
754
754
|
};
|
|
755
755
|
const getRegistry = () => customElements;
|
|
756
|
+
/**
|
|
757
|
+
* @param elm a defined component host
|
|
758
|
+
* @returns the registry the host's class was defined in, else the active registry
|
|
759
|
+
*/
|
|
760
|
+
const getHostRegistry = (elm) => elm.constructor._registry ?? getRegistry();
|
|
756
761
|
//#endregion
|
|
757
762
|
//#region src/runtime/vdom/set-accessor.ts
|
|
758
763
|
/**
|
|
@@ -997,6 +1002,7 @@ function sortedAttrNames(attrNames) {
|
|
|
997
1002
|
let scopeId;
|
|
998
1003
|
let contentRef;
|
|
999
1004
|
let hostTagName;
|
|
1005
|
+
let hostRegistry;
|
|
1000
1006
|
let useNativeShadowDom = false;
|
|
1001
1007
|
let checkSlotFallbackVisibility = false;
|
|
1002
1008
|
let checkSlotRelocate = false;
|
|
@@ -1070,8 +1076,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
1070
1076
|
if (BUILD.svg && !isSvgMode) isSvgMode = newVNode.$tag$ === "svg";
|
|
1071
1077
|
if (!win.document) throw new Error("No DOM environment available for rendering.");
|
|
1072
1078
|
const tag = !useNativeShadowDom && BUILD.slotRelocation && newVNode.$flags$ & VNODE_FLAGS.isSlotFallback ? "slot-fb" : newVNode.$tag$;
|
|
1073
|
-
const
|
|
1074
|
-
const registryOpts = _reg !== win.customElements && tag.includes("-") ? { customElementRegistry: _reg } : void 0;
|
|
1079
|
+
const registryOpts = hostRegistry !== win.customElements && tag.includes("-") ? { customElementRegistry: hostRegistry } : void 0;
|
|
1075
1080
|
elm = newVNode.$elm$ = BUILD.svg && isSvgMode ? win.document.createElementNS(SVG_NS, tag) : win.document.createElement(tag, registryOpts);
|
|
1076
1081
|
if (BUILD.svg && isSvgMode && newVNode.$tag$ === "foreignObject") isSvgMode = false;
|
|
1077
1082
|
if (BUILD.vdomAttribute) updateElement(null, newVNode, isSvgMode);
|
|
@@ -1620,6 +1625,7 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1620
1625
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1621
1626
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
1622
1627
|
hostTagName = hostElm.tagName;
|
|
1628
|
+
hostRegistry = getHostRegistry(hostElm);
|
|
1623
1629
|
if (BUILD.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) throw new Error(`The <Host> must be the single root component.
|
|
1624
1630
|
Looks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.
|
|
1625
1631
|
|
package/dist/compiler/browser.js
CHANGED
|
@@ -1844,7 +1844,7 @@ const validateComponentTag = (tag) => {
|
|
|
1844
1844
|
};
|
|
1845
1845
|
//#endregion
|
|
1846
1846
|
//#region src/version.ts
|
|
1847
|
-
const version = "5.0.0-beta.
|
|
1847
|
+
const version = "5.0.0-beta.20";
|
|
1848
1848
|
//#endregion
|
|
1849
1849
|
//#region src/compiler/events.ts
|
|
1850
1850
|
const buildEvents = () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as CompilerFsStats, $n as WorkerMainController, $t as OutputTargetBuild, A as BuildOverrides, An as ResolveModuleIdResults, At as HotModuleReplacement, B as CompilerEventBuildLog, Bn as SsrFactoryOptions, Bt as Logger, C as BuildEmitEvents, Cn as PluginTransformResults, Cr as JsonDocsStyle, Ct as DevServerEditor, D as BuildOnEventRemove, Dn as PrerenderResults, Dr as JsonDocsValue, Dt as HistoryApiFallback, E as BuildNoChangeResults, En as PrerenderOptions, Er as JsonDocsUsage, Et as FsWatchResults, F as Compiler, Fn as SerializeDocumentOptions, Ft as LazyRequire, G as CompilerEventFileAdd, Gn as TransformOptions, Gt as OptimizeCssInput, H as CompilerEventBuildStart, Hn as StencilDevServerConfig, Ht as LoggerTimeSpan, I as CompilerBuildResults, In as ServiceWorkerConfig, It as LightDomPatches, J as CompilerEventFsChange, Jn as TranspileResults, Jt as OptimizeJsOutput, K as CompilerEventFileDelete, Kn as TranspileOnlyResults, Kt as OptimizeCssOutput, L as CompilerBuildStart, Ln as SitemapXmpOpts, Lt as LoadConfigInit, M as CliInitOptions, Mn as RobotsTxtOpts, Mt as HydrateFactoryOptions, N as CompileScriptMinifyOptions, Nn as RobotsTxtResults, Nt as HydratedFlag, O as BuildOnEvents, On as PrerenderStartOptions, Or as StyleDoc, Ot as HmrGlobalStyleUpdate, P as CompileTarget, Pn as RolldownConfig, Pt as LOG_LEVELS, Q as CompilerFileWatcherEvent, Qn as WatcherCloseResults, Qt as OutputTargetBaseNext, R as CompilerDependency, Rn as SitemapXmpResults, Rt as LoadConfigResults, S as AutoprefixerOptions, Sn as PluginCtx, Sr as JsonDocsSlot, St as DevServerConfig, T as BuildLog, Tn as PrerenderHydrateOptions, Tr as JsonDocsTypeLibrary, Tt as DocsReadmeCustomColumn, U as CompilerEventDirAdd, Un as StencilDocsConfig, Ut as ModeConfig, V as CompilerEventBuildNoChange, Vn as StencilConfig, Vt as LoggerLineUpdater, W as CompilerEventDirDelete, Wn as SystemDetails, Wt as NodeResolveConfig, X as CompilerFileWatcher, Xn as ValidatedConfig, Xt as OutputTargetAssets, Y as CompilerEventName, Yn as UnvalidatedConfig, Yt as OutputTarget, Z as CompilerFileWatcherCallback, Zn as ValidatedOutputTargetWww, Zt as OutputTargetBase, _ as PrintLine, _n as OutputTargetWww, _r as JsonDocsListener, _t as CopyTask, a as ComponentCompilerEvent, an as OutputTargetDocsCustom, at as CompilerSystemRealpathResults, b as SsrResults, bn as PlatformPath, br as JsonDocsPart, bt as CustomElementsExportBehaviorOptions, c as ComponentCompilerMethod, cn as OutputTargetDocsReadme, ct as CompilerSystemRemoveFileResults, d as ComponentCompilerTypeReferences, dn as OutputTargetLoaderBundle, dr as JsonDocMethodParameter, dt as CompilerSystemWriteFileResults, en as OutputTargetCollection, er as WorkerOptions, et as CompilerRequest, f as ComponentGlobalStyle, fn as OutputTargetSsr, fr as JsonDocs, ft as CompilerWatcher, g as PrerenderUrlResults, gn as OutputTargetTypes, gr as JsonDocsEvent, gt as CopyResults, h as PackageJsonData, hn as OutputTargetStats, hr as JsonDocsDependencyGraph, ht as ConfigCompat, i as CompilerWorkerContext, in as OutputTargetDocsAgentSkill, it as CompilerSystemCreateDirectoryResults, j as BuildResultsComponentGraph, jn as ResolveModuleOptions, jt as HydrateDocumentOptions, k as BuildOutput, kn as ResolveModuleIdOptions, kr as FsWriteResults, kt as HmrStyleUpdate, l as ComponentCompilerProperty, ln as OutputTargetDocsVscode, lr as UserBuildConditionals, lt as CompilerSystemRenameResults, m as LazyBundlesRuntimeData, mn as OutputTargetStandalone, mr as JsonDocsCustomState, mt as ConfigBundle, nn as OutputTargetCustom, nt as CompilerSystem, o as ComponentCompilerListener, on as OutputTargetDocsCustomElementsManifest, ot as CompilerSystemRemoveDirectoryOptions, pn as OutputTargetSsrWasm, pr as JsonDocsComponent, pt as Config, q as CompilerEventFileUpdate, qn as TranspileOptions, qt as OptimizeJsInput, r as CompilerCtx, rn as OutputTargetDistLazy, rt as CompilerSystemCreateDirectoryOptions, s as ComponentCompilerMeta, sn as OutputTargetDocsJson, st as CompilerSystemRemoveDirectoryResults, t as BuildCtx, tn as OutputTargetCopy, tt as CompilerRequestResponse, u as ComponentCompilerState, un as OutputTargetGlobalStyle, ut as CompilerSystemRenamedPath, vn as PageReloadStrategy, vr as JsonDocsMethod, vt as Credentials, w as BuildEvents, wn as PrerenderConfig, wr as JsonDocsTag, wt as Diagnostic, x as WorkerMsgHandler, xn as Plugin, xr as JsonDocsProp, xt as DevServer, yn as ParsedPath, yr as JsonDocsMethodReturn, yt as CustomElementsExportBehavior, z as CompilerEventBuildFinish, zn as SsrDocumentOptions, zt as LogLevel } from "../index-
|
|
1
|
+
import { $ as CompilerFsStats, $n as WorkerMainController, $t as OutputTargetBuild, A as BuildOverrides, An as ResolveModuleIdResults, At as HotModuleReplacement, B as CompilerEventBuildLog, Bn as SsrFactoryOptions, Bt as Logger, C as BuildEmitEvents, Cn as PluginTransformResults, Cr as JsonDocsStyle, Ct as DevServerEditor, D as BuildOnEventRemove, Dn as PrerenderResults, Dr as JsonDocsValue, Dt as HistoryApiFallback, E as BuildNoChangeResults, En as PrerenderOptions, Er as JsonDocsUsage, Et as FsWatchResults, F as Compiler, Fn as SerializeDocumentOptions, Ft as LazyRequire, G as CompilerEventFileAdd, Gn as TransformOptions, Gt as OptimizeCssInput, H as CompilerEventBuildStart, Hn as StencilDevServerConfig, Ht as LoggerTimeSpan, I as CompilerBuildResults, In as ServiceWorkerConfig, It as LightDomPatches, J as CompilerEventFsChange, Jn as TranspileResults, Jt as OptimizeJsOutput, K as CompilerEventFileDelete, Kn as TranspileOnlyResults, Kt as OptimizeCssOutput, L as CompilerBuildStart, Ln as SitemapXmpOpts, Lt as LoadConfigInit, M as CliInitOptions, Mn as RobotsTxtOpts, Mt as HydrateFactoryOptions, N as CompileScriptMinifyOptions, Nn as RobotsTxtResults, Nt as HydratedFlag, O as BuildOnEvents, On as PrerenderStartOptions, Or as StyleDoc, Ot as HmrGlobalStyleUpdate, P as CompileTarget, Pn as RolldownConfig, Pt as LOG_LEVELS, Q as CompilerFileWatcherEvent, Qn as WatcherCloseResults, Qt as OutputTargetBaseNext, R as CompilerDependency, Rn as SitemapXmpResults, Rt as LoadConfigResults, S as AutoprefixerOptions, Sn as PluginCtx, Sr as JsonDocsSlot, St as DevServerConfig, T as BuildLog, Tn as PrerenderHydrateOptions, Tr as JsonDocsTypeLibrary, Tt as DocsReadmeCustomColumn, U as CompilerEventDirAdd, Un as StencilDocsConfig, Ut as ModeConfig, V as CompilerEventBuildNoChange, Vn as StencilConfig, Vt as LoggerLineUpdater, W as CompilerEventDirDelete, Wn as SystemDetails, Wt as NodeResolveConfig, X as CompilerFileWatcher, Xn as ValidatedConfig, Xt as OutputTargetAssets, Y as CompilerEventName, Yn as UnvalidatedConfig, Yt as OutputTarget, Z as CompilerFileWatcherCallback, Zn as ValidatedOutputTargetWww, Zt as OutputTargetBase, _ as PrintLine, _n as OutputTargetWww, _r as JsonDocsListener, _t as CopyTask, a as ComponentCompilerEvent, an as OutputTargetDocsCustom, at as CompilerSystemRealpathResults, b as SsrResults, bn as PlatformPath, br as JsonDocsPart, bt as CustomElementsExportBehaviorOptions, c as ComponentCompilerMethod, cn as OutputTargetDocsReadme, ct as CompilerSystemRemoveFileResults, d as ComponentCompilerTypeReferences, dn as OutputTargetLoaderBundle, dr as JsonDocMethodParameter, dt as CompilerSystemWriteFileResults, en as OutputTargetCollection, er as WorkerOptions, et as CompilerRequest, f as ComponentGlobalStyle, fn as OutputTargetSsr, fr as JsonDocs, ft as CompilerWatcher, g as PrerenderUrlResults, gn as OutputTargetTypes, gr as JsonDocsEvent, gt as CopyResults, h as PackageJsonData, hn as OutputTargetStats, hr as JsonDocsDependencyGraph, ht as ConfigCompat, i as CompilerWorkerContext, in as OutputTargetDocsAgentSkill, it as CompilerSystemCreateDirectoryResults, j as BuildResultsComponentGraph, jn as ResolveModuleOptions, jt as HydrateDocumentOptions, k as BuildOutput, kn as ResolveModuleIdOptions, kr as FsWriteResults, kt as HmrStyleUpdate, l as ComponentCompilerProperty, ln as OutputTargetDocsVscode, lr as UserBuildConditionals, lt as CompilerSystemRenameResults, m as LazyBundlesRuntimeData, mn as OutputTargetStandalone, mr as JsonDocsCustomState, mt as ConfigBundle, nn as OutputTargetCustom, nt as CompilerSystem, o as ComponentCompilerListener, on as OutputTargetDocsCustomElementsManifest, ot as CompilerSystemRemoveDirectoryOptions, pn as OutputTargetSsrWasm, pr as JsonDocsComponent, pt as Config, q as CompilerEventFileUpdate, qn as TranspileOptions, qt as OptimizeJsInput, r as CompilerCtx, rn as OutputTargetDistLazy, rt as CompilerSystemCreateDirectoryOptions, s as ComponentCompilerMeta, sn as OutputTargetDocsJson, st as CompilerSystemRemoveDirectoryResults, t as BuildCtx, tn as OutputTargetCopy, tt as CompilerRequestResponse, u as ComponentCompilerState, un as OutputTargetGlobalStyle, ut as CompilerSystemRenamedPath, vn as PageReloadStrategy, vr as JsonDocsMethod, vt as Credentials, w as BuildEvents, wn as PrerenderConfig, wr as JsonDocsTag, wt as Diagnostic, x as WorkerMsgHandler, xn as Plugin, xr as JsonDocsProp, xt as DevServer, yn as ParsedPath, yr as JsonDocsMethodReturn, yt as CustomElementsExportBehavior, z as CompilerEventBuildFinish, zn as SsrDocumentOptions, zt as LogLevel } from "../index-B9-Byy8z.mjs";
|
|
2
2
|
import ts from "typescript";
|
|
3
3
|
import { Plugin as Plugin$1 } from "rolldown";
|
|
4
4
|
//#region src/version.d.ts
|
package/dist/compiler/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as version, C as hasStencilHydrateImport, D as parseCssOnlyComponents, E as replaceStencilHydrateImport, M as scopeCss, O as buildId, S as hasStencilGlobalsImport, T as replaceStencilGlobalsImport, _ as cmpMetaToDocsComponent, a as createPrerenderer, b as buildHydrateCss, c as createWorkerContext, d as nodeRequire, f as optimizeCss, g as generateManifest, h as generateComponentTypesFile, i as createSystem, j as versions, k as vermoji, l as createWorkerMessageHandler, m as validateHydrated, n as transpile, o as loadConfig, p as validateConfig, r as transpileSync, s as createCompiler, t as ts, u as optimizeJs, v as getScopeId, w as replaceStencilCssComponentsImport, x as hasStencilCssComponentsImport, y as foldBuildFlags } from "../compiler-
|
|
2
|
-
import { a as LOG_LEVELS, i as CustomElementsExportBehaviorOptions } from "../node-
|
|
1
|
+
import { A as version, C as hasStencilHydrateImport, D as parseCssOnlyComponents, E as replaceStencilHydrateImport, M as scopeCss, O as buildId, S as hasStencilGlobalsImport, T as replaceStencilGlobalsImport, _ as cmpMetaToDocsComponent, a as createPrerenderer, b as buildHydrateCss, c as createWorkerContext, d as nodeRequire, f as optimizeCss, g as generateManifest, h as generateComponentTypesFile, i as createSystem, j as versions, k as vermoji, l as createWorkerMessageHandler, m as validateHydrated, n as transpile, o as loadConfig, p as validateConfig, r as transpileSync, s as createCompiler, t as ts, u as optimizeJs, v as getScopeId, w as replaceStencilCssComponentsImport, x as hasStencilCssComponentsImport, y as foldBuildFlags } from "../compiler-CUsOl_Kw.mjs";
|
|
2
|
+
import { a as LOG_LEVELS, i as CustomElementsExportBehaviorOptions } from "../node-Bz2SOK7_.mjs";
|
|
3
3
|
export { CustomElementsExportBehaviorOptions, LOG_LEVELS, buildHydrateCss, buildId, cmpMetaToDocsComponent, createCompiler, createPrerenderer, createSystem, createWorkerContext, createWorkerMessageHandler, foldBuildFlags, generateComponentTypesFile, generateManifest, getScopeId, hasStencilCssComponentsImport, hasStencilGlobalsImport, hasStencilHydrateImport, loadConfig, nodeRequire, optimizeCss, optimizeJs, parseCssOnlyComponents, replaceStencilCssComponentsImport, replaceStencilGlobalsImport, replaceStencilHydrateImport, scopeCss, transpile, transpileSync, ts, validateConfig, validateHydrated, vermoji, version, versions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $i as CUSTOM, $r as filterActiveTargets, Ai as buildWarn, Ar as ModeValidationError, Bi as loadTypeScriptDiagnostics, Br as isJsFile, Ca as TYPES, Ci as isOutputTargetWww, Da as XLINK_NS, Di as TASK_CANCELED_MSG, Ea as WWW, Ei as shouldExcludeComponent, Fi as escapeHtml, Fr as createJsVarName, Gi as formatLazyBundleRuntimeMeta, Gr as readOnlyArrayHasStringMember, Hi as isRolldownError, Hr as isTsFile, Ii as normalizeDiagnostics, Ir as generatePreamble, Ji as CMP_FLAGS, Jr as getSourceMappingUrlForEndOfFile, Ki as stringifyRuntimeData, Kr as readPackageJson, Li as splitLineBreaks, Lr as getTextDocs, Mi as hasError, Mr as validateComponentTag, Ni as hasWarning, Nr as ParsePackageJsonResult, Oi as buildError, Pi as shouldIgnoreError, Pr as addDocBlock, Qi as COPY, Qr as FilterComponentsResult, Ri as augmentDiagnosticWithNode, Rr as hasDependency, Sa as SVG_NS, Si as isOutputTargetTypes, Ta as WATCH_FLAGS, Ti as relativeImport, Ui as loadRolldownDiagnostics, Ur as isTsxFile, Vi as createOnWarnFn, Vr as isJsxFile, Wi as formatComponentRuntimeMeta, Wr as parsePackageJson, Xi as COLLECTION_APP_DATA_FILE_NAME, Xr as rolldownToStencilSourceMap, Yi as COLLECTION, Yr as getSourceMappingUrlLinker, Zi as COLLECTION_MANIFEST_FILE_NAME, Zr as result_d_exports, _a as SSR, _i as isOutputTargetLoaderBundle, aa as DOCS_JSON, ai as isOutputTargetCollection, ba as STATS, bi as isOutputTargetStandalone, ca as EVENT_FLAGS, ci as isOutputTargetDistLazy, da as HOST_FLAGS, di as isOutputTargetDocsCustom, ea as DEFAULT_STYLE_MODE, ei as filterExcludedComponents, fa as HTML_NS, fi as isOutputTargetDocsCustomElementsManifest, ga as NODE_TYPES, gi as isOutputTargetGlobalStyle, ha as MEMBER_FLAGS, hi as isOutputTargetDocsVscode, ia as DOCS_CUSTOM_ELEMENTS_MANIFEST, ii as isOutputTargetAssets, ji as catchError, jr as validateComponentModes, ki as buildJsonFileError, la as GENERATED_DTS, li as isOutputTargetDocs, ma as LOADER_BUNDLE, mi as isOutputTargetDocsReadme, na as DOCS_AGENT_SKILL, ni as getComponentsDtsTypesFilePath, oa as DOCS_README, oi as isOutputTargetCopy, pa as LISTENER_FLAGS, pi as isOutputTargetDocsJson, qi as ASSETS, qr as getInlineSourceMappingUrlLinker, ra as DOCS_CUSTOM, ri as getComponentsFromModules, sa as DOCS_VSCODE, si as isOutputTargetCustom, ta as DIST_LAZY, ti as getComponentsDtsSrcFilePath, ua as GLOBAL_STYLE, ui as isOutputTargetDocsAgentSkill, va as SSR_WASM, vi as isOutputTargetSsr, wa as VALID_CONFIG_OUTPUT_TARGETS, wi as isValidConfigOutputTarget, xa as STYLE_EXT, xi as isOutputTargetStats, ya as STANDALONE, yi as isOutputTargetSsrWasm, zi as loadTypeScriptDiagnostic, zr as isDtsFile } from "../../index-
|
|
1
|
+
import { $i as CUSTOM, $r as filterActiveTargets, Ai as buildWarn, Ar as ModeValidationError, Bi as loadTypeScriptDiagnostics, Br as isJsFile, Ca as TYPES, Ci as isOutputTargetWww, Da as XLINK_NS, Di as TASK_CANCELED_MSG, Ea as WWW, Ei as shouldExcludeComponent, Fi as escapeHtml, Fr as createJsVarName, Gi as formatLazyBundleRuntimeMeta, Gr as readOnlyArrayHasStringMember, Hi as isRolldownError, Hr as isTsFile, Ii as normalizeDiagnostics, Ir as generatePreamble, Ji as CMP_FLAGS, Jr as getSourceMappingUrlForEndOfFile, Ki as stringifyRuntimeData, Kr as readPackageJson, Li as splitLineBreaks, Lr as getTextDocs, Mi as hasError, Mr as validateComponentTag, Ni as hasWarning, Nr as ParsePackageJsonResult, Oi as buildError, Pi as shouldIgnoreError, Pr as addDocBlock, Qi as COPY, Qr as FilterComponentsResult, Ri as augmentDiagnosticWithNode, Rr as hasDependency, Sa as SVG_NS, Si as isOutputTargetTypes, Ta as WATCH_FLAGS, Ti as relativeImport, Ui as loadRolldownDiagnostics, Ur as isTsxFile, Vi as createOnWarnFn, Vr as isJsxFile, Wi as formatComponentRuntimeMeta, Wr as parsePackageJson, Xi as COLLECTION_APP_DATA_FILE_NAME, Xr as rolldownToStencilSourceMap, Yi as COLLECTION, Yr as getSourceMappingUrlLinker, Zi as COLLECTION_MANIFEST_FILE_NAME, Zr as result_d_exports, _a as SSR, _i as isOutputTargetLoaderBundle, aa as DOCS_JSON, ai as isOutputTargetCollection, ba as STATS, bi as isOutputTargetStandalone, ca as EVENT_FLAGS, ci as isOutputTargetDistLazy, da as HOST_FLAGS, di as isOutputTargetDocsCustom, ea as DEFAULT_STYLE_MODE, ei as filterExcludedComponents, fa as HTML_NS, fi as isOutputTargetDocsCustomElementsManifest, ga as NODE_TYPES, gi as isOutputTargetGlobalStyle, ha as MEMBER_FLAGS, hi as isOutputTargetDocsVscode, ia as DOCS_CUSTOM_ELEMENTS_MANIFEST, ii as isOutputTargetAssets, ji as catchError, jr as validateComponentModes, ki as buildJsonFileError, la as GENERATED_DTS, li as isOutputTargetDocs, ma as LOADER_BUNDLE, mi as isOutputTargetDocsReadme, na as DOCS_AGENT_SKILL, ni as getComponentsDtsTypesFilePath, oa as DOCS_README, oi as isOutputTargetCopy, pa as LISTENER_FLAGS, pi as isOutputTargetDocsJson, qi as ASSETS, qr as getInlineSourceMappingUrlLinker, ra as DOCS_CUSTOM, ri as getComponentsFromModules, sa as DOCS_VSCODE, si as isOutputTargetCustom, ta as DIST_LAZY, ti as getComponentsDtsSrcFilePath, ua as GLOBAL_STYLE, ui as isOutputTargetDocsAgentSkill, va as SSR_WASM, vi as isOutputTargetSsr, wa as VALID_CONFIG_OUTPUT_TARGETS, wi as isValidConfigOutputTarget, xa as STYLE_EXT, xi as isOutputTargetStats, ya as STANDALONE, yi as isOutputTargetSsrWasm, zi as loadTypeScriptDiagnostic, zr as isDtsFile } from "../../index-B9-Byy8z.mjs";
|
|
2
2
|
//#region src/utils/byte-size.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Used to learn the size of a string in bytes.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as __require } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
|
-
import { E as SERVER_BUILD_FLAGS, T as HYDRATED_CSS, w as CLIENT_BUILD_FLAGS } from "./client-
|
|
2
|
+
import { E as SERVER_BUILD_FLAGS, T as HYDRATED_CSS, w as CLIENT_BUILD_FLAGS } from "./client-CVXS3JZ-.mjs";
|
|
3
3
|
import { $ as VALID_CONFIG_OUTPUT_TARGETS, A as DIST_LAZY, D as COPY, E as COLLECTION_MANIFEST_FILE_NAME, J as STANDALONE, L as EVENT_FLAGS, P as DOCS_JSON, Q as TYPES, R as GENERATED_DTS, S as ASSETS, T as COLLECTION_APP_DATA_FILE_NAME, U as LOADER_BUNDLE, X as STYLE_EXT, Y as STATS, a as isBoolean$1, b as unique, c as isFunction, d as isObject, et as WATCH_FLAGS, f as isString$1, g as sortBy, i as fromEntries, l as isIterable, m as noop, p as mergeIntoWith, r as flatOne, t as dashToPascalCase, u as isNumber$1, v as toDashCase, w as COLLECTION, y as toTitleCase, z as GLOBAL_STYLE } from "./helpers-Cpp3qc3u.mjs";
|
|
4
4
|
import { E as escapeRegExpSpecialCharacters, S as formatComponentRuntimeMeta, T as byteSize, _ as loadRolldownDiagnostics, a as getSourceMappingUrlForEndOfFile, b as splitLineBreaks, c as err, f as augmentDiagnosticWithNode, g as isRolldownError, h as createOnWarnFn, i as getInlineSourceMappingUrlLinker, l as map, m as loadTypeScriptDiagnostics, n as validateComponentTag, p as loadTypeScriptDiagnostic, r as isRemoteUrl, s as rolldownToStencilSourceMap, t as validateComponentModes, u as ok, w as stringifyRuntimeData, x as isRootPath, y as normalizeDiagnostics } from "./validation-DAdGTrys.mjs";
|
|
5
5
|
import { $ as catchError, A as isOutputTargetDocsVscode, B as relativeImport, C as isOutputTargetDistLazy, D as isOutputTargetDocsCustomElementsManifest, E as isOutputTargetDocsCustom, F as isOutputTargetStandalone, G as normalizeFsPathQuery, H as join$2, I as isOutputTargetStats, J as resolve$2, K as normalizePath, L as isOutputTargetTypes, M as isOutputTargetLoaderBundle, N as isOutputTargetSsr, O as isOutputTargetDocsJson, P as isOutputTargetSsrWasm, Q as buildWarn, R as isOutputTargetWww, S as isOutputTargetCustom, T as isOutputTargetDocsAgentSkill, V as shouldExcludeComponent, W as normalizeFsPath, X as buildError, Z as buildJsonFileError, a as hasDependency, b as isOutputTargetCollection, d as parsePackageJson, et as hasError, f as readOnlyArrayHasStringMember, g as getComponentsDtsSrcFilePath, h as filterExcludedComponents, i as getTextDocs, j as isOutputTargetGlobalStyle, k as isOutputTargetDocsReadme, l as isTsFile, m as filterActiveTargets, n as createJsVarName, o as isDtsFile, p as readPackageJson, q as relative$1, r as generatePreamble, rt as isGlob, t as addDocBlock, tt as hasWarning, u as isTsxFile, v as getComponentsFromModules, w as isOutputTargetDocs, x as isOutputTargetCopy, y as isOutputTargetAssets, z as isValidConfigOutputTarget } from "./util-IKfWWLJo.mjs";
|
|
6
|
-
import { i as CustomElementsExportBehaviorOptions, o as buildEvents, r as createNodeLogger, t as createNodeSys } from "./node-
|
|
6
|
+
import { i as CustomElementsExportBehaviorOptions, o as buildEvents, r as createNodeLogger, t as createNodeSys } from "./node-Bz2SOK7_.mjs";
|
|
7
7
|
import ts, { default as ts$1 } from "typescript";
|
|
8
8
|
import { readFileSync } from "node:fs";
|
|
9
9
|
import { basename, dirname, isAbsolute, join, resolve } from "node:path";
|
|
@@ -461,9 +461,9 @@ const scopeCss = (cssText, scopeId, commentOriginalSelector) => {
|
|
|
461
461
|
};
|
|
462
462
|
//#endregion
|
|
463
463
|
//#region src/version.ts
|
|
464
|
-
const version = "5.0.0-beta.
|
|
465
|
-
const buildId = "
|
|
466
|
-
const vermoji = "
|
|
464
|
+
const version = "5.0.0-beta.20";
|
|
465
|
+
const buildId = "1791812865";
|
|
466
|
+
const vermoji = "🚕";
|
|
467
467
|
/**
|
|
468
468
|
* Get the installed version of a tool/dependency.
|
|
469
469
|
* Handles packages with exports maps that point to subdirectories.
|
|
@@ -10605,7 +10605,7 @@ const generateCustomElementType = (componentsDtsRelPath, cmp) => {
|
|
|
10605
10605
|
`/**`,
|
|
10606
10606
|
` * Used to define this component and all nested components recursively.`,
|
|
10607
10607
|
` */`,
|
|
10608
|
-
`export const defineCustomElement: () => void;`,
|
|
10608
|
+
`export const defineCustomElement: (opts?: { registry?: CustomElementRegistry }) => void;`,
|
|
10609
10609
|
``
|
|
10610
10610
|
].join("\n");
|
|
10611
10611
|
};
|
|
@@ -11554,7 +11554,7 @@ export declare function defineCustomElements(win?: Window, opts?: CustomElements
|
|
|
11554
11554
|
|
|
11555
11555
|
/**
|
|
11556
11556
|
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
11557
|
-
* When set, the nonce will be added to all dynamically created
|
|
11557
|
+
* When set, the nonce will be added to all dynamically created style tags at runtime.
|
|
11558
11558
|
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
11559
11559
|
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
|
|
11560
11560
|
* will result in the same behavior.
|
|
@@ -11603,7 +11603,7 @@ const generateStandaloneApiTypes = async (compilerCtx, typesDir, hasAssets) => {
|
|
|
11603
11603
|
const standaloneDtsContent = `export * from './components';
|
|
11604
11604
|
/**
|
|
11605
11605
|
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
11606
|
-
* When set, the nonce will be added to all dynamically created
|
|
11606
|
+
* When set, the nonce will be added to all dynamically created style tags at runtime.
|
|
11607
11607
|
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
11608
11608
|
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
|
|
11609
11609
|
* will result in the same behavior.
|
|
@@ -12416,11 +12416,6 @@ export function ssrFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateR
|
|
|
12416
12416
|
var setInterval = $stencilWindow.setInterval.bind($stencilWindow);
|
|
12417
12417
|
var setTimeout = $stencilWindow.setTimeout.bind($stencilWindow);
|
|
12418
12418
|
|
|
12419
|
-
// Tag transform functions are provided from the outer scope
|
|
12420
|
-
// This ensures the factory uses the same instance as the runner
|
|
12421
|
-
var setTagTransformer = $stencilTagTransform.setTagTransformer;
|
|
12422
|
-
var transformTag = $stencilTagTransform.transformTag;
|
|
12423
|
-
|
|
12424
12419
|
var CharacterData = $stencilWindow.CharacterData;
|
|
12425
12420
|
var CSS = $stencilWindow.CSS;
|
|
12426
12421
|
var CustomEvent = $stencilWindow.CustomEvent;
|
|
@@ -12798,8 +12793,9 @@ const generateSsrFactoryEntry = async (buildCtx) => {
|
|
|
12798
12793
|
const cmps = buildCtx.components;
|
|
12799
12794
|
const ssrCmps = await updateSsrComponents(cmps);
|
|
12800
12795
|
const s = new MagicString("");
|
|
12801
|
-
s.append(`import { ssrApp, registerComponents, styles } from '${STENCIL_INTERNAL_SSR_PLATFORM_ID}';\n`);
|
|
12796
|
+
s.append(`import { ssrApp, registerComponents, setTagTransformer, styles } from '${STENCIL_INTERNAL_SSR_PLATFORM_ID}';\n`);
|
|
12802
12797
|
ssrCmps.forEach((cmpData) => s.append(cmpData.importLine + "\n"));
|
|
12798
|
+
s.append(`setTagTransformer((tag) => $stencilTagTransform.transformTag(tag));\n`);
|
|
12803
12799
|
s.append(`registerComponents([\n`);
|
|
12804
12800
|
ssrCmps.forEach((cmpData) => {
|
|
12805
12801
|
s.append(` ${cmpData.uniqueComponentClassName},\n`);
|
|
@@ -1821,7 +1821,7 @@ interface StencilConfig {
|
|
|
1821
1821
|
*/
|
|
1822
1822
|
transformAliasedImportPaths?: boolean;
|
|
1823
1823
|
/**
|
|
1824
|
-
* Passes custom configuration
|
|
1824
|
+
* Passes custom configuration to Rolldown's module resolution (its `resolve` option), e.g. `alias`.
|
|
1825
1825
|
* For further information: https://stenciljs.com/docs/module-bundling
|
|
1826
1826
|
*/
|
|
1827
1827
|
nodeResolve?: NodeResolveConfig;
|
|
@@ -483,7 +483,7 @@ declare function setAssetPath(path: string): string;
|
|
|
483
483
|
/**
|
|
484
484
|
* Used to specify a nonce value that corresponds with an application's
|
|
485
485
|
* [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
|
|
486
|
-
* When set, the nonce will be added to all dynamically created
|
|
486
|
+
* When set, the nonce will be added to all dynamically created style tags at runtime.
|
|
487
487
|
* Alternatively, the nonce value can be set on a `meta` tag in the DOM head
|
|
488
488
|
* (<meta name="csp-nonce" content="{ nonce value here }" />) and will result in the same behavior.
|
|
489
489
|
* @param nonce The value to be used for the nonce attribute.
|
|
@@ -1861,7 +1861,7 @@ interface StencilConfig {
|
|
|
1861
1861
|
*/
|
|
1862
1862
|
transformAliasedImportPaths?: boolean;
|
|
1863
1863
|
/**
|
|
1864
|
-
* Passes custom configuration
|
|
1864
|
+
* Passes custom configuration to Rolldown's module resolution (its `resolve` option), e.g. `alias`.
|
|
1865
1865
|
* For further information: https://stenciljs.com/docs/module-bundling
|
|
1866
1866
|
*/
|
|
1867
1867
|
nodeResolve?: NodeResolveConfig;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ar as RafCallback, cr as TagTransformer, lr as UserBuildConditionals, n as ChildType, nr as ErrorHandler, p as HostElement, rr as FunctionalComponent, sr as ResolutionHandler, ur as VNode, v as PropsType, y as RuntimeRef } from "./index-
|
|
1
|
+
import { ar as RafCallback, cr as TagTransformer, lr as UserBuildConditionals, n as ChildType, nr as ErrorHandler, p as HostElement, rr as FunctionalComponent, sr as ResolutionHandler, ur as VNode, v as PropsType, y as RuntimeRef } from "./index-B9-Byy8z.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 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-
|
|
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-CVXS3JZ-.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,5 +1,5 @@
|
|
|
1
1
|
import { n as __require } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
|
-
import "./client-
|
|
2
|
+
import "./client-CVXS3JZ-.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";
|
|
@@ -1898,35 +1898,10 @@ function createNodeSys(c = {}) {
|
|
|
1898
1898
|
totalmem: totalmem()
|
|
1899
1899
|
}
|
|
1900
1900
|
};
|
|
1901
|
-
sys.lazyRequire = new NodeLazyRequire(new NodeResolveModule(), {
|
|
1902
|
-
"
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
maxVersion: "29.0.0"
|
|
1906
|
-
},
|
|
1907
|
-
jest: {
|
|
1908
|
-
minVersion: "24.9.0",
|
|
1909
|
-
recommendedVersion: "29",
|
|
1910
|
-
maxVersion: "29.0.0"
|
|
1911
|
-
},
|
|
1912
|
-
"jest-cli": {
|
|
1913
|
-
minVersion: "24.9.0",
|
|
1914
|
-
recommendedVersion: "29",
|
|
1915
|
-
maxVersion: "29.0.0"
|
|
1916
|
-
},
|
|
1917
|
-
puppeteer: {
|
|
1918
|
-
minVersion: "10.0.0",
|
|
1919
|
-
recommendedVersion: "20"
|
|
1920
|
-
},
|
|
1921
|
-
"puppeteer-core": {
|
|
1922
|
-
minVersion: "10.0.0",
|
|
1923
|
-
recommendedVersion: "20"
|
|
1924
|
-
},
|
|
1925
|
-
"workbox-build": {
|
|
1926
|
-
minVersion: "4.3.1",
|
|
1927
|
-
recommendedVersion: "4.3.1"
|
|
1928
|
-
}
|
|
1929
|
-
});
|
|
1901
|
+
sys.lazyRequire = new NodeLazyRequire(new NodeResolveModule(), { "workbox-build": {
|
|
1902
|
+
minVersion: "4.3.1",
|
|
1903
|
+
recommendedVersion: "7"
|
|
1904
|
+
} });
|
|
1930
1905
|
prcs.on("SIGINT", runInterruptsCallbacks);
|
|
1931
1906
|
prcs.on("exit", runInterruptsCallbacks);
|
|
1932
1907
|
return sys;
|
|
@@ -1730,6 +1730,11 @@ const setRegistry = (registry) => {
|
|
|
1730
1730
|
_registry = registry;
|
|
1731
1731
|
};
|
|
1732
1732
|
const getRegistry = () => _registry ?? customElements;
|
|
1733
|
+
/**
|
|
1734
|
+
* @param elm a defined component host
|
|
1735
|
+
* @returns the registry the host's class was defined in, else the active registry
|
|
1736
|
+
*/
|
|
1737
|
+
const getHostRegistry = (elm) => elm.constructor._registry ?? getRegistry();
|
|
1733
1738
|
//#endregion
|
|
1734
1739
|
//#region src/runtime/vdom/set-accessor.ts
|
|
1735
1740
|
/**
|
|
@@ -1974,6 +1979,7 @@ function sortedAttrNames(attrNames) {
|
|
|
1974
1979
|
let scopeId;
|
|
1975
1980
|
let contentRef;
|
|
1976
1981
|
let hostTagName;
|
|
1982
|
+
let hostRegistry;
|
|
1977
1983
|
let useNativeShadowDom = false;
|
|
1978
1984
|
let checkSlotFallbackVisibility = false;
|
|
1979
1985
|
let checkSlotRelocate = false;
|
|
@@ -2047,8 +2053,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2047
2053
|
if (BUILD.svg && !isSvgMode) isSvgMode = newVNode.$tag$ === "svg";
|
|
2048
2054
|
if (!win.document) throw new Error("No DOM environment available for rendering.");
|
|
2049
2055
|
const tag = !useNativeShadowDom && BUILD.slotRelocation && newVNode.$flags$ & VNODE_FLAGS.isSlotFallback ? "slot-fb" : newVNode.$tag$;
|
|
2050
|
-
const
|
|
2051
|
-
const registryOpts = _reg !== win.customElements && tag.includes("-") ? { customElementRegistry: _reg } : void 0;
|
|
2056
|
+
const registryOpts = hostRegistry !== win.customElements && tag.includes("-") ? { customElementRegistry: hostRegistry } : void 0;
|
|
2052
2057
|
elm = newVNode.$elm$ = BUILD.svg && isSvgMode ? win.document.createElementNS(SVG_NS, tag) : win.document.createElement(tag, registryOpts);
|
|
2053
2058
|
if (BUILD.svg && isSvgMode && newVNode.$tag$ === "foreignObject") isSvgMode = false;
|
|
2054
2059
|
if (BUILD.vdomAttribute) updateElement(null, newVNode, isSvgMode);
|
|
@@ -2597,6 +2602,7 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2597
2602
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
2598
2603
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
2599
2604
|
hostTagName = hostElm.tagName;
|
|
2605
|
+
hostRegistry = getHostRegistry(hostElm);
|
|
2600
2606
|
if (BUILD.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) throw new Error(`The <Host> must be the single root component.
|
|
2601
2607
|
Looks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.
|
|
2602
2608
|
|
|
@@ -2749,11 +2755,12 @@ const markFirstConnected = (hostRef) => {
|
|
|
2749
2755
|
* autoloader, where the ancestor tag may not be defined yet.
|
|
2750
2756
|
*
|
|
2751
2757
|
* @param ancestorElm the nearest Stencil ancestor element
|
|
2758
|
+
* @param registry the registry the waiting component is defined in
|
|
2752
2759
|
*/
|
|
2753
|
-
const awaitAncestorConnected = async (ancestorElm) => {
|
|
2760
|
+
const awaitAncestorConnected = async (ancestorElm, registry) => {
|
|
2754
2761
|
let ancestorHostRef = getHostRef(ancestorElm);
|
|
2755
2762
|
if (!BUILD.lazyLoad && !ancestorHostRef) {
|
|
2756
|
-
await
|
|
2763
|
+
await registry.whenDefined(ancestorElm.tagName.toLowerCase());
|
|
2757
2764
|
ancestorHostRef = getHostRef(ancestorElm);
|
|
2758
2765
|
}
|
|
2759
2766
|
if (ancestorHostRef && !(ancestorHostRef.$flags$ & HOST_FLAGS.hasFiredConnected)) await ensureFirstConnectPromise(ancestorHostRef);
|
|
@@ -4548,7 +4555,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
4548
4555
|
replayPendingSetterValues(hostRef, cmpMeta);
|
|
4549
4556
|
}
|
|
4550
4557
|
endNewInstance();
|
|
4551
|
-
if (BUILD.asyncLoading && hostRef.$ancestorComponent$) await awaitAncestorConnected(hostRef.$ancestorComponent
|
|
4558
|
+
if (BUILD.asyncLoading && hostRef.$ancestorComponent$) await awaitAncestorConnected(hostRef.$ancestorComponent$, getHostRegistry(elm));
|
|
4552
4559
|
if (!(BUILD.slotRelocation && cmpMeta.$flags$ & CMP_FLAGS.hasSlotRelocation)) {
|
|
4553
4560
|
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
4554
4561
|
if (BUILD.asyncLoading) markFirstConnected(hostRef);
|
|
@@ -4878,7 +4885,7 @@ const proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
4878
4885
|
}
|
|
4879
4886
|
connectedCallback(this);
|
|
4880
4887
|
if (BUILD.asyncLoading && hostRef && hostRef.$ancestorComponent$) {
|
|
4881
|
-
await awaitAncestorConnected(hostRef.$ancestorComponent
|
|
4888
|
+
await awaitAncestorConnected(hostRef.$ancestorComponent$, getHostRegistry(this));
|
|
4882
4889
|
if (!this.isConnected) return;
|
|
4883
4890
|
}
|
|
4884
4891
|
if (originalConnectedCallback && (plt.$flags$ & PLATFORM_FLAGS.isTmpDisconnected) === 0) originalConnectedCallback.call(this);
|
|
@@ -5193,7 +5200,7 @@ function Mixin(...mixins) {
|
|
|
5193
5200
|
//#region src/runtime/nonce.ts
|
|
5194
5201
|
/**
|
|
5195
5202
|
* Assigns the given value to the nonce property on the runtime platform object.
|
|
5196
|
-
* During runtime, this value is used to set the nonce attribute on all dynamically created
|
|
5203
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created style tags.
|
|
5197
5204
|
* @param nonce The value to be assigned to the platform nonce property.
|
|
5198
5205
|
* @returns void
|
|
5199
5206
|
*/
|
|
@@ -2390,7 +2390,7 @@ declare const getMode: (ref: RuntimeRef) => string;
|
|
|
2390
2390
|
//#region src/runtime/nonce.d.ts
|
|
2391
2391
|
/**
|
|
2392
2392
|
* Assigns the given value to the nonce property on the runtime platform object.
|
|
2393
|
-
* During runtime, this value is used to set the nonce attribute on all dynamically created
|
|
2393
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created style tags.
|
|
2394
2394
|
* @param nonce The value to be assigned to the platform nonce property.
|
|
2395
2395
|
* @returns void
|
|
2396
2396
|
*/
|
|
@@ -1724,6 +1724,11 @@ const setRegistry = (registry) => {
|
|
|
1724
1724
|
_registry = registry;
|
|
1725
1725
|
};
|
|
1726
1726
|
const getRegistry = () => _registry ?? customElements;
|
|
1727
|
+
/**
|
|
1728
|
+
* @param elm a defined component host
|
|
1729
|
+
* @returns the registry the host's class was defined in, else the active registry
|
|
1730
|
+
*/
|
|
1731
|
+
const getHostRegistry = (elm) => elm.constructor._registry ?? getRegistry();
|
|
1727
1732
|
//#endregion
|
|
1728
1733
|
//#region src/runtime/vdom/set-accessor.ts
|
|
1729
1734
|
/**
|
|
@@ -1968,6 +1973,7 @@ function sortedAttrNames(attrNames) {
|
|
|
1968
1973
|
let scopeId;
|
|
1969
1974
|
let contentRef;
|
|
1970
1975
|
let hostTagName;
|
|
1976
|
+
let hostRegistry;
|
|
1971
1977
|
let useNativeShadowDom = false;
|
|
1972
1978
|
let checkSlotFallbackVisibility = false;
|
|
1973
1979
|
let checkSlotRelocate = false;
|
|
@@ -2041,8 +2047,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2041
2047
|
if (BUILD$1.svg && !isSvgMode) isSvgMode = newVNode.$tag$ === "svg";
|
|
2042
2048
|
if (!win.document) throw new Error("No DOM environment available for rendering.");
|
|
2043
2049
|
const tag = !useNativeShadowDom && BUILD$1.slotRelocation && newVNode.$flags$ & VNODE_FLAGS.isSlotFallback ? "slot-fb" : newVNode.$tag$;
|
|
2044
|
-
const
|
|
2045
|
-
const registryOpts = _reg !== win.customElements && tag.includes("-") ? { customElementRegistry: _reg } : void 0;
|
|
2050
|
+
const registryOpts = hostRegistry !== win.customElements && tag.includes("-") ? { customElementRegistry: hostRegistry } : void 0;
|
|
2046
2051
|
elm = newVNode.$elm$ = BUILD$1.svg && isSvgMode ? win.document.createElementNS(SVG_NS, tag) : win.document.createElement(tag, registryOpts);
|
|
2047
2052
|
if (BUILD$1.svg && isSvgMode && newVNode.$tag$ === "foreignObject") isSvgMode = false;
|
|
2048
2053
|
if (BUILD$1.vdomAttribute) updateElement(null, newVNode, isSvgMode);
|
|
@@ -2591,6 +2596,7 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2591
2596
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
2592
2597
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
2593
2598
|
hostTagName = hostElm.tagName;
|
|
2599
|
+
hostRegistry = getHostRegistry(hostElm);
|
|
2594
2600
|
if (BUILD$1.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) throw new Error(`The <Host> must be the single root component.
|
|
2595
2601
|
Looks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.
|
|
2596
2602
|
|
|
@@ -2743,11 +2749,12 @@ const markFirstConnected = (hostRef) => {
|
|
|
2743
2749
|
* autoloader, where the ancestor tag may not be defined yet.
|
|
2744
2750
|
*
|
|
2745
2751
|
* @param ancestorElm the nearest Stencil ancestor element
|
|
2752
|
+
* @param registry the registry the waiting component is defined in
|
|
2746
2753
|
*/
|
|
2747
|
-
const awaitAncestorConnected = async (ancestorElm) => {
|
|
2754
|
+
const awaitAncestorConnected = async (ancestorElm, registry) => {
|
|
2748
2755
|
let ancestorHostRef = getHostRef(ancestorElm);
|
|
2749
2756
|
if (!BUILD$1.lazyLoad && !ancestorHostRef) {
|
|
2750
|
-
await
|
|
2757
|
+
await registry.whenDefined(ancestorElm.tagName.toLowerCase());
|
|
2751
2758
|
ancestorHostRef = getHostRef(ancestorElm);
|
|
2752
2759
|
}
|
|
2753
2760
|
if (ancestorHostRef && !(ancestorHostRef.$flags$ & HOST_FLAGS.hasFiredConnected)) await ensureFirstConnectPromise(ancestorHostRef);
|
|
@@ -4542,7 +4549,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
4542
4549
|
replayPendingSetterValues(hostRef, cmpMeta);
|
|
4543
4550
|
}
|
|
4544
4551
|
endNewInstance();
|
|
4545
|
-
if (BUILD$1.asyncLoading && hostRef.$ancestorComponent$) await awaitAncestorConnected(hostRef.$ancestorComponent
|
|
4552
|
+
if (BUILD$1.asyncLoading && hostRef.$ancestorComponent$) await awaitAncestorConnected(hostRef.$ancestorComponent$, getHostRegistry(elm));
|
|
4546
4553
|
if (!(BUILD$1.slotRelocation && cmpMeta.$flags$ & CMP_FLAGS.hasSlotRelocation)) {
|
|
4547
4554
|
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
4548
4555
|
if (BUILD$1.asyncLoading) markFirstConnected(hostRef);
|
|
@@ -4872,7 +4879,7 @@ const proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
4872
4879
|
}
|
|
4873
4880
|
connectedCallback(this);
|
|
4874
4881
|
if (BUILD$1.asyncLoading && hostRef && hostRef.$ancestorComponent$) {
|
|
4875
|
-
await awaitAncestorConnected(hostRef.$ancestorComponent
|
|
4882
|
+
await awaitAncestorConnected(hostRef.$ancestorComponent$, getHostRegistry(this));
|
|
4876
4883
|
if (!this.isConnected) return;
|
|
4877
4884
|
}
|
|
4878
4885
|
if (originalConnectedCallback && (plt.$flags$ & PLATFORM_FLAGS.isTmpDisconnected) === 0) originalConnectedCallback.call(this);
|
|
@@ -5187,7 +5194,7 @@ function Mixin(...mixins) {
|
|
|
5187
5194
|
//#region src/runtime/nonce.ts
|
|
5188
5195
|
/**
|
|
5189
5196
|
* Assigns the given value to the nonce property on the runtime platform object.
|
|
5190
|
-
* During runtime, this value is used to set the nonce attribute on all dynamically created
|
|
5197
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created style tags.
|
|
5191
5198
|
* @param nonce The value to be assigned to the platform nonce property.
|
|
5192
5199
|
* @returns void
|
|
5193
5200
|
*/
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ declare const getMode: (ref: RuntimeRef) => string;
|
|
|
84
84
|
//#region src/runtime/nonce.d.ts
|
|
85
85
|
/**
|
|
86
86
|
* Assigns the given value to the nonce property on the runtime platform object.
|
|
87
|
-
* During runtime, this value is used to set the nonce attribute on all dynamically created
|
|
87
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created style tags.
|
|
88
88
|
* @param nonce The value to be assigned to the platform nonce property.
|
|
89
89
|
* @returns void
|
|
90
90
|
*/
|
package/dist/runtime/index.js
CHANGED
|
@@ -1596,6 +1596,11 @@ const setRegistry = (registry) => {
|
|
|
1596
1596
|
_registry = registry;
|
|
1597
1597
|
};
|
|
1598
1598
|
const getRegistry = () => _registry ?? customElements;
|
|
1599
|
+
/**
|
|
1600
|
+
* @param elm a defined component host
|
|
1601
|
+
* @returns the registry the host's class was defined in, else the active registry
|
|
1602
|
+
*/
|
|
1603
|
+
const getHostRegistry = (elm) => elm.constructor._registry ?? getRegistry();
|
|
1599
1604
|
//#endregion
|
|
1600
1605
|
//#region src/runtime/vdom/set-accessor.ts
|
|
1601
1606
|
/**
|
|
@@ -1840,6 +1845,7 @@ function sortedAttrNames(attrNames) {
|
|
|
1840
1845
|
let scopeId;
|
|
1841
1846
|
let contentRef;
|
|
1842
1847
|
let hostTagName;
|
|
1848
|
+
let hostRegistry;
|
|
1843
1849
|
let useNativeShadowDom = false;
|
|
1844
1850
|
let checkSlotFallbackVisibility = false;
|
|
1845
1851
|
let checkSlotRelocate = false;
|
|
@@ -1913,8 +1919,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
1913
1919
|
if (BUILD.svg && !isSvgMode) isSvgMode = newVNode.$tag$ === "svg";
|
|
1914
1920
|
if (!win.document) throw new Error("No DOM environment available for rendering.");
|
|
1915
1921
|
const tag = !useNativeShadowDom && BUILD.slotRelocation && newVNode.$flags$ & VNODE_FLAGS.isSlotFallback ? "slot-fb" : newVNode.$tag$;
|
|
1916
|
-
const
|
|
1917
|
-
const registryOpts = _reg !== win.customElements && tag.includes("-") ? { customElementRegistry: _reg } : void 0;
|
|
1922
|
+
const registryOpts = hostRegistry !== win.customElements && tag.includes("-") ? { customElementRegistry: hostRegistry } : void 0;
|
|
1918
1923
|
elm = newVNode.$elm$ = BUILD.svg && isSvgMode ? win.document.createElementNS(SVG_NS, tag) : win.document.createElement(tag, registryOpts);
|
|
1919
1924
|
if (BUILD.svg && isSvgMode && newVNode.$tag$ === "foreignObject") isSvgMode = false;
|
|
1920
1925
|
if (BUILD.vdomAttribute) updateElement(null, newVNode, isSvgMode);
|
|
@@ -2463,6 +2468,7 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2463
2468
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
2464
2469
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
2465
2470
|
hostTagName = hostElm.tagName;
|
|
2471
|
+
hostRegistry = getHostRegistry(hostElm);
|
|
2466
2472
|
if (BUILD.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) throw new Error(`The <Host> must be the single root component.
|
|
2467
2473
|
Looks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.
|
|
2468
2474
|
|
|
@@ -2615,11 +2621,12 @@ const markFirstConnected = (hostRef) => {
|
|
|
2615
2621
|
* autoloader, where the ancestor tag may not be defined yet.
|
|
2616
2622
|
*
|
|
2617
2623
|
* @param ancestorElm the nearest Stencil ancestor element
|
|
2624
|
+
* @param registry the registry the waiting component is defined in
|
|
2618
2625
|
*/
|
|
2619
|
-
const awaitAncestorConnected = async (ancestorElm) => {
|
|
2626
|
+
const awaitAncestorConnected = async (ancestorElm, registry) => {
|
|
2620
2627
|
let ancestorHostRef = getHostRef(ancestorElm);
|
|
2621
2628
|
if (!BUILD.lazyLoad && !ancestorHostRef) {
|
|
2622
|
-
await
|
|
2629
|
+
await registry.whenDefined(ancestorElm.tagName.toLowerCase());
|
|
2623
2630
|
ancestorHostRef = getHostRef(ancestorElm);
|
|
2624
2631
|
}
|
|
2625
2632
|
if (ancestorHostRef && !(ancestorHostRef.$flags$ & HOST_FLAGS.hasFiredConnected)) await ensureFirstConnectPromise(ancestorHostRef);
|
|
@@ -4414,7 +4421,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
4414
4421
|
replayPendingSetterValues(hostRef, cmpMeta);
|
|
4415
4422
|
}
|
|
4416
4423
|
endNewInstance();
|
|
4417
|
-
if (BUILD.asyncLoading && hostRef.$ancestorComponent$) await awaitAncestorConnected(hostRef.$ancestorComponent
|
|
4424
|
+
if (BUILD.asyncLoading && hostRef.$ancestorComponent$) await awaitAncestorConnected(hostRef.$ancestorComponent$, getHostRegistry(elm));
|
|
4418
4425
|
if (!(BUILD.slotRelocation && cmpMeta.$flags$ & CMP_FLAGS.hasSlotRelocation)) {
|
|
4419
4426
|
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
4420
4427
|
if (BUILD.asyncLoading) markFirstConnected(hostRef);
|
|
@@ -4744,7 +4751,7 @@ const proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
4744
4751
|
}
|
|
4745
4752
|
connectedCallback(this);
|
|
4746
4753
|
if (BUILD.asyncLoading && hostRef && hostRef.$ancestorComponent$) {
|
|
4747
|
-
await awaitAncestorConnected(hostRef.$ancestorComponent
|
|
4754
|
+
await awaitAncestorConnected(hostRef.$ancestorComponent$, getHostRegistry(this));
|
|
4748
4755
|
if (!this.isConnected) return;
|
|
4749
4756
|
}
|
|
4750
4757
|
if (originalConnectedCallback && (plt.$flags$ & PLATFORM_FLAGS.isTmpDisconnected) === 0) originalConnectedCallback.call(this);
|
|
@@ -5059,7 +5066,7 @@ function Mixin(...mixins) {
|
|
|
5059
5066
|
//#region src/runtime/nonce.ts
|
|
5060
5067
|
/**
|
|
5061
5068
|
* Assigns the given value to the nonce property on the runtime platform object.
|
|
5062
|
-
* During runtime, this value is used to set the nonce attribute on all dynamically created
|
|
5069
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created style tags.
|
|
5063
5070
|
* @param nonce The value to be assigned to the platform nonce property.
|
|
5064
5071
|
* @returns void
|
|
5065
5072
|
*/
|
|
@@ -1107,7 +1107,7 @@ declare const getMode: (ref: RuntimeRef) => string;
|
|
|
1107
1107
|
//#region src/runtime/nonce.d.ts
|
|
1108
1108
|
/**
|
|
1109
1109
|
* Assigns the given value to the nonce property on the runtime platform object.
|
|
1110
|
-
* During runtime, this value is used to set the nonce attribute on all dynamically created
|
|
1110
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created style tags.
|
|
1111
1111
|
* @param nonce The value to be assigned to the platform nonce property.
|
|
1112
1112
|
* @returns void
|
|
1113
1113
|
*/
|
|
@@ -81,6 +81,25 @@ const SERVER_BUILD_FLAGS = {
|
|
|
81
81
|
isDev: false,
|
|
82
82
|
isTesting: false
|
|
83
83
|
};
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region src/runtime/tag-transform.ts
|
|
86
|
+
let tagTransformer = void 0;
|
|
87
|
+
/**
|
|
88
|
+
* Transforms a tag name using the current tag transformer
|
|
89
|
+
* @param tag - the tag to transform e.g. `my-tag`
|
|
90
|
+
* @returns the transformed tag e.g. `new-my-tag`
|
|
91
|
+
*/
|
|
92
|
+
function transformTag(tag) {
|
|
93
|
+
if (!tagTransformer) return tag;
|
|
94
|
+
return tagTransformer(tag);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Sets the tag transformer to be used when rendering custom elements
|
|
98
|
+
* @param transformer the transformer function to use. Must return a string
|
|
99
|
+
*/
|
|
100
|
+
function setTagTransformer(transformer) {
|
|
101
|
+
tagTransformer = transformer;
|
|
102
|
+
}
|
|
84
103
|
const MEMBER_FLAGS = {
|
|
85
104
|
String: 1,
|
|
86
105
|
Number: 2,
|
|
@@ -1349,6 +1368,11 @@ const emitEvent = (elm, name, opts) => {
|
|
|
1349
1368
|
return ev;
|
|
1350
1369
|
};
|
|
1351
1370
|
const getRegistry = () => customElements;
|
|
1371
|
+
/**
|
|
1372
|
+
* @param elm a defined component host
|
|
1373
|
+
* @returns the registry the host's class was defined in, else the active registry
|
|
1374
|
+
*/
|
|
1375
|
+
const getHostRegistry = (elm) => elm.constructor._registry ?? getRegistry();
|
|
1352
1376
|
//#endregion
|
|
1353
1377
|
//#region src/runtime/vdom/set-accessor.ts
|
|
1354
1378
|
/**
|
|
@@ -1593,6 +1617,7 @@ function sortedAttrNames(attrNames) {
|
|
|
1593
1617
|
let scopeId;
|
|
1594
1618
|
let contentRef;
|
|
1595
1619
|
let hostTagName;
|
|
1620
|
+
let hostRegistry;
|
|
1596
1621
|
let useNativeShadowDom = false;
|
|
1597
1622
|
let checkSlotFallbackVisibility = false;
|
|
1598
1623
|
let checkSlotRelocate = false;
|
|
@@ -1666,8 +1691,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
1666
1691
|
if (BUILD$1.svg && !isSvgMode) isSvgMode = newVNode.$tag$ === "svg";
|
|
1667
1692
|
if (!win.document) throw new Error("No DOM environment available for rendering.");
|
|
1668
1693
|
const tag = !useNativeShadowDom && BUILD$1.slotRelocation && newVNode.$flags$ & VNODE_FLAGS.isSlotFallback ? "slot-fb" : newVNode.$tag$;
|
|
1669
|
-
const
|
|
1670
|
-
const registryOpts = _reg !== win.customElements && tag.includes("-") ? { customElementRegistry: _reg } : void 0;
|
|
1694
|
+
const registryOpts = hostRegistry !== win.customElements && tag.includes("-") ? { customElementRegistry: hostRegistry } : void 0;
|
|
1671
1695
|
elm = newVNode.$elm$ = BUILD$1.svg && isSvgMode ? win.document.createElementNS(SVG_NS, tag) : win.document.createElement(tag, registryOpts);
|
|
1672
1696
|
if (BUILD$1.svg && isSvgMode && newVNode.$tag$ === "foreignObject") isSvgMode = false;
|
|
1673
1697
|
if (BUILD$1.vdomAttribute) updateElement(null, newVNode, isSvgMode);
|
|
@@ -2216,6 +2240,7 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2216
2240
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
2217
2241
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
2218
2242
|
hostTagName = hostElm.tagName;
|
|
2243
|
+
hostRegistry = getHostRegistry(hostElm);
|
|
2219
2244
|
if (BUILD$1.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) throw new Error(`The <Host> must be the single root component.
|
|
2220
2245
|
Looks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.
|
|
2221
2246
|
|
|
@@ -2368,11 +2393,12 @@ const markFirstConnected = (hostRef) => {
|
|
|
2368
2393
|
* autoloader, where the ancestor tag may not be defined yet.
|
|
2369
2394
|
*
|
|
2370
2395
|
* @param ancestorElm the nearest Stencil ancestor element
|
|
2396
|
+
* @param registry the registry the waiting component is defined in
|
|
2371
2397
|
*/
|
|
2372
|
-
const awaitAncestorConnected = async (ancestorElm) => {
|
|
2398
|
+
const awaitAncestorConnected = async (ancestorElm, registry) => {
|
|
2373
2399
|
let ancestorHostRef = getHostRef(ancestorElm);
|
|
2374
2400
|
if (!BUILD$1.lazyLoad && !ancestorHostRef) {
|
|
2375
|
-
await
|
|
2401
|
+
await registry.whenDefined(ancestorElm.tagName.toLowerCase());
|
|
2376
2402
|
ancestorHostRef = getHostRef(ancestorElm);
|
|
2377
2403
|
}
|
|
2378
2404
|
if (ancestorHostRef && !(ancestorHostRef.$flags$ & HOST_FLAGS.hasFiredConnected)) await ensureFirstConnectPromise(ancestorHostRef);
|
|
@@ -4165,7 +4191,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
4165
4191
|
replayPendingSetterValues(hostRef, cmpMeta);
|
|
4166
4192
|
}
|
|
4167
4193
|
endNewInstance();
|
|
4168
|
-
if (BUILD$1.asyncLoading && hostRef.$ancestorComponent$) await awaitAncestorConnected(hostRef.$ancestorComponent
|
|
4194
|
+
if (BUILD$1.asyncLoading && hostRef.$ancestorComponent$) await awaitAncestorConnected(hostRef.$ancestorComponent$, getHostRegistry(elm));
|
|
4169
4195
|
if (!(BUILD$1.slotRelocation && cmpMeta.$flags$ & CMP_FLAGS.hasSlotRelocation)) {
|
|
4170
4196
|
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
4171
4197
|
if (BUILD$1.asyncLoading) markFirstConnected(hostRef);
|
|
@@ -4495,7 +4521,7 @@ const proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
4495
4521
|
}
|
|
4496
4522
|
connectedCallback(this);
|
|
4497
4523
|
if (BUILD$1.asyncLoading && hostRef && hostRef.$ancestorComponent$) {
|
|
4498
|
-
await awaitAncestorConnected(hostRef.$ancestorComponent
|
|
4524
|
+
await awaitAncestorConnected(hostRef.$ancestorComponent$, getHostRegistry(this));
|
|
4499
4525
|
if (!this.isConnected) return;
|
|
4500
4526
|
}
|
|
4501
4527
|
if (originalConnectedCallback && (plt.$flags$ & PLATFORM_FLAGS.isTmpDisconnected) === 0) originalConnectedCallback.call(this);
|
|
@@ -4807,31 +4833,12 @@ function Mixin(...mixins) {
|
|
|
4807
4833
|
//#region src/runtime/nonce.ts
|
|
4808
4834
|
/**
|
|
4809
4835
|
* Assigns the given value to the nonce property on the runtime platform object.
|
|
4810
|
-
* During runtime, this value is used to set the nonce attribute on all dynamically created
|
|
4836
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created style tags.
|
|
4811
4837
|
* @param nonce The value to be assigned to the platform nonce property.
|
|
4812
4838
|
* @returns void
|
|
4813
4839
|
*/
|
|
4814
4840
|
const setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
4815
4841
|
//#endregion
|
|
4816
|
-
//#region src/runtime/tag-transform.ts
|
|
4817
|
-
let tagTransformer = void 0;
|
|
4818
|
-
/**
|
|
4819
|
-
* Transforms a tag name using the current tag transformer
|
|
4820
|
-
* @param tag - the tag to transform e.g. `my-tag`
|
|
4821
|
-
* @returns the transformed tag e.g. `new-my-tag`
|
|
4822
|
-
*/
|
|
4823
|
-
function transformTag(tag) {
|
|
4824
|
-
if (!tagTransformer) return tag;
|
|
4825
|
-
return tagTransformer(tag);
|
|
4826
|
-
}
|
|
4827
|
-
/**
|
|
4828
|
-
* Sets the tag transformer to be used when rendering custom elements
|
|
4829
|
-
* @param transformer the transformer function to use. Must return a string
|
|
4830
|
-
*/
|
|
4831
|
-
function setTagTransformer(transformer) {
|
|
4832
|
-
tagTransformer = transformer;
|
|
4833
|
-
}
|
|
4834
|
-
//#endregion
|
|
4835
4842
|
//#region src/runtime/vdom/jsx-runtime.ts
|
|
4836
4843
|
function jsx(type, props, key) {
|
|
4837
4844
|
const { children, ...rest } = props ?? {};
|
|
@@ -5403,7 +5410,7 @@ const isMemberInElement = (elm, memberName) => {
|
|
|
5403
5410
|
const registerComponents = (Cstrs) => {
|
|
5404
5411
|
for (const Cstr of Cstrs) {
|
|
5405
5412
|
const exportName = Cstr.cmpMeta.$tagName$;
|
|
5406
|
-
const transformedTagName =
|
|
5413
|
+
const transformedTagName = transformTag(exportName);
|
|
5407
5414
|
cmpModules.set(exportName, { [exportName]: Cstr });
|
|
5408
5415
|
if (transformedTagName !== exportName) cmpModules.set(transformedTagName, { [transformedTagName]: Cstr });
|
|
5409
5416
|
}
|
|
@@ -13111,7 +13111,12 @@ const removeUnusedStyleText = (usedSelectors, diagnostics, styleElm) => {
|
|
|
13111
13111
|
//#region src/runtime/runtime-constants.ts
|
|
13112
13112
|
const HYDRATED_STYLE_ID = "sty-id";
|
|
13113
13113
|
const STENCIL_DOC_DATA = "_stencilDocData";
|
|
13114
|
-
|
|
13114
|
+
const SERVER_BUILD_FLAGS = {
|
|
13115
|
+
isBrowser: false,
|
|
13116
|
+
isServer: true,
|
|
13117
|
+
isDev: false,
|
|
13118
|
+
isTesting: false
|
|
13119
|
+
};
|
|
13115
13120
|
//#endregion
|
|
13116
13121
|
//#region src/runtime/tag-transform.ts
|
|
13117
13122
|
let tagTransformer = void 0;
|
|
@@ -13131,6 +13136,8 @@ function transformTag(tag) {
|
|
|
13131
13136
|
function setTagTransformer(transformer) {
|
|
13132
13137
|
tagTransformer = transformer;
|
|
13133
13138
|
}
|
|
13139
|
+
({ ...SERVER_BUILD_FLAGS });
|
|
13140
|
+
BUILD.lazyLoad || globalThis.HTMLElement;
|
|
13134
13141
|
//#endregion
|
|
13135
13142
|
//#region src/server/runner/inspect-element.ts
|
|
13136
13143
|
function inspectElement(results, elm, depth) {
|
package/dist/sys/node/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as setupNodeProcess, r as createNodeLogger, t as createNodeSys } from "../../node-
|
|
1
|
+
import { n as setupNodeProcess, r as createNodeLogger, t as createNodeSys } from "../../node-Bz2SOK7_.mjs";
|
|
2
2
|
export { createNodeLogger, createNodeSys, setupNodeProcess };
|
package/dist/sys/node/worker.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as createWorkerMessageHandler } from "../../compiler-
|
|
2
|
-
import { t as createNodeSys } from "../../node-
|
|
1
|
+
import { l as createWorkerMessageHandler } from "../../compiler-CUsOl_Kw.mjs";
|
|
2
|
+
import { t as createNodeSys } from "../../node-Bz2SOK7_.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
|
package/dist/testing/index.d.mts
CHANGED
|
@@ -996,7 +996,7 @@ interface StencilConfig {
|
|
|
996
996
|
*/
|
|
997
997
|
transformAliasedImportPaths?: boolean;
|
|
998
998
|
/**
|
|
999
|
-
* Passes custom configuration
|
|
999
|
+
* Passes custom configuration to Rolldown's module resolution (its `resolve` option), e.g. `alias`.
|
|
1000
1000
|
* For further information: https://stenciljs.com/docs/module-bundling
|
|
1001
1001
|
*/
|
|
1002
1002
|
nodeResolve?: NodeResolveConfig;
|
package/dist/testing/index.mjs
CHANGED
|
@@ -33,7 +33,7 @@ import "@rollup/pluginutils";
|
|
|
33
33
|
import { createHash } from "crypto";
|
|
34
34
|
import { afterAll, vi } from "vitest";
|
|
35
35
|
//#region src/version.ts
|
|
36
|
-
const version = "5.0.0-beta.
|
|
36
|
+
const version = "5.0.0-beta.20";
|
|
37
37
|
const MEMBER_FLAGS = {
|
|
38
38
|
String: 1,
|
|
39
39
|
Number: 2,
|
|
@@ -2123,6 +2123,11 @@ function signal(value, options) {
|
|
|
2123
2123
|
return getCore().signal(value, options);
|
|
2124
2124
|
}
|
|
2125
2125
|
const getRegistry = () => customElements;
|
|
2126
|
+
/**
|
|
2127
|
+
* @param elm a defined component host
|
|
2128
|
+
* @returns the registry the host's class was defined in, else the active registry
|
|
2129
|
+
*/
|
|
2130
|
+
const getHostRegistry = (elm) => elm.constructor._registry ?? getRegistry();
|
|
2126
2131
|
//#endregion
|
|
2127
2132
|
//#region src/runtime/vdom/set-accessor.ts
|
|
2128
2133
|
/**
|
|
@@ -2367,6 +2372,7 @@ function sortedAttrNames(attrNames) {
|
|
|
2367
2372
|
let scopeId;
|
|
2368
2373
|
let contentRef;
|
|
2369
2374
|
let hostTagName;
|
|
2375
|
+
let hostRegistry;
|
|
2370
2376
|
let useNativeShadowDom = false;
|
|
2371
2377
|
let checkSlotFallbackVisibility = false;
|
|
2372
2378
|
let checkSlotRelocate = false;
|
|
@@ -2440,8 +2446,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2440
2446
|
if (BUILD.svg && !isSvgMode) isSvgMode = newVNode.$tag$ === "svg";
|
|
2441
2447
|
if (!win.document) throw new Error("No DOM environment available for rendering.");
|
|
2442
2448
|
const tag = !useNativeShadowDom && BUILD.slotRelocation && newVNode.$flags$ & VNODE_FLAGS.isSlotFallback ? "slot-fb" : newVNode.$tag$;
|
|
2443
|
-
const
|
|
2444
|
-
const registryOpts = _reg !== win.customElements && tag.includes("-") ? { customElementRegistry: _reg } : void 0;
|
|
2449
|
+
const registryOpts = hostRegistry !== win.customElements && tag.includes("-") ? { customElementRegistry: hostRegistry } : void 0;
|
|
2445
2450
|
elm = newVNode.$elm$ = BUILD.svg && isSvgMode ? win.document.createElementNS(SVG_NS, tag) : win.document.createElement(tag, registryOpts);
|
|
2446
2451
|
if (BUILD.svg && isSvgMode && newVNode.$tag$ === "foreignObject") isSvgMode = false;
|
|
2447
2452
|
if (BUILD.vdomAttribute) updateElement(null, newVNode, isSvgMode);
|
|
@@ -2990,6 +2995,7 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2990
2995
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
2991
2996
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
2992
2997
|
hostTagName = hostElm.tagName;
|
|
2998
|
+
hostRegistry = getHostRegistry(hostElm);
|
|
2993
2999
|
if (BUILD.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) throw new Error(`The <Host> must be the single root component.
|
|
2994
3000
|
Looks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.
|
|
2995
3001
|
|
|
@@ -3142,11 +3148,12 @@ const markFirstConnected = (hostRef) => {
|
|
|
3142
3148
|
* autoloader, where the ancestor tag may not be defined yet.
|
|
3143
3149
|
*
|
|
3144
3150
|
* @param ancestorElm the nearest Stencil ancestor element
|
|
3151
|
+
* @param registry the registry the waiting component is defined in
|
|
3145
3152
|
*/
|
|
3146
|
-
const awaitAncestorConnected = async (ancestorElm) => {
|
|
3153
|
+
const awaitAncestorConnected = async (ancestorElm, registry) => {
|
|
3147
3154
|
let ancestorHostRef = getHostRef(ancestorElm);
|
|
3148
3155
|
if (!BUILD.lazyLoad && !ancestorHostRef) {
|
|
3149
|
-
await
|
|
3156
|
+
await registry.whenDefined(ancestorElm.tagName.toLowerCase());
|
|
3150
3157
|
ancestorHostRef = getHostRef(ancestorElm);
|
|
3151
3158
|
}
|
|
3152
3159
|
if (ancestorHostRef && !(ancestorHostRef.$flags$ & HOST_FLAGS.hasFiredConnected)) await ensureFirstConnectPromise(ancestorHostRef);
|
|
@@ -4926,7 +4933,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
4926
4933
|
replayPendingSetterValues(hostRef, cmpMeta);
|
|
4927
4934
|
}
|
|
4928
4935
|
endNewInstance();
|
|
4929
|
-
if (BUILD.asyncLoading && hostRef.$ancestorComponent$) await awaitAncestorConnected(hostRef.$ancestorComponent
|
|
4936
|
+
if (BUILD.asyncLoading && hostRef.$ancestorComponent$) await awaitAncestorConnected(hostRef.$ancestorComponent$, getHostRegistry(elm));
|
|
4930
4937
|
if (!(BUILD.slotRelocation && cmpMeta.$flags$ & CMP_FLAGS.hasSlotRelocation)) {
|
|
4931
4938
|
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
4932
4939
|
if (BUILD.asyncLoading) markFirstConnected(hostRef);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.20",
|
|
4
4
|
"description": "A Compiler for Web Components and Progressive Web Apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -126,9 +126,9 @@
|
|
|
126
126
|
"terser": "^5.50.0",
|
|
127
127
|
"tinyglobby": "^0.2.17",
|
|
128
128
|
"typescript": ">5.0.0 <7.0.0",
|
|
129
|
-
"@stencil/
|
|
130
|
-
"@stencil/mock-doc": "5.0.0-beta.
|
|
131
|
-
"@stencil/
|
|
129
|
+
"@stencil/cli": "5.0.0-beta.20",
|
|
130
|
+
"@stencil/mock-doc": "5.0.0-beta.20",
|
|
131
|
+
"@stencil/dev-server": "5.0.0-beta.20"
|
|
132
132
|
},
|
|
133
133
|
"devDependencies": {
|
|
134
134
|
"@ionic/prettier-config": "^4.0.0",
|
|
@@ -138,6 +138,9 @@
|
|
|
138
138
|
"vitest": "^4.1.10",
|
|
139
139
|
"vitest-environment-stencil": "^1.14.0"
|
|
140
140
|
},
|
|
141
|
+
"engines": {
|
|
142
|
+
"node": ">=22.0.0"
|
|
143
|
+
},
|
|
141
144
|
"volta": {
|
|
142
145
|
"extends": "../../package.json"
|
|
143
146
|
},
|