@stencil/core 4.22.3-dev.1732597307.7bdf128 → 4.22.3-dev.1732770122.a15bc5d
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/cli/index.cjs +1 -1
- package/cli/index.js +1 -1
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +83 -24
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +2 -2
- package/internal/app-data/package.json +1 -1
- package/internal/client/index.js +183 -176
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +182 -175
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +1 -1
- package/internal/package.json +1 -1
- package/internal/stencil-private.d.ts +8 -0
- package/internal/stencil-public-docs.d.ts +8 -0
- package/internal/testing/index.js +182 -175
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +1 -1
- package/mock-doc/index.js +1 -1
- package/mock-doc/package.json +1 -1
- package/package.json +1 -1
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/index.js +13 -13
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +10 -3
- package/testing/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Hydrate Platform v4.22.3-dev.
|
|
2
|
+
Stencil Hydrate Platform v4.22.3-dev.1732770122.a15bc5d | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
@@ -953,8 +953,12 @@ var relocateToHostRoot = (parentElm) => {
|
|
|
953
953
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
954
954
|
const host = parentElm.closest(hostTagName.toLowerCase());
|
|
955
955
|
if (host != null) {
|
|
956
|
-
const contentRefNode = Array.from(host.childNodes).find(
|
|
957
|
-
|
|
956
|
+
const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
|
|
957
|
+
(ref) => ref["s-cr"]
|
|
958
|
+
);
|
|
959
|
+
const childNodeArray = Array.from(
|
|
960
|
+
parentElm.__childNodes || parentElm.childNodes
|
|
961
|
+
);
|
|
958
962
|
for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
|
|
959
963
|
if (childNode["s-sh"] != null) {
|
|
960
964
|
insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
|
|
@@ -967,7 +971,7 @@ var relocateToHostRoot = (parentElm) => {
|
|
|
967
971
|
};
|
|
968
972
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
969
973
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
970
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
974
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
971
975
|
if (parentElm["s-sr"] && BUILD10.experimentalSlotFixes) {
|
|
972
976
|
let node = parentElm;
|
|
973
977
|
while (node = node.nextSibling) {
|
|
@@ -1188,7 +1192,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
1188
1192
|
}
|
|
1189
1193
|
};
|
|
1190
1194
|
var updateFallbackSlotVisibility = (elm) => {
|
|
1191
|
-
const childNodes = elm.childNodes;
|
|
1195
|
+
const childNodes = elm.__childNodes || elm.childNodes;
|
|
1192
1196
|
for (const childNode of childNodes) {
|
|
1193
1197
|
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1194
1198
|
if (childNode["s-sr"]) {
|
|
@@ -1219,9 +1223,10 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
1219
1223
|
let node;
|
|
1220
1224
|
let hostContentNodes;
|
|
1221
1225
|
let j;
|
|
1222
|
-
|
|
1226
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
1227
|
+
for (const childNode of children) {
|
|
1223
1228
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
1224
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
1229
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
1225
1230
|
const slotName = childNode["s-sn"];
|
|
1226
1231
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
1227
1232
|
node = hostContentNodes[j];
|
|
@@ -1310,7 +1315,7 @@ var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
|
|
|
1310
1315
|
if (scopeIds.size) {
|
|
1311
1316
|
(_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = Array.from(scopeIds));
|
|
1312
1317
|
if (element["s-ol"] || iterateChildNodes) {
|
|
1313
|
-
for (const childNode of Array.from(element.childNodes)) {
|
|
1318
|
+
for (const childNode of Array.from(element.__childNodes || element.childNodes)) {
|
|
1314
1319
|
updateElementScopeIds(childNode, element, true);
|
|
1315
1320
|
}
|
|
1316
1321
|
}
|
|
@@ -1428,7 +1433,8 @@ render() {
|
|
|
1428
1433
|
relocateNodes.length = 0;
|
|
1429
1434
|
}
|
|
1430
1435
|
if (BUILD10.experimentalScopedSlotChanges && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
1431
|
-
|
|
1436
|
+
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
1437
|
+
for (const childNode of children) {
|
|
1432
1438
|
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
1433
1439
|
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
1434
1440
|
childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
|
|
@@ -1820,31 +1826,77 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1820
1826
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1821
1827
|
members.map(([memberName, [memberFlags]]) => {
|
|
1822
1828
|
if ((BUILD13.prop || BUILD13.state) && (memberFlags & 31 /* Prop */ || (!BUILD13.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1829
|
+
if ((memberFlags & 2048 /* Getter */) === 0) {
|
|
1830
|
+
Object.defineProperty(prototype, memberName, {
|
|
1831
|
+
get() {
|
|
1832
|
+
return getValue(this, memberName);
|
|
1833
|
+
},
|
|
1834
|
+
set(newValue) {
|
|
1835
|
+
if (BUILD13.isDev) {
|
|
1836
|
+
const ref = getHostRef(this);
|
|
1837
|
+
if (
|
|
1838
|
+
// we are proxying the instance (not element)
|
|
1839
|
+
(flags & 1 /* isElementConstructor */) === 0 && // the element is not constructing
|
|
1840
|
+
(ref && ref.$flags$ & 8 /* isConstructingInstance */) === 0 && // the member is a prop
|
|
1841
|
+
(memberFlags & 31 /* Prop */) !== 0 && // the member is not mutable
|
|
1842
|
+
(memberFlags & 1024 /* Mutable */) === 0
|
|
1843
|
+
) {
|
|
1844
|
+
consoleDevWarn(
|
|
1845
|
+
`@Prop() "${memberName}" on <${cmpMeta.$tagName$}> is immutable but was modified from within the component.
|
|
1839
1846
|
More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
1840
|
-
|
|
1847
|
+
);
|
|
1848
|
+
}
|
|
1841
1849
|
}
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
})
|
|
1850
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1851
|
+
},
|
|
1852
|
+
configurable: true,
|
|
1853
|
+
enumerable: true
|
|
1854
|
+
});
|
|
1855
|
+
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
|
|
1856
|
+
if (BUILD13.lazyLoad) {
|
|
1857
|
+
Object.defineProperty(prototype, memberName, {
|
|
1858
|
+
get() {
|
|
1859
|
+
const ref = getHostRef(this);
|
|
1860
|
+
const instance = BUILD13.lazyLoad && ref ? ref.$lazyInstance$ : prototype;
|
|
1861
|
+
if (!instance) return;
|
|
1862
|
+
return instance[memberName];
|
|
1863
|
+
},
|
|
1864
|
+
configurable: true,
|
|
1865
|
+
enumerable: true
|
|
1866
|
+
});
|
|
1867
|
+
}
|
|
1868
|
+
if (memberFlags & 4096 /* Setter */) {
|
|
1869
|
+
const origSetter = Object.getOwnPropertyDescriptor(prototype, memberName).set;
|
|
1870
|
+
Object.defineProperty(prototype, memberName, {
|
|
1871
|
+
set(newValue) {
|
|
1872
|
+
const ref = getHostRef(this);
|
|
1873
|
+
if (origSetter) {
|
|
1874
|
+
const currentValue = ref.$hostElement$[memberName];
|
|
1875
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1876
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1877
|
+
}
|
|
1878
|
+
origSetter.apply(this, [parsePropertyValue(newValue, cmpMeta.$members$[memberName][0])]);
|
|
1879
|
+
setValue(this, memberName, ref.$hostElement$[memberName], cmpMeta);
|
|
1880
|
+
return;
|
|
1881
|
+
}
|
|
1882
|
+
if (!ref) return;
|
|
1883
|
+
const setterSetVal = () => {
|
|
1884
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1885
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1886
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1887
|
+
}
|
|
1888
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, cmpMeta.$members$[memberName][0]);
|
|
1889
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1890
|
+
};
|
|
1891
|
+
if (ref.$lazyInstance$) {
|
|
1892
|
+
setterSetVal();
|
|
1893
|
+
} else {
|
|
1894
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
});
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1848
1900
|
} else if (BUILD13.lazyLoad && BUILD13.method && flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
1849
1901
|
Object.defineProperty(prototype, memberName, {
|
|
1850
1902
|
value(...args) {
|
|
@@ -1885,7 +1937,10 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
|
|
|
1885
1937
|
}
|
|
1886
1938
|
return;
|
|
1887
1939
|
}
|
|
1888
|
-
|
|
1940
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1941
|
+
if (!propDesc.get || !!propDesc.set) {
|
|
1942
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1943
|
+
}
|
|
1889
1944
|
});
|
|
1890
1945
|
};
|
|
1891
1946
|
Cstr.observedAttributes = Array.from(
|
|
@@ -2097,7 +2152,7 @@ var disconnectedCallback = async (elm) => {
|
|
|
2097
2152
|
|
|
2098
2153
|
// src/runtime/dom-extras.ts
|
|
2099
2154
|
import { BUILD as BUILD17 } from "@stencil/core/internal/app-data";
|
|
2100
|
-
var patchPseudoShadowDom = (hostElementPrototype
|
|
2155
|
+
var patchPseudoShadowDom = (hostElementPrototype) => {
|
|
2101
2156
|
patchCloneNode(hostElementPrototype);
|
|
2102
2157
|
patchSlotAppendChild(hostElementPrototype);
|
|
2103
2158
|
patchSlotAppend(hostElementPrototype);
|
|
@@ -2106,7 +2161,7 @@ var patchPseudoShadowDom = (hostElementPrototype, descriptorPrototype) => {
|
|
|
2106
2161
|
patchSlotInsertAdjacentHTML(hostElementPrototype);
|
|
2107
2162
|
patchSlotInsertAdjacentText(hostElementPrototype);
|
|
2108
2163
|
patchTextContent(hostElementPrototype);
|
|
2109
|
-
patchChildSlotNodes(hostElementPrototype
|
|
2164
|
+
patchChildSlotNodes(hostElementPrototype);
|
|
2110
2165
|
patchSlotRemoveChild(hostElementPrototype);
|
|
2111
2166
|
};
|
|
2112
2167
|
var patchCloneNode = (HostElementPrototype) => {
|
|
@@ -2135,9 +2190,10 @@ var patchCloneNode = (HostElementPrototype) => {
|
|
|
2135
2190
|
"s-rf",
|
|
2136
2191
|
"s-scs"
|
|
2137
2192
|
];
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2193
|
+
const childNodes = this.__childNodes || this.childNodes;
|
|
2194
|
+
for (; i2 < childNodes.length; i2++) {
|
|
2195
|
+
slotted = childNodes[i2]["s-nr"];
|
|
2196
|
+
nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
|
|
2141
2197
|
if (slotted) {
|
|
2142
2198
|
if (BUILD17.appendChildSlotFix && clonedNode.__appendChild) {
|
|
2143
2199
|
clonedNode.__appendChild(slotted.cloneNode(true));
|
|
@@ -2146,7 +2202,7 @@ var patchCloneNode = (HostElementPrototype) => {
|
|
|
2146
2202
|
}
|
|
2147
2203
|
}
|
|
2148
2204
|
if (nonStencilNode) {
|
|
2149
|
-
clonedNode.appendChild(
|
|
2205
|
+
clonedNode.appendChild(childNodes[i2].cloneNode(true));
|
|
2150
2206
|
}
|
|
2151
2207
|
}
|
|
2152
2208
|
}
|
|
@@ -2157,13 +2213,9 @@ var patchSlotAppendChild = (HostElementPrototype) => {
|
|
|
2157
2213
|
HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
|
|
2158
2214
|
HostElementPrototype.appendChild = function(newChild) {
|
|
2159
2215
|
const slotName = newChild["s-sn"] = getSlotName(newChild);
|
|
2160
|
-
const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
|
|
2216
|
+
const slotNode = getHostSlotNode(this.__childNodes || this.childNodes, slotName, this.tagName);
|
|
2161
2217
|
if (slotNode) {
|
|
2162
|
-
|
|
2163
|
-
slotPlaceholder["s-nr"] = newChild;
|
|
2164
|
-
slotNode["s-cr"].parentNode.__appendChild(slotPlaceholder);
|
|
2165
|
-
newChild["s-ol"] = slotPlaceholder;
|
|
2166
|
-
newChild["s-sh"] = slotNode["s-hn"];
|
|
2218
|
+
addSlotRelocateNode(newChild, slotNode);
|
|
2167
2219
|
const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
|
|
2168
2220
|
const appendAfter = slotChildNodes[slotChildNodes.length - 1];
|
|
2169
2221
|
const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
|
|
@@ -2177,35 +2229,29 @@ var patchSlotRemoveChild = (ElementPrototype) => {
|
|
|
2177
2229
|
ElementPrototype.__removeChild = ElementPrototype.removeChild;
|
|
2178
2230
|
ElementPrototype.removeChild = function(toRemove) {
|
|
2179
2231
|
if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
|
|
2180
|
-
const
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
updateFallbackSlotVisibility(this);
|
|
2187
|
-
return;
|
|
2188
|
-
}
|
|
2232
|
+
const childNodes = this.__childNodes || this.childNodes;
|
|
2233
|
+
const slotNode = getHostSlotNode(childNodes, toRemove["s-sn"], this.tagName);
|
|
2234
|
+
if (slotNode && toRemove.isConnected) {
|
|
2235
|
+
toRemove.remove();
|
|
2236
|
+
updateFallbackSlotVisibility(this);
|
|
2237
|
+
return;
|
|
2189
2238
|
}
|
|
2190
2239
|
}
|
|
2191
2240
|
return this.__removeChild(toRemove);
|
|
2192
2241
|
};
|
|
2193
2242
|
};
|
|
2194
2243
|
var patchSlotPrepend = (HostElementPrototype) => {
|
|
2195
|
-
|
|
2244
|
+
HostElementPrototype.__prepend = HostElementPrototype.prepend;
|
|
2196
2245
|
HostElementPrototype.prepend = function(...newChildren) {
|
|
2197
2246
|
newChildren.forEach((newChild) => {
|
|
2198
2247
|
if (typeof newChild === "string") {
|
|
2199
2248
|
newChild = this.ownerDocument.createTextNode(newChild);
|
|
2200
2249
|
}
|
|
2201
2250
|
const slotName = newChild["s-sn"] = getSlotName(newChild);
|
|
2202
|
-
const
|
|
2251
|
+
const childNodes = this.__childNodes || this.childNodes;
|
|
2252
|
+
const slotNode = getHostSlotNode(childNodes, slotName, this.tagName);
|
|
2203
2253
|
if (slotNode) {
|
|
2204
|
-
|
|
2205
|
-
slotPlaceholder["s-nr"] = newChild;
|
|
2206
|
-
slotNode["s-cr"].parentNode.__appendChild(slotPlaceholder);
|
|
2207
|
-
newChild["s-ol"] = slotPlaceholder;
|
|
2208
|
-
newChild["s-sh"] = slotNode["s-hn"];
|
|
2254
|
+
addSlotRelocateNode(newChild, slotNode, true);
|
|
2209
2255
|
const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
|
|
2210
2256
|
const appendAfter = slotChildNodes[0];
|
|
2211
2257
|
return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
|
|
@@ -2213,11 +2259,12 @@ var patchSlotPrepend = (HostElementPrototype) => {
|
|
|
2213
2259
|
if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
|
|
2214
2260
|
newChild.hidden = true;
|
|
2215
2261
|
}
|
|
2216
|
-
return
|
|
2262
|
+
return HostElementPrototype.__prepend(newChild);
|
|
2217
2263
|
});
|
|
2218
2264
|
};
|
|
2219
2265
|
};
|
|
2220
2266
|
var patchSlotAppend = (HostElementPrototype) => {
|
|
2267
|
+
HostElementPrototype.__append = HostElementPrototype.append;
|
|
2221
2268
|
HostElementPrototype.append = function(...newChildren) {
|
|
2222
2269
|
newChildren.forEach((newChild) => {
|
|
2223
2270
|
if (typeof newChild === "string") {
|
|
@@ -2269,126 +2316,86 @@ var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
|
|
|
2269
2316
|
};
|
|
2270
2317
|
};
|
|
2271
2318
|
var patchTextContent = (hostElementPrototype) => {
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
},
|
|
2294
|
-
// To mimic shadow root behavior, we need to overwrite all nodes in a slot
|
|
2295
|
-
// reference node. If a default slot reference node exists, the text content will be
|
|
2296
|
-
// placed there. Otherwise, the new text node will be hidden
|
|
2297
|
-
set(value) {
|
|
2298
|
-
const slotRefNodes = getAllChildSlotNodes(this.childNodes);
|
|
2299
|
-
slotRefNodes.forEach((node) => {
|
|
2300
|
-
let slotContent = node.nextSibling;
|
|
2301
|
-
while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
|
|
2302
|
-
const tmp = slotContent;
|
|
2303
|
-
slotContent = slotContent.nextSibling;
|
|
2304
|
-
tmp.remove();
|
|
2305
|
-
}
|
|
2306
|
-
if (node["s-sn"] === "") {
|
|
2307
|
-
const textNode = this.ownerDocument.createTextNode(value);
|
|
2308
|
-
textNode["s-sn"] = "";
|
|
2309
|
-
insertBefore(node.parentElement, textNode, node.nextSibling);
|
|
2310
|
-
} else {
|
|
2311
|
-
node.remove();
|
|
2312
|
-
}
|
|
2313
|
-
});
|
|
2314
|
-
}
|
|
2315
|
-
});
|
|
2316
|
-
} else {
|
|
2317
|
-
Object.defineProperty(hostElementPrototype, "textContent", {
|
|
2318
|
-
get() {
|
|
2319
|
-
var _a;
|
|
2320
|
-
const slotNode = getHostSlotNode(this.childNodes, "", this.tagName);
|
|
2321
|
-
if (((_a = slotNode == null ? void 0 : slotNode.nextSibling) == null ? void 0 : _a.nodeType) === 3 /* TEXT_NODE */) {
|
|
2322
|
-
return slotNode.nextSibling.textContent;
|
|
2323
|
-
} else if (slotNode) {
|
|
2324
|
-
return slotNode.textContent;
|
|
2325
|
-
} else {
|
|
2326
|
-
return this.__textContent;
|
|
2327
|
-
}
|
|
2328
|
-
},
|
|
2329
|
-
set(value) {
|
|
2330
|
-
var _a;
|
|
2331
|
-
const slotNode = getHostSlotNode(this.childNodes, "", this.tagName);
|
|
2332
|
-
if (((_a = slotNode == null ? void 0 : slotNode.nextSibling) == null ? void 0 : _a.nodeType) === 3 /* TEXT_NODE */) {
|
|
2333
|
-
slotNode.nextSibling.textContent = value;
|
|
2334
|
-
} else if (slotNode) {
|
|
2335
|
-
slotNode.textContent = value;
|
|
2336
|
-
} else {
|
|
2337
|
-
this.__textContent = value;
|
|
2338
|
-
const contentRefElm = this["s-cr"];
|
|
2339
|
-
if (contentRefElm) {
|
|
2340
|
-
insertBefore(this, contentRefElm, this.firstChild);
|
|
2341
|
-
}
|
|
2342
|
-
}
|
|
2343
|
-
}
|
|
2344
|
-
});
|
|
2345
|
-
}
|
|
2319
|
+
let descriptor = Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
|
|
2320
|
+
if (!descriptor) {
|
|
2321
|
+
descriptor = Object.getOwnPropertyDescriptor(hostElementPrototype, "textContent");
|
|
2322
|
+
}
|
|
2323
|
+
if (descriptor) Object.defineProperty(hostElementPrototype, "__textContent", descriptor);
|
|
2324
|
+
Object.defineProperty(hostElementPrototype, "textContent", {
|
|
2325
|
+
get: function() {
|
|
2326
|
+
let text = "";
|
|
2327
|
+
const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
|
|
2328
|
+
childNodes.forEach((node) => text += node.textContent || "");
|
|
2329
|
+
return text;
|
|
2330
|
+
},
|
|
2331
|
+
set: function(value) {
|
|
2332
|
+
const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
|
|
2333
|
+
childNodes.forEach((node) => {
|
|
2334
|
+
if (node["s-ol"]) node["s-ol"].remove();
|
|
2335
|
+
node.remove();
|
|
2336
|
+
});
|
|
2337
|
+
this.insertAdjacentHTML("beforeend", value);
|
|
2338
|
+
}
|
|
2339
|
+
});
|
|
2346
2340
|
};
|
|
2347
|
-
var patchChildSlotNodes = (elm
|
|
2341
|
+
var patchChildSlotNodes = (elm) => {
|
|
2348
2342
|
class FakeNodeList extends Array {
|
|
2349
2343
|
item(n) {
|
|
2350
2344
|
return this[n];
|
|
2351
2345
|
}
|
|
2352
2346
|
}
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
Object.
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
}
|
|
2378
|
-
return FakeNodeList.from(childNodes);
|
|
2347
|
+
let childNodesFn = Object.getOwnPropertyDescriptor(Node.prototype, "childNodes");
|
|
2348
|
+
if (!childNodesFn) {
|
|
2349
|
+
childNodesFn = Object.getOwnPropertyDescriptor(elm, "childNodes");
|
|
2350
|
+
}
|
|
2351
|
+
if (childNodesFn) Object.defineProperty(elm, "__childNodes", childNodesFn);
|
|
2352
|
+
Object.defineProperty(elm, "children", {
|
|
2353
|
+
get() {
|
|
2354
|
+
return this.childNodes.filter((n) => n.nodeType === 1);
|
|
2355
|
+
}
|
|
2356
|
+
});
|
|
2357
|
+
Object.defineProperty(elm, "childElementCount", {
|
|
2358
|
+
get() {
|
|
2359
|
+
return this.children.length;
|
|
2360
|
+
}
|
|
2361
|
+
});
|
|
2362
|
+
if (!childNodesFn) return;
|
|
2363
|
+
Object.defineProperty(elm, "childNodes", {
|
|
2364
|
+
get() {
|
|
2365
|
+
var _a, _b;
|
|
2366
|
+
if (!plt.$flags$ || !((_a = getHostRef(this)) == null ? void 0 : _a.$flags$) || (plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && ((_b = getHostRef(this)) == null ? void 0 : _b.$flags$) & 2 /* hasRendered */) {
|
|
2367
|
+
const result = new FakeNodeList();
|
|
2368
|
+
const nodes = getSlottedChildNodes(this.__childNodes);
|
|
2369
|
+
result.push(...nodes);
|
|
2370
|
+
return result;
|
|
2379
2371
|
}
|
|
2380
|
-
|
|
2372
|
+
return FakeNodeList.from(this.__childNodes);
|
|
2373
|
+
}
|
|
2374
|
+
});
|
|
2375
|
+
};
|
|
2376
|
+
var addSlotRelocateNode = (newChild, slotNode, prepend) => {
|
|
2377
|
+
let slottedNodeLocation;
|
|
2378
|
+
if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
|
|
2379
|
+
slottedNodeLocation = newChild["s-ol"];
|
|
2380
|
+
} else {
|
|
2381
|
+
slottedNodeLocation = document.createTextNode("");
|
|
2382
|
+
slottedNodeLocation["s-nr"] = newChild;
|
|
2381
2383
|
}
|
|
2384
|
+
const parent = slotNode["s-cr"].parentNode;
|
|
2385
|
+
const appendMethod = prepend ? parent.__prepend : parent.__appendChild;
|
|
2386
|
+
newChild["s-ol"] = slottedNodeLocation;
|
|
2387
|
+
newChild["s-sh"] = slotNode["s-hn"];
|
|
2388
|
+
appendMethod.call(parent, slottedNodeLocation);
|
|
2382
2389
|
};
|
|
2383
|
-
var
|
|
2384
|
-
const
|
|
2385
|
-
for (
|
|
2386
|
-
|
|
2387
|
-
|
|
2390
|
+
var getSlottedChildNodes = (childNodes) => {
|
|
2391
|
+
const result = [];
|
|
2392
|
+
for (let i2 = 0; i2 < childNodes.length; i2++) {
|
|
2393
|
+
const slottedNode = childNodes[i2]["s-nr"];
|
|
2394
|
+
if (slottedNode && slottedNode.isConnected) {
|
|
2395
|
+
result.push(slottedNode);
|
|
2388
2396
|
}
|
|
2389
|
-
slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));
|
|
2390
2397
|
}
|
|
2391
|
-
return
|
|
2398
|
+
return result;
|
|
2392
2399
|
};
|
|
2393
2400
|
var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
|
|
2394
2401
|
var getHostSlotNode = (childNodes, slotName, hostName) => {
|
|
@@ -2440,11 +2447,11 @@ var proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
2440
2447
|
}
|
|
2441
2448
|
if (BUILD18.experimentalSlotFixes) {
|
|
2442
2449
|
if (BUILD18.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
2443
|
-
patchPseudoShadowDom(Cstr.prototype
|
|
2450
|
+
patchPseudoShadowDom(Cstr.prototype);
|
|
2444
2451
|
}
|
|
2445
2452
|
} else {
|
|
2446
2453
|
if (BUILD18.slotChildNodesFix) {
|
|
2447
|
-
patchChildSlotNodes(Cstr.prototype
|
|
2454
|
+
patchChildSlotNodes(Cstr.prototype);
|
|
2448
2455
|
}
|
|
2449
2456
|
if (BUILD18.cloneNodeFix) {
|
|
2450
2457
|
patchCloneNode(Cstr.prototype);
|
|
@@ -2650,11 +2657,11 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2650
2657
|
};
|
|
2651
2658
|
if (BUILD19.experimentalSlotFixes) {
|
|
2652
2659
|
if (BUILD19.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
2653
|
-
patchPseudoShadowDom(HostElement.prototype
|
|
2660
|
+
patchPseudoShadowDom(HostElement.prototype);
|
|
2654
2661
|
}
|
|
2655
2662
|
} else {
|
|
2656
2663
|
if (BUILD19.slotChildNodesFix) {
|
|
2657
|
-
patchChildSlotNodes(HostElement.prototype
|
|
2664
|
+
patchChildSlotNodes(HostElement.prototype);
|
|
2658
2665
|
}
|
|
2659
2666
|
if (BUILD19.cloneNodeFix) {
|
|
2660
2667
|
patchCloneNode(HostElement.prototype);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/hydrate",
|
|
3
|
-
"version": "4.22.3-dev.
|
|
3
|
+
"version": "4.22.3-dev.1732770122.a15bc5d",
|
|
4
4
|
"description": "Stencil internal hydrate platform to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"private": true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Hydrate Runner v4.22.3-dev.
|
|
2
|
+
Stencil Hydrate Runner v4.22.3-dev.1732770122.a15bc5d | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __export = (target, all) => {
|
package/internal/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal",
|
|
3
|
-
"version": "4.22.3-dev.
|
|
3
|
+
"version": "4.22.3-dev.1732770122.a15bc5d",
|
|
4
4
|
"description": "Stencil internals only to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -581,6 +581,8 @@ export interface ComponentCompilerStaticProperty {
|
|
|
581
581
|
reflect?: boolean;
|
|
582
582
|
docs: CompilerJsDoc;
|
|
583
583
|
defaultValue?: string;
|
|
584
|
+
getter: boolean;
|
|
585
|
+
setter: boolean;
|
|
584
586
|
}
|
|
585
587
|
/**
|
|
586
588
|
* Intermediate Representation (IR) of a property on a Stencil component
|
|
@@ -1256,6 +1258,12 @@ export interface RenderNode extends HostElement {
|
|
|
1256
1258
|
* empty "" for shadow, "c" from scoped
|
|
1257
1259
|
*/
|
|
1258
1260
|
['s-en']?: '' | /*shadow*/ 'c';
|
|
1261
|
+
/**
|
|
1262
|
+
* On a `scoped: true` component
|
|
1263
|
+
* with `experimentalSlotFixes` flag enabled,
|
|
1264
|
+
* returns the internal `childNodes` of the scoped element
|
|
1265
|
+
*/
|
|
1266
|
+
readonly __childNodes?: NodeListOf<ChildNode>;
|
|
1259
1267
|
}
|
|
1260
1268
|
export type LazyBundlesRuntimeData = LazyBundleRuntimeData[];
|
|
1261
1269
|
export type LazyBundleRuntimeData = [
|
|
@@ -311,6 +311,14 @@ export interface JsonDocsProp {
|
|
|
311
311
|
* ```
|
|
312
312
|
*/
|
|
313
313
|
required: boolean;
|
|
314
|
+
/**
|
|
315
|
+
* `true` if the prop has a `get()`. `false` otherwise
|
|
316
|
+
*/
|
|
317
|
+
getter: boolean;
|
|
318
|
+
/**
|
|
319
|
+
* `true` if the prop has a `set()`. `false` otherwise
|
|
320
|
+
*/
|
|
321
|
+
setter: boolean;
|
|
314
322
|
}
|
|
315
323
|
export interface JsonDocsMethod {
|
|
316
324
|
name: string;
|