marko 6.3.56 → 6.4.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 +2 -2
- package/dist/common/constants/accessor-prefix.d.ts +1 -0
- package/dist/common/constants/accessor-prefix.debug.d.ts +1 -0
- package/dist/common/constants/accessor-prop.d.ts +3 -0
- package/dist/common/constants/accessor-prop.debug.d.ts +3 -0
- package/dist/common/types.d.ts +8 -2
- package/dist/debug/dom/catch.feat.js +12 -14
- package/dist/debug/dom/catch.feat.mjs +12 -14
- 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 +4 -0
- package/dist/debug/dom/lazy.feat.mjs +4 -0
- package/dist/debug/dom/placeholder.feat.js +1 -1
- package/dist/debug/dom/placeholder.feat.mjs +1 -1
- package/dist/debug/{dom-DcwejnYg.js → dom-BRO5aArp.js} +232 -178
- package/dist/debug/{dom-BeCNT5R5.mjs → dom-Btj2QJhk.mjs} +215 -167
- package/dist/debug/dom.js +14 -12
- package/dist/debug/dom.mjs +14 -12
- package/dist/debug/html.js +603 -517
- package/dist/debug/html.mjs +602 -518
- package/dist/dom/abort-signal.d.ts +2 -0
- package/dist/dom/catch.feat.js +6 -7
- package/dist/dom/catch.feat.mjs +5 -7
- package/dist/dom/control-flow.d.ts +3 -5
- package/dist/dom/controllable-input.feat.js +3 -2
- package/dist/dom/controllable-input.feat.mjs +1 -1
- package/dist/dom/controllable-open.feat.js +3 -2
- package/dist/dom/controllable-open.feat.mjs +1 -1
- package/dist/dom/controllable-select.feat.js +3 -2
- package/dist/dom/controllable-select.feat.mjs +1 -1
- package/dist/dom/controllable-textarea.feat.js +3 -2
- package/dist/dom/controllable-textarea.feat.mjs +1 -1
- package/dist/dom/controllable.feat.js +3 -2
- package/dist/dom/controllable.feat.mjs +1 -1
- package/dist/dom/dynamic-tag-script.feat.js +3 -2
- package/dist/dom/dynamic-tag-script.feat.mjs +1 -1
- package/dist/dom/dynamic-tag-var.feat.js +2 -1
- package/dist/dom/dynamic-tag-var.feat.mjs +1 -1
- package/dist/dom/lazy.feat.d.ts +1 -0
- package/dist/dom/lazy.feat.js +4 -0
- package/dist/dom/lazy.feat.mjs +4 -0
- package/dist/dom/load.d.ts +3 -3
- package/dist/dom/placeholder.feat.js +4 -3
- package/dist/dom/placeholder.feat.mjs +1 -1
- package/dist/dom/queue.d.ts +2 -4
- package/dist/dom/resume.d.ts +1 -1
- package/dist/dom/scope.d.ts +0 -1
- package/dist/{dom-BwNsIevR.mjs → dom-B-v8Gw6T.mjs} +114 -87
- package/dist/{dom-QEF0csuC.js → dom-BSsI9OPC.js} +210 -182
- package/dist/dom.js +59 -56
- package/dist/dom.mjs +34 -32
- package/dist/html/attrs.d.ts +2 -0
- package/dist/html/writer.d.ts +5 -11
- package/dist/html.d.ts +1 -1
- package/dist/html.js +362 -317
- package/dist/html.mjs +361 -317
- package/dist/translator/index.js +791 -650
- package/dist/translator/util/binding-has-prop.d.ts +2 -0
- package/dist/translator/util/entry-builder.d.ts +2 -0
- package/dist/translator/util/generate-uid.d.ts +5 -0
- package/dist/translator/util/references.d.ts +3 -2
- package/dist/translator/util/runtime.d.ts +3 -3
- package/dist/translator/util/sections.d.ts +8 -2
- package/dist/translator/util/serialize-reasons.d.ts +2 -2
- package/dist/translator/util/setup-work.d.ts +5 -0
- package/dist/translator/util/signals.d.ts +5 -7
- package/dist/translator/visitors/tag/native-tag.d.ts +1 -0
- package/package.json +3 -3
- package/dist/translator/util/setup-statements.d.ts +0 -5
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-BRO5aArp.js");
|
|
4
4
|
//#region src/common/attr-tag.ts
|
|
5
5
|
const empty = [];
|
|
6
6
|
const rest = Symbol("Attribute Tag");
|
|
@@ -108,13 +108,14 @@ const compat = {
|
|
|
108
108
|
const normalizedInput = args[0] = {};
|
|
109
109
|
for (const key in input) normalizedInput[key === "renderBody" ? "content" : key] = input[key];
|
|
110
110
|
}
|
|
111
|
-
|
|
111
|
+
const renderBranch = () => {
|
|
112
112
|
if (!branch) {
|
|
113
113
|
created = 1;
|
|
114
114
|
branch = component.scope = require_control_flow.createAndSetupBranch(out.global, renderer, renderer[require_control_flow.Owner], document.body);
|
|
115
115
|
}
|
|
116
116
|
renderer[require_control_flow.Params]?.(branch, renderer._ ? args[0] : args);
|
|
117
|
-
}
|
|
117
|
+
};
|
|
118
|
+
component.effects = require_control_flow.rendering ? renderBranch() : require_control_flow.prepareEffects(renderBranch);
|
|
118
119
|
if (created) return require_control_flow.toInsertNode(branch[require_control_flow.StartNode], branch[require_control_flow.EndNode]);
|
|
119
120
|
}
|
|
120
121
|
};
|
|
@@ -158,7 +159,6 @@ function mount(input = {}, reference, position) {
|
|
|
158
159
|
case "afterend":
|
|
159
160
|
parentNode = reference.parentNode;
|
|
160
161
|
nextSibling = reference.nextSibling;
|
|
161
|
-
break;
|
|
162
162
|
}
|
|
163
163
|
let curValue;
|
|
164
164
|
const args = this[require_control_flow.Params];
|
|
@@ -195,7 +195,7 @@ function mount(input = {}, reference, position) {
|
|
|
195
195
|
//#endregion
|
|
196
196
|
//#region src/dom/load.ts
|
|
197
197
|
const noop = (_) => 0;
|
|
198
|
-
|
|
198
|
+
function _load_template(id, load) {
|
|
199
199
|
let pending;
|
|
200
200
|
const lazyTemplate = _template(id, 0, 0, (branch) => {
|
|
201
201
|
const awaitCounter = require_control_flow.addAwaitCounter(branch);
|
|
@@ -206,8 +206,8 @@ const _load_template = /*@__PURE__*/ require_control_flow.withLazy((id, load) =>
|
|
|
206
206
|
}, loadFailed(branch, awaitCounter));
|
|
207
207
|
}, _load_signal(() => (pending ||= load()).then((r) => ({ _: r["params"] || noop }))));
|
|
208
208
|
return lazyTemplate;
|
|
209
|
-
}
|
|
210
|
-
|
|
209
|
+
}
|
|
210
|
+
function _load_setup(load) {
|
|
211
211
|
let pending;
|
|
212
212
|
let renderer;
|
|
213
213
|
const insertCached = (child, marker) => insertLoaded(renderer, child, marker);
|
|
@@ -222,7 +222,7 @@ const _load_setup = /*@__PURE__*/ require_control_flow.withLazy((load) => {
|
|
|
222
222
|
}, loadFailed(child, awaitCounter));
|
|
223
223
|
}
|
|
224
224
|
};
|
|
225
|
-
}
|
|
225
|
+
}
|
|
226
226
|
function insertLoaded(renderer, branch, marker, awaitCounter) {
|
|
227
227
|
const parent = marker.parentNode, values = branch[require_control_flow.Load], clone = () => {
|
|
228
228
|
require_control_flow.syncGen(branch);
|
|
@@ -250,12 +250,14 @@ function insertLoaded(renderer, branch, marker, awaitCounter) {
|
|
|
250
250
|
}
|
|
251
251
|
function loadFailed(scope, awaitCounter) {
|
|
252
252
|
return (error) => {
|
|
253
|
-
if (awaitCounter)
|
|
254
|
-
|
|
253
|
+
if (awaitCounter) {
|
|
254
|
+
if (awaitCounter.m) awaitCounter.i = 0;
|
|
255
|
+
else if (awaitCounter.i) awaitCounter.c();
|
|
256
|
+
}
|
|
255
257
|
require_control_flow.queueAsyncRender(scope, require_control_flow.renderCatch, error);
|
|
256
258
|
};
|
|
257
259
|
}
|
|
258
|
-
|
|
260
|
+
function _load_signal(load) {
|
|
259
261
|
let pending;
|
|
260
262
|
const apply = (scope, value) => {
|
|
261
263
|
pending ||= load();
|
|
@@ -264,7 +266,7 @@ const _load_signal = /*@__PURE__*/ require_control_flow.withLazy((load) => {
|
|
|
264
266
|
else pending.then((mod) => require_control_flow.queueAsyncRender(scope, apply._ = mod._, value), noop);
|
|
265
267
|
};
|
|
266
268
|
return apply;
|
|
267
|
-
}
|
|
269
|
+
}
|
|
268
270
|
function _load_visible_trigger(selector, options) {
|
|
269
271
|
let pending;
|
|
270
272
|
let el;
|
package/dist/debug/dom.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as _attrs, $t as syncGen, A as _attr_input_value, An as EndNode, At as _closure, B as _controllable_select, Bn as TagVariable, Bt as _if_closure, C as _attr_details_or_dialog_open_script, Cn as Owner, 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 _for_selector, G as _attr_class, Gt as _return_change, Ht as _let_change, I as _attr_select_value_default, It as _global_read, J as _attr_content, Jt as _var_change, K as _attr_class_item, Kt as _script, L as _attr_select_value_script, Lt as _hoist, M as _attr_input_value_default, Mn as Global, Mt as _const, N as _attr_input_value_dynamic_default, Nn as Load, Nt as _el_read, O as _attr_input_checked_default, P as _attr_input_value_script, Pt as _for_closure, Q as _attr_style_items, Qt as removeAndDestroyBranch, R as _controllable_input, Rt as _hoist_resume, S as _attr_details_or_dialog_open_default, Sn as Clone, St as _var_resume, T as _attr_input_checkedValue, Tn as Setup, Tt as initEmbedded, Ut as _or, V as _controllable_textarea, Vt as _let, W as _attr, Wt as _return, X as _attr_style, Xt as destroyBranch, Y as _attr_nonce, Yt as _assert_init, Z as _attr_style_item, Zt as insertBranchBefore, _n as forUntil, _t as createBranch, a as _for_in, at as _lifecycle, bn as _call, bt as _el, c as _for_to, cn as queueEffect, ct as _text, d as _for_until_unkeyed, dn as run, dt as insertChildNodes, et as _attrs_content, f as _if, fn as runEffects, ft as toInsertNode, gn as forTo, gt as createAndSetupBranch, h as addAwaitCounter, hn as forOf, ht as _content_resume, i as _dynamic_tag_content, in as $signalReset, it as _html, j as _attr_input_value_attribute_default, jt as _closure_get, k as _attr_input_checked_script, kt as _child_setup, l as _for_to_unkeyed, ln as queueRender, lt as _text_content, m as _try, mn as forIn, mt as _content_closures, n as _await_promise, nn as _on, 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, q as _attr_class_items, qt as _var, r as _dynamic_tag, rn as $signal, rt as _attrs_script, s as _for_of_unkeyed, sn as queueAsyncRender, st as _style_shell, t as _await_content, tt as _attrs_partial, u as _for_until, un as rendering, ut as _to_text, v as patchDynamicTag, vn as _assert_hoist, vt as setupBranch, w as _attr_input_checked, wn as Params, wt as init, x as _attr_details_or_dialog_open, xt as _resumed, y as renderCatch, yn as _hoist_read_error, yt as _dynamic_tag_var_resume, z as _controllable_open, zn as StartNode, zt as _id } from "./dom-Btj2QJhk.mjs";
|
|
2
2
|
//#region src/common/attr-tag.ts
|
|
3
3
|
const empty = [];
|
|
4
4
|
const rest = Symbol("Attribute Tag");
|
|
@@ -106,13 +106,14 @@ const compat = {
|
|
|
106
106
|
const normalizedInput = args[0] = {};
|
|
107
107
|
for (const key in input) normalizedInput[key === "renderBody" ? "content" : key] = input[key];
|
|
108
108
|
}
|
|
109
|
-
|
|
109
|
+
const renderBranch = () => {
|
|
110
110
|
if (!branch) {
|
|
111
111
|
created = 1;
|
|
112
112
|
branch = component.scope = createAndSetupBranch(out.global, renderer, renderer[Owner], document.body);
|
|
113
113
|
}
|
|
114
114
|
renderer[Params]?.(branch, renderer._ ? args[0] : args);
|
|
115
|
-
}
|
|
115
|
+
};
|
|
116
|
+
component.effects = rendering ? renderBranch() : prepareEffects(renderBranch);
|
|
116
117
|
if (created) return toInsertNode(branch[StartNode], branch[EndNode]);
|
|
117
118
|
}
|
|
118
119
|
};
|
|
@@ -156,7 +157,6 @@ function mount(input = {}, reference, position) {
|
|
|
156
157
|
case "afterend":
|
|
157
158
|
parentNode = reference.parentNode;
|
|
158
159
|
nextSibling = reference.nextSibling;
|
|
159
|
-
break;
|
|
160
160
|
}
|
|
161
161
|
let curValue;
|
|
162
162
|
const args = this[Params];
|
|
@@ -193,7 +193,7 @@ function mount(input = {}, reference, position) {
|
|
|
193
193
|
//#endregion
|
|
194
194
|
//#region src/dom/load.ts
|
|
195
195
|
const noop = (_) => 0;
|
|
196
|
-
|
|
196
|
+
function _load_template(id, load) {
|
|
197
197
|
let pending;
|
|
198
198
|
const lazyTemplate = _template(id, 0, 0, (branch) => {
|
|
199
199
|
const awaitCounter = addAwaitCounter(branch);
|
|
@@ -204,8 +204,8 @@ const _load_template = /*@__PURE__*/ withLazy((id, load) => {
|
|
|
204
204
|
}, loadFailed(branch, awaitCounter));
|
|
205
205
|
}, _load_signal(() => (pending ||= load()).then((r) => ({ _: r["params"] || noop }))));
|
|
206
206
|
return lazyTemplate;
|
|
207
|
-
}
|
|
208
|
-
|
|
207
|
+
}
|
|
208
|
+
function _load_setup(load) {
|
|
209
209
|
let pending;
|
|
210
210
|
let renderer;
|
|
211
211
|
const insertCached = (child, marker) => insertLoaded(renderer, child, marker);
|
|
@@ -220,7 +220,7 @@ const _load_setup = /*@__PURE__*/ withLazy((load) => {
|
|
|
220
220
|
}, loadFailed(child, awaitCounter));
|
|
221
221
|
}
|
|
222
222
|
};
|
|
223
|
-
}
|
|
223
|
+
}
|
|
224
224
|
function insertLoaded(renderer, branch, marker, awaitCounter) {
|
|
225
225
|
const parent = marker.parentNode, values = branch[Load], clone = () => {
|
|
226
226
|
syncGen(branch);
|
|
@@ -248,12 +248,14 @@ function insertLoaded(renderer, branch, marker, awaitCounter) {
|
|
|
248
248
|
}
|
|
249
249
|
function loadFailed(scope, awaitCounter) {
|
|
250
250
|
return (error) => {
|
|
251
|
-
if (awaitCounter)
|
|
252
|
-
|
|
251
|
+
if (awaitCounter) {
|
|
252
|
+
if (awaitCounter.m) awaitCounter.i = 0;
|
|
253
|
+
else if (awaitCounter.i) awaitCounter.c();
|
|
254
|
+
}
|
|
253
255
|
queueAsyncRender(scope, renderCatch, error);
|
|
254
256
|
};
|
|
255
257
|
}
|
|
256
|
-
|
|
258
|
+
function _load_signal(load) {
|
|
257
259
|
let pending;
|
|
258
260
|
const apply = (scope, value) => {
|
|
259
261
|
pending ||= load();
|
|
@@ -262,7 +264,7 @@ const _load_signal = /*@__PURE__*/ withLazy((load) => {
|
|
|
262
264
|
else pending.then((mod) => queueAsyncRender(scope, apply._ = mod._, value), noop);
|
|
263
265
|
};
|
|
264
266
|
return apply;
|
|
265
|
-
}
|
|
267
|
+
}
|
|
266
268
|
function _load_visible_trigger(selector, options) {
|
|
267
269
|
let pending;
|
|
268
270
|
let el;
|