marko 6.4.16 → 6.5.0
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 +12 -1
- package/dist/debug/dom/catch.feat.js +2 -2
- package/dist/debug/dom/catch.feat.mjs +2 -2
- package/dist/debug/dom/compat.feat.js +1 -1
- package/dist/debug/dom/compat.feat.mjs +1 -1
- package/dist/debug/dom/controllable-input.feat.js +1 -1
- package/dist/debug/dom/controllable-input.feat.mjs +1 -1
- package/dist/debug/dom/controllable-open.feat.js +1 -1
- package/dist/debug/dom/controllable-open.feat.mjs +1 -1
- package/dist/debug/dom/controllable-select.feat.js +1 -1
- package/dist/debug/dom/controllable-select.feat.mjs +1 -1
- package/dist/debug/dom/controllable-textarea.feat.js +1 -1
- package/dist/debug/dom/controllable-textarea.feat.mjs +1 -1
- package/dist/debug/dom/controllable.feat.js +1 -1
- package/dist/debug/dom/controllable.feat.mjs +1 -1
- package/dist/debug/dom/dynamic-tag-script.feat.js +1 -1
- package/dist/debug/dom/dynamic-tag-script.feat.mjs +1 -1
- package/dist/debug/dom/dynamic-tag-var.feat.js +1 -1
- package/dist/debug/dom/dynamic-tag-var.feat.mjs +1 -1
- package/dist/debug/dom/lazy.feat.js +1 -1
- package/dist/debug/dom/lazy.feat.mjs +1 -1
- package/dist/debug/dom/placeholder.feat.js +1 -1
- package/dist/debug/dom/placeholder.feat.mjs +1 -1
- package/dist/debug/{dom-BLoTKI2r.js → dom-BiJ_UKJV.js} +9 -9
- package/dist/debug/{dom-DlBA4dCe.mjs → dom-D3A8gh_D.mjs} +4 -4
- package/dist/debug/dom.js +1 -1
- package/dist/debug/dom.mjs +1 -1
- package/dist/debug/html/compat.feat.js +1 -1
- package/dist/debug/html/compat.feat.mjs +1 -1
- package/dist/debug/{html-DM7X2D_b.mjs → html-Bfl3MJP9.mjs} +27 -24
- package/dist/debug/{html-Du0z056z.js → html-shBfuhlc.js} +27 -24
- package/dist/debug/html.js +1 -1
- package/dist/debug/html.mjs +1 -1
- package/dist/dom/catch.feat.js +3 -3
- package/dist/dom/catch.feat.mjs +2 -2
- package/dist/dom/compat.feat.js +1 -1
- package/dist/dom/compat.feat.mjs +1 -1
- package/dist/dom/control-flow.d.ts +1 -1
- package/dist/dom/controllable-input.feat.js +1 -1
- package/dist/dom/controllable-input.feat.mjs +1 -1
- package/dist/dom/controllable-open.feat.js +1 -1
- package/dist/dom/controllable-open.feat.mjs +1 -1
- package/dist/dom/controllable-select.feat.js +1 -1
- package/dist/dom/controllable-select.feat.mjs +1 -1
- package/dist/dom/controllable-textarea.feat.js +1 -1
- package/dist/dom/controllable-textarea.feat.mjs +1 -1
- package/dist/dom/controllable.feat.js +1 -1
- package/dist/dom/controllable.feat.mjs +1 -1
- package/dist/dom/dynamic-tag-script.feat.js +1 -1
- package/dist/dom/dynamic-tag-script.feat.mjs +1 -1
- package/dist/dom/dynamic-tag-var.feat.js +1 -1
- package/dist/dom/dynamic-tag-var.feat.mjs +1 -1
- package/dist/dom/lazy.feat.js +1 -1
- package/dist/dom/lazy.feat.mjs +1 -1
- package/dist/dom/placeholder.feat.js +1 -1
- package/dist/dom/placeholder.feat.mjs +1 -1
- package/dist/{dom-BRtFOIF-.js → dom-B3piR0q1.js} +5 -5
- package/dist/{dom-Cqajrs_w.mjs → dom-CPk_8CMB.mjs} +4 -4
- package/dist/dom.js +2 -2
- package/dist/dom.mjs +1 -1
- package/dist/html/compat.feat.js +1 -1
- package/dist/html/compat.feat.mjs +1 -1
- package/dist/html/writer.d.ts +0 -1
- package/dist/{html-C3dQGQ2x.mjs → html-BD-y50wS.mjs} +25 -22
- package/dist/{html-4A3vJpIT.js → html-aFBpTKdf.js} +25 -22
- package/dist/html.js +1 -1
- package/dist/html.mjs +1 -1
- package/dist/translator/core/define.d.ts +6 -0
- package/dist/translator/core/show.d.ts +1 -1
- package/dist/translator/index.js +577 -611
- package/dist/translator/util/assert.d.ts +2 -0
- package/dist/translator/util/bindings.d.ts +15 -8
- package/dist/translator/util/cyclic-memo.d.ts +0 -1
- package/dist/translator/util/entry-builder.d.ts +2 -3
- package/dist/translator/util/finalize-references.d.ts +0 -1
- package/dist/translator/util/for-selector.d.ts +0 -1
- package/dist/translator/util/module-registrations.d.ts +1 -0
- package/dist/translator/util/optional.d.ts +7 -5
- package/dist/translator/util/reasons.d.ts +1 -2
- package/dist/translator/util/references.d.ts +6 -5
- package/dist/translator/util/sections.d.ts +4 -1
- package/dist/translator/util/signals.d.ts +1 -1
- package/dist/translator/util/slots.d.ts +1 -2
- package/dist/translator/util/solve-reasons.d.ts +2 -2
- package/dist/translator/util/structure.d.ts +1 -0
- package/dist/translator/visitors/tag/native-tag.d.ts +2 -0
- package/index.d.ts +11 -0
- package/package.json +4 -4
package/cheatsheet.md
CHANGED
|
@@ -94,12 +94,18 @@ Don't fetch while rendering: start data loads early, pass the promise through th
|
|
|
94
94
|
|
|
95
95
|
## Components
|
|
96
96
|
|
|
97
|
-
- File `src/tags/product-card.marko` is auto-discovered as `<product-card>` from any template (no import needed). Attributes arrive as `input
|
|
97
|
+
- File `src/tags/product-card.marko` is auto-discovered as `<product-card>` from any template (no import needed). Attributes arrive as `input` (`${input.title}`), typed by the template's `export interface Input` (see TypeScript).
|
|
98
98
|
- Body content renders where the child places `<${input.content}/>`, and the child can hand it values: `<${input.content}(x, y)/>` in the child, `<my-tag|count, total|>${count}</my-tag>` in the parent. Placement is the child's: put it inside a `<for>` and the body appears once per item, each with its own values (`<for|...args| to=input.to><${input.content}(...args)/></>`). Those values exist only inside that body.
|
|
99
99
|
- `<return=value>` publishes one value into the parent's scope, named by a tag variable; from there it is an ordinary value in that template. A native tag variable's value is itself a function returning the element, so `<div/el>` is read as `el()`. So: body parameters when the value belongs to the nested markup, including one set per item where the child loops; a tag variable when the parent needs one value outside the body. A tag var on a child that never returns is `undefined`.
|
|
100
100
|
|
|
101
101
|
```marko
|
|
102
102
|
/* src/tags/toggle-section.marko */
|
|
103
|
+
export interface Input {
|
|
104
|
+
title: string;
|
|
105
|
+
startExpanded?: boolean;
|
|
106
|
+
content: Marko.Body;
|
|
107
|
+
}
|
|
108
|
+
|
|
103
109
|
<let/open=input.startExpanded ?? false>
|
|
104
110
|
<button onClick() { open = !open }>${input.title}</button>
|
|
105
111
|
<if=open><div><${input.content}/></div></if>
|
|
@@ -121,6 +127,11 @@ Don't fetch while rendering: start data loads early, pass the promise through th
|
|
|
121
127
|
</my-card>
|
|
122
128
|
|
|
123
129
|
/* src/tags/my-card.marko */
|
|
130
|
+
export interface Input {
|
|
131
|
+
header: Marko.AttrTag<{ content: Marko.Body }>;
|
|
132
|
+
content: Marko.Body;
|
|
133
|
+
}
|
|
134
|
+
|
|
124
135
|
<div class="card">
|
|
125
136
|
<header><${input.header.content}/></header>
|
|
126
137
|
<${input.content}/>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
2
|
+
const require_control_flow = require("../dom-BiJ_UKJV.js");
|
|
3
3
|
// src/dom/catch.feat.ts
|
|
4
4
|
const deferToPendingTry = (fn, scope, branch) => {
|
|
5
5
|
while (branch) {
|
|
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.
|
|
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.queuePendingEffects))(branch["#AwaitCounter"].c), [])).push(scope), /* @__PURE__ */ new Set())).add(fn);
|
|
7
7
|
branch = branch[require_control_flow.ParentBranch];
|
|
8
8
|
}
|
|
9
9
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Bn as ParentBranch, Fn as ClosestBranch, Hn as PendingEffects, Mn as Scope, Un as PendingRenders, Vn as PendingEffectScopes, _ as
|
|
1
|
+
import { Bn as ParentBranch, Fn as ClosestBranch, Hn as PendingEffects, Mn as Scope, Un as PendingRenders, Vn as PendingEffectScopes, _ as queuePendingEffects, an as installCatch, jn as Pending, sn as queueAsyncRender, v as renderCatch } from "../dom-D3A8gh_D.mjs";
|
|
2
2
|
// src/dom/catch.feat.ts
|
|
3
3
|
const deferToPendingTry = (fn, scope, branch) => {
|
|
4
4
|
while (branch) {
|
|
5
|
-
if (branch["#AwaitCounter"]?.i) return (scope[PendingEffects] ||= ((branch[PendingEffectScopes] ||= (branch["#AwaitCounter"].m && ((complete) => branch["#AwaitCounter"].c = (_) => complete() || queueAsyncRender(branch,
|
|
5
|
+
if (branch["#AwaitCounter"]?.i) return (scope[PendingEffects] ||= ((branch[PendingEffectScopes] ||= (branch["#AwaitCounter"].m && ((complete) => branch["#AwaitCounter"].c = (_) => complete() || queueAsyncRender(branch, queuePendingEffects))(branch["#AwaitCounter"].c), [])).push(scope), /* @__PURE__ */ new Set())).add(fn);
|
|
6
6
|
branch = branch[ParentBranch];
|
|
7
7
|
}
|
|
8
8
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_control_flow = require("../dom-
|
|
3
|
+
const require_control_flow = require("../dom-BiJ_UKJV.js");
|
|
4
4
|
// src/common/compat-meta.ts
|
|
5
5
|
const SET_SCOPE_REGISTER_ID = "$compat_setScope";
|
|
6
6
|
const RENDER_BODY_ID = "$compat_renderBody";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { An as Setup, Dn as Owner, En as LocalClosures, Gn as StartNode, In as EndNode, On as Params, Rn as Global, Sn as setClassAPIRenderer, St as init, cn as queueEffect, dt as _content, fn as runEffects, gt as setupBranch, ht as createBranch, ln as queueRender, on as prepareEffects, qt as destroyBranch, un as rendering, wn as Clone, xt as getRegisteredWithScope, yt as _resumed } from "../dom-
|
|
1
|
+
import { An as Setup, Dn as Owner, En as LocalClosures, Gn as StartNode, In as EndNode, On as Params, Rn as Global, Sn as setClassAPIRenderer, St as init, cn as queueEffect, dt as _content, fn as runEffects, gt as setupBranch, ht as createBranch, ln as queueRender, on as prepareEffects, qt as destroyBranch, un as rendering, wn as Clone, xt as getRegisteredWithScope, yt as _resumed } from "../dom-D3A8gh_D.mjs";
|
|
2
2
|
// src/common/compat-meta.ts
|
|
3
3
|
const SET_SCOPE_REGISTER_ID = "$compat_setScope";
|
|
4
4
|
const RENDER_BODY_ID = "$compat_renderBody";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
2
|
+
const require_control_flow = require("../dom-BiJ_UKJV.js");
|
|
3
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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as _attr_input_checkedValue_script, N as _attr_input_value_script, O as _attr_input_checked_script, V as controllableScripts } from "../dom-
|
|
1
|
+
import { E as _attr_input_checkedValue_script, N as _attr_input_value_script, O as _attr_input_checked_script, V as controllableScripts } from "../dom-D3A8gh_D.mjs";
|
|
2
2
|
// src/dom/controllable-input.feat.ts
|
|
3
3
|
controllableScripts[0] = _attr_input_checked_script;
|
|
4
4
|
controllableScripts[1] = _attr_input_checkedValue_script;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
2
|
+
const require_control_flow = require("../dom-BiJ_UKJV.js");
|
|
3
3
|
// src/dom/controllable-open.feat.ts
|
|
4
4
|
require_control_flow.controllableScripts[4] = require_control_flow._attr_details_or_dialog_open_script;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { S as _attr_details_or_dialog_open_script, V as controllableScripts } from "../dom-
|
|
1
|
+
import { S as _attr_details_or_dialog_open_script, V as controllableScripts } from "../dom-D3A8gh_D.mjs";
|
|
2
2
|
// src/dom/controllable-open.feat.ts
|
|
3
3
|
controllableScripts[4] = _attr_details_or_dialog_open_script;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
2
|
+
const require_control_flow = require("../dom-BiJ_UKJV.js");
|
|
3
3
|
// src/dom/controllable-select.feat.ts
|
|
4
4
|
require_control_flow.controllableScripts[3] = require_control_flow._attr_select_value_script;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { I as _attr_select_value_script, V as controllableScripts } from "../dom-
|
|
1
|
+
import { I as _attr_select_value_script, V as controllableScripts } from "../dom-D3A8gh_D.mjs";
|
|
2
2
|
// src/dom/controllable-select.feat.ts
|
|
3
3
|
controllableScripts[3] = _attr_select_value_script;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
2
|
+
const require_control_flow = require("../dom-BiJ_UKJV.js");
|
|
3
3
|
// src/dom/controllable-textarea.feat.ts
|
|
4
4
|
require_control_flow.controllableScripts[2] = require_control_flow._attr_input_value_script;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { N as _attr_input_value_script, V as controllableScripts } from "../dom-
|
|
1
|
+
import { N as _attr_input_value_script, V as controllableScripts } from "../dom-D3A8gh_D.mjs";
|
|
2
2
|
// src/dom/controllable-textarea.feat.ts
|
|
3
3
|
controllableScripts[2] = _attr_input_value_script;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as _controllable_textarea, H as controllableSpreadHelpers, L as _controllable_input, R as _controllable_open, z as _controllable_select } from "../dom-
|
|
1
|
+
import { B as _controllable_textarea, H as controllableSpreadHelpers, L as _controllable_input, R as _controllable_open, z as _controllable_select } from "../dom-D3A8gh_D.mjs";
|
|
2
2
|
import "./controllable-input.feat.mjs";
|
|
3
3
|
import "./controllable-open.feat.mjs";
|
|
4
4
|
import "./controllable-select.feat.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
2
|
+
const require_control_flow = require("../dom-BiJ_UKJV.js");
|
|
3
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);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Cn as withBranches, Zt as DYNAMIC_TAG_SCRIPT_REGISTER_ID, h as dynamicTagScript, yt as _resumed } from "../dom-
|
|
1
|
+
import { Cn as withBranches, Zt as DYNAMIC_TAG_SCRIPT_REGISTER_ID, h as dynamicTagScript, yt as _resumed } from "../dom-D3A8gh_D.mjs";
|
|
2
2
|
// src/dom/dynamic-tag-script.feat.ts
|
|
3
3
|
_resumed[DYNAMIC_TAG_SCRIPT_REGISTER_ID] = withBranches(dynamicTagScript);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
2
|
+
const require_control_flow = require("../dom-BiJ_UKJV.js");
|
|
3
3
|
// src/dom/dynamic-tag-var.feat.ts
|
|
4
4
|
require_control_flow.installBranchRenders();
|
|
5
5
|
require_control_flow.installDynamicTagVar((scope, branch, scopeKey, renderer) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as _el_read, Gn as StartNode, Kn as TagVariable, Pn as BranchRenders, g as installDynamicTagVar, in as installBranchRenders, rn as createBranchRenders } from "../dom-
|
|
1
|
+
import { At as _el_read, Gn as StartNode, Kn as TagVariable, Pn as BranchRenders, g as installDynamicTagVar, in as installBranchRenders, rn as createBranchRenders } from "../dom-D3A8gh_D.mjs";
|
|
2
2
|
// src/dom/dynamic-tag-var.feat.ts
|
|
3
3
|
installBranchRenders();
|
|
4
4
|
installDynamicTagVar((scope, branch, scopeKey, renderer) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
2
|
+
const require_control_flow = require("../dom-BiJ_UKJV.js");
|
|
3
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"]) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Qt as PLACEHOLDER_DISMISS_REGISTER_ID, Wn as PlaceholderBranch, qt as destroyBranch, yt as _resumed } from "../dom-
|
|
1
|
+
import { Qt as PLACEHOLDER_DISMISS_REGISTER_ID, Wn as PlaceholderBranch, qt as destroyBranch, yt as _resumed } from "../dom-D3A8gh_D.mjs";
|
|
2
2
|
// src/dom/placeholder.feat.ts
|
|
3
3
|
_resumed[PLACEHOLDER_DISMISS_REGISTER_ID] = (tryBranch) => {
|
|
4
4
|
if (tryBranch["#PlaceholderBranch"]) {
|
|
@@ -1905,13 +1905,13 @@ function createAwaitCounter(tryBranch, done) {
|
|
|
1905
1905
|
if (awaitCounter.i < 1) throw new Error("An await counter completed more counts than it took.");
|
|
1906
1906
|
if (--awaitCounter.i) return 1;
|
|
1907
1907
|
done();
|
|
1908
|
-
|
|
1908
|
+
queuePendingEffects(tryBranch);
|
|
1909
1909
|
}
|
|
1910
1910
|
};
|
|
1911
1911
|
return awaitCounter;
|
|
1912
1912
|
}
|
|
1913
|
-
function
|
|
1914
|
-
tryBranch[PendingEffectScopes]?.forEach((scope) => scope[PendingEffects].forEach((fn) =>
|
|
1913
|
+
function queuePendingEffects(tryBranch) {
|
|
1914
|
+
tryBranch[PendingEffectScopes]?.forEach((scope) => scope[PendingEffects].forEach((fn) => queueEffect(scope, fn), scope[PendingEffects] = null), tryBranch[PendingEffectScopes] = null);
|
|
1915
1915
|
}
|
|
1916
1916
|
function dismissPlaceholder(tryBranch) {
|
|
1917
1917
|
const placeholderBranch = tryBranch[PlaceholderBranch];
|
|
@@ -3062,6 +3062,12 @@ Object.defineProperty(exports, "queueEffect", {
|
|
|
3062
3062
|
return queueEffect;
|
|
3063
3063
|
}
|
|
3064
3064
|
});
|
|
3065
|
+
Object.defineProperty(exports, "queuePendingEffects", {
|
|
3066
|
+
enumerable: true,
|
|
3067
|
+
get: function() {
|
|
3068
|
+
return queuePendingEffects;
|
|
3069
|
+
}
|
|
3070
|
+
});
|
|
3065
3071
|
Object.defineProperty(exports, "queueRender", {
|
|
3066
3072
|
enumerable: true,
|
|
3067
3073
|
get: function() {
|
|
@@ -3116,12 +3122,6 @@ Object.defineProperty(exports, "runId", {
|
|
|
3116
3122
|
return runId;
|
|
3117
3123
|
}
|
|
3118
3124
|
});
|
|
3119
|
-
Object.defineProperty(exports, "runPendingEffects", {
|
|
3120
|
-
enumerable: true,
|
|
3121
|
-
get: function() {
|
|
3122
|
-
return runPendingEffects;
|
|
3123
|
-
}
|
|
3124
|
-
});
|
|
3125
3125
|
Object.defineProperty(exports, "setClassAPIRenderer", {
|
|
3126
3126
|
enumerable: true,
|
|
3127
3127
|
get: function() {
|
|
@@ -1904,13 +1904,13 @@ function createAwaitCounter(tryBranch, done) {
|
|
|
1904
1904
|
if (awaitCounter.i < 1) throw new Error("An await counter completed more counts than it took.");
|
|
1905
1905
|
if (--awaitCounter.i) return 1;
|
|
1906
1906
|
done();
|
|
1907
|
-
|
|
1907
|
+
queuePendingEffects(tryBranch);
|
|
1908
1908
|
}
|
|
1909
1909
|
};
|
|
1910
1910
|
return awaitCounter;
|
|
1911
1911
|
}
|
|
1912
|
-
function
|
|
1913
|
-
tryBranch[PendingEffectScopes]?.forEach((scope) => scope[PendingEffects].forEach((fn) =>
|
|
1912
|
+
function queuePendingEffects(tryBranch) {
|
|
1913
|
+
tryBranch[PendingEffectScopes]?.forEach((scope) => scope[PendingEffects].forEach((fn) => queueEffect(scope, fn), scope[PendingEffects] = null), tryBranch[PendingEffectScopes] = null);
|
|
1914
1914
|
}
|
|
1915
1915
|
function dismissPlaceholder(tryBranch) {
|
|
1916
1916
|
const placeholderBranch = tryBranch[PlaceholderBranch];
|
|
@@ -2221,4 +2221,4 @@ function bySecondArg(_item, index) {
|
|
|
2221
2221
|
function byFirstArg(name) {
|
|
2222
2222
|
return name;
|
|
2223
2223
|
}
|
|
2224
|
-
export { _attrs as $, _on as $t, _attr_input_value_attribute_default as A, Setup as An, _el_read as At, _controllable_textarea as B, ParentBranch as Bn, _or as Bt, _attr_input_checked as C, withBranches as Cn, initEmbedded as Ct, _attr_input_checked_default as D, Owner as Dn, _closure as Dt, _attr_input_checkedValue_script as E, LocalClosures as En, withLazy as Et, _attr_select_value_default as F, ClosestBranch as Fn, _hoist_resume as Ft, _attr_class_item as G, StartNode as Gn, _var_change as Gt, controllableSpreadHelpers as H, PendingEffects as Hn, _return_change as Ht, _attr_select_value_script as I, EndNode as In, _id as It, _attr_content as J, attrTags as Jn, insertBranchBefore as Jt, _attr_class_items as K, TagVariable as Kn, _assert_init as Kt, _controllable_input as L, Gen$1 as Ln, _if_closure as Lt, _attr_input_value_dynamic_default as M, Scope as Mn, _for_selector as Mt, _attr_input_value_script as N, AwaitCounter as Nn, _global_read as Nt, _attr_input_checked_script as O, Params as On, _closure_get as Ot, _attr_select_value as P, BranchRenders as Pn, _hoist as Pt, _attr_style_items as Q, PLACEHOLDER_DISMISS_REGISTER_ID as Qt, _controllable_open as R, Global as Rn, _let as Rt, _attr_details_or_dialog_open_script as S, setClassAPIRenderer as Sn, init as St, _attr_input_checkedValue_default as T, Lazy as Tn, readyFailed as Tt, _attr as U, PendingRenders as Un, _script as Ut, controllableScripts as V, PendingEffectScopes as Vn, _return as Vt, _attr_class as W, PlaceholderBranch as Wn, _var as Wt, _attr_style as X, syncGen as Xt, _attr_nonce as Y, removeAndDestroyBranch as Yt, _attr_style_item as Z, DYNAMIC_TAG_SCRIPT_REGISTER_ID as Zt,
|
|
2224
|
+
export { _attrs as $, _on as $t, _attr_input_value_attribute_default as A, Setup as An, _el_read as At, _controllable_textarea as B, ParentBranch as Bn, _or as Bt, _attr_input_checked as C, withBranches as Cn, initEmbedded as Ct, _attr_input_checked_default as D, Owner as Dn, _closure as Dt, _attr_input_checkedValue_script as E, LocalClosures as En, withLazy as Et, _attr_select_value_default as F, ClosestBranch as Fn, _hoist_resume as Ft, _attr_class_item as G, StartNode as Gn, _var_change as Gt, controllableSpreadHelpers as H, PendingEffects as Hn, _return_change as Ht, _attr_select_value_script as I, EndNode as In, _id as It, _attr_content as J, attrTags as Jn, insertBranchBefore as Jt, _attr_class_items as K, TagVariable as Kn, _assert_init as Kt, _controllable_input as L, Gen$1 as Ln, _if_closure as Lt, _attr_input_value_dynamic_default as M, Scope as Mn, _for_selector as Mt, _attr_input_value_script as N, AwaitCounter as Nn, _global_read as Nt, _attr_input_checked_script as O, Params as On, _closure_get as Ot, _attr_select_value as P, BranchRenders as Pn, _hoist as Pt, _attr_style_items as Q, PLACEHOLDER_DISMISS_REGISTER_ID as Qt, _controllable_open as R, Global as Rn, _let as Rt, _attr_details_or_dialog_open_script as S, setClassAPIRenderer as Sn, init as St, _attr_input_checkedValue_default as T, Lazy as Tn, readyFailed as Tt, _attr as U, PendingRenders as Un, _script as Ut, controllableScripts as V, PendingEffectScopes as Vn, _return as Vt, _attr_class as W, PlaceholderBranch as Wn, _var as Wt, _attr_style as X, syncGen as Xt, _attr_nonce as Y, removeAndDestroyBranch as Yt, _attr_style_item as Z, DYNAMIC_TAG_SCRIPT_REGISTER_ID as Zt, queuePendingEffects as _, forUntil as _n, _dynamic_tag_var_resume as _t, _for_in as a, installCatch as an, _lifecycle as at, _attr_details_or_dialog_open as b, _hoist_read_error as bn, _var_resume as bt, _for_to as c, queueEffect as cn, _text as ct, _for_until_unkeyed as d, run as dn, _content as dt, $signal as en, _attrs_content as et, _if as f, runEffects as fn, _content_closures as ft, installDynamicTagVar as g, forTo as gn, setupBranch as gt, dynamicTagScript as h, forOf as hn, createBranch as ht, _dynamic_tag_content as i, installBranchRenders as in, _html as it, _attr_input_value_default as j, Pending as jn, _for_closure as jt, _attr_input_value as k, Returns as kn, _const as kt, _for_to_unkeyed as l, queueRender as ln, _text_content as lt, _try as m, forIn as mn, _return_setup as mt, _await_promise as n, onAbort as nn, _attrs_partial_content as nt, _for_of as o, prepareEffects as on, _style_rule_item as ot, _show as p, runId as pn, _content_closures_resume as pt, _attr_class_names as q, attrTag as qn, destroyBranch as qt, _dynamic_tag as r, createBranchRenders as rn, _attrs_script as rt, _for_of_unkeyed as s, queueAsyncRender as sn, _style_shell as st, _await_content as t, $signalReset as tn, _attrs_partial as tt, _for_until as u, rendering as un, _to_text as ut, renderCatch as v, _assert_class_toggles as vn, _el as vt, _attr_input_checkedValue as w, Clone as wn, ready as wt, _attr_details_or_dialog_open_default as x, _call as xn, getRegisteredWithScope as xt, startAwait as y, _assert_hoist as yn, _resumed as yt, _controllable_select as z, Load as zn, _let_change as zt };
|
package/dist/debug/dom.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_control_flow = require("./dom-
|
|
3
|
+
const require_control_flow = require("./dom-BiJ_UKJV.js");
|
|
4
4
|
// src/dom/template.ts
|
|
5
5
|
const _template = (id, template, walks, setup, inputSignal) => {
|
|
6
6
|
const renderer = require_control_flow._content(id, template, walks, setup, inputSignal)();
|
package/dist/debug/dom.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as _attrs, $t as _on, A as _attr_input_value_attribute_default, An as Setup, At as _el_read, B as _controllable_textarea, Bt as _or, C as _attr_input_checked, Ct as initEmbedded, D as _attr_input_checked_default, Dt as _closure, E as _attr_input_checkedValue_script, F as _attr_select_value_default, Ft as _hoist_resume, G as _attr_class_item, Gn as StartNode, Gt as _var_change, Ht as _return_change, I as _attr_select_value_script, It as _id, J as _attr_content, Jn as attrTags, Jt as insertBranchBefore, K as _attr_class_items, Kn as TagVariable, Kt as _assert_init, L as _controllable_input, Lt as _if_closure, M as _attr_input_value_dynamic_default, Mt as _for_selector, N as _attr_input_value_script, Nt as _global_read, O as _attr_input_checked_script, On as Params, Ot as _closure_get, P as _attr_select_value, Pt as _hoist, Q as _attr_style_items, R as _controllable_open, Rt as _let, S as _attr_details_or_dialog_open_script, St as init, T as _attr_input_checkedValue_default, Tn as Lazy, Tt as readyFailed, U as _attr, Ut as _script, Vt as _return, W as _attr_class, Wt as _var, X as _attr_style, Xt as syncGen, Y as _attr_nonce, Yt as removeAndDestroyBranch, Z as _attr_style_item,
|
|
1
|
+
import { $ as _attrs, $t as _on, A as _attr_input_value_attribute_default, An as Setup, At as _el_read, B as _controllable_textarea, Bt as _or, C as _attr_input_checked, Ct as initEmbedded, D as _attr_input_checked_default, Dt as _closure, E as _attr_input_checkedValue_script, F as _attr_select_value_default, Ft as _hoist_resume, G as _attr_class_item, Gn as StartNode, Gt as _var_change, Ht as _return_change, I as _attr_select_value_script, It as _id, J as _attr_content, Jn as attrTags, Jt as insertBranchBefore, K as _attr_class_items, Kn as TagVariable, Kt as _assert_init, L as _controllable_input, Lt as _if_closure, M as _attr_input_value_dynamic_default, Mt as _for_selector, N as _attr_input_value_script, Nt as _global_read, O as _attr_input_checked_script, On as Params, Ot as _closure_get, P as _attr_select_value, Pt as _hoist, Q as _attr_style_items, R as _controllable_open, Rt as _let, S as _attr_details_or_dialog_open_script, St as init, T as _attr_input_checkedValue_default, Tn as Lazy, Tt as readyFailed, U as _attr, Ut as _script, Vt as _return, W as _attr_class, Wt as _var, X as _attr_style, Xt as syncGen, Y as _attr_nonce, Yt as removeAndDestroyBranch, Z as _attr_style_item, _n as forUntil, _t as _dynamic_tag_var_resume, a as _for_in, at as _lifecycle, b as _attr_details_or_dialog_open, bn as _hoist_read_error, bt as _var_resume, c as _for_to, ct as _text, d as _for_until_unkeyed, dn as run, dt as _content, en as $signal, et as _attrs_content, f as _if, fn as runEffects, ft as _content_closures, gn as forTo, gt as setupBranch, hn as forOf, ht as createBranch, i as _dynamic_tag_content, it as _html, j as _attr_input_value_default, jt as _for_closure, k as _attr_input_value, kt as _const, l as _for_to_unkeyed, ln as queueRender, lt as _text_content, m as _try, mn as forIn, mt as _return_setup, n as _await_promise, nn as onAbort, nt as _attrs_partial_content, o as _for_of, on as prepareEffects, ot as _style_rule_item, p as _show, pn as runId, pt as _content_closures_resume, q as _attr_class_names, qn as attrTag, r as _dynamic_tag, rt as _attrs_script, s as _for_of_unkeyed, sn as queueAsyncRender, st as _style_shell, t as _await_content, tn as $signalReset, tt as _attrs_partial, u as _for_until, ut as _to_text, v as renderCatch, vn as _assert_class_toggles, vt as _el, w as _attr_input_checkedValue, wn as Clone, wt as ready, x as _attr_details_or_dialog_open_default, xn as _call, y as startAwait, yn as _assert_hoist, yt as _resumed, z as _controllable_select, zn as Load, zt as _let_change } from "./dom-D3A8gh_D.mjs";
|
|
2
2
|
// src/dom/template.ts
|
|
3
3
|
const _template = (id, template, walks, setup, inputSignal) => {
|
|
4
4
|
const renderer = _content(id, template, walks, setup, inputSignal)();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_control_flow = require("../html-
|
|
3
|
+
const require_control_flow = require("../html-shBfuhlc.js");
|
|
4
4
|
// src/common/compat-meta.ts
|
|
5
5
|
const SET_SCOPE_REGISTER_ID = "$compat_setScope";
|
|
6
6
|
const RENDER_BODY_ID = "$compat_renderBody";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as $global, F as State, Ft as register, J as _scope_id, M as Boundary, N as Chunk, P as NOOP, Pt as REGISTRY, Q as _set_scope_reason, V as _html, Vt as setClassAPIRenderer, W as _peek_scope_id, Z as _script, _ as writeLoadAsset, at as getChunk, ct as joinHeldEffects, dt as writeScript, j as ALL_GROUPS, k as $chunk, lt as withChunk, ot as getScopeId, st as isInResumedBranch, t as _await, ut as writeScope } from "../html-
|
|
1
|
+
import { A as $global, F as State, Ft as register, J as _scope_id, M as Boundary, N as Chunk, P as NOOP, Pt as REGISTRY, Q as _set_scope_reason, V as _html, Vt as setClassAPIRenderer, W as _peek_scope_id, Z as _script, _ as writeLoadAsset, at as getChunk, ct as joinHeldEffects, dt as writeScript, j as ALL_GROUPS, k as $chunk, lt as withChunk, ot as getScopeId, st as isInResumedBranch, t as _await, ut as writeScope } from "../html-Bfl3MJP9.mjs";
|
|
2
2
|
// src/common/compat-meta.ts
|
|
3
3
|
const SET_SCOPE_REGISTER_ID = "$compat_setScope";
|
|
4
4
|
const RENDER_BODY_ID = "$compat_renderBody";
|
|
@@ -314,14 +314,12 @@ function concat(opt, other) {
|
|
|
314
314
|
}
|
|
315
315
|
// src/html/serializer.ts
|
|
316
316
|
const K_SCOPE_ID = Symbol("Scope ID");
|
|
317
|
-
const kTouchedIterator = /* @__PURE__ */ Symbol.for("marko.touchedIterator");
|
|
318
317
|
const { hasOwnProperty } = {};
|
|
319
318
|
const objectProto = Object.prototype;
|
|
320
319
|
const arrayProto = Array.prototype;
|
|
321
320
|
const Generator = (/* @__PURE__ */ (function* () {})()).constructor;
|
|
322
321
|
const AsyncGenerator = (/* @__PURE__ */ (async function* () {})()).constructor;
|
|
323
|
-
|
|
324
|
-
patchIteratorNext(AsyncGenerator.prototype);
|
|
322
|
+
const kTouchedIterator = /* @__PURE__ */ patchIteratorsNext();
|
|
325
323
|
const REGISTRY = /* @__PURE__ */ new WeakMap();
|
|
326
324
|
const KNOWN_SYMBOLS = /* @__PURE__ */ (() => {
|
|
327
325
|
const KNOWN_SYMBOLS = /* @__PURE__ */ new Map();
|
|
@@ -1836,14 +1834,20 @@ function hasOnlyZeros(typedArray) {
|
|
|
1836
1834
|
for (let i = 0; i < typedArray.length; i++) if (typedArray[i] !== zero) return false;
|
|
1837
1835
|
return true;
|
|
1838
1836
|
}
|
|
1839
|
-
function
|
|
1840
|
-
|
|
1837
|
+
function patchIteratorsNext() {
|
|
1838
|
+
const key = Symbol.for("marko.touchedIterator");
|
|
1839
|
+
patchIteratorNext(Generator.prototype, key);
|
|
1840
|
+
patchIteratorNext(AsyncGenerator.prototype, key);
|
|
1841
|
+
return key;
|
|
1842
|
+
}
|
|
1843
|
+
function patchIteratorNext(proto, key) {
|
|
1844
|
+
if (proto.next[key]) return;
|
|
1841
1845
|
const { next } = proto;
|
|
1842
1846
|
proto.next = function(value) {
|
|
1843
|
-
this[
|
|
1847
|
+
this[key] = 1;
|
|
1844
1848
|
return next.call(this, value);
|
|
1845
1849
|
};
|
|
1846
|
-
proto.next[
|
|
1850
|
+
proto.next[key] = true;
|
|
1847
1851
|
}
|
|
1848
1852
|
// src/html/attrs.ts
|
|
1849
1853
|
function _attr_class(value) {
|
|
@@ -2511,21 +2515,6 @@ var State = class {
|
|
|
2511
2515
|
serializeFlush(boundary) {
|
|
2512
2516
|
flushSerializer(boundary, this);
|
|
2513
2517
|
}
|
|
2514
|
-
getSerializedGlobals() {
|
|
2515
|
-
const { $global } = this;
|
|
2516
|
-
const serializedGlobals = $global.serializedGlobals;
|
|
2517
|
-
if (!serializedGlobals) return 0;
|
|
2518
|
-
let filtered = 0;
|
|
2519
|
-
if (Array.isArray(serializedGlobals)) for (const key of serializedGlobals) {
|
|
2520
|
-
const value = $global[key];
|
|
2521
|
-
if (value !== void 0) (filtered ||= {})[key] = value;
|
|
2522
|
-
}
|
|
2523
|
-
else for (const key in serializedGlobals) if (serializedGlobals[key]) {
|
|
2524
|
-
const value = $global[key];
|
|
2525
|
-
if (value !== void 0) (filtered ||= {})[key] = value;
|
|
2526
|
-
}
|
|
2527
|
-
return filtered;
|
|
2528
|
-
}
|
|
2529
2518
|
runtimeScript() {
|
|
2530
2519
|
return WALKER_RUNTIME_CODE + "(\"" + this.$global.runtimeId + "\")(\"" + this.$global.renderId + "\")";
|
|
2531
2520
|
}
|
|
@@ -3035,7 +3024,7 @@ function flushSerializer(boundary, channel) {
|
|
|
3035
3024
|
}
|
|
3036
3025
|
if (!channel.readyId && !state.hasWrittenGlobals) {
|
|
3037
3026
|
state.hasWrittenGlobals = true;
|
|
3038
|
-
const globals = state
|
|
3027
|
+
const globals = getFilteredGlobals(state.$global);
|
|
3039
3028
|
if (globals) flushes.push([
|
|
3040
3029
|
0,
|
|
3041
3030
|
globals,
|
|
@@ -3064,7 +3053,7 @@ function flushSerializerGlobals(boundary) {
|
|
|
3064
3053
|
const { state } = boundary;
|
|
3065
3054
|
if (state.hasWrittenGlobals) return;
|
|
3066
3055
|
state.hasWrittenGlobals = true;
|
|
3067
|
-
const globals = state
|
|
3056
|
+
const globals = getFilteredGlobals(state.$global);
|
|
3068
3057
|
if (globals) {
|
|
3069
3058
|
state.needsWalkerRuntime = true;
|
|
3070
3059
|
state.resumes = concatSequence(state.resumes, stringifyScopes(state.serializer, [[
|
|
@@ -3090,6 +3079,20 @@ function readyBatch(state, channel, deps, resumes) {
|
|
|
3090
3079
|
if (resumes) own[readyId]++;
|
|
3091
3080
|
return concatSequence(wait && wait + "}", resumes);
|
|
3092
3081
|
}
|
|
3082
|
+
function getFilteredGlobals($global) {
|
|
3083
|
+
const serializedGlobals = $global.serializedGlobals;
|
|
3084
|
+
let filtered = $global.cspNonce ? { cspNonce: $global.cspNonce } : 0;
|
|
3085
|
+
if (!serializedGlobals) return filtered;
|
|
3086
|
+
if (Array.isArray(serializedGlobals)) for (const key of serializedGlobals) {
|
|
3087
|
+
const value = $global[key];
|
|
3088
|
+
if (value !== void 0) (filtered ||= {})[key] = value;
|
|
3089
|
+
}
|
|
3090
|
+
else for (const key in serializedGlobals) if (serializedGlobals[key]) {
|
|
3091
|
+
const value = $global[key];
|
|
3092
|
+
if (value !== void 0) (filtered ||= {})[key] = value;
|
|
3093
|
+
}
|
|
3094
|
+
return filtered;
|
|
3095
|
+
}
|
|
3093
3096
|
function concatEffects(a, b) {
|
|
3094
3097
|
return a ? b ? a + " " + b : a : b;
|
|
3095
3098
|
}
|
|
@@ -315,14 +315,12 @@ function concat(opt, other) {
|
|
|
315
315
|
}
|
|
316
316
|
// src/html/serializer.ts
|
|
317
317
|
const K_SCOPE_ID = Symbol("Scope ID");
|
|
318
|
-
const kTouchedIterator = /* @__PURE__ */ Symbol.for("marko.touchedIterator");
|
|
319
318
|
const { hasOwnProperty } = {};
|
|
320
319
|
const objectProto = Object.prototype;
|
|
321
320
|
const arrayProto = Array.prototype;
|
|
322
321
|
const Generator = (/* @__PURE__ */ (function* () {})()).constructor;
|
|
323
322
|
const AsyncGenerator = (/* @__PURE__ */ (async function* () {})()).constructor;
|
|
324
|
-
|
|
325
|
-
patchIteratorNext(AsyncGenerator.prototype);
|
|
323
|
+
const kTouchedIterator = /* @__PURE__ */ patchIteratorsNext();
|
|
326
324
|
const REGISTRY = /* @__PURE__ */ new WeakMap();
|
|
327
325
|
const KNOWN_SYMBOLS = /* @__PURE__ */ (() => {
|
|
328
326
|
const KNOWN_SYMBOLS = /* @__PURE__ */ new Map();
|
|
@@ -1837,14 +1835,20 @@ function hasOnlyZeros(typedArray) {
|
|
|
1837
1835
|
for (let i = 0; i < typedArray.length; i++) if (typedArray[i] !== zero) return false;
|
|
1838
1836
|
return true;
|
|
1839
1837
|
}
|
|
1840
|
-
function
|
|
1841
|
-
|
|
1838
|
+
function patchIteratorsNext() {
|
|
1839
|
+
const key = Symbol.for("marko.touchedIterator");
|
|
1840
|
+
patchIteratorNext(Generator.prototype, key);
|
|
1841
|
+
patchIteratorNext(AsyncGenerator.prototype, key);
|
|
1842
|
+
return key;
|
|
1843
|
+
}
|
|
1844
|
+
function patchIteratorNext(proto, key) {
|
|
1845
|
+
if (proto.next[key]) return;
|
|
1842
1846
|
const { next } = proto;
|
|
1843
1847
|
proto.next = function(value) {
|
|
1844
|
-
this[
|
|
1848
|
+
this[key] = 1;
|
|
1845
1849
|
return next.call(this, value);
|
|
1846
1850
|
};
|
|
1847
|
-
proto.next[
|
|
1851
|
+
proto.next[key] = true;
|
|
1848
1852
|
}
|
|
1849
1853
|
// src/html/attrs.ts
|
|
1850
1854
|
function _attr_class(value) {
|
|
@@ -2512,21 +2516,6 @@ var State = class {
|
|
|
2512
2516
|
serializeFlush(boundary) {
|
|
2513
2517
|
flushSerializer(boundary, this);
|
|
2514
2518
|
}
|
|
2515
|
-
getSerializedGlobals() {
|
|
2516
|
-
const { $global } = this;
|
|
2517
|
-
const serializedGlobals = $global.serializedGlobals;
|
|
2518
|
-
if (!serializedGlobals) return 0;
|
|
2519
|
-
let filtered = 0;
|
|
2520
|
-
if (Array.isArray(serializedGlobals)) for (const key of serializedGlobals) {
|
|
2521
|
-
const value = $global[key];
|
|
2522
|
-
if (value !== void 0) (filtered ||= {})[key] = value;
|
|
2523
|
-
}
|
|
2524
|
-
else for (const key in serializedGlobals) if (serializedGlobals[key]) {
|
|
2525
|
-
const value = $global[key];
|
|
2526
|
-
if (value !== void 0) (filtered ||= {})[key] = value;
|
|
2527
|
-
}
|
|
2528
|
-
return filtered;
|
|
2529
|
-
}
|
|
2530
2519
|
runtimeScript() {
|
|
2531
2520
|
return WALKER_RUNTIME_CODE + "(\"" + this.$global.runtimeId + "\")(\"" + this.$global.renderId + "\")";
|
|
2532
2521
|
}
|
|
@@ -3036,7 +3025,7 @@ function flushSerializer(boundary, channel) {
|
|
|
3036
3025
|
}
|
|
3037
3026
|
if (!channel.readyId && !state.hasWrittenGlobals) {
|
|
3038
3027
|
state.hasWrittenGlobals = true;
|
|
3039
|
-
const globals = state
|
|
3028
|
+
const globals = getFilteredGlobals(state.$global);
|
|
3040
3029
|
if (globals) flushes.push([
|
|
3041
3030
|
0,
|
|
3042
3031
|
globals,
|
|
@@ -3065,7 +3054,7 @@ function flushSerializerGlobals(boundary) {
|
|
|
3065
3054
|
const { state } = boundary;
|
|
3066
3055
|
if (state.hasWrittenGlobals) return;
|
|
3067
3056
|
state.hasWrittenGlobals = true;
|
|
3068
|
-
const globals = state
|
|
3057
|
+
const globals = getFilteredGlobals(state.$global);
|
|
3069
3058
|
if (globals) {
|
|
3070
3059
|
state.needsWalkerRuntime = true;
|
|
3071
3060
|
state.resumes = concatSequence(state.resumes, stringifyScopes(state.serializer, [[
|
|
@@ -3091,6 +3080,20 @@ function readyBatch(state, channel, deps, resumes) {
|
|
|
3091
3080
|
if (resumes) own[readyId]++;
|
|
3092
3081
|
return concatSequence(wait && wait + "}", resumes);
|
|
3093
3082
|
}
|
|
3083
|
+
function getFilteredGlobals($global) {
|
|
3084
|
+
const serializedGlobals = $global.serializedGlobals;
|
|
3085
|
+
let filtered = $global.cspNonce ? { cspNonce: $global.cspNonce } : 0;
|
|
3086
|
+
if (!serializedGlobals) return filtered;
|
|
3087
|
+
if (Array.isArray(serializedGlobals)) for (const key of serializedGlobals) {
|
|
3088
|
+
const value = $global[key];
|
|
3089
|
+
if (value !== void 0) (filtered ||= {})[key] = value;
|
|
3090
|
+
}
|
|
3091
|
+
else for (const key in serializedGlobals) if (serializedGlobals[key]) {
|
|
3092
|
+
const value = $global[key];
|
|
3093
|
+
if (value !== void 0) (filtered ||= {})[key] = value;
|
|
3094
|
+
}
|
|
3095
|
+
return filtered;
|
|
3096
|
+
}
|
|
3094
3097
|
function concatEffects(a, b) {
|
|
3095
3098
|
return a ? b ? a + " " + b : a : b;
|
|
3096
3099
|
}
|
package/dist/debug/html.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_control_flow = require("./html-
|
|
3
|
+
const require_control_flow = require("./html-shBfuhlc.js");
|
|
4
4
|
exports.$global = require_control_flow.$global;
|
|
5
5
|
exports._assert_class_toggles = require_control_flow._assert_class_toggles;
|
|
6
6
|
exports._assert_hoist = require_control_flow._assert_hoist;
|
package/dist/debug/html.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as $global, It as _assert_class_toggles, Lt as _assert_hoist, ft as _attr, pt as _attr_and, mt as _attr_class, I as _attr_content, ht as _attr_details_open, ht as _attr_dialog_open, gt as _attr_input_checked, _t as _attr_input_checkedValue, vt as _attr_input_value, yt as _attr_nonce, bt as _attr_nullish, xt as _attr_option_value, St as _attr_or, Ct as _attr_select_value, wt as _attr_style, Tt as _attr_textarea_value, Et as _attrs, Dt as _attrs_content, Ot as _attrs_partial, kt as _attrs_partial_content, At as _attrs_select_value, jt as _attrs_textarea_value, t as _await, y as _content, b as _content_resume, x as _dynamic_tag, L as _el, R as _el_mark, Rt as _el_read_error, S as _escape, C as _escape_comment, w as _escape_script, T as _escape_style, E as _escape_style_value, z as _existing_scope, m as _flush_head, n as _for_in, r as _for_of, i as _for_to, a as _for_until, B as _hoist, zt as _hoist_read_error, V as _html, H as _html_mark, U as _id, o as _if, W as _peek_scope_id, G as _resume, K as _resume_branch, q as _resume_locals, ut as _scope, J as _scope_id, Y as _scope_reason, X as _scope_with_id, Z as _script, Q as _set_scope_reason, s as _show_end, c as _show_start, Bt as _signal_read_error, Mt as _style_html, $ as _subscribe, v as _template, et as _text_mark, Nt as _textarea_value, D as _to_text, tt as _trailers, l as _try, O as _unescaped, nt as _var, rt as _write_guard, it as _write_if, Ht as attrTag, Ut as attrTags, u as forIn, d as forOf, f as forTo, p as forUntil, h as withLoadAssets, g as withPageAssets } from "./html-
|
|
1
|
+
export { A as $global, It as _assert_class_toggles, Lt as _assert_hoist, ft as _attr, pt as _attr_and, mt as _attr_class, I as _attr_content, ht as _attr_details_open, ht as _attr_dialog_open, gt as _attr_input_checked, _t as _attr_input_checkedValue, vt as _attr_input_value, yt as _attr_nonce, bt as _attr_nullish, xt as _attr_option_value, St as _attr_or, Ct as _attr_select_value, wt as _attr_style, Tt as _attr_textarea_value, Et as _attrs, Dt as _attrs_content, Ot as _attrs_partial, kt as _attrs_partial_content, At as _attrs_select_value, jt as _attrs_textarea_value, t as _await, y as _content, b as _content_resume, x as _dynamic_tag, L as _el, R as _el_mark, Rt as _el_read_error, S as _escape, C as _escape_comment, w as _escape_script, T as _escape_style, E as _escape_style_value, z as _existing_scope, m as _flush_head, n as _for_in, r as _for_of, i as _for_to, a as _for_until, B as _hoist, zt as _hoist_read_error, V as _html, H as _html_mark, U as _id, o as _if, W as _peek_scope_id, G as _resume, K as _resume_branch, q as _resume_locals, ut as _scope, J as _scope_id, Y as _scope_reason, X as _scope_with_id, Z as _script, Q as _set_scope_reason, s as _show_end, c as _show_start, Bt as _signal_read_error, Mt as _style_html, $ as _subscribe, v as _template, et as _text_mark, Nt as _textarea_value, D as _to_text, tt as _trailers, l as _try, O as _unescaped, nt as _var, rt as _write_guard, it as _write_if, Ht as attrTag, Ut as attrTags, u as forIn, d as forOf, f as forTo, p as forUntil, h as withLoadAssets, g as withPageAssets } from "./html-Bfl3MJP9.mjs";
|
package/dist/dom/catch.feat.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-B3piR0q1.js"), deferToPendingTry = (fn, scope, branch) => {
|
|
3
3
|
for (; branch;) {
|
|
4
|
-
if (branch.O?.i) return (scope.J ||= ((branch.JS ||= (branch.O.m && ((complete) => branch.O.c = (_) => complete() || require_control_flow.an(branch, require_control_flow.
|
|
4
|
+
if (branch.O?.i) return (scope.J ||= ((branch.JS ||= (branch.O.m && ((complete) => branch.O.c = (_) => complete() || require_control_flow.an(branch, require_control_flow._))(branch.O.c), [])).push(scope), /* @__PURE__ */ new Set())).add(fn);
|
|
5
5
|
branch = branch.N;
|
|
6
6
|
}
|
|
7
7
|
};
|
|
@@ -18,6 +18,6 @@ require_control_flow.rn((effects) => {
|
|
|
18
18
|
}
|
|
19
19
|
render.f = 0, runRender(render);
|
|
20
20
|
} catch (error) {
|
|
21
|
-
require_control_flow.
|
|
21
|
+
require_control_flow.v(render.b, error);
|
|
22
22
|
}
|
|
23
23
|
});
|
package/dist/dom/catch.feat.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
let deferToPendingTry = (fn, scope, branch) => {
|
|
2
2
|
for (; branch;) {
|
|
3
|
-
if (branch.O?.i) return (scope.J ||= ((branch.JS ||= (branch.O.m && ((complete) => branch.O.c = (_) => complete() || queueAsyncRender(branch,
|
|
3
|
+
if (branch.O?.i) return (scope.J ||= ((branch.JS ||= (branch.O.m && ((complete) => branch.O.c = (_) => complete() || queueAsyncRender(branch, queuePendingEffects))(branch.O.c), [])).push(scope), /* @__PURE__ */ new Set())).add(fn);
|
|
4
4
|
branch = branch.N;
|
|
5
5
|
}
|
|
6
6
|
};
|
|
7
|
-
import { _ as
|
|
7
|
+
import { _ as queuePendingEffects, an as queueAsyncRender, rn as installCatch, v as renderCatch } from "../dom-CPk_8CMB.mjs";
|
|
8
8
|
// src/dom/catch.feat.ts
|
|
9
9
|
installCatch((effects) => {
|
|
10
10
|
let i = 0, fn, scope, branch;
|
package/dist/dom/compat.feat.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-B3piR0q1.js"), RENDER_BODY_ID = "$C_b", classIdToBranch = /* @__PURE__ */ new Map(), classEventResolver, scopesByRender = /* @__PURE__ */ new WeakMap(), getRenderScopes = ($global) => {
|
|
3
3
|
require_control_flow.St($global.runtimeId);
|
|
4
4
|
let render = self[$global.runtimeId]?.[$global.renderId], scopes = render && scopesByRender.get(render);
|
|
5
5
|
return render && !scopes && scopesByRender.set(render, scopes = {}), scopes;
|
package/dist/dom/compat.feat.mjs
CHANGED
|
@@ -77,7 +77,7 @@ let RENDER_BODY_ID = "$C_b", classIdToBranch = /* @__PURE__ */ new Map(), classE
|
|
|
77
77
|
if (component.effects = rendering ? renderBranch() : prepareEffects(renderBranch), created) return branch.S.parentNode || branch.S;
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
-
import { St as init, bn as setClassAPIRenderer, cn as rendering, dt as _content, gt as setupBranch, ht as createBranch, in as prepareEffects, on as queueEffect, qt as destroyBranch, sn as queueRender, un as runEffects, xt as getRegisteredWithScope, yt as _resumed } from "../dom-
|
|
80
|
+
import { St as init, bn as setClassAPIRenderer, cn as rendering, dt as _content, gt as setupBranch, ht as createBranch, in as prepareEffects, on as queueEffect, qt as destroyBranch, sn as queueRender, un as runEffects, xt as getRegisteredWithScope, yt as _resumed } from "../dom-CPk_8CMB.mjs";
|
|
81
81
|
// src/common/compat-meta.ts
|
|
82
82
|
// src/dom/compat.feat.ts
|
|
83
83
|
function createClassRenderer(render, clone) {
|
|
@@ -4,7 +4,7 @@ import { type Signal } from "./signals";
|
|
|
4
4
|
export declare function _await_promise(nodeAccessor: EncodedAccessor, params?: Signal<unknown>): (scope: Scope, promise: unknown) => unknown;
|
|
5
5
|
export declare function _await_content(nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0): (scope: Scope) => void;
|
|
6
6
|
export declare function startAwait(scope: Scope, tryBranch?: BranchScope | undefined): AwaitCounter | undefined;
|
|
7
|
-
export declare function
|
|
7
|
+
export declare function queuePendingEffects(tryBranch: BranchScope): void;
|
|
8
8
|
export declare function _try(nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, placeholderContent?: ReturnType<typeof _content> | 0, catchContent?: ReturnType<typeof _content>): (scope: Scope) => void;
|
|
9
9
|
export declare function renderCatch(scope: Scope, error?: unknown): void;
|
|
10
10
|
export declare const _if: (nodeAccessor: EncodedAccessor, ...branchesArgs: (string | SetupFn | 0)[]) => (scope: Scope, newBranch: number) => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-B3piR0q1.js");
|
|
3
3
|
require_control_flow.V[0] = require_control_flow.O, require_control_flow.V[1] = require_control_flow.E, require_control_flow.V[2] = require_control_flow.N;
|