@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.
Files changed (45) hide show
  1. package/cli/index.cjs +106 -215
  2. package/cli/index.js +107 -217
  3. package/cli/package.json +1 -1
  4. package/compiler/package.json +1 -1
  5. package/compiler/rindo.js +1695 -2835
  6. package/dev-server/client/index.js +1 -1
  7. package/dev-server/client/package.json +1 -1
  8. package/dev-server/connector.html +2 -2
  9. package/dev-server/index.js +1 -1
  10. package/dev-server/package.json +1 -1
  11. package/dev-server/server-process.js +117 -227
  12. package/internal/app-data/index.cjs +1 -0
  13. package/internal/app-data/index.js +1 -0
  14. package/internal/app-data/package.json +1 -1
  15. package/internal/client/index.js +75 -44
  16. package/internal/client/package.json +1 -1
  17. package/internal/client/patch-browser.js +1 -1
  18. package/internal/client/shadow-css.js +1 -2
  19. package/internal/hydrate/index.js +75 -44
  20. package/internal/hydrate/package.json +1 -1
  21. package/internal/hydrate/runner.js +52 -89
  22. package/internal/package.json +1 -1
  23. package/internal/rindo-private.d.ts +1 -0
  24. package/internal/rindo-public-compiler.d.ts +13 -2
  25. package/internal/rindo-public-runtime.d.ts +3 -8
  26. package/internal/testing/index.js +74 -43
  27. package/internal/testing/package.json +1 -1
  28. package/mock-doc/index.cjs +378 -493
  29. package/mock-doc/index.d.ts +1 -1
  30. package/mock-doc/index.js +378 -493
  31. package/mock-doc/package.json +1 -1
  32. package/package.json +6 -8
  33. package/readme.md +20 -15
  34. package/screenshot/index.js +43 -85
  35. package/screenshot/package.json +1 -1
  36. package/screenshot/pixel-match.js +14 -27
  37. package/sys/node/glob.js +1 -1
  38. package/sys/node/index.js +42 -42
  39. package/sys/node/package.json +1 -1
  40. package/sys/node/worker.js +1 -1
  41. package/testing/index.js +169 -271
  42. package/testing/jest/jest-27-and-under/jest-facade.d.ts +1 -1
  43. package/testing/jest/jest-28/jest-facade.d.ts +5 -5
  44. package/testing/jest/jest-29/jest-facade.d.ts +5 -5
  45. package/testing/package.json +1 -1
@@ -91,6 +91,7 @@ var BUILD = {
91
91
  cloneNodeFix: false,
92
92
  hydratedAttribute: false,
93
93
  hydratedClass: true,
94
+ // TODO(RINDO-1305): remove this option
94
95
  scriptDataOpts: false,
95
96
  // TODO(RINDO-914): remove this option when `experimentalSlotFixes` is the default behavior
96
97
  scopedSlotTextContentFix: false,
@@ -65,6 +65,7 @@ var BUILD = {
65
65
  cloneNodeFix: false,
66
66
  hydratedAttribute: false,
67
67
  hydratedClass: true,
68
+ // TODO(RINDO-1305): remove this option
68
69
  scriptDataOpts: false,
69
70
  // TODO(RINDO-914): remove this option when `experimentalSlotFixes` is the default behavior
70
71
  scopedSlotTextContentFix: false,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/internal/app-data",
3
- "version": "4.18.0",
3
+ "version": "4.18.2",
4
4
  "description": "Used for default app data and build conditionals within builds.",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
@@ -1,5 +1,5 @@
1
1
  /*
2
- Rindo Client Platform v4.18.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Client Platform v4.18.2 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __export = (target, all) => {
@@ -833,7 +833,7 @@ var checkSlotFallbackVisibility = false;
833
833
  var checkSlotRelocate = false;
834
834
  var isSvgMode = false;
835
835
  var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
836
- var _a, _b, _c, _d;
836
+ var _a;
837
837
  const newVNode2 = newParentVNode.$children$[childIndex];
838
838
  let i2 = 0;
839
839
  let elm;
@@ -885,13 +885,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
885
885
  if ((BUILD11.shadowDom || BUILD11.scoped) && isDef(scopeId) && elm["s-si"] !== scopeId) {
886
886
  elm.classList.add(elm["s-si"] = scopeId);
887
887
  }
888
- if (BUILD11.scoped) {
889
- 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"]);
890
- if (rootScopeId) {
891
- elm["s-rsc"] = rootScopeId;
892
- !elm.classList.contains(rootScopeId) && elm.classList.add(rootScopeId);
893
- }
894
- }
895
888
  if (newVNode2.$children$) {
896
889
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
897
890
  childNode = createElm(oldParentVNode, newVNode2, i2, elm);
@@ -914,7 +907,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
914
907
  elm["s-sr"] = true;
915
908
  elm["s-cr"] = contentRef;
916
909
  elm["s-sn"] = newVNode2.$name$ || "";
917
- elm["s-rf"] = (_d = newVNode2.$attrs$) == null ? void 0 : _d.ref;
910
+ elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
918
911
  oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
919
912
  if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
920
913
  if (BUILD11.experimentalSlotFixes) {
@@ -935,7 +928,7 @@ var relocateToHostRoot = (parentElm) => {
935
928
  const childNodeArray = Array.from(parentElm.childNodes);
936
929
  for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
937
930
  if (childNode["s-sh"] != null) {
938
- host.insertBefore(childNode, contentRefNode != null ? contentRefNode : null);
931
+ insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
939
932
  childNode["s-sh"] = void 0;
940
933
  checkSlotRelocate = true;
941
934
  }
@@ -957,7 +950,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
957
950
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
958
951
  const childNode = oldSlotChildNodes[i2];
959
952
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
960
- parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
953
+ insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
961
954
  childNode["s-ol"].remove();
962
955
  childNode["s-ol"] = void 0;
963
956
  childNode["s-sh"] = void 0;
@@ -980,7 +973,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
980
973
  childNode = createElm(null, parentVNode, startIdx, parentElm);
981
974
  if (childNode) {
982
975
  vnodes[startIdx].$elm$ = childNode;
983
- containerElm.insertBefore(childNode, BUILD11.slotRelocation ? referenceNode(before) : before);
976
+ insertBefore(containerElm, childNode, BUILD11.slotRelocation ? referenceNode(before) : before);
984
977
  }
985
978
  }
986
979
  }
@@ -1040,7 +1033,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1040
1033
  putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
1041
1034
  }
1042
1035
  patch(oldStartVnode, newEndVnode, isInitialRender);
1043
- parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
1036
+ insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
1044
1037
  oldStartVnode = oldCh[++oldStartIdx];
1045
1038
  newEndVnode = newCh[--newEndIdx];
1046
1039
  } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
@@ -1048,7 +1041,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1048
1041
  putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
1049
1042
  }
1050
1043
  patch(oldEndVnode, newStartVnode, isInitialRender);
1051
- parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
1044
+ insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
1052
1045
  oldEndVnode = oldCh[--oldEndIdx];
1053
1046
  newStartVnode = newCh[++newStartIdx];
1054
1047
  } else {
@@ -1077,9 +1070,9 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1077
1070
  }
1078
1071
  if (node) {
1079
1072
  if (BUILD11.slotRelocation) {
1080
- parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
1073
+ insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
1081
1074
  } else {
1082
- oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
1075
+ insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
1083
1076
  }
1084
1077
  }
1085
1078
  }
@@ -1250,6 +1243,28 @@ var nullifyVNodeRefs = (vNode) => {
1250
1243
  vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1251
1244
  }
1252
1245
  };
1246
+ var insertBefore = (parent, newNode, reference) => {
1247
+ const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1248
+ if (BUILD11.scoped) {
1249
+ setParentScopeIdAsClassName(newNode, parent);
1250
+ }
1251
+ return inserted;
1252
+ };
1253
+ var findParentScopeId = (element) => {
1254
+ return element ? element["s-rsc"] || element["s-si"] || element["s-sc"] || findParentScopeId(element.parentElement) : void 0;
1255
+ };
1256
+ var setParentScopeIdAsClassName = (element, parent) => {
1257
+ var _a, _b, _c;
1258
+ if (element && parent) {
1259
+ const oldRootScopeId = element["s-rsc"];
1260
+ const newRootScopeId = findParentScopeId(parent);
1261
+ oldRootScopeId && ((_a = element.classList) == null ? void 0 : _a.contains(oldRootScopeId)) && element.classList.remove(oldRootScopeId);
1262
+ if (newRootScopeId) {
1263
+ element["s-rsc"] = newRootScopeId;
1264
+ !((_b = element.classList) == null ? void 0 : _b.contains(newRootScopeId)) && ((_c = element.classList) == null ? void 0 : _c.add(newRootScopeId));
1265
+ }
1266
+ }
1267
+ };
1253
1268
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1254
1269
  var _a, _b, _c, _d, _e;
1255
1270
  const hostElm = hostRef.$hostElement$;
@@ -1306,7 +1321,7 @@ render() {
1306
1321
  if (!nodeToRelocate["s-ol"]) {
1307
1322
  const orgLocationNode = BUILD11.isDebug || BUILD11.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : doc.createTextNode("");
1308
1323
  orgLocationNode["s-nr"] = nodeToRelocate;
1309
- nodeToRelocate.parentNode.insertBefore(nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
1324
+ insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
1310
1325
  }
1311
1326
  }
1312
1327
  for (const relocateData of relocateNodes) {
@@ -1337,7 +1352,7 @@ render() {
1337
1352
  if (!BUILD11.experimentalSlotFixes && !nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1338
1353
  nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
1339
1354
  }
1340
- parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
1355
+ insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1341
1356
  if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1342
1357
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1343
1358
  }
@@ -1401,6 +1416,11 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
1401
1416
  const elm = hostRef.$hostElement$;
1402
1417
  const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
1403
1418
  const instance = BUILD12.lazyLoad ? hostRef.$lazyInstance$ : elm;
1419
+ if (!instance) {
1420
+ throw new Error(
1421
+ `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`
1422
+ );
1423
+ }
1404
1424
  let maybePromise;
1405
1425
  if (isInitialLoad) {
1406
1426
  if (BUILD12.lazyLoad && BUILD12.hostListener) {
@@ -1631,7 +1651,10 @@ var emitLifecycleEvent = (elm, lifecycleName) => {
1631
1651
  });
1632
1652
  }
1633
1653
  };
1634
- var addHydratedFlag = (elm) => BUILD12.hydratedClass ? elm.classList.add("hydrated") : BUILD12.hydratedAttribute ? elm.setAttribute("hydrated", "") : void 0;
1654
+ var addHydratedFlag = (elm) => {
1655
+ var _a, _b;
1656
+ return BUILD12.hydratedClass ? elm.classList.add((_a = BUILD12.hydratedSelectorName) != null ? _a : "hydrated") : BUILD12.hydratedAttribute ? elm.setAttribute((_b = BUILD12.hydratedSelectorName) != null ? _b : "hydrated", "") : void 0;
1657
+ };
1635
1658
  var serverSideConnected = (elm) => {
1636
1659
  const children = elm.children;
1637
1660
  if (children != null) {
@@ -1649,6 +1672,11 @@ var serverSideConnected = (elm) => {
1649
1672
  var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1650
1673
  var setValue = (ref, propName, newVal, cmpMeta) => {
1651
1674
  const hostRef = getHostRef(ref);
1675
+ if (BUILD13.lazyLoad && !hostRef) {
1676
+ throw new Error(
1677
+ `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.`
1678
+ );
1679
+ }
1652
1680
  const elm = BUILD13.lazyLoad ? hostRef.$hostElement$ : ref;
1653
1681
  const oldVal = hostRef.$instanceValues$.get(propName);
1654
1682
  const flags = hostRef.$flags$;
@@ -1830,16 +1858,18 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1830
1858
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1831
1859
  const bundleId = cmpMeta.$lazyBundleId$;
1832
1860
  if ((BUILD15.lazyLoad || BUILD15.hydrateClientSide) && bundleId) {
1833
- Cstr = loadModule(cmpMeta, hostRef, hmrVersionId);
1834
- if (Cstr.then) {
1861
+ const CstrImport = loadModule(cmpMeta, hostRef, hmrVersionId);
1862
+ if (CstrImport && "then" in CstrImport) {
1835
1863
  const endLoad = uniqueTime(
1836
1864
  `st:load:${cmpMeta.$tagName$}:${hostRef.$modeName$}`,
1837
1865
  `[Rindo] Load module for <${cmpMeta.$tagName$}>`
1838
1866
  );
1839
- Cstr = await Cstr;
1867
+ Cstr = await CstrImport;
1840
1868
  endLoad();
1869
+ } else {
1870
+ Cstr = CstrImport;
1841
1871
  }
1842
- if ((BUILD15.isDev || BUILD15.isDebug) && !Cstr) {
1872
+ if (!Cstr) {
1843
1873
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1844
1874
  }
1845
1875
  if (BUILD15.member && !Cstr.isProxied) {
@@ -1868,12 +1898,16 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1868
1898
  fireConnectedCallback(hostRef.$lazyInstance$);
1869
1899
  } else {
1870
1900
  Cstr = elm.constructor;
1871
- customElements.whenDefined(cmpMeta.$tagName$).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1901
+ const cmpTag = elm.localName;
1902
+ customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1872
1903
  }
1873
- if (BUILD15.style && Cstr.style) {
1904
+ if (BUILD15.style && Cstr && Cstr.style) {
1874
1905
  let style = Cstr.style;
1875
1906
  if (BUILD15.mode && typeof style !== "string") {
1876
- style = style[hostRef.$modeName$ = computeMode(elm)];
1907
+ hostRef.$modeName$ = computeMode(elm);
1908
+ if (hostRef.$modeName$) {
1909
+ style = style[hostRef.$modeName$];
1910
+ }
1877
1911
  if (BUILD15.hydrateServerSide && hostRef.$modeName$) {
1878
1912
  elm.setAttribute("s-mode", hostRef.$modeName$);
1879
1913
  }
@@ -1971,7 +2005,7 @@ var setContentReference = (elm) => {
1971
2005
  BUILD16.isDebug ? `content-ref (host=${elm.localName})` : ""
1972
2006
  );
1973
2007
  contentRefElm["s-cn"] = true;
1974
- elm.insertBefore(contentRefElm, elm.firstChild);
2008
+ insertBefore(elm, contentRefElm, elm.firstChild);
1975
2009
  };
1976
2010
 
1977
2011
  // src/runtime/disconnected-callback.ts
@@ -2040,7 +2074,8 @@ var patchCloneNode = (HostElementPrototype) => {
2040
2074
  "s-ol",
2041
2075
  "s-nr",
2042
2076
  "s-si",
2043
- "s-rf"
2077
+ "s-rf",
2078
+ "s-rsc"
2044
2079
  ];
2045
2080
  for (; i2 < srcNode.childNodes.length; i2++) {
2046
2081
  slotted = srcNode.childNodes[i2]["s-nr"];
@@ -2068,7 +2103,7 @@ var patchSlotAppendChild = (HostElementPrototype) => {
2068
2103
  if (slotNode) {
2069
2104
  const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
2070
2105
  const appendAfter = slotChildNodes[slotChildNodes.length - 1];
2071
- const insertedNode = appendAfter.parentNode.insertBefore(newChild, appendAfter.nextSibling);
2106
+ const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
2072
2107
  updateFallbackSlotVisibility(this);
2073
2108
  return insertedNode;
2074
2109
  }
@@ -2109,7 +2144,7 @@ var patchSlotPrepend = (HostElementPrototype) => {
2109
2144
  newChild["s-ol"] = slotPlaceholder;
2110
2145
  const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
2111
2146
  const appendAfter = slotChildNodes[0];
2112
- return appendAfter.parentNode.insertBefore(newChild, appendAfter.nextSibling);
2147
+ return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
2113
2148
  }
2114
2149
  if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
2115
2150
  newChild.hidden = true;
@@ -2207,7 +2242,7 @@ var patchTextContent = (hostElementPrototype) => {
2207
2242
  if (node["s-sn"] === "") {
2208
2243
  const textNode = this.ownerDocument.createTextNode(value);
2209
2244
  textNode["s-sn"] = "";
2210
- node.parentElement.insertBefore(textNode, node.nextSibling);
2245
+ insertBefore(node.parentElement, textNode, node.nextSibling);
2211
2246
  } else {
2212
2247
  node.remove();
2213
2248
  }
@@ -2238,7 +2273,7 @@ var patchTextContent = (hostElementPrototype) => {
2238
2273
  this.__textContent = value;
2239
2274
  const contentRefElm = this["s-cr"];
2240
2275
  if (contentRefElm) {
2241
- this.insertBefore(contentRefElm, this.firstChild);
2276
+ insertBefore(this, contentRefElm, this.firstChild);
2242
2277
  }
2243
2278
  }
2244
2279
  }
@@ -2632,14 +2667,10 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
2632
2667
  }
2633
2668
  };
2634
2669
  var getHostListenerTarget = (elm, flags) => {
2635
- if (BUILD21.hostListenerTargetDocument && flags & 4 /* TargetDocument */)
2636
- return doc;
2637
- if (BUILD21.hostListenerTargetWindow && flags & 8 /* TargetWindow */)
2638
- return win;
2639
- if (BUILD21.hostListenerTargetBody && flags & 16 /* TargetBody */)
2640
- return doc.body;
2641
- if (BUILD21.hostListenerTargetParent && flags & 32 /* TargetParent */)
2642
- return elm.parentElement;
2670
+ if (BUILD21.hostListenerTargetDocument && flags & 4 /* TargetDocument */) return doc;
2671
+ if (BUILD21.hostListenerTargetWindow && flags & 8 /* TargetWindow */) return win;
2672
+ if (BUILD21.hostListenerTargetBody && flags & 16 /* TargetBody */) return doc.body;
2673
+ if (BUILD21.hostListenerTargetParent && flags & 32 /* TargetParent */) return elm.parentElement;
2643
2674
  return elm;
2644
2675
  };
2645
2676
  var hostListenerOpts = (flags) => supportsListenerOptions ? {
@@ -2664,7 +2695,7 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
2664
2695
  const orgLocationNodes = [];
2665
2696
  parseVNodeAnnotations(doc2, doc2.body, docData, orgLocationNodes);
2666
2697
  orgLocationNodes.forEach((orgLocationNode) => {
2667
- var _a, _b;
2698
+ var _a;
2668
2699
  if (orgLocationNode != null && orgLocationNode["s-nr"]) {
2669
2700
  const nodeRef = orgLocationNode["s-nr"];
2670
2701
  let hostId = nodeRef["s-host-id"];
@@ -2687,7 +2718,7 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
2687
2718
  }
2688
2719
  const commentBeforeTextNode = doc2.createComment(childId);
2689
2720
  commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;
2690
- (_b = nodeRef.parentNode) == null ? void 0 : _b.insertBefore(commentBeforeTextNode, nodeRef);
2721
+ insertBefore(nodeRef.parentNode, commentBeforeTextNode, nodeRef);
2691
2722
  }
2692
2723
  }
2693
2724
  let orgLocationNodeId = `${ORG_LOCATION_ID}.${childId}`;
@@ -2772,7 +2803,7 @@ var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, ind
2772
2803
  if (nodeName !== "STYLE" && nodeName !== "SCRIPT") {
2773
2804
  const textNodeId = `${TEXT_NODE_ID}.${childId}`;
2774
2805
  const commentBeforeTextNode = doc2.createComment(textNodeId);
2775
- parentNode == null ? void 0 : parentNode.insertBefore(commentBeforeTextNode, childElm);
2806
+ insertBefore(parentNode, commentBeforeTextNode, childElm);
2776
2807
  }
2777
2808
  } else if (childElm.nodeType === 8 /* CommentNode */) {
2778
2809
  if (childElm["s-sr"]) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/internal/client",
3
- "version": "4.18.0",
3
+ "version": "4.18.2",
4
4
  "description": "Rindo internal client platform to be imported by the Rindo Compiler and internal runtime. 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
- Rindo Client Patch Browser v4.18.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Client Patch Browser v4.18.2 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
 
5
5
  // src/client/client-patch-browser.ts
@@ -136,8 +136,7 @@ var convertColonRule = (cssText, regExp, partReplacer) => {
136
136
  const r = [];
137
137
  for (let i = 0; i < parts.length; i++) {
138
138
  const p = parts[i].trim();
139
- if (!p)
140
- break;
139
+ if (!p) break;
141
140
  r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));
142
141
  }
143
142
  return r.join(",");