marko 6.4.9 → 6.4.10
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/debug/dom/catch.feat.js +2 -3
- package/dist/debug/dom/catch.feat.mjs +2 -3
- package/dist/debug/dom/controllable-input.feat.js +2 -3
- package/dist/debug/dom/controllable-input.feat.mjs +2 -3
- package/dist/debug/dom/controllable-open.feat.js +2 -3
- package/dist/debug/dom/controllable-open.feat.mjs +2 -3
- package/dist/debug/dom/controllable-select.feat.js +2 -3
- package/dist/debug/dom/controllable-select.feat.mjs +2 -3
- package/dist/debug/dom/controllable-textarea.feat.js +2 -3
- package/dist/debug/dom/controllable-textarea.feat.mjs +2 -3
- package/dist/debug/dom/controllable.feat.js +2 -3
- package/dist/debug/dom/controllable.feat.mjs +2 -3
- package/dist/debug/dom/dynamic-tag-script.feat.js +2 -3
- package/dist/debug/dom/dynamic-tag-script.feat.mjs +2 -3
- package/dist/debug/dom/dynamic-tag-var.feat.js +2 -3
- package/dist/debug/dom/dynamic-tag-var.feat.mjs +2 -3
- package/dist/debug/dom/lazy.feat.js +2 -3
- package/dist/debug/dom/lazy.feat.mjs +2 -3
- package/dist/debug/dom/placeholder.feat.js +2 -3
- package/dist/debug/dom/placeholder.feat.mjs +2 -3
- package/dist/debug/{dom-VKjkbuuo.mjs → dom-C1V5vpFs.mjs} +24 -48
- package/dist/debug/{dom-QkYva5Qx.js → dom-DNB5yq3U.js} +24 -48
- package/dist/debug/dom.js +6 -11
- package/dist/debug/dom.mjs +6 -11
- package/dist/debug/html.js +19 -38
- package/dist/debug/html.mjs +19 -38
- package/dist/dom/catch.feat.js +2 -3
- package/dist/dom/catch.feat.mjs +2 -3
- package/dist/dom/controllable-input.feat.js +1 -2
- package/dist/dom/controllable-input.feat.mjs +1 -2
- package/dist/dom/controllable-open.feat.js +2 -3
- package/dist/dom/controllable-open.feat.mjs +2 -3
- package/dist/dom/controllable-select.feat.js +2 -3
- package/dist/dom/controllable-select.feat.mjs +2 -3
- package/dist/dom/controllable-textarea.feat.js +2 -3
- package/dist/dom/controllable-textarea.feat.mjs +2 -3
- package/dist/dom/controllable.feat.js +1 -2
- package/dist/dom/controllable.feat.mjs +1 -2
- package/dist/dom/dynamic-tag-script.feat.js +2 -3
- package/dist/dom/dynamic-tag-script.feat.mjs +2 -3
- package/dist/dom/dynamic-tag-var.feat.js +1 -2
- package/dist/dom/dynamic-tag-var.feat.mjs +1 -2
- package/dist/dom/lazy.feat.js +2 -3
- package/dist/dom/lazy.feat.mjs +2 -3
- package/dist/dom/placeholder.feat.js +2 -3
- package/dist/dom/placeholder.feat.mjs +2 -3
- package/dist/{dom-IujlfJ6b.js → dom-C2-Flitp.js} +40 -60
- package/dist/{dom-DtKQb840.mjs → dom-DsHYWMCR.mjs} +40 -61
- package/dist/dom.js +6 -10
- package/dist/dom.mjs +6 -11
- package/dist/html.js +39 -59
- package/dist/html.mjs +39 -60
- package/dist/translator/index.js +222 -355
- package/dist/translator/util/assert.d.ts +9 -2
- package/dist/translator/util/known-tag.d.ts +3 -0
- package/dist/translator/util/sources.d.ts +1 -1
- package/dist/translator/util/tag-name-type.d.ts +3 -0
- package/package.json +6 -6
- package/tags/lifecycle.d.marko +2 -0
package/cheatsheet.md
CHANGED
|
@@ -165,7 +165,7 @@ Imperative libs (charts, maps) needing mount/update/destroy: use `<lifecycle>`,
|
|
|
165
165
|
<canvas/canvas/>
|
|
166
166
|
<lifecycle
|
|
167
167
|
onMount() { return { chart: new Chart(canvas(), data) } }
|
|
168
|
-
onUpdate() { this.chart.setData(data) } //
|
|
168
|
+
onUpdate() { this.chart.setData(data) } // runs when anything its attributes read changes
|
|
169
169
|
onDestroy() { this.chart.destroy() }
|
|
170
170
|
/>
|
|
171
171
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
3
|
-
|
|
2
|
+
const require_control_flow = require("../dom-DNB5yq3U.js");
|
|
3
|
+
// src/dom/catch.feat.ts
|
|
4
4
|
const deferToPendingTry = (fn, scope, branch) => {
|
|
5
5
|
while (branch) {
|
|
6
6
|
if (branch["#AwaitCounter"]?.i) return (scope[require_control_flow.PendingEffects] ||= ((branch[require_control_flow.PendingEffectScopes] ||= (branch["#AwaitCounter"].m && ((complete) => branch["#AwaitCounter"].c = (_) => complete() || require_control_flow.queueAsyncRender(branch, require_control_flow.queueEffect, require_control_flow.runPendingEffects))(branch["#AwaitCounter"].c), [])).push(scope), /* @__PURE__ */ new Set())).add(fn);
|
|
@@ -33,4 +33,3 @@ require_control_flow.installCatch((effects) => {
|
|
|
33
33
|
require_control_flow.renderCatch(render[require_control_flow.Scope], error);
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Bn as ParentBranch, Fn as ClosestBranch, Hn as PendingEffects, Mn as Scope, Un as PendingRenders, Vn as PendingEffectScopes, cn as queueAsyncRender, jn as Pending, ln as queueEffect, on as installCatch, v as renderCatch, y as runPendingEffects } from "../dom-
|
|
2
|
-
|
|
1
|
+
import { Bn as ParentBranch, Fn as ClosestBranch, Hn as PendingEffects, Mn as Scope, Un as PendingRenders, Vn as PendingEffectScopes, cn as queueAsyncRender, jn as Pending, ln as queueEffect, on as installCatch, v as renderCatch, y as runPendingEffects } from "../dom-C1V5vpFs.mjs";
|
|
2
|
+
// src/dom/catch.feat.ts
|
|
3
3
|
const deferToPendingTry = (fn, scope, branch) => {
|
|
4
4
|
while (branch) {
|
|
5
5
|
if (branch["#AwaitCounter"]?.i) return (scope[PendingEffects] ||= ((branch[PendingEffectScopes] ||= (branch["#AwaitCounter"].m && ((complete) => branch["#AwaitCounter"].c = (_) => complete() || queueAsyncRender(branch, queueEffect, runPendingEffects))(branch["#AwaitCounter"].c), [])).push(scope), /* @__PURE__ */ new Set())).add(fn);
|
|
@@ -32,4 +32,3 @@ installCatch((effects) => {
|
|
|
32
32
|
renderCatch(render[Scope], error);
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
|
-
//#endregion
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
3
|
-
|
|
2
|
+
const require_control_flow = require("../dom-DNB5yq3U.js");
|
|
3
|
+
// src/dom/controllable-input.feat.ts
|
|
4
4
|
require_control_flow.controllableScripts[0] = require_control_flow._attr_input_checked_script;
|
|
5
5
|
require_control_flow.controllableScripts[1] = require_control_flow._attr_input_checkedValue_script;
|
|
6
6
|
require_control_flow.controllableScripts[2] = require_control_flow._attr_input_value_script;
|
|
7
|
-
//#endregion
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { D as _attr_input_checkedValue_script, H as controllableScripts, P as _attr_input_value_script, k as _attr_input_checked_script } from "../dom-
|
|
2
|
-
|
|
1
|
+
import { D as _attr_input_checkedValue_script, H as controllableScripts, P as _attr_input_value_script, k as _attr_input_checked_script } from "../dom-C1V5vpFs.mjs";
|
|
2
|
+
// src/dom/controllable-input.feat.ts
|
|
3
3
|
controllableScripts[0] = _attr_input_checked_script;
|
|
4
4
|
controllableScripts[1] = _attr_input_checkedValue_script;
|
|
5
5
|
controllableScripts[2] = _attr_input_value_script;
|
|
6
|
-
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
3
|
-
|
|
2
|
+
const require_control_flow = require("../dom-DNB5yq3U.js");
|
|
3
|
+
// src/dom/controllable-open.feat.ts
|
|
4
4
|
require_control_flow.controllableScripts[4] = require_control_flow._attr_details_or_dialog_open_script;
|
|
5
|
-
//#endregion
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { C as _attr_details_or_dialog_open_script, H as controllableScripts } from "../dom-
|
|
2
|
-
|
|
1
|
+
import { C as _attr_details_or_dialog_open_script, H as controllableScripts } from "../dom-C1V5vpFs.mjs";
|
|
2
|
+
// src/dom/controllable-open.feat.ts
|
|
3
3
|
controllableScripts[4] = _attr_details_or_dialog_open_script;
|
|
4
|
-
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
3
|
-
|
|
2
|
+
const require_control_flow = require("../dom-DNB5yq3U.js");
|
|
3
|
+
// src/dom/controllable-select.feat.ts
|
|
4
4
|
require_control_flow.controllableScripts[3] = require_control_flow._attr_select_value_script;
|
|
5
|
-
//#endregion
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { H as controllableScripts, L as _attr_select_value_script } from "../dom-
|
|
2
|
-
|
|
1
|
+
import { H as controllableScripts, L as _attr_select_value_script } from "../dom-C1V5vpFs.mjs";
|
|
2
|
+
// src/dom/controllable-select.feat.ts
|
|
3
3
|
controllableScripts[3] = _attr_select_value_script;
|
|
4
|
-
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
3
|
-
|
|
2
|
+
const require_control_flow = require("../dom-DNB5yq3U.js");
|
|
3
|
+
// src/dom/controllable-textarea.feat.ts
|
|
4
4
|
require_control_flow.controllableScripts[2] = require_control_flow._attr_input_value_script;
|
|
5
|
-
//#endregion
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { H as controllableScripts, P as _attr_input_value_script } from "../dom-
|
|
2
|
-
|
|
1
|
+
import { H as controllableScripts, P as _attr_input_value_script } from "../dom-C1V5vpFs.mjs";
|
|
2
|
+
// src/dom/controllable-textarea.feat.ts
|
|
3
3
|
controllableScripts[2] = _attr_input_value_script;
|
|
4
|
-
//#endregion
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
2
|
+
const require_control_flow = require("../dom-DNB5yq3U.js");
|
|
3
3
|
require("./controllable-input.feat.js");
|
|
4
4
|
require("./controllable-open.feat.js");
|
|
5
5
|
require("./controllable-select.feat.js");
|
|
6
|
-
|
|
6
|
+
// src/dom/controllable.feat.ts
|
|
7
7
|
require_control_flow.controllableSpreadHelpers.INPUT = require_control_flow._controllable_input;
|
|
8
8
|
require_control_flow.controllableSpreadHelpers.TEXTAREA = require_control_flow._controllable_textarea;
|
|
9
9
|
require_control_flow.controllableSpreadHelpers.SELECT = require_control_flow._controllable_select;
|
|
10
10
|
require_control_flow.controllableSpreadHelpers.DETAILS = require_control_flow.controllableSpreadHelpers.DIALOG = require_control_flow._controllable_open;
|
|
11
|
-
//#endregion
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { B as _controllable_select, R as _controllable_input, U as controllableSpreadHelpers, V as _controllable_textarea, z as _controllable_open } from "../dom-
|
|
1
|
+
import { B as _controllable_select, R as _controllable_input, U as controllableSpreadHelpers, V as _controllable_textarea, z as _controllable_open } from "../dom-C1V5vpFs.mjs";
|
|
2
2
|
import "./controllable-input.feat.mjs";
|
|
3
3
|
import "./controllable-open.feat.mjs";
|
|
4
4
|
import "./controllable-select.feat.mjs";
|
|
5
|
-
|
|
5
|
+
// src/dom/controllable.feat.ts
|
|
6
6
|
controllableSpreadHelpers.INPUT = _controllable_input;
|
|
7
7
|
controllableSpreadHelpers.TEXTAREA = _controllable_textarea;
|
|
8
8
|
controllableSpreadHelpers.SELECT = _controllable_select;
|
|
9
9
|
controllableSpreadHelpers.DETAILS = controllableSpreadHelpers.DIALOG = _controllable_open;
|
|
10
|
-
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
3
|
-
|
|
2
|
+
const require_control_flow = require("../dom-DNB5yq3U.js");
|
|
3
|
+
// src/dom/dynamic-tag-script.feat.ts
|
|
4
4
|
require_control_flow._resumed[require_control_flow.DYNAMIC_TAG_SCRIPT_REGISTER_ID] = require_control_flow.withBranches(require_control_flow.dynamicTagScript);
|
|
5
|
-
//#endregion
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { $t as DYNAMIC_TAG_SCRIPT_REGISTER_ID, Cn as withBranches, h as dynamicTagScript, xt as _resumed } from "../dom-
|
|
2
|
-
|
|
1
|
+
import { $t as DYNAMIC_TAG_SCRIPT_REGISTER_ID, Cn as withBranches, h as dynamicTagScript, xt as _resumed } from "../dom-C1V5vpFs.mjs";
|
|
2
|
+
// src/dom/dynamic-tag-script.feat.ts
|
|
3
3
|
_resumed[DYNAMIC_TAG_SCRIPT_REGISTER_ID] = withBranches(dynamicTagScript);
|
|
4
|
-
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
3
|
-
|
|
2
|
+
const require_control_flow = require("../dom-DNB5yq3U.js");
|
|
3
|
+
// src/dom/dynamic-tag-var.feat.ts
|
|
4
4
|
require_control_flow.installBranchRenders();
|
|
5
5
|
require_control_flow.installDynamicTagVar((scope, branch, scopeKey, renderer) => {
|
|
6
6
|
branch[require_control_flow.BranchRenders] = require_control_flow.createBranchRenders(scope, scopeKey);
|
|
@@ -10,4 +10,3 @@ require_control_flow.installDynamicTagVar((scope, branch, scopeKey, renderer) =>
|
|
|
10
10
|
if (!(renderer["setup"] || renderer["params"])?.["returns"]) throw new Error(`A dynamic tag with a [tag variable](https://markojs.com/docs/reference/language#tag-variables) rendered \`${renderer["id"]}\`, which does not [\`<return>\`](https://markojs.com/docs/reference/core-tag#return) a value. Add a \`<return>\` to it, or remove the variable.`);
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
|
-
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Gn as StartNode, Kn as TagVariable, Mt as _el_read, Pn as BranchRenders, an as installBranchRenders, g as installDynamicTagVar, in as createBranchRenders } from "../dom-
|
|
2
|
-
|
|
1
|
+
import { Gn as StartNode, Kn as TagVariable, Mt as _el_read, Pn as BranchRenders, an as installBranchRenders, g as installDynamicTagVar, in as createBranchRenders } from "../dom-C1V5vpFs.mjs";
|
|
2
|
+
// src/dom/dynamic-tag-var.feat.ts
|
|
3
3
|
installBranchRenders();
|
|
4
4
|
installDynamicTagVar((scope, branch, scopeKey, renderer) => {
|
|
5
5
|
branch[BranchRenders] = createBranchRenders(scope, scopeKey);
|
|
@@ -9,4 +9,3 @@ installDynamicTagVar((scope, branch, scopeKey, renderer) => {
|
|
|
9
9
|
if (!(renderer["setup"] || renderer["params"])?.["returns"]) throw new Error(`A dynamic tag with a [tag variable](https://markojs.com/docs/reference/language#tag-variables) rendered \`${renderer["id"]}\`, which does not [\`<return>\`](https://markojs.com/docs/reference/core-tag#return) a value. Add a \`<return>\` to it, or remove the variable.`);
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
//#endregion
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
3
|
-
|
|
2
|
+
const require_control_flow = require("../dom-DNB5yq3U.js");
|
|
3
|
+
// src/dom/placeholder.feat.ts
|
|
4
4
|
require_control_flow._resumed[require_control_flow.PLACEHOLDER_DISMISS_REGISTER_ID] = (tryBranch) => {
|
|
5
5
|
if (tryBranch["#PlaceholderBranch"]) {
|
|
6
6
|
require_control_flow.destroyBranch(tryBranch[require_control_flow.PlaceholderBranch]);
|
|
7
7
|
tryBranch[require_control_flow.PlaceholderBranch] = 0;
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
|
-
//#endregion
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Wn as PlaceholderBranch, Yt as destroyBranch, en as PLACEHOLDER_DISMISS_REGISTER_ID, xt as _resumed } from "../dom-
|
|
2
|
-
|
|
1
|
+
import { Wn as PlaceholderBranch, Yt as destroyBranch, en as PLACEHOLDER_DISMISS_REGISTER_ID, xt as _resumed } from "../dom-C1V5vpFs.mjs";
|
|
2
|
+
// src/dom/placeholder.feat.ts
|
|
3
3
|
_resumed[PLACEHOLDER_DISMISS_REGISTER_ID] = (tryBranch) => {
|
|
4
4
|
if (tryBranch["#PlaceholderBranch"]) {
|
|
5
5
|
destroyBranch(tryBranch[PlaceholderBranch]);
|
|
6
6
|
tryBranch[PlaceholderBranch] = 0;
|
|
7
7
|
}
|
|
8
8
|
};
|
|
9
|
-
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/common/constants/accessor-prefix.debug.ts
|
|
2
2
|
const BranchScopes$1 = "BranchScopes:";
|
|
3
3
|
const ClosureScopes = "ClosureScopes:";
|
|
4
4
|
const ClosureSignalIndex = "ClosureSignalIndex:";
|
|
@@ -15,8 +15,7 @@ const Lifecycle = "Lifecycle:";
|
|
|
15
15
|
const Promise$1 = "Promise:";
|
|
16
16
|
const TagVariableChange$1 = "TagVariableChange:";
|
|
17
17
|
const TryBranch$1 = "TryBranch:";
|
|
18
|
-
|
|
19
|
-
//#region src/common/constants/accessor-prop.debug.ts
|
|
18
|
+
// src/common/constants/accessor-prop.debug.ts
|
|
20
19
|
const Global = "$global";
|
|
21
20
|
const AbortControllers = "#AbortControllers";
|
|
22
21
|
const AbortScopes = "#AbortScopes";
|
|
@@ -46,16 +45,13 @@ const Subscriptions = "#Subscriptions";
|
|
|
46
45
|
const TagVariable = "#TagVariable";
|
|
47
46
|
const TagVariableChange = "#TagVariableChange";
|
|
48
47
|
const TryBranch = "#TryBranch";
|
|
49
|
-
|
|
50
|
-
//#region src/common/constants/closure-scopes-prop.debug.ts
|
|
48
|
+
// src/common/constants/closure-scopes-prop.debug.ts
|
|
51
49
|
const Changed = "Changed";
|
|
52
|
-
|
|
53
|
-
//#region src/common/constants/closure-signal-prop.debug.ts
|
|
50
|
+
// src/common/constants/closure-signal-prop.debug.ts
|
|
54
51
|
const ScopesAccessor = "scopesAccessor";
|
|
55
52
|
const SignalIndexAccessor = "signalIndexAccessor";
|
|
56
53
|
const Index = "index";
|
|
57
|
-
|
|
58
|
-
//#region src/common/constants/keyed-scopes-prop.debug.ts
|
|
54
|
+
// src/common/constants/keyed-scopes-prop.debug.ts
|
|
59
55
|
const PreviousKey = "PreviousKey:";
|
|
60
56
|
const Scope = "scope";
|
|
61
57
|
const Signal = "signal";
|
|
@@ -69,8 +65,7 @@ const Accessor = "accessor";
|
|
|
69
65
|
const LocalClosures = "localClosures";
|
|
70
66
|
const Returns = "returns";
|
|
71
67
|
const Lazy = "lazy";
|
|
72
|
-
|
|
73
|
-
//#region src/common/helpers.ts
|
|
68
|
+
// src/common/helpers.ts
|
|
74
69
|
const invalidNativeAttrNameReg = /^[^a-z_]|[^a-z0-9._:-]/i;
|
|
75
70
|
const knownWrongAttrs = {
|
|
76
71
|
className: "class",
|
|
@@ -194,8 +189,7 @@ function withDynamicHtml(runtime) {
|
|
|
194
189
|
dynamicHtmlEnabled = 1;
|
|
195
190
|
return runtime;
|
|
196
191
|
}
|
|
197
|
-
|
|
198
|
-
//#region src/common/errors.ts
|
|
192
|
+
// src/common/errors.ts
|
|
199
193
|
const lowercaseOnAttrReg = /^on[a-z]/;
|
|
200
194
|
function assertValidAttrValue(name, value) {
|
|
201
195
|
if (value && typeof value !== "string" && lowercaseOnAttrReg.test(name)) throw new Error(`The \`${name}\` attribute must be a string or a falsey value (\`null\`, \`undefined\`, \`false\`, \`0\`, …), but received type "${typeof value}". To attach an event listener, use the \`on${name[2].toUpperCase()}${name.slice(3)}\` event handler instead.`);
|
|
@@ -310,8 +304,7 @@ function joinWithAnd(a) {
|
|
|
310
304
|
default: return `${a.slice(0, -1).join(", ")}, and ${a[a.length - 1]}`;
|
|
311
305
|
}
|
|
312
306
|
}
|
|
313
|
-
|
|
314
|
-
//#region src/common/for.ts
|
|
307
|
+
// src/common/for.ts
|
|
315
308
|
function forIn(obj, cb) {
|
|
316
309
|
for (const key in obj) cb(key, obj[key]);
|
|
317
310
|
}
|
|
@@ -338,8 +331,7 @@ function forUntil(until, from, step, cb) {
|
|
|
338
331
|
const delta = step || 1;
|
|
339
332
|
for (let steps = (until - start) / delta, i = 0; i < steps; i++) cb(start + i * delta);
|
|
340
333
|
}
|
|
341
|
-
|
|
342
|
-
//#region src/dom/queue.ts
|
|
334
|
+
// src/dom/queue.ts
|
|
343
335
|
let rendering;
|
|
344
336
|
let runId = 2;
|
|
345
337
|
let pendingEffects = [];
|
|
@@ -479,8 +471,7 @@ function runRenders(renders = pendingRenders) {
|
|
|
479
471
|
runRender(render);
|
|
480
472
|
}
|
|
481
473
|
}
|
|
482
|
-
|
|
483
|
-
//#region src/dom/abort-signal.ts
|
|
474
|
+
// src/dom/abort-signal.ts
|
|
484
475
|
function $signalReset(scope, id) {
|
|
485
476
|
const ctrl = scope[AbortControllers]?.[id];
|
|
486
477
|
if (ctrl) {
|
|
@@ -514,8 +505,7 @@ let subscriptionsEnabled;
|
|
|
514
505
|
function abort(ctrl) {
|
|
515
506
|
ctrl.abort();
|
|
516
507
|
}
|
|
517
|
-
|
|
518
|
-
//#region src/common/opt.ts
|
|
508
|
+
// src/common/opt.ts
|
|
519
509
|
function toArray(opt) {
|
|
520
510
|
return opt ? Array.isArray(opt) ? opt : [opt] : [];
|
|
521
511
|
}
|
|
@@ -528,8 +518,7 @@ function forEach(opt, cb) {
|
|
|
528
518
|
function push(opt, item) {
|
|
529
519
|
return opt ? Array.isArray(opt) ? (opt.push(item), opt) : [opt, item] : item;
|
|
530
520
|
}
|
|
531
|
-
|
|
532
|
-
//#region src/dom/event.ts
|
|
521
|
+
// src/dom/event.ts
|
|
533
522
|
function _on(element, type, handler) {
|
|
534
523
|
assertHandlerIsFunction("on" + type[0].toUpperCase() + type.slice(1), handler);
|
|
535
524
|
delegate(type, handleDelegated);
|
|
@@ -551,21 +540,18 @@ function handleDelegated(ev) {
|
|
|
551
540
|
}
|
|
552
541
|
delete ev.currentTarget;
|
|
553
542
|
}
|
|
554
|
-
|
|
555
|
-
//#region src/dom/parse-html.ts
|
|
543
|
+
// src/dom/parse-html.ts
|
|
556
544
|
const parsers = {};
|
|
557
545
|
function parseHTML(html, ns) {
|
|
558
546
|
const parser = parsers[ns] ||= document.createElementNS(ns, "template");
|
|
559
547
|
parser.innerHTML = html;
|
|
560
548
|
return parser.content || parser;
|
|
561
549
|
}
|
|
562
|
-
|
|
563
|
-
//#region src/common/meta.ts
|
|
550
|
+
// src/common/meta.ts
|
|
564
551
|
const DYNAMIC_TAG_SCRIPT_REGISTER_ID = "_dynamicTagScript";
|
|
565
552
|
const DYNAMIC_TAG_VAR_REGISTER_ID = "_dynamicTagVar";
|
|
566
553
|
const PLACEHOLDER_DISMISS_REGISTER_ID = "_placeholderDismiss";
|
|
567
|
-
|
|
568
|
-
//#region src/dom/scope.ts
|
|
554
|
+
// src/dom/scope.ts
|
|
569
555
|
let nextScopeId = 1e6;
|
|
570
556
|
let collectingScopes;
|
|
571
557
|
function createScope($global, closestBranch) {
|
|
@@ -632,8 +618,7 @@ function detachBranch(branch) {
|
|
|
632
618
|
fragment.namespaceURI = branch[StartNode].parentNode.namespaceURI;
|
|
633
619
|
insertChildNodes(fragment, null, branch[StartNode], branch[EndNode]);
|
|
634
620
|
}
|
|
635
|
-
|
|
636
|
-
//#region src/dom/schedule.ts
|
|
621
|
+
// src/dom/schedule.ts
|
|
637
622
|
let runTask;
|
|
638
623
|
let isScheduled;
|
|
639
624
|
let channel;
|
|
@@ -665,8 +650,7 @@ function triggerMacroTask() {
|
|
|
665
650
|
}
|
|
666
651
|
channel.port2.postMessage(0);
|
|
667
652
|
}
|
|
668
|
-
|
|
669
|
-
//#region src/dom/signals.ts
|
|
653
|
+
// src/dom/signals.ts
|
|
670
654
|
function _let(id, fn) {
|
|
671
655
|
const valueAccessor = id.slice(0, id.lastIndexOf("/"));
|
|
672
656
|
id = +id.slice(id.lastIndexOf("/") + 1);
|
|
@@ -864,8 +848,7 @@ function _hoist(...path) {
|
|
|
864
848
|
function _hoist_resume(id, ...path) {
|
|
865
849
|
return _resumed[id] = _hoist(...path);
|
|
866
850
|
}
|
|
867
|
-
|
|
868
|
-
//#region src/dom/walker.ts
|
|
851
|
+
// src/dom/walker.ts
|
|
869
852
|
/** Cloned templates are small, where a TreeWalker's per-step cost dominates. */
|
|
870
853
|
let currentNode;
|
|
871
854
|
function walk(startNode, walkCodes, branch) {
|
|
@@ -917,8 +900,7 @@ function getDebugKey(index, node) {
|
|
|
917
900
|
return index;
|
|
918
901
|
}
|
|
919
902
|
const walkNextSibling = (_) => currentNode = currentNode.nextSibling || currentNode;
|
|
920
|
-
|
|
921
|
-
//#region src/dom/resume.ts
|
|
903
|
+
// src/dom/resume.ts
|
|
922
904
|
const _resumed = {};
|
|
923
905
|
let curRenders;
|
|
924
906
|
let embedRenders;
|
|
@@ -1156,8 +1138,7 @@ function _dynamic_tag_var_resume(accessor) {
|
|
|
1156
1138
|
return _el_read(node.nodeType === 8 ? node.previousSibling : node);
|
|
1157
1139
|
};
|
|
1158
1140
|
}
|
|
1159
|
-
|
|
1160
|
-
//#region src/dom/renderer.ts
|
|
1141
|
+
// src/dom/renderer.ts
|
|
1161
1142
|
function createBranch($global, renderer, parentScope, parentNode) {
|
|
1162
1143
|
const branch = createScope($global);
|
|
1163
1144
|
branch["_"] = renderer["owner"] || parentScope;
|
|
@@ -1247,8 +1228,7 @@ function createCloneableHTML(html, ns) {
|
|
|
1247
1228
|
branch[EndNode] = clone.lastChild;
|
|
1248
1229
|
};
|
|
1249
1230
|
}
|
|
1250
|
-
|
|
1251
|
-
//#region src/dom/dom.ts
|
|
1231
|
+
// src/dom/dom.ts
|
|
1252
1232
|
function _to_text(value) {
|
|
1253
1233
|
assertValidTextValue(value);
|
|
1254
1234
|
return value || value === 0 ? value + "" : "";
|
|
@@ -1455,8 +1435,7 @@ function insertChildNodes(parentNode, referenceNode, startNode, endNode) {
|
|
|
1455
1435
|
startNode = next;
|
|
1456
1436
|
}
|
|
1457
1437
|
}
|
|
1458
|
-
|
|
1459
|
-
//#region src/dom/resolve-cursor-position.ts
|
|
1438
|
+
// src/dom/resolve-cursor-position.ts
|
|
1460
1439
|
const R = /[\p{L}\p{N}]/gu;
|
|
1461
1440
|
function resolveCursorPosition(inputType, initialPosition, initialValue, updatedValue) {
|
|
1462
1441
|
if ((initialPosition || initialPosition === 0) && (initialPosition !== initialValue.length || /kw/.test(inputType))) {
|
|
@@ -1470,8 +1449,7 @@ function resolveCursorPosition(inputType, initialPosition, initialValue, updated
|
|
|
1470
1449
|
}
|
|
1471
1450
|
return -1;
|
|
1472
1451
|
}
|
|
1473
|
-
|
|
1474
|
-
//#region src/dom/controllable.ts
|
|
1452
|
+
// src/dom/controllable.ts
|
|
1475
1453
|
let inputType = "";
|
|
1476
1454
|
function _attr_input_checked_default(scope, nodeAccessor, checked) {
|
|
1477
1455
|
const el = scope[nodeAccessor];
|
|
@@ -1766,8 +1744,7 @@ function _controllable_open(scope, nodeAccessor, nextAttrs) {
|
|
|
1766
1744
|
return /^open(?:Change)?$/;
|
|
1767
1745
|
}
|
|
1768
1746
|
}
|
|
1769
|
-
|
|
1770
|
-
//#region src/dom/control-flow.ts
|
|
1747
|
+
// src/dom/control-flow.ts
|
|
1771
1748
|
function _await_promise(nodeAccessor, params) {
|
|
1772
1749
|
const promiseAccessor = Promise$1 + nodeAccessor;
|
|
1773
1750
|
const branchAccessor = BranchScopes$1 + nodeAccessor;
|
|
@@ -2233,5 +2210,4 @@ function bySecondArg(_item, index) {
|
|
|
2233
2210
|
function byFirstArg(name) {
|
|
2234
2211
|
return name;
|
|
2235
2212
|
}
|
|
2236
|
-
//#endregion
|
|
2237
2213
|
export { _attr_style_items as $, DYNAMIC_TAG_SCRIPT_REGISTER_ID as $t, _attr_input_value as A, Setup as An, _closure_get as At, _controllable_select as B, ParentBranch as Bn, _let as Bt, _attr_details_or_dialog_open_script as C, withBranches as Cn, getRegisteredWithScope as Ct, _attr_input_checkedValue_script as D, Owner as Dn, readyFailed as Dt, _attr_input_checkedValue_default as E, LocalClosures as En, ready as Et, _attr_select_value as F, ClosestBranch as Fn, _global_read as Ft, _attr_class as G, StartNode as Gn, _script as Gt, controllableScripts as H, PendingEffects as Hn, _or as Ht, _attr_select_value_default as I, EndNode as In, _hoist as It, _attr_class_names as J, _assert_init as Jt, _attr_class_item as K, TagVariable as Kn, _var as Kt, _attr_select_value_script as L, Gen$1 as Ln, _hoist_resume as Lt, _attr_input_value_default as M, Scope as Mn, _el_read as Mt, _attr_input_value_dynamic_default as N, AwaitCounter as Nn, _for_closure as Nt, _attr_input_checked_default as O, Params as On, withLazy as Ot, _attr_input_value_script as P, BranchRenders as Pn, _for_selector as Pt, _attr_style_item as Q, syncGen as Qt, _controllable_input as R, Global as Rn, _id as Rt, _attr_details_or_dialog_open_default as S, _call as Sn, _var_resume as St, _attr_input_checkedValue as T, Lazy as Tn, initEmbedded as Tt, controllableSpreadHelpers as U, PendingRenders as Un, _return as Ut, _controllable_textarea as V, PendingEffectScopes as Vn, _let_change as Vt, _attr as W, PlaceholderBranch as Wn, _return_change as Wt, _attr_nonce as X, insertBranchBefore as Xt, _attr_content as Y, destroyBranch as Yt, _attr_style as Z, removeAndDestroyBranch as Zt, patchDynamicTag as _, forTo as _n, createBranch as _t, _for_in as a, installBranchRenders as an, _html as at, startAwait as b, _assert_hoist as bn, _el as bt, _for_to as c, queueAsyncRender as cn, _style_shell as ct, _for_until_unkeyed as d, rendering as dn, _to_text as dt, PLACEHOLDER_DISMISS_REGISTER_ID as en, _attrs as et, _if as f, run as fn, _content as ft, installDynamicTagVar as g, forOf as gn, createAndSetupBranch as gt, dynamicTagScript as h, forIn as hn, _return_setup as ht, _dynamic_tag_content as i, createBranchRenders as in, _attrs_script as it, _attr_input_value_attribute_default as j, Pending as jn, _const as jt, _attr_input_checked_script as k, Returns as kn, _closure as kt, _for_to_unkeyed as l, queueEffect as ln, _text as lt, _try as m, runId as mn, _content_resume as mt, _await_promise as n, $signal as nn, _attrs_partial as nt, _for_of as o, installCatch as on, _lifecycle as ot, _show as p, runEffects as pn, _content_closures as pt, _attr_class_items as q, _var_change as qt, _dynamic_tag as r, $signalReset as rn, _attrs_partial_content as rt, _for_of_unkeyed as s, prepareEffects as sn, _style_rule_item as st, _await_content as t, _on as tn, _attrs_content as tt, _for_until as u, queueRender as un, _text_content as ut, renderCatch as v, forUntil as vn, setupBranch as vt, _attr_input_checked as w, Clone as wn, init as wt, _attr_details_or_dialog_open as x, _hoist_read_error as xn, _resumed as xt, runPendingEffects as y, _assert_class_toggles as yn, _dynamic_tag_var_resume as yt, _controllable_open as z, Load as zn, _if_closure as zt };
|