marko 6.4.9 → 6.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cheatsheet.md +1 -1
- package/dist/common/accessor.d.ts +0 -3
- package/dist/common/accessor.debug.d.ts +0 -3
- package/dist/common/helpers.d.ts +1 -1
- package/dist/common/types.d.ts +4 -3
- package/dist/debug/dom/catch.feat.js +2 -3
- package/dist/debug/dom/catch.feat.mjs +2 -3
- package/dist/debug/dom/controllable-input.feat.js +2 -3
- package/dist/debug/dom/controllable-input.feat.mjs +2 -3
- package/dist/debug/dom/controllable-open.feat.js +2 -3
- package/dist/debug/dom/controllable-open.feat.mjs +2 -3
- package/dist/debug/dom/controllable-select.feat.js +2 -3
- package/dist/debug/dom/controllable-select.feat.mjs +2 -3
- package/dist/debug/dom/controllable-textarea.feat.js +2 -3
- package/dist/debug/dom/controllable-textarea.feat.mjs +2 -3
- package/dist/debug/dom/controllable.feat.js +2 -3
- package/dist/debug/dom/controllable.feat.mjs +2 -3
- package/dist/debug/dom/dynamic-tag-script.feat.js +2 -3
- package/dist/debug/dom/dynamic-tag-script.feat.mjs +2 -3
- package/dist/debug/dom/dynamic-tag-var.feat.js +2 -3
- package/dist/debug/dom/dynamic-tag-var.feat.mjs +2 -3
- package/dist/debug/dom/lazy.feat.js +2 -3
- package/dist/debug/dom/lazy.feat.mjs +2 -3
- package/dist/debug/dom/placeholder.feat.js +2 -3
- package/dist/debug/dom/placeholder.feat.mjs +2 -3
- package/dist/debug/{dom-VKjkbuuo.mjs → dom-DjUZd-9y.mjs} +221 -261
- package/dist/debug/{dom-QkYva5Qx.js → dom-mQ5mPBTF.js} +226 -260
- package/dist/debug/dom.js +10 -18
- package/dist/debug/dom.mjs +10 -19
- package/dist/debug/html.js +87 -125
- package/dist/debug/html.mjs +87 -125
- package/dist/dom/abort-signal.d.ts +1 -1
- package/dist/dom/catch.feat.js +4 -5
- package/dist/dom/catch.feat.mjs +2 -3
- package/dist/dom/control-flow.d.ts +4 -4
- package/dist/dom/controllable-input.feat.js +1 -2
- package/dist/dom/controllable-input.feat.mjs +1 -2
- package/dist/dom/controllable-open.feat.js +2 -3
- package/dist/dom/controllable-open.feat.mjs +2 -3
- package/dist/dom/controllable-select.feat.js +2 -3
- package/dist/dom/controllable-select.feat.mjs +2 -3
- package/dist/dom/controllable-textarea.feat.js +2 -3
- package/dist/dom/controllable-textarea.feat.mjs +2 -3
- package/dist/dom/controllable.feat.js +1 -2
- package/dist/dom/controllable.feat.mjs +1 -2
- package/dist/dom/dynamic-tag-script.feat.js +3 -4
- package/dist/dom/dynamic-tag-script.feat.mjs +2 -3
- package/dist/dom/dynamic-tag-var.feat.js +3 -4
- package/dist/dom/dynamic-tag-var.feat.mjs +1 -2
- package/dist/dom/lazy.feat.js +2 -3
- package/dist/dom/lazy.feat.mjs +2 -3
- package/dist/dom/load.d.ts +3 -4
- package/dist/dom/placeholder.feat.js +2 -3
- package/dist/dom/placeholder.feat.mjs +2 -3
- package/dist/dom/queue.d.ts +1 -2
- package/dist/dom/signals.d.ts +5 -7
- package/dist/{dom-IujlfJ6b.js → dom-B8j2453O.js} +158 -190
- package/dist/{dom-DtKQb840.mjs → dom-HEWdZCCb.mjs} +134 -172
- package/dist/dom.d.ts +1 -1
- package/dist/dom.js +22 -30
- package/dist/dom.mjs +10 -19
- package/dist/html/assets.d.ts +3 -4
- package/dist/html/for.d.ts +0 -1
- package/dist/html/writer.d.ts +2 -2
- package/dist/html.d.ts +1 -1
- package/dist/html.js +99 -131
- package/dist/html.mjs +99 -132
- package/dist/translator/index.d.ts +0 -1
- package/dist/translator/index.js +4771 -4760
- package/dist/translator/interop/out-global.d.ts +5 -0
- package/dist/translator/util/assert.d.ts +13 -2
- package/dist/translator/util/entry-builder.d.ts +1 -1
- package/dist/translator/util/finalize-references.d.ts +2 -1
- package/dist/translator/util/for-selector.d.ts +1 -1
- package/dist/translator/util/known-tag.d.ts +10 -1
- package/dist/translator/util/references.d.ts +11 -5
- package/dist/translator/util/runtime.d.ts +1 -0
- package/dist/translator/util/sections.d.ts +6 -1
- package/dist/translator/util/signals.d.ts +2 -1
- package/dist/translator/util/sources.d.ts +1 -1
- package/dist/translator/util/style-interpolation.d.ts +1 -1
- package/dist/translator/util/tag-name-type.d.ts +4 -0
- package/dist/translator/util/visitors.d.ts +1 -1
- package/dist/translator/util/write-guard.d.ts +2 -0
- package/dist/translator/visitors/program/index.d.ts +0 -4
- package/dist/translator/visitors/referenced-identifier.d.ts +3 -1
- package/package.json +6 -6
- package/tags/lifecycle.d.marko +2 -0
- package/dist/common/constants/keyed-scopes-prop.d.ts +0 -4
- package/dist/common/constants/keyed-scopes-prop.debug.d.ts +0 -4
package/dist/debug/dom.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_control_flow = require("./dom-
|
|
4
|
-
|
|
3
|
+
const require_control_flow = require("./dom-mQ5mPBTF.js");
|
|
4
|
+
// src/common/attr-tag.ts
|
|
5
5
|
const empty = [];
|
|
6
6
|
const rest = Symbol("Attribute Tag");
|
|
7
7
|
function attrTag(attrs) {
|
|
@@ -21,12 +21,10 @@ function* attrTagIterator() {
|
|
|
21
21
|
yield this;
|
|
22
22
|
yield* this[rest];
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
//#region src/common/compat-meta.ts
|
|
24
|
+
// src/common/compat-meta.ts
|
|
26
25
|
const SET_SCOPE_REGISTER_ID = "$compat_setScope";
|
|
27
26
|
const RENDER_BODY_ID = "$compat_renderBody";
|
|
28
|
-
|
|
29
|
-
//#region src/dom/compat.ts
|
|
27
|
+
// src/dom/compat.ts
|
|
30
28
|
const classIdToBranch = /* @__PURE__ */ new Map();
|
|
31
29
|
let classEventResolver;
|
|
32
30
|
const scopesByRender = /* @__PURE__ */ new WeakMap();
|
|
@@ -120,8 +118,7 @@ const compat = {
|
|
|
120
118
|
if (created) return branch["#StartNode"].parentNode || branch["#StartNode"];
|
|
121
119
|
}
|
|
122
120
|
};
|
|
123
|
-
|
|
124
|
-
//#region src/dom/template.ts
|
|
121
|
+
// src/dom/template.ts
|
|
125
122
|
const _template = (id, template, walks, setup, inputSignal) => {
|
|
126
123
|
const renderer = require_control_flow._content(id, template, walks, setup, inputSignal)();
|
|
127
124
|
renderer.mount = mount;
|
|
@@ -165,9 +162,7 @@ function mount(input = {}, reference, position) {
|
|
|
165
162
|
const args = this[require_control_flow.Params];
|
|
166
163
|
const effects = require_control_flow.prepareEffects((_) => {
|
|
167
164
|
branch = require_control_flow.createBranch($global, this, void 0, parentNode);
|
|
168
|
-
branch[require_control_flow.TagVariable] = (newValue) =>
|
|
169
|
-
curValue = newValue;
|
|
170
|
-
};
|
|
165
|
+
branch[require_control_flow.TagVariable] = (newValue) => curValue = newValue;
|
|
171
166
|
this[require_control_flow.Setup]?.(branch);
|
|
172
167
|
args?.(branch, input);
|
|
173
168
|
});
|
|
@@ -183,9 +178,7 @@ function mount(input = {}, reference, position) {
|
|
|
183
178
|
update(newInput = {}) {
|
|
184
179
|
if (args) {
|
|
185
180
|
if (newInput.$global) ({$global, ...newInput} = newInput);
|
|
186
|
-
require_control_flow.runEffects(require_control_flow.prepareEffects((_) =>
|
|
187
|
-
args(branch, newInput);
|
|
188
|
-
}));
|
|
181
|
+
require_control_flow.runEffects(require_control_flow.prepareEffects((_) => args(branch, newInput)));
|
|
189
182
|
}
|
|
190
183
|
},
|
|
191
184
|
destroy() {
|
|
@@ -193,8 +186,7 @@ function mount(input = {}, reference, position) {
|
|
|
193
186
|
}
|
|
194
187
|
};
|
|
195
188
|
}
|
|
196
|
-
|
|
197
|
-
//#region src/dom/load.ts
|
|
189
|
+
// src/dom/load.ts
|
|
198
190
|
const noop = (_) => 0;
|
|
199
191
|
function _load_template(id, load) {
|
|
200
192
|
let pending;
|
|
@@ -237,7 +229,7 @@ function insertLoaded(renderer, branch, marker, awaitCounter) {
|
|
|
237
229
|
awaitCounter?.c();
|
|
238
230
|
};
|
|
239
231
|
let remaining;
|
|
240
|
-
if (remaining = values
|
|
232
|
+
if (remaining = values.size) {
|
|
241
233
|
awaitCounter ||= require_control_flow.startAwait(branch);
|
|
242
234
|
const fail = loadFailed(branch, awaitCounter);
|
|
243
235
|
values.forEach(([, apply], promise) => promise.then((mod) => (apply._ = mod._) && !--remaining && require_control_flow.queueAsyncRender(branch, (branch) => {
|
|
@@ -294,7 +286,6 @@ function _load_race_trigger(...triggers) {
|
|
|
294
286
|
function getSelectorOrResolve(selector, resolve) {
|
|
295
287
|
return document.querySelector(selector) || (console.warn(`A lazy load trigger could not find an element matching "${selector}". The module was loaded immediately.`), resolve());
|
|
296
288
|
}
|
|
297
|
-
//#endregion
|
|
298
289
|
exports.$signal = require_control_flow.$signal;
|
|
299
290
|
exports.$signalReset = require_control_flow.$signalReset;
|
|
300
291
|
exports._assert_class_toggles = require_control_flow._assert_class_toggles;
|
|
@@ -416,6 +407,7 @@ exports.forTo = require_control_flow.forTo;
|
|
|
416
407
|
exports.forUntil = require_control_flow.forUntil;
|
|
417
408
|
exports.init = require_control_flow.init;
|
|
418
409
|
exports.initEmbedded = require_control_flow.initEmbedded;
|
|
410
|
+
exports.onAbort = require_control_flow.onAbort;
|
|
419
411
|
exports.ready = require_control_flow.ready;
|
|
420
412
|
exports.readyFailed = require_control_flow.readyFailed;
|
|
421
413
|
exports.run = require_control_flow.run;
|
package/dist/debug/dom.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as _attr_style_items, A as _attr_input_value,
|
|
2
|
-
|
|
1
|
+
import { $ as _attr_style_items, A as _attr_input_value, At as _closure_get, B as _controllable_select, Bn as Load, Bt as _let, C as _attr_details_or_dialog_open_script, Cn as _call, Ct as getRegisteredWithScope, D as _attr_input_checkedValue_script, Dn as LocalClosures, Dt as readyFailed, E as _attr_input_checkedValue_default, En as Lazy, 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, Kn as StartNode, Kt as _var, L as _attr_select_value_script, Ln as EndNode, 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, On as Owner, 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, Sn as _hoist_read_error, St as _var_resume, T as _attr_input_checkedValue, Tn as Clone, 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 forOf, _t as createBranch, a as _for_in, at as _html, b as startAwait, bn as _assert_class_toggles, bt as _el, c as _for_to, cn as prepareEffects, ct as _style_shell, d as _for_until_unkeyed, dn as queueRender, dt as _to_text, et as _attrs, f as _if, fn as rendering, ft as _content, gn as forIn, gt as createAndSetupBranch, hn as runId, ht as _return_setup, i as _dynamic_tag_content, in as onAbort, it as _attrs_script, j as _attr_input_value_attribute_default, jn as Setup, jt as _const, k as _attr_input_checked_script, kn as Params, kt as _closure, l as _for_to_unkeyed, ln as queueAsyncRender, lt as _text, m as _try, mn as runEffects, mt as _content_resume, n as _await_promise, nn as $signal, nt as _attrs_partial, o as _for_of, ot as _lifecycle, p as _show, pn as run, pt as _content_closures, q as _attr_class_items, qn as TagVariable, qt as _var_change, r as _dynamic_tag, rn as $signalReset, rt as _attrs_partial_content, s as _for_of_unkeyed, st as _style_rule_item, t as _await_content, tn as _on, tt as _attrs_content, u as _for_until, un as queueEffect, ut as _text_content, v as renderCatch, vn as forTo, vt as setupBranch, w as _attr_input_checked, wt as init, x as _attr_details_or_dialog_open, xn as _assert_hoist, xt as _resumed, yn as forUntil, yt as _dynamic_tag_var_resume, z as _controllable_open, zn as Global, zt as _if_closure } from "./dom-DjUZd-9y.mjs";
|
|
2
|
+
// src/common/attr-tag.ts
|
|
3
3
|
const empty = [];
|
|
4
4
|
const rest = Symbol("Attribute Tag");
|
|
5
5
|
function attrTag(attrs) {
|
|
@@ -19,12 +19,10 @@ function* attrTagIterator() {
|
|
|
19
19
|
yield this;
|
|
20
20
|
yield* this[rest];
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
//#region src/common/compat-meta.ts
|
|
22
|
+
// src/common/compat-meta.ts
|
|
24
23
|
const SET_SCOPE_REGISTER_ID = "$compat_setScope";
|
|
25
24
|
const RENDER_BODY_ID = "$compat_renderBody";
|
|
26
|
-
|
|
27
|
-
//#region src/dom/compat.ts
|
|
25
|
+
// src/dom/compat.ts
|
|
28
26
|
const classIdToBranch = /* @__PURE__ */ new Map();
|
|
29
27
|
let classEventResolver;
|
|
30
28
|
const scopesByRender = /* @__PURE__ */ new WeakMap();
|
|
@@ -118,8 +116,7 @@ const compat = {
|
|
|
118
116
|
if (created) return branch["#StartNode"].parentNode || branch["#StartNode"];
|
|
119
117
|
}
|
|
120
118
|
};
|
|
121
|
-
|
|
122
|
-
//#region src/dom/template.ts
|
|
119
|
+
// src/dom/template.ts
|
|
123
120
|
const _template = (id, template, walks, setup, inputSignal) => {
|
|
124
121
|
const renderer = _content(id, template, walks, setup, inputSignal)();
|
|
125
122
|
renderer.mount = mount;
|
|
@@ -163,9 +160,7 @@ function mount(input = {}, reference, position) {
|
|
|
163
160
|
const args = this[Params];
|
|
164
161
|
const effects = prepareEffects((_) => {
|
|
165
162
|
branch = createBranch($global, this, void 0, parentNode);
|
|
166
|
-
branch[TagVariable] = (newValue) =>
|
|
167
|
-
curValue = newValue;
|
|
168
|
-
};
|
|
163
|
+
branch[TagVariable] = (newValue) => curValue = newValue;
|
|
169
164
|
this[Setup]?.(branch);
|
|
170
165
|
args?.(branch, input);
|
|
171
166
|
});
|
|
@@ -181,9 +176,7 @@ function mount(input = {}, reference, position) {
|
|
|
181
176
|
update(newInput = {}) {
|
|
182
177
|
if (args) {
|
|
183
178
|
if (newInput.$global) ({$global, ...newInput} = newInput);
|
|
184
|
-
runEffects(prepareEffects((_) =>
|
|
185
|
-
args(branch, newInput);
|
|
186
|
-
}));
|
|
179
|
+
runEffects(prepareEffects((_) => args(branch, newInput)));
|
|
187
180
|
}
|
|
188
181
|
},
|
|
189
182
|
destroy() {
|
|
@@ -191,8 +184,7 @@ function mount(input = {}, reference, position) {
|
|
|
191
184
|
}
|
|
192
185
|
};
|
|
193
186
|
}
|
|
194
|
-
|
|
195
|
-
//#region src/dom/load.ts
|
|
187
|
+
// src/dom/load.ts
|
|
196
188
|
const noop = (_) => 0;
|
|
197
189
|
function _load_template(id, load) {
|
|
198
190
|
let pending;
|
|
@@ -235,7 +227,7 @@ function insertLoaded(renderer, branch, marker, awaitCounter) {
|
|
|
235
227
|
awaitCounter?.c();
|
|
236
228
|
};
|
|
237
229
|
let remaining;
|
|
238
|
-
if (remaining = values
|
|
230
|
+
if (remaining = values.size) {
|
|
239
231
|
awaitCounter ||= startAwait(branch);
|
|
240
232
|
const fail = loadFailed(branch, awaitCounter);
|
|
241
233
|
values.forEach(([, apply], promise) => promise.then((mod) => (apply._ = mod._) && !--remaining && queueAsyncRender(branch, (branch) => {
|
|
@@ -292,5 +284,4 @@ function _load_race_trigger(...triggers) {
|
|
|
292
284
|
function getSelectorOrResolve(selector, resolve) {
|
|
293
285
|
return document.querySelector(selector) || (console.warn(`A lazy load trigger could not find an element matching "${selector}". The module was loaded immediately.`), resolve());
|
|
294
286
|
}
|
|
295
|
-
|
|
296
|
-
export { $signal, $signalReset, _assert_class_toggles, _assert_hoist, _assert_init, _attr, _attr_class, _attr_class_item, _attr_class_items, _attr_class_names, _attr_content, _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open as _attr_dialog_open, _attr_details_or_dialog_open_default as _attr_details_open_default, _attr_details_or_dialog_open_default as _attr_dialog_open_default, _attr_details_or_dialog_open_script as _attr_details_open_script, _attr_details_or_dialog_open_script as _attr_dialog_open_script, _attr_input_checked, _attr_input_checkedValue, _attr_input_checkedValue_default, _attr_input_checkedValue_script, _attr_input_checked_default, _attr_input_checked_script, _attr_input_value, _attr_input_value as _attr_textarea_value, _attr_input_value_attribute_default, _attr_input_value_default, _attr_input_value_default as _attr_textarea_value_default, _attr_input_value_dynamic_default, _attr_input_value_script, _attr_input_value_script as _attr_textarea_value_script, _attr_nonce, _attr_select_value, _attr_select_value_default, _attr_select_value_script, _attr_style, _attr_style_item, _attr_style_items, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, _attrs_script, _await_content, _await_promise, _call, _closure, _closure_get, _const, _content, _content_closures, _content_resume, _controllable_input, _controllable_open, _controllable_select, _controllable_textarea, _dynamic_tag, _dynamic_tag_content, _dynamic_tag_var_resume, _el, _el_read, _for_closure, _for_in, _for_of, _for_of_unkeyed, _for_selector, _for_to, _for_to_unkeyed, _for_until, _for_until_unkeyed, _global_read, _hoist, _hoist_read_error, _hoist_resume, _html, _id, _if, _if_closure, _let, _let_change, _lifecycle, _load_event_trigger, _load_idle_trigger, _load_media_trigger, _load_race_trigger, _load_setup, _load_signal, _load_template, _load_visible_trigger, _on, _or, _resumed, _return, _return_change, _return_setup, _script, _show, _style_rule_item, _style_shell, _template, _text, _text_content, _to_text, _try, _var, _var_change, _var_resume, attrTag, attrTags, compat, forIn, forOf, forTo, forUntil, init, initEmbedded, ready, readyFailed, run };
|
|
287
|
+
export { $signal, $signalReset, _assert_class_toggles, _assert_hoist, _assert_init, _attr, _attr_class, _attr_class_item, _attr_class_items, _attr_class_names, _attr_content, _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open as _attr_dialog_open, _attr_details_or_dialog_open_default as _attr_details_open_default, _attr_details_or_dialog_open_default as _attr_dialog_open_default, _attr_details_or_dialog_open_script as _attr_details_open_script, _attr_details_or_dialog_open_script as _attr_dialog_open_script, _attr_input_checked, _attr_input_checkedValue, _attr_input_checkedValue_default, _attr_input_checkedValue_script, _attr_input_checked_default, _attr_input_checked_script, _attr_input_value, _attr_input_value as _attr_textarea_value, _attr_input_value_attribute_default, _attr_input_value_default, _attr_input_value_default as _attr_textarea_value_default, _attr_input_value_dynamic_default, _attr_input_value_script, _attr_input_value_script as _attr_textarea_value_script, _attr_nonce, _attr_select_value, _attr_select_value_default, _attr_select_value_script, _attr_style, _attr_style_item, _attr_style_items, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, _attrs_script, _await_content, _await_promise, _call, _closure, _closure_get, _const, _content, _content_closures, _content_resume, _controllable_input, _controllable_open, _controllable_select, _controllable_textarea, _dynamic_tag, _dynamic_tag_content, _dynamic_tag_var_resume, _el, _el_read, _for_closure, _for_in, _for_of, _for_of_unkeyed, _for_selector, _for_to, _for_to_unkeyed, _for_until, _for_until_unkeyed, _global_read, _hoist, _hoist_read_error, _hoist_resume, _html, _id, _if, _if_closure, _let, _let_change, _lifecycle, _load_event_trigger, _load_idle_trigger, _load_media_trigger, _load_race_trigger, _load_setup, _load_signal, _load_template, _load_visible_trigger, _on, _or, _resumed, _return, _return_change, _return_setup, _script, _show, _style_rule_item, _style_shell, _template, _text, _text_content, _to_text, _try, _var, _var_change, _var_resume, attrTag, attrTags, compat, forIn, forOf, forTo, forUntil, init, initEmbedded, onAbort, ready, readyFailed, run };
|