marko 6.4.1 → 6.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cheatsheet.md +1 -1
- package/dist/common/constants/accessor-prop.d.ts +1 -0
- package/dist/common/constants/accessor-prop.debug.d.ts +1 -0
- package/dist/common/errors.d.ts +1 -0
- package/dist/common/opt.d.ts +1 -0
- package/dist/common/types.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/dynamic-tag-script.feat.js +1 -1
- package/dist/debug/dom/dynamic-tag-script.feat.mjs +1 -1
- package/dist/debug/dom/dynamic-tag-var.feat.js +6 -2
- package/dist/debug/dom/dynamic-tag-var.feat.mjs +6 -2
- package/dist/debug/dom/lazy.feat.js +1 -1
- package/dist/debug/dom/lazy.feat.mjs +1 -1
- package/dist/debug/dom/placeholder.feat.js +1 -1
- package/dist/debug/dom/placeholder.feat.mjs +1 -1
- package/dist/debug/{dom-ClV4kVOO.js → dom-C7F3yZTh.js} +119 -24
- package/dist/debug/{dom-LFrKxOk5.mjs → dom-uEY0J_H9.mjs} +78 -25
- package/dist/debug/dom.js +16 -4
- package/dist/debug/dom.mjs +14 -5
- package/dist/debug/html.js +288 -78
- package/dist/debug/html.mjs +288 -79
- package/dist/dom/catch.feat.js +4 -4
- package/dist/dom/catch.feat.mjs +1 -1
- package/dist/dom/control-flow.d.ts +2 -2
- package/dist/dom/controllable-input.feat.js +2 -2
- package/dist/dom/controllable-input.feat.mjs +1 -1
- package/dist/dom/controllable-open.feat.js +2 -2
- package/dist/dom/controllable-open.feat.mjs +1 -1
- package/dist/dom/controllable-select.feat.js +2 -2
- package/dist/dom/controllable-select.feat.mjs +1 -1
- package/dist/dom/controllable-textarea.feat.js +2 -2
- package/dist/dom/controllable-textarea.feat.mjs +1 -1
- package/dist/dom/controllable.feat.js +2 -2
- package/dist/dom/controllable.feat.mjs +1 -1
- package/dist/dom/dom.d.ts +1 -0
- package/dist/dom/dynamic-tag-script.feat.js +2 -2
- package/dist/dom/dynamic-tag-script.feat.mjs +1 -1
- package/dist/dom/dynamic-tag-var.feat.js +4 -2
- package/dist/dom/dynamic-tag-var.feat.mjs +4 -3
- package/dist/dom/lazy.feat.js +1 -1
- package/dist/dom/lazy.feat.mjs +1 -1
- package/dist/dom/load.d.ts +1 -0
- package/dist/dom/placeholder.feat.js +3 -3
- package/dist/dom/placeholder.feat.mjs +1 -1
- package/dist/dom/queue.d.ts +4 -1
- package/dist/{dom-CNglVi8P.js → dom-CtIT8Mpr.js} +201 -138
- package/dist/{dom-DfP3MCo0.mjs → dom-DHg9YChM.mjs} +60 -27
- package/dist/dom.d.ts +3 -3
- package/dist/dom.js +41 -34
- package/dist/dom.mjs +12 -5
- package/dist/html/assets.d.ts +12 -6
- package/dist/html/attrs.d.ts +1 -0
- package/dist/html/compat.d.ts +10 -2
- package/dist/html/serializer.d.ts +1 -0
- package/dist/html/writer.d.ts +8 -0
- package/dist/html.d.ts +1 -1
- package/dist/html.js +207 -62
- package/dist/html.mjs +207 -62
- package/dist/translator/index.js +432 -213
- package/dist/translator/util/bindings.d.ts +9 -1
- package/dist/translator/util/constants/structure-kind.d.ts +1 -0
- package/dist/translator/util/known-tag.d.ts +2 -1
- package/dist/translator/util/module-read.d.ts +21 -0
- package/dist/translator/util/references.d.ts +1 -0
- package/dist/translator/util/runtime.d.ts +2 -0
- package/dist/translator/util/sections.d.ts +5 -1
- package/dist/translator/util/structure.d.ts +1 -0
- package/package.json +3 -3
- package/tags-html.d.ts +6 -5
|
@@ -22,6 +22,7 @@ const AbortControllers = "#AbortControllers";
|
|
|
22
22
|
const AbortScopes = "#AbortScopes";
|
|
23
23
|
const AwaitCounter = "#AwaitCounter";
|
|
24
24
|
const BranchAccessor = "#BranchAccessor";
|
|
25
|
+
const BranchRenders = "#BranchRenders";
|
|
25
26
|
const BranchScopes = "#BranchScopes";
|
|
26
27
|
const CatchContent = "#CatchContent";
|
|
27
28
|
const ClosestBranch = "#ClosestBranch";
|
|
@@ -200,6 +201,16 @@ function assertValidAttrValue(name, value) {
|
|
|
200
201
|
const unrenderable = describeUnrenderable(value);
|
|
201
202
|
if (unrenderable) throw new Error(`The \`${name}\` attribute cannot be ${unrenderable}.`);
|
|
202
203
|
}
|
|
204
|
+
function _assert_class_toggles(classes, toggles) {
|
|
205
|
+
{
|
|
206
|
+
const written = new Set(classes.split(" "));
|
|
207
|
+
for (const toggle of toggles) {
|
|
208
|
+
const names = new Set(toggle.split(" "));
|
|
209
|
+
for (const name of names) if (written.has(name)) throw new Error(`The toggled class \`${name}\` is also written by another part of the \`class\` value; a toggled class may appear only once.`);
|
|
210
|
+
for (const name of names) written.add(name);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
203
214
|
function assertValidTextValue(value) {
|
|
204
215
|
const unrenderable = describeUnrenderable(value);
|
|
205
216
|
if (unrenderable) throw new Error(`Text content cannot be ${unrenderable}.`);
|
|
@@ -331,16 +342,19 @@ let rendering;
|
|
|
331
342
|
let runId = 2;
|
|
332
343
|
let pendingEffects = [];
|
|
333
344
|
let pendingRenders = [];
|
|
334
|
-
const
|
|
345
|
+
const ranRenders = /*@__PURE__*/ new WeakMap();
|
|
335
346
|
function queueRender(scope, signal, signalKey, value, scopeKey = scope["#Id"]) {
|
|
336
347
|
let render;
|
|
337
348
|
if (signalKey >= 0 && (render = scope[signalKey])) {
|
|
338
349
|
render[Value] = value;
|
|
339
|
-
if (render["gen"] === runId || catchEnabled && render["pending"])
|
|
350
|
+
if (render["gen"] === runId || catchEnabled && render["pending"]) {
|
|
351
|
+
if (!render["pending"] && ranRenders.get(render) === runId) console.error("A render was queued again after it ran in this update, so its latest value is dropped. This is a bug in Marko.");
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
340
354
|
render["gen"] = runId;
|
|
341
355
|
} else {
|
|
342
356
|
render = {
|
|
343
|
-
["key"]: scopeKey *
|
|
357
|
+
["key"]: scopeKey * 1e6 + signalKey,
|
|
344
358
|
[Scope]: scope,
|
|
345
359
|
[Signal]: signal,
|
|
346
360
|
[Value]: value,
|
|
@@ -350,7 +364,7 @@ function queueRender(scope, signal, signalKey, value, scopeKey = scope["#Id"]) {
|
|
|
350
364
|
}
|
|
351
365
|
queuePendingRender(render);
|
|
352
366
|
}
|
|
353
|
-
|
|
367
|
+
let queuePendingRender = (render) => {
|
|
354
368
|
let i = pendingRenders.push(render) - 1;
|
|
355
369
|
while (i) {
|
|
356
370
|
const parentIndex = i - 1 >> 1;
|
|
@@ -360,6 +374,34 @@ function queuePendingRender(render) {
|
|
|
360
374
|
i = parentIndex;
|
|
361
375
|
}
|
|
362
376
|
pendingRenders[i] = render;
|
|
377
|
+
};
|
|
378
|
+
function createBranchRenders(scope, scopeKey) {
|
|
379
|
+
return {
|
|
380
|
+
["key"]: scopeKey * 1e6 - 1,
|
|
381
|
+
[Scope]: scope,
|
|
382
|
+
[Signal]: runBranchRenders,
|
|
383
|
+
[Value]: [],
|
|
384
|
+
["gen"]: 0
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
function installBranchRenders() {
|
|
388
|
+
const queue = queuePendingRender;
|
|
389
|
+
queuePendingRender = (render) => {
|
|
390
|
+
const branchRenders = render[Scope][ClosestBranch]?.[BranchRenders];
|
|
391
|
+
if (branchRenders) {
|
|
392
|
+
if (branchRenders["gen"] !== runId && !branchRenders["pending"]) branchRenders[Value] = [];
|
|
393
|
+
branchRenders["gen"] = runId;
|
|
394
|
+
const renders = branchRenders[Value];
|
|
395
|
+
if (!renders.length) queuePendingRender(branchRenders);
|
|
396
|
+
const prev = pendingRenders;
|
|
397
|
+
pendingRenders = renders;
|
|
398
|
+
queue(render);
|
|
399
|
+
pendingRenders = prev;
|
|
400
|
+
} else queue(render);
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
function runBranchRenders(_scope, renders) {
|
|
404
|
+
runRenders(renders);
|
|
363
405
|
}
|
|
364
406
|
function queueEffect(scope, fn) {
|
|
365
407
|
pendingEffects.push(fn, scope);
|
|
@@ -411,26 +453,27 @@ function installCatch(catchEffects, wrapRender) {
|
|
|
411
453
|
runEffects = catchEffects;
|
|
412
454
|
runRender = wrapRender(runRender);
|
|
413
455
|
}
|
|
414
|
-
function runRenders() {
|
|
415
|
-
while (
|
|
416
|
-
const render =
|
|
417
|
-
const item =
|
|
456
|
+
function runRenders(renders = pendingRenders) {
|
|
457
|
+
while (renders.length) {
|
|
458
|
+
const render = renders[0];
|
|
459
|
+
const item = renders.pop();
|
|
418
460
|
if (render !== item) {
|
|
419
461
|
let i = 0;
|
|
420
|
-
const mid =
|
|
421
|
-
const key = (
|
|
462
|
+
const mid = renders.length >> 1;
|
|
463
|
+
const key = (renders[0] = item)["key"];
|
|
422
464
|
while (i < mid) {
|
|
423
465
|
let bestChild = (i << 1) + 1;
|
|
424
466
|
const right = bestChild + 1;
|
|
425
|
-
if (right <
|
|
426
|
-
if (
|
|
467
|
+
if (right < renders.length && renders[right]["key"] - renders[bestChild]["key"] < 0) bestChild = right;
|
|
468
|
+
if (renders[bestChild]["key"] - key >= 0) break;
|
|
427
469
|
else {
|
|
428
|
-
|
|
470
|
+
renders[i] = renders[bestChild];
|
|
429
471
|
i = bestChild;
|
|
430
472
|
}
|
|
431
473
|
}
|
|
432
|
-
|
|
474
|
+
renders[i] = item;
|
|
433
475
|
}
|
|
476
|
+
ranRenders.set(render, runId);
|
|
434
477
|
runRender(render);
|
|
435
478
|
}
|
|
436
479
|
}
|
|
@@ -674,9 +717,9 @@ function _for_closure(ownerLoopNodeAccessor, fn) {
|
|
|
674
717
|
const scopeAccessor = BranchScopes$1 + ownerLoopNodeAccessor;
|
|
675
718
|
const ownerSignal = (ownerScope) => {
|
|
676
719
|
const scopes = toArray(ownerScope[scopeAccessor]);
|
|
677
|
-
|
|
720
|
+
queueRender(ownerScope, () => {
|
|
678
721
|
for (const scope of scopes) if (scope["#Gen"] > 0 && scope["#Gen"] < runId) fn(scope);
|
|
679
|
-
}, -1
|
|
722
|
+
}, -1);
|
|
680
723
|
};
|
|
681
724
|
ownerSignal._ = fn;
|
|
682
725
|
return ownerSignal;
|
|
@@ -686,8 +729,7 @@ function _for_selector(ownerLoopNodeAccessor, ownerValueAccessor, keyValueAccess
|
|
|
686
729
|
const mapAccessor = KeyedScopes + ownerLoopNodeAccessor;
|
|
687
730
|
const prevKeyProp = `${PreviousKey}${ownerValueAccessor}`;
|
|
688
731
|
const ownerSignal = (ownerScope) => {
|
|
689
|
-
|
|
690
|
-
if (ownerScope["#Gen"] < runId && scopes.length) {
|
|
732
|
+
if (ownerScope["#Gen"] < runId) {
|
|
691
733
|
const nextKey = ownerScope[ownerValueAccessor];
|
|
692
734
|
queueRender(ownerScope, () => {
|
|
693
735
|
const map = keyedScopes(ownerScope, scopeAccessor, mapAccessor, keyValueAccessor);
|
|
@@ -700,7 +742,7 @@ function _for_selector(ownerLoopNodeAccessor, ownerValueAccessor, keyValueAccess
|
|
|
700
742
|
}
|
|
701
743
|
} else for (const scope of toArray(ownerScope[scopeAccessor])) runLiveBranch(scope, fn);
|
|
702
744
|
if (map) map[prevKeyProp] = nextKey;
|
|
703
|
-
}, -1
|
|
745
|
+
}, -1);
|
|
704
746
|
}
|
|
705
747
|
};
|
|
706
748
|
ownerSignal._ = fn;
|
|
@@ -1231,6 +1273,14 @@ function _attr_class_items(element, items) {
|
|
|
1231
1273
|
function _attr_class_item(element, name, value) {
|
|
1232
1274
|
element.classList.toggle(name, !!value);
|
|
1233
1275
|
}
|
|
1276
|
+
function _attr_class_names(element, names, value) {
|
|
1277
|
+
let start = 0;
|
|
1278
|
+
let end;
|
|
1279
|
+
do {
|
|
1280
|
+
end = names.indexOf(" ", start);
|
|
1281
|
+
element.classList.toggle(names.slice(start, end >>> 0), !!value);
|
|
1282
|
+
} while (start = end + 1);
|
|
1283
|
+
}
|
|
1234
1284
|
function _attr_style(element, value) {
|
|
1235
1285
|
setAttribute(element, "style", toDelimitedString(value, ";", stringifyStyleObject) || void 0);
|
|
1236
1286
|
}
|
|
@@ -1974,6 +2024,7 @@ function patchDynamicTag(fn) {
|
|
|
1974
2024
|
_dynamic_tag = fn(_dynamic_tag);
|
|
1975
2025
|
}
|
|
1976
2026
|
let _dynamic_tag = /*@__PURE__*/ withBranches((nodeAccessor, getContent, getTagVar, inputIsArgs) => {
|
|
2027
|
+
const scopeOffsetAccessor = getTagVar && getDebugKey(+nodeAccessor.slice(nodeAccessor.lastIndexOf("/") + 1) + 1, "#scopeOffset");
|
|
1977
2028
|
const childScopeAccessor = BranchScopes$1 + nodeAccessor;
|
|
1978
2029
|
const rendererAccessor = ConditionalRenderer + nodeAccessor;
|
|
1979
2030
|
return (scope, newRenderer, getInput) => {
|
|
@@ -1984,7 +2035,7 @@ let _dynamic_tag = /*@__PURE__*/ withBranches((nodeAccessor, getContent, getTagV
|
|
|
1984
2035
|
if (getTagVar) {
|
|
1985
2036
|
if (scope[childScopeAccessor]) {
|
|
1986
2037
|
scope[childScopeAccessor][TagVariable] = (value) => getTagVar()(scope, value);
|
|
1987
|
-
|
|
2038
|
+
bindTagVar(scope, scope[childScopeAccessor], scope[scopeOffsetAccessor], normalizedRenderer);
|
|
1988
2039
|
} else getTagVar()(scope, void 0);
|
|
1989
2040
|
}
|
|
1990
2041
|
if (typeof renderer === "string") {
|
|
@@ -1993,7 +2044,10 @@ let _dynamic_tag = /*@__PURE__*/ withBranches((nodeAccessor, getContent, getTagV
|
|
|
1993
2044
|
setConditionalRenderer(scope[childScopeAccessor], `#${renderer.toLowerCase()}/0`, content, createAndSetupBranch);
|
|
1994
2045
|
if (content["accessor"]) subscribeToScopeSet(content[Owner], content[Accessor], scope[childScopeAccessor][`BranchScopes:#${renderer.toLowerCase()}/0`]);
|
|
1995
2046
|
}
|
|
1996
|
-
} else if (renderer
|
|
2047
|
+
} else if (renderer) {
|
|
2048
|
+
setupBranch(renderer, scope[childScopeAccessor]);
|
|
2049
|
+
if (renderer["accessor"]) subscribeToScopeSet(renderer[Owner], renderer[Accessor], scope[childScopeAccessor]);
|
|
2050
|
+
}
|
|
1997
2051
|
}
|
|
1998
2052
|
if (normalizedRenderer) {
|
|
1999
2053
|
const childScope = scope[childScopeAccessor];
|
|
@@ -2029,9 +2083,9 @@ const _dynamic_tag_content = /*@__PURE__*/ withBranches((nodeAccessor) => {
|
|
|
2029
2083
|
renderer?.[LocalClosures]?.(scope[childScopeAccessor]);
|
|
2030
2084
|
};
|
|
2031
2085
|
});
|
|
2032
|
-
let
|
|
2086
|
+
let bindTagVar;
|
|
2033
2087
|
function installDynamicTagVar(bind) {
|
|
2034
|
-
|
|
2088
|
+
bindTagVar = bind;
|
|
2035
2089
|
}
|
|
2036
2090
|
function dynamicTagScript(branch) {
|
|
2037
2091
|
_attrs_script(branch, `#${branch[Renderer].toLowerCase()}/0`);
|
|
@@ -2184,7 +2238,6 @@ function createBranchWithTagNameOrRenderer($global, tagNameOrRenderer, parentSco
|
|
|
2184
2238
|
if (typeof tagNameOrRenderer === "string") assertValidTagName(tagNameOrRenderer);
|
|
2185
2239
|
const branch = createBranch($global, tagNameOrRenderer, parentScope, parentNode);
|
|
2186
2240
|
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);
|
|
2187
|
-
else setupBranch(tagNameOrRenderer, branch);
|
|
2188
2241
|
return branch;
|
|
2189
2242
|
}
|
|
2190
2243
|
function bySecondArg(_item, index) {
|
|
@@ -2194,4 +2247,4 @@ function byFirstArg(name) {
|
|
|
2194
2247
|
return name;
|
|
2195
2248
|
}
|
|
2196
2249
|
//#endregion
|
|
2197
|
-
export {
|
|
2250
|
+
export { _attr_style_item as $, destroyBranch as $t, _attr_input_checked_script as A, Params as An, readyFailed as At, _controllable_open as B, Load as Bn, _hoist as Bt, _attr_details_or_dialog_open_default as C, _assert_class_toggles as Cn, _el as Ct, _attr_input_checkedValue_default as D, withBranches as Dn, init as Dt, _attr_input_checkedValue as E, _call as En, getRegisteredWithScope as Et, _attr_input_value_script as F, BranchRenders as Fn, _const as Ft, _attr as G, PlaceholderBranch as Gn, _let_change as Gt, _controllable_textarea as H, PendingEffectScopes as Hn, _id as Ht, _attr_select_value as I, ClosestBranch as In, _el_read as It, _attr_class_items as J, _return_change as Jt, _attr_class as K, StartNode as Kn, _or as Kt, _attr_select_value_default as L, EndNode as Ln, _for_closure as Lt, _attr_input_value_attribute_default as M, Pending as Mn, _child_setup as Mt, _attr_input_value_default as N, Scope as Nn, _closure as Nt, _attr_input_checkedValue_script as O, Clone as On, initEmbedded as Ot, _attr_input_value_dynamic_default as P, AwaitCounter as Pn, _closure_get as Pt, _attr_style as Q, _assert_init as Qt, _attr_select_value_script as R, Gen$1 as Rn, _for_selector as Rt, _attr_details_or_dialog_open as S, forUntil as Sn, _dynamic_tag_var_resume as St, _attr_input_checked as T, _hoist_read_error as Tn, _var_resume as Tt, controllableRenders as U, PendingEffects as Un, _if_closure as Ut, _controllable_select as V, ParentBranch as Vn, _hoist_resume as Vt, controllableScripts as W, PendingRenders as Wn, _let as Wt, _attr_content as X, _var as Xt, _attr_class_names as Y, _script as Yt, _attr_nonce as Z, _var_change as Zt, dynamicTagScript as _, runEffects as _n, _content_resume as _t, _for_in as a, _on as an, _attrs_script as at, renderCatch as b, forOf as bn, setParentBranch as bt, _for_to as c, createBranchRenders as cn, _style_rule_item as ct, _for_until_unkeyed as d, prepareEffects as dn, _text_content as dt, insertBranchBefore as en, _attr_style_items as et, _if as f, queueAsyncRender as fn, _to_text as ft, bindTagVar as g, run as gn, _content_closures as gt, addAwaitCounter as h, rendering as hn, _content as ht, _dynamic_tag_content as i, PLACEHOLDER_DISMISS_REGISTER_ID as in, _attrs_partial_content as it, _attr_input_value as j, Setup as jn, withLazy as jt, _attr_input_checked_default as k, Owner as kn, ready as kt, _for_to_unkeyed as l, installBranchRenders as ln, _style_shell as lt, _try as m, queueRender as mn, toInsertNode as mt, _await_promise as n, syncGen as nn, _attrs_content as nt, _for_of as o, $signal as on, _html as ot, _show as p, queueEffect as pn, insertChildNodes as pt, _attr_class_item as q, TagVariable as qn, _return as qt, _dynamic_tag as r, DYNAMIC_TAG_SCRIPT_REGISTER_ID as rn, _attrs_partial as rt, _for_of_unkeyed as s, $signalReset as sn, _lifecycle as st, _await_content as t, removeAndDestroyBranch as tn, _attrs as tt, _for_until as u, installCatch as un, _text as ut, installDynamicTagVar as v, runId as vn, createAndSetupBranch as vt, _attr_details_or_dialog_open_script as w, _assert_hoist as wn, _resumed as wt, runPendingEffects as x, forTo as xn, setupBranch as xt, patchDynamicTag as y, forIn as yn, createBranch as yt, _controllable_input as z, Global as zn, _global_read as zt };
|
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-C7F3yZTh.js");
|
|
4
4
|
//#region src/common/attr-tag.ts
|
|
5
5
|
const empty = [];
|
|
6
6
|
const rest = Symbol("Attribute Tag");
|
|
@@ -223,18 +223,27 @@ function _load_setup(load) {
|
|
|
223
223
|
}
|
|
224
224
|
};
|
|
225
225
|
}
|
|
226
|
+
function _load_setup_var(load) {
|
|
227
|
+
const setup = _load_setup(load);
|
|
228
|
+
return (owner, child, marker) => {
|
|
229
|
+
require_control_flow.setParentBranch(child, child[require_control_flow.ClosestBranch]);
|
|
230
|
+
require_control_flow.bindTagVar(owner, child, child["#Id"]);
|
|
231
|
+
setup(owner, child, marker);
|
|
232
|
+
};
|
|
233
|
+
}
|
|
226
234
|
function insertLoaded(renderer, branch, marker, awaitCounter) {
|
|
227
|
-
const parent = marker.parentNode, values = branch[require_control_flow.Load], clone = () => {
|
|
235
|
+
const parent = () => marker.parentNode, values = branch[require_control_flow.Load], clone = () => {
|
|
228
236
|
require_control_flow.syncGen(branch);
|
|
229
|
-
renderer[require_control_flow.Clone](branch, parent.namespaceURI);
|
|
237
|
+
renderer[require_control_flow.Clone](branch, parent().namespaceURI);
|
|
230
238
|
branch[require_control_flow.Load] = 0;
|
|
231
239
|
}, insert = () => {
|
|
232
|
-
require_control_flow.insertBranchBefore(branch, parent, marker);
|
|
240
|
+
require_control_flow.insertBranchBefore(branch, parent(), marker);
|
|
233
241
|
marker.remove();
|
|
234
242
|
awaitCounter?.c();
|
|
235
243
|
};
|
|
236
244
|
let remaining;
|
|
237
245
|
if (remaining = values?.size) {
|
|
246
|
+
awaitCounter ||= require_control_flow.addAwaitCounter(branch);
|
|
238
247
|
const fail = loadFailed(branch, awaitCounter);
|
|
239
248
|
values.forEach(([, apply], promise) => promise.then((mod) => (apply._ = mod._) && !--remaining && require_control_flow.queueAsyncRender(branch, (branch) => {
|
|
240
249
|
clone();
|
|
@@ -295,12 +304,14 @@ function getSelectorOrResolve(selector, resolve) {
|
|
|
295
304
|
//#endregion
|
|
296
305
|
exports.$signal = require_control_flow.$signal;
|
|
297
306
|
exports.$signalReset = require_control_flow.$signalReset;
|
|
307
|
+
exports._assert_class_toggles = require_control_flow._assert_class_toggles;
|
|
298
308
|
exports._assert_hoist = require_control_flow._assert_hoist;
|
|
299
309
|
exports._assert_init = require_control_flow._assert_init;
|
|
300
310
|
exports._attr = require_control_flow._attr;
|
|
301
311
|
exports._attr_class = require_control_flow._attr_class;
|
|
302
312
|
exports._attr_class_item = require_control_flow._attr_class_item;
|
|
303
313
|
exports._attr_class_items = require_control_flow._attr_class_items;
|
|
314
|
+
exports._attr_class_names = require_control_flow._attr_class_names;
|
|
304
315
|
exports._attr_content = require_control_flow._attr_content;
|
|
305
316
|
exports._attr_details_open = require_control_flow._attr_details_or_dialog_open;
|
|
306
317
|
exports._attr_details_open_default = require_control_flow._attr_details_or_dialog_open_default;
|
|
@@ -383,6 +394,7 @@ exports._load_idle_trigger = _load_idle_trigger;
|
|
|
383
394
|
exports._load_media_trigger = _load_media_trigger;
|
|
384
395
|
exports._load_race_trigger = _load_race_trigger;
|
|
385
396
|
exports._load_setup = _load_setup;
|
|
397
|
+
exports._load_setup_var = _load_setup_var;
|
|
386
398
|
exports._load_signal = _load_signal;
|
|
387
399
|
exports._load_template = _load_template;
|
|
388
400
|
exports._load_visible_trigger = _load_visible_trigger;
|
package/dist/debug/dom.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as _attr_style_item, $t as destroyBranch, A as _attr_input_checked_script, An as Params, At as readyFailed, B as _controllable_open, Bn as Load, Bt as _hoist, C as _attr_details_or_dialog_open_default, Cn as _assert_class_toggles, Ct as _el, D as _attr_input_checkedValue_default, Dt as init, E as _attr_input_checkedValue, En as _call, Et as getRegisteredWithScope, F as _attr_input_value_script, Ft as _const, G as _attr, Gt as _let_change, H as _controllable_textarea, Ht as _id, I as _attr_select_value, In as ClosestBranch, It as _el_read, J as _attr_class_items, Jt as _return_change, K as _attr_class, Kn as StartNode, Kt as _or, L as _attr_select_value_default, Ln as EndNode, Lt as _for_closure, M as _attr_input_value_attribute_default, Mt as _child_setup, N as _attr_input_value_default, Nt as _closure, O as _attr_input_checkedValue_script, On as Clone, Ot as initEmbedded, P as _attr_input_value_dynamic_default, Pt as _closure_get, Q as _attr_style, Qt as _assert_init, R as _attr_select_value_script, Rt as _for_selector, S as _attr_details_or_dialog_open, Sn as forUntil, St as _dynamic_tag_var_resume, T as _attr_input_checked, Tn as _hoist_read_error, Tt as _var_resume, Ut as _if_closure, V as _controllable_select, Vt as _hoist_resume, Wt as _let, X as _attr_content, Xt as _var, Y as _attr_class_names, Yt as _script, Z as _attr_nonce, Zt as _var_change, _n as runEffects, _t as _content_resume, a as _for_in, an as _on, at as _attrs_script, b as renderCatch, bn as forOf, bt as setParentBranch, c as _for_to, ct as _style_rule_item, d as _for_until_unkeyed, dn as prepareEffects, dt as _text_content, en as insertBranchBefore, et as _attr_style_items, f as _if, fn as queueAsyncRender, ft as _to_text, g as bindTagVar, gn as run, gt as _content_closures, h as addAwaitCounter, hn as rendering, ht as _content, i as _dynamic_tag_content, it as _attrs_partial_content, j as _attr_input_value, jn as Setup, k as _attr_input_checked_default, kn as Owner, kt as ready, l as _for_to_unkeyed, lt as _style_shell, m as _try, mn as queueRender, mt as toInsertNode, n as _await_promise, nn as syncGen, nt as _attrs_content, o as _for_of, on as $signal, ot as _html, p as _show, pn as queueEffect, pt as insertChildNodes, q as _attr_class_item, qn as TagVariable, qt as _return, r as _dynamic_tag, rt as _attrs_partial, s as _for_of_unkeyed, sn as $signalReset, st as _lifecycle, t as _await_content, tn as removeAndDestroyBranch, tt as _attrs, u as _for_until, ut as _text, vn as runId, vt as createAndSetupBranch, w as _attr_details_or_dialog_open_script, wn as _assert_hoist, wt as _resumed, xn as forTo, xt as setupBranch, y as patchDynamicTag, yn as forIn, yt as createBranch, z as _controllable_input, zn as Global, zt as _global_read } from "./dom-uEY0J_H9.mjs";
|
|
2
2
|
//#region src/common/attr-tag.ts
|
|
3
3
|
const empty = [];
|
|
4
4
|
const rest = Symbol("Attribute Tag");
|
|
@@ -221,18 +221,27 @@ function _load_setup(load) {
|
|
|
221
221
|
}
|
|
222
222
|
};
|
|
223
223
|
}
|
|
224
|
+
function _load_setup_var(load) {
|
|
225
|
+
const setup = _load_setup(load);
|
|
226
|
+
return (owner, child, marker) => {
|
|
227
|
+
setParentBranch(child, child[ClosestBranch]);
|
|
228
|
+
bindTagVar(owner, child, child["#Id"]);
|
|
229
|
+
setup(owner, child, marker);
|
|
230
|
+
};
|
|
231
|
+
}
|
|
224
232
|
function insertLoaded(renderer, branch, marker, awaitCounter) {
|
|
225
|
-
const parent = marker.parentNode, values = branch[Load], clone = () => {
|
|
233
|
+
const parent = () => marker.parentNode, values = branch[Load], clone = () => {
|
|
226
234
|
syncGen(branch);
|
|
227
|
-
renderer[Clone](branch, parent.namespaceURI);
|
|
235
|
+
renderer[Clone](branch, parent().namespaceURI);
|
|
228
236
|
branch[Load] = 0;
|
|
229
237
|
}, insert = () => {
|
|
230
|
-
insertBranchBefore(branch, parent, marker);
|
|
238
|
+
insertBranchBefore(branch, parent(), marker);
|
|
231
239
|
marker.remove();
|
|
232
240
|
awaitCounter?.c();
|
|
233
241
|
};
|
|
234
242
|
let remaining;
|
|
235
243
|
if (remaining = values?.size) {
|
|
244
|
+
awaitCounter ||= addAwaitCounter(branch);
|
|
236
245
|
const fail = loadFailed(branch, awaitCounter);
|
|
237
246
|
values.forEach(([, apply], promise) => promise.then((mod) => (apply._ = mod._) && !--remaining && queueAsyncRender(branch, (branch) => {
|
|
238
247
|
clone();
|
|
@@ -291,4 +300,4 @@ function getSelectorOrResolve(selector, resolve) {
|
|
|
291
300
|
return document.querySelector(selector) || (console.warn(`A lazy load trigger could not find an element matching "${selector}". The module was loaded immediately.`), resolve());
|
|
292
301
|
}
|
|
293
302
|
//#endregion
|
|
294
|
-
export { $signal, $signalReset, _assert_hoist, _assert_init, _attr, _attr_class, _attr_class_item, _attr_class_items, _attr_content, _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open as _attr_dialog_open, _attr_details_or_dialog_open_default as _attr_details_open_default, _attr_details_or_dialog_open_default as _attr_dialog_open_default, _attr_details_or_dialog_open_script as _attr_details_open_script, _attr_details_or_dialog_open_script as _attr_dialog_open_script, _attr_input_checked, _attr_input_checkedValue, _attr_input_checkedValue_default, _attr_input_checkedValue_script, _attr_input_checked_default, _attr_input_checked_script, _attr_input_value, _attr_input_value as _attr_textarea_value, _attr_input_value_attribute_default, _attr_input_value_default, _attr_input_value_default as _attr_textarea_value_default, _attr_input_value_dynamic_default, _attr_input_value_script, _attr_input_value_script as _attr_textarea_value_script, _attr_nonce, _attr_select_value, _attr_select_value_default, _attr_select_value_script, _attr_style, _attr_style_item, _attr_style_items, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, _attrs_script, _await_content, _await_promise, _call, _child_setup, _closure, _closure_get, _const, _content, _content_closures, _content_resume, _controllable_input, _controllable_open, _controllable_select, _controllable_textarea, _dynamic_tag, _dynamic_tag_content, _dynamic_tag_var_resume, _el, _el_read, _for_closure, _for_in, _for_of, _for_of_unkeyed, _for_selector, _for_to, _for_to_unkeyed, _for_until, _for_until_unkeyed, _global_read, _hoist, _hoist_read_error, _hoist_resume, _html, _id, _if, _if_closure, _let, _let_change, _lifecycle, _load_event_trigger, _load_idle_trigger, _load_media_trigger, _load_race_trigger, _load_setup, _load_signal, _load_template, _load_visible_trigger, _on, _or, _resumed, _return, _return_change, _script, _show, _style_rule_item, _style_shell, _template, _text, _text_content, _to_text, _try, _var, _var_change, _var_resume, attrTag, attrTags, compat, forIn, forOf, forTo, forUntil, init, initEmbedded, ready, readyFailed, run };
|
|
303
|
+
export { $signal, $signalReset, _assert_class_toggles, _assert_hoist, _assert_init, _attr, _attr_class, _attr_class_item, _attr_class_items, _attr_class_names, _attr_content, _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open as _attr_dialog_open, _attr_details_or_dialog_open_default as _attr_details_open_default, _attr_details_or_dialog_open_default as _attr_dialog_open_default, _attr_details_or_dialog_open_script as _attr_details_open_script, _attr_details_or_dialog_open_script as _attr_dialog_open_script, _attr_input_checked, _attr_input_checkedValue, _attr_input_checkedValue_default, _attr_input_checkedValue_script, _attr_input_checked_default, _attr_input_checked_script, _attr_input_value, _attr_input_value as _attr_textarea_value, _attr_input_value_attribute_default, _attr_input_value_default, _attr_input_value_default as _attr_textarea_value_default, _attr_input_value_dynamic_default, _attr_input_value_script, _attr_input_value_script as _attr_textarea_value_script, _attr_nonce, _attr_select_value, _attr_select_value_default, _attr_select_value_script, _attr_style, _attr_style_item, _attr_style_items, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, _attrs_script, _await_content, _await_promise, _call, _child_setup, _closure, _closure_get, _const, _content, _content_closures, _content_resume, _controllable_input, _controllable_open, _controllable_select, _controllable_textarea, _dynamic_tag, _dynamic_tag_content, _dynamic_tag_var_resume, _el, _el_read, _for_closure, _for_in, _for_of, _for_of_unkeyed, _for_selector, _for_to, _for_to_unkeyed, _for_until, _for_until_unkeyed, _global_read, _hoist, _hoist_read_error, _hoist_resume, _html, _id, _if, _if_closure, _let, _let_change, _lifecycle, _load_event_trigger, _load_idle_trigger, _load_media_trigger, _load_race_trigger, _load_setup, _load_setup_var, _load_signal, _load_template, _load_visible_trigger, _on, _or, _resumed, _return, _return_change, _script, _show, _style_rule_item, _style_shell, _template, _text, _text_content, _to_text, _try, _var, _var_change, _var_resume, attrTag, attrTags, compat, forIn, forOf, forTo, forUntil, init, initEmbedded, ready, readyFailed, run };
|