@rindo/core 2.18.0 → 2.22.3

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 (96) hide show
  1. package/cli/config-flags.d.ts +33 -21
  2. package/cli/index.cjs +670 -388
  3. package/cli/index.d.ts +3 -0
  4. package/cli/index.js +670 -388
  5. package/cli/package.json +1 -1
  6. package/compiler/lib.dom.d.ts +434 -251
  7. package/compiler/lib.dom.iterable.d.ts +7 -13
  8. package/compiler/lib.es2015.collection.d.ts +62 -1
  9. package/compiler/lib.es2015.promise.d.ts +9 -4
  10. package/compiler/lib.es2015.proxy.d.ts +91 -2
  11. package/compiler/lib.es2015.reflect.d.ts +25 -2
  12. package/compiler/lib.es2015.symbol.wellknown.d.ts +3 -3
  13. package/compiler/lib.es2017.intl.d.ts +16 -1
  14. package/compiler/lib.es2019.d.ts +1 -0
  15. package/compiler/lib.es2019.intl.d.ts +25 -0
  16. package/compiler/lib.es2020.intl.d.ts +31 -6
  17. package/compiler/lib.es2021.intl.d.ts +11 -3
  18. package/compiler/lib.es2022.d.ts +1 -0
  19. package/compiler/lib.es2022.error.d.ts +2 -2
  20. package/compiler/lib.es2022.sharedmemory.d.ts +27 -0
  21. package/compiler/lib.es5.d.ts +39 -14
  22. package/compiler/lib.esnext.intl.d.ts +5 -1
  23. package/compiler/lib.webworker.d.ts +318 -55
  24. package/compiler/lib.webworker.iterable.d.ts +11 -3
  25. package/compiler/package.json +1 -1
  26. package/compiler/rindo.d.ts +3 -25
  27. package/compiler/rindo.js +53912 -51834
  28. package/compiler/rindo.min.js +2 -2
  29. package/compiler/sys/in-memory-fs.d.ts +3 -3
  30. package/compiler/transpile.d.ts +32 -0
  31. package/dependencies.json +3 -1
  32. package/dev-server/client/app-error.d.ts +1 -1
  33. package/dev-server/client/index.d.ts +2 -2
  34. package/dev-server/client/index.js +241 -241
  35. package/dev-server/client/package.json +1 -1
  36. package/dev-server/connector.html +3 -3
  37. package/dev-server/index.d.ts +1 -1
  38. package/dev-server/index.js +2 -2
  39. package/dev-server/open-in-editor-api.js +1 -1
  40. package/dev-server/package.json +1 -1
  41. package/dev-server/server-process.js +1182 -1148
  42. package/dev-server/ws.js +1 -1
  43. package/internal/app-data/package.json +1 -1
  44. package/internal/client/css-shim.js +2 -2
  45. package/internal/client/dom.js +1 -1
  46. package/internal/client/index.js +800 -673
  47. package/internal/client/package.json +1 -1
  48. package/internal/client/patch-browser.js +19 -1
  49. package/internal/client/patch-esm.js +1 -1
  50. package/internal/client/polyfills/css-shim.js +1 -1
  51. package/internal/client/shadow-css.js +1 -1
  52. package/internal/hydrate/index.js +154 -143
  53. package/internal/hydrate/package.json +1 -1
  54. package/internal/hydrate/runner.d.ts +1 -1
  55. package/internal/hydrate/runner.js +106 -106
  56. package/internal/package.json +1 -1
  57. package/internal/rindo-core/index.d.ts +9 -10
  58. package/internal/rindo-private.d.ts +149 -80
  59. package/internal/rindo-public-compiler.d.ts +68 -32
  60. package/internal/rindo-public-docs.d.ts +24 -0
  61. package/internal/rindo-public-runtime.d.ts +79 -7
  62. package/internal/testing/index.js +187 -175
  63. package/internal/testing/package.json +1 -1
  64. package/mock-doc/index.cjs +905 -896
  65. package/mock-doc/index.d.ts +2 -2
  66. package/mock-doc/index.js +905 -896
  67. package/mock-doc/package.json +1 -1
  68. package/package.json +48 -57
  69. package/readme.md +44 -31
  70. package/screenshot/compare/build/p-f4745c2f.entry.js +1 -1
  71. package/screenshot/index.d.ts +1 -1
  72. package/screenshot/index.js +3 -3
  73. package/screenshot/package.json +1 -1
  74. package/screenshot/pixel-match.js +983 -849
  75. package/sys/node/autoprefixer.js +2 -2
  76. package/sys/node/glob.js +1 -1
  77. package/sys/node/index.d.ts +4 -0
  78. package/sys/node/index.js +407 -418
  79. package/sys/node/package.json +1 -1
  80. package/sys/node/prompts.js +1 -1
  81. package/sys/node/worker.js +1 -1
  82. package/testing/index.d.ts +6 -6
  83. package/testing/index.js +1136 -1277
  84. package/testing/jest/jest-config.d.ts +1 -1
  85. package/testing/jest/jest-preprocessor.d.ts +3 -3
  86. package/testing/jest/jest-serializer.d.ts +1 -2
  87. package/testing/matchers/index.d.ts +3 -3
  88. package/testing/mock-fetch.d.ts +1 -1
  89. package/testing/mocks.d.ts +2 -2
  90. package/testing/package.json +1 -1
  91. package/testing/puppeteer/puppeteer-declarations.d.ts +5 -5
  92. package/testing/puppeteer/puppeteer-element.d.ts +2 -2
  93. package/testing/puppeteer/puppeteer-events.d.ts +1 -1
  94. package/testing/testing-logger.d.ts +1 -1
  95. package/testing/testing-utils.d.ts +1 -1
  96. package/testing/testing.d.ts +1 -1
@@ -1,3 +1,8 @@
1
+ function queryNonceMetaTagContent(e) {
2
+ var t, a, o;
3
+ return null !== (o = null === (a = null === (t = e.head) || void 0 === t ? void 0 : t.querySelector('meta[name="csp-nonce"]')) || void 0 === a ? void 0 : a.getAttribute("content")) && void 0 !== o ? o : void 0;
4
+ }
5
+
1
6
  function writeTask(e) {
2
7
  queuedWriteTasks.push(e);
3
8
  }
@@ -88,61 +93,10 @@ function stopAutoApplyChanges() {
88
93
  isAutoApplyingChanges = !1, autoApplyTimer && (clearTimeout(autoApplyTimer), autoApplyTimer = void 0);
89
94
  }
90
95
 
91
- const appData = require("@rindo/core/internal/app-data"), mockDoc = require("@rindo/core/mock-doc"), styles = new Map, modeResolutionChain = [], cstrs = new Map, queuedTicks = [], queuedWriteTasks = [], queuedReadTasks = [], moduleLoaded = new Map, queuedLoadModules = [], caughtErrors = [], hostRefs = new Map;
92
-
93
- let customError;
94
-
95
- const defaultConsoleError = e => {
96
- caughtErrors.push(e);
97
- }, consoleError = (e, t) => (customError || defaultConsoleError)(e, t), consoleDevError = (...e) => {
98
- caughtErrors.push(new Error(e.join(", ")));
99
- }, consoleDevWarn = (...e) => {
100
- const t = e.filter((e => "string" == typeof e || "number" == typeof e || "boolean" == typeof e));
101
- console.warn(...t);
102
- }, nextTick = e => {
103
- queuedTicks.push(e);
104
- }, win = mockDoc.setupGlobal(global), doc = win.document;
105
-
106
- exports.supportsShadow = !0;
107
-
108
- const plt = {
109
- $flags$: 0,
110
- $resourcesUrl$: "",
111
- jmp: e => e(),
112
- raf: e => requestAnimationFrame(e),
113
- ael: (e, t, a, o) => e.addEventListener(t, a, o),
114
- rel: (e, t, a, o) => e.removeEventListener(t, a, o),
115
- ce: (e, t) => new win.CustomEvent(e, t)
116
- }, Context = {};
117
-
118
- let autoApplyTimer, isAutoApplyingChanges = !1;
119
-
120
- const isMemberInElement = (e, t) => {
121
- if (null != e) {
122
- if (t in e) return !0;
123
- const a = e.nodeName;
124
- if (a) {
125
- const e = cstrs.get(a.toLowerCase());
126
- if (null != e && null != e.COMPILER_META && null != e.COMPILER_META.properties) return e.COMPILER_META.properties.some((e => e.name === t));
127
- }
128
- }
129
- return !1;
130
- }, addHostEventListeners = (e, t, a, o) => {
131
- appData.BUILD.hostListener && a && (appData.BUILD.hostListenerTargetParent && (a = o ? a.filter((([e]) => 32 & e)) : a.filter((([e]) => !(32 & e)))),
132
- a.map((([a, o, s]) => {
133
- const n = appData.BUILD.hostListenerTarget ? getHostListenerTarget(e, a) : e, l = hostListenerProxy(t, s), r = hostListenerOpts(a);
134
- plt.ael(n, o, l, r), (t.$rmListeners$ = t.$rmListeners$ || []).push((() => plt.rel(n, o, l, r)));
135
- })));
136
- }, hostListenerProxy = (e, t) => a => {
137
- try {
138
- appData.BUILD.lazyLoad ? 256 & e.$flags$ ? e.$lazyInstance$[t](a) : (e.$queuedListeners$ = e.$queuedListeners$ || []).push([ t, a ]) : e.$hostElement$[t](a);
139
- } catch (e) {
140
- consoleError(e);
141
- }
142
- }, getHostListenerTarget = (e, t) => appData.BUILD.hostListenerTargetDocument && 4 & t ? doc : appData.BUILD.hostListenerTargetWindow && 8 & t ? win : appData.BUILD.hostListenerTargetBody && 16 & t ? doc.body : appData.BUILD.hostListenerTargetParent && 32 & t ? e.parentElement : e, hostListenerOpts = e => ({
143
- passive: 0 != (1 & e),
144
- capture: 0 != (2 & e)
145
- }), XLINK_NS = "http://www.w3.org/1999/xlink";
96
+ const mockDoc = require("@rindo/core/mock-doc"), appData = require("@rindo/core/internal/app-data"), styles = new Map, modeResolutionChain = [], cstrs = new Map, queuedTicks = [], queuedWriteTasks = [], queuedReadTasks = [], moduleLoaded = new Map, queuedLoadModules = [], caughtErrors = [], hostRefs = new Map, getAssetPath = e => {
97
+ const t = new URL(e, plt.$resourcesUrl$);
98
+ return t.origin !== win.location.origin ? t.href : t.pathname;
99
+ };
146
100
 
147
101
  let i = 0;
148
102
 
@@ -152,36 +106,7 @@ const createTime = (e, t = "") => {
152
106
  return performance.mark(a), () => performance.measure(`[Rindo] ${e}() <${t}>`, a);
153
107
  }
154
108
  return () => {};
155
- }, rootAppliedStyles = new WeakMap, registerStyle = (e, t, a) => {
156
- let o = styles.get(e);
157
- o = t, styles.set(e, o);
158
- }, addStyle = (e, t, a, o) => {
159
- let s = getScopeId(t, a);
160
- const n = styles.get(s);
161
- if (!appData.BUILD.attachStyles) return s;
162
- if (e = 11 === e.nodeType ? e : doc, n) if ("string" == typeof n) {
163
- e = e.head || e;
164
- let a, l = rootAppliedStyles.get(e);
165
- if (l || rootAppliedStyles.set(e, l = new Set), !l.has(s)) {
166
- if (appData.BUILD.hydrateClientSide && e.host && (a = e.querySelector(`[sty-id="${s}"]`))) a.innerHTML = n; else {
167
- if (appData.BUILD.cssVarShim && plt.$cssShim$) {
168
- a = plt.$cssShim$.createHostStyle(o, s, n, !!(10 & t.$flags$));
169
- const e = a["s-sc"];
170
- e && (s = e, l = null);
171
- } else a = doc.createElement("style"), a.innerHTML = n;
172
- (appData.BUILD.hydrateServerSide || appData.BUILD.hotModuleReplacement) && a.setAttribute("sty-id", s),
173
- e.insertBefore(a, e.querySelector("link"));
174
- }
175
- l && l.add(s);
176
- }
177
- } else appData.BUILD.constructableCSS && !e.adoptedStyleSheets.includes(n) && (e.adoptedStyleSheets = [ ...e.adoptedStyleSheets, n ]);
178
- return s;
179
- }, attachStyles = e => {
180
- const t = e.$cmpMeta$, a = e.$hostElement$, o = t.$flags$, s = createTime("attachStyles", t.$tagName$), n = addStyle(appData.BUILD.shadowDom && exports.supportsShadow && a.shadowRoot ? a.shadowRoot : a.getRootNode(), t, e.$modeName$, a);
181
- (appData.BUILD.shadowDom || appData.BUILD.scoped) && appData.BUILD.cssAnnotations && 10 & o && (a["s-sc"] = n,
182
- a.classList.add(n + "-h"), appData.BUILD.scoped && 2 & o && a.classList.add(n + "-s")),
183
- s();
184
- }, getScopeId = (e, t) => "sc-" + (appData.BUILD.mode && t && 32 & e.$flags$ ? e.$tagName$ + "-" + t : e.$tagName$), computeMode = e => modeResolutionChain.map((t => t(e))).find((e => !!e)), EMPTY_OBJ = {}, isComplexType = e => "object" == (e = typeof e) || "function" === e, h = (e, t, ...a) => {
109
+ }, XLINK_NS = "http://www.w3.org/1999/xlink", EMPTY_OBJ = {}, isComplexType = e => "object" == (e = typeof e) || "function" === e, h = (e, t, ...a) => {
185
110
  let o = null, s = null, n = null, l = !1, r = !1;
186
111
  const p = [], i = t => {
187
112
  for (let a = 0; a < t.length; a++) o = t[a], Array.isArray(o) ? i(o) : null != o && "boolean" != typeof o && ((l = "function" != typeof e && !isComplexType(o)) ? o = String(o) : appData.BUILD.isDev && "function" != typeof e && void 0 === o.$flags$ && consoleDevError("vNode passed as children has unexpected type.\nMake sure it's using the correct h() function.\nEmpty objects can also be the cause, look for JSX comments that became objects."),
@@ -233,7 +158,94 @@ const createTime = (e, t = "") => {
233
158
  if (-1 === a) return;
234
159
  const o = t.indexOf("type"), s = t.indexOf("min"), n = t.indexOf("max"), l = t.indexOf("step");
235
160
  (a < o || a < s || a < n || a < l) && consoleDevWarn('The "value" prop of <input> should be set after "min", "max", "type" and "step"');
236
- }, setAccessor = (e, t, a, o, s, n) => {
161
+ }, clientHydrate = (e, t, a, o, s, n, l) => {
162
+ let r, p, i, d;
163
+ if (1 === n.nodeType) {
164
+ for (r = n.getAttribute("c-id"), r && (p = r.split("."), p[0] !== l && "0" !== p[0] || (i = {
165
+ $flags$: 0,
166
+ $hostId$: p[0],
167
+ $nodeId$: p[1],
168
+ $depth$: p[2],
169
+ $index$: p[3],
170
+ $tag$: n.tagName.toLowerCase(),
171
+ $elm$: n,
172
+ $attrs$: null,
173
+ $children$: null,
174
+ $key$: null,
175
+ $name$: null,
176
+ $text$: null
177
+ }, t.push(i), n.removeAttribute("c-id"), e.$children$ || (e.$children$ = []), e.$children$[i.$index$] = i,
178
+ e = i, o && "0" === i.$depth$ && (o[i.$index$] = i.$elm$))), d = n.childNodes.length - 1; d >= 0; d--) clientHydrate(e, t, a, o, s, n.childNodes[d], l);
179
+ if (n.shadowRoot) for (d = n.shadowRoot.childNodes.length - 1; d >= 0; d--) clientHydrate(e, t, a, o, s, n.shadowRoot.childNodes[d], l);
180
+ } else if (8 === n.nodeType) p = n.nodeValue.split("."), p[1] !== l && "0" !== p[1] || (r = p[0],
181
+ i = {
182
+ $flags$: 0,
183
+ $hostId$: p[1],
184
+ $nodeId$: p[2],
185
+ $depth$: p[3],
186
+ $index$: p[4],
187
+ $elm$: n,
188
+ $attrs$: null,
189
+ $children$: null,
190
+ $key$: null,
191
+ $name$: null,
192
+ $tag$: null,
193
+ $text$: null
194
+ }, "t" === r ? (i.$elm$ = n.nextSibling, i.$elm$ && 3 === i.$elm$.nodeType && (i.$text$ = i.$elm$.textContent,
195
+ t.push(i), n.remove(), e.$children$ || (e.$children$ = []), e.$children$[i.$index$] = i,
196
+ o && "0" === i.$depth$ && (o[i.$index$] = i.$elm$))) : i.$hostId$ === l && ("s" === r ? (i.$tag$ = "slot",
197
+ p[5] ? n["s-sn"] = i.$name$ = p[5] : n["s-sn"] = "", n["s-sr"] = !0, appData.BUILD.shadowDom && o && (i.$elm$ = doc.createElement(i.$tag$),
198
+ i.$name$ && i.$elm$.setAttribute("name", i.$name$), n.parentNode.insertBefore(i.$elm$, n),
199
+ n.remove(), "0" === i.$depth$ && (o[i.$index$] = i.$elm$)), a.push(i), e.$children$ || (e.$children$ = []),
200
+ e.$children$[i.$index$] = i) : "r" === r && (appData.BUILD.shadowDom && o ? n.remove() : appData.BUILD.slotRelocation && (s["s-cr"] = n,
201
+ n["s-cn"] = !0)))); else if (e && "style" === e.$tag$) {
202
+ const t = newVNode(null, n.textContent);
203
+ t.$elm$ = n, t.$index$ = "0", e.$children$ = [ t ];
204
+ }
205
+ }, initializeDocumentHydrate = (e, t) => {
206
+ if (1 === e.nodeType) {
207
+ let a = 0;
208
+ for (;a < e.childNodes.length; a++) initializeDocumentHydrate(e.childNodes[a], t);
209
+ if (e.shadowRoot) for (a = 0; a < e.shadowRoot.childNodes.length; a++) initializeDocumentHydrate(e.shadowRoot.childNodes[a], t);
210
+ } else if (8 === e.nodeType) {
211
+ const a = e.nodeValue.split(".");
212
+ "o" === a[0] && (t.set(a[1] + "." + a[2], e), e.nodeValue = "", e["s-en"] = a[3]);
213
+ }
214
+ }, computeMode = e => modeResolutionChain.map((t => t(e))).find((e => !!e)), parsePropertyValue = (e, t) => null == e || isComplexType(e) ? e : appData.BUILD.propBoolean && 4 & t ? "false" !== e && ("" === e || !!e) : appData.BUILD.propNumber && 2 & t ? parseFloat(e) : appData.BUILD.propString && 1 & t ? String(e) : e, getElement = e => appData.BUILD.lazyLoad ? getHostRef(e).$hostElement$ : e, emitEvent = (e, t, a) => {
215
+ const o = plt.ce(t, a);
216
+ return e.dispatchEvent(o), o;
217
+ }, rootAppliedStyles = new WeakMap, registerStyle = (e, t, a) => {
218
+ let o = styles.get(e);
219
+ o = t, styles.set(e, o);
220
+ }, addStyle = (e, t, a, o) => {
221
+ var s;
222
+ let n = getScopeId(t, a);
223
+ const l = styles.get(n);
224
+ if (!appData.BUILD.attachStyles) return n;
225
+ if (e = 11 === e.nodeType ? e : doc, l) if ("string" == typeof l) {
226
+ e = e.head || e;
227
+ let a, r = rootAppliedStyles.get(e);
228
+ if (r || rootAppliedStyles.set(e, r = new Set), !r.has(n)) {
229
+ if (appData.BUILD.hydrateClientSide && e.host && (a = e.querySelector(`[sty-id="${n}"]`))) a.innerHTML = l; else {
230
+ if (appData.BUILD.cssVarShim && plt.$cssShim$) {
231
+ a = plt.$cssShim$.createHostStyle(o, n, l, !!(10 & t.$flags$));
232
+ const e = a["s-sc"];
233
+ e && (n = e, r = null);
234
+ } else a = doc.createElement("style"), a.innerHTML = l;
235
+ const p = null !== (s = plt.$nonce$) && void 0 !== s ? s : queryNonceMetaTagContent(doc);
236
+ null != p && a.setAttribute("nonce", p), (appData.BUILD.hydrateServerSide || appData.BUILD.hotModuleReplacement) && a.setAttribute("sty-id", n),
237
+ e.insertBefore(a, e.querySelector("link"));
238
+ }
239
+ r && r.add(n);
240
+ }
241
+ } else appData.BUILD.constructableCSS && !e.adoptedStyleSheets.includes(l) && (e.adoptedStyleSheets = [ ...e.adoptedStyleSheets, l ]);
242
+ return n;
243
+ }, attachStyles = e => {
244
+ const t = e.$cmpMeta$, a = e.$hostElement$, o = t.$flags$, s = createTime("attachStyles", t.$tagName$), n = addStyle(appData.BUILD.shadowDom && exports.supportsShadow && a.shadowRoot ? a.shadowRoot : a.getRootNode(), t, e.$modeName$, a);
245
+ (appData.BUILD.shadowDom || appData.BUILD.scoped) && appData.BUILD.cssAnnotations && 10 & o && (a["s-sc"] = n,
246
+ a.classList.add(n + "-h"), appData.BUILD.scoped && 2 & o && a.classList.add(n + "-s")),
247
+ s();
248
+ }, getScopeId = (e, t) => "sc-" + (appData.BUILD.mode && t && 32 & e.$flags$ ? e.$tagName$ + "-" + t : e.$tagName$), setAccessor = (e, t, a, o, s, n) => {
237
249
  if (a !== o) {
238
250
  let l = isMemberInElement(e, t), r = t.toLowerCase();
239
251
  if (appData.BUILD.vdomClass && "class" === t) {
@@ -389,10 +401,7 @@ const createElm = (e, t, a, o) => {
389
401
  checkSlotFallbackVisibility && updateFallbackSlotVisibility(n.$elm$), plt.$flags$ &= -2,
390
402
  relocateNodes.length = 0;
391
403
  }
392
- }, slotReferenceDebugNode = e => doc.createComment(`<slot${e.$name$ ? ' name="' + e.$name$ + '"' : ""}> (host=${hostTagName.toLowerCase()})`), originalLocationDebugNode = e => doc.createComment("org-location for " + (e.localName ? `<${e.localName}> (host=${e["s-hn"]})` : `[${e.textContent}]`)), getElement = e => appData.BUILD.lazyLoad ? getHostRef(e).$hostElement$ : e, emitEvent = (e, t, a) => {
393
- const o = plt.ce(t, a);
394
- return e.dispatchEvent(o), o;
395
- }, attachToAncestor = (e, t) => {
404
+ }, slotReferenceDebugNode = e => doc.createComment(`<slot${e.$name$ ? ' name="' + e.$name$ + '"' : ""}> (host=${hostTagName.toLowerCase()})`), originalLocationDebugNode = e => doc.createComment("org-location for " + (e.localName ? `<${e.localName}> (host=${e["s-hn"]})` : `[${e.textContent}]`)), attachToAncestor = (e, t) => {
396
405
  appData.BUILD.asyncLoading && t && !e.$onRenderResolve$ && t["s-p"] && t["s-p"].push(new Promise((t => e.$onRenderResolve$ = t)));
397
406
  }, scheduleUpdate = (e, t) => {
398
407
  if (appData.BUILD.taskQueue && appData.BUILD.updatable && (e.$flags$ |= 16), appData.BUILD.asyncLoading && 4 & e.$flags$) return void (e.$flags$ |= 512);
@@ -486,60 +495,7 @@ const callRender = (e, t, a) => {
486
495
  const a = t[e];
487
496
  "function" == typeof a.connectedCallback && a.connectedCallback(), serverSideConnected(a);
488
497
  }
489
- }, clientHydrate = (e, t, a, o, s, n, l) => {
490
- let r, p, i, d;
491
- if (1 === n.nodeType) {
492
- for (r = n.getAttribute("c-id"), r && (p = r.split("."), p[0] !== l && "0" !== p[0] || (i = {
493
- $flags$: 0,
494
- $hostId$: p[0],
495
- $nodeId$: p[1],
496
- $depth$: p[2],
497
- $index$: p[3],
498
- $tag$: n.tagName.toLowerCase(),
499
- $elm$: n,
500
- $attrs$: null,
501
- $children$: null,
502
- $key$: null,
503
- $name$: null,
504
- $text$: null
505
- }, t.push(i), n.removeAttribute("c-id"), e.$children$ || (e.$children$ = []), e.$children$[i.$index$] = i,
506
- e = i, o && "0" === i.$depth$ && (o[i.$index$] = i.$elm$))), d = n.childNodes.length - 1; d >= 0; d--) clientHydrate(e, t, a, o, s, n.childNodes[d], l);
507
- if (n.shadowRoot) for (d = n.shadowRoot.childNodes.length - 1; d >= 0; d--) clientHydrate(e, t, a, o, s, n.shadowRoot.childNodes[d], l);
508
- } else if (8 === n.nodeType) p = n.nodeValue.split("."), p[1] !== l && "0" !== p[1] || (r = p[0],
509
- i = {
510
- $flags$: 0,
511
- $hostId$: p[1],
512
- $nodeId$: p[2],
513
- $depth$: p[3],
514
- $index$: p[4],
515
- $elm$: n,
516
- $attrs$: null,
517
- $children$: null,
518
- $key$: null,
519
- $name$: null,
520
- $tag$: null,
521
- $text$: null
522
- }, "t" === r ? (i.$elm$ = n.nextSibling, i.$elm$ && 3 === i.$elm$.nodeType && (i.$text$ = i.$elm$.textContent,
523
- t.push(i), n.remove(), e.$children$ || (e.$children$ = []), e.$children$[i.$index$] = i,
524
- o && "0" === i.$depth$ && (o[i.$index$] = i.$elm$))) : i.$hostId$ === l && ("s" === r ? (i.$tag$ = "slot",
525
- p[5] ? n["s-sn"] = i.$name$ = p[5] : n["s-sn"] = "", n["s-sr"] = !0, appData.BUILD.shadowDom && o && (i.$elm$ = doc.createElement(i.$tag$),
526
- i.$name$ && i.$elm$.setAttribute("name", i.$name$), n.parentNode.insertBefore(i.$elm$, n),
527
- n.remove(), "0" === i.$depth$ && (o[i.$index$] = i.$elm$)), a.push(i), e.$children$ || (e.$children$ = []),
528
- e.$children$[i.$index$] = i) : "r" === r && (appData.BUILD.shadowDom && o ? n.remove() : appData.BUILD.slotRelocation && (s["s-cr"] = n,
529
- n["s-cn"] = !0)))); else if (e && "style" === e.$tag$) {
530
- const t = newVNode(null, n.textContent);
531
- t.$elm$ = n, t.$index$ = "0", e.$children$ = [ t ];
532
- }
533
- }, initializeDocumentHydrate = (e, t) => {
534
- if (1 === e.nodeType) {
535
- let a = 0;
536
- for (;a < e.childNodes.length; a++) initializeDocumentHydrate(e.childNodes[a], t);
537
- if (e.shadowRoot) for (a = 0; a < e.shadowRoot.childNodes.length; a++) initializeDocumentHydrate(e.shadowRoot.childNodes[a], t);
538
- } else if (8 === e.nodeType) {
539
- const a = e.nodeValue.split(".");
540
- "o" === a[0] && (t.set(a[1] + "." + a[2], e), e.nodeValue = "", e["s-en"] = a[3]);
541
- }
542
- }, parsePropertyValue = (e, t) => null == e || isComplexType(e) ? e : appData.BUILD.propBoolean && 4 & t ? "false" !== e && ("" === e || !!e) : appData.BUILD.propNumber && 2 & t ? parseFloat(e) : appData.BUILD.propString && 1 & t ? String(e) : e, getValue = (e, t) => getHostRef(e).$instanceValues$.get(t), setValue = (e, t, a, o) => {
498
+ }, getValue = (e, t) => getHostRef(e).$instanceValues$.get(t), setValue = (e, t, a, o) => {
543
499
  const s = getHostRef(e), n = appData.BUILD.lazyLoad ? s.$hostElement$ : e, l = s.$instanceValues$.get(t), r = s.$flags$, p = appData.BUILD.lazyLoad ? s.$lazyInstance$ : n;
544
500
  a = parsePropertyValue(a, o.$members$[t][0]);
545
501
  const i = Number.isNaN(l) && Number.isNaN(a), d = a !== l && !i;
@@ -606,9 +562,9 @@ const callRender = (e, t, a) => {
606
562
  if (appData.BUILD.lazyLoad || appData.BUILD.hydrateClientSide) {
607
563
  if (t.$flags$ |= 32, (s = loadModule(a)).then) {
608
564
  const e = (n = `st:load:${a.$tagName$}:${t.$modeName$}`, l = `[Rindo] Load module for <${a.$tagName$}>`,
609
- appData.BUILD.profile && performance.mark ? (0 === performance.getEntriesByName(n).length && performance.mark(n),
565
+ appData.BUILD.profile && performance.mark ? (0 === performance.getEntriesByName(n, "mark").length && performance.mark(n),
610
566
  () => {
611
- 0 === performance.getEntriesByName(l).length && performance.measure(l, n);
567
+ 0 === performance.getEntriesByName(l, "measure").length && performance.measure(l, n);
612
568
  }) : () => {});
613
569
  s = await s, e();
614
570
  }
@@ -805,10 +761,22 @@ const callRender = (e, t, a) => {
805
761
  const a = [ e ];
806
762
  for (;(e = e.nextSibling) && e["s-sn"] === t; ) a.push(e);
807
763
  return a;
808
- }, getAssetPath = e => {
809
- const t = new URL(e, plt.$resourcesUrl$);
810
- return t.origin !== win.location.origin ? t.href : t.pathname;
811
- }, parseVNodeAnnotations = (e, t, a, o) => {
764
+ }, addHostEventListeners = (e, t, a, o) => {
765
+ appData.BUILD.hostListener && a && (appData.BUILD.hostListenerTargetParent && (a = o ? a.filter((([e]) => 32 & e)) : a.filter((([e]) => !(32 & e)))),
766
+ a.map((([a, o, s]) => {
767
+ const n = appData.BUILD.hostListenerTarget ? getHostListenerTarget(e, a) : e, l = hostListenerProxy(t, s), r = hostListenerOpts(a);
768
+ plt.ael(n, o, l, r), (t.$rmListeners$ = t.$rmListeners$ || []).push((() => plt.rel(n, o, l, r)));
769
+ })));
770
+ }, hostListenerProxy = (e, t) => a => {
771
+ try {
772
+ appData.BUILD.lazyLoad ? 256 & e.$flags$ ? e.$lazyInstance$[t](a) : (e.$queuedListeners$ = e.$queuedListeners$ || []).push([ t, a ]) : e.$hostElement$[t](a);
773
+ } catch (e) {
774
+ consoleError(e);
775
+ }
776
+ }, getHostListenerTarget = (e, t) => appData.BUILD.hostListenerTargetDocument && 4 & t ? doc : appData.BUILD.hostListenerTargetWindow && 8 & t ? win : appData.BUILD.hostListenerTargetBody && 16 & t ? doc.body : appData.BUILD.hostListenerTargetParent && 32 & t ? e.parentElement : e, hostListenerOpts = e => ({
777
+ passive: 0 != (1 & e),
778
+ capture: 0 != (2 & e)
779
+ }), parseVNodeAnnotations = (e, t, a, o) => {
812
780
  null != t && (null != t["s-nr"] && o.push(t), 1 === t.nodeType && t.childNodes.forEach((t => {
813
781
  const s = getHostRef(t);
814
782
  if (null != s && !a.staticComponents.has(t.nodeName.toLowerCase())) {
@@ -872,6 +840,45 @@ const callRender = (e, t, a) => {
872
840
  e["s-p"] = [], e["s-rc"] = [], addHostEventListeners(e, a, t.$listeners$, !1), hostRefs.set(e, a);
873
841
  };
874
842
 
843
+ let customError;
844
+
845
+ const defaultConsoleError = e => {
846
+ caughtErrors.push(e);
847
+ }, consoleError = (e, t) => (customError || defaultConsoleError)(e, t), consoleDevError = (...e) => {
848
+ caughtErrors.push(new Error(e.join(", ")));
849
+ }, consoleDevWarn = (...e) => {
850
+ const t = e.filter((e => "string" == typeof e || "number" == typeof e || "boolean" == typeof e));
851
+ console.warn(...t);
852
+ }, nextTick = e => {
853
+ queuedTicks.push(e);
854
+ }, win = mockDoc.setupGlobal(global), doc = win.document;
855
+
856
+ exports.supportsShadow = !0;
857
+
858
+ const plt = {
859
+ $flags$: 0,
860
+ $resourcesUrl$: "",
861
+ jmp: e => e(),
862
+ raf: e => requestAnimationFrame(e),
863
+ ael: (e, t, a, o) => e.addEventListener(t, a, o),
864
+ rel: (e, t, a, o) => e.removeEventListener(t, a, o),
865
+ ce: (e, t) => new win.CustomEvent(e, t)
866
+ }, Context = {};
867
+
868
+ let autoApplyTimer, isAutoApplyingChanges = !1;
869
+
870
+ const isMemberInElement = (e, t) => {
871
+ if (null != e) {
872
+ if (t in e) return !0;
873
+ const a = e.nodeName;
874
+ if (a) {
875
+ const e = cstrs.get(a.toLowerCase());
876
+ if (null != e && null != e.COMPILER_META && null != e.COMPILER_META.properties) return e.COMPILER_META.properties.some((e => e.name === t));
877
+ }
878
+ }
879
+ return !1;
880
+ };
881
+
875
882
  Object.defineProperty(exports, "Env", {
876
883
  enumerable: !0,
877
884
  get: function() {
@@ -884,6 +891,7 @@ Object.defineProperty(exports, "Env", {
884
891
  isTesting: !0
885
892
  }, exports.Context = Context, exports.Fragment = (e, t) => t, exports.Host = Host,
886
893
  exports.addHostEventListeners = addHostEventListeners, exports.bootstrapLazy = (e, t = {}) => {
894
+ var a;
887
895
  appData.BUILD.profile && performance.mark && performance.mark("st:app:start"), (() => {
888
896
  if (appData.BUILD.devTools) {
889
897
  const e = win.rindo = win.rindo || {}, t = e.inspect;
@@ -931,34 +939,34 @@ exports.addHostEventListeners = addHostEventListeners, exports.bootstrapLazy = (
931
939
  };
932
940
  }
933
941
  })();
934
- const a = createTime("bootstrapLazy"), o = [], s = t.exclude || [], n = win.customElements, l = doc.head, r = l.querySelector("meta[charset]"), p = doc.createElement("style"), i = [], d = doc.querySelectorAll("[sty-id]");
935
- let c, $ = !0, u = 0;
942
+ const o = createTime("bootstrapLazy"), s = [], n = t.exclude || [], l = win.customElements, r = doc.head, p = r.querySelector("meta[charset]"), i = doc.createElement("style"), d = [], c = doc.querySelectorAll("[sty-id]");
943
+ let $, u = !0, m = 0;
936
944
  if (Object.assign(plt, t), plt.$resourcesUrl$ = new URL(t.resourcesUrl || "./", doc.baseURI).href,
937
945
  appData.BUILD.asyncQueue && t.syncQueue && (plt.$flags$ |= 4), appData.BUILD.hydrateClientSide && (plt.$flags$ |= 2),
938
- appData.BUILD.hydrateClientSide && appData.BUILD.shadowDom) for (;u < d.length; u++) registerStyle(d[u].getAttribute("sty-id"), d[u].innerHTML.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{"));
939
- e.map((e => {
946
+ appData.BUILD.hydrateClientSide && appData.BUILD.shadowDom) for (;m < c.length; m++) registerStyle(c[m].getAttribute("sty-id"), c[m].innerHTML.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{"));
947
+ if (e.map((e => {
940
948
  e[1].map((a => {
941
- const l = {
949
+ const o = {
942
950
  $flags$: a[0],
943
951
  $tagName$: a[1],
944
952
  $members$: a[2],
945
953
  $listeners$: a[3]
946
954
  };
947
- appData.BUILD.member && (l.$members$ = a[2]), appData.BUILD.hostListener && (l.$listeners$ = a[3]),
948
- appData.BUILD.reflect && (l.$attrsToReflect$ = []), appData.BUILD.watchCallback && (l.$watchers$ = {}),
949
- appData.BUILD.shadowDom && !exports.supportsShadow && 1 & l.$flags$ && (l.$flags$ |= 8);
950
- const r = appData.BUILD.transformTagName && t.transformTagName ? t.transformTagName(l.$tagName$) : l.$tagName$, p = class extends HTMLElement {
955
+ appData.BUILD.member && (o.$members$ = a[2]), appData.BUILD.hostListener && (o.$listeners$ = a[3]),
956
+ appData.BUILD.reflect && (o.$attrsToReflect$ = []), appData.BUILD.watchCallback && (o.$watchers$ = {}),
957
+ appData.BUILD.shadowDom && !exports.supportsShadow && 1 & o.$flags$ && (o.$flags$ |= 8);
958
+ const r = appData.BUILD.transformTagName && t.transformTagName ? t.transformTagName(o.$tagName$) : o.$tagName$, p = class extends HTMLElement {
951
959
  constructor(e) {
952
- super(e), registerHost(e = this, l), appData.BUILD.shadowDom && 1 & l.$flags$ && (exports.supportsShadow ? appData.BUILD.shadowDelegatesFocus ? e.attachShadow({
960
+ super(e), registerHost(e = this, o), appData.BUILD.shadowDom && 1 & o.$flags$ && (exports.supportsShadow ? appData.BUILD.shadowDelegatesFocus ? e.attachShadow({
953
961
  mode: "open",
954
- delegatesFocus: !!(16 & l.$flags$)
962
+ delegatesFocus: !!(16 & o.$flags$)
955
963
  }) : e.attachShadow({
956
964
  mode: "open"
957
965
  }) : appData.BUILD.hydrateServerSide || "shadowRoot" in e || (e.shadowRoot = e)),
958
- appData.BUILD.slotChildNodesFix && patchChildSlotNodes(e, l);
966
+ appData.BUILD.slotChildNodesFix && patchChildSlotNodes(e, o);
959
967
  }
960
968
  connectedCallback() {
961
- c && (clearTimeout(c), c = null), $ ? i.push(this) : plt.jmp((() => connectedCallback(this)));
969
+ $ && (clearTimeout($), $ = null), u ? d.push(this) : plt.jmp((() => connectedCallback(this)));
962
970
  }
963
971
  disconnectedCallback() {
964
972
  plt.jmp((() => disconnectedCallback(this)));
@@ -974,14 +982,17 @@ exports.addHostEventListeners = addHostEventListeners, exports.bootstrapLazy = (
974
982
  o.$flags$ = 1, e["s-hmr-load"] = () => {
975
983
  delete e["s-hmr-load"];
976
984
  }, initializeComponent(e, o, t);
977
- })(this, l);
978
- }), appData.BUILD.scopedSlotTextContentFix && patchTextContent(p.prototype, l),
979
- l.$lazyBundleId$ = e[0], s.includes(r) || n.get(r) || (o.push(r), n.define(r, proxyComponent(p, l, 1)));
985
+ })(this, o);
986
+ }), appData.BUILD.scopedSlotTextContentFix && patchTextContent(p.prototype, o),
987
+ o.$lazyBundleId$ = e[0], n.includes(r) || l.get(r) || (s.push(r), l.define(r, proxyComponent(p, o, 1)));
980
988
  }));
981
- })), appData.BUILD.invisiblePrehydration && (appData.BUILD.hydratedClass || appData.BUILD.hydratedAttribute) && (p.innerHTML = o + "{visibility:hidden}.hydrated{visibility:inherit}",
982
- p.setAttribute("data-styles", ""), l.insertBefore(p, r ? r.nextSibling : l.firstChild)),
983
- $ = !1, i.length ? i.map((e => e.connectedCallback())) : appData.BUILD.profile ? plt.jmp((() => c = setTimeout(appDidLoad, 30, "timeout"))) : plt.jmp((() => c = setTimeout(appDidLoad, 30))),
984
- a();
989
+ })), appData.BUILD.invisiblePrehydration && (appData.BUILD.hydratedClass || appData.BUILD.hydratedAttribute)) {
990
+ i.innerHTML = s + "{visibility:hidden}.hydrated{visibility:inherit}", i.setAttribute("data-styles", "");
991
+ const e = null !== (a = plt.$nonce$) && void 0 !== a ? a : queryNonceMetaTagContent(doc);
992
+ null != e && i.setAttribute("nonce", e), r.insertBefore(i, p ? p.nextSibling : r.firstChild);
993
+ }
994
+ u = !1, d.length ? d.map((e => e.connectedCallback())) : appData.BUILD.profile ? plt.jmp((() => $ = setTimeout(appDidLoad, 30, "timeout"))) : plt.jmp((() => $ = setTimeout(appDidLoad, 30))),
995
+ o();
985
996
  }, exports.connectedCallback = connectedCallback, exports.consoleDevError = consoleDevError,
986
997
  exports.consoleDevInfo = (...e) => {}, exports.consoleDevWarn = consoleDevWarn,
987
998
  exports.consoleError = consoleError, exports.createEvent = (e, t, a) => {
@@ -1069,16 +1080,17 @@ exports.readTask = readTask, exports.registerComponents = e => {
1069
1080
  return t.$lazyInstance$ = e, hostRefs.set(e, t);
1070
1081
  }, exports.registerModule = function registerModule(e, t) {
1071
1082
  moduleLoaded.set(e, t);
1072
- }, exports.renderVdom = renderVdom, exports.resetPlatform = function resetPlatform() {
1083
+ }, exports.renderVdom = renderVdom, exports.resetPlatform = function resetPlatform(e = {}) {
1073
1084
  win && "function" == typeof win.close && win.close(), hostRefs.clear(), styles.clear(),
1074
- plt.$flags$ = 0, Object.keys(Context).forEach((e => delete Context[e])), null != plt.$orgLocNodes$ && (plt.$orgLocNodes$.clear(),
1075
- plt.$orgLocNodes$ = void 0), win.location.href = plt.$resourcesUrl$ = "http://testing-rindojs.web.app/",
1076
- function e() {
1085
+ plt.$flags$ = 0, Object.keys(Context).forEach((e => delete Context[e])), Object.assign(plt, e),
1086
+ null != plt.$orgLocNodes$ && (plt.$orgLocNodes$.clear(), plt.$orgLocNodes$ = void 0),
1087
+ win.location.href = plt.$resourcesUrl$ = "http://rindojs-testing.web.app/", function t() {
1077
1088
  queuedTicks.length = 0, queuedWriteTasks.length = 0, queuedReadTasks.length = 0,
1078
1089
  moduleLoaded.clear(), queuedLoadModules.length = 0, caughtErrors.length = 0;
1079
1090
  }(), stopAutoApplyChanges(), cstrs.clear();
1080
1091
  }, exports.setAssetPath = e => plt.$resourcesUrl$ = e, exports.setErrorHandler = e => customError = e,
1081
- exports.setMode = e => modeResolutionChain.push(e), exports.setPlatformHelpers = e => {
1092
+ exports.setMode = e => modeResolutionChain.push(e), exports.setNonce = e => plt.$nonce$ = e,
1093
+ exports.setPlatformHelpers = e => {
1082
1094
  Object.assign(plt, e);
1083
1095
  }, exports.setPlatformOptions = e => Object.assign(plt, e), exports.setSupportsShadowDom = e => {
1084
1096
  exports.supportsShadow = e;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/internal/testing",
3
- "version": "2.18.0",
3
+ "version": "2.22.3",
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