@rindo/core 4.18.3 → 4.19.0
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 +43 -16
- package/cli/index.js +43 -16
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/rindo.js +175 -72
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +3 -3
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +2 -2
- package/dev-server/ws.js +1 -1
- package/internal/app-data/package.json +1 -1
- package/internal/client/index.js +535 -508
- package/internal/client/package.json +3 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +108 -50
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.d.ts +29 -11
- package/internal/hydrate/runner.js +239 -260
- package/internal/package.json +1 -1
- package/internal/rindo-private.d.ts +39 -14
- package/internal/rindo-public-compiler.d.ts +21 -0
- package/internal/rindo-public-runtime.d.ts +0 -2
- package/internal/testing/index.js +439 -407
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +137 -131
- package/mock-doc/index.d.ts +18 -4
- package/mock-doc/index.js +137 -131
- package/mock-doc/package.json +1 -1
- package/package.json +34 -6
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/index.js +10 -10
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +95 -16
- package/testing/jest/jest-27-and-under/matchers/events.d.ts +4 -0
- package/testing/jest/jest-27-and-under/matchers/index.d.ts +2 -1
- package/testing/jest/jest-28/matchers/events.d.ts +4 -0
- package/testing/jest/jest-28/matchers/index.d.ts +2 -1
- package/testing/jest/jest-29/matchers/events.d.ts +4 -0
- package/testing/jest/jest-29/matchers/index.d.ts +2 -1
- package/testing/mocks.d.ts +9 -9
- package/testing/package.json +1 -1
- package/testing/puppeteer/puppeteer-declarations.d.ts +11 -0
package/internal/client/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Rindo Client Platform v4.
|
|
2
|
+
Rindo Client Platform v4.19.0 | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
@@ -17,7 +17,226 @@ var Build = {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
// src/client/client-host-ref.ts
|
|
20
|
-
import { BUILD as
|
|
20
|
+
import { BUILD as BUILD2 } from "@rindo/core/internal/app-data";
|
|
21
|
+
var hostRefs = BUILD2.hotModuleReplacement ? window.__RINDO_HOSTREFS__ || (window.__RINDO_HOSTREFS__ = /* @__PURE__ */ new WeakMap()) : /* @__PURE__ */ new WeakMap();
|
|
22
|
+
var getHostRef = (ref) => hostRefs.get(ref);
|
|
23
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
24
|
+
var registerHost = (hostElement, cmpMeta) => {
|
|
25
|
+
const hostRef = {
|
|
26
|
+
$flags$: 0,
|
|
27
|
+
$hostElement$: hostElement,
|
|
28
|
+
$cmpMeta$: cmpMeta,
|
|
29
|
+
$instanceValues$: /* @__PURE__ */ new Map()
|
|
30
|
+
};
|
|
31
|
+
if (BUILD2.isDev) {
|
|
32
|
+
hostRef.$renderCount$ = 0;
|
|
33
|
+
}
|
|
34
|
+
if (BUILD2.method && BUILD2.lazyLoad) {
|
|
35
|
+
hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
|
|
36
|
+
}
|
|
37
|
+
if (BUILD2.asyncLoading) {
|
|
38
|
+
hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
|
|
39
|
+
hostElement["s-p"] = [];
|
|
40
|
+
hostElement["s-rc"] = [];
|
|
41
|
+
}
|
|
42
|
+
return hostRefs.set(hostElement, hostRef);
|
|
43
|
+
};
|
|
44
|
+
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
45
|
+
|
|
46
|
+
// src/client/client-load-module.ts
|
|
47
|
+
import { BUILD as BUILD4 } from "@rindo/core/internal/app-data";
|
|
48
|
+
|
|
49
|
+
// src/client/client-log.ts
|
|
50
|
+
import { BUILD as BUILD3 } from "@rindo/core/internal/app-data";
|
|
51
|
+
var customError;
|
|
52
|
+
var consoleError = (e, el) => (customError || console.error)(e, el);
|
|
53
|
+
var RINDO_DEV_MODE = BUILD3.isTesting ? ["RINDO:"] : [
|
|
54
|
+
"%crindo",
|
|
55
|
+
"color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"
|
|
56
|
+
];
|
|
57
|
+
var consoleDevError = (...m) => console.error(...RINDO_DEV_MODE, ...m);
|
|
58
|
+
var consoleDevWarn = (...m) => console.warn(...RINDO_DEV_MODE, ...m);
|
|
59
|
+
var consoleDevInfo = (...m) => console.info(...RINDO_DEV_MODE, ...m);
|
|
60
|
+
var setErrorHandler = (handler) => customError = handler;
|
|
61
|
+
|
|
62
|
+
// src/client/client-load-module.ts
|
|
63
|
+
var cmpModules = /* @__PURE__ */ new Map();
|
|
64
|
+
var MODULE_IMPORT_PREFIX = "./";
|
|
65
|
+
var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
66
|
+
const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
|
|
67
|
+
const bundleId = cmpMeta.$lazyBundleId$;
|
|
68
|
+
if (BUILD4.isDev && typeof bundleId !== "string") {
|
|
69
|
+
consoleDevError(
|
|
70
|
+
`Trying to lazily load component <${cmpMeta.$tagName$}> with style mode "${hostRef.$modeName$}", but it does not exist.`
|
|
71
|
+
);
|
|
72
|
+
return void 0;
|
|
73
|
+
} else if (!bundleId) {
|
|
74
|
+
return void 0;
|
|
75
|
+
}
|
|
76
|
+
const module = !BUILD4.hotModuleReplacement ? cmpModules.get(bundleId) : false;
|
|
77
|
+
if (module) {
|
|
78
|
+
return module[exportName];
|
|
79
|
+
}
|
|
80
|
+
/*!__RINDO_STATIC_IMPORT_SWITCH__*/
|
|
81
|
+
return import(
|
|
82
|
+
/* @wite-ignore */
|
|
83
|
+
/* @lahm-ignore */
|
|
84
|
+
/* webpackInclude: /\.entry\.js$/ */
|
|
85
|
+
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
86
|
+
/* webpackMode: "lazy" */
|
|
87
|
+
`./${bundleId}.entry.js${BUILD4.hotModuleReplacement && hmrVersionId ? "?s-hmr=" + hmrVersionId : ""}`
|
|
88
|
+
).then((importedModule) => {
|
|
89
|
+
if (!BUILD4.hotModuleReplacement) {
|
|
90
|
+
cmpModules.set(bundleId, importedModule);
|
|
91
|
+
}
|
|
92
|
+
return importedModule[exportName];
|
|
93
|
+
}, consoleError);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
// src/client/client-style.ts
|
|
97
|
+
var styles = /* @__PURE__ */ new Map();
|
|
98
|
+
var modeResolutionChain = [];
|
|
99
|
+
|
|
100
|
+
// src/client/client-task-queue.ts
|
|
101
|
+
import { BUILD as BUILD6 } from "@rindo/core/internal/app-data";
|
|
102
|
+
|
|
103
|
+
// src/runtime/runtime-constants.ts
|
|
104
|
+
var CONTENT_REF_ID = "r";
|
|
105
|
+
var ORG_LOCATION_ID = "o";
|
|
106
|
+
var SLOT_NODE_ID = "s";
|
|
107
|
+
var TEXT_NODE_ID = "t";
|
|
108
|
+
var HYDRATE_ID = "s-id";
|
|
109
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
110
|
+
var HYDRATE_CHILD_ID = "c-id";
|
|
111
|
+
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
112
|
+
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
113
|
+
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
114
|
+
var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
115
|
+
"formAssociatedCallback",
|
|
116
|
+
"formResetCallback",
|
|
117
|
+
"formDisabledCallback",
|
|
118
|
+
"formStateRestoreCallback"
|
|
119
|
+
];
|
|
120
|
+
|
|
121
|
+
// src/client/client-window.ts
|
|
122
|
+
import { BUILD as BUILD5 } from "@rindo/core/internal/app-data";
|
|
123
|
+
var win = typeof window !== "undefined" ? window : {};
|
|
124
|
+
var doc = win.document || { head: {} };
|
|
125
|
+
var H = win.HTMLElement || class {
|
|
126
|
+
};
|
|
127
|
+
var plt = {
|
|
128
|
+
$flags$: 0,
|
|
129
|
+
$resourcesUrl$: "",
|
|
130
|
+
jmp: (h2) => h2(),
|
|
131
|
+
raf: (h2) => requestAnimationFrame(h2),
|
|
132
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
133
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
134
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
135
|
+
};
|
|
136
|
+
var setPlatformHelpers = (helpers) => {
|
|
137
|
+
Object.assign(plt, helpers);
|
|
138
|
+
};
|
|
139
|
+
var supportsShadow = BUILD5.shadowDom;
|
|
140
|
+
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
141
|
+
let supportsListenerOptions2 = false;
|
|
142
|
+
try {
|
|
143
|
+
doc.addEventListener(
|
|
144
|
+
"e",
|
|
145
|
+
null,
|
|
146
|
+
Object.defineProperty({}, "passive", {
|
|
147
|
+
get() {
|
|
148
|
+
supportsListenerOptions2 = true;
|
|
149
|
+
}
|
|
150
|
+
})
|
|
151
|
+
);
|
|
152
|
+
} catch (e) {
|
|
153
|
+
}
|
|
154
|
+
return supportsListenerOptions2;
|
|
155
|
+
})();
|
|
156
|
+
var promiseResolve = (v) => Promise.resolve(v);
|
|
157
|
+
var supportsConstructableStylesheets = BUILD5.constructableCSS ? /* @__PURE__ */ (() => {
|
|
158
|
+
try {
|
|
159
|
+
new CSSStyleSheet();
|
|
160
|
+
return typeof new CSSStyleSheet().replaceSync === "function";
|
|
161
|
+
} catch (e) {
|
|
162
|
+
}
|
|
163
|
+
return false;
|
|
164
|
+
})() : false;
|
|
165
|
+
|
|
166
|
+
// src/client/client-task-queue.ts
|
|
167
|
+
var queueCongestion = 0;
|
|
168
|
+
var queuePending = false;
|
|
169
|
+
var queueDomReads = [];
|
|
170
|
+
var queueDomWrites = [];
|
|
171
|
+
var queueDomWritesLow = [];
|
|
172
|
+
var queueTask = (queue, write) => (cb) => {
|
|
173
|
+
queue.push(cb);
|
|
174
|
+
if (!queuePending) {
|
|
175
|
+
queuePending = true;
|
|
176
|
+
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
177
|
+
nextTick(flush);
|
|
178
|
+
} else {
|
|
179
|
+
plt.raf(flush);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
var consume = (queue) => {
|
|
184
|
+
for (let i2 = 0; i2 < queue.length; i2++) {
|
|
185
|
+
try {
|
|
186
|
+
queue[i2](performance.now());
|
|
187
|
+
} catch (e) {
|
|
188
|
+
consoleError(e);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
queue.length = 0;
|
|
192
|
+
};
|
|
193
|
+
var consumeTimeout = (queue, timeout) => {
|
|
194
|
+
let i2 = 0;
|
|
195
|
+
let ts = 0;
|
|
196
|
+
while (i2 < queue.length && (ts = performance.now()) < timeout) {
|
|
197
|
+
try {
|
|
198
|
+
queue[i2++](ts);
|
|
199
|
+
} catch (e) {
|
|
200
|
+
consoleError(e);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
if (i2 === queue.length) {
|
|
204
|
+
queue.length = 0;
|
|
205
|
+
} else if (i2 !== 0) {
|
|
206
|
+
queue.splice(0, i2);
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
var flush = () => {
|
|
210
|
+
if (BUILD6.asyncQueue) {
|
|
211
|
+
queueCongestion++;
|
|
212
|
+
}
|
|
213
|
+
consume(queueDomReads);
|
|
214
|
+
if (BUILD6.asyncQueue) {
|
|
215
|
+
const timeout = (plt.$flags$ & 6 /* queueMask */) === 2 /* appLoaded */ ? performance.now() + 14 * Math.ceil(queueCongestion * (1 / 10)) : Infinity;
|
|
216
|
+
consumeTimeout(queueDomWrites, timeout);
|
|
217
|
+
consumeTimeout(queueDomWritesLow, timeout);
|
|
218
|
+
if (queueDomWrites.length > 0) {
|
|
219
|
+
queueDomWritesLow.push(...queueDomWrites);
|
|
220
|
+
queueDomWrites.length = 0;
|
|
221
|
+
}
|
|
222
|
+
if (queuePending = queueDomReads.length + queueDomWrites.length + queueDomWritesLow.length > 0) {
|
|
223
|
+
plt.raf(flush);
|
|
224
|
+
} else {
|
|
225
|
+
queueCongestion = 0;
|
|
226
|
+
}
|
|
227
|
+
} else {
|
|
228
|
+
consume(queueDomWrites);
|
|
229
|
+
if (queuePending = queueDomReads.length > 0) {
|
|
230
|
+
plt.raf(flush);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
var nextTick = (cb) => promiseResolve().then(cb);
|
|
235
|
+
var readTask = /* @__PURE__ */ queueTask(queueDomReads, false);
|
|
236
|
+
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
237
|
+
|
|
238
|
+
// src/client/index.ts
|
|
239
|
+
import { BUILD as BUILD27, Env, NAMESPACE as NAMESPACE2 } from "@rindo/core/internal/app-data";
|
|
21
240
|
|
|
22
241
|
// src/runtime/asset-path.ts
|
|
23
242
|
var getAssetPath = (path) => {
|
|
@@ -27,7 +246,7 @@ var getAssetPath = (path) => {
|
|
|
27
246
|
var setAssetPath = (path) => plt.$resourcesUrl$ = path;
|
|
28
247
|
|
|
29
248
|
// src/runtime/bootstrap-custom-element.ts
|
|
30
|
-
import { BUILD as
|
|
249
|
+
import { BUILD as BUILD24 } from "@rindo/core/internal/app-data";
|
|
31
250
|
|
|
32
251
|
// src/utils/constants.ts
|
|
33
252
|
var EMPTY_OBJ = {};
|
|
@@ -97,16 +316,16 @@ var unwrapErr = (result) => {
|
|
|
97
316
|
};
|
|
98
317
|
|
|
99
318
|
// src/runtime/connected-callback.ts
|
|
100
|
-
import { BUILD as
|
|
319
|
+
import { BUILD as BUILD21 } from "@rindo/core/internal/app-data";
|
|
101
320
|
|
|
102
321
|
// src/runtime/client-hydrate.ts
|
|
103
|
-
import { BUILD as
|
|
322
|
+
import { BUILD as BUILD9 } from "@rindo/core/internal/app-data";
|
|
104
323
|
|
|
105
324
|
// src/runtime/profile.ts
|
|
106
|
-
import { BUILD as
|
|
325
|
+
import { BUILD as BUILD7 } from "@rindo/core/internal/app-data";
|
|
107
326
|
var i = 0;
|
|
108
327
|
var createTime = (fnName, tagName = "") => {
|
|
109
|
-
if (
|
|
328
|
+
if (BUILD7.profile && performance.mark) {
|
|
110
329
|
const key = `st:${fnName}:${tagName}:${i++}`;
|
|
111
330
|
performance.mark(key);
|
|
112
331
|
return () => performance.measure(`[Rindo] ${fnName}() <${tagName}>`, key);
|
|
@@ -117,7 +336,7 @@ var createTime = (fnName, tagName = "") => {
|
|
|
117
336
|
}
|
|
118
337
|
};
|
|
119
338
|
var uniqueTime = (key, measureText) => {
|
|
120
|
-
if (
|
|
339
|
+
if (BUILD7.profile && performance.mark) {
|
|
121
340
|
if (performance.getEntriesByName(key, "mark").length === 0) {
|
|
122
341
|
performance.mark(key);
|
|
123
342
|
}
|
|
@@ -175,7 +394,7 @@ var inspect = (ref) => {
|
|
|
175
394
|
};
|
|
176
395
|
};
|
|
177
396
|
var installDevTools = () => {
|
|
178
|
-
if (
|
|
397
|
+
if (BUILD7.devTools) {
|
|
179
398
|
const rindo = win.rindo = win.rindo || {};
|
|
180
399
|
const originalInspect = rindo.inspect;
|
|
181
400
|
rindo.inspect = (ref) => {
|
|
@@ -188,26 +407,8 @@ var installDevTools = () => {
|
|
|
188
407
|
}
|
|
189
408
|
};
|
|
190
409
|
|
|
191
|
-
// src/runtime/runtime-constants.ts
|
|
192
|
-
var CONTENT_REF_ID = "r";
|
|
193
|
-
var ORG_LOCATION_ID = "o";
|
|
194
|
-
var SLOT_NODE_ID = "s";
|
|
195
|
-
var TEXT_NODE_ID = "t";
|
|
196
|
-
var HYDRATE_ID = "s-id";
|
|
197
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
198
|
-
var HYDRATE_CHILD_ID = "c-id";
|
|
199
|
-
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
200
|
-
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
201
|
-
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
202
|
-
var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
203
|
-
"formAssociatedCallback",
|
|
204
|
-
"formResetCallback",
|
|
205
|
-
"formDisabledCallback",
|
|
206
|
-
"formStateRestoreCallback"
|
|
207
|
-
];
|
|
208
|
-
|
|
209
410
|
// src/runtime/vdom/h.ts
|
|
210
|
-
import { BUILD as
|
|
411
|
+
import { BUILD as BUILD8 } from "@rindo/core/internal/app-data";
|
|
211
412
|
var h = (nodeName, vnodeData, ...children) => {
|
|
212
413
|
let child = null;
|
|
213
414
|
let key = null;
|
|
@@ -223,7 +424,7 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
223
424
|
} else if (child != null && typeof child !== "boolean") {
|
|
224
425
|
if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
|
|
225
426
|
child = String(child);
|
|
226
|
-
} else if (
|
|
427
|
+
} else if (BUILD8.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
|
|
227
428
|
consoleDevError(`vNode passed as children has unexpected type.
|
|
228
429
|
Make sure it's using the correct h() function.
|
|
229
430
|
Empty objects can also be the cause, look for JSX comments that became objects.`);
|
|
@@ -239,28 +440,28 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
|
|
|
239
440
|
};
|
|
240
441
|
walk(children);
|
|
241
442
|
if (vnodeData) {
|
|
242
|
-
if (
|
|
443
|
+
if (BUILD8.isDev && nodeName === "input") {
|
|
243
444
|
validateInputProperties(vnodeData);
|
|
244
445
|
}
|
|
245
|
-
if (
|
|
446
|
+
if (BUILD8.vdomKey && vnodeData.key) {
|
|
246
447
|
key = vnodeData.key;
|
|
247
448
|
}
|
|
248
|
-
if (
|
|
449
|
+
if (BUILD8.slotRelocation && vnodeData.name) {
|
|
249
450
|
slotName = vnodeData.name;
|
|
250
451
|
}
|
|
251
|
-
if (
|
|
452
|
+
if (BUILD8.vdomClass) {
|
|
252
453
|
const classData = vnodeData.className || vnodeData.class;
|
|
253
454
|
if (classData) {
|
|
254
455
|
vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
|
|
255
456
|
}
|
|
256
457
|
}
|
|
257
458
|
}
|
|
258
|
-
if (
|
|
459
|
+
if (BUILD8.isDev && vNodeChildren.some(isHost)) {
|
|
259
460
|
consoleDevError(`The <Host> must be the single root component. Make sure:
|
|
260
461
|
- You are NOT using hostData() and <Host> in the same component.
|
|
261
462
|
- <Host> is used once, and it's the single root component of the render() function.`);
|
|
262
463
|
}
|
|
263
|
-
if (
|
|
464
|
+
if (BUILD8.vdomFunctional && typeof nodeName === "function") {
|
|
264
465
|
return nodeName(
|
|
265
466
|
vnodeData === null ? {} : vnodeData,
|
|
266
467
|
vNodeChildren,
|
|
@@ -272,10 +473,10 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
|
|
|
272
473
|
if (vNodeChildren.length > 0) {
|
|
273
474
|
vnode.$children$ = vNodeChildren;
|
|
274
475
|
}
|
|
275
|
-
if (
|
|
476
|
+
if (BUILD8.vdomKey) {
|
|
276
477
|
vnode.$key$ = key;
|
|
277
478
|
}
|
|
278
|
-
if (
|
|
479
|
+
if (BUILD8.slotRelocation) {
|
|
279
480
|
vnode.$name$ = slotName;
|
|
280
481
|
}
|
|
281
482
|
return vnode;
|
|
@@ -288,13 +489,13 @@ var newVNode = (tag, text) => {
|
|
|
288
489
|
$elm$: null,
|
|
289
490
|
$children$: null
|
|
290
491
|
};
|
|
291
|
-
if (
|
|
492
|
+
if (BUILD8.vdomAttribute) {
|
|
292
493
|
vnode.$attrs$ = null;
|
|
293
494
|
}
|
|
294
|
-
if (
|
|
495
|
+
if (BUILD8.vdomKey) {
|
|
295
496
|
vnode.$key$ = null;
|
|
296
497
|
}
|
|
297
|
-
if (
|
|
498
|
+
if (BUILD8.slotRelocation) {
|
|
298
499
|
vnode.$name$ = null;
|
|
299
500
|
}
|
|
300
501
|
return vnode;
|
|
@@ -352,7 +553,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
352
553
|
const shadowRoot = hostElm.shadowRoot;
|
|
353
554
|
const childRenderNodes = [];
|
|
354
555
|
const slotNodes = [];
|
|
355
|
-
const shadowRootNodes =
|
|
556
|
+
const shadowRootNodes = BUILD9.shadowDom && shadowRoot ? [] : null;
|
|
356
557
|
const vnode = hostRef.$vnode$ = newVNode(tagName, null);
|
|
357
558
|
if (!plt.$orgLocNodes$) {
|
|
358
559
|
initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
@@ -376,7 +577,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
376
577
|
}
|
|
377
578
|
plt.$orgLocNodes$.delete(orgLocationId);
|
|
378
579
|
});
|
|
379
|
-
if (
|
|
580
|
+
if (BUILD9.shadowDom && shadowRoot) {
|
|
380
581
|
shadowRootNodes.map((shadowRootNode) => {
|
|
381
582
|
if (shadowRootNode) {
|
|
382
583
|
shadowRoot.appendChild(shadowRootNode);
|
|
@@ -486,7 +687,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
486
687
|
node["s-sn"] = "";
|
|
487
688
|
}
|
|
488
689
|
node["s-sr"] = true;
|
|
489
|
-
if (
|
|
690
|
+
if (BUILD9.shadowDom && shadowRootNodes) {
|
|
490
691
|
childVNode.$elm$ = doc.createElement(childVNode.$tag$);
|
|
491
692
|
if (childVNode.$name$) {
|
|
492
693
|
childVNode.$elm$.setAttribute("name", childVNode.$name$);
|
|
@@ -503,9 +704,9 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
503
704
|
}
|
|
504
705
|
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
505
706
|
} else if (childNodeType === CONTENT_REF_ID) {
|
|
506
|
-
if (
|
|
707
|
+
if (BUILD9.shadowDom && shadowRootNodes) {
|
|
507
708
|
node.remove();
|
|
508
|
-
} else if (
|
|
709
|
+
} else if (BUILD9.slotRelocation) {
|
|
509
710
|
hostElm["s-cr"] = node;
|
|
510
711
|
node["s-cn"] = true;
|
|
511
712
|
}
|
|
@@ -541,7 +742,7 @@ var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
|
541
742
|
};
|
|
542
743
|
|
|
543
744
|
// src/runtime/initialize-component.ts
|
|
544
|
-
import { BUILD as
|
|
745
|
+
import { BUILD as BUILD20 } from "@rindo/core/internal/app-data";
|
|
545
746
|
|
|
546
747
|
// src/runtime/mode.ts
|
|
547
748
|
var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
|
|
@@ -549,22 +750,22 @@ var setMode = (handler) => modeResolutionChain.push(handler);
|
|
|
549
750
|
var getMode = (ref) => getHostRef(ref).$modeName$;
|
|
550
751
|
|
|
551
752
|
// src/runtime/proxy-component.ts
|
|
552
|
-
import { BUILD as
|
|
753
|
+
import { BUILD as BUILD19 } from "@rindo/core/internal/app-data";
|
|
553
754
|
|
|
554
755
|
// src/runtime/set-value.ts
|
|
555
|
-
import { BUILD as
|
|
756
|
+
import { BUILD as BUILD18 } from "@rindo/core/internal/app-data";
|
|
556
757
|
|
|
557
758
|
// src/runtime/parse-property-value.ts
|
|
558
|
-
import { BUILD as
|
|
759
|
+
import { BUILD as BUILD10 } from "@rindo/core/internal/app-data";
|
|
559
760
|
var parsePropertyValue = (propValue, propType) => {
|
|
560
761
|
if (propValue != null && !isComplexType(propValue)) {
|
|
561
|
-
if (
|
|
762
|
+
if (BUILD10.propBoolean && propType & 4 /* Boolean */) {
|
|
562
763
|
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
563
764
|
}
|
|
564
|
-
if (
|
|
765
|
+
if (BUILD10.propNumber && propType & 2 /* Number */) {
|
|
565
766
|
return parseFloat(propValue);
|
|
566
767
|
}
|
|
567
|
-
if (
|
|
768
|
+
if (BUILD10.propString && propType & 1 /* String */) {
|
|
568
769
|
return String(propValue);
|
|
569
770
|
}
|
|
570
771
|
return propValue;
|
|
@@ -573,21 +774,21 @@ var parsePropertyValue = (propValue, propType) => {
|
|
|
573
774
|
};
|
|
574
775
|
|
|
575
776
|
// src/runtime/update-component.ts
|
|
576
|
-
import { BUILD as
|
|
777
|
+
import { BUILD as BUILD17, NAMESPACE } from "@rindo/core/internal/app-data";
|
|
577
778
|
|
|
578
779
|
// src/runtime/event-emitter.ts
|
|
579
|
-
import { BUILD as
|
|
780
|
+
import { BUILD as BUILD12 } from "@rindo/core/internal/app-data";
|
|
580
781
|
|
|
581
782
|
// src/runtime/element.ts
|
|
582
|
-
import { BUILD as
|
|
583
|
-
var getElement = (ref) =>
|
|
783
|
+
import { BUILD as BUILD11 } from "@rindo/core/internal/app-data";
|
|
784
|
+
var getElement = (ref) => BUILD11.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
|
|
584
785
|
|
|
585
786
|
// src/runtime/event-emitter.ts
|
|
586
787
|
var createEvent = (ref, name, flags) => {
|
|
587
788
|
const elm = getElement(ref);
|
|
588
789
|
return {
|
|
589
790
|
emit: (detail) => {
|
|
590
|
-
if (
|
|
791
|
+
if (BUILD12.isDev && !elm.isConnected) {
|
|
591
792
|
consoleDevWarn(`The "${name}" event was emitted, but the dispatcher node is no longer connected to the dom.`);
|
|
592
793
|
}
|
|
593
794
|
return emitEvent(elm, name, {
|
|
@@ -606,7 +807,7 @@ var emitEvent = (elm, name, opts) => {
|
|
|
606
807
|
};
|
|
607
808
|
|
|
608
809
|
// src/runtime/styles.ts
|
|
609
|
-
import { BUILD as
|
|
810
|
+
import { BUILD as BUILD13 } from "@rindo/core/internal/app-data";
|
|
610
811
|
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
611
812
|
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
612
813
|
let style = styles.get(scopeId2);
|
|
@@ -624,22 +825,24 @@ var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
|
624
825
|
};
|
|
625
826
|
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
626
827
|
var _a;
|
|
828
|
+
const styleContainerDocument = styleContainerNode;
|
|
829
|
+
const styleContainerShadowRoot = styleContainerNode;
|
|
627
830
|
const scopeId2 = getScopeId(cmpMeta, mode);
|
|
628
831
|
const style = styles.get(scopeId2);
|
|
629
|
-
if (!
|
|
832
|
+
if (!BUILD13.attachStyles) {
|
|
630
833
|
return scopeId2;
|
|
631
834
|
}
|
|
632
835
|
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
633
836
|
if (style) {
|
|
634
837
|
if (typeof style === "string") {
|
|
635
|
-
styleContainerNode =
|
|
838
|
+
styleContainerNode = styleContainerDocument.head || styleContainerNode;
|
|
636
839
|
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
637
840
|
let styleElm;
|
|
638
841
|
if (!appliedStyles) {
|
|
639
842
|
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
640
843
|
}
|
|
641
844
|
if (!appliedStyles.has(scopeId2)) {
|
|
642
|
-
if (
|
|
845
|
+
if (BUILD13.hydrateClientSide && styleContainerShadowRoot.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
643
846
|
styleElm.innerHTML = style;
|
|
644
847
|
} else {
|
|
645
848
|
styleElm = doc.createElement("style");
|
|
@@ -648,7 +851,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
648
851
|
if (nonce != null) {
|
|
649
852
|
styleElm.setAttribute("nonce", nonce);
|
|
650
853
|
}
|
|
651
|
-
if (
|
|
854
|
+
if (BUILD13.hydrateServerSide || BUILD13.hotModuleReplacement) {
|
|
652
855
|
styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
|
|
653
856
|
}
|
|
654
857
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
|
|
@@ -660,8 +863,8 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
660
863
|
appliedStyles.add(scopeId2);
|
|
661
864
|
}
|
|
662
865
|
}
|
|
663
|
-
} else if (
|
|
664
|
-
|
|
866
|
+
} else if (BUILD13.constructableCSS && !styleContainerDocument.adoptedStyleSheets.includes(style)) {
|
|
867
|
+
styleContainerDocument.adoptedStyleSheets = [...styleContainerDocument.adoptedStyleSheets, style];
|
|
665
868
|
}
|
|
666
869
|
}
|
|
667
870
|
return scopeId2;
|
|
@@ -672,45 +875,45 @@ var attachStyles = (hostRef) => {
|
|
|
672
875
|
const flags = cmpMeta.$flags$;
|
|
673
876
|
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
674
877
|
const scopeId2 = addStyle(
|
|
675
|
-
|
|
878
|
+
BUILD13.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
676
879
|
cmpMeta,
|
|
677
880
|
hostRef.$modeName$
|
|
678
881
|
);
|
|
679
|
-
if ((
|
|
882
|
+
if ((BUILD13.shadowDom || BUILD13.scoped) && BUILD13.cssAnnotations && flags & 10 /* needsScopedEncapsulation */) {
|
|
680
883
|
elm["s-sc"] = scopeId2;
|
|
681
884
|
elm.classList.add(scopeId2 + "-h");
|
|
682
|
-
if (
|
|
885
|
+
if (BUILD13.scoped && flags & 2 /* scopedCssEncapsulation */) {
|
|
683
886
|
elm.classList.add(scopeId2 + "-s");
|
|
684
887
|
}
|
|
685
888
|
}
|
|
686
889
|
endAttachStyles();
|
|
687
890
|
};
|
|
688
|
-
var getScopeId = (cmp, mode) => "sc-" + (
|
|
891
|
+
var getScopeId = (cmp, mode) => "sc-" + (BUILD13.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
|
|
689
892
|
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
690
893
|
|
|
691
894
|
// src/runtime/vdom/vdom-render.ts
|
|
692
|
-
import { BUILD as
|
|
895
|
+
import { BUILD as BUILD16 } from "@rindo/core/internal/app-data";
|
|
693
896
|
|
|
694
897
|
// src/runtime/vdom/update-element.ts
|
|
695
|
-
import { BUILD as
|
|
898
|
+
import { BUILD as BUILD15 } from "@rindo/core/internal/app-data";
|
|
696
899
|
|
|
697
900
|
// src/runtime/vdom/set-accessor.ts
|
|
698
|
-
import { BUILD as
|
|
901
|
+
import { BUILD as BUILD14 } from "@rindo/core/internal/app-data";
|
|
699
902
|
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
700
903
|
if (oldValue !== newValue) {
|
|
701
904
|
let isProp = isMemberInElement(elm, memberName);
|
|
702
905
|
let ln = memberName.toLowerCase();
|
|
703
|
-
if (
|
|
906
|
+
if (BUILD14.vdomClass && memberName === "class") {
|
|
704
907
|
const classList = elm.classList;
|
|
705
908
|
const oldClasses = parseClassList(oldValue);
|
|
706
909
|
const newClasses = parseClassList(newValue);
|
|
707
910
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
708
911
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
709
|
-
} else if (
|
|
710
|
-
if (
|
|
912
|
+
} else if (BUILD14.vdomStyle && memberName === "style") {
|
|
913
|
+
if (BUILD14.updatable) {
|
|
711
914
|
for (const prop in oldValue) {
|
|
712
915
|
if (!newValue || newValue[prop] == null) {
|
|
713
|
-
if (!
|
|
916
|
+
if (!BUILD14.hydrateServerSide && prop.includes("-")) {
|
|
714
917
|
elm.style.removeProperty(prop);
|
|
715
918
|
} else {
|
|
716
919
|
elm.style[prop] = "";
|
|
@@ -720,19 +923,19 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
720
923
|
}
|
|
721
924
|
for (const prop in newValue) {
|
|
722
925
|
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
723
|
-
if (!
|
|
926
|
+
if (!BUILD14.hydrateServerSide && prop.includes("-")) {
|
|
724
927
|
elm.style.setProperty(prop, newValue[prop]);
|
|
725
928
|
} else {
|
|
726
929
|
elm.style[prop] = newValue[prop];
|
|
727
930
|
}
|
|
728
931
|
}
|
|
729
932
|
}
|
|
730
|
-
} else if (
|
|
731
|
-
} else if (
|
|
933
|
+
} else if (BUILD14.vdomKey && memberName === "key") {
|
|
934
|
+
} else if (BUILD14.vdomRef && memberName === "ref") {
|
|
732
935
|
if (newValue) {
|
|
733
936
|
newValue(elm);
|
|
734
937
|
}
|
|
735
|
-
} else if (
|
|
938
|
+
} else if (BUILD14.vdomListener && (BUILD14.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
|
|
736
939
|
if (memberName[2] === "-") {
|
|
737
940
|
memberName = memberName.slice(3);
|
|
738
941
|
} else if (isMemberInElement(win, ln)) {
|
|
@@ -750,7 +953,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
750
953
|
plt.ael(elm, memberName, newValue, capture);
|
|
751
954
|
}
|
|
752
955
|
}
|
|
753
|
-
} else if (
|
|
956
|
+
} else if (BUILD14.vdomPropOrAttr) {
|
|
754
957
|
const isComplex = isComplexType(newValue);
|
|
755
958
|
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
756
959
|
try {
|
|
@@ -768,7 +971,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
768
971
|
}
|
|
769
972
|
}
|
|
770
973
|
let xlink = false;
|
|
771
|
-
if (
|
|
974
|
+
if (BUILD14.vdomXlink) {
|
|
772
975
|
if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
|
|
773
976
|
memberName = ln;
|
|
774
977
|
xlink = true;
|
|
@@ -776,7 +979,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
776
979
|
}
|
|
777
980
|
if (newValue == null || newValue === false) {
|
|
778
981
|
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
779
|
-
if (
|
|
982
|
+
if (BUILD14.vdomXlink && xlink) {
|
|
780
983
|
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
781
984
|
} else {
|
|
782
985
|
elm.removeAttribute(memberName);
|
|
@@ -784,7 +987,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
784
987
|
}
|
|
785
988
|
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
786
989
|
newValue = newValue === true ? "" : newValue;
|
|
787
|
-
if (
|
|
990
|
+
if (BUILD14.vdomXlink && xlink) {
|
|
788
991
|
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
789
992
|
} else {
|
|
790
993
|
elm.setAttribute(memberName, newValue);
|
|
@@ -803,7 +1006,7 @@ var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
|
803
1006
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
804
1007
|
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
805
1008
|
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
806
|
-
if (
|
|
1009
|
+
if (BUILD15.updatable) {
|
|
807
1010
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
808
1011
|
if (!(memberName in newVnodeAttrs)) {
|
|
809
1012
|
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
@@ -839,7 +1042,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
839
1042
|
let elm;
|
|
840
1043
|
let childNode;
|
|
841
1044
|
let oldVNode;
|
|
842
|
-
if (
|
|
1045
|
+
if (BUILD16.slotRelocation && !useNativeShadowDom) {
|
|
843
1046
|
checkSlotRelocate = true;
|
|
844
1047
|
if (newVNode2.$tag$ === "slot") {
|
|
845
1048
|
if (scopeId) {
|
|
@@ -857,35 +1060,35 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
857
1060
|
);
|
|
858
1061
|
}
|
|
859
1062
|
}
|
|
860
|
-
if (
|
|
1063
|
+
if (BUILD16.isDev && newVNode2.$elm$) {
|
|
861
1064
|
consoleDevError(
|
|
862
1065
|
`The JSX ${newVNode2.$text$ !== null ? `"${newVNode2.$text$}" text` : `"${newVNode2.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://rindojs.web.app/docs/templating-jsx#avoid-shared-jsx-nodes`
|
|
863
1066
|
);
|
|
864
1067
|
}
|
|
865
|
-
if (
|
|
1068
|
+
if (BUILD16.vdomText && newVNode2.$text$ !== null) {
|
|
866
1069
|
elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
|
|
867
|
-
} else if (
|
|
868
|
-
elm = newVNode2.$elm$ =
|
|
1070
|
+
} else if (BUILD16.slotRelocation && newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
1071
|
+
elm = newVNode2.$elm$ = BUILD16.isDebug || BUILD16.hydrateServerSide ? slotReferenceDebugNode(newVNode2) : doc.createTextNode("");
|
|
869
1072
|
} else {
|
|
870
|
-
if (
|
|
1073
|
+
if (BUILD16.svg && !isSvgMode) {
|
|
871
1074
|
isSvgMode = newVNode2.$tag$ === "svg";
|
|
872
1075
|
}
|
|
873
|
-
elm = newVNode2.$elm$ =
|
|
1076
|
+
elm = newVNode2.$elm$ = BUILD16.svg ? doc.createElementNS(
|
|
874
1077
|
isSvgMode ? SVG_NS : HTML_NS,
|
|
875
|
-
|
|
1078
|
+
!useNativeShadowDom && BUILD16.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
876
1079
|
) : doc.createElement(
|
|
877
|
-
|
|
1080
|
+
!useNativeShadowDom && BUILD16.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
878
1081
|
);
|
|
879
|
-
if (
|
|
1082
|
+
if (BUILD16.svg && isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
|
880
1083
|
isSvgMode = false;
|
|
881
1084
|
}
|
|
882
|
-
if (
|
|
1085
|
+
if (BUILD16.vdomAttribute) {
|
|
883
1086
|
updateElement(null, newVNode2, isSvgMode);
|
|
884
1087
|
}
|
|
885
|
-
if ((
|
|
1088
|
+
if ((BUILD16.shadowDom || BUILD16.scoped) && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
886
1089
|
elm.classList.add(elm["s-si"] = scopeId);
|
|
887
1090
|
}
|
|
888
|
-
if (
|
|
1091
|
+
if (BUILD16.scoped) {
|
|
889
1092
|
updateElementScopeIds(elm, parentElm);
|
|
890
1093
|
}
|
|
891
1094
|
if (newVNode2.$children$) {
|
|
@@ -896,7 +1099,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
896
1099
|
}
|
|
897
1100
|
}
|
|
898
1101
|
}
|
|
899
|
-
if (
|
|
1102
|
+
if (BUILD16.svg) {
|
|
900
1103
|
if (newVNode2.$tag$ === "svg") {
|
|
901
1104
|
isSvgMode = false;
|
|
902
1105
|
} else if (elm.tagName === "foreignObject") {
|
|
@@ -905,7 +1108,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
905
1108
|
}
|
|
906
1109
|
}
|
|
907
1110
|
elm["s-hn"] = hostTagName;
|
|
908
|
-
if (
|
|
1111
|
+
if (BUILD16.slotRelocation) {
|
|
909
1112
|
if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
910
1113
|
elm["s-sr"] = true;
|
|
911
1114
|
elm["s-cr"] = contentRef;
|
|
@@ -913,7 +1116,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
913
1116
|
elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
|
|
914
1117
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
915
1118
|
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
916
|
-
if (
|
|
1119
|
+
if (BUILD16.experimentalSlotFixes) {
|
|
917
1120
|
relocateToHostRoot(oldParentVNode.$elm$);
|
|
918
1121
|
} else {
|
|
919
1122
|
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
@@ -942,7 +1145,7 @@ var relocateToHostRoot = (parentElm) => {
|
|
|
942
1145
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
943
1146
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
944
1147
|
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
945
|
-
if (parentElm["s-sr"] &&
|
|
1148
|
+
if (parentElm["s-sr"] && BUILD16.experimentalSlotFixes) {
|
|
946
1149
|
let node = parentElm;
|
|
947
1150
|
while (node = node.nextSibling) {
|
|
948
1151
|
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
@@ -966,9 +1169,9 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
966
1169
|
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
967
1170
|
};
|
|
968
1171
|
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
969
|
-
let containerElm =
|
|
1172
|
+
let containerElm = BUILD16.slotRelocation && parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
|
|
970
1173
|
let childNode;
|
|
971
|
-
if (
|
|
1174
|
+
if (BUILD16.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
972
1175
|
containerElm = containerElm.shadowRoot;
|
|
973
1176
|
}
|
|
974
1177
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
@@ -976,7 +1179,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
976
1179
|
childNode = createElm(null, parentVNode, startIdx, parentElm);
|
|
977
1180
|
if (childNode) {
|
|
978
1181
|
vnodes[startIdx].$elm$ = childNode;
|
|
979
|
-
insertBefore(containerElm, childNode,
|
|
1182
|
+
insertBefore(containerElm, childNode, BUILD16.slotRelocation ? referenceNode(before) : before);
|
|
980
1183
|
}
|
|
981
1184
|
}
|
|
982
1185
|
}
|
|
@@ -988,7 +1191,7 @@ var removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
|
988
1191
|
const elm = vnode.$elm$;
|
|
989
1192
|
nullifyVNodeRefs(vnode);
|
|
990
1193
|
if (elm) {
|
|
991
|
-
if (
|
|
1194
|
+
if (BUILD16.slotRelocation) {
|
|
992
1195
|
checkSlotFallbackVisibility = true;
|
|
993
1196
|
if (elm["s-ol"]) {
|
|
994
1197
|
elm["s-ol"].remove();
|
|
@@ -1032,7 +1235,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1032
1235
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
1033
1236
|
newEndVnode = newCh[--newEndIdx];
|
|
1034
1237
|
} else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
1035
|
-
if (
|
|
1238
|
+
if (BUILD16.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
1036
1239
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
1037
1240
|
}
|
|
1038
1241
|
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
@@ -1040,7 +1243,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1040
1243
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
1041
1244
|
newEndVnode = newCh[--newEndIdx];
|
|
1042
1245
|
} else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
1043
|
-
if (
|
|
1246
|
+
if (BUILD16.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
1044
1247
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
1045
1248
|
}
|
|
1046
1249
|
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
@@ -1049,7 +1252,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1049
1252
|
newStartVnode = newCh[++newStartIdx];
|
|
1050
1253
|
} else {
|
|
1051
1254
|
idxInOld = -1;
|
|
1052
|
-
if (
|
|
1255
|
+
if (BUILD16.vdomKey) {
|
|
1053
1256
|
for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
|
|
1054
1257
|
if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
|
|
1055
1258
|
idxInOld = i2;
|
|
@@ -1057,7 +1260,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1057
1260
|
}
|
|
1058
1261
|
}
|
|
1059
1262
|
}
|
|
1060
|
-
if (
|
|
1263
|
+
if (BUILD16.vdomKey && idxInOld >= 0) {
|
|
1061
1264
|
elmToMove = oldCh[idxInOld];
|
|
1062
1265
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
1063
1266
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
|
|
@@ -1072,7 +1275,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1072
1275
|
newStartVnode = newCh[++newStartIdx];
|
|
1073
1276
|
}
|
|
1074
1277
|
if (node) {
|
|
1075
|
-
if (
|
|
1278
|
+
if (BUILD16.slotRelocation) {
|
|
1076
1279
|
insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
|
|
1077
1280
|
} else {
|
|
1078
1281
|
insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
|
|
@@ -1089,16 +1292,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1089
1292
|
newStartIdx,
|
|
1090
1293
|
newEndIdx
|
|
1091
1294
|
);
|
|
1092
|
-
} else if (
|
|
1295
|
+
} else if (BUILD16.updatable && newStartIdx > newEndIdx) {
|
|
1093
1296
|
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
1094
1297
|
}
|
|
1095
1298
|
};
|
|
1096
1299
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
1097
1300
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
1098
|
-
if (
|
|
1301
|
+
if (BUILD16.slotRelocation && leftVNode.$tag$ === "slot") {
|
|
1099
1302
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
1100
1303
|
}
|
|
1101
|
-
if (
|
|
1304
|
+
if (BUILD16.vdomKey && !isInitialRender) {
|
|
1102
1305
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
1103
1306
|
}
|
|
1104
1307
|
return true;
|
|
@@ -1116,13 +1319,13 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
1116
1319
|
const tag = newVNode2.$tag$;
|
|
1117
1320
|
const text = newVNode2.$text$;
|
|
1118
1321
|
let defaultHolder;
|
|
1119
|
-
if (!
|
|
1120
|
-
if (
|
|
1322
|
+
if (!BUILD16.vdomText || text === null) {
|
|
1323
|
+
if (BUILD16.svg) {
|
|
1121
1324
|
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
1122
1325
|
}
|
|
1123
|
-
if (
|
|
1124
|
-
if (
|
|
1125
|
-
if (
|
|
1326
|
+
if (BUILD16.vdomAttribute || BUILD16.reflect) {
|
|
1327
|
+
if (BUILD16.slot && tag === "slot" && !useNativeShadowDom) {
|
|
1328
|
+
if (BUILD16.experimentalSlotFixes && oldVNode.$name$ !== newVNode2.$name$) {
|
|
1126
1329
|
newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
|
|
1127
1330
|
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
1128
1331
|
}
|
|
@@ -1130,22 +1333,22 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
1130
1333
|
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
1131
1334
|
}
|
|
1132
1335
|
}
|
|
1133
|
-
if (
|
|
1336
|
+
if (BUILD16.updatable && oldChildren !== null && newChildren !== null) {
|
|
1134
1337
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
1135
1338
|
} else if (newChildren !== null) {
|
|
1136
|
-
if (
|
|
1339
|
+
if (BUILD16.updatable && BUILD16.vdomText && oldVNode.$text$ !== null) {
|
|
1137
1340
|
elm.textContent = "";
|
|
1138
1341
|
}
|
|
1139
1342
|
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
1140
|
-
} else if (
|
|
1343
|
+
} else if (BUILD16.updatable && oldChildren !== null) {
|
|
1141
1344
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
1142
1345
|
}
|
|
1143
|
-
if (
|
|
1346
|
+
if (BUILD16.svg && isSvgMode && tag === "svg") {
|
|
1144
1347
|
isSvgMode = false;
|
|
1145
1348
|
}
|
|
1146
|
-
} else if (
|
|
1349
|
+
} else if (BUILD16.vdomText && BUILD16.slotRelocation && (defaultHolder = elm["s-cr"])) {
|
|
1147
1350
|
defaultHolder.parentNode.textContent = text;
|
|
1148
|
-
} else if (
|
|
1351
|
+
} else if (BUILD16.vdomText && oldVNode.$text$ !== text) {
|
|
1149
1352
|
elm.data = text;
|
|
1150
1353
|
}
|
|
1151
1354
|
};
|
|
@@ -1187,7 +1390,7 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
1187
1390
|
const slotName = childNode["s-sn"];
|
|
1188
1391
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
1189
1392
|
node = hostContentNodes[j];
|
|
1190
|
-
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!
|
|
1393
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!BUILD16.experimentalSlotFixes || !node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
|
|
1191
1394
|
if (isNodeLocatedInSlot(node, slotName)) {
|
|
1192
1395
|
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1193
1396
|
checkSlotFallbackVisibility = true;
|
|
@@ -1241,14 +1444,14 @@ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
|
1241
1444
|
return slotName === "";
|
|
1242
1445
|
};
|
|
1243
1446
|
var nullifyVNodeRefs = (vNode) => {
|
|
1244
|
-
if (
|
|
1447
|
+
if (BUILD16.vdomRef) {
|
|
1245
1448
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
1246
1449
|
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
1247
1450
|
}
|
|
1248
1451
|
};
|
|
1249
1452
|
var insertBefore = (parent, newNode, reference) => {
|
|
1250
1453
|
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1251
|
-
if (
|
|
1454
|
+
if (BUILD16.scoped) {
|
|
1252
1455
|
updateElementScopeIds(newNode, parent);
|
|
1253
1456
|
}
|
|
1254
1457
|
return inserted;
|
|
@@ -1286,7 +1489,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1286
1489
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1287
1490
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
1288
1491
|
hostTagName = hostElm.tagName;
|
|
1289
|
-
if (
|
|
1492
|
+
if (BUILD16.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
|
|
1290
1493
|
throw new Error(`The <Host> must be the single root component.
|
|
1291
1494
|
Looks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.
|
|
1292
1495
|
|
|
@@ -1300,7 +1503,7 @@ render() {
|
|
|
1300
1503
|
}
|
|
1301
1504
|
`);
|
|
1302
1505
|
}
|
|
1303
|
-
if (
|
|
1506
|
+
if (BUILD16.reflect && cmpMeta.$attrsToReflect$) {
|
|
1304
1507
|
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
1305
1508
|
cmpMeta.$attrsToReflect$.map(
|
|
1306
1509
|
([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
|
|
@@ -1316,24 +1519,24 @@ render() {
|
|
|
1316
1519
|
rootVnode.$tag$ = null;
|
|
1317
1520
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1318
1521
|
hostRef.$vnode$ = rootVnode;
|
|
1319
|
-
rootVnode.$elm$ = oldVNode.$elm$ =
|
|
1320
|
-
if (
|
|
1522
|
+
rootVnode.$elm$ = oldVNode.$elm$ = BUILD16.shadowDom ? hostElm.shadowRoot || hostElm : hostElm;
|
|
1523
|
+
if (BUILD16.scoped || BUILD16.shadowDom) {
|
|
1321
1524
|
scopeId = hostElm["s-sc"];
|
|
1322
1525
|
}
|
|
1323
1526
|
useNativeShadowDom = supportsShadow && (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1324
|
-
if (
|
|
1527
|
+
if (BUILD16.slotRelocation) {
|
|
1325
1528
|
contentRef = hostElm["s-cr"];
|
|
1326
1529
|
checkSlotFallbackVisibility = false;
|
|
1327
1530
|
}
|
|
1328
1531
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
1329
|
-
if (
|
|
1532
|
+
if (BUILD16.slotRelocation) {
|
|
1330
1533
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1331
1534
|
if (checkSlotRelocate) {
|
|
1332
1535
|
markSlotContentForRelocation(rootVnode.$elm$);
|
|
1333
1536
|
for (const relocateData of relocateNodes) {
|
|
1334
1537
|
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1335
1538
|
if (!nodeToRelocate["s-ol"]) {
|
|
1336
|
-
const orgLocationNode =
|
|
1539
|
+
const orgLocationNode = BUILD16.isDebug || BUILD16.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : doc.createTextNode("");
|
|
1337
1540
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
1338
1541
|
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
1339
1542
|
}
|
|
@@ -1344,7 +1547,7 @@ render() {
|
|
|
1344
1547
|
if (slotRefNode) {
|
|
1345
1548
|
const parentNodeRef = slotRefNode.parentNode;
|
|
1346
1549
|
let insertBeforeNode = slotRefNode.nextSibling;
|
|
1347
|
-
if (!
|
|
1550
|
+
if (!BUILD16.experimentalSlotFixes || insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
|
|
1348
1551
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1349
1552
|
while (orgLocationNode) {
|
|
1350
1553
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
@@ -1363,7 +1566,7 @@ render() {
|
|
|
1363
1566
|
}
|
|
1364
1567
|
if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
|
|
1365
1568
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1366
|
-
if (!
|
|
1569
|
+
if (!BUILD16.experimentalSlotFixes && !nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1367
1570
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1368
1571
|
}
|
|
1369
1572
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
@@ -1389,7 +1592,7 @@ render() {
|
|
|
1389
1592
|
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1390
1593
|
relocateNodes.length = 0;
|
|
1391
1594
|
}
|
|
1392
|
-
if (
|
|
1595
|
+
if (BUILD16.experimentalScopedSlotChanges && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
1393
1596
|
for (const childNode of rootVnode.$elm$.childNodes) {
|
|
1394
1597
|
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
1395
1598
|
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
@@ -1410,26 +1613,26 @@ var originalLocationDebugNode = (nodeToRelocate) => doc.createComment(
|
|
|
1410
1613
|
|
|
1411
1614
|
// src/runtime/update-component.ts
|
|
1412
1615
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1413
|
-
if (
|
|
1616
|
+
if (BUILD17.asyncLoading && ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1414
1617
|
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
1415
1618
|
}
|
|
1416
1619
|
};
|
|
1417
1620
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
1418
|
-
if (
|
|
1621
|
+
if (BUILD17.taskQueue && BUILD17.updatable) {
|
|
1419
1622
|
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
1420
1623
|
}
|
|
1421
|
-
if (
|
|
1624
|
+
if (BUILD17.asyncLoading && hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
1422
1625
|
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
1423
1626
|
return;
|
|
1424
1627
|
}
|
|
1425
1628
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
1426
1629
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
1427
|
-
return
|
|
1630
|
+
return BUILD17.taskQueue ? writeTask(dispatch) : dispatch();
|
|
1428
1631
|
};
|
|
1429
1632
|
var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
1430
1633
|
const elm = hostRef.$hostElement$;
|
|
1431
1634
|
const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
|
|
1432
|
-
const instance =
|
|
1635
|
+
const instance = BUILD17.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
1433
1636
|
if (!instance) {
|
|
1434
1637
|
throw new Error(
|
|
1435
1638
|
`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`
|
|
@@ -1437,7 +1640,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1437
1640
|
}
|
|
1438
1641
|
let maybePromise;
|
|
1439
1642
|
if (isInitialLoad) {
|
|
1440
|
-
if (
|
|
1643
|
+
if (BUILD17.lazyLoad && BUILD17.hostListener) {
|
|
1441
1644
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1442
1645
|
if (hostRef.$queuedListeners$) {
|
|
1443
1646
|
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
@@ -1445,46 +1648,49 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1445
1648
|
}
|
|
1446
1649
|
}
|
|
1447
1650
|
emitLifecycleEvent(elm, "componentWillLoad");
|
|
1448
|
-
if (
|
|
1651
|
+
if (BUILD17.cmpWillLoad) {
|
|
1449
1652
|
maybePromise = safeCall(instance, "componentWillLoad");
|
|
1450
1653
|
}
|
|
1451
1654
|
} else {
|
|
1452
1655
|
emitLifecycleEvent(elm, "componentWillUpdate");
|
|
1453
|
-
if (
|
|
1656
|
+
if (BUILD17.cmpWillUpdate) {
|
|
1454
1657
|
maybePromise = safeCall(instance, "componentWillUpdate");
|
|
1455
1658
|
}
|
|
1456
1659
|
}
|
|
1457
1660
|
emitLifecycleEvent(elm, "componentWillRender");
|
|
1458
|
-
if (
|
|
1661
|
+
if (BUILD17.cmpWillRender) {
|
|
1459
1662
|
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
|
|
1460
1663
|
}
|
|
1461
1664
|
endSchedule();
|
|
1462
1665
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
1463
1666
|
};
|
|
1464
|
-
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn)
|
|
1667
|
+
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
|
|
1668
|
+
console.error(err2);
|
|
1669
|
+
fn();
|
|
1670
|
+
}) : fn();
|
|
1465
1671
|
var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
|
|
1466
1672
|
var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
1467
1673
|
var _a;
|
|
1468
1674
|
const elm = hostRef.$hostElement$;
|
|
1469
1675
|
const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
|
|
1470
1676
|
const rc = elm["s-rc"];
|
|
1471
|
-
if (
|
|
1677
|
+
if (BUILD17.style && isInitialLoad) {
|
|
1472
1678
|
attachStyles(hostRef);
|
|
1473
1679
|
}
|
|
1474
1680
|
const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
|
|
1475
|
-
if (
|
|
1681
|
+
if (BUILD17.isDev) {
|
|
1476
1682
|
hostRef.$flags$ |= 1024 /* devOnRender */;
|
|
1477
1683
|
}
|
|
1478
|
-
if (
|
|
1684
|
+
if (BUILD17.hydrateServerSide) {
|
|
1479
1685
|
await callRender(hostRef, instance, elm, isInitialLoad);
|
|
1480
1686
|
} else {
|
|
1481
1687
|
callRender(hostRef, instance, elm, isInitialLoad);
|
|
1482
1688
|
}
|
|
1483
|
-
if (
|
|
1689
|
+
if (BUILD17.isDev) {
|
|
1484
1690
|
hostRef.$renderCount$ = hostRef.$renderCount$ === void 0 ? 1 : hostRef.$renderCount$ + 1;
|
|
1485
1691
|
hostRef.$flags$ &= ~1024 /* devOnRender */;
|
|
1486
1692
|
}
|
|
1487
|
-
if (
|
|
1693
|
+
if (BUILD17.hydrateServerSide) {
|
|
1488
1694
|
try {
|
|
1489
1695
|
serverSideConnected(elm);
|
|
1490
1696
|
if (isInitialLoad) {
|
|
@@ -1498,13 +1704,13 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1498
1704
|
consoleError(e, elm);
|
|
1499
1705
|
}
|
|
1500
1706
|
}
|
|
1501
|
-
if (
|
|
1707
|
+
if (BUILD17.asyncLoading && rc) {
|
|
1502
1708
|
rc.map((cb) => cb());
|
|
1503
1709
|
elm["s-rc"] = void 0;
|
|
1504
1710
|
}
|
|
1505
1711
|
endRender();
|
|
1506
1712
|
endUpdate();
|
|
1507
|
-
if (
|
|
1713
|
+
if (BUILD17.asyncLoading) {
|
|
1508
1714
|
const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
|
|
1509
1715
|
const postUpdate = () => postUpdateComponent(hostRef);
|
|
1510
1716
|
if (childrenPromises.length === 0) {
|
|
@@ -1520,10 +1726,10 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1520
1726
|
};
|
|
1521
1727
|
var renderingRef = null;
|
|
1522
1728
|
var callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
1523
|
-
const allRenderFn =
|
|
1524
|
-
const lazyLoad =
|
|
1525
|
-
const taskQueue =
|
|
1526
|
-
const updatable =
|
|
1729
|
+
const allRenderFn = BUILD17.allRenderFn ? true : false;
|
|
1730
|
+
const lazyLoad = BUILD17.lazyLoad ? true : false;
|
|
1731
|
+
const taskQueue = BUILD17.taskQueue ? true : false;
|
|
1732
|
+
const updatable = BUILD17.updatable ? true : false;
|
|
1527
1733
|
try {
|
|
1528
1734
|
renderingRef = instance;
|
|
1529
1735
|
instance = allRenderFn ? instance.render() : instance.render && instance.render();
|
|
@@ -1533,9 +1739,9 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
|
1533
1739
|
if (updatable || lazyLoad) {
|
|
1534
1740
|
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
1535
1741
|
}
|
|
1536
|
-
if (
|
|
1537
|
-
if (
|
|
1538
|
-
if (
|
|
1742
|
+
if (BUILD17.hasRenderFn || BUILD17.reflect) {
|
|
1743
|
+
if (BUILD17.vdomRender || BUILD17.reflect) {
|
|
1744
|
+
if (BUILD17.hydrateServerSide) {
|
|
1539
1745
|
return Promise.resolve(instance).then((value) => renderVdom(hostRef, value, isInitialLoad));
|
|
1540
1746
|
} else {
|
|
1541
1747
|
renderVdom(hostRef, instance, isInitialLoad);
|
|
@@ -1560,57 +1766,57 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1560
1766
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
1561
1767
|
const elm = hostRef.$hostElement$;
|
|
1562
1768
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
1563
|
-
const instance =
|
|
1769
|
+
const instance = BUILD17.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
1564
1770
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1565
|
-
if (
|
|
1566
|
-
if (
|
|
1771
|
+
if (BUILD17.cmpDidRender) {
|
|
1772
|
+
if (BUILD17.isDev) {
|
|
1567
1773
|
hostRef.$flags$ |= 1024 /* devOnRender */;
|
|
1568
1774
|
}
|
|
1569
1775
|
safeCall(instance, "componentDidRender");
|
|
1570
|
-
if (
|
|
1776
|
+
if (BUILD17.isDev) {
|
|
1571
1777
|
hostRef.$flags$ &= ~1024 /* devOnRender */;
|
|
1572
1778
|
}
|
|
1573
1779
|
}
|
|
1574
1780
|
emitLifecycleEvent(elm, "componentDidRender");
|
|
1575
1781
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1576
1782
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1577
|
-
if (
|
|
1783
|
+
if (BUILD17.asyncLoading && BUILD17.cssAnnotations) {
|
|
1578
1784
|
addHydratedFlag(elm);
|
|
1579
1785
|
}
|
|
1580
|
-
if (
|
|
1581
|
-
if (
|
|
1786
|
+
if (BUILD17.cmpDidLoad) {
|
|
1787
|
+
if (BUILD17.isDev) {
|
|
1582
1788
|
hostRef.$flags$ |= 2048 /* devOnDidLoad */;
|
|
1583
1789
|
}
|
|
1584
1790
|
safeCall(instance, "componentDidLoad");
|
|
1585
|
-
if (
|
|
1791
|
+
if (BUILD17.isDev) {
|
|
1586
1792
|
hostRef.$flags$ &= ~2048 /* devOnDidLoad */;
|
|
1587
1793
|
}
|
|
1588
1794
|
}
|
|
1589
1795
|
emitLifecycleEvent(elm, "componentDidLoad");
|
|
1590
1796
|
endPostUpdate();
|
|
1591
|
-
if (
|
|
1797
|
+
if (BUILD17.asyncLoading) {
|
|
1592
1798
|
hostRef.$onReadyResolve$(elm);
|
|
1593
1799
|
if (!ancestorComponent) {
|
|
1594
1800
|
appDidLoad(tagName);
|
|
1595
1801
|
}
|
|
1596
1802
|
}
|
|
1597
1803
|
} else {
|
|
1598
|
-
if (
|
|
1599
|
-
if (
|
|
1804
|
+
if (BUILD17.cmpDidUpdate) {
|
|
1805
|
+
if (BUILD17.isDev) {
|
|
1600
1806
|
hostRef.$flags$ |= 1024 /* devOnRender */;
|
|
1601
1807
|
}
|
|
1602
1808
|
safeCall(instance, "componentDidUpdate");
|
|
1603
|
-
if (
|
|
1809
|
+
if (BUILD17.isDev) {
|
|
1604
1810
|
hostRef.$flags$ &= ~1024 /* devOnRender */;
|
|
1605
1811
|
}
|
|
1606
1812
|
}
|
|
1607
1813
|
emitLifecycleEvent(elm, "componentDidUpdate");
|
|
1608
1814
|
endPostUpdate();
|
|
1609
1815
|
}
|
|
1610
|
-
if (
|
|
1816
|
+
if (BUILD17.method && BUILD17.lazyLoad) {
|
|
1611
1817
|
hostRef.$onInstanceResolve$(elm);
|
|
1612
1818
|
}
|
|
1613
|
-
if (
|
|
1819
|
+
if (BUILD17.asyncLoading) {
|
|
1614
1820
|
if (hostRef.$onRenderResolve$) {
|
|
1615
1821
|
hostRef.$onRenderResolve$();
|
|
1616
1822
|
hostRef.$onRenderResolve$ = void 0;
|
|
@@ -1622,7 +1828,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1622
1828
|
}
|
|
1623
1829
|
};
|
|
1624
1830
|
var forceUpdate = (ref) => {
|
|
1625
|
-
if (
|
|
1831
|
+
if (BUILD17.updatable && (Build.isBrowser || Build.isTesting)) {
|
|
1626
1832
|
const hostRef = getHostRef(ref);
|
|
1627
1833
|
const isConnected = hostRef.$hostElement$.isConnected;
|
|
1628
1834
|
if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
@@ -1633,14 +1839,14 @@ var forceUpdate = (ref) => {
|
|
|
1633
1839
|
return false;
|
|
1634
1840
|
};
|
|
1635
1841
|
var appDidLoad = (who) => {
|
|
1636
|
-
if (
|
|
1842
|
+
if (BUILD17.cssAnnotations) {
|
|
1637
1843
|
addHydratedFlag(doc.documentElement);
|
|
1638
1844
|
}
|
|
1639
|
-
if (
|
|
1845
|
+
if (BUILD17.asyncQueue) {
|
|
1640
1846
|
plt.$flags$ |= 2 /* appLoaded */;
|
|
1641
1847
|
}
|
|
1642
1848
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1643
|
-
if (
|
|
1849
|
+
if (BUILD17.profile && performance.measure) {
|
|
1644
1850
|
performance.measure(`[Rindo] ${NAMESPACE} initial load (by ${who})`, "st:app:start");
|
|
1645
1851
|
}
|
|
1646
1852
|
};
|
|
@@ -1655,7 +1861,7 @@ var safeCall = (instance, method, arg) => {
|
|
|
1655
1861
|
return void 0;
|
|
1656
1862
|
};
|
|
1657
1863
|
var emitLifecycleEvent = (elm, lifecycleName) => {
|
|
1658
|
-
if (
|
|
1864
|
+
if (BUILD17.lifecycleDOMEvents) {
|
|
1659
1865
|
emitEvent(elm, "rindo_" + lifecycleName, {
|
|
1660
1866
|
bubbles: true,
|
|
1661
1867
|
composed: true,
|
|
@@ -1667,7 +1873,7 @@ var emitLifecycleEvent = (elm, lifecycleName) => {
|
|
|
1667
1873
|
};
|
|
1668
1874
|
var addHydratedFlag = (elm) => {
|
|
1669
1875
|
var _a, _b;
|
|
1670
|
-
return
|
|
1876
|
+
return BUILD17.hydratedClass ? elm.classList.add((_a = BUILD17.hydratedSelectorName) != null ? _a : "hydrated") : BUILD17.hydratedAttribute ? elm.setAttribute((_b = BUILD17.hydratedSelectorName) != null ? _b : "hydrated", "") : void 0;
|
|
1671
1877
|
};
|
|
1672
1878
|
var serverSideConnected = (elm) => {
|
|
1673
1879
|
const children = elm.children;
|
|
@@ -1686,21 +1892,21 @@ var serverSideConnected = (elm) => {
|
|
|
1686
1892
|
var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
1687
1893
|
var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1688
1894
|
const hostRef = getHostRef(ref);
|
|
1689
|
-
if (
|
|
1895
|
+
if (BUILD18.lazyLoad && !hostRef) {
|
|
1690
1896
|
throw new Error(
|
|
1691
1897
|
`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.`
|
|
1692
1898
|
);
|
|
1693
1899
|
}
|
|
1694
|
-
const elm =
|
|
1900
|
+
const elm = BUILD18.lazyLoad ? hostRef.$hostElement$ : ref;
|
|
1695
1901
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
1696
1902
|
const flags = hostRef.$flags$;
|
|
1697
|
-
const instance =
|
|
1903
|
+
const instance = BUILD18.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
1698
1904
|
newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
|
|
1699
1905
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1700
1906
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1701
|
-
if ((!
|
|
1907
|
+
if ((!BUILD18.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
1702
1908
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
1703
|
-
if (
|
|
1909
|
+
if (BUILD18.isDev) {
|
|
1704
1910
|
if (hostRef.$flags$ & 1024 /* devOnRender */) {
|
|
1705
1911
|
consoleDevWarn(
|
|
1706
1912
|
`The state/prop "${propName}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`,
|
|
@@ -1723,8 +1929,8 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1723
1929
|
);
|
|
1724
1930
|
}
|
|
1725
1931
|
}
|
|
1726
|
-
if (!
|
|
1727
|
-
if (
|
|
1932
|
+
if (!BUILD18.lazyLoad || instance) {
|
|
1933
|
+
if (BUILD18.watchCallback && cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
1728
1934
|
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1729
1935
|
if (watchMethods) {
|
|
1730
1936
|
watchMethods.map((watchMethodName) => {
|
|
@@ -1736,8 +1942,8 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1736
1942
|
});
|
|
1737
1943
|
}
|
|
1738
1944
|
}
|
|
1739
|
-
if (
|
|
1740
|
-
if (
|
|
1945
|
+
if (BUILD18.updatable && (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1946
|
+
if (BUILD18.cmpShouldUpdate && instance.componentShouldUpdate) {
|
|
1741
1947
|
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
1742
1948
|
return;
|
|
1743
1949
|
}
|
|
@@ -1750,15 +1956,15 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1750
1956
|
|
|
1751
1957
|
// src/runtime/proxy-component.ts
|
|
1752
1958
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1753
|
-
var _a;
|
|
1959
|
+
var _a, _b;
|
|
1754
1960
|
const prototype = Cstr.prototype;
|
|
1755
|
-
if (
|
|
1961
|
+
if (BUILD19.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
|
|
1756
1962
|
FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach(
|
|
1757
1963
|
(cbName) => Object.defineProperty(prototype, cbName, {
|
|
1758
1964
|
value(...args) {
|
|
1759
1965
|
const hostRef = getHostRef(this);
|
|
1760
|
-
const elm =
|
|
1761
|
-
const instance =
|
|
1966
|
+
const elm = BUILD19.lazyLoad ? hostRef.$hostElement$ : this;
|
|
1967
|
+
const instance = BUILD19.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
1762
1968
|
if (!instance) {
|
|
1763
1969
|
hostRef.$onReadyPromise$.then((instance2) => {
|
|
1764
1970
|
const cb = instance2[cbName];
|
|
@@ -1772,19 +1978,19 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1772
1978
|
})
|
|
1773
1979
|
);
|
|
1774
1980
|
}
|
|
1775
|
-
if (
|
|
1776
|
-
if (
|
|
1981
|
+
if (BUILD19.member && cmpMeta.$members$ || BUILD19.watchCallback && (cmpMeta.$watchers$ || Cstr.watchers)) {
|
|
1982
|
+
if (BUILD19.watchCallback && Cstr.watchers && !cmpMeta.$watchers$) {
|
|
1777
1983
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1778
1984
|
}
|
|
1779
|
-
const members = Object.entries(cmpMeta.$members$);
|
|
1985
|
+
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1780
1986
|
members.map(([memberName, [memberFlags]]) => {
|
|
1781
|
-
if ((
|
|
1987
|
+
if ((BUILD19.prop || BUILD19.state) && (memberFlags & 31 /* Prop */ || (!BUILD19.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1782
1988
|
Object.defineProperty(prototype, memberName, {
|
|
1783
1989
|
get() {
|
|
1784
1990
|
return getValue(this, memberName);
|
|
1785
1991
|
},
|
|
1786
1992
|
set(newValue) {
|
|
1787
|
-
if (
|
|
1993
|
+
if (BUILD19.isDev) {
|
|
1788
1994
|
const ref = getHostRef(this);
|
|
1789
1995
|
if (
|
|
1790
1996
|
// we are proxying the instance (not element)
|
|
@@ -1804,7 +2010,7 @@ More information: https://rindojs.web.app/docs/properties#prop-mutability`
|
|
|
1804
2010
|
configurable: true,
|
|
1805
2011
|
enumerable: true
|
|
1806
2012
|
});
|
|
1807
|
-
} else if (
|
|
2013
|
+
} else if (BUILD19.lazyLoad && BUILD19.method && flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
1808
2014
|
Object.defineProperty(prototype, memberName, {
|
|
1809
2015
|
value(...args) {
|
|
1810
2016
|
var _a2;
|
|
@@ -1817,7 +2023,7 @@ More information: https://rindojs.web.app/docs/properties#prop-mutability`
|
|
|
1817
2023
|
});
|
|
1818
2024
|
}
|
|
1819
2025
|
});
|
|
1820
|
-
if (
|
|
2026
|
+
if (BUILD19.observeAttribute && (!BUILD19.lazyLoad || flags & 1 /* isElementConstructor */)) {
|
|
1821
2027
|
const attrNameToPropName = /* @__PURE__ */ new Map();
|
|
1822
2028
|
prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
|
|
1823
2029
|
plt.jmp(() => {
|
|
@@ -1832,8 +2038,8 @@ More information: https://rindojs.web.app/docs/properties#prop-mutability`
|
|
|
1832
2038
|
const hostRef = getHostRef(this);
|
|
1833
2039
|
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
|
1834
2040
|
if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
1835
|
-
const elm =
|
|
1836
|
-
const instance =
|
|
2041
|
+
const elm = BUILD19.lazyLoad ? hostRef.$hostElement$ : this;
|
|
2042
|
+
const instance = BUILD19.lazyLoad ? hostRef.$lazyInstance$ : elm;
|
|
1837
2043
|
const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
|
|
1838
2044
|
entry == null ? void 0 : entry.forEach((callbackName) => {
|
|
1839
2045
|
if (instance[callbackName] != null) {
|
|
@@ -1848,12 +2054,12 @@ More information: https://rindojs.web.app/docs/properties#prop-mutability`
|
|
|
1848
2054
|
};
|
|
1849
2055
|
Cstr.observedAttributes = Array.from(
|
|
1850
2056
|
/* @__PURE__ */ new Set([
|
|
1851
|
-
...Object.keys((
|
|
2057
|
+
...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
|
|
1852
2058
|
...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
|
|
1853
2059
|
var _a2;
|
|
1854
2060
|
const attrName = m[1] || propName;
|
|
1855
2061
|
attrNameToPropName.set(attrName, propName);
|
|
1856
|
-
if (
|
|
2062
|
+
if (BUILD19.reflect && m[0] & 512 /* ReflectAttr */) {
|
|
1857
2063
|
(_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
|
|
1858
2064
|
}
|
|
1859
2065
|
return attrName;
|
|
@@ -1871,7 +2077,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1871
2077
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1872
2078
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1873
2079
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1874
|
-
if ((
|
|
2080
|
+
if ((BUILD20.lazyLoad || BUILD20.hydrateClientSide) && bundleId) {
|
|
1875
2081
|
const CstrImport = loadModule(cmpMeta, hostRef, hmrVersionId);
|
|
1876
2082
|
if (CstrImport && "then" in CstrImport) {
|
|
1877
2083
|
const endLoad = uniqueTime(
|
|
@@ -1886,15 +2092,15 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1886
2092
|
if (!Cstr) {
|
|
1887
2093
|
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
1888
2094
|
}
|
|
1889
|
-
if (
|
|
1890
|
-
if (
|
|
2095
|
+
if (BUILD20.member && !Cstr.isProxied) {
|
|
2096
|
+
if (BUILD20.watchCallback) {
|
|
1891
2097
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1892
2098
|
}
|
|
1893
2099
|
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1894
2100
|
Cstr.isProxied = true;
|
|
1895
2101
|
}
|
|
1896
2102
|
const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
|
|
1897
|
-
if (
|
|
2103
|
+
if (BUILD20.member) {
|
|
1898
2104
|
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
1899
2105
|
}
|
|
1900
2106
|
try {
|
|
@@ -1902,10 +2108,10 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1902
2108
|
} catch (e) {
|
|
1903
2109
|
consoleError(e);
|
|
1904
2110
|
}
|
|
1905
|
-
if (
|
|
2111
|
+
if (BUILD20.member) {
|
|
1906
2112
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1907
2113
|
}
|
|
1908
|
-
if (
|
|
2114
|
+
if (BUILD20.watchCallback) {
|
|
1909
2115
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1910
2116
|
}
|
|
1911
2117
|
endNewInstance();
|
|
@@ -1915,22 +2121,24 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1915
2121
|
const cmpTag = elm.localName;
|
|
1916
2122
|
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1917
2123
|
}
|
|
1918
|
-
if (
|
|
1919
|
-
let style
|
|
1920
|
-
if (
|
|
2124
|
+
if (BUILD20.style && Cstr && Cstr.style) {
|
|
2125
|
+
let style;
|
|
2126
|
+
if (typeof Cstr.style === "string") {
|
|
2127
|
+
style = Cstr.style;
|
|
2128
|
+
} else if (BUILD20.mode && typeof Cstr.style !== "string") {
|
|
1921
2129
|
hostRef.$modeName$ = computeMode(elm);
|
|
1922
2130
|
if (hostRef.$modeName$) {
|
|
1923
|
-
style = style[hostRef.$modeName$];
|
|
2131
|
+
style = Cstr.style[hostRef.$modeName$];
|
|
1924
2132
|
}
|
|
1925
|
-
if (
|
|
2133
|
+
if (BUILD20.hydrateServerSide && hostRef.$modeName$) {
|
|
1926
2134
|
elm.setAttribute("s-mode", hostRef.$modeName$);
|
|
1927
2135
|
}
|
|
1928
2136
|
}
|
|
1929
2137
|
const scopeId2 = getScopeId(cmpMeta, hostRef.$modeName$);
|
|
1930
2138
|
if (!styles.has(scopeId2)) {
|
|
1931
2139
|
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
|
1932
|
-
if (!
|
|
1933
|
-
|
|
2140
|
+
if (!BUILD20.hydrateServerSide && BUILD20.shadowDom && // TODO(RINDO-854): Remove code related to legacy shadowDomShim field
|
|
2141
|
+
BUILD20.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
|
|
1934
2142
|
style = await import("./shadow-css.js").then((m) => m.scopeCss(style, scopeId2, false));
|
|
1935
2143
|
}
|
|
1936
2144
|
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
@@ -1940,14 +2148,14 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1940
2148
|
}
|
|
1941
2149
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1942
2150
|
const schedule = () => scheduleUpdate(hostRef, true);
|
|
1943
|
-
if (
|
|
2151
|
+
if (BUILD20.asyncLoading && ancestorComponent && ancestorComponent["s-rc"]) {
|
|
1944
2152
|
ancestorComponent["s-rc"].push(schedule);
|
|
1945
2153
|
} else {
|
|
1946
2154
|
schedule();
|
|
1947
2155
|
}
|
|
1948
2156
|
};
|
|
1949
2157
|
var fireConnectedCallback = (instance) => {
|
|
1950
|
-
if (
|
|
2158
|
+
if (BUILD20.lazyLoad && BUILD20.connectedCallback) {
|
|
1951
2159
|
safeCall(instance, "connectedCallback");
|
|
1952
2160
|
}
|
|
1953
2161
|
};
|
|
@@ -1958,38 +2166,38 @@ var connectedCallback = (elm) => {
|
|
|
1958
2166
|
const hostRef = getHostRef(elm);
|
|
1959
2167
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1960
2168
|
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
1961
|
-
if (
|
|
2169
|
+
if (BUILD21.hostListenerTargetParent) {
|
|
1962
2170
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, true);
|
|
1963
2171
|
}
|
|
1964
2172
|
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1965
2173
|
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
1966
2174
|
let hostId;
|
|
1967
|
-
if (
|
|
2175
|
+
if (BUILD21.hydrateClientSide) {
|
|
1968
2176
|
hostId = elm.getAttribute(HYDRATE_ID);
|
|
1969
2177
|
if (hostId) {
|
|
1970
|
-
if (
|
|
1971
|
-
const scopeId2 =
|
|
2178
|
+
if (BUILD21.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
2179
|
+
const scopeId2 = BUILD21.mode ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) : addStyle(elm.shadowRoot, cmpMeta);
|
|
1972
2180
|
elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
|
|
1973
2181
|
}
|
|
1974
2182
|
initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
|
|
1975
2183
|
}
|
|
1976
2184
|
}
|
|
1977
|
-
if (
|
|
1978
|
-
if (
|
|
2185
|
+
if (BUILD21.slotRelocation && !hostId) {
|
|
2186
|
+
if (BUILD21.hydrateServerSide || (BUILD21.slot || BUILD21.shadowDom) && // TODO(RINDO-854): Remove code related to legacy shadowDomShim field
|
|
1979
2187
|
cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
|
|
1980
2188
|
setContentReference(elm);
|
|
1981
2189
|
}
|
|
1982
2190
|
}
|
|
1983
|
-
if (
|
|
2191
|
+
if (BUILD21.asyncLoading) {
|
|
1984
2192
|
let ancestorComponent = elm;
|
|
1985
2193
|
while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
|
|
1986
|
-
if (
|
|
2194
|
+
if (BUILD21.hydrateClientSide && ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
|
|
1987
2195
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
|
|
1988
2196
|
break;
|
|
1989
2197
|
}
|
|
1990
2198
|
}
|
|
1991
2199
|
}
|
|
1992
|
-
if (
|
|
2200
|
+
if (BUILD21.prop && !BUILD21.hydrateServerSide && cmpMeta.$members$) {
|
|
1993
2201
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
1994
2202
|
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1995
2203
|
const value = elm[memberName];
|
|
@@ -1998,7 +2206,7 @@ var connectedCallback = (elm) => {
|
|
|
1998
2206
|
}
|
|
1999
2207
|
});
|
|
2000
2208
|
}
|
|
2001
|
-
if (
|
|
2209
|
+
if (BUILD21.initializeNextTick) {
|
|
2002
2210
|
nextTick(() => initializeComponent(elm, hostRef, cmpMeta));
|
|
2003
2211
|
} else {
|
|
2004
2212
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
@@ -2016,32 +2224,32 @@ var connectedCallback = (elm) => {
|
|
|
2016
2224
|
};
|
|
2017
2225
|
var setContentReference = (elm) => {
|
|
2018
2226
|
const contentRefElm = elm["s-cr"] = doc.createComment(
|
|
2019
|
-
|
|
2227
|
+
BUILD21.isDebug ? `content-ref (host=${elm.localName})` : ""
|
|
2020
2228
|
);
|
|
2021
2229
|
contentRefElm["s-cn"] = true;
|
|
2022
2230
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
2023
2231
|
};
|
|
2024
2232
|
|
|
2025
2233
|
// src/runtime/disconnected-callback.ts
|
|
2026
|
-
import { BUILD as
|
|
2234
|
+
import { BUILD as BUILD22 } from "@rindo/core/internal/app-data";
|
|
2027
2235
|
var disconnectInstance = (instance) => {
|
|
2028
|
-
if (
|
|
2236
|
+
if (BUILD22.lazyLoad && BUILD22.disconnectedCallback) {
|
|
2029
2237
|
safeCall(instance, "disconnectedCallback");
|
|
2030
2238
|
}
|
|
2031
|
-
if (
|
|
2239
|
+
if (BUILD22.cmpDidUnload) {
|
|
2032
2240
|
safeCall(instance, "componentDidUnload");
|
|
2033
2241
|
}
|
|
2034
2242
|
};
|
|
2035
2243
|
var disconnectedCallback = async (elm) => {
|
|
2036
2244
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
2037
2245
|
const hostRef = getHostRef(elm);
|
|
2038
|
-
if (
|
|
2246
|
+
if (BUILD22.hostListener) {
|
|
2039
2247
|
if (hostRef.$rmListeners$) {
|
|
2040
2248
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
2041
2249
|
hostRef.$rmListeners$ = void 0;
|
|
2042
2250
|
}
|
|
2043
2251
|
}
|
|
2044
|
-
if (!
|
|
2252
|
+
if (!BUILD22.lazyLoad) {
|
|
2045
2253
|
disconnectInstance(elm);
|
|
2046
2254
|
} else if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
2047
2255
|
disconnectInstance(hostRef.$lazyInstance$);
|
|
@@ -2052,7 +2260,7 @@ var disconnectedCallback = async (elm) => {
|
|
|
2052
2260
|
};
|
|
2053
2261
|
|
|
2054
2262
|
// src/runtime/dom-extras.ts
|
|
2055
|
-
import { BUILD as
|
|
2263
|
+
import { BUILD as BUILD23 } from "@rindo/core/internal/app-data";
|
|
2056
2264
|
var patchPseudoShadowDom = (hostElementPrototype, descriptorPrototype) => {
|
|
2057
2265
|
patchCloneNode(hostElementPrototype);
|
|
2058
2266
|
patchSlotAppendChild(hostElementPrototype);
|
|
@@ -2069,9 +2277,9 @@ var patchCloneNode = (HostElementPrototype) => {
|
|
|
2069
2277
|
const orgCloneNode = HostElementPrototype.cloneNode;
|
|
2070
2278
|
HostElementPrototype.cloneNode = function(deep) {
|
|
2071
2279
|
const srcNode = this;
|
|
2072
|
-
const isShadowDom =
|
|
2280
|
+
const isShadowDom = BUILD23.shadowDom ? srcNode.shadowRoot && supportsShadow : false;
|
|
2073
2281
|
const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
|
|
2074
|
-
if (
|
|
2282
|
+
if (BUILD23.slot && !isShadowDom && deep) {
|
|
2075
2283
|
let i2 = 0;
|
|
2076
2284
|
let slotted, nonRindoNode;
|
|
2077
2285
|
const rindoPrivates = [
|
|
@@ -2095,7 +2303,7 @@ var patchCloneNode = (HostElementPrototype) => {
|
|
|
2095
2303
|
slotted = srcNode.childNodes[i2]["s-nr"];
|
|
2096
2304
|
nonRindoNode = rindoPrivates.every((privateField) => !srcNode.childNodes[i2][privateField]);
|
|
2097
2305
|
if (slotted) {
|
|
2098
|
-
if (
|
|
2306
|
+
if (BUILD23.appendChildSlotFix && clonedNode.__appendChild) {
|
|
2099
2307
|
clonedNode.__appendChild(slotted.cloneNode(true));
|
|
2100
2308
|
} else {
|
|
2101
2309
|
clonedNode.appendChild(slotted.cloneNode(true));
|
|
@@ -2221,7 +2429,7 @@ var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
|
|
|
2221
2429
|
var patchTextContent = (hostElementPrototype) => {
|
|
2222
2430
|
const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
|
|
2223
2431
|
Object.defineProperty(hostElementPrototype, "__textContent", descriptor);
|
|
2224
|
-
if (
|
|
2432
|
+
if (BUILD23.experimentalScopedSlotChanges) {
|
|
2225
2433
|
Object.defineProperty(hostElementPrototype, "textContent", {
|
|
2226
2434
|
// To mimic shadow root behavior, we need to return the text content of all
|
|
2227
2435
|
// nodes in a slot reference node
|
|
@@ -2373,36 +2581,36 @@ var proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
2373
2581
|
$flags$: compactMeta[0],
|
|
2374
2582
|
$tagName$: compactMeta[1]
|
|
2375
2583
|
};
|
|
2376
|
-
if (
|
|
2584
|
+
if (BUILD24.member) {
|
|
2377
2585
|
cmpMeta.$members$ = compactMeta[2];
|
|
2378
2586
|
}
|
|
2379
|
-
if (
|
|
2587
|
+
if (BUILD24.hostListener) {
|
|
2380
2588
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
2381
2589
|
}
|
|
2382
|
-
if (
|
|
2590
|
+
if (BUILD24.watchCallback) {
|
|
2383
2591
|
cmpMeta.$watchers$ = Cstr.$watchers$;
|
|
2384
2592
|
}
|
|
2385
|
-
if (
|
|
2593
|
+
if (BUILD24.reflect) {
|
|
2386
2594
|
cmpMeta.$attrsToReflect$ = [];
|
|
2387
2595
|
}
|
|
2388
|
-
if (
|
|
2596
|
+
if (BUILD24.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
2389
2597
|
cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
|
|
2390
2598
|
}
|
|
2391
|
-
if (
|
|
2392
|
-
if (
|
|
2599
|
+
if (BUILD24.experimentalSlotFixes) {
|
|
2600
|
+
if (BUILD24.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
2393
2601
|
patchPseudoShadowDom(Cstr.prototype, cmpMeta);
|
|
2394
2602
|
}
|
|
2395
2603
|
} else {
|
|
2396
|
-
if (
|
|
2604
|
+
if (BUILD24.slotChildNodesFix) {
|
|
2397
2605
|
patchChildSlotNodes(Cstr.prototype, cmpMeta);
|
|
2398
2606
|
}
|
|
2399
|
-
if (
|
|
2607
|
+
if (BUILD24.cloneNodeFix) {
|
|
2400
2608
|
patchCloneNode(Cstr.prototype);
|
|
2401
2609
|
}
|
|
2402
|
-
if (
|
|
2610
|
+
if (BUILD24.appendChildSlotFix) {
|
|
2403
2611
|
patchSlotAppendChild(Cstr.prototype);
|
|
2404
2612
|
}
|
|
2405
|
-
if (
|
|
2613
|
+
if (BUILD24.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
2406
2614
|
patchTextContent(Cstr.prototype);
|
|
2407
2615
|
}
|
|
2408
2616
|
}
|
|
@@ -2413,26 +2621,36 @@ var proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
2413
2621
|
registerHost(this, cmpMeta);
|
|
2414
2622
|
},
|
|
2415
2623
|
connectedCallback() {
|
|
2624
|
+
const hostRef = getHostRef(this);
|
|
2625
|
+
addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
|
|
2416
2626
|
connectedCallback(this);
|
|
2417
|
-
if (
|
|
2627
|
+
if (BUILD24.connectedCallback && originalConnectedCallback) {
|
|
2418
2628
|
originalConnectedCallback.call(this);
|
|
2419
2629
|
}
|
|
2420
2630
|
},
|
|
2421
2631
|
disconnectedCallback() {
|
|
2422
2632
|
disconnectedCallback(this);
|
|
2423
|
-
if (
|
|
2633
|
+
if (BUILD24.disconnectedCallback && originalDisconnectedCallback) {
|
|
2424
2634
|
originalDisconnectedCallback.call(this);
|
|
2425
2635
|
}
|
|
2426
2636
|
},
|
|
2427
2637
|
__attachShadow() {
|
|
2428
2638
|
if (supportsShadow) {
|
|
2429
|
-
if (
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2639
|
+
if (!this.shadowRoot) {
|
|
2640
|
+
if (BUILD24.shadowDelegatesFocus) {
|
|
2641
|
+
this.attachShadow({
|
|
2642
|
+
mode: "open",
|
|
2643
|
+
delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
|
|
2644
|
+
});
|
|
2645
|
+
} else {
|
|
2646
|
+
this.attachShadow({ mode: "open" });
|
|
2647
|
+
}
|
|
2434
2648
|
} else {
|
|
2435
|
-
this.
|
|
2649
|
+
if (this.shadowRoot.mode !== "open") {
|
|
2650
|
+
throw new Error(
|
|
2651
|
+
`Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Rindo only supports open shadow roots.`
|
|
2652
|
+
);
|
|
2653
|
+
}
|
|
2436
2654
|
}
|
|
2437
2655
|
} else {
|
|
2438
2656
|
this.shadowRoot = this;
|
|
@@ -2443,7 +2661,7 @@ var proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
2443
2661
|
return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */);
|
|
2444
2662
|
};
|
|
2445
2663
|
var forceModeUpdate = (elm) => {
|
|
2446
|
-
if (
|
|
2664
|
+
if (BUILD24.style && BUILD24.mode && !BUILD24.lazyLoad) {
|
|
2447
2665
|
const mode = computeMode(elm);
|
|
2448
2666
|
const hostRef = getHostRef(elm);
|
|
2449
2667
|
if (hostRef.$modeName$ !== mode) {
|
|
@@ -2466,7 +2684,7 @@ var forceModeUpdate = (elm) => {
|
|
|
2466
2684
|
};
|
|
2467
2685
|
|
|
2468
2686
|
// src/runtime/bootstrap-lazy.ts
|
|
2469
|
-
import { BUILD as
|
|
2687
|
+
import { BUILD as BUILD25 } from "@rindo/core/internal/app-data";
|
|
2470
2688
|
|
|
2471
2689
|
// src/runtime/hmr-component.ts
|
|
2472
2690
|
var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
|
|
@@ -2478,7 +2696,7 @@ var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
|
|
|
2478
2696
|
// src/runtime/bootstrap-lazy.ts
|
|
2479
2697
|
var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
2480
2698
|
var _a;
|
|
2481
|
-
if (
|
|
2699
|
+
if (BUILD25.profile && performance.mark) {
|
|
2482
2700
|
performance.mark("st:app:start");
|
|
2483
2701
|
}
|
|
2484
2702
|
installDevTools();
|
|
@@ -2496,15 +2714,15 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2496
2714
|
let i2 = 0;
|
|
2497
2715
|
Object.assign(plt, options);
|
|
2498
2716
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
|
|
2499
|
-
if (
|
|
2717
|
+
if (BUILD25.asyncQueue) {
|
|
2500
2718
|
if (options.syncQueue) {
|
|
2501
2719
|
plt.$flags$ |= 4 /* queueSync */;
|
|
2502
2720
|
}
|
|
2503
2721
|
}
|
|
2504
|
-
if (
|
|
2722
|
+
if (BUILD25.hydrateClientSide) {
|
|
2505
2723
|
plt.$flags$ |= 2 /* appLoaded */;
|
|
2506
2724
|
}
|
|
2507
|
-
if (
|
|
2725
|
+
if (BUILD25.hydrateClientSide && BUILD25.shadowDom) {
|
|
2508
2726
|
for (; i2 < styles2.length; i2++) {
|
|
2509
2727
|
registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
|
|
2510
2728
|
}
|
|
@@ -2522,44 +2740,58 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2522
2740
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
2523
2741
|
hasSlotRelocation = true;
|
|
2524
2742
|
}
|
|
2525
|
-
if (
|
|
2743
|
+
if (BUILD25.member) {
|
|
2526
2744
|
cmpMeta.$members$ = compactMeta[2];
|
|
2527
2745
|
}
|
|
2528
|
-
if (
|
|
2746
|
+
if (BUILD25.hostListener) {
|
|
2529
2747
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
2530
2748
|
}
|
|
2531
|
-
if (
|
|
2749
|
+
if (BUILD25.reflect) {
|
|
2532
2750
|
cmpMeta.$attrsToReflect$ = [];
|
|
2533
2751
|
}
|
|
2534
|
-
if (
|
|
2752
|
+
if (BUILD25.watchCallback) {
|
|
2535
2753
|
cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
|
|
2536
2754
|
}
|
|
2537
|
-
if (
|
|
2755
|
+
if (BUILD25.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
2538
2756
|
cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
|
|
2539
2757
|
}
|
|
2540
|
-
const tagName =
|
|
2758
|
+
const tagName = BUILD25.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : cmpMeta.$tagName$;
|
|
2541
2759
|
const HostElement = class extends HTMLElement {
|
|
2542
2760
|
// RindoLazyHost
|
|
2543
2761
|
constructor(self) {
|
|
2544
2762
|
super(self);
|
|
2763
|
+
this.hasRegisteredEventListeners = false;
|
|
2545
2764
|
self = this;
|
|
2546
2765
|
registerHost(self, cmpMeta);
|
|
2547
|
-
if (
|
|
2766
|
+
if (BUILD25.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
2548
2767
|
if (supportsShadow) {
|
|
2549
|
-
if (
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2768
|
+
if (!self.shadowRoot) {
|
|
2769
|
+
if (BUILD25.shadowDelegatesFocus) {
|
|
2770
|
+
self.attachShadow({
|
|
2771
|
+
mode: "open",
|
|
2772
|
+
delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
|
|
2773
|
+
});
|
|
2774
|
+
} else {
|
|
2775
|
+
self.attachShadow({ mode: "open" });
|
|
2776
|
+
}
|
|
2554
2777
|
} else {
|
|
2555
|
-
self.
|
|
2778
|
+
if (self.shadowRoot.mode !== "open") {
|
|
2779
|
+
throw new Error(
|
|
2780
|
+
`Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${self.shadowRoot.mode} but Rindo only supports open shadow roots.`
|
|
2781
|
+
);
|
|
2782
|
+
}
|
|
2556
2783
|
}
|
|
2557
|
-
} else if (!
|
|
2784
|
+
} else if (!BUILD25.hydrateServerSide && !("shadowRoot" in self)) {
|
|
2558
2785
|
self.shadowRoot = self;
|
|
2559
2786
|
}
|
|
2560
2787
|
}
|
|
2561
2788
|
}
|
|
2562
2789
|
connectedCallback() {
|
|
2790
|
+
const hostRef = getHostRef(this);
|
|
2791
|
+
if (!this.hasRegisteredEventListeners) {
|
|
2792
|
+
this.hasRegisteredEventListeners = true;
|
|
2793
|
+
addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
|
|
2794
|
+
}
|
|
2563
2795
|
if (appLoadFallback) {
|
|
2564
2796
|
clearTimeout(appLoadFallback);
|
|
2565
2797
|
appLoadFallback = null;
|
|
@@ -2577,28 +2809,28 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2577
2809
|
return getHostRef(this).$onReadyPromise$;
|
|
2578
2810
|
}
|
|
2579
2811
|
};
|
|
2580
|
-
if (
|
|
2581
|
-
if (
|
|
2812
|
+
if (BUILD25.experimentalSlotFixes) {
|
|
2813
|
+
if (BUILD25.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
2582
2814
|
patchPseudoShadowDom(HostElement.prototype, cmpMeta);
|
|
2583
2815
|
}
|
|
2584
2816
|
} else {
|
|
2585
|
-
if (
|
|
2817
|
+
if (BUILD25.slotChildNodesFix) {
|
|
2586
2818
|
patchChildSlotNodes(HostElement.prototype, cmpMeta);
|
|
2587
2819
|
}
|
|
2588
|
-
if (
|
|
2820
|
+
if (BUILD25.cloneNodeFix) {
|
|
2589
2821
|
patchCloneNode(HostElement.prototype);
|
|
2590
2822
|
}
|
|
2591
|
-
if (
|
|
2823
|
+
if (BUILD25.appendChildSlotFix) {
|
|
2592
2824
|
patchSlotAppendChild(HostElement.prototype);
|
|
2593
2825
|
}
|
|
2594
|
-
if (
|
|
2826
|
+
if (BUILD25.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
2595
2827
|
patchTextContent(HostElement.prototype);
|
|
2596
2828
|
}
|
|
2597
2829
|
}
|
|
2598
|
-
if (
|
|
2830
|
+
if (BUILD25.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */) {
|
|
2599
2831
|
HostElement.formAssociated = true;
|
|
2600
2832
|
}
|
|
2601
|
-
if (
|
|
2833
|
+
if (BUILD25.hotModuleReplacement) {
|
|
2602
2834
|
HostElement.prototype["s-hmr"] = function(hmrVersionId) {
|
|
2603
2835
|
hmrStart(this, cmpMeta, hmrVersionId);
|
|
2604
2836
|
};
|
|
@@ -2617,8 +2849,8 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2617
2849
|
if (hasSlotRelocation) {
|
|
2618
2850
|
dataStyles.textContent += SLOT_FB_CSS;
|
|
2619
2851
|
}
|
|
2620
|
-
if (
|
|
2621
|
-
dataStyles.textContent += cmpTags + HYDRATED_CSS;
|
|
2852
|
+
if (BUILD25.invisiblePrehydration && (BUILD25.hydratedClass || BUILD25.hydratedAttribute)) {
|
|
2853
|
+
dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
|
|
2622
2854
|
}
|
|
2623
2855
|
if (dataStyles.innerHTML.length) {
|
|
2624
2856
|
dataStyles.setAttribute("data-styles", "");
|
|
@@ -2633,7 +2865,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2633
2865
|
if (deferredConnectedCallbacks.length) {
|
|
2634
2866
|
deferredConnectedCallbacks.map((host) => host.connectedCallback());
|
|
2635
2867
|
} else {
|
|
2636
|
-
if (
|
|
2868
|
+
if (BUILD25.profile) {
|
|
2637
2869
|
plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30, "timeout"));
|
|
2638
2870
|
} else {
|
|
2639
2871
|
plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
|
|
@@ -2646,10 +2878,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2646
2878
|
var Fragment = (_, children) => children;
|
|
2647
2879
|
|
|
2648
2880
|
// src/runtime/host-listener.ts
|
|
2649
|
-
import { BUILD as
|
|
2881
|
+
import { BUILD as BUILD26 } from "@rindo/core/internal/app-data";
|
|
2650
2882
|
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
2651
|
-
if (
|
|
2652
|
-
if (
|
|
2883
|
+
if (BUILD26.hostListener && listeners) {
|
|
2884
|
+
if (BUILD26.hostListenerTargetParent) {
|
|
2653
2885
|
if (attachParentListeners) {
|
|
2654
2886
|
listeners = listeners.filter(([flags]) => flags & 32 /* TargetParent */);
|
|
2655
2887
|
} else {
|
|
@@ -2657,7 +2889,7 @@ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =>
|
|
|
2657
2889
|
}
|
|
2658
2890
|
}
|
|
2659
2891
|
listeners.map(([flags, name, method]) => {
|
|
2660
|
-
const target =
|
|
2892
|
+
const target = BUILD26.hostListenerTarget ? getHostListenerTarget(elm, flags) : elm;
|
|
2661
2893
|
const handler = hostListenerProxy(hostRef, method);
|
|
2662
2894
|
const opts = hostListenerOpts(flags);
|
|
2663
2895
|
plt.ael(target, name, handler, opts);
|
|
@@ -2668,7 +2900,7 @@ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =>
|
|
|
2668
2900
|
var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
2669
2901
|
var _a;
|
|
2670
2902
|
try {
|
|
2671
|
-
if (
|
|
2903
|
+
if (BUILD26.lazyLoad) {
|
|
2672
2904
|
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
2673
2905
|
(_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
|
|
2674
2906
|
} else {
|
|
@@ -2682,10 +2914,10 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
2682
2914
|
}
|
|
2683
2915
|
};
|
|
2684
2916
|
var getHostListenerTarget = (elm, flags) => {
|
|
2685
|
-
if (
|
|
2686
|
-
if (
|
|
2687
|
-
if (
|
|
2688
|
-
if (
|
|
2917
|
+
if (BUILD26.hostListenerTargetDocument && flags & 4 /* TargetDocument */) return doc;
|
|
2918
|
+
if (BUILD26.hostListenerTargetWindow && flags & 8 /* TargetWindow */) return win;
|
|
2919
|
+
if (BUILD26.hostListenerTargetBody && flags & 16 /* TargetBody */) return doc.body;
|
|
2920
|
+
if (BUILD26.hostListenerTargetParent && flags & 32 /* TargetParent */ && elm.parentElement)
|
|
2689
2921
|
return elm.parentElement;
|
|
2690
2922
|
return elm;
|
|
2691
2923
|
};
|
|
@@ -2752,6 +2984,7 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
|
|
|
2752
2984
|
}
|
|
2753
2985
|
};
|
|
2754
2986
|
var parseVNodeAnnotations = (doc2, node, docData, orgLocationNodes) => {
|
|
2987
|
+
var _a;
|
|
2755
2988
|
if (node == null) {
|
|
2756
2989
|
return;
|
|
2757
2990
|
}
|
|
@@ -2759,7 +2992,8 @@ var parseVNodeAnnotations = (doc2, node, docData, orgLocationNodes) => {
|
|
|
2759
2992
|
orgLocationNodes.push(node);
|
|
2760
2993
|
}
|
|
2761
2994
|
if (node.nodeType === 1 /* ElementNode */) {
|
|
2762
|
-
node.childNodes.
|
|
2995
|
+
const childNodes = [...Array.from(node.childNodes), ...Array.from(((_a = node.shadowRoot) == null ? void 0 : _a.childNodes) || [])];
|
|
2996
|
+
childNodes.forEach((childNode) => {
|
|
2763
2997
|
const hostRef = getHostRef(childNode);
|
|
2764
2998
|
if (hostRef != null && !docData.staticComponents.has(childNode.nodeName.toLowerCase())) {
|
|
2765
2999
|
const cmpData = {
|
|
@@ -2835,213 +3069,6 @@ var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, ind
|
|
|
2835
3069
|
});
|
|
2836
3070
|
}
|
|
2837
3071
|
};
|
|
2838
|
-
|
|
2839
|
-
// src/client/client-host-ref.ts
|
|
2840
|
-
var hostRefs = BUILD22.hotModuleReplacement ? window.__RINDO_HOSTREFS__ || (window.__RINDO_HOSTREFS__ = /* @__PURE__ */ new WeakMap()) : /* @__PURE__ */ new WeakMap();
|
|
2841
|
-
var getHostRef = (ref) => hostRefs.get(ref);
|
|
2842
|
-
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
2843
|
-
var registerHost = (hostElement, cmpMeta) => {
|
|
2844
|
-
const hostRef = {
|
|
2845
|
-
$flags$: 0,
|
|
2846
|
-
$hostElement$: hostElement,
|
|
2847
|
-
$cmpMeta$: cmpMeta,
|
|
2848
|
-
$instanceValues$: /* @__PURE__ */ new Map()
|
|
2849
|
-
};
|
|
2850
|
-
if (BUILD22.isDev) {
|
|
2851
|
-
hostRef.$renderCount$ = 0;
|
|
2852
|
-
}
|
|
2853
|
-
if (BUILD22.method && BUILD22.lazyLoad) {
|
|
2854
|
-
hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
|
|
2855
|
-
}
|
|
2856
|
-
if (BUILD22.asyncLoading) {
|
|
2857
|
-
hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
|
|
2858
|
-
hostElement["s-p"] = [];
|
|
2859
|
-
hostElement["s-rc"] = [];
|
|
2860
|
-
}
|
|
2861
|
-
addHostEventListeners(hostElement, hostRef, cmpMeta.$listeners$, false);
|
|
2862
|
-
return hostRefs.set(hostElement, hostRef);
|
|
2863
|
-
};
|
|
2864
|
-
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
2865
|
-
|
|
2866
|
-
// src/client/client-load-module.ts
|
|
2867
|
-
import { BUILD as BUILD24 } from "@rindo/core/internal/app-data";
|
|
2868
|
-
|
|
2869
|
-
// src/client/client-log.ts
|
|
2870
|
-
import { BUILD as BUILD23 } from "@rindo/core/internal/app-data";
|
|
2871
|
-
var customError;
|
|
2872
|
-
var consoleError = (e, el) => (customError || console.error)(e, el);
|
|
2873
|
-
var RINDO_DEV_MODE = BUILD23.isTesting ? ["RINDO:"] : [
|
|
2874
|
-
"%crindo",
|
|
2875
|
-
"color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"
|
|
2876
|
-
];
|
|
2877
|
-
var consoleDevError = (...m) => console.error(...RINDO_DEV_MODE, ...m);
|
|
2878
|
-
var consoleDevWarn = (...m) => console.warn(...RINDO_DEV_MODE, ...m);
|
|
2879
|
-
var consoleDevInfo = (...m) => console.info(...RINDO_DEV_MODE, ...m);
|
|
2880
|
-
var setErrorHandler = (handler) => customError = handler;
|
|
2881
|
-
|
|
2882
|
-
// src/client/client-load-module.ts
|
|
2883
|
-
var cmpModules = /* @__PURE__ */ new Map();
|
|
2884
|
-
var MODULE_IMPORT_PREFIX = "./";
|
|
2885
|
-
var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
2886
|
-
const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
|
|
2887
|
-
const bundleId = cmpMeta.$lazyBundleId$;
|
|
2888
|
-
if (BUILD24.isDev && typeof bundleId !== "string") {
|
|
2889
|
-
consoleDevError(
|
|
2890
|
-
`Trying to lazily load component <${cmpMeta.$tagName$}> with style mode "${hostRef.$modeName$}", but it does not exist.`
|
|
2891
|
-
);
|
|
2892
|
-
return void 0;
|
|
2893
|
-
} else if (!bundleId) {
|
|
2894
|
-
return void 0;
|
|
2895
|
-
}
|
|
2896
|
-
const module = !BUILD24.hotModuleReplacement ? cmpModules.get(bundleId) : false;
|
|
2897
|
-
if (module) {
|
|
2898
|
-
return module[exportName];
|
|
2899
|
-
}
|
|
2900
|
-
/*!__RINDO_STATIC_IMPORT_SWITCH__*/
|
|
2901
|
-
return import(
|
|
2902
|
-
/* @wite-ignore */
|
|
2903
|
-
/* @lahm-ignore */
|
|
2904
|
-
/* webpackInclude: /\.entry\.js$/ */
|
|
2905
|
-
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
2906
|
-
/* webpackMode: "lazy" */
|
|
2907
|
-
`./${bundleId}.entry.js${BUILD24.hotModuleReplacement && hmrVersionId ? "?s-hmr=" + hmrVersionId : ""}`
|
|
2908
|
-
).then((importedModule) => {
|
|
2909
|
-
if (!BUILD24.hotModuleReplacement) {
|
|
2910
|
-
cmpModules.set(bundleId, importedModule);
|
|
2911
|
-
}
|
|
2912
|
-
return importedModule[exportName];
|
|
2913
|
-
}, consoleError);
|
|
2914
|
-
};
|
|
2915
|
-
|
|
2916
|
-
// src/client/client-style.ts
|
|
2917
|
-
var styles = /* @__PURE__ */ new Map();
|
|
2918
|
-
var modeResolutionChain = [];
|
|
2919
|
-
|
|
2920
|
-
// src/client/client-task-queue.ts
|
|
2921
|
-
import { BUILD as BUILD26 } from "@rindo/core/internal/app-data";
|
|
2922
|
-
|
|
2923
|
-
// src/client/client-window.ts
|
|
2924
|
-
import { BUILD as BUILD25 } from "@rindo/core/internal/app-data";
|
|
2925
|
-
var win = typeof window !== "undefined" ? window : {};
|
|
2926
|
-
var doc = win.document || { head: {} };
|
|
2927
|
-
var H = win.HTMLElement || class {
|
|
2928
|
-
};
|
|
2929
|
-
var plt = {
|
|
2930
|
-
$flags$: 0,
|
|
2931
|
-
$resourcesUrl$: "",
|
|
2932
|
-
jmp: (h2) => h2(),
|
|
2933
|
-
raf: (h2) => requestAnimationFrame(h2),
|
|
2934
|
-
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
2935
|
-
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
2936
|
-
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
2937
|
-
};
|
|
2938
|
-
var setPlatformHelpers = (helpers) => {
|
|
2939
|
-
Object.assign(plt, helpers);
|
|
2940
|
-
};
|
|
2941
|
-
var supportsShadow = (
|
|
2942
|
-
// TODO(RINDO-854): Remove code related to legacy shadowDomShim field
|
|
2943
|
-
BUILD25.shadowDomShim && BUILD25.shadowDom ? /* @__PURE__ */ (() => (doc.head.attachShadow + "").indexOf("[native") > -1)() : true
|
|
2944
|
-
);
|
|
2945
|
-
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
2946
|
-
let supportsListenerOptions2 = false;
|
|
2947
|
-
try {
|
|
2948
|
-
doc.addEventListener(
|
|
2949
|
-
"e",
|
|
2950
|
-
null,
|
|
2951
|
-
Object.defineProperty({}, "passive", {
|
|
2952
|
-
get() {
|
|
2953
|
-
supportsListenerOptions2 = true;
|
|
2954
|
-
}
|
|
2955
|
-
})
|
|
2956
|
-
);
|
|
2957
|
-
} catch (e) {
|
|
2958
|
-
}
|
|
2959
|
-
return supportsListenerOptions2;
|
|
2960
|
-
})();
|
|
2961
|
-
var promiseResolve = (v) => Promise.resolve(v);
|
|
2962
|
-
var supportsConstructableStylesheets = BUILD25.constructableCSS ? /* @__PURE__ */ (() => {
|
|
2963
|
-
try {
|
|
2964
|
-
new CSSStyleSheet();
|
|
2965
|
-
return typeof new CSSStyleSheet().replaceSync === "function";
|
|
2966
|
-
} catch (e) {
|
|
2967
|
-
}
|
|
2968
|
-
return false;
|
|
2969
|
-
})() : false;
|
|
2970
|
-
|
|
2971
|
-
// src/client/client-task-queue.ts
|
|
2972
|
-
var queueCongestion = 0;
|
|
2973
|
-
var queuePending = false;
|
|
2974
|
-
var queueDomReads = [];
|
|
2975
|
-
var queueDomWrites = [];
|
|
2976
|
-
var queueDomWritesLow = [];
|
|
2977
|
-
var queueTask = (queue, write) => (cb) => {
|
|
2978
|
-
queue.push(cb);
|
|
2979
|
-
if (!queuePending) {
|
|
2980
|
-
queuePending = true;
|
|
2981
|
-
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
2982
|
-
nextTick(flush);
|
|
2983
|
-
} else {
|
|
2984
|
-
plt.raf(flush);
|
|
2985
|
-
}
|
|
2986
|
-
}
|
|
2987
|
-
};
|
|
2988
|
-
var consume = (queue) => {
|
|
2989
|
-
for (let i2 = 0; i2 < queue.length; i2++) {
|
|
2990
|
-
try {
|
|
2991
|
-
queue[i2](performance.now());
|
|
2992
|
-
} catch (e) {
|
|
2993
|
-
consoleError(e);
|
|
2994
|
-
}
|
|
2995
|
-
}
|
|
2996
|
-
queue.length = 0;
|
|
2997
|
-
};
|
|
2998
|
-
var consumeTimeout = (queue, timeout) => {
|
|
2999
|
-
let i2 = 0;
|
|
3000
|
-
let ts = 0;
|
|
3001
|
-
while (i2 < queue.length && (ts = performance.now()) < timeout) {
|
|
3002
|
-
try {
|
|
3003
|
-
queue[i2++](ts);
|
|
3004
|
-
} catch (e) {
|
|
3005
|
-
consoleError(e);
|
|
3006
|
-
}
|
|
3007
|
-
}
|
|
3008
|
-
if (i2 === queue.length) {
|
|
3009
|
-
queue.length = 0;
|
|
3010
|
-
} else if (i2 !== 0) {
|
|
3011
|
-
queue.splice(0, i2);
|
|
3012
|
-
}
|
|
3013
|
-
};
|
|
3014
|
-
var flush = () => {
|
|
3015
|
-
if (BUILD26.asyncQueue) {
|
|
3016
|
-
queueCongestion++;
|
|
3017
|
-
}
|
|
3018
|
-
consume(queueDomReads);
|
|
3019
|
-
if (BUILD26.asyncQueue) {
|
|
3020
|
-
const timeout = (plt.$flags$ & 6 /* queueMask */) === 2 /* appLoaded */ ? performance.now() + 14 * Math.ceil(queueCongestion * (1 / 10)) : Infinity;
|
|
3021
|
-
consumeTimeout(queueDomWrites, timeout);
|
|
3022
|
-
consumeTimeout(queueDomWritesLow, timeout);
|
|
3023
|
-
if (queueDomWrites.length > 0) {
|
|
3024
|
-
queueDomWritesLow.push(...queueDomWrites);
|
|
3025
|
-
queueDomWrites.length = 0;
|
|
3026
|
-
}
|
|
3027
|
-
if (queuePending = queueDomReads.length + queueDomWrites.length + queueDomWritesLow.length > 0) {
|
|
3028
|
-
plt.raf(flush);
|
|
3029
|
-
} else {
|
|
3030
|
-
queueCongestion = 0;
|
|
3031
|
-
}
|
|
3032
|
-
} else {
|
|
3033
|
-
consume(queueDomWrites);
|
|
3034
|
-
if (queuePending = queueDomReads.length > 0) {
|
|
3035
|
-
plt.raf(flush);
|
|
3036
|
-
}
|
|
3037
|
-
}
|
|
3038
|
-
};
|
|
3039
|
-
var nextTick = (cb) => promiseResolve().then(cb);
|
|
3040
|
-
var readTask = /* @__PURE__ */ queueTask(queueDomReads, false);
|
|
3041
|
-
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
3042
|
-
|
|
3043
|
-
// src/client/index.ts
|
|
3044
|
-
import { BUILD as BUILD27, Env, NAMESPACE as NAMESPACE2 } from "@rindo/core/internal/app-data";
|
|
3045
3072
|
export {
|
|
3046
3073
|
BUILD27 as BUILD,
|
|
3047
3074
|
Build,
|