@stencil/core 5.0.0-rc.13 → 5.0.0-rc.15
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/app-data/index.d.ts +1 -1
- package/dist/{client-QadqfKfL.mjs → client-Cpehp9QL.mjs} +1 -0
- package/dist/compiler/browser.js +17 -5
- package/dist/compiler/index.mjs +2 -2
- package/dist/{compiler-DtRfM4dU.mjs → compiler-D92bSZzV.mjs} +37 -12
- package/dist/declarations/stencil-public-runtime.d.ts +51 -0
- package/dist/{index-XQHZl0MW.d.ts → index-CWPcrnEJ.d.ts} +51 -0
- package/dist/index.mjs +1 -1
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/{node-BR2GYgzY.mjs → node-C6N23fLr.mjs} +1 -1
- package/dist/runtime/client/lazy.js +21 -25
- package/dist/runtime/client/runtime.d.ts +51 -0
- package/dist/runtime/client/runtime.js +21 -25
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +21 -25
- package/dist/runtime/server/index.mjs +21 -25
- package/dist/runtime/server/runner.mjs +4 -0
- package/dist/sys/node/index.mjs +1 -1
- package/dist/sys/node/worker.mjs +2 -2
- package/dist/testing/index.mjs +22 -26
- package/package.json +4 -4
package/dist/app-data/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as Env, r as NAMESPACE, t as BUILD } from "../index-
|
|
1
|
+
import { n as Env, r as NAMESPACE, t as BUILD } from "../index-CWPcrnEJ.js";
|
|
2
2
|
export { BUILD, Env, NAMESPACE };
|
|
@@ -910,6 +910,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialR
|
|
|
910
910
|
} else if (BUILD.vdomListener && (BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
|
|
911
911
|
if (memberName[2] === "-") memberName = memberName.slice(3);
|
|
912
912
|
else if (isMemberInElement(win, ln)) memberName = ln.slice(2);
|
|
913
|
+
else if (memberName.endsWith(CAPTURE_EVENT_SUFFIX) && isMemberInElement(win, ln.slice(0, -CAPTURE_EVENT_SUFFIX.length))) memberName = ln.slice(2, -CAPTURE_EVENT_SUFFIX.length) + CAPTURE_EVENT_SUFFIX;
|
|
913
914
|
else memberName = ln[2] + memberName.slice(3);
|
|
914
915
|
if (oldValue || newValue) {
|
|
915
916
|
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
package/dist/compiler/browser.js
CHANGED
|
@@ -1845,7 +1845,7 @@ const validateComponentTag = (tag) => {
|
|
|
1845
1845
|
};
|
|
1846
1846
|
//#endregion
|
|
1847
1847
|
//#region src/version.ts
|
|
1848
|
-
const version = "5.0.0-rc.
|
|
1848
|
+
const version = "5.0.0-rc.15";
|
|
1849
1849
|
//#endregion
|
|
1850
1850
|
//#region src/compiler/events.ts
|
|
1851
1851
|
const buildEvents = () => {
|
|
@@ -13812,11 +13812,23 @@ const resolveStaticStringValue = (expr, typeChecker) => {
|
|
|
13812
13812
|
if (type.isStringLiteral()) return type.value;
|
|
13813
13813
|
}
|
|
13814
13814
|
};
|
|
13815
|
+
/**
|
|
13816
|
+
* Get the outward-facing part names of an `exportparts` value, e.g. `"label, icon: btn-icon"`
|
|
13817
|
+
* exposes `label` and `btn-icon`.
|
|
13818
|
+
*
|
|
13819
|
+
* @param value the `exportparts` attribute value
|
|
13820
|
+
* @returns the part names exposed to the outside
|
|
13821
|
+
*/
|
|
13822
|
+
const parseExportParts = (value) => value.split(",").map((mapping) => {
|
|
13823
|
+
const [innerName, outerName] = mapping.split(":");
|
|
13824
|
+
return (outerName ?? innerName).trim();
|
|
13825
|
+
}).filter((part) => part.length > 0);
|
|
13815
13826
|
const gatherVdomMeta = (m, args, typeChecker) => {
|
|
13816
13827
|
m.hasVdomRender = true;
|
|
13817
13828
|
const hTag = args[0];
|
|
13818
13829
|
const isSlotTag = ts$1.isStringLiteral(hTag) && hTag.text === "slot";
|
|
13819
|
-
|
|
13830
|
+
const isHostTag = ts$1.isIdentifier(hTag) && hTag.text === "Host";
|
|
13831
|
+
if (!ts$1.isStringLiteral(hTag) && !isHostTag) m.hasVdomFunctional = true;
|
|
13820
13832
|
if (args.length > 1) {
|
|
13821
13833
|
const objectLiteral = args[1];
|
|
13822
13834
|
if (ts$1.isCallExpression(objectLiteral) || ts$1.isIdentifier(objectLiteral)) {
|
|
@@ -13856,9 +13868,9 @@ const gatherVdomMeta = (m, args, typeChecker) => {
|
|
|
13856
13868
|
m.hasVdomPropOrAttr = true;
|
|
13857
13869
|
} else if (attrName.startsWith("attr:") || attrName.startsWith("prop:")) m.hasVdomPropOrAttrPrefix = true;
|
|
13858
13870
|
else m.hasVdomPropOrAttr = true;
|
|
13859
|
-
if (attrName === "part" && ts$1.isPropertyAssignment(prop)) {
|
|
13860
|
-
const
|
|
13861
|
-
if (
|
|
13871
|
+
if ((attrName === "part" || attrName === "exportparts") && !isHostTag && ts$1.isPropertyAssignment(prop)) {
|
|
13872
|
+
const value = resolveStaticStringValue(prop.initializer, typeChecker);
|
|
13873
|
+
if (value !== void 0) m.htmlParts.push(...attrName === "part" ? value.split(" ").filter((part) => part.length > 0) : parseExportParts(value));
|
|
13862
13874
|
}
|
|
13863
13875
|
if (isSlotTag && attrName === "name" && ts$1.isPropertyAssignment(prop)) {
|
|
13864
13876
|
const resolvedSlotName = resolveStaticStringValue(prop.initializer, typeChecker);
|
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-D92bSZzV.mjs";
|
|
2
|
+
import { a as LOG_LEVELS, i as CustomElementsExportBehaviorOptions } from "../node-C6N23fLr.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,9 +1,9 @@
|
|
|
1
1
|
import { n as __require } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
|
-
import { A as SSR_PROP_REF_PREFIX, D as HYDRATE_ID, E as HYDRATE_CHILD_ID, O as SERVER_BUILD_FLAGS, T as HYDRATED_CSS, k as SSR_PROPS_REGISTRY_KEY, w as CLIENT_BUILD_FLAGS } from "./client-
|
|
2
|
+
import { A as SSR_PROP_REF_PREFIX, D as HYDRATE_ID, E as HYDRATE_CHILD_ID, O as SERVER_BUILD_FLAGS, T as HYDRATED_CSS, k as SSR_PROPS_REGISTRY_KEY, w as CLIENT_BUILD_FLAGS } from "./client-Cpehp9QL.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-k8xQHE77.mjs";
|
|
4
4
|
import { C as isRootPath, D as byteSize, E as stringifyRuntimeData, O as escapeRegExpSpecialCharacters, S as splitLineBreaks, _ as createOnWarnFn, a as getRolldownSourceMapOptions, c as relativizeSourceMap, d as map, f as ok, g as loadTypeScriptDiagnostics, h as loadTypeScriptDiagnostic, i as getInlineSourceMappingUrlLinker, l as rolldownToStencilSourceMap, m as augmentDiagnosticWithNode, n as validateComponentTag, o as getSourceMappingUrlForEndOfFile, r as isRemoteUrl, t as validateComponentModes, u as err, v as isRolldownError, w as formatComponentRuntimeMeta, x as normalizeDiagnostics, y as loadRolldownDiagnostics } from "./validation-GfBzquhJ.mjs";
|
|
5
5
|
import { $ as buildWarn, A as isOutputTargetDocsVscode, B as isValidConfigOutputTarget, C as isOutputTargetDistLazy, D as isOutputTargetDocsCustomElementsManifest, E as isOutputTargetDocsCustom, F as isOutputTargetSsrWasm, G as normalizeFsPath, H as shouldExcludeComponent, I as isOutputTargetStandalone, J as relative$1, K as normalizeFsPathQuery, L as isOutputTargetStats, M as isOutputTargetLoaderBundle, N as isOutputTargetServerRenderer, O as isOutputTargetDocsJson, P as isOutputTargetSsr, Q as buildJsonFileError, R as isOutputTargetTypes, S as isOutputTargetCustom, T as isOutputTargetDocsAgentSkill, U as join$2, V as relativeImport, Y as resolve$2, Z as buildError, a as hasDependency, b as isOutputTargetCollection, d as parsePackageJson, et as catchError, f as readOnlyArrayHasStringMember, g as getComponentsDtsSrcFilePath, h as filterExcludedComponents, i as getTextDocs, it as isGlob, j as isOutputTargetGlobalStyle, k as isOutputTargetDocsReadme, l as isTsFile, m as filterActiveTargets, n as createJsVarName, nt as hasWarning, o as isDtsFile, p as readPackageJson, q as normalizePath, r as generatePreamble, t as addDocBlock, tt as hasError, u as isTsxFile, v as getComponentsFromModules, w as isOutputTargetDocs, x as isOutputTargetCopy, y as isOutputTargetAssets, z as isOutputTargetWww } from "./util-Cj2D3x_h.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-C6N23fLr.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-rc.
|
|
465
|
-
const buildId = "
|
|
466
|
-
const vermoji = "
|
|
464
|
+
const version = "5.0.0-rc.15";
|
|
465
|
+
const buildId = "1795800086";
|
|
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.
|
|
@@ -8698,7 +8698,8 @@ const getLazyEntry = (isBrowser, assetPath, externalRuntime = false) => {
|
|
|
8698
8698
|
const platformExports = [
|
|
8699
8699
|
"setNonce",
|
|
8700
8700
|
"setRegistry",
|
|
8701
|
-
"setTagTransformer"
|
|
8701
|
+
"setTagTransformer",
|
|
8702
|
+
"transformTag"
|
|
8702
8703
|
];
|
|
8703
8704
|
if (assetPath) platformExports.push("setAssetPath");
|
|
8704
8705
|
s.append(`export { ${platformExports.join(", ")} } from '${STENCIL_CORE_ID}';\n`);
|
|
@@ -11924,6 +11925,12 @@ export type TagTransformer = (tag: string) => string;
|
|
|
11924
11925
|
* Useful for namespacing (e.g. \`my-button\` → \`acme-button\`) in multi-library pages.
|
|
11925
11926
|
*/
|
|
11926
11927
|
export declare function setTagTransformer(transformer: TagTransformer): void;
|
|
11928
|
+
|
|
11929
|
+
/**
|
|
11930
|
+
* Pass a tag name through the installed tag transformer (returns it unchanged if none is set).
|
|
11931
|
+
* Useful for framework wrappers and imperative code that creates components by tag name.
|
|
11932
|
+
*/
|
|
11933
|
+
export declare function transformTag(tag: string): string;
|
|
11927
11934
|
${hasAssets ? `
|
|
11928
11935
|
/**
|
|
11929
11936
|
* Used to manually set the base path where component assets can be found. The
|
|
@@ -11975,6 +11982,12 @@ export type TagTransformer = (tag: string) => string;
|
|
|
11975
11982
|
*/
|
|
11976
11983
|
export declare const setTagTransformer: (transformer: TagTransformer) => void;
|
|
11977
11984
|
|
|
11985
|
+
/**
|
|
11986
|
+
* Pass a tag name through the installed tag transformer (returns it unchanged if none is set).
|
|
11987
|
+
* Useful for framework wrappers and imperative code that creates components by tag name.
|
|
11988
|
+
*/
|
|
11989
|
+
export declare const transformTag: (tag: string) => string;
|
|
11990
|
+
|
|
11978
11991
|
export interface SetPlatformOptions {
|
|
11979
11992
|
raf?: (c: FrameRequestCallback) => number;
|
|
11980
11993
|
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
@@ -14293,7 +14306,7 @@ const generateLoaderModule = (components, outputTarget, relativeAssetPath) => {
|
|
|
14293
14306
|
import { transformTag, getRegistry } from '${STENCIL_INTERNAL_STANDALONE_CLIENT_PLATFORM_ID}';
|
|
14294
14307
|
// The same platform setters as the output's index.js. With \`autoStart: false\`, call them before
|
|
14295
14308
|
// start() - e.g. setRegistry() for a scoped registry - without importing every component.
|
|
14296
|
-
export { setNonce, setRegistry, setTagTransformer, setPlatformOptions } from '${STENCIL_INTERNAL_STANDALONE_CLIENT_PLATFORM_ID}';
|
|
14309
|
+
export { setNonce, setRegistry, setTagTransformer, transformTag, setPlatformOptions } from '${STENCIL_INTERNAL_STANDALONE_CLIENT_PLATFORM_ID}';
|
|
14297
14310
|
${assetPathImport}${assetPathInit}
|
|
14298
14311
|
|
|
14299
14312
|
/**
|
|
@@ -14688,7 +14701,7 @@ const generateEntryPoint = (outputTarget, cmpImports = [], cmpExports = [], cmpN
|
|
|
14688
14701
|
const body = [];
|
|
14689
14702
|
const imports = [];
|
|
14690
14703
|
const exports = [];
|
|
14691
|
-
exports.push(`export { setNonce, setRegistry, setTagTransformer, setPlatformOptions } from '${STENCIL_INTERNAL_STANDALONE_CLIENT_PLATFORM_ID}';`, `export * from '${USER_INDEX_ENTRY_ID}';`);
|
|
14704
|
+
exports.push(`export { setNonce, setRegistry, setTagTransformer, transformTag, setPlatformOptions } from '${STENCIL_INTERNAL_STANDALONE_CLIENT_PLATFORM_ID}';`, `export * from '${USER_INDEX_ENTRY_ID}';`);
|
|
14692
14705
|
if (relativeAssetPath) {
|
|
14693
14706
|
imports.push(`import { setAssetPath } from '${STENCIL_INTERNAL_STANDALONE_CLIENT_PLATFORM_ID}';`);
|
|
14694
14707
|
exports.push(`export { setAssetPath };`);
|
|
@@ -14972,11 +14985,23 @@ const resolveStaticStringValue = (expr, typeChecker) => {
|
|
|
14972
14985
|
if (type.isStringLiteral()) return type.value;
|
|
14973
14986
|
}
|
|
14974
14987
|
};
|
|
14988
|
+
/**
|
|
14989
|
+
* Get the outward-facing part names of an `exportparts` value, e.g. `"label, icon: btn-icon"`
|
|
14990
|
+
* exposes `label` and `btn-icon`.
|
|
14991
|
+
*
|
|
14992
|
+
* @param value the `exportparts` attribute value
|
|
14993
|
+
* @returns the part names exposed to the outside
|
|
14994
|
+
*/
|
|
14995
|
+
const parseExportParts = (value) => value.split(",").map((mapping) => {
|
|
14996
|
+
const [innerName, outerName] = mapping.split(":");
|
|
14997
|
+
return (outerName ?? innerName).trim();
|
|
14998
|
+
}).filter((part) => part.length > 0);
|
|
14975
14999
|
const gatherVdomMeta = (m, args, typeChecker) => {
|
|
14976
15000
|
m.hasVdomRender = true;
|
|
14977
15001
|
const hTag = args[0];
|
|
14978
15002
|
const isSlotTag = ts.isStringLiteral(hTag) && hTag.text === "slot";
|
|
14979
|
-
|
|
15003
|
+
const isHostTag = ts.isIdentifier(hTag) && hTag.text === "Host";
|
|
15004
|
+
if (!ts.isStringLiteral(hTag) && !isHostTag) m.hasVdomFunctional = true;
|
|
14980
15005
|
if (args.length > 1) {
|
|
14981
15006
|
const objectLiteral = args[1];
|
|
14982
15007
|
if (ts.isCallExpression(objectLiteral) || ts.isIdentifier(objectLiteral)) {
|
|
@@ -15016,9 +15041,9 @@ const gatherVdomMeta = (m, args, typeChecker) => {
|
|
|
15016
15041
|
m.hasVdomPropOrAttr = true;
|
|
15017
15042
|
} else if (attrName.startsWith("attr:") || attrName.startsWith("prop:")) m.hasVdomPropOrAttrPrefix = true;
|
|
15018
15043
|
else m.hasVdomPropOrAttr = true;
|
|
15019
|
-
if (attrName === "part" && ts.isPropertyAssignment(prop)) {
|
|
15020
|
-
const
|
|
15021
|
-
if (
|
|
15044
|
+
if ((attrName === "part" || attrName === "exportparts") && !isHostTag && ts.isPropertyAssignment(prop)) {
|
|
15045
|
+
const value = resolveStaticStringValue(prop.initializer, typeChecker);
|
|
15046
|
+
if (value !== void 0) m.htmlParts.push(...attrName === "part" ? value.split(" ").filter((part) => part.length > 0) : parseExportParts(value));
|
|
15022
15047
|
}
|
|
15023
15048
|
if (isSlotTag && attrName === "name" && ts.isPropertyAssignment(prop)) {
|
|
15024
15049
|
const resolvedSlotName = resolveStaticStringValue(prop.initializer, typeChecker);
|
|
@@ -1212,6 +1212,10 @@ declare namespace JSXBase {
|
|
|
1212
1212
|
export interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1213
1213
|
height?: number | string;
|
|
1214
1214
|
width?: number | string;
|
|
1215
|
+
onContextLost?: (event: Event) => void;
|
|
1216
|
+
onContextLostCapture?: (event: Event) => void;
|
|
1217
|
+
onContextRestored?: (event: Event) => void;
|
|
1218
|
+
onContextRestoredCapture?: (event: Event) => void;
|
|
1215
1219
|
}
|
|
1216
1220
|
export interface ColHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1217
1221
|
span?: number;
|
|
@@ -1606,6 +1610,8 @@ declare namespace JSXBase {
|
|
|
1606
1610
|
src?: string;
|
|
1607
1611
|
srcLang?: string;
|
|
1608
1612
|
srclang?: string;
|
|
1613
|
+
onCueChange?: (event: Event) => void;
|
|
1614
|
+
onCueChangeCapture?: (event: Event) => void;
|
|
1609
1615
|
}
|
|
1610
1616
|
export interface VideoHTMLAttributes<T> extends MediaHTMLAttributes<T> {
|
|
1611
1617
|
height?: number | string;
|
|
@@ -1643,6 +1649,14 @@ declare namespace JSXBase {
|
|
|
1643
1649
|
popover?: string | null;
|
|
1644
1650
|
focusgroup?: string;
|
|
1645
1651
|
focusgroupstart?: boolean;
|
|
1652
|
+
virtualKeyboardPolicy?: 'auto' | 'manual' | (string & {});
|
|
1653
|
+
virtualkeyboardpolicy?: 'auto' | 'manual' | (string & {});
|
|
1654
|
+
writingSuggestions?: 'true' | 'false' | (string & {});
|
|
1655
|
+
writingsuggestions?: 'true' | 'false' | (string & {});
|
|
1656
|
+
containertiming?: string;
|
|
1657
|
+
containertimingignore?: boolean;
|
|
1658
|
+
headingoffset?: number | string;
|
|
1659
|
+
headingreset?: boolean;
|
|
1646
1660
|
inputMode?: string;
|
|
1647
1661
|
inputmode?: string;
|
|
1648
1662
|
enterKeyHint?: string;
|
|
@@ -1941,6 +1955,13 @@ declare namespace JSXBase {
|
|
|
1941
1955
|
z?: number | string;
|
|
1942
1956
|
zoomAndPan?: string;
|
|
1943
1957
|
}
|
|
1958
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CommandEvent) */
|
|
1959
|
+
export interface CommandEvent extends Event {
|
|
1960
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CommandEvent/command) */
|
|
1961
|
+
readonly command: string;
|
|
1962
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CommandEvent/source) */
|
|
1963
|
+
readonly source: globalThis.Element | null;
|
|
1964
|
+
}
|
|
1944
1965
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent) */
|
|
1945
1966
|
export interface ToggleEvent extends Event {
|
|
1946
1967
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/newState) */
|
|
@@ -1970,6 +1991,12 @@ declare namespace JSXBase {
|
|
|
1970
1991
|
onBeforeToggleCapture?: (event: ToggleEvent) => void;
|
|
1971
1992
|
onToggle?: (event: ToggleEvent) => void;
|
|
1972
1993
|
onToggleCapture?: (event: ToggleEvent) => void;
|
|
1994
|
+
onBeforeMatch?: (event: Event) => void;
|
|
1995
|
+
onBeforeMatchCapture?: (event: Event) => void;
|
|
1996
|
+
onContentVisibilityAutoStateChange?: (event: ContentVisibilityAutoStateChangeEvent) => void;
|
|
1997
|
+
onContentVisibilityAutoStateChangeCapture?: (event: ContentVisibilityAutoStateChangeEvent) => void;
|
|
1998
|
+
onCommand?: (event: CommandEvent) => void;
|
|
1999
|
+
onCommandCapture?: (event: CommandEvent) => void;
|
|
1973
2000
|
onFocus?: (event: FocusEvent) => void;
|
|
1974
2001
|
onFocusCapture?: (event: FocusEvent) => void;
|
|
1975
2002
|
onFocusin?: (event: FocusEvent) => void;
|
|
@@ -1978,8 +2005,12 @@ declare namespace JSXBase {
|
|
|
1978
2005
|
onFocusoutCapture?: (event: FocusEvent) => void;
|
|
1979
2006
|
onBlur?: (event: FocusEvent) => void;
|
|
1980
2007
|
onBlurCapture?: (event: FocusEvent) => void;
|
|
2008
|
+
onBeforeInput?: (event: InputEvent) => void;
|
|
2009
|
+
onBeforeInputCapture?: (event: InputEvent) => void;
|
|
1981
2010
|
onChange?: (event: Event) => void;
|
|
1982
2011
|
onChangeCapture?: (event: Event) => void;
|
|
2012
|
+
onFormData?: (event: FormDataEvent) => void;
|
|
2013
|
+
onFormDataCapture?: (event: FormDataEvent) => void;
|
|
1983
2014
|
onInput?: (event: InputEvent) => void;
|
|
1984
2015
|
onInputCapture?: (event: InputEvent) => void;
|
|
1985
2016
|
onReset?: (event: Event) => void;
|
|
@@ -1988,6 +2019,16 @@ declare namespace JSXBase {
|
|
|
1988
2019
|
onSubmitCapture?: (event: Event) => void;
|
|
1989
2020
|
onInvalid?: (event: Event) => void;
|
|
1990
2021
|
onInvalidCapture?: (event: Event) => void;
|
|
2022
|
+
onSelectionChange?: (event: Event) => void;
|
|
2023
|
+
onSelectionChangeCapture?: (event: Event) => void;
|
|
2024
|
+
onSelectStart?: (event: Event) => void;
|
|
2025
|
+
onSelectStartCapture?: (event: Event) => void;
|
|
2026
|
+
onFullscreenchange?: (event: Event) => void;
|
|
2027
|
+
onFullscreenchangeCapture?: (event: Event) => void;
|
|
2028
|
+
onFullscreenerror?: (event: Event) => void;
|
|
2029
|
+
onFullscreenerrorCapture?: (event: Event) => void;
|
|
2030
|
+
onSecurityPolicyViolation?: (event: SecurityPolicyViolationEvent) => void;
|
|
2031
|
+
onSecurityPolicyViolationCapture?: (event: SecurityPolicyViolationEvent) => void;
|
|
1991
2032
|
onLoad?: (event: Event) => void;
|
|
1992
2033
|
onLoadCapture?: (event: Event) => void;
|
|
1993
2034
|
onError?: (event: Event) => void;
|
|
@@ -2061,10 +2102,20 @@ declare namespace JSXBase {
|
|
|
2061
2102
|
onGotPointerCaptureCapture?: (event: PointerEvent) => void;
|
|
2062
2103
|
onLostPointerCapture?: (event: PointerEvent) => void;
|
|
2063
2104
|
onLostPointerCaptureCapture?: (event: PointerEvent) => void;
|
|
2105
|
+
onPointerRawUpdate?: (event: PointerEvent) => void;
|
|
2106
|
+
onPointerRawUpdateCapture?: (event: PointerEvent) => void;
|
|
2064
2107
|
onScroll?: (event: UIEvent) => void;
|
|
2065
2108
|
onScrollCapture?: (event: UIEvent) => void;
|
|
2109
|
+
onScrollEnd?: (event: Event) => void;
|
|
2110
|
+
onScrollEndCapture?: (event: Event) => void;
|
|
2111
|
+
onScrollSnapChange?: (event: Event) => void;
|
|
2112
|
+
onScrollSnapChangeCapture?: (event: Event) => void;
|
|
2113
|
+
onScrollSnapChanging?: (event: Event) => void;
|
|
2114
|
+
onScrollSnapChangingCapture?: (event: Event) => void;
|
|
2066
2115
|
onWheel?: (event: WheelEvent) => void;
|
|
2067
2116
|
onWheelCapture?: (event: WheelEvent) => void;
|
|
2117
|
+
onAnimationCancel?: (event: AnimationEvent) => void;
|
|
2118
|
+
onAnimationCancelCapture?: (event: AnimationEvent) => void;
|
|
2068
2119
|
onAnimationStart?: (event: AnimationEvent) => void;
|
|
2069
2120
|
onAnimationStartCapture?: (event: AnimationEvent) => void;
|
|
2070
2121
|
onAnimationEnd?: (event: AnimationEvent) => void;
|
|
@@ -461,6 +461,10 @@ declare namespace JSXBase {
|
|
|
461
461
|
export interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
462
462
|
height?: number | string;
|
|
463
463
|
width?: number | string;
|
|
464
|
+
onContextLost?: (event: Event) => void;
|
|
465
|
+
onContextLostCapture?: (event: Event) => void;
|
|
466
|
+
onContextRestored?: (event: Event) => void;
|
|
467
|
+
onContextRestoredCapture?: (event: Event) => void;
|
|
464
468
|
}
|
|
465
469
|
export interface ColHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
466
470
|
span?: number;
|
|
@@ -855,6 +859,8 @@ declare namespace JSXBase {
|
|
|
855
859
|
src?: string;
|
|
856
860
|
srcLang?: string;
|
|
857
861
|
srclang?: string;
|
|
862
|
+
onCueChange?: (event: Event) => void;
|
|
863
|
+
onCueChangeCapture?: (event: Event) => void;
|
|
858
864
|
}
|
|
859
865
|
export interface VideoHTMLAttributes<T> extends MediaHTMLAttributes<T> {
|
|
860
866
|
height?: number | string;
|
|
@@ -892,6 +898,14 @@ declare namespace JSXBase {
|
|
|
892
898
|
popover?: string | null;
|
|
893
899
|
focusgroup?: string;
|
|
894
900
|
focusgroupstart?: boolean;
|
|
901
|
+
virtualKeyboardPolicy?: 'auto' | 'manual' | (string & {});
|
|
902
|
+
virtualkeyboardpolicy?: 'auto' | 'manual' | (string & {});
|
|
903
|
+
writingSuggestions?: 'true' | 'false' | (string & {});
|
|
904
|
+
writingsuggestions?: 'true' | 'false' | (string & {});
|
|
905
|
+
containertiming?: string;
|
|
906
|
+
containertimingignore?: boolean;
|
|
907
|
+
headingoffset?: number | string;
|
|
908
|
+
headingreset?: boolean;
|
|
895
909
|
inputMode?: string;
|
|
896
910
|
inputmode?: string;
|
|
897
911
|
enterKeyHint?: string;
|
|
@@ -1190,6 +1204,13 @@ declare namespace JSXBase {
|
|
|
1190
1204
|
z?: number | string;
|
|
1191
1205
|
zoomAndPan?: string;
|
|
1192
1206
|
}
|
|
1207
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CommandEvent) */
|
|
1208
|
+
export interface CommandEvent extends Event {
|
|
1209
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CommandEvent/command) */
|
|
1210
|
+
readonly command: string;
|
|
1211
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CommandEvent/source) */
|
|
1212
|
+
readonly source: globalThis.Element | null;
|
|
1213
|
+
}
|
|
1193
1214
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent) */
|
|
1194
1215
|
export interface ToggleEvent extends Event {
|
|
1195
1216
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/newState) */
|
|
@@ -1219,6 +1240,12 @@ declare namespace JSXBase {
|
|
|
1219
1240
|
onBeforeToggleCapture?: (event: ToggleEvent) => void;
|
|
1220
1241
|
onToggle?: (event: ToggleEvent) => void;
|
|
1221
1242
|
onToggleCapture?: (event: ToggleEvent) => void;
|
|
1243
|
+
onBeforeMatch?: (event: Event) => void;
|
|
1244
|
+
onBeforeMatchCapture?: (event: Event) => void;
|
|
1245
|
+
onContentVisibilityAutoStateChange?: (event: ContentVisibilityAutoStateChangeEvent) => void;
|
|
1246
|
+
onContentVisibilityAutoStateChangeCapture?: (event: ContentVisibilityAutoStateChangeEvent) => void;
|
|
1247
|
+
onCommand?: (event: CommandEvent) => void;
|
|
1248
|
+
onCommandCapture?: (event: CommandEvent) => void;
|
|
1222
1249
|
onFocus?: (event: FocusEvent) => void;
|
|
1223
1250
|
onFocusCapture?: (event: FocusEvent) => void;
|
|
1224
1251
|
onFocusin?: (event: FocusEvent) => void;
|
|
@@ -1227,8 +1254,12 @@ declare namespace JSXBase {
|
|
|
1227
1254
|
onFocusoutCapture?: (event: FocusEvent) => void;
|
|
1228
1255
|
onBlur?: (event: FocusEvent) => void;
|
|
1229
1256
|
onBlurCapture?: (event: FocusEvent) => void;
|
|
1257
|
+
onBeforeInput?: (event: InputEvent) => void;
|
|
1258
|
+
onBeforeInputCapture?: (event: InputEvent) => void;
|
|
1230
1259
|
onChange?: (event: Event) => void;
|
|
1231
1260
|
onChangeCapture?: (event: Event) => void;
|
|
1261
|
+
onFormData?: (event: FormDataEvent) => void;
|
|
1262
|
+
onFormDataCapture?: (event: FormDataEvent) => void;
|
|
1232
1263
|
onInput?: (event: InputEvent) => void;
|
|
1233
1264
|
onInputCapture?: (event: InputEvent) => void;
|
|
1234
1265
|
onReset?: (event: Event) => void;
|
|
@@ -1237,6 +1268,16 @@ declare namespace JSXBase {
|
|
|
1237
1268
|
onSubmitCapture?: (event: Event) => void;
|
|
1238
1269
|
onInvalid?: (event: Event) => void;
|
|
1239
1270
|
onInvalidCapture?: (event: Event) => void;
|
|
1271
|
+
onSelectionChange?: (event: Event) => void;
|
|
1272
|
+
onSelectionChangeCapture?: (event: Event) => void;
|
|
1273
|
+
onSelectStart?: (event: Event) => void;
|
|
1274
|
+
onSelectStartCapture?: (event: Event) => void;
|
|
1275
|
+
onFullscreenchange?: (event: Event) => void;
|
|
1276
|
+
onFullscreenchangeCapture?: (event: Event) => void;
|
|
1277
|
+
onFullscreenerror?: (event: Event) => void;
|
|
1278
|
+
onFullscreenerrorCapture?: (event: Event) => void;
|
|
1279
|
+
onSecurityPolicyViolation?: (event: SecurityPolicyViolationEvent) => void;
|
|
1280
|
+
onSecurityPolicyViolationCapture?: (event: SecurityPolicyViolationEvent) => void;
|
|
1240
1281
|
onLoad?: (event: Event) => void;
|
|
1241
1282
|
onLoadCapture?: (event: Event) => void;
|
|
1242
1283
|
onError?: (event: Event) => void;
|
|
@@ -1310,10 +1351,20 @@ declare namespace JSXBase {
|
|
|
1310
1351
|
onGotPointerCaptureCapture?: (event: PointerEvent) => void;
|
|
1311
1352
|
onLostPointerCapture?: (event: PointerEvent) => void;
|
|
1312
1353
|
onLostPointerCaptureCapture?: (event: PointerEvent) => void;
|
|
1354
|
+
onPointerRawUpdate?: (event: PointerEvent) => void;
|
|
1355
|
+
onPointerRawUpdateCapture?: (event: PointerEvent) => void;
|
|
1313
1356
|
onScroll?: (event: UIEvent) => void;
|
|
1314
1357
|
onScrollCapture?: (event: UIEvent) => void;
|
|
1358
|
+
onScrollEnd?: (event: Event) => void;
|
|
1359
|
+
onScrollEndCapture?: (event: Event) => void;
|
|
1360
|
+
onScrollSnapChange?: (event: Event) => void;
|
|
1361
|
+
onScrollSnapChangeCapture?: (event: Event) => void;
|
|
1362
|
+
onScrollSnapChanging?: (event: Event) => void;
|
|
1363
|
+
onScrollSnapChangingCapture?: (event: Event) => void;
|
|
1315
1364
|
onWheel?: (event: WheelEvent) => void;
|
|
1316
1365
|
onWheelCapture?: (event: WheelEvent) => void;
|
|
1366
|
+
onAnimationCancel?: (event: AnimationEvent) => void;
|
|
1367
|
+
onAnimationCancelCapture?: (event: AnimationEvent) => void;
|
|
1317
1368
|
onAnimationStart?: (event: AnimationEvent) => void;
|
|
1318
1369
|
onAnimationStartCapture?: (event: AnimationEvent) => void;
|
|
1319
1370
|
onAnimationEnd?: (event: AnimationEvent) => void;
|
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-Cpehp9QL.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-Cpehp9QL.mjs";
|
|
3
3
|
import { c as isFunction, f as isString, m as noop, r as flatOne } from "./helpers-k8xQHE77.mjs";
|
|
4
4
|
import { X as TASK_CANCELED_MSG, Z as buildError, et as catchError, it as isGlob, q as normalizePath, rt as shouldIgnoreError } from "./util-Cj2D3x_h.mjs";
|
|
5
5
|
import fs from "node:fs";
|
|
@@ -1978,6 +1978,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialR
|
|
|
1978
1978
|
} else if (BUILD.vdomListener && (BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
|
|
1979
1979
|
if (memberName[2] === "-") memberName = memberName.slice(3);
|
|
1980
1980
|
else if (isMemberInElement(win, ln)) memberName = ln.slice(2);
|
|
1981
|
+
else if (memberName.endsWith(CAPTURE_EVENT_SUFFIX) && isMemberInElement(win, ln.slice(0, -CAPTURE_EVENT_SUFFIX.length))) memberName = ln.slice(2, -CAPTURE_EVENT_SUFFIX.length) + CAPTURE_EVENT_SUFFIX;
|
|
1981
1982
|
else memberName = ln[2] + memberName.slice(3);
|
|
1982
1983
|
if (oldValue || newValue) {
|
|
1983
1984
|
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
@@ -5009,12 +5010,12 @@ const hmrApplyClass = (cmpMeta, NewClass) => {
|
|
|
5009
5010
|
/**
|
|
5010
5011
|
* SSR hosts connected while the HTML parser is still inside them (streamed documents),
|
|
5011
5012
|
* in connection order - which is document order. Each is held until its subtree is
|
|
5012
|
-
* parsed so hydration sees its declarative shadow root and children
|
|
5013
|
+
* parsed so hydration sees its declarative shadow root and children, and watched for
|
|
5014
|
+
* its end marker arriving (wherever it is - a document observer can't see into shadow roots).
|
|
5013
5015
|
*/
|
|
5014
|
-
const pending = /* @__PURE__ */ new
|
|
5016
|
+
const pending = /* @__PURE__ */ new Map();
|
|
5015
5017
|
/** SSR hosts seen parsed: hydration may since have moved or removed their end marker */
|
|
5016
|
-
const
|
|
5017
|
-
let observer;
|
|
5018
|
+
const parsedHosts = /* @__PURE__ */ new WeakSet();
|
|
5018
5019
|
const parentOf = (node) => node.parentNode ?? (node.nodeType === NODE_TYPE.DocumentFragment ? node.host : null);
|
|
5019
5020
|
/**
|
|
5020
5021
|
* The server writes a `HOST_END_ID` comment as an SSR host's last child, so the parser has
|
|
@@ -5025,26 +5026,26 @@ const parentOf = (node) => node.parentNode ?? (node.nodeType === NODE_TYPE.Docum
|
|
|
5025
5026
|
* @returns whether the host's subtree is fully parsed
|
|
5026
5027
|
*/
|
|
5027
5028
|
const isParsed = (elm) => {
|
|
5028
|
-
if (
|
|
5029
|
+
if (parsedHosts.has(elm) || win.document.readyState !== "loading") return true;
|
|
5029
5030
|
let n = elm.lastChild;
|
|
5030
5031
|
if (n?.nodeType === NODE_TYPE.TextNode) n = n.previousSibling;
|
|
5031
|
-
return n?.nodeType === NODE_TYPE.CommentNode && n.nodeValue === `e.${elm.getAttribute("s-id")}` && !!
|
|
5032
|
+
return n?.nodeType === NODE_TYPE.CommentNode && n.nodeValue === `e.${elm.getAttribute("s-id")}` && !!parsedHosts.add(elm);
|
|
5032
5033
|
};
|
|
5033
5034
|
const hasPendingAncestor = (elm) => {
|
|
5034
5035
|
for (let n = parentOf(elm); n; n = parentOf(n)) if (pending.has(n)) return true;
|
|
5035
5036
|
return false;
|
|
5036
5037
|
};
|
|
5038
|
+
const drop = (elm) => {
|
|
5039
|
+
pending.get(elm)?.disconnect();
|
|
5040
|
+
pending.delete(elm);
|
|
5041
|
+
};
|
|
5037
5042
|
const flush = () => {
|
|
5038
|
-
for (const elm of pending) if (!elm.isConnected)
|
|
5043
|
+
for (const elm of pending.keys()) if (!elm.isConnected) drop(elm);
|
|
5039
5044
|
else if (isParsed(elm)) elm.__attachShadow?.();
|
|
5040
|
-
for (const elm of pending) if (isParsed(elm) && !hasPendingAncestor(elm)) {
|
|
5041
|
-
|
|
5045
|
+
for (const elm of pending.keys()) if (isParsed(elm) && !hasPendingAncestor(elm)) {
|
|
5046
|
+
drop(elm);
|
|
5042
5047
|
elm.connectedCallback?.();
|
|
5043
5048
|
}
|
|
5044
|
-
if (!pending.size) {
|
|
5045
|
-
observer?.disconnect();
|
|
5046
|
-
observer = void 0;
|
|
5047
|
-
}
|
|
5048
5049
|
};
|
|
5049
5050
|
/**
|
|
5050
5051
|
* Whether the parser may still be adding children (including a declarative shadow root)
|
|
@@ -5063,18 +5064,13 @@ const mayStillBeParsing = (elm) => win.document?.readyState === "loading" && (!e
|
|
|
5063
5064
|
const deferUntilParsed = (elm) => {
|
|
5064
5065
|
if (pending.has(elm)) return true;
|
|
5065
5066
|
if (!win.document || !elm.hasAttribute("s-id")) return false;
|
|
5066
|
-
const
|
|
5067
|
-
if (
|
|
5068
|
-
if (
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
childList: true,
|
|
5074
|
-
subtree: true
|
|
5075
|
-
});
|
|
5076
|
-
win.document.addEventListener("DOMContentLoaded", flush, { once: true });
|
|
5077
|
-
}
|
|
5067
|
+
const done = isParsed(elm);
|
|
5068
|
+
if (done && !hasPendingAncestor(elm)) return false;
|
|
5069
|
+
if (done) elm.__attachShadow?.();
|
|
5070
|
+
const observer = new MutationObserver(flush);
|
|
5071
|
+
observer.observe(elm, { childList: true });
|
|
5072
|
+
pending.set(elm, observer);
|
|
5073
|
+
win.document.addEventListener("DOMContentLoaded", flush, { once: true });
|
|
5078
5074
|
return true;
|
|
5079
5075
|
};
|
|
5080
5076
|
//#endregion
|
|
@@ -472,6 +472,10 @@ declare namespace JSXBase {
|
|
|
472
472
|
export interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
473
473
|
height?: number | string;
|
|
474
474
|
width?: number | string;
|
|
475
|
+
onContextLost?: (event: Event$1) => void;
|
|
476
|
+
onContextLostCapture?: (event: Event$1) => void;
|
|
477
|
+
onContextRestored?: (event: Event$1) => void;
|
|
478
|
+
onContextRestoredCapture?: (event: Event$1) => void;
|
|
475
479
|
}
|
|
476
480
|
export interface ColHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
477
481
|
span?: number;
|
|
@@ -866,6 +870,8 @@ declare namespace JSXBase {
|
|
|
866
870
|
src?: string;
|
|
867
871
|
srcLang?: string;
|
|
868
872
|
srclang?: string;
|
|
873
|
+
onCueChange?: (event: Event$1) => void;
|
|
874
|
+
onCueChangeCapture?: (event: Event$1) => void;
|
|
869
875
|
}
|
|
870
876
|
export interface VideoHTMLAttributes<T> extends MediaHTMLAttributes<T> {
|
|
871
877
|
height?: number | string;
|
|
@@ -903,6 +909,14 @@ declare namespace JSXBase {
|
|
|
903
909
|
popover?: string | null;
|
|
904
910
|
focusgroup?: string;
|
|
905
911
|
focusgroupstart?: boolean;
|
|
912
|
+
virtualKeyboardPolicy?: 'auto' | 'manual' | (string & {});
|
|
913
|
+
virtualkeyboardpolicy?: 'auto' | 'manual' | (string & {});
|
|
914
|
+
writingSuggestions?: 'true' | 'false' | (string & {});
|
|
915
|
+
writingsuggestions?: 'true' | 'false' | (string & {});
|
|
916
|
+
containertiming?: string;
|
|
917
|
+
containertimingignore?: boolean;
|
|
918
|
+
headingoffset?: number | string;
|
|
919
|
+
headingreset?: boolean;
|
|
906
920
|
inputMode?: string;
|
|
907
921
|
inputmode?: string;
|
|
908
922
|
enterKeyHint?: string;
|
|
@@ -1201,6 +1215,13 @@ declare namespace JSXBase {
|
|
|
1201
1215
|
z?: number | string;
|
|
1202
1216
|
zoomAndPan?: string;
|
|
1203
1217
|
}
|
|
1218
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CommandEvent) */
|
|
1219
|
+
export interface CommandEvent extends Event$1 {
|
|
1220
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CommandEvent/command) */
|
|
1221
|
+
readonly command: string;
|
|
1222
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CommandEvent/source) */
|
|
1223
|
+
readonly source: globalThis.Element | null;
|
|
1224
|
+
}
|
|
1204
1225
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent) */
|
|
1205
1226
|
export interface ToggleEvent extends Event$1 {
|
|
1206
1227
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/newState) */
|
|
@@ -1230,6 +1251,12 @@ declare namespace JSXBase {
|
|
|
1230
1251
|
onBeforeToggleCapture?: (event: ToggleEvent) => void;
|
|
1231
1252
|
onToggle?: (event: ToggleEvent) => void;
|
|
1232
1253
|
onToggleCapture?: (event: ToggleEvent) => void;
|
|
1254
|
+
onBeforeMatch?: (event: Event$1) => void;
|
|
1255
|
+
onBeforeMatchCapture?: (event: Event$1) => void;
|
|
1256
|
+
onContentVisibilityAutoStateChange?: (event: ContentVisibilityAutoStateChangeEvent) => void;
|
|
1257
|
+
onContentVisibilityAutoStateChangeCapture?: (event: ContentVisibilityAutoStateChangeEvent) => void;
|
|
1258
|
+
onCommand?: (event: CommandEvent) => void;
|
|
1259
|
+
onCommandCapture?: (event: CommandEvent) => void;
|
|
1233
1260
|
onFocus?: (event: FocusEvent) => void;
|
|
1234
1261
|
onFocusCapture?: (event: FocusEvent) => void;
|
|
1235
1262
|
onFocusin?: (event: FocusEvent) => void;
|
|
@@ -1238,8 +1265,12 @@ declare namespace JSXBase {
|
|
|
1238
1265
|
onFocusoutCapture?: (event: FocusEvent) => void;
|
|
1239
1266
|
onBlur?: (event: FocusEvent) => void;
|
|
1240
1267
|
onBlurCapture?: (event: FocusEvent) => void;
|
|
1268
|
+
onBeforeInput?: (event: InputEvent) => void;
|
|
1269
|
+
onBeforeInputCapture?: (event: InputEvent) => void;
|
|
1241
1270
|
onChange?: (event: Event$1) => void;
|
|
1242
1271
|
onChangeCapture?: (event: Event$1) => void;
|
|
1272
|
+
onFormData?: (event: FormDataEvent) => void;
|
|
1273
|
+
onFormDataCapture?: (event: FormDataEvent) => void;
|
|
1243
1274
|
onInput?: (event: InputEvent) => void;
|
|
1244
1275
|
onInputCapture?: (event: InputEvent) => void;
|
|
1245
1276
|
onReset?: (event: Event$1) => void;
|
|
@@ -1248,6 +1279,16 @@ declare namespace JSXBase {
|
|
|
1248
1279
|
onSubmitCapture?: (event: Event$1) => void;
|
|
1249
1280
|
onInvalid?: (event: Event$1) => void;
|
|
1250
1281
|
onInvalidCapture?: (event: Event$1) => void;
|
|
1282
|
+
onSelectionChange?: (event: Event$1) => void;
|
|
1283
|
+
onSelectionChangeCapture?: (event: Event$1) => void;
|
|
1284
|
+
onSelectStart?: (event: Event$1) => void;
|
|
1285
|
+
onSelectStartCapture?: (event: Event$1) => void;
|
|
1286
|
+
onFullscreenchange?: (event: Event$1) => void;
|
|
1287
|
+
onFullscreenchangeCapture?: (event: Event$1) => void;
|
|
1288
|
+
onFullscreenerror?: (event: Event$1) => void;
|
|
1289
|
+
onFullscreenerrorCapture?: (event: Event$1) => void;
|
|
1290
|
+
onSecurityPolicyViolation?: (event: SecurityPolicyViolationEvent) => void;
|
|
1291
|
+
onSecurityPolicyViolationCapture?: (event: SecurityPolicyViolationEvent) => void;
|
|
1251
1292
|
onLoad?: (event: Event$1) => void;
|
|
1252
1293
|
onLoadCapture?: (event: Event$1) => void;
|
|
1253
1294
|
onError?: (event: Event$1) => void;
|
|
@@ -1321,10 +1362,20 @@ declare namespace JSXBase {
|
|
|
1321
1362
|
onGotPointerCaptureCapture?: (event: PointerEvent) => void;
|
|
1322
1363
|
onLostPointerCapture?: (event: PointerEvent) => void;
|
|
1323
1364
|
onLostPointerCaptureCapture?: (event: PointerEvent) => void;
|
|
1365
|
+
onPointerRawUpdate?: (event: PointerEvent) => void;
|
|
1366
|
+
onPointerRawUpdateCapture?: (event: PointerEvent) => void;
|
|
1324
1367
|
onScroll?: (event: UIEvent) => void;
|
|
1325
1368
|
onScrollCapture?: (event: UIEvent) => void;
|
|
1369
|
+
onScrollEnd?: (event: Event$1) => void;
|
|
1370
|
+
onScrollEndCapture?: (event: Event$1) => void;
|
|
1371
|
+
onScrollSnapChange?: (event: Event$1) => void;
|
|
1372
|
+
onScrollSnapChangeCapture?: (event: Event$1) => void;
|
|
1373
|
+
onScrollSnapChanging?: (event: Event$1) => void;
|
|
1374
|
+
onScrollSnapChangingCapture?: (event: Event$1) => void;
|
|
1326
1375
|
onWheel?: (event: WheelEvent) => void;
|
|
1327
1376
|
onWheelCapture?: (event: WheelEvent) => void;
|
|
1377
|
+
onAnimationCancel?: (event: AnimationEvent) => void;
|
|
1378
|
+
onAnimationCancelCapture?: (event: AnimationEvent) => void;
|
|
1328
1379
|
onAnimationStart?: (event: AnimationEvent) => void;
|
|
1329
1380
|
onAnimationStartCapture?: (event: AnimationEvent) => void;
|
|
1330
1381
|
onAnimationEnd?: (event: AnimationEvent) => void;
|
|
@@ -1972,6 +1972,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialR
|
|
|
1972
1972
|
} else if (BUILD$1.vdomListener && (BUILD$1.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
|
|
1973
1973
|
if (memberName[2] === "-") memberName = memberName.slice(3);
|
|
1974
1974
|
else if (isMemberInElement(win, ln)) memberName = ln.slice(2);
|
|
1975
|
+
else if (memberName.endsWith(CAPTURE_EVENT_SUFFIX) && isMemberInElement(win, ln.slice(0, -CAPTURE_EVENT_SUFFIX.length))) memberName = ln.slice(2, -CAPTURE_EVENT_SUFFIX.length) + CAPTURE_EVENT_SUFFIX;
|
|
1975
1976
|
else memberName = ln[2] + memberName.slice(3);
|
|
1976
1977
|
if (oldValue || newValue) {
|
|
1977
1978
|
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
@@ -5003,12 +5004,12 @@ const hmrApplyClass = (cmpMeta, NewClass) => {
|
|
|
5003
5004
|
/**
|
|
5004
5005
|
* SSR hosts connected while the HTML parser is still inside them (streamed documents),
|
|
5005
5006
|
* in connection order - which is document order. Each is held until its subtree is
|
|
5006
|
-
* parsed so hydration sees its declarative shadow root and children
|
|
5007
|
+
* parsed so hydration sees its declarative shadow root and children, and watched for
|
|
5008
|
+
* its end marker arriving (wherever it is - a document observer can't see into shadow roots).
|
|
5007
5009
|
*/
|
|
5008
|
-
const pending = /* @__PURE__ */ new
|
|
5010
|
+
const pending = /* @__PURE__ */ new Map();
|
|
5009
5011
|
/** SSR hosts seen parsed: hydration may since have moved or removed their end marker */
|
|
5010
|
-
const
|
|
5011
|
-
let observer;
|
|
5012
|
+
const parsedHosts = /* @__PURE__ */ new WeakSet();
|
|
5012
5013
|
const parentOf = (node) => node.parentNode ?? (node.nodeType === NODE_TYPE.DocumentFragment ? node.host : null);
|
|
5013
5014
|
/**
|
|
5014
5015
|
* The server writes a `HOST_END_ID` comment as an SSR host's last child, so the parser has
|
|
@@ -5019,26 +5020,26 @@ const parentOf = (node) => node.parentNode ?? (node.nodeType === NODE_TYPE.Docum
|
|
|
5019
5020
|
* @returns whether the host's subtree is fully parsed
|
|
5020
5021
|
*/
|
|
5021
5022
|
const isParsed = (elm) => {
|
|
5022
|
-
if (
|
|
5023
|
+
if (parsedHosts.has(elm) || win.document.readyState !== "loading") return true;
|
|
5023
5024
|
let n = elm.lastChild;
|
|
5024
5025
|
if (n?.nodeType === NODE_TYPE.TextNode) n = n.previousSibling;
|
|
5025
|
-
return n?.nodeType === NODE_TYPE.CommentNode && n.nodeValue === `e.${elm.getAttribute("s-id")}` && !!
|
|
5026
|
+
return n?.nodeType === NODE_TYPE.CommentNode && n.nodeValue === `e.${elm.getAttribute("s-id")}` && !!parsedHosts.add(elm);
|
|
5026
5027
|
};
|
|
5027
5028
|
const hasPendingAncestor = (elm) => {
|
|
5028
5029
|
for (let n = parentOf(elm); n; n = parentOf(n)) if (pending.has(n)) return true;
|
|
5029
5030
|
return false;
|
|
5030
5031
|
};
|
|
5032
|
+
const drop = (elm) => {
|
|
5033
|
+
pending.get(elm)?.disconnect();
|
|
5034
|
+
pending.delete(elm);
|
|
5035
|
+
};
|
|
5031
5036
|
const flush = () => {
|
|
5032
|
-
for (const elm of pending) if (!elm.isConnected)
|
|
5037
|
+
for (const elm of pending.keys()) if (!elm.isConnected) drop(elm);
|
|
5033
5038
|
else if (isParsed(elm)) elm.__attachShadow?.();
|
|
5034
|
-
for (const elm of pending) if (isParsed(elm) && !hasPendingAncestor(elm)) {
|
|
5035
|
-
|
|
5039
|
+
for (const elm of pending.keys()) if (isParsed(elm) && !hasPendingAncestor(elm)) {
|
|
5040
|
+
drop(elm);
|
|
5036
5041
|
elm.connectedCallback?.();
|
|
5037
5042
|
}
|
|
5038
|
-
if (!pending.size) {
|
|
5039
|
-
observer?.disconnect();
|
|
5040
|
-
observer = void 0;
|
|
5041
|
-
}
|
|
5042
5043
|
};
|
|
5043
5044
|
/**
|
|
5044
5045
|
* Whether the parser may still be adding children (including a declarative shadow root)
|
|
@@ -5057,18 +5058,13 @@ const mayStillBeParsing = (elm) => win.document?.readyState === "loading" && (!e
|
|
|
5057
5058
|
const deferUntilParsed = (elm) => {
|
|
5058
5059
|
if (pending.has(elm)) return true;
|
|
5059
5060
|
if (!win.document || !elm.hasAttribute("s-id")) return false;
|
|
5060
|
-
const
|
|
5061
|
-
if (
|
|
5062
|
-
if (
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
childList: true,
|
|
5068
|
-
subtree: true
|
|
5069
|
-
});
|
|
5070
|
-
win.document.addEventListener("DOMContentLoaded", flush, { once: true });
|
|
5071
|
-
}
|
|
5061
|
+
const done = isParsed(elm);
|
|
5062
|
+
if (done && !hasPendingAncestor(elm)) return false;
|
|
5063
|
+
if (done) elm.__attachShadow?.();
|
|
5064
|
+
const observer = new MutationObserver(flush);
|
|
5065
|
+
observer.observe(elm, { childList: true });
|
|
5066
|
+
pending.set(elm, observer);
|
|
5067
|
+
win.document.addEventListener("DOMContentLoaded", flush, { once: true });
|
|
5072
5068
|
return true;
|
|
5073
5069
|
};
|
|
5074
5070
|
//#endregion
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ReactiveControllerHostInterface, E as VNode, S as MixedInCtor, T as TagTransformer, _ as ComponentInterface, a as ComponentConstructor, b as HTMLStencilElement, c as ComponentRuntimeMeta, d as HostRef, f as LazyBundlesRuntimeData, g as RuntimeRef, h as RenderNode, i as ChildType, l as ComponentRuntimeMetaCompact, m as PropsType, o as ComponentConstructorChangeHandlers, p as PlatformRuntime, s as ComponentRuntimeHostListener, u as HostElement, v as CustomElementsDefineOptions, w as ResolutionHandler, x as JSXBase, y as FunctionalComponent } from "../index-
|
|
1
|
+
import { C as ReactiveControllerHostInterface, E as VNode, S as MixedInCtor, T as TagTransformer, _ as ComponentInterface, a as ComponentConstructor, b as HTMLStencilElement, c as ComponentRuntimeMeta, d as HostRef, f as LazyBundlesRuntimeData, g as RuntimeRef, h as RenderNode, i as ChildType, l as ComponentRuntimeMetaCompact, m as PropsType, o as ComponentConstructorChangeHandlers, p as PlatformRuntime, s as ComponentRuntimeHostListener, u as HostElement, v as CustomElementsDefineOptions, w as ResolutionHandler, x as JSXBase, y as FunctionalComponent } from "../index-CWPcrnEJ.js";
|
|
2
2
|
//#region src/runtime/asset-path.d.ts
|
|
3
3
|
declare const getAssetPath: (path: string) => string;
|
|
4
4
|
declare const setAssetPath: (path: string) => string;
|
package/dist/runtime/index.js
CHANGED
|
@@ -1844,6 +1844,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialR
|
|
|
1844
1844
|
} else if (BUILD.vdomListener && (BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
|
|
1845
1845
|
if (memberName[2] === "-") memberName = memberName.slice(3);
|
|
1846
1846
|
else if (isMemberInElement(win, ln)) memberName = ln.slice(2);
|
|
1847
|
+
else if (memberName.endsWith(CAPTURE_EVENT_SUFFIX) && isMemberInElement(win, ln.slice(0, -CAPTURE_EVENT_SUFFIX.length))) memberName = ln.slice(2, -CAPTURE_EVENT_SUFFIX.length) + CAPTURE_EVENT_SUFFIX;
|
|
1847
1848
|
else memberName = ln[2] + memberName.slice(3);
|
|
1848
1849
|
if (oldValue || newValue) {
|
|
1849
1850
|
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
@@ -4875,12 +4876,12 @@ const hmrApplyClass = (cmpMeta, NewClass) => {
|
|
|
4875
4876
|
/**
|
|
4876
4877
|
* SSR hosts connected while the HTML parser is still inside them (streamed documents),
|
|
4877
4878
|
* in connection order - which is document order. Each is held until its subtree is
|
|
4878
|
-
* parsed so hydration sees its declarative shadow root and children
|
|
4879
|
+
* parsed so hydration sees its declarative shadow root and children, and watched for
|
|
4880
|
+
* its end marker arriving (wherever it is - a document observer can't see into shadow roots).
|
|
4879
4881
|
*/
|
|
4880
|
-
const pending = /* @__PURE__ */ new
|
|
4882
|
+
const pending = /* @__PURE__ */ new Map();
|
|
4881
4883
|
/** SSR hosts seen parsed: hydration may since have moved or removed their end marker */
|
|
4882
|
-
const
|
|
4883
|
-
let observer;
|
|
4884
|
+
const parsedHosts = /* @__PURE__ */ new WeakSet();
|
|
4884
4885
|
const parentOf = (node) => node.parentNode ?? (node.nodeType === NODE_TYPE.DocumentFragment ? node.host : null);
|
|
4885
4886
|
/**
|
|
4886
4887
|
* The server writes a `HOST_END_ID` comment as an SSR host's last child, so the parser has
|
|
@@ -4891,26 +4892,26 @@ const parentOf = (node) => node.parentNode ?? (node.nodeType === NODE_TYPE.Docum
|
|
|
4891
4892
|
* @returns whether the host's subtree is fully parsed
|
|
4892
4893
|
*/
|
|
4893
4894
|
const isParsed = (elm) => {
|
|
4894
|
-
if (
|
|
4895
|
+
if (parsedHosts.has(elm) || win.document.readyState !== "loading") return true;
|
|
4895
4896
|
let n = elm.lastChild;
|
|
4896
4897
|
if (n?.nodeType === NODE_TYPE.TextNode) n = n.previousSibling;
|
|
4897
|
-
return n?.nodeType === NODE_TYPE.CommentNode && n.nodeValue === `e.${elm.getAttribute("s-id")}` && !!
|
|
4898
|
+
return n?.nodeType === NODE_TYPE.CommentNode && n.nodeValue === `e.${elm.getAttribute("s-id")}` && !!parsedHosts.add(elm);
|
|
4898
4899
|
};
|
|
4899
4900
|
const hasPendingAncestor = (elm) => {
|
|
4900
4901
|
for (let n = parentOf(elm); n; n = parentOf(n)) if (pending.has(n)) return true;
|
|
4901
4902
|
return false;
|
|
4902
4903
|
};
|
|
4904
|
+
const drop = (elm) => {
|
|
4905
|
+
pending.get(elm)?.disconnect();
|
|
4906
|
+
pending.delete(elm);
|
|
4907
|
+
};
|
|
4903
4908
|
const flush = () => {
|
|
4904
|
-
for (const elm of pending) if (!elm.isConnected)
|
|
4909
|
+
for (const elm of pending.keys()) if (!elm.isConnected) drop(elm);
|
|
4905
4910
|
else if (isParsed(elm)) elm.__attachShadow?.();
|
|
4906
|
-
for (const elm of pending) if (isParsed(elm) && !hasPendingAncestor(elm)) {
|
|
4907
|
-
|
|
4911
|
+
for (const elm of pending.keys()) if (isParsed(elm) && !hasPendingAncestor(elm)) {
|
|
4912
|
+
drop(elm);
|
|
4908
4913
|
elm.connectedCallback?.();
|
|
4909
4914
|
}
|
|
4910
|
-
if (!pending.size) {
|
|
4911
|
-
observer?.disconnect();
|
|
4912
|
-
observer = void 0;
|
|
4913
|
-
}
|
|
4914
4915
|
};
|
|
4915
4916
|
/**
|
|
4916
4917
|
* Whether the parser may still be adding children (including a declarative shadow root)
|
|
@@ -4929,18 +4930,13 @@ const mayStillBeParsing = (elm) => win.document?.readyState === "loading" && (!e
|
|
|
4929
4930
|
const deferUntilParsed = (elm) => {
|
|
4930
4931
|
if (pending.has(elm)) return true;
|
|
4931
4932
|
if (!win.document || !elm.hasAttribute("s-id")) return false;
|
|
4932
|
-
const
|
|
4933
|
-
if (
|
|
4934
|
-
if (
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
childList: true,
|
|
4940
|
-
subtree: true
|
|
4941
|
-
});
|
|
4942
|
-
win.document.addEventListener("DOMContentLoaded", flush, { once: true });
|
|
4943
|
-
}
|
|
4933
|
+
const done = isParsed(elm);
|
|
4934
|
+
if (done && !hasPendingAncestor(elm)) return false;
|
|
4935
|
+
if (done) elm.__attachShadow?.();
|
|
4936
|
+
const observer = new MutationObserver(flush);
|
|
4937
|
+
observer.observe(elm, { childList: true });
|
|
4938
|
+
pending.set(elm, observer);
|
|
4939
|
+
win.document.addEventListener("DOMContentLoaded", flush, { once: true });
|
|
4944
4940
|
return true;
|
|
4945
4941
|
};
|
|
4946
4942
|
//#endregion
|
|
@@ -1616,6 +1616,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialR
|
|
|
1616
1616
|
} else if (BUILD$1.vdomListener && (BUILD$1.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
|
|
1617
1617
|
if (memberName[2] === "-") memberName = memberName.slice(3);
|
|
1618
1618
|
else if (isMemberInElement(win, ln)) memberName = ln.slice(2);
|
|
1619
|
+
else if (memberName.endsWith(CAPTURE_EVENT_SUFFIX) && isMemberInElement(win, ln.slice(0, -CAPTURE_EVENT_SUFFIX.length))) memberName = ln.slice(2, -CAPTURE_EVENT_SUFFIX.length) + CAPTURE_EVENT_SUFFIX;
|
|
1619
1620
|
else memberName = ln[2] + memberName.slice(3);
|
|
1620
1621
|
if (oldValue || newValue) {
|
|
1621
1622
|
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
@@ -4645,12 +4646,12 @@ const hmrApplyClass = (cmpMeta, NewClass) => {
|
|
|
4645
4646
|
/**
|
|
4646
4647
|
* SSR hosts connected while the HTML parser is still inside them (streamed documents),
|
|
4647
4648
|
* in connection order - which is document order. Each is held until its subtree is
|
|
4648
|
-
* parsed so hydration sees its declarative shadow root and children
|
|
4649
|
+
* parsed so hydration sees its declarative shadow root and children, and watched for
|
|
4650
|
+
* its end marker arriving (wherever it is - a document observer can't see into shadow roots).
|
|
4649
4651
|
*/
|
|
4650
|
-
const pending = /* @__PURE__ */ new
|
|
4652
|
+
const pending = /* @__PURE__ */ new Map();
|
|
4651
4653
|
/** SSR hosts seen parsed: hydration may since have moved or removed their end marker */
|
|
4652
|
-
const
|
|
4653
|
-
let observer;
|
|
4654
|
+
const parsedHosts = /* @__PURE__ */ new WeakSet();
|
|
4654
4655
|
const parentOf = (node) => node.parentNode ?? (node.nodeType === NODE_TYPE.DocumentFragment ? node.host : null);
|
|
4655
4656
|
/**
|
|
4656
4657
|
* The server writes a `HOST_END_ID` comment as an SSR host's last child, so the parser has
|
|
@@ -4661,26 +4662,26 @@ const parentOf = (node) => node.parentNode ?? (node.nodeType === NODE_TYPE.Docum
|
|
|
4661
4662
|
* @returns whether the host's subtree is fully parsed
|
|
4662
4663
|
*/
|
|
4663
4664
|
const isParsed = (elm) => {
|
|
4664
|
-
if (
|
|
4665
|
+
if (parsedHosts.has(elm) || win.document.readyState !== "loading") return true;
|
|
4665
4666
|
let n = elm.lastChild;
|
|
4666
4667
|
if (n?.nodeType === NODE_TYPE.TextNode) n = n.previousSibling;
|
|
4667
|
-
return n?.nodeType === NODE_TYPE.CommentNode && n.nodeValue === `e.${elm.getAttribute("s-id")}` && !!
|
|
4668
|
+
return n?.nodeType === NODE_TYPE.CommentNode && n.nodeValue === `e.${elm.getAttribute("s-id")}` && !!parsedHosts.add(elm);
|
|
4668
4669
|
};
|
|
4669
4670
|
const hasPendingAncestor = (elm) => {
|
|
4670
4671
|
for (let n = parentOf(elm); n; n = parentOf(n)) if (pending.has(n)) return true;
|
|
4671
4672
|
return false;
|
|
4672
4673
|
};
|
|
4674
|
+
const drop = (elm) => {
|
|
4675
|
+
pending.get(elm)?.disconnect();
|
|
4676
|
+
pending.delete(elm);
|
|
4677
|
+
};
|
|
4673
4678
|
const flush = () => {
|
|
4674
|
-
for (const elm of pending) if (!elm.isConnected)
|
|
4679
|
+
for (const elm of pending.keys()) if (!elm.isConnected) drop(elm);
|
|
4675
4680
|
else if (isParsed(elm)) elm.__attachShadow?.();
|
|
4676
|
-
for (const elm of pending) if (isParsed(elm) && !hasPendingAncestor(elm)) {
|
|
4677
|
-
|
|
4681
|
+
for (const elm of pending.keys()) if (isParsed(elm) && !hasPendingAncestor(elm)) {
|
|
4682
|
+
drop(elm);
|
|
4678
4683
|
elm.connectedCallback?.();
|
|
4679
4684
|
}
|
|
4680
|
-
if (!pending.size) {
|
|
4681
|
-
observer?.disconnect();
|
|
4682
|
-
observer = void 0;
|
|
4683
|
-
}
|
|
4684
4685
|
};
|
|
4685
4686
|
/**
|
|
4686
4687
|
* Whether the parser may still be adding children (including a declarative shadow root)
|
|
@@ -4699,18 +4700,13 @@ const mayStillBeParsing = (elm) => win.document?.readyState === "loading" && (!e
|
|
|
4699
4700
|
const deferUntilParsed = (elm) => {
|
|
4700
4701
|
if (pending.has(elm)) return true;
|
|
4701
4702
|
if (!win.document || !elm.hasAttribute("s-id")) return false;
|
|
4702
|
-
const
|
|
4703
|
-
if (
|
|
4704
|
-
if (
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
childList: true,
|
|
4710
|
-
subtree: true
|
|
4711
|
-
});
|
|
4712
|
-
win.document.addEventListener("DOMContentLoaded", flush, { once: true });
|
|
4713
|
-
}
|
|
4703
|
+
const done = isParsed(elm);
|
|
4704
|
+
if (done && !hasPendingAncestor(elm)) return false;
|
|
4705
|
+
if (done) elm.__attachShadow?.();
|
|
4706
|
+
const observer = new MutationObserver(flush);
|
|
4707
|
+
observer.observe(elm, { childList: true });
|
|
4708
|
+
pending.set(elm, observer);
|
|
4709
|
+
win.document.addEventListener("DOMContentLoaded", flush, { once: true });
|
|
4714
4710
|
return true;
|
|
4715
4711
|
};
|
|
4716
4712
|
//#endregion
|
|
@@ -10795,6 +10795,10 @@ function getLabelsForElement(elm) {
|
|
|
10795
10795
|
parent = parent.parentNode;
|
|
10796
10796
|
}
|
|
10797
10797
|
}
|
|
10798
|
+
Object.defineProperty(labels, "item", {
|
|
10799
|
+
value: (index) => labels[index] ?? null,
|
|
10800
|
+
enumerable: false
|
|
10801
|
+
});
|
|
10798
10802
|
return labels;
|
|
10799
10803
|
}
|
|
10800
10804
|
function patchPropAttributes(prototype, attrs, defaults = {}) {
|
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-C6N23fLr.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-D92bSZzV.mjs";
|
|
2
|
+
import { t as createNodeSys } from "../../node-C6N23fLr.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.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-rc.
|
|
36
|
+
const version = "5.0.0-rc.15";
|
|
37
37
|
const MEMBER_FLAGS = {
|
|
38
38
|
String: 1,
|
|
39
39
|
Number: 2,
|
|
@@ -2370,6 +2370,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialR
|
|
|
2370
2370
|
} else if (BUILD.vdomListener && (BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
|
|
2371
2371
|
if (memberName[2] === "-") memberName = memberName.slice(3);
|
|
2372
2372
|
else if (isMemberInElement(win, ln)) memberName = ln.slice(2);
|
|
2373
|
+
else if (memberName.endsWith(CAPTURE_EVENT_SUFFIX) && isMemberInElement(win, ln.slice(0, -CAPTURE_EVENT_SUFFIX.length))) memberName = ln.slice(2, -CAPTURE_EVENT_SUFFIX.length) + CAPTURE_EVENT_SUFFIX;
|
|
2373
2374
|
else memberName = ln[2] + memberName.slice(3);
|
|
2374
2375
|
if (oldValue || newValue) {
|
|
2375
2376
|
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
@@ -5386,12 +5387,12 @@ const hmrApplyClass = (cmpMeta, NewClass) => {
|
|
|
5386
5387
|
/**
|
|
5387
5388
|
* SSR hosts connected while the HTML parser is still inside them (streamed documents),
|
|
5388
5389
|
* in connection order - which is document order. Each is held until its subtree is
|
|
5389
|
-
* parsed so hydration sees its declarative shadow root and children
|
|
5390
|
+
* parsed so hydration sees its declarative shadow root and children, and watched for
|
|
5391
|
+
* its end marker arriving (wherever it is - a document observer can't see into shadow roots).
|
|
5390
5392
|
*/
|
|
5391
|
-
const pending = /* @__PURE__ */ new
|
|
5393
|
+
const pending = /* @__PURE__ */ new Map();
|
|
5392
5394
|
/** SSR hosts seen parsed: hydration may since have moved or removed their end marker */
|
|
5393
|
-
const
|
|
5394
|
-
let observer;
|
|
5395
|
+
const parsedHosts = /* @__PURE__ */ new WeakSet();
|
|
5395
5396
|
const parentOf = (node) => node.parentNode ?? (node.nodeType === NODE_TYPE.DocumentFragment ? node.host : null);
|
|
5396
5397
|
/**
|
|
5397
5398
|
* The server writes a `HOST_END_ID` comment as an SSR host's last child, so the parser has
|
|
@@ -5402,26 +5403,26 @@ const parentOf = (node) => node.parentNode ?? (node.nodeType === NODE_TYPE.Docum
|
|
|
5402
5403
|
* @returns whether the host's subtree is fully parsed
|
|
5403
5404
|
*/
|
|
5404
5405
|
const isParsed = (elm) => {
|
|
5405
|
-
if (
|
|
5406
|
+
if (parsedHosts.has(elm) || win.document.readyState !== "loading") return true;
|
|
5406
5407
|
let n = elm.lastChild;
|
|
5407
5408
|
if (n?.nodeType === NODE_TYPE.TextNode) n = n.previousSibling;
|
|
5408
|
-
return n?.nodeType === NODE_TYPE.CommentNode && n.nodeValue === `e.${elm.getAttribute("s-id")}` && !!
|
|
5409
|
+
return n?.nodeType === NODE_TYPE.CommentNode && n.nodeValue === `e.${elm.getAttribute("s-id")}` && !!parsedHosts.add(elm);
|
|
5409
5410
|
};
|
|
5410
5411
|
const hasPendingAncestor = (elm) => {
|
|
5411
5412
|
for (let n = parentOf(elm); n; n = parentOf(n)) if (pending.has(n)) return true;
|
|
5412
5413
|
return false;
|
|
5413
5414
|
};
|
|
5415
|
+
const drop = (elm) => {
|
|
5416
|
+
pending.get(elm)?.disconnect();
|
|
5417
|
+
pending.delete(elm);
|
|
5418
|
+
};
|
|
5414
5419
|
const flush = () => {
|
|
5415
|
-
for (const elm of pending) if (!elm.isConnected)
|
|
5420
|
+
for (const elm of pending.keys()) if (!elm.isConnected) drop(elm);
|
|
5416
5421
|
else if (isParsed(elm)) elm.__attachShadow?.();
|
|
5417
|
-
for (const elm of pending) if (isParsed(elm) && !hasPendingAncestor(elm)) {
|
|
5418
|
-
|
|
5422
|
+
for (const elm of pending.keys()) if (isParsed(elm) && !hasPendingAncestor(elm)) {
|
|
5423
|
+
drop(elm);
|
|
5419
5424
|
elm.connectedCallback?.();
|
|
5420
5425
|
}
|
|
5421
|
-
if (!pending.size) {
|
|
5422
|
-
observer?.disconnect();
|
|
5423
|
-
observer = void 0;
|
|
5424
|
-
}
|
|
5425
5426
|
};
|
|
5426
5427
|
/**
|
|
5427
5428
|
* Whether the parser may still be adding children (including a declarative shadow root)
|
|
@@ -5440,18 +5441,13 @@ const mayStillBeParsing = (elm) => win.document?.readyState === "loading" && (!e
|
|
|
5440
5441
|
const deferUntilParsed = (elm) => {
|
|
5441
5442
|
if (pending.has(elm)) return true;
|
|
5442
5443
|
if (!win.document || !elm.hasAttribute("s-id")) return false;
|
|
5443
|
-
const
|
|
5444
|
-
if (
|
|
5445
|
-
if (
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
childList: true,
|
|
5451
|
-
subtree: true
|
|
5452
|
-
});
|
|
5453
|
-
win.document.addEventListener("DOMContentLoaded", flush, { once: true });
|
|
5454
|
-
}
|
|
5444
|
+
const done = isParsed(elm);
|
|
5445
|
+
if (done && !hasPendingAncestor(elm)) return false;
|
|
5446
|
+
if (done) elm.__attachShadow?.();
|
|
5447
|
+
const observer = new MutationObserver(flush);
|
|
5448
|
+
observer.observe(elm, { childList: true });
|
|
5449
|
+
pending.set(elm, observer);
|
|
5450
|
+
win.document.addEventListener("DOMContentLoaded", flush, { once: true });
|
|
5455
5451
|
return true;
|
|
5456
5452
|
};
|
|
5457
5453
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core",
|
|
3
|
-
"version": "5.0.0-rc.
|
|
3
|
+
"version": "5.0.0-rc.15",
|
|
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/cli": "5.0.0-rc.
|
|
130
|
-
"@stencil/
|
|
131
|
-
"@stencil/
|
|
129
|
+
"@stencil/cli": "5.0.0-rc.15",
|
|
130
|
+
"@stencil/dev-server": "5.0.0-rc.15",
|
|
131
|
+
"@stencil/mock-doc": "5.0.0-rc.15"
|
|
132
132
|
},
|
|
133
133
|
"devDependencies": {
|
|
134
134
|
"@ionic/prettier-config": "^4.0.0",
|