@stencil/core 5.0.0-rc.12 → 5.0.0-rc.14

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.
@@ -1,2 +1,2 @@
1
- import { n as Env, r as NAMESPACE, t as BUILD } from "../index-XQHZl0MW.js";
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);
@@ -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.12";
1848
+ const version = "5.0.0-rc.14";
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
- if (!ts$1.isStringLiteral(hTag) && (!ts$1.isIdentifier(hTag) || hTag.text !== "Host")) m.hasVdomFunctional = true;
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 partValue = resolveStaticStringValue(prop.initializer, typeChecker);
13861
- if (partValue !== void 0) m.htmlParts.push(...partValue.split(" ").filter((part) => part.length > 0));
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);
@@ -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-BTD5XmKy.mjs";
2
- import { a as LOG_LEVELS, i as CustomElementsExportBehaviorOptions } from "../node-BR2GYgzY.mjs";
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-C451Mp7c.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-QadqfKfL.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-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-BR2GYgzY.mjs";
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.12";
465
- const buildId = "1795651346";
466
- const vermoji = "🔈";
464
+ const version = "5.0.0-rc.14";
465
+ const buildId = "1795740246";
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.
@@ -10943,7 +10943,7 @@ const generateCustomElementType = (componentsDtsRelPath, cmp) => {
10943
10943
  const tagNameAsPascal = dashToPascalCase(cmp.tagName);
10944
10944
  return [
10945
10945
  `import type { Components, JSX } from "${componentsDtsRelPath}";`,
10946
- `import type { HTMLStencilElement } from "@stencil/core/runtime";`,
10946
+ `import type { HTMLStencilElement } from "${dirname$1(componentsDtsRelPath)}/stencil-public-runtime";`,
10947
10947
  ``,
10948
10948
  `interface ${tagNameAsPascal} extends Components.${tagNameAsPascal}, HTMLStencilElement {}`,
10949
10949
  `export const ${tagNameAsPascal}: {`,
@@ -11069,7 +11069,7 @@ const updateStencilTypesImports = (typesDir, dtsFilePath, dtsContent) => {
11069
11069
  if (!coreDtsPath.startsWith(".")) coreDtsPath = `./${coreDtsPath}`;
11070
11070
  coreDtsPath = normalizePath(coreDtsPath);
11071
11071
  if (dtsContent.includes("@stencil/core")) {
11072
- dtsContent = dtsContent.replace(/(from\s*(:?'|"))@stencil\/core\/internal('|")/g, `$1${coreDtsPath}$2`);
11072
+ dtsContent = dtsContent.replace(/(from\s*(:?'|"))@stencil\/core\/runtime('|")/g, `$1${coreDtsPath}$2`);
11073
11073
  dtsContent = dtsContent.replace(/(from\s*(:?'|"))@stencil\/core('|")/g, `$1${coreDtsPath}$2`);
11074
11074
  }
11075
11075
  return dtsContent;
@@ -14972,11 +14972,23 @@ const resolveStaticStringValue = (expr, typeChecker) => {
14972
14972
  if (type.isStringLiteral()) return type.value;
14973
14973
  }
14974
14974
  };
14975
+ /**
14976
+ * Get the outward-facing part names of an `exportparts` value, e.g. `"label, icon: btn-icon"`
14977
+ * exposes `label` and `btn-icon`.
14978
+ *
14979
+ * @param value the `exportparts` attribute value
14980
+ * @returns the part names exposed to the outside
14981
+ */
14982
+ const parseExportParts = (value) => value.split(",").map((mapping) => {
14983
+ const [innerName, outerName] = mapping.split(":");
14984
+ return (outerName ?? innerName).trim();
14985
+ }).filter((part) => part.length > 0);
14975
14986
  const gatherVdomMeta = (m, args, typeChecker) => {
14976
14987
  m.hasVdomRender = true;
14977
14988
  const hTag = args[0];
14978
14989
  const isSlotTag = ts.isStringLiteral(hTag) && hTag.text === "slot";
14979
- if (!ts.isStringLiteral(hTag) && (!ts.isIdentifier(hTag) || hTag.text !== "Host")) m.hasVdomFunctional = true;
14990
+ const isHostTag = ts.isIdentifier(hTag) && hTag.text === "Host";
14991
+ if (!ts.isStringLiteral(hTag) && !isHostTag) m.hasVdomFunctional = true;
14980
14992
  if (args.length > 1) {
14981
14993
  const objectLiteral = args[1];
14982
14994
  if (ts.isCallExpression(objectLiteral) || ts.isIdentifier(objectLiteral)) {
@@ -15016,9 +15028,9 @@ const gatherVdomMeta = (m, args, typeChecker) => {
15016
15028
  m.hasVdomPropOrAttr = true;
15017
15029
  } else if (attrName.startsWith("attr:") || attrName.startsWith("prop:")) m.hasVdomPropOrAttrPrefix = true;
15018
15030
  else m.hasVdomPropOrAttr = true;
15019
- if (attrName === "part" && ts.isPropertyAssignment(prop)) {
15020
- const partValue = resolveStaticStringValue(prop.initializer, typeChecker);
15021
- if (partValue !== void 0) m.htmlParts.push(...partValue.split(" ").filter((part) => part.length > 0));
15031
+ if ((attrName === "part" || attrName === "exportparts") && !isHostTag && ts.isPropertyAssignment(prop)) {
15032
+ const value = resolveStaticStringValue(prop.initializer, typeChecker);
15033
+ if (value !== void 0) m.htmlParts.push(...attrName === "part" ? value.split(" ").filter((part) => part.length > 0) : parseExportParts(value));
15022
15034
  }
15023
15035
  if (isSlotTag && attrName === "name" && ts.isPropertyAssignment(prop)) {
15024
15036
  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-QadqfKfL.mjs";
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
  /**
@@ -1,3 +1,3 @@
1
- import { n as jsxDEV, r as jsxs, t as jsx } from "./client-QadqfKfL.mjs";
1
+ import { n as jsxDEV, r as jsxs, t as jsx } from "./client-Cpehp9QL.mjs";
2
2
  import { t as Fragment } from "./fragment-Di1hWOC8.mjs";
3
3
  export { Fragment, jsx, jsxDEV, jsxs };
@@ -1,5 +1,5 @@
1
1
  import { n as __require } from "./rolldown-runtime-BhDjJH2R.mjs";
2
- import "./client-QadqfKfL.mjs";
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);
@@ -3887,7 +3888,7 @@ const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes
3887
3888
  hostElm["s-cr"] = node;
3888
3889
  node["s-cn"] = true;
3889
3890
  }
3890
- }
3891
+ } else if (childNodeType === "e") node.remove();
3891
3892
  }
3892
3893
  }
3893
3894
  } else if (parentVNode && parentVNode.$tag$ === "style") {
@@ -3976,7 +3977,7 @@ const addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) =
3976
3977
  if (!slottedNode || slottedNode.nodeValue?.startsWith("s.")) return;
3977
3978
  do {
3978
3979
  const sa = slottedNode["getAttribute"] && slottedNode.getAttribute("slot");
3979
- if ((slottedNode["getAttribute"] && slottedNode.getAttribute("s-sn")) === slotName || (sa || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && !sa && (slottedNode.nodeType === NODE_TYPE.CommentNode || slottedNode.nodeType === NODE_TYPE.TextNode)) {
3980
+ if ((slottedNode["getAttribute"] && slottedNode.getAttribute("s-sn")) === slotName || (sa || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && !sa && (slottedNode.nodeType === NODE_TYPE.CommentNode && !slottedNode.nodeValue?.startsWith("e.") || slottedNode.nodeType === NODE_TYPE.TextNode)) {
3980
3981
  slottedNode["s-sn"] = slotName;
3981
3982
  group.push({
3982
3983
  slot: slotNode,
@@ -5012,17 +5013,23 @@ const hmrApplyClass = (cmpMeta, NewClass) => {
5012
5013
  * parsed so hydration sees its declarative shadow root and children.
5013
5014
  */
5014
5015
  const pending = /* @__PURE__ */ new Set();
5016
+ /** SSR hosts seen parsed: hydration may since have moved or removed their end marker */
5017
+ const parsedHosts = /* @__PURE__ */ new WeakSet();
5015
5018
  let observer;
5016
5019
  const parentOf = (node) => node.parentNode ?? (node.nodeType === NODE_TYPE.DocumentFragment ? node.host : null);
5017
5020
  /**
5018
- * The parser has finished with `elm` once it, or any ancestor, has a following sibling.
5019
- * @param elm the element to check
5020
- * @returns whether the element's subtree is fully parsed
5021
+ * The server writes a `HOST_END_ID` comment as an SSR host's last child, so the parser has
5022
+ * finished with the host once it's there (only whitespace, e.g. from `prettyHtml`, may follow -
5023
+ * as a single text node, since the parser merges adjacent text).
5024
+ * Hosts without one (e.g. from an older server) are held until the document has loaded.
5025
+ * @param elm the SSR host
5026
+ * @returns whether the host's subtree is fully parsed
5021
5027
  */
5022
5028
  const isParsed = (elm) => {
5023
- if (win.document.readyState !== "loading") return true;
5024
- for (let n = elm; n; n = parentOf(n)) if (n.nextSibling) return true;
5025
- return false;
5029
+ if (parsedHosts.has(elm) || win.document.readyState !== "loading") return true;
5030
+ let n = elm.lastChild;
5031
+ if (n?.nodeType === NODE_TYPE.TextNode) n = n.previousSibling;
5032
+ return n?.nodeType === NODE_TYPE.CommentNode && n.nodeValue === `e.${elm.getAttribute("s-id")}` && !!parsedHosts.add(elm);
5026
5033
  };
5027
5034
  const hasPendingAncestor = (elm) => {
5028
5035
  for (let n = parentOf(elm); n; n = parentOf(n)) if (pending.has(n)) return true;
@@ -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);
@@ -3881,7 +3882,7 @@ const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes
3881
3882
  hostElm["s-cr"] = node;
3882
3883
  node["s-cn"] = true;
3883
3884
  }
3884
- }
3885
+ } else if (childNodeType === "e") node.remove();
3885
3886
  }
3886
3887
  }
3887
3888
  } else if (parentVNode && parentVNode.$tag$ === "style") {
@@ -3970,7 +3971,7 @@ const addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) =
3970
3971
  if (!slottedNode || slottedNode.nodeValue?.startsWith("s.")) return;
3971
3972
  do {
3972
3973
  const sa = slottedNode["getAttribute"] && slottedNode.getAttribute("slot");
3973
- if ((slottedNode["getAttribute"] && slottedNode.getAttribute("s-sn")) === slotName || (sa || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && !sa && (slottedNode.nodeType === NODE_TYPE.CommentNode || slottedNode.nodeType === NODE_TYPE.TextNode)) {
3974
+ if ((slottedNode["getAttribute"] && slottedNode.getAttribute("s-sn")) === slotName || (sa || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && !sa && (slottedNode.nodeType === NODE_TYPE.CommentNode && !slottedNode.nodeValue?.startsWith("e.") || slottedNode.nodeType === NODE_TYPE.TextNode)) {
3974
3975
  slottedNode["s-sn"] = slotName;
3975
3976
  group.push({
3976
3977
  slot: slotNode,
@@ -5006,17 +5007,23 @@ const hmrApplyClass = (cmpMeta, NewClass) => {
5006
5007
  * parsed so hydration sees its declarative shadow root and children.
5007
5008
  */
5008
5009
  const pending = /* @__PURE__ */ new Set();
5010
+ /** SSR hosts seen parsed: hydration may since have moved or removed their end marker */
5011
+ const parsedHosts = /* @__PURE__ */ new WeakSet();
5009
5012
  let observer;
5010
5013
  const parentOf = (node) => node.parentNode ?? (node.nodeType === NODE_TYPE.DocumentFragment ? node.host : null);
5011
5014
  /**
5012
- * The parser has finished with `elm` once it, or any ancestor, has a following sibling.
5013
- * @param elm the element to check
5014
- * @returns whether the element's subtree is fully parsed
5015
+ * The server writes a `HOST_END_ID` comment as an SSR host's last child, so the parser has
5016
+ * finished with the host once it's there (only whitespace, e.g. from `prettyHtml`, may follow -
5017
+ * as a single text node, since the parser merges adjacent text).
5018
+ * Hosts without one (e.g. from an older server) are held until the document has loaded.
5019
+ * @param elm the SSR host
5020
+ * @returns whether the host's subtree is fully parsed
5015
5021
  */
5016
5022
  const isParsed = (elm) => {
5017
- if (win.document.readyState !== "loading") return true;
5018
- for (let n = elm; n; n = parentOf(n)) if (n.nextSibling) return true;
5019
- return false;
5023
+ if (parsedHosts.has(elm) || win.document.readyState !== "loading") return true;
5024
+ let n = elm.lastChild;
5025
+ if (n?.nodeType === NODE_TYPE.TextNode) n = n.previousSibling;
5026
+ return n?.nodeType === NODE_TYPE.CommentNode && n.nodeValue === `e.${elm.getAttribute("s-id")}` && !!parsedHosts.add(elm);
5020
5027
  };
5021
5028
  const hasPendingAncestor = (elm) => {
5022
5029
  for (let n = parentOf(elm); n; n = parentOf(n)) if (pending.has(n)) return true;
@@ -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-XQHZl0MW.js";
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;
@@ -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);
@@ -3753,7 +3754,7 @@ const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes
3753
3754
  hostElm["s-cr"] = node;
3754
3755
  node["s-cn"] = true;
3755
3756
  }
3756
- }
3757
+ } else if (childNodeType === "e") node.remove();
3757
3758
  }
3758
3759
  }
3759
3760
  } else if (parentVNode && parentVNode.$tag$ === "style") {
@@ -3842,7 +3843,7 @@ const addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) =
3842
3843
  if (!slottedNode || slottedNode.nodeValue?.startsWith("s.")) return;
3843
3844
  do {
3844
3845
  const sa = slottedNode["getAttribute"] && slottedNode.getAttribute("slot");
3845
- if ((slottedNode["getAttribute"] && slottedNode.getAttribute("s-sn")) === slotName || (sa || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && !sa && (slottedNode.nodeType === NODE_TYPE.CommentNode || slottedNode.nodeType === NODE_TYPE.TextNode)) {
3846
+ if ((slottedNode["getAttribute"] && slottedNode.getAttribute("s-sn")) === slotName || (sa || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && !sa && (slottedNode.nodeType === NODE_TYPE.CommentNode && !slottedNode.nodeValue?.startsWith("e.") || slottedNode.nodeType === NODE_TYPE.TextNode)) {
3846
3847
  slottedNode["s-sn"] = slotName;
3847
3848
  group.push({
3848
3849
  slot: slotNode,
@@ -4878,17 +4879,23 @@ const hmrApplyClass = (cmpMeta, NewClass) => {
4878
4879
  * parsed so hydration sees its declarative shadow root and children.
4879
4880
  */
4880
4881
  const pending = /* @__PURE__ */ new Set();
4882
+ /** SSR hosts seen parsed: hydration may since have moved or removed their end marker */
4883
+ const parsedHosts = /* @__PURE__ */ new WeakSet();
4881
4884
  let observer;
4882
4885
  const parentOf = (node) => node.parentNode ?? (node.nodeType === NODE_TYPE.DocumentFragment ? node.host : null);
4883
4886
  /**
4884
- * The parser has finished with `elm` once it, or any ancestor, has a following sibling.
4885
- * @param elm the element to check
4886
- * @returns whether the element's subtree is fully parsed
4887
+ * The server writes a `HOST_END_ID` comment as an SSR host's last child, so the parser has
4888
+ * finished with the host once it's there (only whitespace, e.g. from `prettyHtml`, may follow -
4889
+ * as a single text node, since the parser merges adjacent text).
4890
+ * Hosts without one (e.g. from an older server) are held until the document has loaded.
4891
+ * @param elm the SSR host
4892
+ * @returns whether the host's subtree is fully parsed
4887
4893
  */
4888
4894
  const isParsed = (elm) => {
4889
- if (win.document.readyState !== "loading") return true;
4890
- for (let n = elm; n; n = parentOf(n)) if (n.nextSibling) return true;
4891
- return false;
4895
+ if (parsedHosts.has(elm) || win.document.readyState !== "loading") return true;
4896
+ let n = elm.lastChild;
4897
+ if (n?.nodeType === NODE_TYPE.TextNode) n = n.previousSibling;
4898
+ return n?.nodeType === NODE_TYPE.CommentNode && n.nodeValue === `e.${elm.getAttribute("s-id")}` && !!parsedHosts.add(elm);
4892
4899
  };
4893
4900
  const hasPendingAncestor = (elm) => {
4894
4901
  for (let n = parentOf(elm); n; n = parentOf(n)) if (pending.has(n)) return true;
@@ -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);
@@ -3523,7 +3524,7 @@ const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes
3523
3524
  hostElm["s-cr"] = node;
3524
3525
  node["s-cn"] = true;
3525
3526
  }
3526
- }
3527
+ } else if (childNodeType === "e") node.remove();
3527
3528
  }
3528
3529
  }
3529
3530
  } else if (parentVNode && parentVNode.$tag$ === "style") {
@@ -3612,7 +3613,7 @@ const addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) =
3612
3613
  if (!slottedNode || slottedNode.nodeValue?.startsWith("s.")) return;
3613
3614
  do {
3614
3615
  const sa = slottedNode["getAttribute"] && slottedNode.getAttribute("slot");
3615
- if ((slottedNode["getAttribute"] && slottedNode.getAttribute("s-sn")) === slotName || (sa || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && !sa && (slottedNode.nodeType === NODE_TYPE.CommentNode || slottedNode.nodeType === NODE_TYPE.TextNode)) {
3616
+ if ((slottedNode["getAttribute"] && slottedNode.getAttribute("s-sn")) === slotName || (sa || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && !sa && (slottedNode.nodeType === NODE_TYPE.CommentNode && !slottedNode.nodeValue?.startsWith("e.") || slottedNode.nodeType === NODE_TYPE.TextNode)) {
3616
3617
  slottedNode["s-sn"] = slotName;
3617
3618
  group.push({
3618
3619
  slot: slotNode,
@@ -4648,17 +4649,23 @@ const hmrApplyClass = (cmpMeta, NewClass) => {
4648
4649
  * parsed so hydration sees its declarative shadow root and children.
4649
4650
  */
4650
4651
  const pending = /* @__PURE__ */ new Set();
4652
+ /** SSR hosts seen parsed: hydration may since have moved or removed their end marker */
4653
+ const parsedHosts = /* @__PURE__ */ new WeakSet();
4651
4654
  let observer;
4652
4655
  const parentOf = (node) => node.parentNode ?? (node.nodeType === NODE_TYPE.DocumentFragment ? node.host : null);
4653
4656
  /**
4654
- * The parser has finished with `elm` once it, or any ancestor, has a following sibling.
4655
- * @param elm the element to check
4656
- * @returns whether the element's subtree is fully parsed
4657
+ * The server writes a `HOST_END_ID` comment as an SSR host's last child, so the parser has
4658
+ * finished with the host once it's there (only whitespace, e.g. from `prettyHtml`, may follow -
4659
+ * as a single text node, since the parser merges adjacent text).
4660
+ * Hosts without one (e.g. from an older server) are held until the document has loaded.
4661
+ * @param elm the SSR host
4662
+ * @returns whether the host's subtree is fully parsed
4657
4663
  */
4658
4664
  const isParsed = (elm) => {
4659
- if (win.document.readyState !== "loading") return true;
4660
- for (let n = elm; n; n = parentOf(n)) if (n.nextSibling) return true;
4661
- return false;
4665
+ if (parsedHosts.has(elm) || win.document.readyState !== "loading") return true;
4666
+ let n = elm.lastChild;
4667
+ if (n?.nodeType === NODE_TYPE.TextNode) n = n.previousSibling;
4668
+ return n?.nodeType === NODE_TYPE.CommentNode && n.nodeValue === `e.${elm.getAttribute("s-id")}` && !!parsedHosts.add(elm);
4662
4669
  };
4663
4670
  const hasPendingAncestor = (elm) => {
4664
4671
  for (let n = parentOf(elm); n; n = parentOf(n)) if (pending.has(n)) return true;
@@ -5241,6 +5248,7 @@ const insertVNodeAnnotations = (doc, hostElm, vnode, docData, cmpData) => {
5241
5248
  if (hostElm.shadowRoot) hostElm["s-cr"].remove();
5242
5249
  else hostElm["s-cr"].nodeValue = `r.${hostId}`;
5243
5250
  }
5251
+ hostElm.appendChild(doc.createComment(`e.${hostId}`));
5244
5252
  if (vnode.$children$ != null) {
5245
5253
  const depth = 0;
5246
5254
  vnode.$children$.forEach((vnodeChild, index) => {
@@ -7954,7 +7954,7 @@ function isWithinWhitespaceSensitive(node) {
7954
7954
  function isRemovedComment(node, opts) {
7955
7955
  if (node.nodeType !== 8 || !opts.removeHtmlComments) return false;
7956
7956
  const nodeValue = node.nodeValue;
7957
- return !(nodeValue?.startsWith("r.") || nodeValue?.startsWith("o.") || nodeValue?.startsWith("s.") || nodeValue?.startsWith("t."));
7957
+ return !(nodeValue?.startsWith("r.") || nodeValue?.startsWith("o.") || nodeValue?.startsWith("s.") || nodeValue?.startsWith("t.") || nodeValue?.startsWith("e."));
7958
7958
  }
7959
7959
  /**
7960
7960
  * Determine whether a list of child nodes contains at least one comment that is
@@ -1,2 +1,2 @@
1
- import { n as setupNodeProcess, r as createNodeLogger, t as createNodeSys } from "../../node-BR2GYgzY.mjs";
1
+ import { n as setupNodeProcess, r as createNodeLogger, t as createNodeSys } from "../../node-C6N23fLr.mjs";
2
2
  export { createNodeLogger, createNodeSys, setupNodeProcess };
@@ -1,5 +1,5 @@
1
- import { l as createWorkerMessageHandler } from "../../compiler-BTD5XmKy.mjs";
2
- import { t as createNodeSys } from "../../node-BR2GYgzY.mjs";
1
+ import { l as createWorkerMessageHandler } from "../../compiler-C451Mp7c.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
@@ -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.12";
36
+ const version = "5.0.0-rc.14";
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);
@@ -4279,7 +4280,7 @@ const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes
4279
4280
  hostElm["s-cr"] = node;
4280
4281
  node["s-cn"] = true;
4281
4282
  }
4282
- }
4283
+ } else if (childNodeType === "e") node.remove();
4283
4284
  }
4284
4285
  }
4285
4286
  } else if (parentVNode && parentVNode.$tag$ === "style") {
@@ -4368,7 +4369,7 @@ const addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) =
4368
4369
  if (!slottedNode || slottedNode.nodeValue?.startsWith("s.")) return;
4369
4370
  do {
4370
4371
  const sa = slottedNode["getAttribute"] && slottedNode.getAttribute("slot");
4371
- if ((slottedNode["getAttribute"] && slottedNode.getAttribute("s-sn")) === slotName || (sa || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && !sa && (slottedNode.nodeType === NODE_TYPE.CommentNode || slottedNode.nodeType === NODE_TYPE.TextNode)) {
4372
+ if ((slottedNode["getAttribute"] && slottedNode.getAttribute("s-sn")) === slotName || (sa || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && !sa && (slottedNode.nodeType === NODE_TYPE.CommentNode && !slottedNode.nodeValue?.startsWith("e.") || slottedNode.nodeType === NODE_TYPE.TextNode)) {
4372
4373
  slottedNode["s-sn"] = slotName;
4373
4374
  group.push({
4374
4375
  slot: slotNode,
@@ -5389,17 +5390,23 @@ const hmrApplyClass = (cmpMeta, NewClass) => {
5389
5390
  * parsed so hydration sees its declarative shadow root and children.
5390
5391
  */
5391
5392
  const pending = /* @__PURE__ */ new Set();
5393
+ /** SSR hosts seen parsed: hydration may since have moved or removed their end marker */
5394
+ const parsedHosts = /* @__PURE__ */ new WeakSet();
5392
5395
  let observer;
5393
5396
  const parentOf = (node) => node.parentNode ?? (node.nodeType === NODE_TYPE.DocumentFragment ? node.host : null);
5394
5397
  /**
5395
- * The parser has finished with `elm` once it, or any ancestor, has a following sibling.
5396
- * @param elm the element to check
5397
- * @returns whether the element's subtree is fully parsed
5398
+ * The server writes a `HOST_END_ID` comment as an SSR host's last child, so the parser has
5399
+ * finished with the host once it's there (only whitespace, e.g. from `prettyHtml`, may follow -
5400
+ * as a single text node, since the parser merges adjacent text).
5401
+ * Hosts without one (e.g. from an older server) are held until the document has loaded.
5402
+ * @param elm the SSR host
5403
+ * @returns whether the host's subtree is fully parsed
5398
5404
  */
5399
5405
  const isParsed = (elm) => {
5400
- if (win.document.readyState !== "loading") return true;
5401
- for (let n = elm; n; n = parentOf(n)) if (n.nextSibling) return true;
5402
- return false;
5406
+ if (parsedHosts.has(elm) || win.document.readyState !== "loading") return true;
5407
+ let n = elm.lastChild;
5408
+ if (n?.nodeType === NODE_TYPE.TextNode) n = n.previousSibling;
5409
+ return n?.nodeType === NODE_TYPE.CommentNode && n.nodeValue === `e.${elm.getAttribute("s-id")}` && !!parsedHosts.add(elm);
5403
5410
  };
5404
5411
  const hasPendingAncestor = (elm) => {
5405
5412
  for (let n = parentOf(elm); n; n = parentOf(n)) if (pending.has(n)) return true;
@@ -5820,6 +5827,7 @@ const insertVNodeAnnotations = (doc, hostElm, vnode, docData, cmpData) => {
5820
5827
  if (hostElm.shadowRoot) hostElm["s-cr"].remove();
5821
5828
  else hostElm["s-cr"].nodeValue = `r.${hostId}`;
5822
5829
  }
5830
+ hostElm.appendChild(doc.createComment(`e.${hostId}`));
5823
5831
  if (vnode.$children$ != null) {
5824
5832
  const depth = 0;
5825
5833
  vnode.$children$.forEach((vnodeChild, index) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core",
3
- "version": "5.0.0-rc.12",
3
+ "version": "5.0.0-rc.14",
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/mock-doc": "5.0.0-rc.12",
130
- "@stencil/dev-server": "5.0.0-rc.12",
131
- "@stencil/cli": "5.0.0-rc.12"
129
+ "@stencil/dev-server": "5.0.0-rc.14",
130
+ "@stencil/mock-doc": "5.0.0-rc.14",
131
+ "@stencil/cli": "5.0.0-rc.14"
132
132
  },
133
133
  "devDependencies": {
134
134
  "@ionic/prettier-config": "^4.0.0",