marko 6.4.8 → 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/common/constants/closure-signal-prop.d.ts +1 -1
- package/dist/common/constants/closure-signal-prop.debug.d.ts +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-CFCBDift.mjs → dom-C1V5vpFs.mjs} +60 -98
- package/dist/debug/{dom-D8znnhpf.js → dom-DNB5yq3U.js} +59 -109
- package/dist/debug/dom.js +9 -14
- package/dist/debug/dom.mjs +9 -14
- package/dist/debug/html.js +39 -51
- package/dist/debug/html.mjs +37 -49
- package/dist/dom/catch.feat.js +4 -5
- package/dist/dom/catch.feat.mjs +2 -3
- package/dist/dom/compat.d.ts +1 -1
- package/dist/dom/control-flow.d.ts +1 -1
- 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/dom.d.ts +2 -3
- package/dist/dom/dynamic-tag-script.feat.js +3 -4
- package/dist/dom/dynamic-tag-script.feat.mjs +2 -3
- package/dist/dom/dynamic-tag-var.feat.js +3 -4
- 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 +4 -5
- package/dist/dom/placeholder.feat.mjs +2 -3
- package/dist/dom/resume.d.ts +1 -1
- package/dist/dom/scope.d.ts +1 -1
- package/dist/dom/signals.d.ts +1 -1
- package/dist/{dom-Bpkm72vV.js → dom-C2-Flitp.js} +122 -166
- package/dist/{dom-CVAevsbz.mjs → dom-DsHYWMCR.mjs} +59 -94
- package/dist/dom.js +36 -40
- package/dist/dom.mjs +9 -14
- package/dist/html/serializer.d.ts +1 -1
- package/dist/html/writer.d.ts +3 -3
- package/dist/html.d.ts +1 -1
- package/dist/html.js +60 -74
- package/dist/html.mjs +60 -75
- package/dist/translator/core/show.d.ts +3 -4
- package/dist/translator/index.js +1193 -1295
- package/dist/translator/util/assert.d.ts +9 -2
- package/dist/translator/util/bindings.d.ts +6 -5
- package/dist/translator/util/branch-tag.d.ts +1 -1
- package/dist/translator/util/constants/slot-kind.d.ts +1 -1
- package/dist/translator/util/known-tag.d.ts +3 -0
- package/dist/translator/util/module-registrations.d.ts +1 -1
- package/dist/translator/util/optional.d.ts +1 -0
- package/dist/translator/util/params-tree.d.ts +3 -3
- package/dist/translator/util/reasons.d.ts +2 -2
- package/dist/translator/util/references.d.ts +13 -10
- package/dist/translator/util/replace-with-statements.d.ts +4 -0
- package/dist/translator/util/runtime.d.ts +1 -0
- package/dist/translator/util/scope-accessor.d.ts +1 -1
- package/dist/translator/util/sections.d.ts +38 -14
- package/dist/translator/util/signals.d.ts +3 -11
- package/dist/translator/util/slots.d.ts +1 -1
- package/dist/translator/util/solve-reasons.d.ts +5 -0
- package/dist/translator/util/sources.d.ts +1 -1
- package/dist/translator/util/static-text.d.ts +1 -0
- package/dist/translator/util/structure.d.ts +3 -2
- package/dist/translator/util/tag-import.d.ts +0 -2
- package/dist/translator/util/tag-name-type.d.ts +3 -0
- package/dist/translator/util/write-guard.d.ts +2 -0
- package/dist/translator/visitors/placeholder.d.ts +4 -4
- package/package.json +6 -6
- package/tags/lifecycle.d.marko +2 -0
- package/dist/translator/visitors/constants/sibling-text.d.ts +0 -6
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,4 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const ScopesAccessor = "scopesAccessor";
|
|
2
2
|
export declare const SignalIndexAccessor = "signalIndexAccessor";
|
|
3
3
|
export declare const Index = "index";
|
|
4
4
|
type Self = typeof import("./closure-signal-prop.debug");
|
|
@@ -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 {
|
|
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 {
|
|
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 {
|
|
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 {
|
|
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
|