@rindo/core 4.18.0 → 4.18.2
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 +106 -215
- package/cli/index.js +107 -217
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/rindo.js +1695 -2835
- 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 +117 -227
- package/internal/app-data/index.cjs +1 -0
- package/internal/app-data/index.js +1 -0
- package/internal/app-data/package.json +1 -1
- package/internal/client/index.js +75 -44
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/client/shadow-css.js +1 -2
- package/internal/hydrate/index.js +75 -44
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +52 -89
- package/internal/package.json +1 -1
- package/internal/rindo-private.d.ts +1 -0
- package/internal/rindo-public-compiler.d.ts +13 -2
- package/internal/rindo-public-runtime.d.ts +3 -8
- package/internal/testing/index.js +74 -43
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +378 -493
- package/mock-doc/index.d.ts +1 -1
- package/mock-doc/index.js +378 -493
- package/mock-doc/package.json +1 -1
- package/package.json +6 -8
- package/readme.md +20 -15
- package/screenshot/index.js +43 -85
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +14 -27
- package/sys/node/glob.js +1 -1
- package/sys/node/index.js +42 -42
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +169 -271
- package/testing/jest/jest-27-and-under/jest-facade.d.ts +1 -1
- package/testing/jest/jest-28/jest-facade.d.ts +5 -5
- package/testing/jest/jest-29/jest-facade.d.ts +5 -5
- package/testing/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Rindo Hydrate Platform v4.18.
|
|
2
|
+
Rindo Hydrate Platform v4.18.2 | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
@@ -822,7 +822,7 @@ var checkSlotFallbackVisibility = false;
|
|
|
822
822
|
var checkSlotRelocate = false;
|
|
823
823
|
var isSvgMode = false;
|
|
824
824
|
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
825
|
-
var _a
|
|
825
|
+
var _a;
|
|
826
826
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
827
827
|
let i2 = 0;
|
|
828
828
|
let elm;
|
|
@@ -874,13 +874,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
874
874
|
if ((BUILD10.shadowDom || BUILD10.scoped) && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
875
875
|
elm.classList.add(elm["s-si"] = scopeId);
|
|
876
876
|
}
|
|
877
|
-
if (BUILD10.scoped) {
|
|
878
|
-
const rootScopeId = ((_a = newParentVNode.$elm$) == null ? void 0 : _a["s-rsc"]) || ((_b = newParentVNode.$elm$) == null ? void 0 : _b["s-si"]) || ((_c = newParentVNode.$elm$) == null ? void 0 : _c["s-sc"]);
|
|
879
|
-
if (rootScopeId) {
|
|
880
|
-
elm["s-rsc"] = rootScopeId;
|
|
881
|
-
!elm.classList.contains(rootScopeId) && elm.classList.add(rootScopeId);
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
877
|
if (newVNode2.$children$) {
|
|
885
878
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
886
879
|
childNode = createElm(oldParentVNode, newVNode2, i2, elm);
|
|
@@ -903,7 +896,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
903
896
|
elm["s-sr"] = true;
|
|
904
897
|
elm["s-cr"] = contentRef;
|
|
905
898
|
elm["s-sn"] = newVNode2.$name$ || "";
|
|
906
|
-
elm["s-rf"] = (
|
|
899
|
+
elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
|
|
907
900
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
908
901
|
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
909
902
|
if (BUILD10.experimentalSlotFixes) {
|
|
@@ -924,7 +917,7 @@ var relocateToHostRoot = (parentElm) => {
|
|
|
924
917
|
const childNodeArray = Array.from(parentElm.childNodes);
|
|
925
918
|
for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
|
|
926
919
|
if (childNode["s-sh"] != null) {
|
|
927
|
-
|
|
920
|
+
insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
|
|
928
921
|
childNode["s-sh"] = void 0;
|
|
929
922
|
checkSlotRelocate = true;
|
|
930
923
|
}
|
|
@@ -946,7 +939,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
946
939
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
947
940
|
const childNode = oldSlotChildNodes[i2];
|
|
948
941
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
949
|
-
parentReferenceNode(childNode)
|
|
942
|
+
insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
|
|
950
943
|
childNode["s-ol"].remove();
|
|
951
944
|
childNode["s-ol"] = void 0;
|
|
952
945
|
childNode["s-sh"] = void 0;
|
|
@@ -969,7 +962,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
969
962
|
childNode = createElm(null, parentVNode, startIdx, parentElm);
|
|
970
963
|
if (childNode) {
|
|
971
964
|
vnodes[startIdx].$elm$ = childNode;
|
|
972
|
-
|
|
965
|
+
insertBefore(containerElm, childNode, BUILD10.slotRelocation ? referenceNode(before) : before);
|
|
973
966
|
}
|
|
974
967
|
}
|
|
975
968
|
}
|
|
@@ -1029,7 +1022,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1029
1022
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
1030
1023
|
}
|
|
1031
1024
|
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
1032
|
-
|
|
1025
|
+
insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
1033
1026
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
1034
1027
|
newEndVnode = newCh[--newEndIdx];
|
|
1035
1028
|
} else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
@@ -1037,7 +1030,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1037
1030
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
1038
1031
|
}
|
|
1039
1032
|
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
1040
|
-
|
|
1033
|
+
insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
1041
1034
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
1042
1035
|
newStartVnode = newCh[++newStartIdx];
|
|
1043
1036
|
} else {
|
|
@@ -1066,9 +1059,9 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1066
1059
|
}
|
|
1067
1060
|
if (node) {
|
|
1068
1061
|
if (BUILD10.slotRelocation) {
|
|
1069
|
-
parentReferenceNode(oldStartVnode.$elm$)
|
|
1062
|
+
insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
|
|
1070
1063
|
} else {
|
|
1071
|
-
oldStartVnode.$elm$.parentNode
|
|
1064
|
+
insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
|
|
1072
1065
|
}
|
|
1073
1066
|
}
|
|
1074
1067
|
}
|
|
@@ -1239,6 +1232,28 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
1239
1232
|
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
1240
1233
|
}
|
|
1241
1234
|
};
|
|
1235
|
+
var insertBefore = (parent, newNode, reference) => {
|
|
1236
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1237
|
+
if (BUILD10.scoped) {
|
|
1238
|
+
setParentScopeIdAsClassName(newNode, parent);
|
|
1239
|
+
}
|
|
1240
|
+
return inserted;
|
|
1241
|
+
};
|
|
1242
|
+
var findParentScopeId = (element) => {
|
|
1243
|
+
return element ? element["s-rsc"] || element["s-si"] || element["s-sc"] || findParentScopeId(element.parentElement) : void 0;
|
|
1244
|
+
};
|
|
1245
|
+
var setParentScopeIdAsClassName = (element, parent) => {
|
|
1246
|
+
var _a, _b, _c;
|
|
1247
|
+
if (element && parent) {
|
|
1248
|
+
const oldRootScopeId = element["s-rsc"];
|
|
1249
|
+
const newRootScopeId = findParentScopeId(parent);
|
|
1250
|
+
oldRootScopeId && ((_a = element.classList) == null ? void 0 : _a.contains(oldRootScopeId)) && element.classList.remove(oldRootScopeId);
|
|
1251
|
+
if (newRootScopeId) {
|
|
1252
|
+
element["s-rsc"] = newRootScopeId;
|
|
1253
|
+
!((_b = element.classList) == null ? void 0 : _b.contains(newRootScopeId)) && ((_c = element.classList) == null ? void 0 : _c.add(newRootScopeId));
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
};
|
|
1242
1257
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1243
1258
|
var _a, _b, _c, _d, _e;
|
|
1244
1259
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -1295,7 +1310,7 @@ render() {
|
|
|
1295
1310
|
if (!nodeToRelocate["s-ol"]) {
|
|
1296
1311
|
const orgLocationNode = BUILD10.isDebug || BUILD10.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : doc.createTextNode("");
|
|
1297
1312
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
1298
|
-
nodeToRelocate.parentNode
|
|
1313
|
+
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
1299
1314
|
}
|
|
1300
1315
|
}
|
|
1301
1316
|
for (const relocateData of relocateNodes) {
|
|
@@ -1326,7 +1341,7 @@ render() {
|
|
|
1326
1341
|
if (!BUILD10.experimentalSlotFixes && !nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1327
1342
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1328
1343
|
}
|
|
1329
|
-
|
|
1344
|
+
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1330
1345
|
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1331
1346
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1332
1347
|
}
|
|
@@ -1390,6 +1405,11 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1390
1405
|
const elm = hostRef.$hostElement$;
|
|
1391
1406
|
const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
|
|
1392
1407
|
const instance = BUILD11.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
1408
|
+
if (!instance) {
|
|
1409
|
+
throw new Error(
|
|
1410
|
+
`Can't render component <${elm.tagName.toLowerCase()} /> with invalid Rindo runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://rindojs.web.app/docs/custom-elements#externalruntime`
|
|
1411
|
+
);
|
|
1412
|
+
}
|
|
1393
1413
|
let maybePromise;
|
|
1394
1414
|
if (isInitialLoad) {
|
|
1395
1415
|
if (BUILD11.lazyLoad && BUILD11.hostListener) {
|
|
@@ -1620,7 +1640,10 @@ var emitLifecycleEvent = (elm, lifecycleName) => {
|
|
|
1620
1640
|
});
|
|
1621
1641
|
}
|
|
1622
1642
|
};
|
|
1623
|
-
var addHydratedFlag = (elm) =>
|
|
1643
|
+
var addHydratedFlag = (elm) => {
|
|
1644
|
+
var _a, _b;
|
|
1645
|
+
return BUILD11.hydratedClass ? elm.classList.add((_a = BUILD11.hydratedSelectorName) != null ? _a : "hydrated") : BUILD11.hydratedAttribute ? elm.setAttribute((_b = BUILD11.hydratedSelectorName) != null ? _b : "hydrated", "") : void 0;
|
|
1646
|
+
};
|
|
1624
1647
|
var serverSideConnected = (elm) => {
|
|
1625
1648
|
const children = elm.children;
|
|
1626
1649
|
if (children != null) {
|
|
@@ -1638,6 +1661,11 @@ var serverSideConnected = (elm) => {
|
|
|
1638
1661
|
var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
1639
1662
|
var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1640
1663
|
const hostRef = getHostRef(ref);
|
|
1664
|
+
if (BUILD12.lazyLoad && !hostRef) {
|
|
1665
|
+
throw new Error(
|
|
1666
|
+
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Rindo runtime. This usually happens when integrating a 3rd party Rindo component with another Rindo component or application.`
|
|
1667
|
+
);
|
|
1668
|
+
}
|
|
1641
1669
|
const elm = BUILD12.lazyLoad ? hostRef.$hostElement$ : ref;
|
|
1642
1670
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
1643
1671
|
const flags = hostRef.$flags$;
|
|
@@ -1819,16 +1847,18 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1819
1847
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1820
1848
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1821
1849
|
if ((BUILD14.lazyLoad || BUILD14.hydrateClientSide) && bundleId) {
|
|
1822
|
-
|
|
1823
|
-
if (
|
|
1850
|
+
const CstrImport = loadModule(cmpMeta, hostRef, hmrVersionId);
|
|
1851
|
+
if (CstrImport && "then" in CstrImport) {
|
|
1824
1852
|
const endLoad = uniqueTime(
|
|
1825
1853
|
`st:load:${cmpMeta.$tagName$}:${hostRef.$modeName$}`,
|
|
1826
1854
|
`[Rindo] Load module for <${cmpMeta.$tagName$}>`
|
|
1827
1855
|
);
|
|
1828
|
-
Cstr = await
|
|
1856
|
+
Cstr = await CstrImport;
|
|
1829
1857
|
endLoad();
|
|
1858
|
+
} else {
|
|
1859
|
+
Cstr = CstrImport;
|
|
1830
1860
|
}
|
|
1831
|
-
if (
|
|
1861
|
+
if (!Cstr) {
|
|
1832
1862
|
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
1833
1863
|
}
|
|
1834
1864
|
if (BUILD14.member && !Cstr.isProxied) {
|
|
@@ -1857,12 +1887,16 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1857
1887
|
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1858
1888
|
} else {
|
|
1859
1889
|
Cstr = elm.constructor;
|
|
1860
|
-
|
|
1890
|
+
const cmpTag = elm.localName;
|
|
1891
|
+
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1861
1892
|
}
|
|
1862
|
-
if (BUILD14.style && Cstr.style) {
|
|
1893
|
+
if (BUILD14.style && Cstr && Cstr.style) {
|
|
1863
1894
|
let style = Cstr.style;
|
|
1864
1895
|
if (BUILD14.mode && typeof style !== "string") {
|
|
1865
|
-
|
|
1896
|
+
hostRef.$modeName$ = computeMode(elm);
|
|
1897
|
+
if (hostRef.$modeName$) {
|
|
1898
|
+
style = style[hostRef.$modeName$];
|
|
1899
|
+
}
|
|
1866
1900
|
if (BUILD14.hydrateServerSide && hostRef.$modeName$) {
|
|
1867
1901
|
elm.setAttribute("s-mode", hostRef.$modeName$);
|
|
1868
1902
|
}
|
|
@@ -1960,7 +1994,7 @@ var setContentReference = (elm) => {
|
|
|
1960
1994
|
BUILD15.isDebug ? `content-ref (host=${elm.localName})` : ""
|
|
1961
1995
|
);
|
|
1962
1996
|
contentRefElm["s-cn"] = true;
|
|
1963
|
-
|
|
1997
|
+
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1964
1998
|
};
|
|
1965
1999
|
|
|
1966
2000
|
// src/runtime/disconnected-callback.ts
|
|
@@ -2029,7 +2063,8 @@ var patchCloneNode = (HostElementPrototype) => {
|
|
|
2029
2063
|
"s-ol",
|
|
2030
2064
|
"s-nr",
|
|
2031
2065
|
"s-si",
|
|
2032
|
-
"s-rf"
|
|
2066
|
+
"s-rf",
|
|
2067
|
+
"s-rsc"
|
|
2033
2068
|
];
|
|
2034
2069
|
for (; i2 < srcNode.childNodes.length; i2++) {
|
|
2035
2070
|
slotted = srcNode.childNodes[i2]["s-nr"];
|
|
@@ -2057,7 +2092,7 @@ var patchSlotAppendChild = (HostElementPrototype) => {
|
|
|
2057
2092
|
if (slotNode) {
|
|
2058
2093
|
const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
|
|
2059
2094
|
const appendAfter = slotChildNodes[slotChildNodes.length - 1];
|
|
2060
|
-
const insertedNode = appendAfter.parentNode
|
|
2095
|
+
const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
|
|
2061
2096
|
updateFallbackSlotVisibility(this);
|
|
2062
2097
|
return insertedNode;
|
|
2063
2098
|
}
|
|
@@ -2098,7 +2133,7 @@ var patchSlotPrepend = (HostElementPrototype) => {
|
|
|
2098
2133
|
newChild["s-ol"] = slotPlaceholder;
|
|
2099
2134
|
const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
|
|
2100
2135
|
const appendAfter = slotChildNodes[0];
|
|
2101
|
-
return appendAfter.parentNode
|
|
2136
|
+
return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
|
|
2102
2137
|
}
|
|
2103
2138
|
if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
|
|
2104
2139
|
newChild.hidden = true;
|
|
@@ -2196,7 +2231,7 @@ var patchTextContent = (hostElementPrototype) => {
|
|
|
2196
2231
|
if (node["s-sn"] === "") {
|
|
2197
2232
|
const textNode = this.ownerDocument.createTextNode(value);
|
|
2198
2233
|
textNode["s-sn"] = "";
|
|
2199
|
-
node.parentElement
|
|
2234
|
+
insertBefore(node.parentElement, textNode, node.nextSibling);
|
|
2200
2235
|
} else {
|
|
2201
2236
|
node.remove();
|
|
2202
2237
|
}
|
|
@@ -2227,7 +2262,7 @@ var patchTextContent = (hostElementPrototype) => {
|
|
|
2227
2262
|
this.__textContent = value;
|
|
2228
2263
|
const contentRefElm = this["s-cr"];
|
|
2229
2264
|
if (contentRefElm) {
|
|
2230
|
-
|
|
2265
|
+
insertBefore(this, contentRefElm, this.firstChild);
|
|
2231
2266
|
}
|
|
2232
2267
|
}
|
|
2233
2268
|
}
|
|
@@ -2621,14 +2656,10 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
2621
2656
|
}
|
|
2622
2657
|
};
|
|
2623
2658
|
var getHostListenerTarget = (elm, flags) => {
|
|
2624
|
-
if (BUILD20.hostListenerTargetDocument && flags & 4 /* TargetDocument */)
|
|
2625
|
-
|
|
2626
|
-
if (BUILD20.
|
|
2627
|
-
|
|
2628
|
-
if (BUILD20.hostListenerTargetBody && flags & 16 /* TargetBody */)
|
|
2629
|
-
return doc.body;
|
|
2630
|
-
if (BUILD20.hostListenerTargetParent && flags & 32 /* TargetParent */)
|
|
2631
|
-
return elm.parentElement;
|
|
2659
|
+
if (BUILD20.hostListenerTargetDocument && flags & 4 /* TargetDocument */) return doc;
|
|
2660
|
+
if (BUILD20.hostListenerTargetWindow && flags & 8 /* TargetWindow */) return win;
|
|
2661
|
+
if (BUILD20.hostListenerTargetBody && flags & 16 /* TargetBody */) return doc.body;
|
|
2662
|
+
if (BUILD20.hostListenerTargetParent && flags & 32 /* TargetParent */) return elm.parentElement;
|
|
2632
2663
|
return elm;
|
|
2633
2664
|
};
|
|
2634
2665
|
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
@@ -2650,7 +2681,7 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
|
|
|
2650
2681
|
const orgLocationNodes = [];
|
|
2651
2682
|
parseVNodeAnnotations(doc2, doc2.body, docData, orgLocationNodes);
|
|
2652
2683
|
orgLocationNodes.forEach((orgLocationNode) => {
|
|
2653
|
-
var _a
|
|
2684
|
+
var _a;
|
|
2654
2685
|
if (orgLocationNode != null && orgLocationNode["s-nr"]) {
|
|
2655
2686
|
const nodeRef = orgLocationNode["s-nr"];
|
|
2656
2687
|
let hostId = nodeRef["s-host-id"];
|
|
@@ -2673,7 +2704,7 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
|
|
|
2673
2704
|
}
|
|
2674
2705
|
const commentBeforeTextNode = doc2.createComment(childId);
|
|
2675
2706
|
commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;
|
|
2676
|
-
(
|
|
2707
|
+
insertBefore(nodeRef.parentNode, commentBeforeTextNode, nodeRef);
|
|
2677
2708
|
}
|
|
2678
2709
|
}
|
|
2679
2710
|
let orgLocationNodeId = `${ORG_LOCATION_ID}.${childId}`;
|
|
@@ -2758,7 +2789,7 @@ var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, ind
|
|
|
2758
2789
|
if (nodeName !== "STYLE" && nodeName !== "SCRIPT") {
|
|
2759
2790
|
const textNodeId = `${TEXT_NODE_ID}.${childId}`;
|
|
2760
2791
|
const commentBeforeTextNode = doc2.createComment(textNodeId);
|
|
2761
|
-
parentNode
|
|
2792
|
+
insertBefore(parentNode, commentBeforeTextNode, childElm);
|
|
2762
2793
|
}
|
|
2763
2794
|
} else if (childElm.nodeType === 8 /* CommentNode */) {
|
|
2764
2795
|
if (childElm["s-sr"]) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rindo/core/internal/hydrate",
|
|
3
|
-
"version": "4.18.
|
|
3
|
+
"version": "4.18.2",
|
|
4
4
|
"description": "Rindo internal hydrate platform to be imported by the Rindo Compiler. Breaking changes can and will happen at any time.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"private": true
|