marko 6.4.7 → 6.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +1 -1
- package/dist/debug/dom/catch.feat.mjs +1 -1
- package/dist/debug/dom/controllable-input.feat.js +1 -1
- package/dist/debug/dom/controllable-input.feat.mjs +1 -1
- package/dist/debug/dom/controllable-open.feat.js +1 -1
- package/dist/debug/dom/controllable-open.feat.mjs +1 -1
- package/dist/debug/dom/controllable-select.feat.js +1 -1
- package/dist/debug/dom/controllable-select.feat.mjs +1 -1
- package/dist/debug/dom/controllable-textarea.feat.js +1 -1
- package/dist/debug/dom/controllable-textarea.feat.mjs +1 -1
- package/dist/debug/dom/controllable.feat.js +1 -1
- package/dist/debug/dom/controllable.feat.mjs +1 -1
- package/dist/debug/dom/dynamic-tag-script.feat.js +1 -1
- package/dist/debug/dom/dynamic-tag-script.feat.mjs +1 -1
- package/dist/debug/dom/dynamic-tag-var.feat.js +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-D8znnhpf.js → dom-QkYva5Qx.js} +35 -61
- package/dist/debug/{dom-CFCBDift.mjs → dom-VKjkbuuo.mjs} +36 -50
- package/dist/debug/dom.js +4 -4
- package/dist/debug/dom.mjs +4 -4
- package/dist/debug/html.js +20 -13
- package/dist/debug/html.mjs +18 -11
- package/dist/dom/catch.feat.js +3 -3
- package/dist/dom/catch.feat.mjs +1 -1
- 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 -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/dom.d.ts +2 -3
- package/dist/dom/dynamic-tag-script.feat.js +2 -2
- package/dist/dom/dynamic-tag-script.feat.mjs +1 -1
- package/dist/dom/dynamic-tag-var.feat.js +3 -3
- 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 +3 -3
- package/dist/dom/placeholder.feat.mjs +1 -1
- 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-CVAevsbz.mjs → dom-DtKQb840.mjs} +19 -33
- package/dist/{dom-Bpkm72vV.js → dom-IujlfJ6b.js} +82 -106
- package/dist/dom.js +31 -31
- package/dist/dom.mjs +4 -4
- 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 +21 -15
- package/dist/html.mjs +21 -15
- package/dist/translator/core/show.d.ts +3 -4
- package/dist/translator/index.js +1253 -1134
- 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 +6 -2
- 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 +3 -4
- package/dist/translator/util/references.d.ts +13 -8
- 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 +42 -17
- 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 +6 -0
- 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/write-guard.d.ts +4 -1
- package/dist/translator/visitors/placeholder.d.ts +4 -4
- package/package.json +4 -4
- package/tags-html.d.ts +3 -0
- package/dist/translator/visitors/constants/sibling-text.d.ts +0 -6
package/dist/dom.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("./dom-
|
|
3
|
-
require_control_flow.
|
|
2
|
+
let require_control_flow = require("./dom-IujlfJ6b.js"), empty = [], rest = Symbol(), classIdToBranch = /* @__PURE__ */ new Map(), classEventResolver, scopesByRender = /* @__PURE__ */ new WeakMap(), getRenderScopes = ($global) => {
|
|
3
|
+
require_control_flow.wt($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;
|
|
6
6
|
}, compat = {
|
|
7
7
|
patchDynamicTag: require_control_flow._,
|
|
8
|
-
queueEffect: require_control_flow.
|
|
8
|
+
queueEffect: require_control_flow.sn,
|
|
9
9
|
init(warp10Noop) {
|
|
10
|
-
require_control_flow.
|
|
10
|
+
require_control_flow.xt.$C_s = (scope) => {
|
|
11
11
|
if (getRenderScopes(scope.$)[scope.L] = scope, scope.m5c && classIdToBranch.set(scope.m5c, scope), classEventResolver) for (let key in scope) {
|
|
12
12
|
let resolved = classEventResolver(scope[key], scope);
|
|
13
13
|
resolved !== scope[key] && (scope[key] = resolved);
|
|
14
14
|
}
|
|
15
|
-
}, require_control_flow.
|
|
15
|
+
}, require_control_flow.xt.$C_b = warp10Noop;
|
|
16
16
|
},
|
|
17
17
|
setClassEventResolver(fn) {
|
|
18
18
|
classEventResolver = fn;
|
|
19
19
|
},
|
|
20
20
|
resumeClassFunction(id, build) {
|
|
21
|
-
require_control_flow.
|
|
21
|
+
require_control_flow.xt[id] = build;
|
|
22
22
|
},
|
|
23
23
|
getScope($global, scopeId) {
|
|
24
24
|
return getRenderScopes($global)?.[scopeId];
|
|
@@ -39,36 +39,36 @@ let require_control_flow = require("./dom-Bpkm72vV.js"), empty = [], rest = Symb
|
|
|
39
39
|
branch.S = startNode, branch.K = endNode;
|
|
40
40
|
},
|
|
41
41
|
runComponentEffects() {
|
|
42
|
-
this.effects && require_control_flow.
|
|
42
|
+
this.effects && require_control_flow.dn(this.effects);
|
|
43
43
|
},
|
|
44
44
|
runComponentDestroy() {
|
|
45
|
-
this.scope && require_control_flow.
|
|
45
|
+
this.scope && require_control_flow.Yt(this.scope);
|
|
46
46
|
},
|
|
47
47
|
resolveRegistered(value, $global) {
|
|
48
|
-
return Array.isArray(value) && typeof value[0] == "string" ? require_control_flow.
|
|
48
|
+
return Array.isArray(value) && typeof value[0] == "string" ? require_control_flow.Ct(getRenderScopes($global)?.[value[1]], value[0]) : value;
|
|
49
49
|
},
|
|
50
50
|
createRenderer(params, clone) {
|
|
51
|
-
let renderer = require_control_flow.
|
|
51
|
+
let renderer = require_control_flow.ft("", 0, 0, 0, params)();
|
|
52
52
|
return renderer.b = (branch) => {
|
|
53
53
|
let cloned = clone();
|
|
54
54
|
branch.S = cloned.startNode, branch.K = cloned.endNode;
|
|
55
55
|
}, renderer;
|
|
56
56
|
},
|
|
57
57
|
render(out, component, renderer, args) {
|
|
58
|
-
require_control_flow.
|
|
58
|
+
require_control_flow.wt(out.global.runtimeId);
|
|
59
59
|
let branch = component.scope, created = 0;
|
|
60
60
|
if (!branch && (branch = classIdToBranch.get(component.id)) && (component.scope = branch, classIdToBranch.delete(component.id)), args[0] && typeof args[0] == "object" && "renderBody" in args[0]) {
|
|
61
61
|
let input = args[0], normalizedInput = args[0] = {};
|
|
62
62
|
for (let key in input) normalizedInput[key === "renderBody" ? "content" : key] = input[key];
|
|
63
63
|
}
|
|
64
64
|
let renderBranch = (_) => {
|
|
65
|
-
branch ||= (created = 1, component.scope = require_control_flow.
|
|
65
|
+
branch ||= (created = 1, component.scope = require_control_flow.gt(out.global, renderer, renderer.e, document.body)), renderer.g?.(branch), renderer.d?.(branch, renderer._ ? args[0] : args);
|
|
66
66
|
};
|
|
67
|
-
if (component.effects = require_control_flow.
|
|
67
|
+
if (component.effects = require_control_flow.ln ? renderBranch() : require_control_flow.an(renderBranch), created) return branch.S.parentNode || branch.S;
|
|
68
68
|
}
|
|
69
69
|
}, _template = (id, template, walks, setup, inputSignal) => {
|
|
70
|
-
let renderer = require_control_flow.
|
|
71
|
-
return renderer.mount = mount, renderer._ = renderer, require_control_flow.
|
|
70
|
+
let renderer = require_control_flow.ft(id, template, walks, setup, inputSignal)();
|
|
71
|
+
return renderer.mount = mount, renderer._ = renderer, require_control_flow.xt[id] = renderer;
|
|
72
72
|
}, noop = (_) => 0;
|
|
73
73
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
74
74
|
//#region src/common/attr-tag.ts
|
|
@@ -105,25 +105,25 @@ function mount(input = {}, reference, position) {
|
|
|
105
105
|
break;
|
|
106
106
|
case "afterend": parentNode = reference.parentNode, nextSibling = reference.nextSibling;
|
|
107
107
|
}
|
|
108
|
-
let curValue, args = this.d, effects = require_control_flow.
|
|
109
|
-
branch = require_control_flow.
|
|
108
|
+
let curValue, args = this.d, effects = require_control_flow.an((_) => {
|
|
109
|
+
branch = require_control_flow._t($global, this, void 0, parentNode), branch.T = (newValue) => {
|
|
110
110
|
curValue = newValue;
|
|
111
111
|
}, this.c?.(branch), args?.(branch, input);
|
|
112
112
|
});
|
|
113
|
-
return require_control_flow.
|
|
113
|
+
return require_control_flow.Xt(branch, parentNode, nextSibling), require_control_flow.dn(effects), {
|
|
114
114
|
get value() {
|
|
115
115
|
return curValue;
|
|
116
116
|
},
|
|
117
117
|
set value(newValue) {
|
|
118
|
-
require_control_flow.
|
|
118
|
+
require_control_flow.qt(branch, newValue);
|
|
119
119
|
},
|
|
120
120
|
update(newInput = {}) {
|
|
121
|
-
args && (newInput.$global && ({$global, ...newInput} = newInput), require_control_flow.
|
|
121
|
+
args && (newInput.$global && ({$global, ...newInput} = newInput), require_control_flow.dn(require_control_flow.an((_) => {
|
|
122
122
|
args(branch, newInput);
|
|
123
123
|
})));
|
|
124
124
|
},
|
|
125
125
|
destroy() {
|
|
126
|
-
require_control_flow
|
|
126
|
+
require_control_flow.Zt(branch);
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
129
|
}
|
|
@@ -133,7 +133,7 @@ function _load_template(id, load) {
|
|
|
133
133
|
let pending, lazyTemplate = _template(id, 0, 0, (branch) => {
|
|
134
134
|
let awaitCounter = require_control_flow.b(branch);
|
|
135
135
|
branch.X ||= /* @__PURE__ */ new Map(), (pending ||= load()).then((renderer) => {
|
|
136
|
-
Object.assign(lazyTemplate, renderer), require_control_flow.
|
|
136
|
+
Object.assign(lazyTemplate, renderer), require_control_flow.on(branch, (branch) => insertLoaded(renderer, branch, branch.S, awaitCounter));
|
|
137
137
|
}, loadFailed(branch, awaitCounter));
|
|
138
138
|
}, _load_signal((_) => (pending ||= load()).then((r) => ({ _: r.d || noop }))));
|
|
139
139
|
return lazyTemplate;
|
|
@@ -141,37 +141,37 @@ function _load_template(id, load) {
|
|
|
141
141
|
function _load_setup(load) {
|
|
142
142
|
let pending, renderer, insertCached = (child, marker) => insertLoaded(renderer, child, marker);
|
|
143
143
|
return (owner, child, marker) => {
|
|
144
|
-
if (child.X ||= /* @__PURE__ */ new Map(), renderer) require_control_flow.
|
|
144
|
+
if (child.X ||= /* @__PURE__ */ new Map(), renderer) require_control_flow.cn(child, insertCached, -1, marker);
|
|
145
145
|
else {
|
|
146
146
|
let awaitCounter = require_control_flow.b(owner);
|
|
147
147
|
(pending ||= load()).then((mod) => {
|
|
148
|
-
renderer ||= require_control_flow.
|
|
148
|
+
renderer ||= require_control_flow.ft("", ...mod._)(), require_control_flow.on(child, (child) => insertLoaded(renderer, child, marker, awaitCounter));
|
|
149
149
|
}, loadFailed(child, awaitCounter));
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
153
|
function insertLoaded(renderer, branch, marker, awaitCounter) {
|
|
154
154
|
let parent = (_) => marker.parentNode, values = branch.X, create = (_) => {
|
|
155
|
-
require_control_flow.
|
|
155
|
+
require_control_flow.Qt(branch), renderer.b(branch, parent().namespaceURI), branch.X = 0, require_control_flow.vt(renderer, branch);
|
|
156
156
|
}, insert = (_) => {
|
|
157
|
-
require_control_flow.
|
|
157
|
+
require_control_flow.Xt(branch, parent(), marker), marker.remove(), awaitCounter?.c();
|
|
158
158
|
}, remaining;
|
|
159
159
|
if (remaining = values?.size) {
|
|
160
160
|
awaitCounter ||= require_control_flow.b(branch);
|
|
161
161
|
let fail = loadFailed(branch, awaitCounter);
|
|
162
|
-
values.forEach(([, apply], promise) => promise.then((mod) => (apply._ = mod._) && !--remaining && require_control_flow.
|
|
162
|
+
values.forEach(([, apply], promise) => promise.then((mod) => (apply._ = mod._) && !--remaining && require_control_flow.on(branch, (branch) => {
|
|
163
163
|
create(), values.forEach(([value, apply]) => apply(branch, value)), insert();
|
|
164
164
|
}), (error) => remaining > 0 && (remaining = 0, fail(error))));
|
|
165
165
|
} else create(), insert();
|
|
166
166
|
}
|
|
167
167
|
function loadFailed(scope, awaitCounter) {
|
|
168
168
|
return (error) => {
|
|
169
|
-
awaitCounter && (awaitCounter.m ? awaitCounter.i = 0 : awaitCounter.i && awaitCounter.c()), require_control_flow.
|
|
169
|
+
awaitCounter && (awaitCounter.m ? awaitCounter.i = 0 : awaitCounter.i && awaitCounter.c()), require_control_flow.on(scope, require_control_flow.v, error);
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
172
|
function _load_signal(load) {
|
|
173
173
|
let pending, apply = (scope, value) => {
|
|
174
|
-
pending ||= load(), scope.X || !("X" in scope) && scope.H === require_control_flow.
|
|
174
|
+
pending ||= load(), scope.X || !("X" in scope) && scope.H === require_control_flow.fn ? (scope.X ||= /* @__PURE__ */ new Map()).set(pending, [value, apply]) : apply._ ? apply._(scope, value) : pending.then((mod) => require_control_flow.on(scope, apply._ = mod._, value), noop);
|
|
175
175
|
};
|
|
176
176
|
return apply;
|
|
177
177
|
}
|
|
@@ -198,9 +198,9 @@ function _load_race_trigger(...triggers) {
|
|
|
198
198
|
function getSelectorOrResolve(selector, resolve) {
|
|
199
199
|
return document.querySelector(selector) || resolve();
|
|
200
200
|
}
|
|
201
|
-
exports.$signal = require_control_flow.
|
|
201
|
+
exports.$signal = require_control_flow.en, exports.$signalReset = require_control_flow.tn, exports._assert_class_toggles = require_control_flow._n, exports._assert_hoist = require_control_flow.vn, exports._assert_init = require_control_flow.Jt, exports._attr = require_control_flow.W, exports._attr_class = require_control_flow.G, exports._attr_class_item = require_control_flow.K, exports._attr_class_items = require_control_flow.q, exports._attr_class_names = require_control_flow.J, exports._attr_content = require_control_flow.Y, exports._attr_details_open = require_control_flow.x, exports._attr_dialog_open = require_control_flow.x, exports._attr_details_open_default = require_control_flow.S, exports._attr_dialog_open_default = require_control_flow.S, exports._attr_details_open_script = require_control_flow.C, exports._attr_dialog_open_script = require_control_flow.C, exports._attr_input_checked = require_control_flow.w, exports._attr_input_checkedValue = require_control_flow.T, exports._attr_input_checkedValue_default = require_control_flow.E, exports._attr_input_checkedValue_script = require_control_flow.D, exports._attr_input_checked_default = require_control_flow.O, exports._attr_input_checked_script = require_control_flow.k, exports._attr_input_value = require_control_flow.A, exports._attr_textarea_value = require_control_flow.A, exports._attr_input_value_attribute_default = require_control_flow.j, exports._attr_input_value_default = require_control_flow.M, exports._attr_textarea_value_default = require_control_flow.M, exports._attr_input_value_dynamic_default = require_control_flow.N, exports._attr_input_value_script = require_control_flow.P, exports._attr_textarea_value_script = require_control_flow.P, exports._attr_nonce = require_control_flow.X, exports._attr_select_value = require_control_flow.F, exports._attr_select_value_default = require_control_flow.I, exports._attr_select_value_script = require_control_flow.L, exports._attr_style = require_control_flow.Z, exports._attr_style_item = require_control_flow.Q, exports._attr_style_items = require_control_flow.$, exports._attrs = require_control_flow.et, exports._attrs_content = require_control_flow.tt, exports._attrs_partial = require_control_flow.nt, exports._attrs_partial_content = require_control_flow.rt, exports._attrs_script = require_control_flow.it, exports._await_content = require_control_flow.t, exports._await_promise = require_control_flow.n, exports._call = require_control_flow.bn, exports._closure = require_control_flow.kt, exports._closure_get = require_control_flow.At, exports._const = require_control_flow.jt, exports._content = require_control_flow.ft, exports._content_closures = require_control_flow.pt, exports._content_resume = require_control_flow.mt, exports._controllable_input = require_control_flow.R, exports._controllable_open = require_control_flow.z, exports._controllable_select = require_control_flow.B, exports._controllable_textarea = require_control_flow.V, Object.defineProperty(exports, "_dynamic_tag", {
|
|
202
202
|
enumerable: !0,
|
|
203
203
|
get: function() {
|
|
204
204
|
return require_control_flow.r;
|
|
205
205
|
}
|
|
206
|
-
}), exports._dynamic_tag_content = require_control_flow.i, exports._dynamic_tag_var_resume = require_control_flow.
|
|
206
|
+
}), exports._dynamic_tag_content = require_control_flow.i, exports._dynamic_tag_var_resume = require_control_flow.yt, exports._el = require_control_flow.bt, exports._el_read = require_control_flow.Mt, exports._for_closure = require_control_flow.Nt, exports._for_in = require_control_flow.a, exports._for_of = require_control_flow.o, exports._for_of_unkeyed = require_control_flow.s, exports._for_selector = require_control_flow.Pt, exports._for_to = require_control_flow.c, exports._for_to_unkeyed = require_control_flow.l, exports._for_until = require_control_flow.u, exports._for_until_unkeyed = require_control_flow.d, exports._global_read = require_control_flow.Ft, exports._hoist = require_control_flow.It, exports._hoist_read_error = require_control_flow.yn, exports._hoist_resume = require_control_flow.Lt, exports._html = require_control_flow.at, exports._id = require_control_flow.Rt, exports._if = require_control_flow.f, exports._if_closure = require_control_flow.zt, exports._let = require_control_flow.Bt, exports._let_change = require_control_flow.Vt, exports._lifecycle = require_control_flow.ot, exports._load_event_trigger = _load_event_trigger, exports._load_idle_trigger = _load_idle_trigger, exports._load_media_trigger = _load_media_trigger, exports._load_race_trigger = _load_race_trigger, exports._load_setup = _load_setup, exports._load_signal = _load_signal, exports._load_template = _load_template, exports._load_visible_trigger = _load_visible_trigger, exports._on = require_control_flow.$t, exports._or = require_control_flow.Ht, exports._resumed = require_control_flow.xt, exports._return = require_control_flow.Ut, exports._return_change = require_control_flow.Wt, exports._return_setup = require_control_flow.ht, exports._script = require_control_flow.Gt, exports._show = require_control_flow.p, exports._style_rule_item = require_control_flow.st, exports._style_shell = require_control_flow.ct, exports._template = _template, exports._text = require_control_flow.lt, exports._text_content = require_control_flow.ut, exports._to_text = require_control_flow.dt, exports._try = require_control_flow.m, exports._var = require_control_flow.Kt, exports._var_change = require_control_flow.qt, exports._var_resume = require_control_flow.St, exports.attrTag = attrTag, exports.attrTags = attrTags, exports.compat = compat, exports.forIn = require_control_flow.pn, exports.forOf = require_control_flow.mn, exports.forTo = require_control_flow.hn, exports.forUntil = require_control_flow.gn, exports.init = require_control_flow.wt, exports.initEmbedded = require_control_flow.Tt, exports.ready = require_control_flow.Et, exports.readyFailed = require_control_flow.Dt, exports.run = require_control_flow.un;
|
package/dist/dom.mjs
CHANGED
|
@@ -44,7 +44,7 @@ let empty = [], rest = Symbol(), classIdToBranch = /* @__PURE__ */ new Map(), cl
|
|
|
44
44
|
this.scope && destroyBranch(this.scope);
|
|
45
45
|
},
|
|
46
46
|
resolveRegistered(value, $global) {
|
|
47
|
-
return Array.isArray(value) && typeof value[0] == "string" ? getRegisteredWithScope(
|
|
47
|
+
return Array.isArray(value) && typeof value[0] == "string" ? getRegisteredWithScope(getRenderScopes($global)?.[value[1]], value[0]) : value;
|
|
48
48
|
},
|
|
49
49
|
createRenderer(params, clone) {
|
|
50
50
|
let renderer = _content("", 0, 0, 0, params)();
|
|
@@ -63,13 +63,13 @@ let empty = [], rest = Symbol(), classIdToBranch = /* @__PURE__ */ new Map(), cl
|
|
|
63
63
|
let renderBranch = (_) => {
|
|
64
64
|
branch ||= (created = 1, component.scope = createAndSetupBranch(out.global, renderer, renderer.e, document.body)), renderer.g?.(branch), renderer.d?.(branch, renderer._ ? args[0] : args);
|
|
65
65
|
};
|
|
66
|
-
if (component.effects = rendering ? renderBranch() : prepareEffects(renderBranch), created) return
|
|
66
|
+
if (component.effects = rendering ? renderBranch() : prepareEffects(renderBranch), created) return branch.S.parentNode || branch.S;
|
|
67
67
|
}
|
|
68
68
|
}, _template = (id, template, walks, setup, inputSignal) => {
|
|
69
69
|
let renderer = _content(id, template, walks, setup, inputSignal)();
|
|
70
70
|
return renderer.mount = mount, renderer._ = renderer, _resumed[id] = renderer;
|
|
71
71
|
}, noop = (_) => 0;
|
|
72
|
-
import { $ as _attr_style_items, $t as
|
|
72
|
+
import { $ as _attr_style_items, $t as _on, A as _attr_input_value, At as _closure_get, B as _controllable_select, Bt as _let, C as _attr_details_or_dialog_open_script, Ct as getRegisteredWithScope, D as _attr_input_checkedValue_script, Dt as readyFailed, E as _attr_input_checkedValue_default, Et as ready, F as _attr_select_value, Ft as _global_read, G as _attr_class, Gt as _script, Ht as _or, I as _attr_select_value_default, It as _hoist, J as _attr_class_names, Jt as _assert_init, K as _attr_class_item, Kt as _var, L as _attr_select_value_script, Lt as _hoist_resume, M as _attr_input_value_default, Mt as _el_read, N as _attr_input_value_dynamic_default, Nt as _for_closure, O as _attr_input_checked_default, P as _attr_input_value_script, Pt as _for_selector, Q as _attr_style_item, Qt as syncGen, R as _controllable_input, Rt as _id, S as _attr_details_or_dialog_open_default, St as _var_resume, T as _attr_input_checkedValue, Tt as initEmbedded, Ut as _return, V as _controllable_textarea, Vt as _let_change, W as _attr, Wt as _return_change, X as _attr_nonce, Xt as insertBranchBefore, Y as _attr_content, Yt as destroyBranch, Z as _attr_style, Zt as removeAndDestroyBranch, _ as patchDynamicTag, _n as _assert_class_toggles, _t as createBranch, a as _for_in, an as prepareEffects, at as _html, b as startAwait, bn as _call, bt as _el, c as _for_to, cn as queueRender, ct as _style_shell, d as _for_until_unkeyed, dn as runEffects, dt as _to_text, en as $signal, et as _attrs, f as _if, fn as runId, ft as _content, gn as forUntil, gt as createAndSetupBranch, hn as forTo, ht as _return_setup, i as _dynamic_tag_content, it as _attrs_script, j as _attr_input_value_attribute_default, jt as _const, k as _attr_input_checked_script, kt as _closure, l as _for_to_unkeyed, ln as rendering, lt as _text, m as _try, mn as forOf, mt as _content_resume, n as _await_promise, nt as _attrs_partial, o as _for_of, on as queueAsyncRender, ot as _lifecycle, p as _show, pn as forIn, pt as _content_closures, q as _attr_class_items, qt as _var_change, r as _dynamic_tag, rt as _attrs_partial_content, s as _for_of_unkeyed, sn as queueEffect, st as _style_rule_item, t as _await_content, tn as $signalReset, tt as _attrs_content, u as _for_until, un as run, ut as _text_content, v as renderCatch, vn as _assert_hoist, vt as setupBranch, w as _attr_input_checked, wt as init, x as _attr_details_or_dialog_open, xt as _resumed, yn as _hoist_read_error, yt as _dynamic_tag_var_resume, z as _controllable_open, zt as _if_closure } from "./dom-DtKQb840.mjs";
|
|
73
73
|
//#region src/common/attr-tag.ts
|
|
74
74
|
function attrTag(attrs) {
|
|
75
75
|
return attrs[Symbol.iterator] = attrTagIterator, attrs[rest] = empty, attrs;
|
|
@@ -109,7 +109,7 @@ function mount(input = {}, reference, position) {
|
|
|
109
109
|
curValue = newValue;
|
|
110
110
|
}, this.c?.(branch), args?.(branch, input);
|
|
111
111
|
});
|
|
112
|
-
return
|
|
112
|
+
return insertBranchBefore(branch, parentNode, nextSibling), runEffects(effects), {
|
|
113
113
|
get value() {
|
|
114
114
|
return curValue;
|
|
115
115
|
},
|
|
@@ -76,7 +76,7 @@ export declare function dropQueuedCall(state: State, value: unknown, object: unk
|
|
|
76
76
|
export declare function register<T extends WeakKey>(id: string, val: T, scope?: unknown, locals?: Locals, access?: string): T;
|
|
77
77
|
export declare function writeDeferred(state: State): void;
|
|
78
78
|
export declare function hasMatchingCalls(state: State, readyId: string | undefined): boolean;
|
|
79
|
-
export declare function
|
|
79
|
+
export declare function quoteRegistryId(id: string): string;
|
|
80
80
|
export declare function toObjectKey(name: string): string;
|
|
81
81
|
export declare function toAccess(accessor: string): string;
|
|
82
82
|
export declare function quote(str: string, startPos: number): string;
|
package/dist/html/writer.d.ts
CHANGED
|
@@ -60,9 +60,9 @@ export declare function _hoist(scopeId: number, id: string): {
|
|
|
60
60
|
(): void;
|
|
61
61
|
[Symbol.iterator]: typeof _hoist_read_error;
|
|
62
62
|
};
|
|
63
|
-
export declare function
|
|
64
|
-
export declare function
|
|
65
|
-
export declare function
|
|
63
|
+
export declare function _el_mark(scopeId: number, accessor: Accessor, markerGuard?: number): string;
|
|
64
|
+
export declare function _text_mark(scopeId: number, accessor: Accessor, val: unknown, markerGuard?: number): string;
|
|
65
|
+
export declare function _html_mark(scopeId: number, accessor: Accessor, val: unknown, markerGuard?: number): string;
|
|
66
66
|
export declare function _resume_branch(scopeId: number): void;
|
|
67
67
|
export declare function _attr_content(nodeAccessor: Accessor, scopeId: number, content: unknown, markerGuard?: number): void;
|
|
68
68
|
export declare function _var(parentScopeId: number, scopeOffsetAccessor: Accessor, childScopeId: number, registryId: string, nodeAccessor?: Accessor): void;
|
package/dist/html.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ export { _await, _for_in, _for_of, _for_to, _for_until, _if, _show_end, _show_st
|
|
|
8
8
|
export { _content, _content_resume, _dynamic_tag } from "./html/dynamic-tag";
|
|
9
9
|
export { forIn, forOf, forTo, forUntil } from "./html/for";
|
|
10
10
|
export { _template } from "./html/template";
|
|
11
|
-
export { _attr_content, _el,
|
|
11
|
+
export { _attr_content, _el, _el_mark, _existing_scope, _hoist, _html, _id, _peek_scope_id, _resume, _resume_branch, _resume_locals, _scope, _scope_id, _scope_reason, _html_mark, _scope_with_id, _script, _write_guard, _write_if, _set_scope_reason, _text_mark, _subscribe, _trailers, _var, $global, } from "./html/writer";
|
package/dist/html.js
CHANGED
|
@@ -283,7 +283,10 @@ let empty = [], rest = Symbol(), unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeSty
|
|
|
283
283
|
})(_dynamic_tag), _template = (templateId, renderer, page) => (renderer.render = render, renderer.i = !page, renderer._ = renderer, _content_resume(templateId, renderer)), kAssets = Symbol(), kHead = Symbol(), SET_SCOPE_REGISTER_ID = "$C_s", RENDER_BODY_ID = "$C_b", K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap(), compat = {
|
|
284
284
|
$global,
|
|
285
285
|
writeLoadAsset,
|
|
286
|
-
fork: _await,
|
|
286
|
+
fork: ((scopeId, accessor, promise, content) => _await(scopeId, accessor, promise, (value) => {
|
|
287
|
+
let branchId = _peek_scope_id();
|
|
288
|
+
content(value), _peek_scope_id() === branchId && _scope_id();
|
|
289
|
+
})),
|
|
287
290
|
write: _html,
|
|
288
291
|
writeScript,
|
|
289
292
|
nextScopeId: _scope_id,
|
|
@@ -545,7 +548,7 @@ var State$1 = class {
|
|
|
545
548
|
if (locals) {
|
|
546
549
|
this.buf.push(registered.access + "(_(" + scopeId + ")");
|
|
547
550
|
for (let local of locals) this.buf.push(","), writePlainObject(this, local, newArgReference(this, ref, local));
|
|
548
|
-
} else this.buf.push("_(" + scopeId + "," +
|
|
551
|
+
} else this.buf.push("_(" + scopeId + "," + quoteRegistryId(registered.id));
|
|
549
552
|
this.buf.push(")");
|
|
550
553
|
}
|
|
551
554
|
}, Reference = class {
|
|
@@ -703,7 +706,7 @@ function newScopeReference(state, val, scopeId) {
|
|
|
703
706
|
let ref = new Reference(null, null, state.flushId);
|
|
704
707
|
return ref.scopeId = scopeId, ref.channel = state.channel, state.refs.set(val, ref), ref;
|
|
705
708
|
}
|
|
706
|
-
function
|
|
709
|
+
function quoteRegistryId(id) {
|
|
707
710
|
return "\"" + id + "\"";
|
|
708
711
|
}
|
|
709
712
|
function writeRegistered(state, val, parent, accessor, registered) {
|
|
@@ -1536,15 +1539,15 @@ function _hoist(scopeId, id) {
|
|
|
1536
1539
|
let getter = () => void 0;
|
|
1537
1540
|
return getter[Symbol.iterator] = _hoist_read_error, _resume(getter, id, scopeId);
|
|
1538
1541
|
}
|
|
1539
|
-
function
|
|
1542
|
+
function _el_mark(scopeId, accessor, markerGuard) {
|
|
1540
1543
|
if (markerGuard === 0) return "";
|
|
1541
1544
|
let { state } = $chunk.boundary;
|
|
1542
1545
|
return state.needsWalkerRuntime = !0, state.mark("$", scopeId + " " + accessor);
|
|
1543
1546
|
}
|
|
1544
|
-
function
|
|
1547
|
+
function _text_mark(scopeId, accessor, val, markerGuard) {
|
|
1545
1548
|
return markText(scopeId, accessor, _escape(val), markerGuard);
|
|
1546
1549
|
}
|
|
1547
|
-
function
|
|
1550
|
+
function _html_mark(scopeId, accessor, val, markerGuard) {
|
|
1548
1551
|
let html = _unescaped(val);
|
|
1549
1552
|
if (markerGuard === 0 || !~html.indexOf("<")) return markText(scopeId, accessor, html, markerGuard);
|
|
1550
1553
|
let { state } = $chunk.boundary;
|
|
@@ -1899,9 +1902,9 @@ var State = class {
|
|
|
1899
1902
|
let { channel } = this, { readyId } = channel, scripts = "", held = this.takeDeferredReady();
|
|
1900
1903
|
if (held) for (let chunk of Array.isArray(held) ? held : [held]) chunk.boundary.aborted || (scripts = concatScripts(scripts, chunk.flushReadyScripts(boundary, reservations, holdEffects)), (chunk.effects || chunk.deferredReady) && (this.deferredReady = push(this.deferredReady, chunk)));
|
|
1901
1904
|
if (readyId && !this.async) {
|
|
1902
|
-
let { state } = boundary;
|
|
1903
|
-
flushSerializer(boundary, channel);
|
|
1904
|
-
let deps = takeChannelDeps(state.serializer),
|
|
1905
|
+
let { state } = boundary, effects = holdEffects ? "" : this.effects;
|
|
1906
|
+
effects && flushSerializerGlobals(boundary), flushSerializer(boundary, channel);
|
|
1907
|
+
let deps = takeChannelDeps(state.serializer), { resumes } = channel, chunkScripts = this.scripts;
|
|
1905
1908
|
if (channel.resumes = this.scripts = "", effects && (this.effects = this.lastEffect = ""), resumes || effects) {
|
|
1906
1909
|
state.needsWalkerRuntime = !0;
|
|
1907
1910
|
let batch = concatSequence(depsMarker(deps), concatSequence(resumes, effects && `"${effects}"`));
|
|
@@ -1924,7 +1927,7 @@ var State = class {
|
|
|
1924
1927
|
}
|
|
1925
1928
|
readyResumeScripts && (needsWalk = !0);
|
|
1926
1929
|
let effects = this.async ? "" : joinHeldEffects(this.takeHeldEffects(), this.effects), { html, scripts } = this;
|
|
1927
|
-
html && state.hasReorderRuntime && (html = state.mark("*", "") + html), state.needsWalkerRuntime && !state.hasWalkerRuntime && (state.hasWalkerRuntime = !0, scripts = concatScripts(scripts, state.runtimeScript())), scripts = concatScripts(scripts, readyResumeScripts), effects && (needsWalk = !0, state.resumes = state.resumes ? state.resumes + ",\"" + effects + "\"" : "\"" + effects + "\"");
|
|
1930
|
+
html && state.hasReorderRuntime && (html = state.mark("*", "") + html), state.needsWalkerRuntime && !state.hasWalkerRuntime && (state.hasWalkerRuntime = !0, scripts = concatScripts(scripts, state.runtimeScript())), scripts = concatScripts(scripts, readyResumeScripts), effects && (needsWalk = !0, flushSerializerGlobals(boundary), state.resumes = state.resumes ? state.resumes + ",\"" + effects + "\"" : "\"" + effects + "\"");
|
|
1928
1931
|
let reordered = "", needsResumeArray = !1;
|
|
1929
1932
|
if (state.writeReorders) {
|
|
1930
1933
|
for (let reorderedChunk of state.writeReorders) {
|
|
@@ -2014,12 +2017,15 @@ function flushSerializer(boundary, channel) {
|
|
|
2014
2017
|
props
|
|
2015
2018
|
]);
|
|
2016
2019
|
}
|
|
2017
|
-
(flushes.length || pending) && (channel.readyId &&
|
|
2020
|
+
(flushes.length || pending) && (channel.readyId && flushSerializerGlobals(boundary), state.addResumes(channel, stringifyScopes(serializer, flushes, boundary, channel))), channel.writeScopes = {}, channel.flushScopes = !1, pending && (state.walkOnNextFlush = !0);
|
|
2018
2021
|
}
|
|
2019
2022
|
}
|
|
2020
2023
|
function flushSerializerGlobals(boundary) {
|
|
2021
|
-
let { state } = boundary
|
|
2022
|
-
|
|
2024
|
+
let { state } = boundary;
|
|
2025
|
+
if (state.hasWrittenGlobals) return;
|
|
2026
|
+
state.hasWrittenGlobals = !0;
|
|
2027
|
+
let globals = getFilteredGlobals(state.$global);
|
|
2028
|
+
globals && (state.needsWalkerRuntime = !0, state.resumes = concatSequence(state.resumes, stringifyScopes(state.serializer, [[
|
|
2023
2029
|
0,
|
|
2024
2030
|
globals,
|
|
2025
2031
|
globals
|
|
@@ -2486,7 +2492,7 @@ function writeBranchEnd(scopeId, accessor, branchExprGuard, markerGuard, parentE
|
|
|
2486
2492
|
if (resumesMarker(markerGuard, branchExprGuard, parentEndTag)) {
|
|
2487
2493
|
let { state } = $chunk.boundary, mark = singleNode ? state.mark(parentEndTag ? "}" : "|", scopeId + " " + accessor + (branchIds || "")) : state.mark(parentEndTag ? ")" : "]", scopeId + " " + accessor + (branchIds || ""));
|
|
2488
2494
|
$chunk.writeHTML(mark + endTag);
|
|
2489
|
-
} else markerGuard === 0 ? $chunk.writeHTML(endTag) : $chunk.writeHTML(endTag +
|
|
2495
|
+
} else markerGuard === 0 ? $chunk.writeHTML(endTag) : $chunk.writeHTML(endTag + _el_mark(scopeId, accessor));
|
|
2490
2496
|
}
|
|
2491
2497
|
function _await(scopeId, accessor, promise, content, markerGuard) {
|
|
2492
2498
|
let resumeMarker = markerGuard !== 0;
|
|
@@ -2601,4 +2607,4 @@ exports.$global = $global, exports._assert_class_toggles = _assert_class_toggles
|
|
|
2601
2607
|
get: function() {
|
|
2602
2608
|
return _dynamic_tag;
|
|
2603
2609
|
}
|
|
2604
|
-
}), exports._el = _el, exports.
|
|
2610
|
+
}), exports._el = _el, exports._el_mark = _el_mark, exports._el_read_error = _el_read_error, exports._escape = _escape, exports._escape_comment = _escape_comment, exports._escape_script = _escape_script, exports._escape_style = _escape_style, exports._escape_style_value = _escape_style_value, exports._existing_scope = _existing_scope, exports._flush_head = _flush_head, exports._for_in = _for_in, exports._for_of = _for_of, exports._for_to = _for_to, exports._for_until = _for_until, exports._hoist = _hoist, exports._hoist_read_error = _hoist_read_error, exports._html = _html, exports._html_mark = _html_mark, exports._id = _id, exports._if = _if, exports._peek_scope_id = _peek_scope_id, exports._resume = _resume, exports._resume_branch = _resume_branch, exports._resume_locals = _resume_locals, exports._scope = writeScope, exports._scope_id = _scope_id, exports._scope_reason = _scope_reason, exports._scope_with_id = _scope_with_id, exports._script = _script, exports._set_scope_reason = _set_scope_reason, exports._show_end = _show_end, exports._show_start = _show_start, exports._signal_read_error = _signal_read_error, exports._style_html = _style_html, exports._subscribe = _subscribe, exports._template = _template, exports._text_mark = _text_mark, exports._textarea_value = _textarea_value, exports._to_text = _to_text, exports._trailers = _trailers, exports._try = _try, exports._unescaped = _unescaped, exports._var = _var, exports._write_guard = _write_guard, exports._write_if = _write_if, exports.attrTag = attrTag, exports.attrTags = attrTags, exports.compat = compat, exports.forIn = forIn, exports.forOf = forOf, exports.forTo = forTo, exports.forUntil = forUntil, exports.withLoadAssets = withLoadAssets, exports.withPageAssets = withPageAssets;
|
package/dist/html.mjs
CHANGED
|
@@ -282,7 +282,10 @@ let empty = [], rest = Symbol(), unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeSty
|
|
|
282
282
|
})(_dynamic_tag), _template = (templateId, renderer, page) => (renderer.render = render, renderer.i = !page, renderer._ = renderer, _content_resume(templateId, renderer)), kAssets = Symbol(), kHead = Symbol(), SET_SCOPE_REGISTER_ID = "$C_s", RENDER_BODY_ID = "$C_b", K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap(), compat = {
|
|
283
283
|
$global,
|
|
284
284
|
writeLoadAsset,
|
|
285
|
-
fork: _await,
|
|
285
|
+
fork: ((scopeId, accessor, promise, content) => _await(scopeId, accessor, promise, (value) => {
|
|
286
|
+
let branchId = _peek_scope_id();
|
|
287
|
+
content(value), _peek_scope_id() === branchId && _scope_id();
|
|
288
|
+
})),
|
|
286
289
|
write: _html,
|
|
287
290
|
writeScript,
|
|
288
291
|
nextScopeId: _scope_id,
|
|
@@ -543,7 +546,7 @@ var State$1 = class {
|
|
|
543
546
|
if (locals) {
|
|
544
547
|
this.buf.push(registered.access + "(_(" + scopeId + ")");
|
|
545
548
|
for (let local of locals) this.buf.push(","), writePlainObject(this, local, newArgReference(this, ref, local));
|
|
546
|
-
} else this.buf.push("_(" + scopeId + "," +
|
|
549
|
+
} else this.buf.push("_(" + scopeId + "," + quoteRegistryId(registered.id));
|
|
547
550
|
this.buf.push(")");
|
|
548
551
|
}
|
|
549
552
|
}, Reference = class {
|
|
@@ -701,7 +704,7 @@ function newScopeReference(state, val, scopeId) {
|
|
|
701
704
|
let ref = new Reference(null, null, state.flushId);
|
|
702
705
|
return ref.scopeId = scopeId, ref.channel = state.channel, state.refs.set(val, ref), ref;
|
|
703
706
|
}
|
|
704
|
-
function
|
|
707
|
+
function quoteRegistryId(id) {
|
|
705
708
|
return "\"" + id + "\"";
|
|
706
709
|
}
|
|
707
710
|
function writeRegistered(state, val, parent, accessor, registered) {
|
|
@@ -1534,15 +1537,15 @@ function _hoist(scopeId, id) {
|
|
|
1534
1537
|
let getter = () => void 0;
|
|
1535
1538
|
return getter[Symbol.iterator] = _hoist_read_error, _resume(getter, id, scopeId);
|
|
1536
1539
|
}
|
|
1537
|
-
function
|
|
1540
|
+
function _el_mark(scopeId, accessor, markerGuard) {
|
|
1538
1541
|
if (markerGuard === 0) return "";
|
|
1539
1542
|
let { state } = $chunk.boundary;
|
|
1540
1543
|
return state.needsWalkerRuntime = !0, state.mark("$", scopeId + " " + accessor);
|
|
1541
1544
|
}
|
|
1542
|
-
function
|
|
1545
|
+
function _text_mark(scopeId, accessor, val, markerGuard) {
|
|
1543
1546
|
return markText(scopeId, accessor, _escape(val), markerGuard);
|
|
1544
1547
|
}
|
|
1545
|
-
function
|
|
1548
|
+
function _html_mark(scopeId, accessor, val, markerGuard) {
|
|
1546
1549
|
let html = _unescaped(val);
|
|
1547
1550
|
if (markerGuard === 0 || !~html.indexOf("<")) return markText(scopeId, accessor, html, markerGuard);
|
|
1548
1551
|
let { state } = $chunk.boundary;
|
|
@@ -1897,9 +1900,9 @@ var State = class {
|
|
|
1897
1900
|
let { channel } = this, { readyId } = channel, scripts = "", held = this.takeDeferredReady();
|
|
1898
1901
|
if (held) for (let chunk of Array.isArray(held) ? held : [held]) chunk.boundary.aborted || (scripts = concatScripts(scripts, chunk.flushReadyScripts(boundary, reservations, holdEffects)), (chunk.effects || chunk.deferredReady) && (this.deferredReady = push(this.deferredReady, chunk)));
|
|
1899
1902
|
if (readyId && !this.async) {
|
|
1900
|
-
let { state } = boundary;
|
|
1901
|
-
flushSerializer(boundary, channel);
|
|
1902
|
-
let deps = takeChannelDeps(state.serializer),
|
|
1903
|
+
let { state } = boundary, effects = holdEffects ? "" : this.effects;
|
|
1904
|
+
effects && flushSerializerGlobals(boundary), flushSerializer(boundary, channel);
|
|
1905
|
+
let deps = takeChannelDeps(state.serializer), { resumes } = channel, chunkScripts = this.scripts;
|
|
1903
1906
|
if (channel.resumes = this.scripts = "", effects && (this.effects = this.lastEffect = ""), resumes || effects) {
|
|
1904
1907
|
state.needsWalkerRuntime = !0;
|
|
1905
1908
|
let batch = concatSequence(depsMarker(deps), concatSequence(resumes, effects && `"${effects}"`));
|
|
@@ -1922,7 +1925,7 @@ var State = class {
|
|
|
1922
1925
|
}
|
|
1923
1926
|
readyResumeScripts && (needsWalk = !0);
|
|
1924
1927
|
let effects = this.async ? "" : joinHeldEffects(this.takeHeldEffects(), this.effects), { html, scripts } = this;
|
|
1925
|
-
html && state.hasReorderRuntime && (html = state.mark("*", "") + html), state.needsWalkerRuntime && !state.hasWalkerRuntime && (state.hasWalkerRuntime = !0, scripts = concatScripts(scripts, state.runtimeScript())), scripts = concatScripts(scripts, readyResumeScripts), effects && (needsWalk = !0, state.resumes = state.resumes ? state.resumes + ",\"" + effects + "\"" : "\"" + effects + "\"");
|
|
1928
|
+
html && state.hasReorderRuntime && (html = state.mark("*", "") + html), state.needsWalkerRuntime && !state.hasWalkerRuntime && (state.hasWalkerRuntime = !0, scripts = concatScripts(scripts, state.runtimeScript())), scripts = concatScripts(scripts, readyResumeScripts), effects && (needsWalk = !0, flushSerializerGlobals(boundary), state.resumes = state.resumes ? state.resumes + ",\"" + effects + "\"" : "\"" + effects + "\"");
|
|
1926
1929
|
let reordered = "", needsResumeArray = !1;
|
|
1927
1930
|
if (state.writeReorders) {
|
|
1928
1931
|
for (let reorderedChunk of state.writeReorders) {
|
|
@@ -2012,12 +2015,15 @@ function flushSerializer(boundary, channel) {
|
|
|
2012
2015
|
props
|
|
2013
2016
|
]);
|
|
2014
2017
|
}
|
|
2015
|
-
(flushes.length || pending) && (channel.readyId &&
|
|
2018
|
+
(flushes.length || pending) && (channel.readyId && flushSerializerGlobals(boundary), state.addResumes(channel, stringifyScopes(serializer, flushes, boundary, channel))), channel.writeScopes = {}, channel.flushScopes = !1, pending && (state.walkOnNextFlush = !0);
|
|
2016
2019
|
}
|
|
2017
2020
|
}
|
|
2018
2021
|
function flushSerializerGlobals(boundary) {
|
|
2019
|
-
let { state } = boundary
|
|
2020
|
-
|
|
2022
|
+
let { state } = boundary;
|
|
2023
|
+
if (state.hasWrittenGlobals) return;
|
|
2024
|
+
state.hasWrittenGlobals = !0;
|
|
2025
|
+
let globals = getFilteredGlobals(state.$global);
|
|
2026
|
+
globals && (state.needsWalkerRuntime = !0, state.resumes = concatSequence(state.resumes, stringifyScopes(state.serializer, [[
|
|
2021
2027
|
0,
|
|
2022
2028
|
globals,
|
|
2023
2029
|
globals
|
|
@@ -2484,7 +2490,7 @@ function writeBranchEnd(scopeId, accessor, branchExprGuard, markerGuard, parentE
|
|
|
2484
2490
|
if (resumesMarker(markerGuard, branchExprGuard, parentEndTag)) {
|
|
2485
2491
|
let { state } = $chunk.boundary, mark = singleNode ? state.mark(parentEndTag ? "}" : "|", scopeId + " " + accessor + (branchIds || "")) : state.mark(parentEndTag ? ")" : "]", scopeId + " " + accessor + (branchIds || ""));
|
|
2486
2492
|
$chunk.writeHTML(mark + endTag);
|
|
2487
|
-
} else markerGuard === 0 ? $chunk.writeHTML(endTag) : $chunk.writeHTML(endTag +
|
|
2493
|
+
} else markerGuard === 0 ? $chunk.writeHTML(endTag) : $chunk.writeHTML(endTag + _el_mark(scopeId, accessor));
|
|
2488
2494
|
}
|
|
2489
2495
|
function _await(scopeId, accessor, promise, content, markerGuard) {
|
|
2490
2496
|
let resumeMarker = markerGuard !== 0;
|
|
@@ -2595,4 +2601,4 @@ function swapReorders(state, reorders) {
|
|
|
2595
2601
|
}
|
|
2596
2602
|
function NOOP() {}
|
|
2597
2603
|
//#endregion
|
|
2598
|
-
export { $global, _assert_class_toggles, _assert_hoist, _attr, _attr_and, _attr_class, _attr_content, _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open as _attr_dialog_open, _attr_input_checked, _attr_input_checkedValue, _attr_input_value, _attr_nonce, _attr_nullish, _attr_option_value, _attr_or, _attr_select_value, _attr_style, _attr_textarea_value, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, _attrs_select_value, _attrs_textarea_value, _await, _content, _content_resume, _dynamic_tag, _el,
|
|
2604
|
+
export { $global, _assert_class_toggles, _assert_hoist, _attr, _attr_and, _attr_class, _attr_content, _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open as _attr_dialog_open, _attr_input_checked, _attr_input_checkedValue, _attr_input_value, _attr_nonce, _attr_nullish, _attr_option_value, _attr_or, _attr_select_value, _attr_style, _attr_textarea_value, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, _attrs_select_value, _attrs_textarea_value, _await, _content, _content_resume, _dynamic_tag, _el, _el_mark, _el_read_error, _escape, _escape_comment, _escape_script, _escape_style, _escape_style_value, _existing_scope, _flush_head, _for_in, _for_of, _for_to, _for_until, _hoist, _hoist_read_error, _html, _html_mark, _id, _if, _peek_scope_id, _resume, _resume_branch, _resume_locals, writeScope as _scope, _scope_id, _scope_reason, _scope_with_id, _script, _set_scope_reason, _show_end, _show_start, _signal_read_error, _style_html, _subscribe, _template, _text_mark, _textarea_value, _to_text, _trailers, _try, _unescaped, _var, _write_guard, _write_if, attrTag, attrTags, compat, forIn, forOf, forTo, forUntil, withLoadAssets, withPageAssets };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { type Tag } from "@marko/compiler/babel-utils";
|
|
2
2
|
import { type Binding } from "../util/bindings";
|
|
3
|
+
import { type Section } from "../util/sections";
|
|
3
4
|
declare const kStartBinding: unique symbol;
|
|
4
|
-
declare const kEndBinding: unique symbol;
|
|
5
5
|
declare const kStaticDisplay: unique symbol;
|
|
6
|
-
declare const
|
|
6
|
+
declare const kBodyContent: unique symbol;
|
|
7
7
|
declare module "@marko/compiler/dist/types" {
|
|
8
8
|
interface MarkoTagExtra {
|
|
9
9
|
[kStartBinding]?: Binding;
|
|
10
|
-
[kEndBinding]?: Binding;
|
|
11
10
|
[kStaticDisplay]?: boolean;
|
|
12
|
-
[
|
|
11
|
+
[kBodyContent]?: Section["content"];
|
|
13
12
|
}
|
|
14
13
|
}
|
|
15
14
|
declare const _default: Tag;
|