marko 6.4.16 → 6.5.1
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-DlBA4dCe.mjs → dom-4AzxJQHb.mjs} +16 -16
- package/dist/debug/{dom-BLoTKI2r.js → dom-Uu_OCdvg.js} +21 -21
- 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 +8 -8
- 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-BdJeggv5.js} +14 -14
- package/dist/{dom-Cqajrs_w.mjs → dom-DJrZXgdr.mjs} +13 -13
- 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/if.d.ts +1 -1
- package/dist/translator/core/show.d.ts +3 -4
- package/dist/translator/index.js +3880 -3971
- package/dist/translator/util/assert.d.ts +0 -8
- package/dist/translator/util/bindings.d.ts +15 -8
- package/dist/translator/util/branch-tag.d.ts +1 -1
- 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/get-root.d.ts +3 -1
- package/dist/translator/util/module-registrations.d.ts +1 -0
- package/dist/translator/util/nested-attribute-tags.d.ts +4 -5
- package/dist/translator/util/optional.d.ts +7 -6
- package/dist/translator/util/params-tree.d.ts +1 -1
- 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 +8 -2
- 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/state.d.ts +2 -2
- package/dist/translator/util/structure.d.ts +1 -0
- package/dist/translator/util/to-property-name.d.ts +0 -2
- package/dist/translator/util/visitors.d.ts +2 -2
- package/dist/translator/util/writer.d.ts +2 -2
- package/dist/translator/visitors/tag/native-tag.d.ts +2 -0
- package/index.d.ts +11 -0
- package/package.json +4 -4
|
@@ -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-BdJeggv5.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-DJrZXgdr.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-BdJeggv5.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-DJrZXgdr.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;
|
|
@@ -16,10 +16,10 @@ export declare let bindTagVar: undefined | ((scope: Scope, branch: BranchScope,
|
|
|
16
16
|
export declare function installDynamicTagVar(bind: NonNullable<typeof bindTagVar>): void;
|
|
17
17
|
export declare function dynamicTagScript(branch: Scope): void;
|
|
18
18
|
export declare function setBranch<T>(scope: Scope, nodeAccessor: Accessor, newRenderer: T, createBranch: ($global: Scope[typeof AccessorProp.Global], renderer: NonNullable<T>, parentScope: Scope, parentNode: ParentNode) => BranchScope): void;
|
|
19
|
-
export declare const _for_of: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?:
|
|
20
|
-
export declare const _for_in: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?:
|
|
21
|
-
export declare const _for_to: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?:
|
|
22
|
-
export declare const _for_until: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?:
|
|
23
|
-
export declare const _for_of_unkeyed: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?:
|
|
24
|
-
export declare const _for_to_unkeyed: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?:
|
|
25
|
-
export declare const _for_until_unkeyed: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?:
|
|
19
|
+
export declare const _for_of: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?: (scope: Scope, a: unknown, b: unknown) => void) => (scope: Scope, value: [all: unknown[], by?: ((item: unknown, index: number) => unknown) | undefined]) => void;
|
|
20
|
+
export declare const _for_in: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?: (scope: Scope, a: unknown, b: unknown) => void) => (scope: Scope, value: [obj: {}, by?: ((key: string, v: unknown) => unknown) | undefined]) => void;
|
|
21
|
+
export declare const _for_to: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?: (scope: Scope, a: unknown, b: unknown) => void) => (scope: Scope, value: [to: number, from?: number | undefined, step?: number | undefined, by?: ((v: number) => unknown) | undefined]) => void;
|
|
22
|
+
export declare const _for_until: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?: (scope: Scope, a: unknown, b: unknown) => void) => (scope: Scope, value: [until: number, from?: number | undefined, step?: number | undefined, by?: ((v: number) => unknown) | undefined]) => void;
|
|
23
|
+
export declare const _for_of_unkeyed: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?: (scope: Scope, a: unknown, b: unknown) => void) => (scope: Scope, value: [all: unknown[]]) => void;
|
|
24
|
+
export declare const _for_to_unkeyed: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?: (scope: Scope, a: unknown, b: unknown) => void) => (scope: Scope, value: [to: number, from?: number | undefined, step?: number | undefined]) => void;
|
|
25
|
+
export declare const _for_until_unkeyed: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?: (scope: Scope, a: unknown, b: unknown) => void) => (scope: Scope, value: [until: number, from?: number | undefined, step?: number | undefined]) => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-BdJeggv5.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;
|
|
@@ -1,2 +1,2 @@
|
|
|
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-DJrZXgdr.mjs";
|
|
2
2
|
controllableScripts[0] = _attr_input_checked_script, controllableScripts[1] = _attr_input_checkedValue_script, controllableScripts[2] = _attr_input_value_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-DJrZXgdr.mjs";
|
|
2
2
|
// src/dom/controllable-open.feat.ts
|
|
3
3
|
controllableScripts[4] = _attr_details_or_dialog_open_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-DJrZXgdr.mjs";
|
|
2
2
|
// src/dom/controllable-select.feat.ts
|
|
3
3
|
controllableScripts[3] = _attr_select_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-DJrZXgdr.mjs";
|
|
2
2
|
// src/dom/controllable-textarea.feat.ts
|
|
3
3
|
controllableScripts[2] = _attr_input_value_script;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-BdJeggv5.js");
|
|
3
3
|
require("./controllable-input.feat.js"), require("./controllable-open.feat.js"), require("./controllable-select.feat.js"), require_control_flow.H.INPUT = require_control_flow.L, require_control_flow.H.TEXTAREA = require_control_flow.B, require_control_flow.H.SELECT = require_control_flow.z, require_control_flow.H.DETAILS = require_control_flow.H.DIALOG = require_control_flow.R;
|
|
@@ -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-DJrZXgdr.mjs";
|
|
2
2
|
import "./controllable-input.feat.mjs";
|
|
3
3
|
import "./controllable-open.feat.mjs";
|
|
4
4
|
import "./controllable-select.feat.mjs";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { h as dynamicTagScript, xn as withBranches, yt as _resumed } from "../dom-
|
|
1
|
+
import { h as dynamicTagScript, xn as withBranches, yt as _resumed } from "../dom-DJrZXgdr.mjs";
|
|
2
2
|
// src/dom/dynamic-tag-script.feat.ts
|
|
3
3
|
_resumed._d = withBranches(dynamicTagScript);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-BdJeggv5.js");
|
|
3
3
|
require_control_flow.nn(), require_control_flow.g((scope, branch, scopeKey, renderer) => {
|
|
4
4
|
branch.BR = require_control_flow.tn(scope, scopeKey), typeof renderer == "string" && branch.T((_) => branch.S);
|
|
5
5
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as installDynamicTagVar, nn as installBranchRenders, tn as createBranchRenders } from "../dom-
|
|
1
|
+
import { g as installDynamicTagVar, nn as installBranchRenders, tn as createBranchRenders } from "../dom-DJrZXgdr.mjs";
|
|
2
2
|
installBranchRenders(), installDynamicTagVar((scope, branch, scopeKey, renderer) => {
|
|
3
3
|
branch.BR = createBranchRenders(scope, scopeKey), typeof renderer == "string" && branch.T((_) => branch.S);
|
|
4
4
|
});
|
package/dist/dom/lazy.feat.js
CHANGED
package/dist/dom/lazy.feat.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-BdJeggv5.js");
|
|
3
3
|
// src/dom/placeholder.feat.ts
|
|
4
4
|
require_control_flow.yt._f = (tryBranch) => {
|
|
5
5
|
tryBranch.P &&= (require_control_flow.qt(tryBranch.P), 0);
|
|
@@ -80,9 +80,9 @@ let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "
|
|
|
80
80
|
let referenceNode = scope[nodeAccessor], oldScopes = toArray(scope[scopesAccessor]), newScopes = [];
|
|
81
81
|
scope[keyedScopesAccessor] = null;
|
|
82
82
|
let oldLen = oldScopes.length, parentNode = referenceNode.nodeType > 1 ? referenceNode.parentNode || oldScopes[0]?.S.parentNode : referenceNode, oldScopesByKey, hasPotentialMoves, start = 0;
|
|
83
|
-
forEach(value, (key,
|
|
83
|
+
forEach(value, (key, a, b) => {
|
|
84
84
|
let i = newScopes.length, oldScope = oldScopes[i], branch = oldLen && (oldScopesByKey || key !== (oldScope?.M ?? i) ? (oldScopesByKey ||= oldScopes.reduce((map, scope, j) => j < i ? map : (scope.I = j, map.set(scope.M ?? j, scope)), /* @__PURE__ */ new Map())).get(key) : oldScope && (start++, oldScope));
|
|
85
|
-
branch ? (hasPotentialMoves = 1, oldScopesByKey?.delete(key), branch.M = key) : ((branch = createBranch(scope.$, renderer, scope, parentNode)).M = key, setupBranch(renderer, branch)), newScopes.push(branch), params?.(branch,
|
|
85
|
+
branch ? (hasPotentialMoves = 1, oldScopesByKey?.delete(key), branch.M = key) : ((branch = createBranch(scope.$, renderer, scope, parentNode)).M = key, setupBranch(renderer, branch)), newScopes.push(branch), params?.(branch, a, b);
|
|
86
86
|
}), scope[scopesAccessor] = newScopes;
|
|
87
87
|
let newLen = newScopes.length, hasSiblings = referenceNode !== parentNode, afterReference = null, oldEnd = oldLen - 1, newEnd = newLen - 1;
|
|
88
88
|
if (hasSiblings && (oldLen ? (afterReference = oldScopes[oldEnd].K.nextSibling, newLen || parentNode.insertBefore(referenceNode, afterReference)) : newLen && (afterReference = referenceNode.nextSibling, referenceNode.remove())), !hasPotentialMoves) {
|
|
@@ -97,14 +97,14 @@ let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "
|
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
99
|
}), _for_of = /*@__PURE__*/ loop(([all, by], cb) => {
|
|
100
|
-
by ||= bySecondArg, typeof by == "string" ? forOf(all, (item, i) => cb(item[by],
|
|
100
|
+
by ||= bySecondArg, typeof by == "string" ? forOf(all, (item, i) => cb(item[by], item, i)) : forOf(all, (item, i) => cb(by(item, i), item, i));
|
|
101
101
|
}, reorderKeyed), _for_in = /*@__PURE__*/ loop(([obj, by], cb) => {
|
|
102
|
-
by ||= byFirstArg, forIn(obj, (key, value) => cb(by(key, value),
|
|
102
|
+
by ||= byFirstArg, forIn(obj, (key, value) => cb(by(key, value), key, value));
|
|
103
103
|
}, reorderKeyed), _for_to = /*@__PURE__*/ loop(([to, from, step, by], cb) => {
|
|
104
|
-
by ||= byFirstArg, forTo(to, from, step, (v) => cb(by(v),
|
|
104
|
+
by ||= byFirstArg, forTo(to, from, step, (v) => cb(by(v), v));
|
|
105
105
|
}, reorderKeyed), _for_until = /*@__PURE__*/ loop(([until, from, step, by], cb) => {
|
|
106
|
-
by ||= byFirstArg, forUntil(until, from, step, (v) => cb(by(v),
|
|
107
|
-
}, reorderKeyed), _for_of_unkeyed = /*@__PURE__*/ loop(([all], cb) => forOf(all, (item, i) => cb(i,
|
|
106
|
+
by ||= byFirstArg, forUntil(until, from, step, (v) => cb(by(v), v));
|
|
107
|
+
}, reorderKeyed), _for_of_unkeyed = /*@__PURE__*/ loop(([all], cb) => forOf(all, (item, i) => cb(i, item, i))), _for_to_unkeyed = /*@__PURE__*/ loop(([to, from, step], cb) => forTo(to, from, step, (v) => cb(v, v))), _for_until_unkeyed = /*@__PURE__*/ loop(([until, from, step], cb) => forUntil(until, from, step, (v) => cb(v, v)));
|
|
108
108
|
// src/common/helpers.ts
|
|
109
109
|
function _call(fn, v) {
|
|
110
110
|
return fn(v), v;
|
|
@@ -1027,7 +1027,7 @@ function _await_promise(nodeAccessor, params) {
|
|
|
1027
1027
|
nodeAccessor = decodeAccessor(nodeAccessor);
|
|
1028
1028
|
let promiseAccessor = "L" + nodeAccessor, branchAccessor = "A" + nodeAccessor, tryAccessor = "Q" + nodeAccessor, resolveAwait = (scope, referenceNode, value) => {
|
|
1029
1029
|
let awaitBranch = scope[branchAccessor];
|
|
1030
|
-
return awaitBranch.V && (awaitBranch.Y = awaitBranch.Y?.forEach(syncGen), setupBranch(awaitBranch.V, awaitBranch), awaitBranch.V = 0, insertBranchBefore(awaitBranch, scope[nodeAccessor].parentNode, scope[nodeAccessor]), referenceNode.remove()), params?.(awaitBranch,
|
|
1030
|
+
return awaitBranch.V && (awaitBranch.Y = awaitBranch.Y?.forEach(syncGen), setupBranch(awaitBranch.V, awaitBranch), awaitBranch.V = 0, insertBranchBefore(awaitBranch, scope[nodeAccessor].parentNode, scope[nodeAccessor]), referenceNode.remove()), params?.(awaitBranch, value), awaitBranch;
|
|
1031
1031
|
}, awaitPromise = (scope, promise) => {
|
|
1032
1032
|
isPromise(scope[promiseAccessor]) || (scope[promiseAccessor] = 0);
|
|
1033
1033
|
let awaitBranch = scope[branchAccessor], tryBranch = scope[tryAccessor] || isPromise(promise) && findTryWithPlaceholder(scope) || awaitBranch;
|
|
@@ -1110,13 +1110,13 @@ function createAwaitCounter(tryBranch, done) {
|
|
|
1110
1110
|
i: 0,
|
|
1111
1111
|
c() {
|
|
1112
1112
|
if (--awaitCounter.i) return 1;
|
|
1113
|
-
done(),
|
|
1113
|
+
done(), queuePendingEffects(tryBranch);
|
|
1114
1114
|
}
|
|
1115
1115
|
};
|
|
1116
1116
|
return awaitCounter;
|
|
1117
1117
|
}
|
|
1118
|
-
function
|
|
1119
|
-
tryBranch.JS?.forEach((scope) => scope.J.forEach((fn) =>
|
|
1118
|
+
function queuePendingEffects(tryBranch) {
|
|
1119
|
+
tryBranch.JS?.forEach((scope) => scope.J.forEach((fn) => queueEffect(scope, fn), scope.J = null), tryBranch.JS = null);
|
|
1120
1120
|
}
|
|
1121
1121
|
function dismissPlaceholder(tryBranch) {
|
|
1122
1122
|
let placeholderBranch = tryBranch.P;
|
|
@@ -1138,7 +1138,7 @@ function renderCatch(scope, error) {
|
|
|
1138
1138
|
placeholderBranch && (tryWithCatch.O && (tryWithCatch.O.i = 0), owner["A" + tryWithCatch.C] = placeholderBranch, destroyBranch(tryWithCatch));
|
|
1139
1139
|
let catchContent = tryWithCatch.E();
|
|
1140
1140
|
setBranch(owner, tryWithCatch.C, catchContent, createBranch), queueRender(owner["A" + tryWithCatch.C], (branch) => {
|
|
1141
|
-
setupBranch(catchContent, branch), catchContent.d?.(branch,
|
|
1141
|
+
setupBranch(catchContent, branch), catchContent.d?.(branch, error);
|
|
1142
1142
|
}, -1);
|
|
1143
1143
|
} else throw error;
|
|
1144
1144
|
}
|
|
@@ -1457,7 +1457,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1457
1457
|
}), Object.defineProperty(exports, "_", {
|
|
1458
1458
|
enumerable: !0,
|
|
1459
1459
|
get: function() {
|
|
1460
|
-
return
|
|
1460
|
+
return queuePendingEffects;
|
|
1461
1461
|
}
|
|
1462
1462
|
}), Object.defineProperty(exports, "_n", {
|
|
1463
1463
|
enumerable: !0,
|
|
@@ -1767,7 +1767,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1767
1767
|
}), Object.defineProperty(exports, "v", {
|
|
1768
1768
|
enumerable: !0,
|
|
1769
1769
|
get: function() {
|
|
1770
|
-
return
|
|
1770
|
+
return renderCatch;
|
|
1771
1771
|
}
|
|
1772
1772
|
}), Object.defineProperty(exports, "vn", {
|
|
1773
1773
|
enumerable: !0,
|
|
@@ -79,9 +79,9 @@ let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "
|
|
|
79
79
|
let referenceNode = scope[nodeAccessor], oldScopes = toArray(scope[scopesAccessor]), newScopes = [];
|
|
80
80
|
scope[keyedScopesAccessor] = null;
|
|
81
81
|
let oldLen = oldScopes.length, parentNode = referenceNode.nodeType > 1 ? referenceNode.parentNode || oldScopes[0]?.S.parentNode : referenceNode, oldScopesByKey, hasPotentialMoves, start = 0;
|
|
82
|
-
forEach(value, (key,
|
|
82
|
+
forEach(value, (key, a, b) => {
|
|
83
83
|
let i = newScopes.length, oldScope = oldScopes[i], branch = oldLen && (oldScopesByKey || key !== (oldScope?.M ?? i) ? (oldScopesByKey ||= oldScopes.reduce((map, scope, j) => j < i ? map : (scope.I = j, map.set(scope.M ?? j, scope)), /* @__PURE__ */ new Map())).get(key) : oldScope && (start++, oldScope));
|
|
84
|
-
branch ? (hasPotentialMoves = 1, oldScopesByKey?.delete(key), branch.M = key) : ((branch = createBranch(scope.$, renderer, scope, parentNode)).M = key, setupBranch(renderer, branch)), newScopes.push(branch), params?.(branch,
|
|
84
|
+
branch ? (hasPotentialMoves = 1, oldScopesByKey?.delete(key), branch.M = key) : ((branch = createBranch(scope.$, renderer, scope, parentNode)).M = key, setupBranch(renderer, branch)), newScopes.push(branch), params?.(branch, a, b);
|
|
85
85
|
}), scope[scopesAccessor] = newScopes;
|
|
86
86
|
let newLen = newScopes.length, hasSiblings = referenceNode !== parentNode, afterReference = null, oldEnd = oldLen - 1, newEnd = newLen - 1;
|
|
87
87
|
if (hasSiblings && (oldLen ? (afterReference = oldScopes[oldEnd].K.nextSibling, newLen || parentNode.insertBefore(referenceNode, afterReference)) : newLen && (afterReference = referenceNode.nextSibling, referenceNode.remove())), !hasPotentialMoves) {
|
|
@@ -96,14 +96,14 @@ let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "
|
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
}), _for_of = /*@__PURE__*/ loop(([all, by], cb) => {
|
|
99
|
-
by ||= bySecondArg, typeof by == "string" ? forOf(all, (item, i) => cb(item[by],
|
|
99
|
+
by ||= bySecondArg, typeof by == "string" ? forOf(all, (item, i) => cb(item[by], item, i)) : forOf(all, (item, i) => cb(by(item, i), item, i));
|
|
100
100
|
}, reorderKeyed), _for_in = /*@__PURE__*/ loop(([obj, by], cb) => {
|
|
101
|
-
by ||= byFirstArg, forIn(obj, (key, value) => cb(by(key, value),
|
|
101
|
+
by ||= byFirstArg, forIn(obj, (key, value) => cb(by(key, value), key, value));
|
|
102
102
|
}, reorderKeyed), _for_to = /*@__PURE__*/ loop(([to, from, step, by], cb) => {
|
|
103
|
-
by ||= byFirstArg, forTo(to, from, step, (v) => cb(by(v),
|
|
103
|
+
by ||= byFirstArg, forTo(to, from, step, (v) => cb(by(v), v));
|
|
104
104
|
}, reorderKeyed), _for_until = /*@__PURE__*/ loop(([until, from, step, by], cb) => {
|
|
105
|
-
by ||= byFirstArg, forUntil(until, from, step, (v) => cb(by(v),
|
|
106
|
-
}, reorderKeyed), _for_of_unkeyed = /*@__PURE__*/ loop(([all], cb) => forOf(all, (item, i) => cb(i,
|
|
105
|
+
by ||= byFirstArg, forUntil(until, from, step, (v) => cb(by(v), v));
|
|
106
|
+
}, reorderKeyed), _for_of_unkeyed = /*@__PURE__*/ loop(([all], cb) => forOf(all, (item, i) => cb(i, item, i))), _for_to_unkeyed = /*@__PURE__*/ loop(([to, from, step], cb) => forTo(to, from, step, (v) => cb(v, v))), _for_until_unkeyed = /*@__PURE__*/ loop(([until, from, step], cb) => forUntil(until, from, step, (v) => cb(v, v)));
|
|
107
107
|
// src/common/helpers.ts
|
|
108
108
|
function _call(fn, v) {
|
|
109
109
|
return fn(v), v;
|
|
@@ -1026,7 +1026,7 @@ function _await_promise(nodeAccessor, params) {
|
|
|
1026
1026
|
nodeAccessor = decodeAccessor(nodeAccessor);
|
|
1027
1027
|
let promiseAccessor = "L" + nodeAccessor, branchAccessor = "A" + nodeAccessor, tryAccessor = "Q" + nodeAccessor, resolveAwait = (scope, referenceNode, value) => {
|
|
1028
1028
|
let awaitBranch = scope[branchAccessor];
|
|
1029
|
-
return awaitBranch.V && (awaitBranch.Y = awaitBranch.Y?.forEach(syncGen), setupBranch(awaitBranch.V, awaitBranch), awaitBranch.V = 0, insertBranchBefore(awaitBranch, scope[nodeAccessor].parentNode, scope[nodeAccessor]), referenceNode.remove()), params?.(awaitBranch,
|
|
1029
|
+
return awaitBranch.V && (awaitBranch.Y = awaitBranch.Y?.forEach(syncGen), setupBranch(awaitBranch.V, awaitBranch), awaitBranch.V = 0, insertBranchBefore(awaitBranch, scope[nodeAccessor].parentNode, scope[nodeAccessor]), referenceNode.remove()), params?.(awaitBranch, value), awaitBranch;
|
|
1030
1030
|
}, awaitPromise = (scope, promise) => {
|
|
1031
1031
|
isPromise(scope[promiseAccessor]) || (scope[promiseAccessor] = 0);
|
|
1032
1032
|
let awaitBranch = scope[branchAccessor], tryBranch = scope[tryAccessor] || isPromise(promise) && findTryWithPlaceholder(scope) || awaitBranch;
|
|
@@ -1109,13 +1109,13 @@ function createAwaitCounter(tryBranch, done) {
|
|
|
1109
1109
|
i: 0,
|
|
1110
1110
|
c() {
|
|
1111
1111
|
if (--awaitCounter.i) return 1;
|
|
1112
|
-
done(),
|
|
1112
|
+
done(), queuePendingEffects(tryBranch);
|
|
1113
1113
|
}
|
|
1114
1114
|
};
|
|
1115
1115
|
return awaitCounter;
|
|
1116
1116
|
}
|
|
1117
|
-
function
|
|
1118
|
-
tryBranch.JS?.forEach((scope) => scope.J.forEach((fn) =>
|
|
1117
|
+
function queuePendingEffects(tryBranch) {
|
|
1118
|
+
tryBranch.JS?.forEach((scope) => scope.J.forEach((fn) => queueEffect(scope, fn), scope.J = null), tryBranch.JS = null);
|
|
1119
1119
|
}
|
|
1120
1120
|
function dismissPlaceholder(tryBranch) {
|
|
1121
1121
|
let placeholderBranch = tryBranch.P;
|
|
@@ -1137,7 +1137,7 @@ function renderCatch(scope, error) {
|
|
|
1137
1137
|
placeholderBranch && (tryWithCatch.O && (tryWithCatch.O.i = 0), owner["A" + tryWithCatch.C] = placeholderBranch, destroyBranch(tryWithCatch));
|
|
1138
1138
|
let catchContent = tryWithCatch.E();
|
|
1139
1139
|
setBranch(owner, tryWithCatch.C, catchContent, createBranch), queueRender(owner["A" + tryWithCatch.C], (branch) => {
|
|
1140
|
-
setupBranch(catchContent, branch), catchContent.d?.(branch,
|
|
1140
|
+
setupBranch(catchContent, branch), catchContent.d?.(branch, error);
|
|
1141
1141
|
}, -1);
|
|
1142
1142
|
} else throw error;
|
|
1143
1143
|
}
|
|
@@ -1183,4 +1183,4 @@ function bySecondArg(_item, index) {
|
|
|
1183
1183
|
function byFirstArg(name) {
|
|
1184
1184
|
return name;
|
|
1185
1185
|
}
|
|
1186
|
-
export { _attrs as $, $signalReset as $t, _attr_input_value_attribute_default as A, _el_read as At, _controllable_textarea as B, _or as Bt, _attr_input_checked as C, initEmbedded as Ct, _attr_input_checked_default as D, _closure as Dt, _attr_input_checkedValue_script as E, withLazy as Et, _attr_select_value_default as F, _hoist_resume as Ft, _attr_class_item as G, _var_change as Gt, controllableSpreadHelpers as H, _return_change as Ht, _attr_select_value_script as I, _id as It, _attr_content as J, insertBranchBefore as Jt, _attr_class_items as K, _assert_init as Kt, _controllable_input as L, _if_closure as Lt, _attr_input_value_dynamic_default as M, _for_selector as Mt, _attr_input_value_script as N, _global_read as Nt, _attr_input_checked_script as O, _closure_get as Ot, _attr_select_value as P, _hoist as Pt, _attr_style_items as Q, $signal as Qt, _controllable_open as R, _let as Rt, _attr_details_or_dialog_open_script as S, init as St, _attr_input_checkedValue_default as T, readyFailed as Tt, _attr as U, _script as Ut, controllableScripts as V, _return as Vt, _attr_class as W, _var as Wt, _attr_style as X, syncGen as Xt, _attr_nonce as Y, removeAndDestroyBranch as Yt, _attr_style_item as Z, _on as Zt,
|
|
1186
|
+
export { _attrs as $, $signalReset as $t, _attr_input_value_attribute_default as A, _el_read as At, _controllable_textarea as B, _or as Bt, _attr_input_checked as C, initEmbedded as Ct, _attr_input_checked_default as D, _closure as Dt, _attr_input_checkedValue_script as E, withLazy as Et, _attr_select_value_default as F, _hoist_resume as Ft, _attr_class_item as G, _var_change as Gt, controllableSpreadHelpers as H, _return_change as Ht, _attr_select_value_script as I, _id as It, _attr_content as J, insertBranchBefore as Jt, _attr_class_items as K, _assert_init as Kt, _controllable_input as L, _if_closure as Lt, _attr_input_value_dynamic_default as M, _for_selector as Mt, _attr_input_value_script as N, _global_read as Nt, _attr_input_checked_script as O, _closure_get as Ot, _attr_select_value as P, _hoist as Pt, _attr_style_items as Q, $signal as Qt, _controllable_open as R, _let as Rt, _attr_details_or_dialog_open_script as S, init as St, _attr_input_checkedValue_default as T, readyFailed as Tt, _attr as U, _script as Ut, controllableScripts as V, _return as Vt, _attr_class as W, _var as Wt, _attr_style as X, syncGen as Xt, _attr_nonce as Y, removeAndDestroyBranch as Yt, _attr_style_item as Z, _on as Zt, queuePendingEffects as _, _assert_hoist as _n, _dynamic_tag_var_resume as _t, _for_in as a, queueAsyncRender as an, _lifecycle as at, _attr_details_or_dialog_open as b, setClassAPIRenderer as bn, _var_resume as bt, _for_to as c, rendering as cn, _text as ct, _for_until_unkeyed as d, runId as dn, _content as dt, onAbort as en, _attrs_content as et, _if as f, forIn as fn, _content_closures as ft, installDynamicTagVar as g, _assert_class_toggles as gn, setupBranch as gt, dynamicTagScript as h, forUntil as hn, createBranch as ht, _dynamic_tag_content as i, prepareEffects as in, _html as it, _attr_input_value_default as j, _for_closure as jt, _attr_input_value as k, _const as kt, _for_to_unkeyed as l, run as ln, _text_content as lt, _try as m, forTo as mn, _return_setup as mt, _await_promise as n, installBranchRenders as nn, _attrs_partial_content as nt, _for_of as o, queueEffect as on, _style_rule_item as ot, _show as p, forOf as pn, _content_closures_resume as pt, _attr_class_names as q, destroyBranch as qt, _dynamic_tag as r, installCatch as rn, _attrs_script as rt, _for_of_unkeyed as s, queueRender as sn, _style_shell as st, _await_content as t, createBranchRenders as tn, _attrs_partial as tt, _for_until as u, runEffects as un, _to_text as ut, renderCatch as v, _hoist_read_error as vn, _el as vt, _attr_input_checkedValue as w, ready as wt, _attr_details_or_dialog_open_default as x, withBranches as xn, getRegisteredWithScope as xt, startAwait as y, _call as yn, _resumed as yt, _controllable_select as z, _let_change as zt };
|
package/dist/dom.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("./dom-
|
|
2
|
+
let require_control_flow = require("./dom-BdJeggv5.js"), empty = [], rest = Symbol(), _template = (id, template, walks, setup, inputSignal) => {
|
|
3
3
|
let renderer = require_control_flow.dt(id, template, walks, setup, inputSignal)();
|
|
4
4
|
return renderer.mount = mount, renderer._ = renderer, require_control_flow.yt[id] = renderer;
|
|
5
5
|
}, noop = (_) => 0;
|
|
@@ -89,7 +89,7 @@ function insertLoaded(renderer, branch, marker, awaitCounter) {
|
|
|
89
89
|
}
|
|
90
90
|
function loadFailed(scope, awaitCounter) {
|
|
91
91
|
return (error) => {
|
|
92
|
-
awaitCounter && (awaitCounter.m ? awaitCounter.i = 0 : awaitCounter.i && awaitCounter.c()), require_control_flow.an(scope, require_control_flow.
|
|
92
|
+
awaitCounter && (awaitCounter.m ? awaitCounter.i = 0 : awaitCounter.i && awaitCounter.c()), require_control_flow.an(scope, require_control_flow.v, error);
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
function _load_signal(load) {
|
package/dist/dom.mjs
CHANGED
|
@@ -2,7 +2,7 @@ let empty = [], rest = Symbol(), _template = (id, template, walks, setup, inputS
|
|
|
2
2
|
let renderer = _content(id, template, walks, setup, inputSignal)();
|
|
3
3
|
return renderer.mount = mount, renderer._ = renderer, _resumed[id] = renderer;
|
|
4
4
|
}, noop = (_) => 0;
|
|
5
|
-
import { $ as _attrs, $t as $signalReset, A as _attr_input_value_attribute_default, 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, Gt as _var_change, Ht as _return_change, I as _attr_select_value_script, It as _id, J as _attr_content, Jt as insertBranchBefore, K as _attr_class_items, 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, Ot as _closure_get, P as _attr_select_value, Pt as _hoist, Q as _attr_style_items, Qt as $signal, R as _controllable_open, Rt as _let, S as _attr_details_or_dialog_open_script, St as init, T as _attr_input_checkedValue_default, 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, Zt as _on,
|
|
5
|
+
import { $ as _attrs, $t as $signalReset, A as _attr_input_value_attribute_default, 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, Gt as _var_change, Ht as _return_change, I as _attr_select_value_script, It as _id, J as _attr_content, Jt as insertBranchBefore, K as _attr_class_items, 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, Ot as _closure_get, P as _attr_select_value, Pt as _hoist, Q as _attr_style_items, Qt as $signal, R as _controllable_open, Rt as _let, S as _attr_details_or_dialog_open_script, St as init, T as _attr_input_checkedValue_default, 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, Zt as _on, _n as _assert_hoist, _t as _dynamic_tag_var_resume, a as _for_in, an as queueAsyncRender, at as _lifecycle, b as _attr_details_or_dialog_open, bt as _var_resume, c as _for_to, ct as _text, d as _for_until_unkeyed, dn as runId, dt as _content, en as onAbort, et as _attrs_content, f as _if, fn as forIn, ft as _content_closures, gn as _assert_class_toggles, gt as setupBranch, hn as forUntil, ht as createBranch, i as _dynamic_tag_content, in as prepareEffects, 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 run, lt as _text_content, m as _try, mn as forTo, mt as _return_setup, n as _await_promise, nt as _attrs_partial_content, o as _for_of, ot as _style_rule_item, p as _show, pn as forOf, pt as _content_closures_resume, q as _attr_class_names, r as _dynamic_tag, rt as _attrs_script, s as _for_of_unkeyed, sn as queueRender, st as _style_shell, t as _await_content, tt as _attrs_partial, u as _for_until, un as runEffects, ut as _to_text, v as renderCatch, vn as _hoist_read_error, vt as _el, w as _attr_input_checkedValue, wt as ready, x as _attr_details_or_dialog_open_default, y as startAwait, yn as _call, yt as _resumed, z as _controllable_select, zt as _let_change } from "./dom-DJrZXgdr.mjs";
|
|
6
6
|
// src/common/attr-tag.ts
|
|
7
7
|
function attrTag(attrs) {
|
|
8
8
|
return attrs[Symbol.iterator] = attrTagIterator, attrs[rest] = empty, attrs;
|
package/dist/html/compat.feat.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../html-
|
|
2
|
+
let require_control_flow = require("../html-aFBpTKdf.js"), SET_SCOPE_REGISTER_ID = "$C_s", RENDER_BODY_ID = "$C_b", K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap(), compat = {
|
|
3
3
|
$global: require_control_flow.A,
|
|
4
4
|
writeLoadAsset: require_control_flow._,
|
|
5
5
|
fork(scopeId, promise, content) {
|
|
@@ -149,7 +149,7 @@ let SET_SCOPE_REGISTER_ID = "$C_s", RENDER_BODY_ID = "$C_b", K_TAGS_API_STATE =
|
|
|
149
149
|
return !!pendingClassFunctions.get($global)?.length;
|
|
150
150
|
}
|
|
151
151
|
}, pendingClassFunctions = /* @__PURE__ */ new WeakMap();
|
|
152
|
-
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-
|
|
152
|
+
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-BD-y50wS.mjs";
|
|
153
153
|
// src/common/compat-meta.ts
|
|
154
154
|
// src/html/compat.feat.ts
|
|
155
155
|
function drainClassFunctions($global, writeScope) {
|
package/dist/html/writer.d.ts
CHANGED
|
@@ -121,7 +121,6 @@ export declare class State implements Channel {
|
|
|
121
121
|
queuePassiveScope(target: Channel, scopeId: number, partialScope: PartialScope): void;
|
|
122
122
|
queueEffect(scopeId: number, registryId: string): void;
|
|
123
123
|
serializeFlush(boundary: Boundary): void;
|
|
124
|
-
getSerializedGlobals(): 0 | Record<string, unknown>;
|
|
125
124
|
runtimeScript(): string;
|
|
126
125
|
captureContext(chunk: Chunk): void;
|
|
127
126
|
keepsTryMarks(chunk: Chunk, resumeWrites: number): boolean;
|