marko 6.3.51 → 6.3.53
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/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 +5 -0
- package/dist/debug/dom/dynamic-tag-script.feat.mjs +4 -0
- package/dist/debug/dom/dynamic-tag-var.feat.js +2 -4
- package/dist/debug/dom/dynamic-tag-var.feat.mjs +2 -4
- package/dist/debug/dom/placeholder.feat.js +2 -2
- package/dist/debug/dom/placeholder.feat.mjs +2 -2
- package/dist/debug/{dom-BAGeiafn.js → dom-CBLlE8L-.js} +46 -34
- package/dist/debug/{dom-C55iHvof.mjs → dom-DQCODUa1.mjs} +29 -23
- package/dist/debug/dom.js +11 -11
- package/dist/debug/dom.mjs +10 -10
- package/dist/debug/html.js +57 -41
- package/dist/debug/html.mjs +57 -41
- package/dist/dom/catch.feat.js +1 -1
- package/dist/dom/catch.feat.mjs +1 -1
- package/dist/dom/control-flow.d.ts +1 -3
- 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/dynamic-tag-script.feat.d.ts +1 -0
- package/dist/dom/dynamic-tag-script.feat.js +4 -0
- package/dist/dom/dynamic-tag-script.feat.mjs +4 -0
- package/dist/dom/dynamic-tag-var.feat.js +2 -2
- package/dist/dom/dynamic-tag-var.feat.mjs +3 -3
- package/dist/dom/placeholder.feat.js +2 -2
- package/dist/dom/placeholder.feat.mjs +2 -2
- package/dist/dom/resume.d.ts +2 -2
- package/dist/{dom-BNmfm4st.js → dom-vuB05Hnj.js} +37 -30
- package/dist/{dom-BsAS26Ze.mjs → dom-z4IMlmeO.mjs} +21 -19
- package/dist/dom.d.ts +2 -2
- package/dist/dom.js +15 -15
- package/dist/dom.mjs +10 -10
- package/dist/html/template.d.ts +3 -1
- package/dist/html/writer.d.ts +6 -1
- package/dist/html.js +41 -26
- package/dist/html.mjs +41 -26
- package/dist/translator/core/await.d.ts +0 -7
- package/dist/translator/core/try.d.ts +0 -7
- package/dist/translator/index.d.ts +1 -1
- package/dist/translator/index.js +830 -596
- package/dist/translator/util/binding-has-prop.d.ts +1 -1
- package/dist/translator/util/cyclic-memo.d.ts +4 -0
- package/dist/translator/util/evaluate.d.ts +2 -0
- package/dist/translator/util/optional.d.ts +21 -7
- package/dist/translator/util/references.d.ts +58 -23
- package/dist/translator/util/runtime.d.ts +3 -1
- package/dist/translator/util/sections.d.ts +8 -11
- package/dist/translator/util/serialize-guard.d.ts +4 -0
- package/dist/translator/util/serialize-reasons.d.ts +10 -11
- package/dist/translator/util/set-tag-sections-downstream.d.ts +3 -2
- package/dist/translator/util/tag-name-type.d.ts +8 -3
- package/dist/translator/visitors/tag/dynamic-tag.d.ts +0 -2
- package/index.d.ts +0 -5
- package/package.json +4 -4
- package/tags-html.d.ts +2 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/dom/dynamic-tag-var.feat.ts
|
|
2
|
+
require("../dom-vuB05Hnj.js").m((branch) => branch.T(() => branch.S));
|
|
3
3
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
installDynamicTagVar((branch) => branch.T(
|
|
1
|
+
import { m as installDynamicTagVar } from "../dom-z4IMlmeO.mjs";
|
|
2
|
+
//#region src/dom/dynamic-tag-var.feat.ts
|
|
3
|
+
installDynamicTagVar((branch) => branch.T(() => branch.S));
|
|
4
4
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
let require_control_flow = require("../dom-
|
|
1
|
+
let require_control_flow = require("../dom-vuB05Hnj.js");
|
|
2
2
|
//#region src/dom/placeholder.feat.ts
|
|
3
|
-
require_control_flow.
|
|
3
|
+
require_control_flow._t._f = (tryBranch) => {
|
|
4
4
|
tryBranch.P &&= (require_control_flow.Kt(tryBranch.P), 0);
|
|
5
5
|
};
|
|
6
6
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Kt as destroyBranch, _t as _resumed } from "../dom-z4IMlmeO.mjs";
|
|
2
2
|
//#region src/dom/placeholder.feat.ts
|
|
3
|
-
|
|
3
|
+
_resumed._f = (tryBranch) => {
|
|
4
4
|
tryBranch.P &&= (destroyBranch(tryBranch.P), 0);
|
|
5
5
|
};
|
|
6
6
|
//#endregion
|
package/dist/dom/resume.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export interface RenderData {
|
|
|
23
23
|
j?: never;
|
|
24
24
|
p?: Record<string | number, AwaitCounter>;
|
|
25
25
|
}
|
|
26
|
-
export declare const
|
|
26
|
+
export declare const _resumed: Record<string, unknown>;
|
|
27
27
|
export declare function ready(readyId: string): void;
|
|
28
28
|
export declare function readyFailed(readyId: string): void;
|
|
29
29
|
export declare function withLazy<T>(runtime: T): T;
|
|
@@ -31,7 +31,7 @@ export declare function initEmbedded(readyId: string, runtimeId?: string): void;
|
|
|
31
31
|
export declare function init(runtimeId?: string): void;
|
|
32
32
|
export declare let isResuming: undefined | 0 | 1;
|
|
33
33
|
export declare function getRegisteredWithScope(id: string, scope?: Scope): unknown;
|
|
34
|
-
export declare function _resume<T>(id: string, obj: T): T;
|
|
35
34
|
export declare function _var_resume<T extends Signal<unknown>>(id: string, signal: T): T;
|
|
36
35
|
export declare function _el(id: string, accessor: EncodedAccessor): (scope: Scope) => () => any;
|
|
36
|
+
export declare function _resume_dynamic_tag_var(accessor: EncodedAccessor): void;
|
|
37
37
|
export {};
|
|
@@ -26,9 +26,9 @@ let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "
|
|
|
26
26
|
if (currentNode.firstChild) return currentNode = currentNode.firstChild;
|
|
27
27
|
for (; !currentNode.nextSibling && currentNode.parentNode;) currentNode = currentNode.parentNode;
|
|
28
28
|
walkNextSibling();
|
|
29
|
-
}, walkNextSibling = () => currentNode = currentNode.nextSibling || currentNode,
|
|
30
|
-
let firstChild = scope[accessor], parentNode = firstChild.parentNode, lastChild = scope["H" + accessor] || firstChild, newContent = parseHTML(_to_text(value), parentNode.namespaceURI);
|
|
31
|
-
|
|
29
|
+
}, walkNextSibling = () => currentNode = currentNode.nextSibling || currentNode, _resumed = {}, curRenders, embedRenders, readyIds, lazyEnabled, isResuming, cloneCache = {}, _html = /*@__PURE__*/ withDynamicHtml(function(scope, value, accessor) {
|
|
30
|
+
let firstChild = scope[accessor], parentNode = firstChild.parentNode, lastChild = scope["H" + accessor] || firstChild, newContent = parseHTML(_to_text(value), parentNode.namespaceURI), newFirstChild = scope[accessor] = newContent.firstChild || newContent.appendChild(new Text()), newLastChild = scope["H" + accessor] = newContent.lastChild, branch = scope.F;
|
|
31
|
+
branch?.S === firstChild && (branch.S = newFirstChild), branch?.K === lastChild && (branch.K = newLastChild), insertChildNodes(parentNode, firstChild, newFirstChild, newLastChild), removeChildNodes(firstChild, lastChild);
|
|
32
32
|
}), R = /[\p{L}\p{N}]/gu, inputType = "", controllableScripts = {}, controllableRenders = {}, _if = /*@__PURE__*/ withBranches((nodeAccessor, ...branchesArgs) => {
|
|
33
33
|
nodeAccessor = decodeAccessor(nodeAccessor);
|
|
34
34
|
let branchAccessor = "D" + nodeAccessor, branches = [], i = 0;
|
|
@@ -83,7 +83,7 @@ let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "
|
|
|
83
83
|
return (scope, renderer) => {
|
|
84
84
|
if (scope[rendererAccessor] !== (scope[rendererAccessor] = rendererKey(renderer)) && (setConditionalRenderer(scope, nodeAccessor, renderer, createAndSetupBranch), renderer?.f && subscribeToScopeSet(renderer.e, renderer.f, scope[childScopeAccessor])), renderer) for (let accessor in renderer.g) renderer.g[accessor](scope[childScopeAccessor], renderer.h[accessor]);
|
|
85
85
|
};
|
|
86
|
-
}), bindNativeTagVar,
|
|
86
|
+
}), bindNativeTagVar, loop = /*@__PURE__*/ withBranches((forEach) => (nodeAccessor, template, walks, setup, params) => {
|
|
87
87
|
nodeAccessor = decodeAccessor(nodeAccessor);
|
|
88
88
|
let scopesAccessor = "A" + nodeAccessor, keyedScopesAccessor = "O" + nodeAccessor, renderer = _content("", template, walks, setup)();
|
|
89
89
|
return (scope, value) => {
|
|
@@ -455,7 +455,7 @@ function _closure_get(valueAccessor, fn, getOwnerScope, resumeId) {
|
|
|
455
455
|
let closureSignal = ((scope) => {
|
|
456
456
|
scope[closureSignal.b] = closureSignal.c, fn(scope), subscribeToScopeSet(getOwnerScope ? getOwnerScope(scope) : scope._, closureSignal.a, scope);
|
|
457
457
|
});
|
|
458
|
-
return closureSignal.a = valueAccessor, closureSignal.b = "C" + valueAccessor, resumeId &&
|
|
458
|
+
return closureSignal.a = valueAccessor, closureSignal.b = "C" + valueAccessor, resumeId && (_resumed[resumeId] = closureSignal), closureSignal;
|
|
459
459
|
}
|
|
460
460
|
function _child_setup(setup) {
|
|
461
461
|
return setup._ = (scope, owner) => {
|
|
@@ -477,7 +477,7 @@ function _id(scope, accessor) {
|
|
|
477
477
|
return id;
|
|
478
478
|
}
|
|
479
479
|
function _script(id, fn) {
|
|
480
|
-
return
|
|
480
|
+
return _resumed[id] = fn, (scope) => {
|
|
481
481
|
queueEffect(scope, fn);
|
|
482
482
|
};
|
|
483
483
|
}
|
|
@@ -501,7 +501,7 @@ function _hoist(...path) {
|
|
|
501
501
|
};
|
|
502
502
|
}
|
|
503
503
|
function _hoist_resume(id, ...path) {
|
|
504
|
-
return
|
|
504
|
+
return _resumed[id] = _hoist(...path);
|
|
505
505
|
}
|
|
506
506
|
//#endregion
|
|
507
507
|
//#region src/dom/walker.ts
|
|
@@ -543,7 +543,7 @@ function init(runtimeId = "M") {
|
|
|
543
543
|
let partial = partials[i];
|
|
544
544
|
typeof partial == "number" ? scopeId += partial : (scopeId ? initScope(Object.assign(scopeLookup[scopeId] ||= (partial.L = scopeId, partial), partial)) : Object.assign(initGlobal(), partial), scopeId++);
|
|
545
545
|
}
|
|
546
|
-
}, serializeContext = ((data, registryId) => typeof data == "number" ? registryId ?
|
|
546
|
+
}, serializeContext = ((data, registryId) => typeof data == "number" ? registryId ? _resumed[registryId](getScope(data)) : getScope(data) : applyScopes(data)), createVisitBranches = (branchScopesStack = [], branchStarts = [], curBranchScopes, reorderBranch, reorderDepth = 0, adopt = (scope, branch) => scope.F === scope ? scope !== branch && setParentBranch(scope, branch) : scope.F = branch) => (branchId, branch, endedBranches, accessor, nodeAccessor, singleNode, parent = visit.parentNode, startVisit = visit) => {
|
|
547
547
|
if (visitType === "*") {
|
|
548
548
|
for (; reorderBranch && pending.length >= reorderDepth;) adopt(pending.pop(), reorderBranch);
|
|
549
549
|
(reorderBranch = +lastToken && visitScope) && (reorderDepth = pending.push(reorderBranch));
|
|
@@ -566,7 +566,7 @@ function init(runtimeId = "M") {
|
|
|
566
566
|
let i = 0;
|
|
567
567
|
for (; i < resumes.length; i++) {
|
|
568
568
|
let serialized = resumes[i];
|
|
569
|
-
if (typeof serialized == "string") for (lastTokenIndex = 0, visitText = serialized; nextToken();) /\D/.test(lastToken) ? lastEffect =
|
|
569
|
+
if (typeof serialized == "string") for (lastTokenIndex = 0, visitText = serialized; nextToken();) /\D/.test(lastToken) ? lastEffect = _resumed[lastToken] : effects.push(lastEffect, getScope(lastToken));
|
|
570
570
|
else if (Array.isArray(serialized)) {
|
|
571
571
|
if (!(readyIds && serialized.every((dep) => readyIds.has(dep) && !render.b[dep].length))) break;
|
|
572
572
|
} else if (readyIds && typeof serialized == "number") break;
|
|
@@ -577,7 +577,7 @@ function init(runtimeId = "M") {
|
|
|
577
577
|
}
|
|
578
578
|
return resumes.splice(0, i), i;
|
|
579
579
|
}, lastEffect, visits, visit, visitText, visitType, visitScope, lastToken, lastTokenIndex, visitBranches, htmlStart, embedAnchor;
|
|
580
|
-
return serializeContext._ =
|
|
580
|
+
return serializeContext._ = _resumed, render.m = (effects) => {
|
|
581
581
|
if (processResumes(render.r, effects), readyIds && render.b) for (let progress = 1; progress;) {
|
|
582
582
|
progress = 0;
|
|
583
583
|
for (let readyId of readyIds) {
|
|
@@ -609,17 +609,19 @@ function runResumeEffects(render) {
|
|
|
609
609
|
}
|
|
610
610
|
}
|
|
611
611
|
function getRegisteredWithScope(id, scope) {
|
|
612
|
-
|
|
613
|
-
return scope ? val(scope) : val;
|
|
614
|
-
}
|
|
615
|
-
function _resume(id, obj) {
|
|
616
|
-
return registeredValues[id] = obj;
|
|
612
|
+
return scope ? _resumed[id](scope) : _resumed[id];
|
|
617
613
|
}
|
|
618
614
|
function _var_resume(id, signal) {
|
|
619
|
-
return
|
|
615
|
+
return _resumed[id] = (scope) => (value) => signal(scope, value), signal;
|
|
620
616
|
}
|
|
621
617
|
function _el(id, accessor) {
|
|
622
|
-
return accessor = decodeAccessor(accessor),
|
|
618
|
+
return accessor = decodeAccessor(accessor), _resumed[id] = (scope) => () => scope[accessor];
|
|
619
|
+
}
|
|
620
|
+
function _resume_dynamic_tag_var(accessor) {
|
|
621
|
+
accessor = decodeAccessor(accessor), _resumed["-" + accessor] = (scope) => () => {
|
|
622
|
+
let node = scope[accessor];
|
|
623
|
+
return node.nodeType === 8 ? node.previousSibling : node;
|
|
624
|
+
};
|
|
623
625
|
}
|
|
624
626
|
//#endregion
|
|
625
627
|
//#region src/dom/renderer.ts
|
|
@@ -653,7 +655,7 @@ function _content(id, template, walks, setup, params, dynamicScopesAccessor) {
|
|
|
653
655
|
});
|
|
654
656
|
}
|
|
655
657
|
function _content_resume(id, template, walks, setup, params, dynamicScopesAccessor) {
|
|
656
|
-
return
|
|
658
|
+
return _resumed[id] = _content(id, template, walks, setup, params, dynamicScopesAccessor);
|
|
657
659
|
}
|
|
658
660
|
function _content_closures(renderer, closureFns) {
|
|
659
661
|
let closureSignals = {};
|
|
@@ -1190,7 +1192,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1190
1192
|
}), Object.defineProperty(exports, "Ct", {
|
|
1191
1193
|
enumerable: !0,
|
|
1192
1194
|
get: function() {
|
|
1193
|
-
return
|
|
1195
|
+
return readyFailed;
|
|
1194
1196
|
}
|
|
1195
1197
|
}), Object.defineProperty(exports, "D", {
|
|
1196
1198
|
enumerable: !0,
|
|
@@ -1350,7 +1352,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1350
1352
|
}), Object.defineProperty(exports, "St", {
|
|
1351
1353
|
enumerable: !0,
|
|
1352
1354
|
get: function() {
|
|
1353
|
-
return
|
|
1355
|
+
return ready;
|
|
1354
1356
|
}
|
|
1355
1357
|
}), Object.defineProperty(exports, "T", {
|
|
1356
1358
|
enumerable: !0,
|
|
@@ -1427,10 +1429,15 @@ Object.defineProperty(exports, "$", {
|
|
|
1427
1429
|
get: function() {
|
|
1428
1430
|
return _attr_details_or_dialog_open;
|
|
1429
1431
|
}
|
|
1432
|
+
}), Object.defineProperty(exports, "_n", {
|
|
1433
|
+
enumerable: !0,
|
|
1434
|
+
get: function() {
|
|
1435
|
+
return withBranches;
|
|
1436
|
+
}
|
|
1430
1437
|
}), Object.defineProperty(exports, "_t", {
|
|
1431
1438
|
enumerable: !0,
|
|
1432
1439
|
get: function() {
|
|
1433
|
-
return
|
|
1440
|
+
return _resumed;
|
|
1434
1441
|
}
|
|
1435
1442
|
}), Object.defineProperty(exports, "a", {
|
|
1436
1443
|
enumerable: !0,
|
|
@@ -1455,7 +1462,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1455
1462
|
}), Object.defineProperty(exports, "bt", {
|
|
1456
1463
|
enumerable: !0,
|
|
1457
1464
|
get: function() {
|
|
1458
|
-
return
|
|
1465
|
+
return init;
|
|
1459
1466
|
}
|
|
1460
1467
|
}), Object.defineProperty(exports, "c", {
|
|
1461
1468
|
enumerable: !0,
|
|
@@ -1475,7 +1482,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1475
1482
|
}), Object.defineProperty(exports, "d", {
|
|
1476
1483
|
enumerable: !0,
|
|
1477
1484
|
get: function() {
|
|
1478
|
-
return
|
|
1485
|
+
return _try;
|
|
1479
1486
|
}
|
|
1480
1487
|
}), Object.defineProperty(exports, "dn", {
|
|
1481
1488
|
enumerable: !0,
|
|
@@ -1500,7 +1507,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1500
1507
|
}), Object.defineProperty(exports, "f", {
|
|
1501
1508
|
enumerable: !0,
|
|
1502
1509
|
get: function() {
|
|
1503
|
-
return
|
|
1510
|
+
return addAwaitCounter;
|
|
1504
1511
|
}
|
|
1505
1512
|
}), Object.defineProperty(exports, "fn", {
|
|
1506
1513
|
enumerable: !0,
|
|
@@ -1525,7 +1532,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1525
1532
|
}), Object.defineProperty(exports, "gt", {
|
|
1526
1533
|
enumerable: !0,
|
|
1527
1534
|
get: function() {
|
|
1528
|
-
return
|
|
1535
|
+
return _resume_dynamic_tag_var;
|
|
1529
1536
|
}
|
|
1530
1537
|
}), Object.defineProperty(exports, "h", {
|
|
1531
1538
|
enumerable: !0,
|
|
@@ -1640,7 +1647,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1640
1647
|
}), Object.defineProperty(exports, "p", {
|
|
1641
1648
|
enumerable: !0,
|
|
1642
1649
|
get: function() {
|
|
1643
|
-
return
|
|
1650
|
+
return dynamicTagScript;
|
|
1644
1651
|
}
|
|
1645
1652
|
}), Object.defineProperty(exports, "pn", {
|
|
1646
1653
|
enumerable: !0,
|
|
@@ -1710,7 +1717,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1710
1717
|
}), Object.defineProperty(exports, "u", {
|
|
1711
1718
|
enumerable: !0,
|
|
1712
1719
|
get: function() {
|
|
1713
|
-
return
|
|
1720
|
+
return _show;
|
|
1714
1721
|
}
|
|
1715
1722
|
}), Object.defineProperty(exports, "un", {
|
|
1716
1723
|
enumerable: !0,
|
|
@@ -1730,7 +1737,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1730
1737
|
}), Object.defineProperty(exports, "vt", {
|
|
1731
1738
|
enumerable: !0,
|
|
1732
1739
|
get: function() {
|
|
1733
|
-
return
|
|
1740
|
+
return _var_resume;
|
|
1734
1741
|
}
|
|
1735
1742
|
}), Object.defineProperty(exports, "w", {
|
|
1736
1743
|
enumerable: !0,
|
|
@@ -1750,7 +1757,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1750
1757
|
}), Object.defineProperty(exports, "xt", {
|
|
1751
1758
|
enumerable: !0,
|
|
1752
1759
|
get: function() {
|
|
1753
|
-
return
|
|
1760
|
+
return initEmbedded;
|
|
1754
1761
|
}
|
|
1755
1762
|
}), Object.defineProperty(exports, "y", {
|
|
1756
1763
|
enumerable: !0,
|
|
@@ -1760,7 +1767,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1760
1767
|
}), Object.defineProperty(exports, "yt", {
|
|
1761
1768
|
enumerable: !0,
|
|
1762
1769
|
get: function() {
|
|
1763
|
-
return
|
|
1770
|
+
return getRegisteredWithScope;
|
|
1764
1771
|
}
|
|
1765
1772
|
}), Object.defineProperty(exports, "z", {
|
|
1766
1773
|
enumerable: !0,
|
|
@@ -26,9 +26,9 @@ let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "
|
|
|
26
26
|
if (currentNode.firstChild) return currentNode = currentNode.firstChild;
|
|
27
27
|
for (; !currentNode.nextSibling && currentNode.parentNode;) currentNode = currentNode.parentNode;
|
|
28
28
|
walkNextSibling();
|
|
29
|
-
}, walkNextSibling = () => currentNode = currentNode.nextSibling || currentNode,
|
|
30
|
-
let firstChild = scope[accessor], parentNode = firstChild.parentNode, lastChild = scope["H" + accessor] || firstChild, newContent = parseHTML(_to_text(value), parentNode.namespaceURI);
|
|
31
|
-
|
|
29
|
+
}, walkNextSibling = () => currentNode = currentNode.nextSibling || currentNode, _resumed = {}, curRenders, embedRenders, readyIds, lazyEnabled, isResuming, cloneCache = {}, _html = /*@__PURE__*/ withDynamicHtml(function(scope, value, accessor) {
|
|
30
|
+
let firstChild = scope[accessor], parentNode = firstChild.parentNode, lastChild = scope["H" + accessor] || firstChild, newContent = parseHTML(_to_text(value), parentNode.namespaceURI), newFirstChild = scope[accessor] = newContent.firstChild || newContent.appendChild(new Text()), newLastChild = scope["H" + accessor] = newContent.lastChild, branch = scope.F;
|
|
31
|
+
branch?.S === firstChild && (branch.S = newFirstChild), branch?.K === lastChild && (branch.K = newLastChild), insertChildNodes(parentNode, firstChild, newFirstChild, newLastChild), removeChildNodes(firstChild, lastChild);
|
|
32
32
|
}), R = /[\p{L}\p{N}]/gu, inputType = "", controllableScripts = {}, controllableRenders = {}, _if = /*@__PURE__*/ withBranches((nodeAccessor, ...branchesArgs) => {
|
|
33
33
|
nodeAccessor = decodeAccessor(nodeAccessor);
|
|
34
34
|
let branchAccessor = "D" + nodeAccessor, branches = [], i = 0;
|
|
@@ -83,7 +83,7 @@ let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "
|
|
|
83
83
|
return (scope, renderer) => {
|
|
84
84
|
if (scope[rendererAccessor] !== (scope[rendererAccessor] = rendererKey(renderer)) && (setConditionalRenderer(scope, nodeAccessor, renderer, createAndSetupBranch), renderer?.f && subscribeToScopeSet(renderer.e, renderer.f, scope[childScopeAccessor])), renderer) for (let accessor in renderer.g) renderer.g[accessor](scope[childScopeAccessor], renderer.h[accessor]);
|
|
85
85
|
};
|
|
86
|
-
}), bindNativeTagVar,
|
|
86
|
+
}), bindNativeTagVar, loop = /*@__PURE__*/ withBranches((forEach) => (nodeAccessor, template, walks, setup, params) => {
|
|
87
87
|
nodeAccessor = decodeAccessor(nodeAccessor);
|
|
88
88
|
let scopesAccessor = "A" + nodeAccessor, keyedScopesAccessor = "O" + nodeAccessor, renderer = _content("", template, walks, setup)();
|
|
89
89
|
return (scope, value) => {
|
|
@@ -455,7 +455,7 @@ function _closure_get(valueAccessor, fn, getOwnerScope, resumeId) {
|
|
|
455
455
|
let closureSignal = ((scope) => {
|
|
456
456
|
scope[closureSignal.b] = closureSignal.c, fn(scope), subscribeToScopeSet(getOwnerScope ? getOwnerScope(scope) : scope._, closureSignal.a, scope);
|
|
457
457
|
});
|
|
458
|
-
return closureSignal.a = valueAccessor, closureSignal.b = "C" + valueAccessor, resumeId &&
|
|
458
|
+
return closureSignal.a = valueAccessor, closureSignal.b = "C" + valueAccessor, resumeId && (_resumed[resumeId] = closureSignal), closureSignal;
|
|
459
459
|
}
|
|
460
460
|
function _child_setup(setup) {
|
|
461
461
|
return setup._ = (scope, owner) => {
|
|
@@ -477,7 +477,7 @@ function _id(scope, accessor) {
|
|
|
477
477
|
return id;
|
|
478
478
|
}
|
|
479
479
|
function _script(id, fn) {
|
|
480
|
-
return
|
|
480
|
+
return _resumed[id] = fn, (scope) => {
|
|
481
481
|
queueEffect(scope, fn);
|
|
482
482
|
};
|
|
483
483
|
}
|
|
@@ -501,7 +501,7 @@ function _hoist(...path) {
|
|
|
501
501
|
};
|
|
502
502
|
}
|
|
503
503
|
function _hoist_resume(id, ...path) {
|
|
504
|
-
return
|
|
504
|
+
return _resumed[id] = _hoist(...path);
|
|
505
505
|
}
|
|
506
506
|
//#endregion
|
|
507
507
|
//#region src/dom/walker.ts
|
|
@@ -543,7 +543,7 @@ function init(runtimeId = "M") {
|
|
|
543
543
|
let partial = partials[i];
|
|
544
544
|
typeof partial == "number" ? scopeId += partial : (scopeId ? initScope(Object.assign(scopeLookup[scopeId] ||= (partial.L = scopeId, partial), partial)) : Object.assign(initGlobal(), partial), scopeId++);
|
|
545
545
|
}
|
|
546
|
-
}, serializeContext = ((data, registryId) => typeof data == "number" ? registryId ?
|
|
546
|
+
}, serializeContext = ((data, registryId) => typeof data == "number" ? registryId ? _resumed[registryId](getScope(data)) : getScope(data) : applyScopes(data)), createVisitBranches = (branchScopesStack = [], branchStarts = [], curBranchScopes, reorderBranch, reorderDepth = 0, adopt = (scope, branch) => scope.F === scope ? scope !== branch && setParentBranch(scope, branch) : scope.F = branch) => (branchId, branch, endedBranches, accessor, nodeAccessor, singleNode, parent = visit.parentNode, startVisit = visit) => {
|
|
547
547
|
if (visitType === "*") {
|
|
548
548
|
for (; reorderBranch && pending.length >= reorderDepth;) adopt(pending.pop(), reorderBranch);
|
|
549
549
|
(reorderBranch = +lastToken && visitScope) && (reorderDepth = pending.push(reorderBranch));
|
|
@@ -566,7 +566,7 @@ function init(runtimeId = "M") {
|
|
|
566
566
|
let i = 0;
|
|
567
567
|
for (; i < resumes.length; i++) {
|
|
568
568
|
let serialized = resumes[i];
|
|
569
|
-
if (typeof serialized == "string") for (lastTokenIndex = 0, visitText = serialized; nextToken();) /\D/.test(lastToken) ? lastEffect =
|
|
569
|
+
if (typeof serialized == "string") for (lastTokenIndex = 0, visitText = serialized; nextToken();) /\D/.test(lastToken) ? lastEffect = _resumed[lastToken] : effects.push(lastEffect, getScope(lastToken));
|
|
570
570
|
else if (Array.isArray(serialized)) {
|
|
571
571
|
if (!(readyIds && serialized.every((dep) => readyIds.has(dep) && !render.b[dep].length))) break;
|
|
572
572
|
} else if (readyIds && typeof serialized == "number") break;
|
|
@@ -577,7 +577,7 @@ function init(runtimeId = "M") {
|
|
|
577
577
|
}
|
|
578
578
|
return resumes.splice(0, i), i;
|
|
579
579
|
}, lastEffect, visits, visit, visitText, visitType, visitScope, lastToken, lastTokenIndex, visitBranches, htmlStart, embedAnchor;
|
|
580
|
-
return serializeContext._ =
|
|
580
|
+
return serializeContext._ = _resumed, render.m = (effects) => {
|
|
581
581
|
if (processResumes(render.r, effects), readyIds && render.b) for (let progress = 1; progress;) {
|
|
582
582
|
progress = 0;
|
|
583
583
|
for (let readyId of readyIds) {
|
|
@@ -609,17 +609,19 @@ function runResumeEffects(render) {
|
|
|
609
609
|
}
|
|
610
610
|
}
|
|
611
611
|
function getRegisteredWithScope(id, scope) {
|
|
612
|
-
|
|
613
|
-
return scope ? val(scope) : val;
|
|
614
|
-
}
|
|
615
|
-
function _resume(id, obj) {
|
|
616
|
-
return registeredValues[id] = obj;
|
|
612
|
+
return scope ? _resumed[id](scope) : _resumed[id];
|
|
617
613
|
}
|
|
618
614
|
function _var_resume(id, signal) {
|
|
619
|
-
return
|
|
615
|
+
return _resumed[id] = (scope) => (value) => signal(scope, value), signal;
|
|
620
616
|
}
|
|
621
617
|
function _el(id, accessor) {
|
|
622
|
-
return accessor = decodeAccessor(accessor),
|
|
618
|
+
return accessor = decodeAccessor(accessor), _resumed[id] = (scope) => () => scope[accessor];
|
|
619
|
+
}
|
|
620
|
+
function _resume_dynamic_tag_var(accessor) {
|
|
621
|
+
accessor = decodeAccessor(accessor), _resumed["-" + accessor] = (scope) => () => {
|
|
622
|
+
let node = scope[accessor];
|
|
623
|
+
return node.nodeType === 8 ? node.previousSibling : node;
|
|
624
|
+
};
|
|
623
625
|
}
|
|
624
626
|
//#endregion
|
|
625
627
|
//#region src/dom/renderer.ts
|
|
@@ -653,7 +655,7 @@ function _content(id, template, walks, setup, params, dynamicScopesAccessor) {
|
|
|
653
655
|
});
|
|
654
656
|
}
|
|
655
657
|
function _content_resume(id, template, walks, setup, params, dynamicScopesAccessor) {
|
|
656
|
-
return
|
|
658
|
+
return _resumed[id] = _content(id, template, walks, setup, params, dynamicScopesAccessor);
|
|
657
659
|
}
|
|
658
660
|
function _content_closures(renderer, closureFns) {
|
|
659
661
|
let closureSignals = {};
|
|
@@ -1153,4 +1155,4 @@ function byFirstArg(name) {
|
|
|
1153
1155
|
return name;
|
|
1154
1156
|
}
|
|
1155
1157
|
//#endregion
|
|
1156
|
-
export { _attrs_script as $, caughtError as $t, _attr_input_value_script as A, _for_closure as At, _attr as B, _return as Bt, _attr_input_checkedValue_script as C,
|
|
1158
|
+
export { _attrs_script as $, caughtError as $t, _attr_input_value_script as A, _for_closure as At, _attr as B, _return as Bt, _attr_input_checkedValue_script as C, readyFailed as Ct, _attr_input_value_attribute_default as D, _closure_get as Dt, _attr_input_value as E, _closure as Et, _controllable_open as F, _id as Ft, _attr_nonce as G, _assert_init as Gt, _attr_class_item as H, _script as Ht, _controllable_select as I, _if_closure as It, _attr_style_items as J, removeAndDestroyBranch as Jt, _attr_style as K, destroyBranch as Kt, _controllable_textarea as L, _let as Lt, _attr_select_value_default as M, _global_read as Mt, _attr_select_value_script as N, _hoist as Nt, _attr_input_value_default as O, _const as Ot, _controllable_input as P, _hoist_resume as Pt, _attrs_partial_content as Q, $signalReset as Qt, controllableRenders as R, _let_change as Rt, _attr_input_checkedValue_default as S, ready as St, _attr_input_checked_script as T, _child_setup as Tt, _attr_class_items as U, _var as Ut, _attr_class as V, _return_change as Vt, _attr_content as W, _var_change as Wt, _attrs_content as X, _on as Xt, _attrs as Y, syncGen as Yt, _attrs_partial as Z, $signal as Zt, _attr_details_or_dialog_open as _, withBranches as _n, _resumed as _t, _for_in as a, queueRender as an, _text_content as at, _attr_input_checked as b, init as bt, _for_until as c, runId as cn, toInsertNode as ct, _try as d, forTo as dn, _content_resume as dt, installCatch as en, _html as et, addAwaitCounter as f, forUntil as fn, createAndSetupBranch as ft, renderCatch as g, decodeAccessor as gn, _resume_dynamic_tag_var as gt, patchDynamicTag as h, _call as hn, _el as ht, _dynamic_tag_content as i, queueEffect as in, _text as it, _attr_select_value as j, _for_selector as jt, _attr_input_value_dynamic_default as k, _el_read as kt, _if as l, forIn as ln, _content as lt, installDynamicTagVar as m, _hoist_read_error as mn, setupBranch as mt, _await_promise as n, prepareEffects as nn, _style_rule_item as nt, _for_of as o, run as on, _to_text as ot, dynamicTagScript as p, _assert_hoist as pn, createBranch as pt, _attr_style_item as q, insertBranchBefore as qt, _dynamic_tag as r, queueAsyncRender as rn, _style_shell as rt, _for_to as s, runEffects as sn, insertChildNodes as st, _await_content as t, placeholderShown as tn, _lifecycle as tt, _show as u, forOf as un, _content_closures as ut, _attr_details_or_dialog_open_default as v, _var_resume as vt, _attr_input_checked_default as w, withLazy as wt, _attr_input_checkedValue as x, initEmbedded as xt, _attr_details_or_dialog_open_script as y, getRegisteredWithScope as yt, controllableScripts as z, _or as zt };
|
package/dist/dom.d.ts
CHANGED
|
@@ -4,14 +4,14 @@ export { forIn, forOf, forTo, forUntil } from "./common/for";
|
|
|
4
4
|
export { _call } from "./common/helpers";
|
|
5
5
|
export { $signal, $signalReset } from "./dom/abort-signal";
|
|
6
6
|
export { compat } from "./dom/compat";
|
|
7
|
-
export { _await_content, _await_promise, _dynamic_tag, _dynamic_tag_content, _for_in, _for_of, _for_to, _for_until, _if,
|
|
7
|
+
export { _await_content, _await_promise, _dynamic_tag, _dynamic_tag_content, _for_in, _for_of, _for_to, _for_until, _if, _show, _try, } from "./dom/control-flow";
|
|
8
8
|
export { _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open_default as _attr_details_open_default, _attr_details_or_dialog_open_script as _attr_details_open_script, _attr_details_or_dialog_open as _attr_dialog_open, _attr_details_or_dialog_open_default as _attr_dialog_open_default, _attr_details_or_dialog_open_script as _attr_dialog_open_script, _attr_input_checked, _attr_input_checked_default, _attr_input_checked_script, _attr_input_checkedValue, _attr_input_checkedValue_default, _attr_input_checkedValue_script, _attr_input_value, _attr_input_value_attribute_default, _attr_input_value_default, _attr_input_value_dynamic_default, _attr_input_value_script, _attr_select_value, _attr_select_value_default, _attr_select_value_script, _attr_input_value as _attr_textarea_value, _attr_input_value_default as _attr_textarea_value_default, _attr_input_value_script as _attr_textarea_value_script, _controllable_input, _controllable_open, _controllable_select, _controllable_textarea, } from "./dom/controllable";
|
|
9
9
|
export { _attr, _attr_class, _attr_class_item, _attr_class_items, _attr_content, _attr_nonce, _attr_style, _attr_style_item, _attr_style_items, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, _attrs_script, _html, _lifecycle, _style_rule_item, _style_shell, _text, _text_content, _to_text, } from "./dom/dom";
|
|
10
10
|
export { _on } from "./dom/event";
|
|
11
11
|
export { _load_event_trigger, _load_idle_trigger, _load_media_trigger, _load_race_trigger, _load_setup, _load_signal, _load_template, _load_visible_trigger, } from "./dom/load";
|
|
12
12
|
export { run } from "./dom/queue";
|
|
13
13
|
export { _content, _content_closures, _content_resume } from "./dom/renderer";
|
|
14
|
-
export { _el,
|
|
14
|
+
export { _el, _resume_dynamic_tag_var, _resumed, _var_resume, init, initEmbedded, ready, readyFailed, } from "./dom/resume";
|
|
15
15
|
export { _assert_init } from "./dom/scope";
|
|
16
16
|
export { _child_setup, _closure, _closure_get, _const, _el_read, _global_read, _for_closure, _for_selector, _hoist, _hoist_resume, _id, _if_closure, _let, _let_change, _or, _return, _return_change, _script, _var, _var_change, } from "./dom/signals";
|
|
17
17
|
export { _template } from "./dom/template";
|
package/dist/dom.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
let require_control_flow = require("./dom-
|
|
2
|
-
require_control_flow.
|
|
1
|
+
let require_control_flow = require("./dom-vuB05Hnj.js"), empty = [], rest = Symbol(), classIdToBranch = /* @__PURE__ */ new Map(), classEventResolver, scopesByRender = /* @__PURE__ */ new WeakMap(), getRenderScopes = ($global) => {
|
|
2
|
+
require_control_flow.bt($global.runtimeId);
|
|
3
3
|
let render = self[$global.runtimeId]?.[$global.renderId], scopes = render && scopesByRender.get(render);
|
|
4
4
|
return render && !scopes && scopesByRender.set(render, scopes = {}), scopes;
|
|
5
5
|
}, compat = {
|
|
6
6
|
patchDynamicTag: require_control_flow.h,
|
|
7
7
|
queueEffect: require_control_flow.in,
|
|
8
8
|
init(warp10Noop) {
|
|
9
|
-
require_control_flow.
|
|
9
|
+
require_control_flow._t.$C_s = (scope) => {
|
|
10
10
|
if (getRenderScopes(scope.$)[scope.L] = scope, scope.m5c && classIdToBranch.set(scope.m5c, scope), classEventResolver) for (let key in scope) {
|
|
11
11
|
let resolved = classEventResolver(scope[key], scope);
|
|
12
12
|
resolved !== scope[key] && (scope[key] = resolved);
|
|
13
13
|
}
|
|
14
|
-
}
|
|
14
|
+
}, require_control_flow._t.$C_b = warp10Noop;
|
|
15
15
|
},
|
|
16
16
|
setClassEventResolver(fn) {
|
|
17
17
|
classEventResolver = fn;
|
|
18
18
|
},
|
|
19
19
|
resumeClassFunction(id, build) {
|
|
20
|
-
require_control_flow.
|
|
20
|
+
require_control_flow._t[id] = build;
|
|
21
21
|
},
|
|
22
22
|
getScope($global, scopeId) {
|
|
23
23
|
return getRenderScopes($global)?.[scopeId];
|
|
@@ -44,7 +44,7 @@ let require_control_flow = require("./dom-BNmfm4st.js"), empty = [], rest = Symb
|
|
|
44
44
|
this.scope && require_control_flow.Kt(this.scope);
|
|
45
45
|
},
|
|
46
46
|
resolveRegistered(value, $global) {
|
|
47
|
-
return Array.isArray(value) && typeof value[0] == "string" ? require_control_flow.
|
|
47
|
+
return Array.isArray(value) && typeof value[0] == "string" ? require_control_flow.yt(value[0], getRenderScopes($global)?.[value[1]]) : value;
|
|
48
48
|
},
|
|
49
49
|
createRenderer(params, clone) {
|
|
50
50
|
let renderer = require_control_flow.lt("", 0, 0, 0, params)();
|
|
@@ -54,7 +54,7 @@ let require_control_flow = require("./dom-BNmfm4st.js"), empty = [], rest = Symb
|
|
|
54
54
|
}, renderer;
|
|
55
55
|
},
|
|
56
56
|
render(out, component, renderer, args) {
|
|
57
|
-
require_control_flow.
|
|
57
|
+
require_control_flow.bt(out.global.runtimeId);
|
|
58
58
|
let branch = component.scope, created = 0;
|
|
59
59
|
if (!branch && (branch = classIdToBranch.get(component.id)) && (component.scope = branch, classIdToBranch.delete(component.id)), args[0] && typeof args[0] == "object" && "renderBody" in args[0]) {
|
|
60
60
|
let input = args[0], normalizedInput = args[0] = {};
|
|
@@ -66,14 +66,14 @@ let require_control_flow = require("./dom-BNmfm4st.js"), empty = [], rest = Symb
|
|
|
66
66
|
}
|
|
67
67
|
}, _template = (id, template, walks, setup, inputSignal) => {
|
|
68
68
|
let renderer = require_control_flow.lt(id, template, walks, setup, inputSignal)();
|
|
69
|
-
return renderer.mount = mount, renderer._ = renderer, require_control_flow.
|
|
70
|
-
}, _load_template = /*@__PURE__*/ require_control_flow.wt((id, load) => {
|
|
69
|
+
return renderer.mount = mount, renderer._ = renderer, require_control_flow._t[id] = renderer;
|
|
70
|
+
}, noop = (_) => 0, _load_template = /*@__PURE__*/ require_control_flow.wt((id, load) => {
|
|
71
71
|
let pending, lazyTemplate = _template(id, 0, 0, (branch) => {
|
|
72
|
-
let awaitCounter = require_control_flow.
|
|
72
|
+
let awaitCounter = require_control_flow.f(branch);
|
|
73
73
|
branch.X ||= /* @__PURE__ */ new Map(), (pending ||= load()).then((renderer) => {
|
|
74
74
|
Object.assign(lazyTemplate, renderer), require_control_flow.rn(branch, (branch) => insertLoaded(renderer, branch, branch.S, awaitCounter));
|
|
75
75
|
}, loadFailed(branch, awaitCounter));
|
|
76
|
-
}, _load_signal(() => (pending ||= load()).then((r) => ({ _: r.d }))));
|
|
76
|
+
}, _load_signal(() => (pending ||= load()).then((r) => ({ _: r.d || noop }))));
|
|
77
77
|
return lazyTemplate;
|
|
78
78
|
}), _load_setup = /*@__PURE__*/ require_control_flow.wt((nodeAccessor, childScopeAccessor, load) => {
|
|
79
79
|
nodeAccessor = require_control_flow.gn(nodeAccessor), childScopeAccessor = require_control_flow.gn(childScopeAccessor);
|
|
@@ -82,7 +82,7 @@ let require_control_flow = require("./dom-BNmfm4st.js"), empty = [], rest = Symb
|
|
|
82
82
|
let child = owner[childScopeAccessor];
|
|
83
83
|
if (renderer) require_control_flow.an(child, insertCached, -1, owner[nodeAccessor]);
|
|
84
84
|
else {
|
|
85
|
-
let awaitCounter = require_control_flow.
|
|
85
|
+
let awaitCounter = require_control_flow.f(owner);
|
|
86
86
|
child.X ||= /* @__PURE__ */ new Map(), (pending ||= load()).then((mod) => {
|
|
87
87
|
renderer = require_control_flow.lt("", ...mod._)(), require_control_flow.rn(child, (child) => insertLoaded(renderer, child, owner[nodeAccessor], awaitCounter));
|
|
88
88
|
}, loadFailed(child, awaitCounter));
|
|
@@ -90,7 +90,7 @@ let require_control_flow = require("./dom-BNmfm4st.js"), empty = [], rest = Symb
|
|
|
90
90
|
};
|
|
91
91
|
}), _load_signal = /*@__PURE__*/ require_control_flow.wt((load) => {
|
|
92
92
|
let pending, apply = (scope, value) => {
|
|
93
|
-
pending ||= load(), scope.X || !("X" in scope) && scope.H === require_control_flow.cn ? (scope.X ||= /* @__PURE__ */ new Map()).set(pending, [value, apply]) : apply._ ? apply._(scope, value) : pending.then((mod) => require_control_flow.rn(scope, apply._ = mod._, value),
|
|
93
|
+
pending ||= load(), scope.X || !("X" in scope) && scope.H === require_control_flow.cn ? (scope.X ||= /* @__PURE__ */ new Map()).set(pending, [value, apply]) : apply._ ? apply._(scope, value) : pending.then((mod) => require_control_flow.rn(scope, apply._ = mod._, value), noop);
|
|
94
94
|
};
|
|
95
95
|
return apply;
|
|
96
96
|
});
|
|
@@ -190,7 +190,7 @@ function _load_media_trigger(query) {
|
|
|
190
190
|
return (load) => () => (pending ||= new Promise((resolve) => (mql = matchMedia(query)).matches ? resolve() : mql.addEventListener("change", resolve, { once: !0 }))).then(load);
|
|
191
191
|
}
|
|
192
192
|
function _load_race_trigger(...triggers) {
|
|
193
|
-
let
|
|
193
|
+
let pending;
|
|
194
194
|
return (load) => () => (pending ||= Promise.race(triggers.map((t) => t(noop)()))).then(load);
|
|
195
195
|
}
|
|
196
196
|
function getSelectorOrResolve(selector, resolve) {
|
|
@@ -201,4 +201,4 @@ exports.$signal = require_control_flow.Zt, exports.$signalReset = require_contro
|
|
|
201
201
|
get: function() {
|
|
202
202
|
return require_control_flow.r;
|
|
203
203
|
}
|
|
204
|
-
}), exports._dynamic_tag_content = require_control_flow.i, exports._el = require_control_flow.ht, exports._el_read = require_control_flow.kt, exports._for_closure = require_control_flow.At, exports._for_in = require_control_flow.a, exports._for_of = require_control_flow.o, exports._for_selector = require_control_flow.jt, exports._for_to = require_control_flow.s, exports._for_until = require_control_flow.c, exports._global_read = require_control_flow.Mt, exports._hoist = require_control_flow.Nt, exports._hoist_read_error = require_control_flow.mn, exports._hoist_resume = require_control_flow.Pt, exports._html = require_control_flow.et, exports._id = require_control_flow.Ft, exports._if = require_control_flow.l, exports._if_closure = require_control_flow.It, exports._let = require_control_flow.Lt, exports._let_change = require_control_flow.Rt, exports._lifecycle = require_control_flow.tt, exports._load_event_trigger = _load_event_trigger, exports._load_idle_trigger = _load_idle_trigger, exports._load_media_trigger = _load_media_trigger, exports._load_race_trigger = _load_race_trigger, exports._load_setup = _load_setup, exports._load_signal = _load_signal, exports._load_template = _load_template, exports._load_visible_trigger = _load_visible_trigger, exports._on = require_control_flow.Xt, exports._or = require_control_flow.zt, exports.
|
|
204
|
+
}), exports._dynamic_tag_content = require_control_flow.i, exports._el = require_control_flow.ht, exports._el_read = require_control_flow.kt, exports._for_closure = require_control_flow.At, exports._for_in = require_control_flow.a, exports._for_of = require_control_flow.o, exports._for_selector = require_control_flow.jt, exports._for_to = require_control_flow.s, exports._for_until = require_control_flow.c, exports._global_read = require_control_flow.Mt, exports._hoist = require_control_flow.Nt, exports._hoist_read_error = require_control_flow.mn, exports._hoist_resume = require_control_flow.Pt, exports._html = require_control_flow.et, exports._id = require_control_flow.Ft, exports._if = require_control_flow.l, exports._if_closure = require_control_flow.It, exports._let = require_control_flow.Lt, exports._let_change = require_control_flow.Rt, exports._lifecycle = require_control_flow.tt, exports._load_event_trigger = _load_event_trigger, exports._load_idle_trigger = _load_idle_trigger, exports._load_media_trigger = _load_media_trigger, exports._load_race_trigger = _load_race_trigger, exports._load_setup = _load_setup, exports._load_signal = _load_signal, exports._load_template = _load_template, exports._load_visible_trigger = _load_visible_trigger, exports._on = require_control_flow.Xt, exports._or = require_control_flow.zt, exports._resume_dynamic_tag_var = require_control_flow.gt, exports._resumed = require_control_flow._t, exports._return = require_control_flow.Bt, exports._return_change = require_control_flow.Vt, exports._script = require_control_flow.Ht, exports._show = require_control_flow.u, exports._style_rule_item = require_control_flow.nt, exports._style_shell = require_control_flow.rt, exports._template = _template, exports._text = require_control_flow.it, exports._text_content = require_control_flow.at, exports._to_text = require_control_flow.ot, exports._try = require_control_flow.d, exports._var = require_control_flow.Ut, exports._var_change = require_control_flow.Wt, exports._var_resume = require_control_flow.vt, exports.attrTag = attrTag, exports.attrTags = attrTags, exports.compat = compat, exports.forIn = require_control_flow.ln, exports.forOf = require_control_flow.un, exports.forTo = require_control_flow.dn, exports.forUntil = require_control_flow.fn, exports.init = require_control_flow.bt, exports.initEmbedded = require_control_flow.xt, exports.ready = require_control_flow.St, exports.readyFailed = require_control_flow.Ct, exports.run = require_control_flow.on;
|
package/dist/dom.mjs
CHANGED
|
@@ -6,18 +6,18 @@ let empty = [], rest = Symbol(), classIdToBranch = /* @__PURE__ */ new Map(), cl
|
|
|
6
6
|
patchDynamicTag,
|
|
7
7
|
queueEffect,
|
|
8
8
|
init(warp10Noop) {
|
|
9
|
-
|
|
9
|
+
_resumed.$C_s = (scope) => {
|
|
10
10
|
if (getRenderScopes(scope.$)[scope.L] = scope, scope.m5c && classIdToBranch.set(scope.m5c, scope), classEventResolver) for (let key in scope) {
|
|
11
11
|
let resolved = classEventResolver(scope[key], scope);
|
|
12
12
|
resolved !== scope[key] && (scope[key] = resolved);
|
|
13
13
|
}
|
|
14
|
-
}
|
|
14
|
+
}, _resumed.$C_b = warp10Noop;
|
|
15
15
|
},
|
|
16
16
|
setClassEventResolver(fn) {
|
|
17
17
|
classEventResolver = fn;
|
|
18
18
|
},
|
|
19
19
|
resumeClassFunction(id, build) {
|
|
20
|
-
|
|
20
|
+
_resumed[id] = build;
|
|
21
21
|
},
|
|
22
22
|
getScope($global, scopeId) {
|
|
23
23
|
return getRenderScopes($global)?.[scopeId];
|
|
@@ -66,14 +66,14 @@ let empty = [], rest = Symbol(), classIdToBranch = /* @__PURE__ */ new Map(), cl
|
|
|
66
66
|
}
|
|
67
67
|
}, _template = (id, template, walks, setup, inputSignal) => {
|
|
68
68
|
let renderer = _content(id, template, walks, setup, inputSignal)();
|
|
69
|
-
return renderer.mount = mount, renderer._ = renderer,
|
|
70
|
-
}, _load_template = /*@__PURE__*/ withLazy((id, load) => {
|
|
69
|
+
return renderer.mount = mount, renderer._ = renderer, _resumed[id] = renderer;
|
|
70
|
+
}, noop = (_) => 0, _load_template = /*@__PURE__*/ withLazy((id, load) => {
|
|
71
71
|
let pending, lazyTemplate = _template(id, 0, 0, (branch) => {
|
|
72
72
|
let awaitCounter = addAwaitCounter(branch);
|
|
73
73
|
branch.X ||= /* @__PURE__ */ new Map(), (pending ||= load()).then((renderer) => {
|
|
74
74
|
Object.assign(lazyTemplate, renderer), queueAsyncRender(branch, (branch) => insertLoaded(renderer, branch, branch.S, awaitCounter));
|
|
75
75
|
}, loadFailed(branch, awaitCounter));
|
|
76
|
-
}, _load_signal(() => (pending ||= load()).then((r) => ({ _: r.d }))));
|
|
76
|
+
}, _load_signal(() => (pending ||= load()).then((r) => ({ _: r.d || noop }))));
|
|
77
77
|
return lazyTemplate;
|
|
78
78
|
}), _load_setup = /*@__PURE__*/ withLazy((nodeAccessor, childScopeAccessor, load) => {
|
|
79
79
|
nodeAccessor = decodeAccessor(nodeAccessor), childScopeAccessor = decodeAccessor(childScopeAccessor);
|
|
@@ -90,11 +90,11 @@ let empty = [], rest = Symbol(), classIdToBranch = /* @__PURE__ */ new Map(), cl
|
|
|
90
90
|
};
|
|
91
91
|
}), _load_signal = /*@__PURE__*/ withLazy((load) => {
|
|
92
92
|
let pending, apply = (scope, value) => {
|
|
93
|
-
pending ||= load(), scope.X || !("X" in scope) && scope.H === runId ? (scope.X ||= /* @__PURE__ */ new Map()).set(pending, [value, apply]) : apply._ ? apply._(scope, value) : pending.then((mod) => queueAsyncRender(scope, apply._ = mod._, value),
|
|
93
|
+
pending ||= load(), scope.X || !("X" in scope) && scope.H === runId ? (scope.X ||= /* @__PURE__ */ new Map()).set(pending, [value, apply]) : apply._ ? apply._(scope, value) : pending.then((mod) => queueAsyncRender(scope, apply._ = mod._, value), noop);
|
|
94
94
|
};
|
|
95
95
|
return apply;
|
|
96
96
|
});
|
|
97
|
-
import { $ as _attrs_script, A as _attr_input_value_script, At as _for_closure, B as _attr, Bt as _return, C as _attr_input_checkedValue_script, D as _attr_input_value_attribute_default, Dt as _closure_get, E as _attr_input_value, Et as _closure, F as _controllable_open, Ft as _id, G as _attr_nonce, Gt as _assert_init, H as _attr_class_item, Ht as _script, I as _controllable_select, It as _if_closure, J as _attr_style_items, Jt as removeAndDestroyBranch, K as _attr_style, Kt as destroyBranch, L as _controllable_textarea, Lt as _let, M as _attr_select_value_default, Mt as _global_read, N as _attr_select_value_script, Nt as _hoist, O as _attr_input_value_default, Ot as _const, P as _controllable_input, Pt as _hoist_resume, Q as _attrs_partial_content, Qt as $signalReset, Rt as _let_change, S as _attr_input_checkedValue_default, St as
|
|
97
|
+
import { $ as _attrs_script, A as _attr_input_value_script, At as _for_closure, B as _attr, Bt as _return, C as _attr_input_checkedValue_script, Ct as readyFailed, D as _attr_input_value_attribute_default, Dt as _closure_get, E as _attr_input_value, Et as _closure, F as _controllable_open, Ft as _id, G as _attr_nonce, Gt as _assert_init, H as _attr_class_item, Ht as _script, I as _controllable_select, It as _if_closure, J as _attr_style_items, Jt as removeAndDestroyBranch, K as _attr_style, Kt as destroyBranch, L as _controllable_textarea, Lt as _let, M as _attr_select_value_default, Mt as _global_read, N as _attr_select_value_script, Nt as _hoist, O as _attr_input_value_default, Ot as _const, P as _controllable_input, Pt as _hoist_resume, Q as _attrs_partial_content, Qt as $signalReset, Rt as _let_change, S as _attr_input_checkedValue_default, St as ready, T as _attr_input_checked_script, Tt as _child_setup, U as _attr_class_items, Ut as _var, V as _attr_class, Vt as _return_change, W as _attr_content, Wt as _var_change, X as _attrs_content, Xt as _on, Y as _attrs, Yt as syncGen, Z as _attrs_partial, Zt as $signal, _ as _attr_details_or_dialog_open, _t as _resumed, a as _for_in, an as queueRender, at as _text_content, b as _attr_input_checked, bt as init, c as _for_until, cn as runId, ct as toInsertNode, d as _try, dn as forTo, dt as _content_resume, et as _html, f as addAwaitCounter, fn as forUntil, ft as createAndSetupBranch, g as renderCatch, gn as decodeAccessor, gt as _resume_dynamic_tag_var, h as patchDynamicTag, hn as _call, ht as _el, i as _dynamic_tag_content, in as queueEffect, it as _text, j as _attr_select_value, jt as _for_selector, k as _attr_input_value_dynamic_default, kt as _el_read, l as _if, ln as forIn, lt as _content, mn as _hoist_read_error, mt as setupBranch, n as _await_promise, nn as prepareEffects, nt as _style_rule_item, o as _for_of, on as run, ot as _to_text, pn as _assert_hoist, pt as createBranch, q as _attr_style_item, qt as insertBranchBefore, r as _dynamic_tag, rn as queueAsyncRender, rt as _style_shell, s as _for_to, sn as runEffects, st as insertChildNodes, t as _await_content, tt as _lifecycle, u as _show, un as forOf, ut as _content_closures, v as _attr_details_or_dialog_open_default, vt as _var_resume, w as _attr_input_checked_default, wt as withLazy, x as _attr_input_checkedValue, xt as initEmbedded, y as _attr_details_or_dialog_open_script, yt as getRegisteredWithScope, zt as _or } from "./dom-z4IMlmeO.mjs";
|
|
98
98
|
//#region src/common/attr-tag.ts
|
|
99
99
|
function attrTag(attrs) {
|
|
100
100
|
return attrs[Symbol.iterator] = attrTagIterator, attrs[rest] = empty, attrs;
|
|
@@ -190,11 +190,11 @@ function _load_media_trigger(query) {
|
|
|
190
190
|
return (load) => () => (pending ||= new Promise((resolve) => (mql = matchMedia(query)).matches ? resolve() : mql.addEventListener("change", resolve, { once: !0 }))).then(load);
|
|
191
191
|
}
|
|
192
192
|
function _load_race_trigger(...triggers) {
|
|
193
|
-
let
|
|
193
|
+
let pending;
|
|
194
194
|
return (load) => () => (pending ||= Promise.race(triggers.map((t) => t(noop)()))).then(load);
|
|
195
195
|
}
|
|
196
196
|
function getSelectorOrResolve(selector, resolve) {
|
|
197
197
|
return document.querySelector(selector) || resolve();
|
|
198
198
|
}
|
|
199
199
|
//#endregion
|
|
200
|
-
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, _el, _el_read, _for_closure, _for_in, _for_of, _for_selector, _for_to, _for_until, _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,
|
|
200
|
+
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, _el, _el_read, _for_closure, _for_in, _for_of, _for_selector, _for_to, _for_until, _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, _resume_dynamic_tag_var, _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 };
|