@rindo/core 3.2.3 → 3.2.4

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 (49) hide show
  1. package/cli/index.cjs +11 -16
  2. package/cli/index.js +11 -16
  3. package/cli/package.json +1 -1
  4. package/compiler/package.json +1 -1
  5. package/compiler/rindo.js +2765 -2560
  6. package/compiler/rindo.min.js +2 -2
  7. package/dev-server/client/index.js +1 -1
  8. package/dev-server/client/package.json +1 -1
  9. package/dev-server/connector.html +2 -2
  10. package/dev-server/index.js +1 -1
  11. package/dev-server/package.json +1 -1
  12. package/dev-server/server-process.js +2 -2
  13. package/dev-server/ws.js +1 -1
  14. package/internal/app-data/package.json +1 -1
  15. package/internal/client/css-shim.js +1 -1
  16. package/internal/client/dom.js +1 -1
  17. package/internal/client/index.js +89 -38
  18. package/internal/client/package.json +1 -1
  19. package/internal/client/patch-browser.js +1 -1
  20. package/internal/client/patch-esm.js +1 -1
  21. package/internal/client/shadow-css.js +1 -1
  22. package/internal/hydrate/index.js +34 -28
  23. package/internal/hydrate/package.json +1 -1
  24. package/internal/hydrate/shadow-css.js +1 -2
  25. package/internal/package.json +1 -1
  26. package/internal/rindo-private.d.ts +14 -3
  27. package/internal/rindo-public-compiler.d.ts +11 -0
  28. package/internal/rindo-public-runtime.d.ts +1 -0
  29. package/internal/testing/index.js +19 -13
  30. package/internal/testing/package.json +1 -1
  31. package/internal/testing/shadow-css.js +1 -2
  32. package/mock-doc/index.cjs +2 -2
  33. package/mock-doc/index.js +2 -2
  34. package/mock-doc/package.json +1 -1
  35. package/package.json +7 -7
  36. package/screenshot/package.json +1 -1
  37. package/sys/node/autoprefixer.js +2 -2
  38. package/sys/node/glob.js +1 -1
  39. package/sys/node/graceful-fs.js +1 -1
  40. package/sys/node/index.js +290 -283
  41. package/sys/node/node-fetch.js +1 -4
  42. package/sys/node/package.json +1 -1
  43. package/sys/node/worker.js +1 -1
  44. package/testing/index.js +46 -24
  45. package/testing/jest/jest-setup-test-framework.d.ts +8 -0
  46. package/testing/package.json +1 -1
  47. package/testing/reset-build-conditionals.d.ts +10 -0
  48. package/testing/spec-page.d.ts +5 -0
  49. package/sys/node/713.node-fetch.js +0 -452
@@ -11,8 +11,8 @@ function forceUpdate() {}
11
11
 
12
12
  function hydrateApp(e, t, o, n, s) {
13
13
  function l() {
14
- if (global.clearTimeout(p), i.clear(), r.clear(), !h) {
15
- h = !0;
14
+ if (global.clearTimeout(p), i.clear(), r.clear(), !u) {
15
+ u = !0;
16
16
  try {
17
17
  t.clientHydrateAnnotations && insertVdomAnnotations(e.document, t.staticComponents),
18
18
  e.dispatchEvent(new e.Event("DOMContentLoaded")), e.document.createElement = c,
@@ -27,9 +27,9 @@ function hydrateApp(e, t, o, n, s) {
27
27
  renderCatchError(t, o, e), l();
28
28
  }
29
29
  const r = new Set, i = new Set, d = new Set, c = e.document.createElement, $ = e.document.createElementNS, m = Promise.resolve();
30
- let p, h = !1;
30
+ let p, u = !1;
31
31
  try {
32
- function u() {
32
+ function h() {
33
33
  return g(this);
34
34
  }
35
35
  function f(e) {
@@ -38,7 +38,7 @@ function hydrateApp(e, t, o, n, s) {
38
38
  $tagName$: e.nodeName.toLowerCase(),
39
39
  $flags$: null
40
40
  }, null);
41
- null != t && null != t.cmpMeta && (i.add(e), e.connectedCallback = u, registerHost(e, t.cmpMeta),
41
+ null != t && null != t.cmpMeta && (i.add(e), e.connectedCallback = h, registerHost(e, t.cmpMeta),
42
42
  function o(e, t) {
43
43
  if ("function" != typeof e.componentOnReady && (e.componentOnReady = componentOnReady),
44
44
  "function" != typeof e.forceUpdate && (e.forceUpdate = forceUpdate), 1 & t.$flags$ && (e.shadowRoot = e),
@@ -411,26 +411,32 @@ const createElm = (e, t, o, n) => {
411
411
  let a, r = BUILD.slotRelocation && e["s-cr"] && e["s-cr"].parentNode || e;
412
412
  for (BUILD.shadowDom && r.shadowRoot && r.tagName === hostTagName && (r = r.shadowRoot); s <= l; ++s) n[s] && (a = createElm(null, o, s, e),
413
413
  a && (n[s].$elm$ = a, r.insertBefore(a, BUILD.slotRelocation ? referenceNode(t) : t)));
414
- }, removeVnodes = (e, t, o, n, s) => {
415
- for (;t <= o; ++t) (n = e[t]) && (s = n.$elm$, callNodeRefs(n), BUILD.slotRelocation && (checkSlotFallbackVisibility = !0,
416
- s["s-ol"] ? s["s-ol"].remove() : putBackInOriginalLocation(s, !0)), s.remove());
414
+ }, removeVnodes = (e, t, o) => {
415
+ for (let n = t; n <= o; ++n) {
416
+ const t = e[n];
417
+ if (t) {
418
+ const e = t.$elm$;
419
+ nullifyVNodeRefs(t), e && (BUILD.slotRelocation && (checkSlotFallbackVisibility = !0,
420
+ e["s-ol"] ? e["s-ol"].remove() : putBackInOriginalLocation(e, !0)), e.remove());
421
+ }
422
+ }
417
423
  }, isSameVnode = (e, t) => e.$tag$ === t.$tag$ && (BUILD.slotRelocation && "slot" === e.$tag$ ? e.$name$ === t.$name$ : !BUILD.vdomKey || e.$key$ === t.$key$), referenceNode = e => e && e["s-ol"] || e, parentReferenceNode = e => (e["s-ol"] ? e["s-ol"] : e).parentNode, patch = (e, t) => {
418
424
  const o = t.$elm$ = e.$elm$, n = e.$children$, s = t.$children$, l = t.$tag$, a = t.$text$;
419
425
  let r;
420
426
  BUILD.vdomText && null !== a ? BUILD.vdomText && BUILD.slotRelocation && (r = o["s-cr"]) ? r.parentNode.textContent = a : BUILD.vdomText && e.$text$ !== a && (o.data = a) : (BUILD.svg && (isSvgMode = "svg" === l || "foreignObject" !== l && isSvgMode),
421
427
  (BUILD.vdomAttribute || BUILD.reflect) && (BUILD.slot && "slot" === l || updateElement(e, t, isSvgMode)),
422
428
  BUILD.updatable && null !== n && null !== s ? ((e, t, o, n) => {
423
- let s, l, a = 0, r = 0, i = 0, d = 0, c = t.length - 1, $ = t[0], m = t[c], p = n.length - 1, h = n[0], u = n[p];
424
- for (;a <= c && r <= p; ) if (null == $) $ = t[++a]; else if (null == m) m = t[--c]; else if (null == h) h = n[++r]; else if (null == u) u = n[--p]; else if (isSameVnode($, h)) patch($, h),
425
- $ = t[++a], h = n[++r]; else if (isSameVnode(m, u)) patch(m, u), m = t[--c], u = n[--p]; else if (isSameVnode($, u)) !BUILD.slotRelocation || "slot" !== $.$tag$ && "slot" !== u.$tag$ || putBackInOriginalLocation($.$elm$.parentNode, !1),
426
- patch($, u), e.insertBefore($.$elm$, m.$elm$.nextSibling), $ = t[++a], u = n[--p]; else if (isSameVnode(m, h)) !BUILD.slotRelocation || "slot" !== $.$tag$ && "slot" !== u.$tag$ || putBackInOriginalLocation(m.$elm$.parentNode, !1),
427
- patch(m, h), e.insertBefore(m.$elm$, $.$elm$), m = t[--c], h = n[++r]; else {
428
- if (i = -1, BUILD.vdomKey) for (d = a; d <= c; ++d) if (t[d] && null !== t[d].$key$ && t[d].$key$ === h.$key$) {
429
+ let s, l, a = 0, r = 0, i = 0, d = 0, c = t.length - 1, $ = t[0], m = t[c], p = n.length - 1, u = n[0], h = n[p];
430
+ for (;a <= c && r <= p; ) if (null == $) $ = t[++a]; else if (null == m) m = t[--c]; else if (null == u) u = n[++r]; else if (null == h) h = n[--p]; else if (isSameVnode($, u)) patch($, u),
431
+ $ = t[++a], u = n[++r]; else if (isSameVnode(m, h)) patch(m, h), m = t[--c], h = n[--p]; else if (isSameVnode($, h)) !BUILD.slotRelocation || "slot" !== $.$tag$ && "slot" !== h.$tag$ || putBackInOriginalLocation($.$elm$.parentNode, !1),
432
+ patch($, h), e.insertBefore($.$elm$, m.$elm$.nextSibling), $ = t[++a], h = n[--p]; else if (isSameVnode(m, u)) !BUILD.slotRelocation || "slot" !== $.$tag$ && "slot" !== h.$tag$ || putBackInOriginalLocation(m.$elm$.parentNode, !1),
433
+ patch(m, u), e.insertBefore(m.$elm$, $.$elm$), m = t[--c], u = n[++r]; else {
434
+ if (i = -1, BUILD.vdomKey) for (d = a; d <= c; ++d) if (t[d] && null !== t[d].$key$ && t[d].$key$ === u.$key$) {
429
435
  i = d;
430
436
  break;
431
437
  }
432
- BUILD.vdomKey && i >= 0 ? (l = t[i], l.$tag$ !== h.$tag$ ? s = createElm(t && t[r], o, i, e) : (patch(l, h),
433
- t[i] = void 0, s = l.$elm$), h = n[++r]) : (s = createElm(t && t[r], o, r, e), h = n[++r]),
438
+ BUILD.vdomKey && i >= 0 ? (l = t[i], l.$tag$ !== u.$tag$ ? s = createElm(t && t[r], o, i, e) : (patch(l, u),
439
+ t[i] = void 0, s = l.$elm$), u = n[++r]) : (s = createElm(t && t[r], o, r, e), u = n[++r]),
434
440
  s && (BUILD.slotRelocation ? parentReferenceNode($.$elm$).insertBefore(s, referenceNode($.$elm$)) : $.$elm$.parentNode.insertBefore(s, $.$elm$));
435
441
  }
436
442
  a > c ? addVnodes(e, null == n[p + 1] ? null : n[p + 1].$elm$, o, n, r, p) : BUILD.updatable && r > p && removeVnodes(t, a, c);
@@ -470,8 +476,8 @@ const createElm = (e, t, o, n) => {
470
476
  }));
471
477
  1 === t.nodeType && relocateSlotContent(t);
472
478
  }
473
- }, isNodeLocatedInSlot = (e, t) => 1 === e.nodeType ? null === e.getAttribute("slot") && "" === t || e.getAttribute("slot") === t : e["s-sn"] === t || "" === t, callNodeRefs = e => {
474
- BUILD.vdomRef && (e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(callNodeRefs));
479
+ }, isNodeLocatedInSlot = (e, t) => 1 === e.nodeType ? null === e.getAttribute("slot") && "" === t || e.getAttribute("slot") === t : e["s-sn"] === t || "" === t, nullifyVNodeRefs = e => {
480
+ BUILD.vdomRef && (e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(nullifyVNodeRefs));
475
481
  }, renderVdom = (e, t) => {
476
482
  const o = e.$hostElement$, n = e.$cmpMeta$, s = e.$vnode$ || newVNode(null, null), l = isHost(t) ? t : h(null, null, t);
477
483
  if (hostTagName = o.tagName, BUILD.isDev && Array.isArray(t) && t.some(isHost)) throw new Error(`The <Host> must be the single root component.\nLooks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.\n\nThe render() function should look like this instead:\n\nrender() {\n // Do not return an array\n return (\n <Host>{content}</Host>\n );\n}\n `);
@@ -514,9 +520,9 @@ const createElm = (e, t, o, n) => {
514
520
  return t ? (BUILD.lazyLoad && BUILD.hostListener && (e.$flags$ |= 256, e.$queuedListeners$ && (e.$queuedListeners$.map((([e, t]) => safeCall(s, e, t))),
515
521
  e.$queuedListeners$ = null)), emitLifecycleEvent(o, "componentWillLoad"), BUILD.cmpWillLoad && (l = safeCall(s, "componentWillLoad"))) : (emitLifecycleEvent(o, "componentWillUpdate"),
516
522
  BUILD.cmpWillUpdate && (l = safeCall(s, "componentWillUpdate"))), emitLifecycleEvent(o, "componentWillRender"),
517
- BUILD.cmpWillRender && (l = then(l, (() => safeCall(s, "componentWillRender")))),
518
- n(), then(l, (() => updateComponent(e, s, t)));
519
- }, updateComponent = async (e, t, o) => {
523
+ BUILD.cmpWillRender && (l = enqueue(l, (() => safeCall(s, "componentWillRender")))),
524
+ n(), enqueue(l, (() => updateComponent(e, s, t)));
525
+ }, enqueue = (e, t) => e instanceof Promise ? e.then(t) : t(), updateComponent = async (e, t, o) => {
520
526
  const n = e.$hostElement$, s = createTime("update", e.$cmpMeta$.$tagName$), l = n["s-rc"];
521
527
  BUILD.style && o && attachStyles(e);
522
528
  const a = createTime("render", e.$cmpMeta$.$tagName$);
@@ -580,7 +586,7 @@ const callRender = (e, t, o) => {
580
586
  } catch (e) {
581
587
  consoleError(e);
582
588
  }
583
- }, then = (e, t) => e && e.then ? e.then(t) : t(), emitLifecycleEvent = (e, t) => {
589
+ }, emitLifecycleEvent = (e, t) => {
584
590
  BUILD.lifecycleDOMEvents && emitEvent(e, "rindo_" + t, {
585
591
  bubbles: !0,
586
592
  composed: !0,
@@ -656,9 +662,9 @@ const callRender = (e, t, o) => {
656
662
  }
657
663
  return e;
658
664
  }, initializeComponent = async (e, t, o, n, s) => {
659
- if ((BUILD.lazyLoad || BUILD.hydrateServerSide || BUILD.style) && 0 == (32 & t.$flags$)) {
660
- if (BUILD.lazyLoad || BUILD.hydrateClientSide) {
661
- if (t.$flags$ |= 32, (s = loadModule(o)).then) {
665
+ if (0 == (32 & t.$flags$)) {
666
+ if (t.$flags$ |= 32, BUILD.lazyLoad || BUILD.hydrateClientSide) {
667
+ if ((s = loadModule(o)).then) {
662
668
  const e = (l = `st:load:${o.$tagName$}:${t.$modeName$}`, a = `[Rindo] Load module for <${o.$tagName$}>`,
663
669
  BUILD.profile && performance.mark ? (0 === performance.getEntriesByName(l, "mark").length && performance.mark(l),
664
670
  () => {
@@ -678,7 +684,7 @@ const callRender = (e, t, o) => {
678
684
  }
679
685
  BUILD.member && (t.$flags$ &= -9), BUILD.watchCallback && (t.$flags$ |= 128), e(),
680
686
  fireConnectedCallback(t.$lazyInstance$);
681
- } else s = e.constructor, t.$flags$ |= 32, customElements.whenDefined(o.$tagName$).then((() => t.$flags$ |= 128));
687
+ } else s = e.constructor, customElements.whenDefined(o.$tagName$).then((() => t.$flags$ |= 128));
682
688
  if (BUILD.style && s.style) {
683
689
  let n = s.style;
684
690
  BUILD.mode && "string" != typeof n && (n = n[t.$modeName$ = computeMode(e)], BUILD.hydrateServerSide && t.$modeName$ && e.setAttribute("s-mode", t.$modeName$));
@@ -911,10 +917,10 @@ const callRender = (e, t, o) => {
911
917
  }
912
918
  })();
913
919
  const n = createTime("bootstrapLazy"), s = [], l = t.exclude || [], a = win.customElements, r = doc.head, i = r.querySelector("meta[charset]"), d = doc.createElement("style"), c = [], $ = doc.querySelectorAll("[sty-id]");
914
- let m, p = !0, h = 0;
920
+ let m, p = !0, u = 0;
915
921
  if (Object.assign(plt, t), plt.$resourcesUrl$ = new URL(t.resourcesUrl || "./", doc.baseURI).href,
916
922
  BUILD.asyncQueue && t.syncQueue && (plt.$flags$ |= 4), BUILD.hydrateClientSide && (plt.$flags$ |= 2),
917
- BUILD.hydrateClientSide && BUILD.shadowDom) for (;h < $.length; h++) registerStyle($[h].getAttribute("sty-id"), $[h].innerHTML.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{"));
923
+ BUILD.hydrateClientSide && BUILD.shadowDom) for (;u < $.length; u++) registerStyle($[u].getAttribute("sty-id"), $[u].innerHTML.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{"));
918
924
  if (e.map((e => {
919
925
  e[1].map((o => {
920
926
  const n = {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/internal/hydrate",
3
- "version": "3.2.3",
3
+ "version": "3.2.4",
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
@@ -4,8 +4,7 @@ const _parenSuffix = ")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)", _cssColo
4
4
  return o.escapedString.replace(_ruleRe, ((...e) => {
5
5
  const c = e[2];
6
6
  let r = "", n = e[4], l = "";
7
- n && n.startsWith("{%BLOCK%") && (r = o.blocks[s++], n = n.substring("%BLOCK%".length + 1),
8
- l = "{");
7
+ n && n.startsWith("{%BLOCK%") && (r = o.blocks[s++], n = n.substring(8), l = "{");
9
8
  const a = t({
10
9
  selector: c,
11
10
  content: r
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/internal",
3
- "version": "3.2.3",
3
+ "version": "3.2.4",
4
4
  "description": "Rindo internals only to be imported by the Rindo Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -2044,7 +2044,7 @@ export interface SpecPage {
2044
2044
  */
2045
2045
  rootInstance?: any;
2046
2046
  /**
2047
- * Convenience function to set `document.body.innerHTML` and `waitForChanges()`. Function argument should be an html string.
2047
+ * Convenience function to set `document.body.innerHTML` and `waitForChanges()`. Function argument should be a HTML string.
2048
2048
  */
2049
2049
  setContent: (html: string) => Promise<any>;
2050
2050
  /**
@@ -2060,6 +2060,9 @@ export interface SpecPage {
2060
2060
  flushQueue: () => Promise<any>;
2061
2061
  styles: Map<string, string>;
2062
2062
  }
2063
+ /**
2064
+ * Options pertaining to the creation and functionality of a {@link SpecPage}
2065
+ */
2063
2066
  export interface NewSpecPageOptions {
2064
2067
  /**
2065
2068
  * An array of components to test. Component classes can be imported into the spec file, then their reference should be added to the `component` array in order to be used throughout the test.
@@ -2073,6 +2076,9 @@ export interface NewSpecPageOptions {
2073
2076
  * Sets the mocked `dir` attribute on `<html>`.
2074
2077
  */
2075
2078
  direction?: string;
2079
+ /**
2080
+ * If `false`, do not flush the render queue on initial test setup.
2081
+ */
2076
2082
  flushQueue?: boolean;
2077
2083
  /**
2078
2084
  * The initial HTML used to generate the test. This can be useful to construct a collection of components working together, and assign HTML attributes. This value sets the mocked `document.body.innerHTML`.
@@ -2105,7 +2111,7 @@ export interface NewSpecPageOptions {
2105
2111
  */
2106
2112
  supportsShadowDom?: boolean;
2107
2113
  /**
2108
- * When a component is prerendered it includes HTML annotations, such as `s-id` attributes and `<!-t.0->` comments. This information is used by clientside hydrating. Default is `false`.
2114
+ * When a component is pre-rendered it includes HTML annotations, such as `s-id` attributes and `<!-t.0->` comments. This information is used by clientside hydrating. Default is `false`.
2109
2115
  */
2110
2116
  includeAnnotations?: boolean;
2111
2117
  /**
@@ -2125,9 +2131,14 @@ export interface NewSpecPageOptions {
2125
2131
  * Setting this option to `true` will include the component's styles in the serializable output.
2126
2132
  */
2127
2133
  attachStyles?: boolean;
2134
+ /**
2135
+ * Set {@link BuildConditionals} for testing based off the metadata of the component under test.
2136
+ * When `true` all `BuildConditionals` will be assigned to the global testing `BUILD` object, regardless of their
2137
+ * value. When `false`, only `BuildConditionals` with a value of `true` will be assigned to the `BUILD` object.
2138
+ */
2128
2139
  strictBuild?: boolean;
2129
2140
  /**
2130
- * Default values to be set on the platform runtime object (@see PlatformRuntime) when creating
2141
+ * Default values to be set on the platform runtime object {@see PlatformRuntime} when creating
2131
2142
  * the spec page.
2132
2143
  */
2133
2144
  platform?: Partial<PlatformRuntime>;
@@ -2054,6 +2054,17 @@ export interface OutputTargetWww extends OutputTargetBase {
2054
2054
  appDir?: string;
2055
2055
  }
2056
2056
  export type OutputTarget = OutputTargetCopy | OutputTargetCustom | OutputTargetDist | OutputTargetDistCollection | OutputTargetDistCustomElements | OutputTargetDistLazy | OutputTargetDistGlobalStyles | OutputTargetDistLazyLoader | OutputTargetDocsJson | OutputTargetDocsCustom | OutputTargetDocsReadme | OutputTargetDocsVscode | OutputTargetWww | OutputTargetHydrate | OutputTargetStats | OutputTargetDistTypes;
2057
+ /**
2058
+ * Our custom configuration interface for generated caching Service Workers
2059
+ * using the Workbox library (see https://developer.chrome.com/docs/workbox/).
2060
+ *
2061
+ * Although we are using Workbox we are unfortunately unable to depend on the
2062
+ * published types for the library because they must be compiled using the
2063
+ * `webworker` lib for TypeScript, which cannot be used at the same time as
2064
+ * the `dom` lib. So as a workaround we maintain our own interface here. See
2065
+ * here to refer to the published version:
2066
+ * https://github.com/DefinitelyTyped/DefinitelyTyped/blob/c7b4dadae5b320ad1311a8f82242b8f2f41b7b8c/types/workbox-build/generate-sw.d.ts#L3
2067
+ */
2057
2068
  export interface ServiceWorkerConfig {
2058
2069
  unregister?: boolean;
2059
2070
  swDest?: string;
@@ -812,6 +812,7 @@ export declare namespace JSXBase {
812
812
  datetime?: string;
813
813
  }
814
814
  interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
815
+ onCancel?: (event: Event) => void;
815
816
  onClose?: (event: Event) => void;
816
817
  open?: boolean;
817
818
  returnValue?: string;
@@ -314,9 +314,15 @@ const createElm = (e, t, a, o) => {
314
314
  let l, r = appData.BUILD.slotRelocation && e["s-cr"] && e["s-cr"].parentNode || e;
315
315
  for (appData.BUILD.shadowDom && r.shadowRoot && r.tagName === hostTagName && (r = r.shadowRoot); s <= n; ++s) o[s] && (l = createElm(null, a, s, e),
316
316
  l && (o[s].$elm$ = l, r.insertBefore(l, appData.BUILD.slotRelocation ? referenceNode(t) : t)));
317
- }, removeVnodes = (e, t, a, o, s) => {
318
- for (;t <= a; ++t) (o = e[t]) && (s = o.$elm$, callNodeRefs(o), appData.BUILD.slotRelocation && (checkSlotFallbackVisibility = !0,
319
- s["s-ol"] ? s["s-ol"].remove() : putBackInOriginalLocation(s, !0)), s.remove());
317
+ }, removeVnodes = (e, t, a) => {
318
+ for (let o = t; o <= a; ++o) {
319
+ const t = e[o];
320
+ if (t) {
321
+ const e = t.$elm$;
322
+ nullifyVNodeRefs(t), e && (appData.BUILD.slotRelocation && (checkSlotFallbackVisibility = !0,
323
+ e["s-ol"] ? e["s-ol"].remove() : putBackInOriginalLocation(e, !0)), e.remove());
324
+ }
325
+ }
320
326
  }, isSameVnode = (e, t) => e.$tag$ === t.$tag$ && (appData.BUILD.slotRelocation && "slot" === e.$tag$ ? e.$name$ === t.$name$ : !appData.BUILD.vdomKey || e.$key$ === t.$key$), referenceNode = e => e && e["s-ol"] || e, parentReferenceNode = e => (e["s-ol"] ? e["s-ol"] : e).parentNode, patch = (e, t) => {
321
327
  const a = t.$elm$ = e.$elm$, o = e.$children$, s = t.$children$, n = t.$tag$, l = t.$text$;
322
328
  let r;
@@ -373,8 +379,8 @@ const createElm = (e, t, a, o) => {
373
379
  }));
374
380
  1 === t.nodeType && relocateSlotContent(t);
375
381
  }
376
- }, isNodeLocatedInSlot = (e, t) => 1 === e.nodeType ? null === e.getAttribute("slot") && "" === t || e.getAttribute("slot") === t : e["s-sn"] === t || "" === t, callNodeRefs = e => {
377
- appData.BUILD.vdomRef && (e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(callNodeRefs));
382
+ }, isNodeLocatedInSlot = (e, t) => 1 === e.nodeType ? null === e.getAttribute("slot") && "" === t || e.getAttribute("slot") === t : e["s-sn"] === t || "" === t, nullifyVNodeRefs = e => {
383
+ appData.BUILD.vdomRef && (e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(nullifyVNodeRefs));
378
384
  }, renderVdom = (e, t) => {
379
385
  const a = e.$hostElement$, o = e.$cmpMeta$, s = e.$vnode$ || newVNode(null, null), n = isHost(t) ? t : h(null, null, t);
380
386
  if (hostTagName = a.tagName, appData.BUILD.isDev && Array.isArray(t) && t.some(isHost)) throw new Error(`The <Host> must be the single root component.\nLooks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.\n\nThe render() function should look like this instead:\n\nrender() {\n // Do not return an array\n return (\n <Host>{content}</Host>\n );\n}\n `);
@@ -419,9 +425,9 @@ const createElm = (e, t, a, o) => {
419
425
  e.$queuedListeners$ && (e.$queuedListeners$.map((([e, t]) => safeCall(s, e, t))),
420
426
  e.$queuedListeners$ = null)), emitLifecycleEvent(a, "componentWillLoad"), appData.BUILD.cmpWillLoad && (n = safeCall(s, "componentWillLoad"))) : (emitLifecycleEvent(a, "componentWillUpdate"),
421
427
  appData.BUILD.cmpWillUpdate && (n = safeCall(s, "componentWillUpdate"))), emitLifecycleEvent(a, "componentWillRender"),
422
- appData.BUILD.cmpWillRender && (n = then(n, (() => safeCall(s, "componentWillRender")))),
423
- o(), then(n, (() => updateComponent(e, s, t)));
424
- }, updateComponent = async (e, t, a) => {
428
+ appData.BUILD.cmpWillRender && (n = enqueue(n, (() => safeCall(s, "componentWillRender")))),
429
+ o(), enqueue(n, (() => updateComponent(e, s, t)));
430
+ }, enqueue = (e, t) => e instanceof Promise ? e.then(t) : t(), updateComponent = async (e, t, a) => {
425
431
  const o = e.$hostElement$, s = createTime("update", e.$cmpMeta$.$tagName$), n = o["s-rc"];
426
432
  appData.BUILD.style && a && attachStyles(e);
427
433
  const l = createTime("render", e.$cmpMeta$.$tagName$);
@@ -485,7 +491,7 @@ const callRender = (e, t, a) => {
485
491
  } catch (e) {
486
492
  consoleError(e);
487
493
  }
488
- }, then = (e, t) => e && e.then ? e.then(t) : t(), emitLifecycleEvent = (e, t) => {
494
+ }, emitLifecycleEvent = (e, t) => {
489
495
  appData.BUILD.lifecycleDOMEvents && emitEvent(e, "rindo_" + t, {
490
496
  bubbles: !0,
491
497
  composed: !0,
@@ -562,9 +568,9 @@ const callRender = (e, t, a) => {
562
568
  }
563
569
  return e;
564
570
  }, initializeComponent = async (e, t, a, o, s) => {
565
- if ((appData.BUILD.lazyLoad || appData.BUILD.hydrateServerSide || appData.BUILD.style) && 0 == (32 & t.$flags$)) {
566
- if (appData.BUILD.lazyLoad || appData.BUILD.hydrateClientSide) {
567
- if (t.$flags$ |= 32, (s = loadModule(a)).then) {
571
+ if (0 == (32 & t.$flags$)) {
572
+ if (t.$flags$ |= 32, appData.BUILD.lazyLoad || appData.BUILD.hydrateClientSide) {
573
+ if ((s = loadModule(a)).then) {
568
574
  const e = (n = `st:load:${a.$tagName$}:${t.$modeName$}`, l = `[Rindo] Load module for <${a.$tagName$}>`,
569
575
  appData.BUILD.profile && performance.mark ? (0 === performance.getEntriesByName(n, "mark").length && performance.mark(n),
570
576
  () => {
@@ -584,7 +590,7 @@ const callRender = (e, t, a) => {
584
590
  }
585
591
  appData.BUILD.member && (t.$flags$ &= -9), appData.BUILD.watchCallback && (t.$flags$ |= 128),
586
592
  e(), fireConnectedCallback(t.$lazyInstance$);
587
- } else s = e.constructor, t.$flags$ |= 32, customElements.whenDefined(a.$tagName$).then((() => t.$flags$ |= 128));
593
+ } else s = e.constructor, customElements.whenDefined(a.$tagName$).then((() => t.$flags$ |= 128));
588
594
  if (appData.BUILD.style && s.style) {
589
595
  let o = s.style;
590
596
  appData.BUILD.mode && "string" != typeof o && (o = o[t.$modeName$ = computeMode(e)],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/internal/testing",
3
- "version": "3.2.3",
3
+ "version": "3.2.4",
4
4
  "description": "Rindo internal testing 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
@@ -4,8 +4,7 @@ const _parenSuffix = ")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)", _cssColo
4
4
  return o.escapedString.replace(_ruleRe, ((...e) => {
5
5
  const c = e[2];
6
6
  let r = "", n = e[4], l = "";
7
- n && n.startsWith("{%BLOCK%") && (r = o.blocks[s++], n = n.substring("%BLOCK%".length + 1),
8
- l = "{");
7
+ n && n.startsWith("{%BLOCK%") && (r = o.blocks[s++], n = n.substring(8), l = "{");
9
8
  const a = t({
10
9
  selector: c,
11
10
  content: r