marko 6.3.32 → 6.3.34
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/cheatsheet.md +38 -31
- package/dist/common/errors.d.ts +1 -0
- package/dist/debug/dom/catch.feat.js +1 -1
- package/dist/debug/dom/catch.feat.mjs +1 -1
- package/dist/debug/dom/controllable-input.feat.js +1 -1
- package/dist/debug/dom/controllable-input.feat.mjs +1 -1
- package/dist/debug/dom/controllable-open.feat.js +1 -1
- package/dist/debug/dom/controllable-open.feat.mjs +1 -1
- package/dist/debug/dom/controllable-select.feat.js +1 -1
- package/dist/debug/dom/controllable-select.feat.mjs +1 -1
- package/dist/debug/dom/controllable-textarea.feat.js +1 -1
- package/dist/debug/dom/controllable-textarea.feat.mjs +1 -1
- package/dist/debug/dom/controllable.feat.js +1 -1
- package/dist/debug/dom/controllable.feat.mjs +1 -1
- package/dist/debug/{dom-CiFITSPN.js → dom-Bj58jt8y.js} +55 -30
- package/dist/debug/{dom-BJ93mcSe.mjs → dom-klf8Ec_o.mjs} +55 -30
- package/dist/debug/dom.js +3 -1
- package/dist/debug/dom.mjs +3 -1
- package/dist/debug/html.js +154 -86
- package/dist/debug/html.mjs +155 -84
- package/dist/dom/catch.feat.js +1 -1
- package/dist/dom/catch.feat.mjs +1 -1
- package/dist/dom/control-flow.d.ts +3 -1
- package/dist/dom/controllable-input.feat.js +1 -1
- package/dist/dom/controllable-input.feat.mjs +1 -1
- package/dist/dom/controllable-open.feat.js +1 -1
- package/dist/dom/controllable-open.feat.mjs +1 -1
- package/dist/dom/controllable-select.feat.js +1 -1
- package/dist/dom/controllable-select.feat.mjs +1 -1
- package/dist/dom/controllable-textarea.feat.js +1 -1
- package/dist/dom/controllable-textarea.feat.mjs +1 -1
- package/dist/dom/controllable.feat.js +1 -1
- package/dist/dom/controllable.feat.mjs +1 -1
- package/dist/{dom-Cj4HQ7T_.mjs → dom-6hBvZW7X.mjs} +27 -21
- package/dist/{dom-CI-06TZb.js → dom-B-XpL2_H.js} +27 -21
- package/dist/dom.js +3 -1
- package/dist/dom.mjs +3 -1
- package/dist/html/compat.d.ts +6 -2
- package/dist/html/writer.d.ts +3 -0
- package/dist/html.d.ts +1 -1
- package/dist/html.js +104 -65
- package/dist/html.mjs +104 -65
- package/dist/translator/core/client.d.ts +1 -2
- package/dist/translator/core/server.d.ts +1 -2
- package/dist/translator/core/static.d.ts +1 -2
- package/dist/translator/index.js +430 -294
- package/dist/translator/util/branch-tag.d.ts +5 -0
- package/dist/translator/util/constants/binding-type.d.ts +1 -0
- package/dist/translator/util/references.d.ts +8 -1
- package/dist/translator/util/serialize-reasons.d.ts +4 -4
- package/dist/translator/util/signals.d.ts +4 -3
- package/dist/translator/util/statement-tag.d.ts +2 -0
- package/dist/translator/visitors/program/index.d.ts +0 -1
- package/index.d.ts +19 -1
- package/package.json +5 -4
- package/tags/html-comment.d.marko +2 -0
- package/tags/html-script.d.marko +2 -0
- package/tags/html-style.d.marko +2 -0
- package/tags/let.d.marko +2 -2
- package/tags/show.d.marko +6 -0
- package/tags/try.d.marko +1 -1
- package/tags-html.d.ts +6 -1
- /package/dist/translator/util/{get-accessor-char.d.ts → get-accessor-enums.d.ts} +0 -0
|
@@ -112,6 +112,7 @@ function stringifyStyleObject(name, value) {
|
|
|
112
112
|
warnedStyleKeys.add(name);
|
|
113
113
|
console.warn(`\`${name}\` is not a CSS property name; \`style\` object keys are written verbatim, so it renders as invalid CSS. Use \`${name.replace(/[A-Z]/g, (m) => "-" + m.toLowerCase()).replace(/^ms-/, "-ms-")}\`.`);
|
|
114
114
|
}
|
|
115
|
+
if (value !== value || typeof value === "bigint" && !value) console.warn(`The \`${name}\` style value \`${value !== value ? "NaN" : "0n"}\` drops the declaration; convert it to a string or number to render it.`);
|
|
115
116
|
return value || value === 0 ? escapeStyleAttr(name) + ":" + escapeStyleAttr(value + "") : "";
|
|
116
117
|
}
|
|
117
118
|
const unsafeStyleAttrReg = /[\\;]/g;
|
|
@@ -188,6 +189,13 @@ function assertValidAttrValue(name, value) {
|
|
|
188
189
|
function assertValidTextValue(value) {
|
|
189
190
|
const unrenderable = describeUnrenderable(value);
|
|
190
191
|
if (unrenderable) throw new Error(`Text content cannot be ${unrenderable}.`);
|
|
192
|
+
if (isSilentlyDropped(value)) console.warn(`Text content of \`${describeDropped(value)}\` renders as nothing; convert it to a string or number to render it.`);
|
|
193
|
+
}
|
|
194
|
+
function isSilentlyDropped(value) {
|
|
195
|
+
return value !== value || typeof value === "bigint" && !value;
|
|
196
|
+
}
|
|
197
|
+
function describeDropped(value) {
|
|
198
|
+
return value !== value ? "NaN" : "0n";
|
|
191
199
|
}
|
|
192
200
|
function describeUnrenderable(value) {
|
|
193
201
|
if (typeof value === "symbol") return "a symbol";
|
|
@@ -211,6 +219,9 @@ function assertValidLoopKey(key, seenKeys) {
|
|
|
211
219
|
function assertValidList(value) {
|
|
212
220
|
if (value && typeof value[Symbol.iterator] !== "function") throw new Error(`A \`<for>\` tag's \`of\` attribute must be an iterable, such as an array, but received ${describeForValue(value)}.`);
|
|
213
221
|
}
|
|
222
|
+
function assertValidRangeStart(name, value) {
|
|
223
|
+
if (value && (typeof value !== "number" || !isFinite(value))) throw new Error(`A \`<for>\` tag's \`${name}\` attribute must be a finite number, but received ${describeForValue(value)}.`);
|
|
224
|
+
}
|
|
214
225
|
function assertValidRangeBound(name, value) {
|
|
215
226
|
if (!isFinite(value)) throw new Error(`A \`<for>\` tag's \`${name}\` attribute must be a finite number, but received ${describeForValue(value)}.`);
|
|
216
227
|
}
|
|
@@ -277,12 +288,16 @@ function forOf(list, cb) {
|
|
|
277
288
|
}
|
|
278
289
|
function forTo(to, from, step, cb) {
|
|
279
290
|
assertValidRangeBound("to", to);
|
|
291
|
+
assertValidRangeStart("from", from);
|
|
292
|
+
assertValidRangeStart("step", step);
|
|
280
293
|
const start = from || 0;
|
|
281
294
|
const delta = step || 1;
|
|
282
295
|
for (let steps = (to - start) / delta, i = 0; i <= steps; i++) cb(start + i * delta);
|
|
283
296
|
}
|
|
284
297
|
function forUntil(until, from, step, cb) {
|
|
285
298
|
assertValidRangeBound("until", until);
|
|
299
|
+
assertValidRangeStart("from", from);
|
|
300
|
+
assertValidRangeStart("step", step);
|
|
286
301
|
const start = from || 0;
|
|
287
302
|
const delta = step || 1;
|
|
288
303
|
for (let steps = (until - start) / delta, i = 0; i < steps; i++) cb(start + i * delta);
|
|
@@ -440,10 +455,10 @@ function push(opt, item) {
|
|
|
440
455
|
//#region src/dom/event.ts
|
|
441
456
|
function _on(element, type, handler) {
|
|
442
457
|
assertHandlerIsFunction("on" + type[0].toUpperCase() + type.slice(1), handler);
|
|
443
|
-
if (element[
|
|
444
|
-
element[
|
|
458
|
+
if (element[1 + type] === void 0) delegate(type, handleDelegated);
|
|
459
|
+
element[1 + type] = handler || null;
|
|
445
460
|
}
|
|
446
|
-
const delegate = (type, handler) => handler[type] ||= (document.addEventListener(type, handler, true), 1);
|
|
461
|
+
const delegate = (type, handler) => handler[1 + type] ||= (document.addEventListener(type, handler, true), 1);
|
|
447
462
|
function handleDelegated(ev) {
|
|
448
463
|
let target = !rendering && ev.target;
|
|
449
464
|
Object.defineProperty(ev, "currentTarget", {
|
|
@@ -454,7 +469,7 @@ function handleDelegated(ev) {
|
|
|
454
469
|
}
|
|
455
470
|
});
|
|
456
471
|
while (target) {
|
|
457
|
-
target[
|
|
472
|
+
target[1 + ev.type]?.(ev, target);
|
|
458
473
|
target = ev.bubbles && !ev.cancelBubble && target.parentNode;
|
|
459
474
|
}
|
|
460
475
|
delete ev.currentTarget;
|
|
@@ -719,7 +734,7 @@ function _var(scope, childAccessor, signal) {
|
|
|
719
734
|
}
|
|
720
735
|
const _return = (scope, value) => scope[TagVariable]?.(value);
|
|
721
736
|
function _return_change(scope, changeHandler) {
|
|
722
|
-
|
|
737
|
+
scope[TagVariableChange] = changeHandler || void 0;
|
|
723
738
|
}
|
|
724
739
|
const _var_change = (scope, value, name = "This") => {
|
|
725
740
|
if (typeof scope["#TagVariableChange"] !== "function") throw new TypeError(`${name} is a readonly tag variable.`);
|
|
@@ -1055,7 +1070,7 @@ function _content(id, template, walks, setup, params, dynamicScopesAccessor) {
|
|
|
1055
1070
|
setup = setup ? setup._ || setup : void 0;
|
|
1056
1071
|
params ||= void 0;
|
|
1057
1072
|
const clone = template ? (branch, ns) => {
|
|
1058
|
-
((cloneCache[ns] ||= {})[template] ||= createCloneableHTML(template, ns))(branch, walks);
|
|
1073
|
+
((cloneCache[ns] ||= {})[1 + template] ||= createCloneableHTML(template, ns))(branch, walks);
|
|
1059
1074
|
} : (branch) => {
|
|
1060
1075
|
walk(branch[StartNode] = branch[EndNode] = new Text(), walks, branch);
|
|
1061
1076
|
};
|
|
@@ -1175,7 +1190,7 @@ function _attrs_partial(scope, nodeAccessor, nextAttrs, skip, controllable) {
|
|
|
1175
1190
|
const partial = {};
|
|
1176
1191
|
for (let i = el.attributes.length; i--;) {
|
|
1177
1192
|
const { name } = el.attributes.item(i);
|
|
1178
|
-
if (!skip[name] && !(nextAttrs && name in nextAttrs)) el.removeAttribute(name);
|
|
1193
|
+
if (!skip[name] && !(nextAttrs && (name in nextAttrs || hasAttrAlias(el, name, nextAttrs)))) el.removeAttribute(name);
|
|
1179
1194
|
}
|
|
1180
1195
|
for (const name in nextAttrs) {
|
|
1181
1196
|
const key = isEventHandler(name) ? `on-${getEventHandlerName(name)}` : name;
|
|
@@ -1289,17 +1304,16 @@ function toInsertNode(startNode, endNode) {
|
|
|
1289
1304
|
}
|
|
1290
1305
|
//#endregion
|
|
1291
1306
|
//#region src/dom/resolve-cursor-position.ts
|
|
1292
|
-
const R = /[
|
|
1307
|
+
const R = /[\p{L}\p{N}]/gu;
|
|
1293
1308
|
function resolveCursorPosition(inputType, initialPosition, initialValue, updatedValue) {
|
|
1294
1309
|
if ((initialPosition || initialPosition === 0) && (initialPosition !== initialValue.length || /kw/.test(inputType))) {
|
|
1295
1310
|
const before = initialValue.slice(0, initialPosition);
|
|
1296
1311
|
const after = initialValue.slice(initialPosition);
|
|
1297
1312
|
if (updatedValue.startsWith(before)) return initialPosition;
|
|
1298
1313
|
if (updatedValue.endsWith(after)) return updatedValue.length - after.length;
|
|
1299
|
-
let count = before.
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
return pos;
|
|
1314
|
+
let count = before.match(R)?.length;
|
|
1315
|
+
while (count && R.test(updatedValue)) count--;
|
|
1316
|
+
return count ? updatedValue.length : R.lastIndex;
|
|
1303
1317
|
}
|
|
1304
1318
|
return -1;
|
|
1305
1319
|
}
|
|
@@ -1643,12 +1657,12 @@ function _await_promise(nodeAccessor, params) {
|
|
|
1643
1657
|
if (!scope[promiseAccessor]) {
|
|
1644
1658
|
if (awaitBranch) awaitBranch[PendingRenders] ||= [];
|
|
1645
1659
|
if (tryPlaceholder) awaitCounter = addAwaitCounter(scope, tryPlaceholder);
|
|
1646
|
-
else
|
|
1660
|
+
else scheduleAwaitFrame(awaitCounter, scope, () => {
|
|
1647
1661
|
if (!awaitBranch["#DetachedAwait"]) {
|
|
1648
|
-
awaitBranch[
|
|
1662
|
+
awaitBranch[StartNode].parentNode.insertBefore(scope[nodeAccessor], awaitBranch[StartNode]);
|
|
1649
1663
|
tempDetachBranch(tryBranch);
|
|
1650
1664
|
}
|
|
1651
|
-
}
|
|
1665
|
+
});
|
|
1652
1666
|
}
|
|
1653
1667
|
const thisPromise = scope[promiseAccessor] = promise.then((data) => {
|
|
1654
1668
|
if (thisPromise === scope[promiseAccessor]) {
|
|
@@ -1713,12 +1727,15 @@ function addAwaitCounter(scope, tryBranch = findBranchWithKey(scope, Placeholder
|
|
|
1713
1727
|
let awaitCounter = tryBranch[AwaitCounter];
|
|
1714
1728
|
if (!awaitCounter?.i) awaitCounter = createAwaitCounter(tryBranch, () => dismissPlaceholder(tryBranch));
|
|
1715
1729
|
placeholderShown.add(pendingEffects);
|
|
1716
|
-
|
|
1717
|
-
insertBranchBefore(tryBranch[
|
|
1730
|
+
scheduleAwaitFrame(awaitCounter, tryBranch, () => {
|
|
1731
|
+
insertBranchBefore(tryBranch[PlaceholderBranch] = createAndSetupBranch(tryBranch[Global], tryBranch[PlaceholderContent], tryBranch["_"], tryBranch[StartNode].parentNode), tryBranch[StartNode].parentNode, tryBranch[StartNode]);
|
|
1718
1732
|
tempDetachBranch(tryBranch);
|
|
1719
|
-
}
|
|
1733
|
+
});
|
|
1720
1734
|
return awaitCounter;
|
|
1721
1735
|
}
|
|
1736
|
+
function scheduleAwaitFrame(awaitCounter, scope, render) {
|
|
1737
|
+
if (!awaitCounter.i++) requestAnimationFrame(() => awaitCounter.i && runEffects(prepareEffects(() => queueRender(scope, render, -1))));
|
|
1738
|
+
}
|
|
1722
1739
|
function createAwaitCounter(tryBranch, done) {
|
|
1723
1740
|
const awaitCounter = tryBranch[AwaitCounter] = {
|
|
1724
1741
|
i: 0,
|
|
@@ -1830,8 +1847,8 @@ let _dynamic_tag = /*@__PURE__*/ withBranches((nodeAccessor, getContent, getTagV
|
|
|
1830
1847
|
if (typeof normalizedRenderer === "string") {
|
|
1831
1848
|
if (getContent) {
|
|
1832
1849
|
const content = getContent(scope);
|
|
1833
|
-
setConditionalRenderer(scope[childScopeAccessor], `#${normalizedRenderer}/0`, content, createAndSetupBranch);
|
|
1834
|
-
if (content["accessor"]) subscribeToScopeSet(content[Owner], content[Accessor], scope[childScopeAccessor][`BranchScopes:#${normalizedRenderer}/0`]);
|
|
1850
|
+
setConditionalRenderer(scope[childScopeAccessor], `#${normalizedRenderer.toLowerCase()}/0`, content, createAndSetupBranch);
|
|
1851
|
+
if (content["accessor"]) subscribeToScopeSet(content[Owner], content[Accessor], scope[childScopeAccessor][`BranchScopes:#${normalizedRenderer.toLowerCase()}/0`]);
|
|
1835
1852
|
}
|
|
1836
1853
|
} else if (normalizedRenderer?.["accessor"]) subscribeToScopeSet(normalizedRenderer[Owner], normalizedRenderer[Accessor], scope[childScopeAccessor]);
|
|
1837
1854
|
}
|
|
@@ -1839,7 +1856,7 @@ let _dynamic_tag = /*@__PURE__*/ withBranches((nodeAccessor, getContent, getTagV
|
|
|
1839
1856
|
const childScope = scope[childScopeAccessor];
|
|
1840
1857
|
const args = getInput?.();
|
|
1841
1858
|
if (typeof normalizedRenderer === "string") {
|
|
1842
|
-
const nodeAccessor = `#${normalizedRenderer}/0`;
|
|
1859
|
+
const nodeAccessor = `#${normalizedRenderer.toLowerCase()}/0`;
|
|
1843
1860
|
(getContent ? _attrs : _attrs_content)(childScope, nodeAccessor, (inputIsArgs ? args[0] : args) || {}, controllableRenders[childScope[nodeAccessor].tagName]);
|
|
1844
1861
|
if (childScope["EventAttributes:" + nodeAccessor] || childScope["ControlledHandler:" + nodeAccessor]) queueEffect(childScope, dynamicTagScript);
|
|
1845
1862
|
} else {
|
|
@@ -1867,11 +1884,9 @@ const _dynamic_tag_content = /*@__PURE__*/ withBranches((nodeAccessor) => {
|
|
|
1867
1884
|
if (renderer) for (const accessor in renderer[LocalClosures]) renderer[LocalClosures][accessor](scope[childScopeAccessor], renderer[LocalClosureValues][accessor]);
|
|
1868
1885
|
};
|
|
1869
1886
|
});
|
|
1870
|
-
|
|
1871
|
-
_resume(DYNAMIC_TAG_SCRIPT_REGISTER_ID, dynamicTagScript);
|
|
1872
|
-
}
|
|
1887
|
+
const _resume_dynamic_tag = /*@__PURE__*/ withBranches(() => _resume(DYNAMIC_TAG_SCRIPT_REGISTER_ID, dynamicTagScript));
|
|
1873
1888
|
function dynamicTagScript(branch) {
|
|
1874
|
-
_attrs_script(branch, `#${branch[Renderer]}/0`);
|
|
1889
|
+
_attrs_script(branch, `#${branch[Renderer].toLowerCase()}/0`);
|
|
1875
1890
|
}
|
|
1876
1891
|
function setConditionalRenderer(scope, nodeAccessor, newRenderer, createBranch) {
|
|
1877
1892
|
const referenceNode = scope[nodeAccessor];
|
|
@@ -1992,17 +2007,27 @@ const loop = /*@__PURE__*/ withBranches((forEach) => (nodeAccessor, template, wa
|
|
|
1992
2007
|
}
|
|
1993
2008
|
};
|
|
1994
2009
|
});
|
|
1995
|
-
const _for_of = /*@__PURE__*/ loop(([all, by
|
|
2010
|
+
const _for_of = /*@__PURE__*/ loop(([all, by], cb) => {
|
|
2011
|
+
by ||= bySecondArg;
|
|
1996
2012
|
if (typeof by === "string") forOf(all, (item, i) => cb(item[by], [item, i]));
|
|
1997
2013
|
else forOf(all, (item, i) => cb(by(item, i), [item, i]));
|
|
1998
2014
|
});
|
|
1999
|
-
const _for_in = /*@__PURE__*/ loop(([obj, by
|
|
2000
|
-
|
|
2001
|
-
|
|
2015
|
+
const _for_in = /*@__PURE__*/ loop(([obj, by], cb) => {
|
|
2016
|
+
by ||= byFirstArg;
|
|
2017
|
+
forIn(obj, (key, value) => cb(by(key, value), [key, value]));
|
|
2018
|
+
});
|
|
2019
|
+
const _for_to = /*@__PURE__*/ loop(([to, from, step, by], cb) => {
|
|
2020
|
+
by ||= byFirstArg;
|
|
2021
|
+
forTo(to, from, step, (v) => cb(by(v), [v]));
|
|
2022
|
+
});
|
|
2023
|
+
const _for_until = /*@__PURE__*/ loop(([until, from, step, by], cb) => {
|
|
2024
|
+
by ||= byFirstArg;
|
|
2025
|
+
forUntil(until, from, step, (v) => cb(by(v), [v]));
|
|
2026
|
+
});
|
|
2002
2027
|
function createBranchWithTagNameOrRenderer($global, tagNameOrRenderer, parentScope, parentNode) {
|
|
2003
2028
|
if (typeof tagNameOrRenderer === "string") assertValidTagName(tagNameOrRenderer);
|
|
2004
2029
|
const branch = createBranch($global, tagNameOrRenderer, parentScope, parentNode);
|
|
2005
|
-
if (typeof tagNameOrRenderer === "string") branch[`#${tagNameOrRenderer}/0`] = branch[StartNode] = branch[EndNode] = document.createElementNS(tagNameOrRenderer === "svg" ? "http://www.w3.org/2000/svg" : tagNameOrRenderer === "math" ? "http://www.w3.org/1998/Math/MathML" : parentNode.namespaceURI, tagNameOrRenderer);
|
|
2030
|
+
if (typeof tagNameOrRenderer === "string") branch[`#${tagNameOrRenderer.toLowerCase()}/0`] = branch[StartNode] = branch[EndNode] = document.createElementNS(tagNameOrRenderer === "svg" ? "http://www.w3.org/2000/svg" : tagNameOrRenderer === "math" ? "http://www.w3.org/1998/Math/MathML" : parentNode.namespaceURI, tagNameOrRenderer);
|
|
2006
2031
|
else setupBranch(tagNameOrRenderer, branch);
|
|
2007
2032
|
return branch;
|
|
2008
2033
|
}
|
package/dist/debug/dom.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_control_flow = require("./dom-
|
|
3
|
+
const require_control_flow = require("./dom-Bj58jt8y.js");
|
|
4
4
|
//#region src/common/attr-tag.ts
|
|
5
5
|
const empty = [];
|
|
6
6
|
const rest = Symbol("Attribute Tag");
|
|
@@ -35,6 +35,7 @@ const classIdToBranch = /* @__PURE__ */ new Map();
|
|
|
35
35
|
let classEventResolver;
|
|
36
36
|
const scopesByRender = /* @__PURE__ */ new WeakMap();
|
|
37
37
|
const getRenderScopes = ($global) => {
|
|
38
|
+
require_control_flow.init($global.runtimeId);
|
|
38
39
|
const render = self[$global.runtimeId]?.[$global.renderId];
|
|
39
40
|
let scopes = render && scopesByRender.get(render);
|
|
40
41
|
if (render && !scopes) scopesByRender.set(render, scopes = {});
|
|
@@ -96,6 +97,7 @@ const compat = {
|
|
|
96
97
|
return renderer;
|
|
97
98
|
},
|
|
98
99
|
render(out, component, renderer, args) {
|
|
100
|
+
require_control_flow.init(out.global.runtimeId);
|
|
99
101
|
let branch = component.scope;
|
|
100
102
|
let created = 0;
|
|
101
103
|
if (!branch && (branch = classIdToBranch.get(component.id))) {
|
package/dist/debug/dom.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as _html, $t as queueEffect, A as _attr_select_value, At as _id, B as _attr_class, Bt as _assert_init, C as _attr_input_checked_default, Ct as _closure_get, D as _attr_input_value_default, Dt as _for_selector, E as _attr_input_value_attribute_default, Et as _for_closure, F as _controllable_select, Ft as _return, G as _attr_style, Gt as _on, H as _attr_class_items, Ht as insertBranchBefore, I as _controllable_textarea, It as _return_change, J as _attrs, K as _attr_style_item, Kt as $signal, Lt as _script, M as _attr_select_value_script, Mt as _let, N as _controllable_input, Nt as _let_change, O as _attr_input_value_dynamic_default, Ot as _hoist, P as _controllable_open, Pt as _or, Q as _attrs_script, Qt as queueAsyncRender, Rt as _var, S as _attr_input_checkedValue_script, St as _closure, T as _attr_input_value, Tn as TagVariable, Tt as _el_read, U as _attr_content, Ut as removeAndDestroyBranch, V as _attr_class_item, Vt as destroyBranch, W as _attr_nonce, Wt as syncGen, X as _attrs_partial, Y as _attrs_content, Z as _attrs_partial_content, Zt as prepareEffects, _ as _attr_details_or_dialog_open_default, _n as EndNode, _t as getRegisteredWithScope, a as _for_in, an as forTo, at as _to_text, b as _attr_input_checkedValue, bn as Load, bt as ready, c as _for_until, cn as _call, ct as _content, d as _show, dn as Params, dt as createAndSetupBranch, en as run, et as _lifecycle, f as _try, fn as Setup, ft as createBranch, g as _attr_details_or_dialog_open, gt as _var_resume, h as renderCatch, ht as _resume, i as _dynamic_tag_content, in as forOf, it as _text_content, j as _attr_select_value_default, jt as _if_closure, k as _attr_input_value_script, kt as _hoist_resume, l as _if, ln as Clone, lt as _content_closures, m as patchDynamicTag, mt as _el, n as _await_promise, nn as runId, nt as _style_shell, o as _for_of, on as forUntil, ot as insertChildNodes, p as addAwaitCounter, pt as setupBranch, q as _attr_style_items, qt as $signalReset, r as _dynamic_tag, rn as forIn, rt as _text, s as _for_to, sn as _assert_hoist, st as toInsertNode, t as _await_content, tn as runEffects, tt as _style_rule_item, u as _resume_dynamic_tag, un as Owner, ut as _content_resume, v as _attr_details_or_dialog_open_script, vt as init, w as _attr_input_checked_script, wn as StartNode, wt as _const, x as _attr_input_checkedValue_default, xt as _child_setup, y as _attr_input_checked, yn as Global, yt as initEmbedded, z as _attr, zt as _var_change } from "./dom-
|
|
1
|
+
import { $ as _html, $t as queueEffect, A as _attr_select_value, At as _id, B as _attr_class, Bt as _assert_init, C as _attr_input_checked_default, Ct as _closure_get, D as _attr_input_value_default, Dt as _for_selector, E as _attr_input_value_attribute_default, Et as _for_closure, F as _controllable_select, Ft as _return, G as _attr_style, Gt as _on, H as _attr_class_items, Ht as insertBranchBefore, I as _controllable_textarea, It as _return_change, J as _attrs, K as _attr_style_item, Kt as $signal, Lt as _script, M as _attr_select_value_script, Mt as _let, N as _controllable_input, Nt as _let_change, O as _attr_input_value_dynamic_default, Ot as _hoist, P as _controllable_open, Pt as _or, Q as _attrs_script, Qt as queueAsyncRender, Rt as _var, S as _attr_input_checkedValue_script, St as _closure, T as _attr_input_value, Tn as TagVariable, Tt as _el_read, U as _attr_content, Ut as removeAndDestroyBranch, V as _attr_class_item, Vt as destroyBranch, W as _attr_nonce, Wt as syncGen, X as _attrs_partial, Y as _attrs_content, Z as _attrs_partial_content, Zt as prepareEffects, _ as _attr_details_or_dialog_open_default, _n as EndNode, _t as getRegisteredWithScope, a as _for_in, an as forTo, at as _to_text, b as _attr_input_checkedValue, bn as Load, bt as ready, c as _for_until, cn as _call, ct as _content, d as _show, dn as Params, dt as createAndSetupBranch, en as run, et as _lifecycle, f as _try, fn as Setup, ft as createBranch, g as _attr_details_or_dialog_open, gt as _var_resume, h as renderCatch, ht as _resume, i as _dynamic_tag_content, in as forOf, it as _text_content, j as _attr_select_value_default, jt as _if_closure, k as _attr_input_value_script, kt as _hoist_resume, l as _if, ln as Clone, lt as _content_closures, m as patchDynamicTag, mt as _el, n as _await_promise, nn as runId, nt as _style_shell, o as _for_of, on as forUntil, ot as insertChildNodes, p as addAwaitCounter, pt as setupBranch, q as _attr_style_items, qt as $signalReset, r as _dynamic_tag, rn as forIn, rt as _text, s as _for_to, sn as _assert_hoist, st as toInsertNode, t as _await_content, tn as runEffects, tt as _style_rule_item, u as _resume_dynamic_tag, un as Owner, ut as _content_resume, v as _attr_details_or_dialog_open_script, vt as init, w as _attr_input_checked_script, wn as StartNode, wt as _const, x as _attr_input_checkedValue_default, xt as _child_setup, y as _attr_input_checked, yn as Global, yt as initEmbedded, z as _attr, zt as _var_change } from "./dom-klf8Ec_o.mjs";
|
|
2
2
|
//#region src/common/attr-tag.ts
|
|
3
3
|
const empty = [];
|
|
4
4
|
const rest = Symbol("Attribute Tag");
|
|
@@ -33,6 +33,7 @@ const classIdToBranch = /* @__PURE__ */ new Map();
|
|
|
33
33
|
let classEventResolver;
|
|
34
34
|
const scopesByRender = /* @__PURE__ */ new WeakMap();
|
|
35
35
|
const getRenderScopes = ($global) => {
|
|
36
|
+
init($global.runtimeId);
|
|
36
37
|
const render = self[$global.runtimeId]?.[$global.renderId];
|
|
37
38
|
let scopes = render && scopesByRender.get(render);
|
|
38
39
|
if (render && !scopes) scopesByRender.set(render, scopes = {});
|
|
@@ -94,6 +95,7 @@ const compat = {
|
|
|
94
95
|
return renderer;
|
|
95
96
|
},
|
|
96
97
|
render(out, component, renderer, args) {
|
|
98
|
+
init(out.global.runtimeId);
|
|
97
99
|
let branch = component.scope;
|
|
98
100
|
let created = 0;
|
|
99
101
|
if (!branch && (branch = classIdToBranch.get(component.id))) {
|