marko 6.3.53 → 6.3.54
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 -0
- package/dist/common/constants/renderer-prop.d.ts +0 -1
- package/dist/common/constants/renderer-prop.debug.d.ts +0 -1
- package/dist/common/helpers.d.ts +1 -0
- 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/placeholder.feat.js +1 -1
- package/dist/debug/dom/placeholder.feat.mjs +1 -1
- package/dist/debug/{dom-CBLlE8L-.js → dom-CI0Vojyk.js} +119 -78
- package/dist/debug/{dom-DQCODUa1.mjs → dom-tl43c2wO.mjs} +102 -79
- package/dist/debug/dom.js +9 -7
- package/dist/debug/dom.mjs +7 -8
- package/dist/debug/html.js +51 -25
- package/dist/debug/html.mjs +51 -25
- package/dist/dom/catch.feat.js +4 -4
- package/dist/dom/catch.feat.mjs +1 -1
- package/dist/dom/control-flow.d.ts +4 -1
- package/dist/dom/controllable-input.feat.js +2 -2
- package/dist/dom/controllable-input.feat.mjs +1 -1
- package/dist/dom/controllable-open.feat.js +2 -2
- package/dist/dom/controllable-open.feat.mjs +1 -1
- package/dist/dom/controllable-select.feat.js +2 -2
- package/dist/dom/controllable-select.feat.mjs +1 -1
- package/dist/dom/controllable-textarea.feat.js +2 -2
- package/dist/dom/controllable-textarea.feat.mjs +1 -1
- package/dist/dom/controllable.feat.js +2 -2
- package/dist/dom/controllable.feat.mjs +1 -1
- 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 +1 -1
- package/dist/dom/dynamic-tag-var.feat.mjs +1 -1
- package/dist/dom/load.d.ts +2 -2
- package/dist/dom/placeholder.feat.js +3 -3
- package/dist/dom/placeholder.feat.mjs +1 -1
- package/dist/dom/renderer.d.ts +2 -3
- package/dist/dom/signals.d.ts +1 -1
- package/dist/{dom-z4IMlmeO.mjs → dom-4udEPZaj.mjs} +71 -58
- package/dist/{dom-vuB05Hnj.js → dom-C1mr-TA7.js} +199 -176
- package/dist/dom.d.ts +1 -1
- package/dist/dom.js +40 -42
- package/dist/dom.mjs +6 -8
- package/dist/html/dynamic-tag.d.ts +2 -1
- package/dist/html/serializer.d.ts +3 -2
- package/dist/html/writer.d.ts +6 -5
- package/dist/html.js +34 -19
- package/dist/html.mjs +34 -19
- package/dist/translator/index.js +2570 -2375
- package/dist/translator/util/binding-has-prop.d.ts +1 -0
- package/dist/translator/util/branch-tag.d.ts +6 -1
- package/dist/translator/util/optional.d.ts +2 -0
- package/dist/translator/util/references.d.ts +20 -9
- package/dist/translator/util/runtime.d.ts +1 -0
- package/dist/translator/util/sections.d.ts +11 -6
- package/dist/translator/util/serialize-guard.d.ts +1 -1
- package/dist/translator/util/serialize-reasons.d.ts +3 -0
- package/dist/translator/util/set-tag-sections-downstream.d.ts +1 -1
- package/dist/translator/util/signals.d.ts +4 -1
- package/dist/translator/util/structure.d.ts +1 -1
- package/dist/translator/util/tag-name-type.d.ts +1 -1
- package/dist/translator/visitors/function.d.ts +1 -0
- package/dist/translator/visitors/import-declaration.d.ts +1 -0
- package/dist/translator/visitors/tag/custom-tag.d.ts +5 -0
- package/package.json +4 -4
- package/tags/try.d.marko +2 -0
- package/tags-html.d.ts +6 -0
package/dist/debug/html.mjs
CHANGED
|
@@ -127,6 +127,10 @@ function isEventHandler(name) {
|
|
|
127
127
|
function getEventHandlerName(name) {
|
|
128
128
|
return name[2] === "-" ? name.slice(3) : name.slice(2).toLowerCase();
|
|
129
129
|
}
|
|
130
|
+
function hasKeys(obj) {
|
|
131
|
+
for (const _ in obj) return true;
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
130
134
|
function isVoid(value) {
|
|
131
135
|
return value == null || value === false;
|
|
132
136
|
}
|
|
@@ -629,10 +633,11 @@ var Serializer = class {
|
|
|
629
633
|
});
|
|
630
634
|
}
|
|
631
635
|
};
|
|
632
|
-
function register(id, val, scope) {
|
|
636
|
+
function register(id, val, scope, locals) {
|
|
633
637
|
REGISTRY.set(val, {
|
|
634
638
|
id,
|
|
635
639
|
scope,
|
|
640
|
+
locals,
|
|
636
641
|
access: "_._" + toAccess(toObjectKey(id))
|
|
637
642
|
});
|
|
638
643
|
return val;
|
|
@@ -815,6 +820,9 @@ function newScopeReference(state, val, scopeId) {
|
|
|
815
820
|
ref.debug = DEBUG.get(val);
|
|
816
821
|
return ref;
|
|
817
822
|
}
|
|
823
|
+
function quoteRegisterId(id) {
|
|
824
|
+
return quote(id, 0);
|
|
825
|
+
}
|
|
818
826
|
function writeRegistered(state, val, parent, accessor, registered) {
|
|
819
827
|
const { scope } = registered;
|
|
820
828
|
if (scope) {
|
|
@@ -824,7 +832,16 @@ function writeRegistered(state, val, parent, accessor, registered) {
|
|
|
824
832
|
ref.debug = DEBUG.get(val);
|
|
825
833
|
const scopeId = scope[K_SCOPE_ID];
|
|
826
834
|
trackScope(state, scope, scopeId);
|
|
827
|
-
|
|
835
|
+
const locals = registered.locals?.(state.boundary.state.scope);
|
|
836
|
+
if (locals) {
|
|
837
|
+
state.buf.push(registered.access + "(_(" + scopeId + ")");
|
|
838
|
+
for (const local of locals) {
|
|
839
|
+
state.buf.push(",");
|
|
840
|
+
if (local) writePlainObject(state, local, new Reference(ref, null, state.flushId, state.buf.length));
|
|
841
|
+
else state.buf.push("0");
|
|
842
|
+
}
|
|
843
|
+
} else state.buf.push("_(" + scopeId + "," + quoteRegisterId(registered.id));
|
|
844
|
+
state.buf.push(")");
|
|
828
845
|
} else state.buf.push(registered.access);
|
|
829
846
|
return true;
|
|
830
847
|
}
|
|
@@ -2016,8 +2033,8 @@ function _script(scopeId, registryId, serializeMarker) {
|
|
|
2016
2033
|
function _trailers(html) {
|
|
2017
2034
|
$chunk.boundary.state.trailerHTML += html;
|
|
2018
2035
|
}
|
|
2019
|
-
function _resume(val, id, scopeId) {
|
|
2020
|
-
return register(id, val, scopeId === void 0 ? void 0 : _scope_with_id(scopeId));
|
|
2036
|
+
function _resume(val, id, scopeId, locals) {
|
|
2037
|
+
return register(id, val, scopeId === void 0 ? void 0 : _scope_with_id(scopeId), locals);
|
|
2021
2038
|
}
|
|
2022
2039
|
function _resume_locals(val, id, locals, ownerScopeId) {
|
|
2023
2040
|
if (ownerScopeId !== void 0) locals["_"] = _scope_with_id(ownerScopeId);
|
|
@@ -2129,13 +2146,17 @@ function _for_until(to, from, step, cb, by, scopeId, accessor, serializeBranch,
|
|
|
2129
2146
|
}, scopeId, accessor, serializeBranch, serializeMarker, serializeStateful, parentEndTag, singleNode);
|
|
2130
2147
|
}
|
|
2131
2148
|
function forBranches(by, iterate, scopeId, accessor, serializeBranch, serializeMarker, serializeStateful, parentEndTag, singleNode) {
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2149
|
+
if (by) {
|
|
2150
|
+
const run = iterate;
|
|
2151
|
+
const seenKeys = /* @__PURE__ */ new Set();
|
|
2152
|
+
iterate = (each) => run((itemKey, sameAsIndex, render) => {
|
|
2135
2153
|
assertValidLoopKey(itemKey, seenKeys);
|
|
2136
|
-
|
|
2154
|
+
if (each) each(itemKey, sameAsIndex, render);
|
|
2155
|
+
else render();
|
|
2137
2156
|
});
|
|
2138
|
-
|
|
2157
|
+
}
|
|
2158
|
+
if (serializeBranch === 0) {
|
|
2159
|
+
iterate(0);
|
|
2139
2160
|
writeBranchEnd(scopeId, accessor, serializeStateful, serializeMarker, parentEndTag, singleNode, "");
|
|
2140
2161
|
return;
|
|
2141
2162
|
}
|
|
@@ -2146,7 +2167,6 @@ function forBranches(by, iterate, scopeId, accessor, serializeBranch, serializeM
|
|
|
2146
2167
|
let loopScopes;
|
|
2147
2168
|
iterate((itemKey, sameAsIndex, render) => {
|
|
2148
2169
|
const branchId = _peek_scope_id();
|
|
2149
|
-
if (by) assertValidLoopKey(itemKey, seenKeys);
|
|
2150
2170
|
if (resumeMarker) if (singleNode) flushBranchIds = " " + branchId + flushBranchIds;
|
|
2151
2171
|
else {
|
|
2152
2172
|
$chunk.writeHTML(state.mark("[", flushBranchIds));
|
|
@@ -2223,17 +2243,18 @@ function scopeWithId(state, scopeId) {
|
|
|
2223
2243
|
if (!scope) scopes.set(scopeId, scope = { [K_SCOPE_ID]: scopeId });
|
|
2224
2244
|
return scope;
|
|
2225
2245
|
}
|
|
2226
|
-
function _subscribe(subscribers, scope) {
|
|
2246
|
+
function _subscribe(subscribers, scope, resumeId, serializeMarker) {
|
|
2227
2247
|
if (subscribers) {
|
|
2228
2248
|
const { serializer } = $chunk.boundary.state;
|
|
2229
2249
|
if (!$chunk.serializeState.readyId && !serializer.written(subscribers)) subscribers.add(scope);
|
|
2250
|
+
else if (resumeId) _script(scope[K_SCOPE_ID], resumeId, serializeMarker);
|
|
2230
2251
|
else serializer.writeCall(scope, subscribers, "add", $chunk.serializeState);
|
|
2231
2252
|
}
|
|
2232
2253
|
return scope;
|
|
2233
2254
|
}
|
|
2234
|
-
const CLIENT_ALL =
|
|
2255
|
+
const CLIENT_ALL = 715827883;
|
|
2235
2256
|
function maskGroup(mask, group) {
|
|
2236
|
-
return mask ===
|
|
2257
|
+
return mask === 715827883 ? 1 : typeof mask === "number" ? group < 15 ? mask >>> 1 + 2 * group & 3 : 0 : mask[group] ?? 0;
|
|
2237
2258
|
}
|
|
2238
2259
|
function _set_serialize_reason(reason) {
|
|
2239
2260
|
$chunk.boundary.state.serializeReason = reason;
|
|
@@ -2437,6 +2458,7 @@ var State = class {
|
|
|
2437
2458
|
serializer = new Serializer();
|
|
2438
2459
|
writeReorders = null;
|
|
2439
2460
|
scopes = /* @__PURE__ */ new Map();
|
|
2461
|
+
scope = (scopeId) => scopeWithId(this, scopeId);
|
|
2440
2462
|
flushScopes = false;
|
|
2441
2463
|
writeScopes = {};
|
|
2442
2464
|
readyIds = null;
|
|
@@ -2668,23 +2690,23 @@ var Chunk = class Chunk {
|
|
|
2668
2690
|
$chunk = prev;
|
|
2669
2691
|
}
|
|
2670
2692
|
}
|
|
2671
|
-
flushReadyScripts(reservations) {
|
|
2693
|
+
flushReadyScripts(reservations, holdEffects) {
|
|
2672
2694
|
const { boundary, serializeState } = this;
|
|
2673
2695
|
const { readyId } = serializeState;
|
|
2674
2696
|
let scripts = "";
|
|
2675
2697
|
forEach(this.takeDeferredReady(), (chunk) => {
|
|
2676
|
-
scripts = concatScripts(scripts, chunk.flushReadyScripts(reservations));
|
|
2698
|
+
scripts = concatScripts(scripts, chunk.flushReadyScripts(reservations, holdEffects));
|
|
2699
|
+
if (chunk.effects || chunk.deferredReady) this.deferredReady = push(this.deferredReady, chunk);
|
|
2677
2700
|
});
|
|
2678
2701
|
if (readyId && !this.async) {
|
|
2679
2702
|
const { state } = boundary;
|
|
2680
2703
|
flushSerializer(boundary, serializeState);
|
|
2681
2704
|
const deps = state.serializer.takeChannelDeps();
|
|
2682
|
-
const
|
|
2705
|
+
const effects = holdEffects ? "" : this.effects;
|
|
2683
2706
|
const { resumes } = serializeState;
|
|
2684
2707
|
const chunkScripts = this.scripts;
|
|
2685
|
-
serializeState.resumes = "";
|
|
2686
|
-
this.effects = this.
|
|
2687
|
-
this.lastEffect = "";
|
|
2708
|
+
serializeState.resumes = this.scripts = "";
|
|
2709
|
+
if (effects) this.effects = this.lastEffect = "";
|
|
2688
2710
|
if (resumes || effects) {
|
|
2689
2711
|
state.needsMainRuntime = true;
|
|
2690
2712
|
const batch = concatSequence(depsMarker(deps), concatSequence(resumes, effects && `"${effects}"`));
|
|
@@ -2704,7 +2726,7 @@ var Chunk = class Chunk {
|
|
|
2704
2726
|
const { $global, runtimePrefix } = state;
|
|
2705
2727
|
let needsWalk = state.walkOnNextFlush;
|
|
2706
2728
|
if (needsWalk) state.walkOnNextFlush = false;
|
|
2707
|
-
let readyResumeScripts = this.flushReadyScripts();
|
|
2729
|
+
let readyResumeScripts = this.flushReadyScripts(void 0, this.async);
|
|
2708
2730
|
for (let channel; channel = state.serializer.pendingReadyChannel();) {
|
|
2709
2731
|
const resumes = state.serializer.stringifyScopes([], boundary, channel);
|
|
2710
2732
|
const deps = state.serializer.takeChannelDeps();
|
|
@@ -2753,7 +2775,8 @@ var Chunk = class Chunk {
|
|
|
2753
2775
|
cur.flushPlaceholder();
|
|
2754
2776
|
cur.deferOwnReady();
|
|
2755
2777
|
const { next } = cur;
|
|
2756
|
-
const readyResumeScripts = cur.flushReadyScripts(readyReservations);
|
|
2778
|
+
const readyResumeScripts = cur.flushReadyScripts(readyReservations, this.async);
|
|
2779
|
+
this.deferredReady = concat(this.deferredReady, cur.takeDeferredReady());
|
|
2757
2780
|
cur.consumed = true;
|
|
2758
2781
|
reorderHTML += cur.html;
|
|
2759
2782
|
reorderEffects = concatEffects(reorderEffects, cur.effects);
|
|
@@ -2767,7 +2790,10 @@ var Chunk = class Chunk {
|
|
|
2767
2790
|
if (next) cur = next;
|
|
2768
2791
|
else break;
|
|
2769
2792
|
}
|
|
2770
|
-
if (reorderEffects) {
|
|
2793
|
+
if (reorderEffects) if (this.async) {
|
|
2794
|
+
this.effects = concatEffects(this.effects, reorderEffects);
|
|
2795
|
+
this.lastEffect = "";
|
|
2796
|
+
} else {
|
|
2771
2797
|
needsResumeArray = true;
|
|
2772
2798
|
reorderScripts = concatScripts(reorderScripts, "_.push(\"" + reorderEffects + "\")");
|
|
2773
2799
|
}
|
|
@@ -2827,7 +2853,7 @@ function flushSerializer(boundary, serializeState) {
|
|
|
2827
2853
|
for (const key in writeScopes) {
|
|
2828
2854
|
const scopeId = +key;
|
|
2829
2855
|
const props = writeScopes[scopeId];
|
|
2830
|
-
if (
|
|
2856
|
+
if (hasKeys(props)) flushes.push([
|
|
2831
2857
|
scopeId,
|
|
2832
2858
|
state.scopes.get(scopeId),
|
|
2833
2859
|
props
|
|
@@ -3210,8 +3236,8 @@ function _content(id, fn, scopeId) {
|
|
|
3210
3236
|
fn[Owner] = scopeId;
|
|
3211
3237
|
return fn;
|
|
3212
3238
|
}
|
|
3213
|
-
function _content_resume(id, fn, scopeId) {
|
|
3214
|
-
return _resume(_content(id, fn, scopeId), id, scopeId);
|
|
3239
|
+
function _content_resume(id, fn, scopeId, locals) {
|
|
3240
|
+
return _resume(_content(id, fn, scopeId), id, scopeId, locals);
|
|
3215
3241
|
}
|
|
3216
3242
|
const patchDynamicTag = /* @__PURE__ */ ((originalDynamicTag) => (patch) => {
|
|
3217
3243
|
_dynamic_tag = (scopeId, accessor, tag, input, content, inputIsArgs, resume) => {
|
package/dist/dom/catch.feat.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
let require_control_flow = require("../dom-
|
|
1
|
+
let require_control_flow = require("../dom-C1mr-TA7.js"), handlePendingTry = (fn, scope, branch) => {
|
|
2
2
|
for (; branch;) {
|
|
3
3
|
if (branch.O?.i) return (branch.J ||= []).push(fn, scope);
|
|
4
4
|
branch = branch.N;
|
|
5
5
|
}
|
|
6
6
|
};
|
|
7
7
|
//#region src/dom/catch.feat.ts
|
|
8
|
-
require_control_flow.
|
|
9
|
-
if (checkPending || require_control_flow
|
|
8
|
+
require_control_flow.rn((runEffects) => (effects, checkPending = require_control_flow.in.has(effects)) => {
|
|
9
|
+
if (checkPending || require_control_flow.nn.has(effects)) {
|
|
10
10
|
let i = 0, fn, scope, branch;
|
|
11
11
|
for (; i < effects.length;) fn = effects[i++], scope = effects[i++], (branch = scope.F)?.H !== 0 && !(checkPending && handlePendingTry(fn, scope, branch)) && fn(scope);
|
|
12
12
|
} else runEffects(effects);
|
|
@@ -19,7 +19,7 @@ require_control_flow.en((runEffects) => (effects, checkPending = require_control
|
|
|
19
19
|
}
|
|
20
20
|
render.f = 0, runRender(render);
|
|
21
21
|
} catch (error) {
|
|
22
|
-
require_control_flow.
|
|
22
|
+
require_control_flow.y(render.b, error);
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
//#endregion
|
package/dist/dom/catch.feat.mjs
CHANGED
|
@@ -4,7 +4,7 @@ let handlePendingTry = (fn, scope, branch) => {
|
|
|
4
4
|
branch = branch.N;
|
|
5
5
|
}
|
|
6
6
|
};
|
|
7
|
-
import {
|
|
7
|
+
import { in as placeholderShown, nn as caughtError, rn as installCatch, y as renderCatch } from "../dom-4udEPZaj.mjs";
|
|
8
8
|
//#region src/dom/catch.feat.ts
|
|
9
9
|
installCatch((runEffects) => (effects, checkPending = placeholderShown.has(effects)) => {
|
|
10
10
|
if (checkPending || caughtError.has(effects)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Accessor, AccessorProp, type AwaitCounter, type BranchScope, type EncodedAccessor, type Scope } from "../common/types";
|
|
2
2
|
import { type Renderer, type SetupFn } from "./renderer";
|
|
3
3
|
import { type Signal } from "./signals";
|
|
4
|
-
export declare function _await_promise(nodeAccessor: EncodedAccessor, params?: Signal<unknown>): (scope: Scope, promise:
|
|
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 addAwaitCounter(scope: Scope, tryBranch?: BranchScope | undefined): AwaitCounter | undefined;
|
|
7
7
|
export declare function _try(nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0): (scope: Scope, input: {
|
|
@@ -23,3 +23,6 @@ export declare const _for_of: (nodeAccessor: EncodedAccessor, template?: string
|
|
|
23
23
|
export declare const _for_in: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?: Signal<unknown>) => (scope: Scope, value: [obj: {}, by?: ((key: string, v: unknown) => unknown) | undefined]) => void;
|
|
24
24
|
export declare const _for_to: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?: Signal<unknown>) => (scope: Scope, value: [to: number, from: number, step: number, by?: ((v: number) => unknown) | undefined]) => void;
|
|
25
25
|
export declare const _for_until: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?: Signal<unknown>) => (scope: Scope, value: [until: number, from: number, step: number, by?: ((v: number) => unknown) | undefined]) => void;
|
|
26
|
+
export declare const _for_of_unkeyed: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?: Signal<unknown>) => (scope: Scope, value: [all: unknown[]]) => void;
|
|
27
|
+
export declare const _for_to_unkeyed: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?: Signal<unknown>) => (scope: Scope, value: [to: number, from: number, step: number]) => void;
|
|
28
|
+
export declare const _for_until_unkeyed: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?: Signal<unknown>) => (scope: Scope, value: [until: number, from: number, step: number]) => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
let require_control_flow = require("../dom-
|
|
2
|
-
require_control_flow.
|
|
1
|
+
let require_control_flow = require("../dom-C1mr-TA7.js");
|
|
2
|
+
require_control_flow.H[0] = require_control_flow.O, require_control_flow.H[1] = require_control_flow.E, require_control_flow.H[2] = require_control_flow.N;
|
|
3
3
|
//#endregion
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as _attr_input_checkedValue_script, H as controllableScripts, N as _attr_input_value_script, O as _attr_input_checked_script } from "../dom-4udEPZaj.mjs";
|
|
2
2
|
controllableScripts[0] = _attr_input_checked_script, controllableScripts[1] = _attr_input_checkedValue_script, controllableScripts[2] = _attr_input_value_script;
|
|
3
3
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
let require_control_flow = require("../dom-
|
|
1
|
+
let require_control_flow = require("../dom-C1mr-TA7.js");
|
|
2
2
|
//#region src/dom/controllable-open.feat.ts
|
|
3
|
-
require_control_flow.
|
|
3
|
+
require_control_flow.H[4] = require_control_flow.S;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as controllableScripts, S as _attr_details_or_dialog_open_script } from "../dom-4udEPZaj.mjs";
|
|
2
2
|
//#region src/dom/controllable-open.feat.ts
|
|
3
3
|
controllableScripts[4] = _attr_details_or_dialog_open_script;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
let require_control_flow = require("../dom-
|
|
1
|
+
let require_control_flow = require("../dom-C1mr-TA7.js");
|
|
2
2
|
//#region src/dom/controllable-select.feat.ts
|
|
3
|
-
require_control_flow.
|
|
3
|
+
require_control_flow.H[3] = require_control_flow.I;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as controllableScripts, I as _attr_select_value_script } from "../dom-4udEPZaj.mjs";
|
|
2
2
|
//#region src/dom/controllable-select.feat.ts
|
|
3
3
|
controllableScripts[3] = _attr_select_value_script;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
let require_control_flow = require("../dom-
|
|
1
|
+
let require_control_flow = require("../dom-C1mr-TA7.js");
|
|
2
2
|
//#region src/dom/controllable-textarea.feat.ts
|
|
3
|
-
require_control_flow.
|
|
3
|
+
require_control_flow.H[2] = require_control_flow.N;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as controllableScripts, N as _attr_input_value_script } from "../dom-4udEPZaj.mjs";
|
|
2
2
|
//#region src/dom/controllable-textarea.feat.ts
|
|
3
3
|
controllableScripts[2] = _attr_input_value_script;
|
|
4
4
|
//#endregion
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
let require_control_flow = require("../dom-
|
|
2
|
-
require("./controllable-input.feat.js"), require("./controllable-open.feat.js"), require("./controllable-select.feat.js"), require_control_flow.
|
|
1
|
+
let require_control_flow = require("../dom-C1mr-TA7.js");
|
|
2
|
+
require("./controllable-input.feat.js"), require("./controllable-open.feat.js"), require("./controllable-select.feat.js"), require_control_flow.V.INPUT = require_control_flow.L, require_control_flow.V.TEXTAREA = require_control_flow.B, require_control_flow.V.SELECT = require_control_flow.z, require_control_flow.V.DETAILS = require_control_flow.V.DIALOG = require_control_flow.R;
|
|
3
3
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as _controllable_textarea, L as _controllable_input, R as _controllable_open, V as controllableRenders, z as _controllable_select } from "../dom-4udEPZaj.mjs";
|
|
2
2
|
import "./controllable-input.feat.mjs";
|
|
3
3
|
import "./controllable-open.feat.mjs";
|
|
4
4
|
import "./controllable-select.feat.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
let require_control_flow = require("../dom-
|
|
1
|
+
let require_control_flow = require("../dom-C1mr-TA7.js");
|
|
2
2
|
//#region src/dom/dynamic-tag-script.feat.ts
|
|
3
|
-
require_control_flow.
|
|
3
|
+
require_control_flow.bt._d = require_control_flow.yn(require_control_flow.g);
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bt as _resumed, g as dynamicTagScript, yn as withBranches } from "../dom-4udEPZaj.mjs";
|
|
2
2
|
//#region src/dom/dynamic-tag-script.feat.ts
|
|
3
3
|
_resumed._d = withBranches(dynamicTagScript);
|
|
4
4
|
//#endregion
|
package/dist/dom/load.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type BranchScope, type Scope, type Template } from "../common/types";
|
|
2
2
|
import { type Renderer, type SetupFn } from "./renderer";
|
|
3
3
|
import type { Signal } from "./signals";
|
|
4
4
|
interface LoadModule {
|
|
@@ -11,7 +11,7 @@ export interface LoadTrigger {
|
|
|
11
11
|
<T>(load: () => Promise<T>): () => Promise<T>;
|
|
12
12
|
}
|
|
13
13
|
export declare const _load_template: (id: string, load: () => Promise<Renderer>) => Template & Renderer;
|
|
14
|
-
export declare const _load_setup: (
|
|
14
|
+
export declare const _load_setup: (load: () => Promise<LoadModule>) => (owner: Scope, child: BranchScope, marker: ChildNode) => void;
|
|
15
15
|
export declare const _load_signal: (load: () => Promise<LoadSignal>) => Signal;
|
|
16
16
|
export declare function _load_visible_trigger(selector: string, options?: IntersectionObserverInit): LoadTrigger;
|
|
17
17
|
export declare function _load_idle_trigger(options?: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
let require_control_flow = require("../dom-
|
|
1
|
+
let require_control_flow = require("../dom-C1mr-TA7.js");
|
|
2
2
|
//#region src/dom/placeholder.feat.ts
|
|
3
|
-
require_control_flow.
|
|
4
|
-
tryBranch.P &&= (require_control_flow.
|
|
3
|
+
require_control_flow.bt._f = (tryBranch) => {
|
|
4
|
+
tryBranch.P &&= (require_control_flow.Yt(tryBranch.P), 0);
|
|
5
5
|
};
|
|
6
6
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Yt as destroyBranch, bt as _resumed } from "../dom-4udEPZaj.mjs";
|
|
2
2
|
//#region src/dom/placeholder.feat.ts
|
|
3
3
|
_resumed._f = (tryBranch) => {
|
|
4
4
|
tryBranch.P &&= (destroyBranch(tryBranch.P), 0);
|
package/dist/dom/renderer.d.ts
CHANGED
|
@@ -7,8 +7,7 @@ export type Renderer = {
|
|
|
7
7
|
[RendererProp.Params]: Signal<unknown> | undefined;
|
|
8
8
|
[RendererProp.Owner]: Scope | undefined;
|
|
9
9
|
[RendererProp.Accessor]: Accessor | undefined;
|
|
10
|
-
[RendererProp.LocalClosures]?:
|
|
11
|
-
[RendererProp.LocalClosureValues]?: Record<Accessor, unknown>;
|
|
10
|
+
[RendererProp.LocalClosures]?: SetupFn;
|
|
12
11
|
};
|
|
13
12
|
export type SetupFn = (scope: Scope) => void;
|
|
14
13
|
export declare function createBranch($global: Scope[typeof AccessorProp.Global], renderer: Renderer | string, parentScope: Scope | undefined, parentNode: ParentNode): BranchScope;
|
|
@@ -18,5 +17,5 @@ export declare function setupBranch(renderer: Renderer, branch: BranchScope): Br
|
|
|
18
17
|
export declare function _content(id: string, template?: string | 0, walks?: string | 0, setup?: {
|
|
19
18
|
_: Signal<unknown>;
|
|
20
19
|
} | SetupFn | 0, params?: Signal<unknown> | 0, dynamicScopesAccessor?: Accessor): (owner?: Scope) => Renderer;
|
|
21
|
-
export declare function _content_resume(
|
|
20
|
+
export declare function _content_resume(renderer: (owner?: Scope, localValues?: Record<Accessor, unknown>) => Renderer, hasLocalValues?: number): (owner: Scope, ...values: Scope[]) => Renderer;
|
|
22
21
|
export declare function _content_closures(renderer: ReturnType<typeof _content>, closureFns: Record<Accessor, SignalFn>): (owner: Scope, closureValues: Record<Accessor, unknown>) => Renderer;
|
package/dist/dom/signals.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare function _for_selector(ownerLoopNodeAccessor: EncodedAccessor, ow
|
|
|
10
10
|
export declare function _if_closure(ownerConditionalNodeAccessor: EncodedAccessor, branch: number, fn: SignalFn): SignalFn;
|
|
11
11
|
export declare function subscribeToScopeSet(ownerScope: Scope, accessor: Accessor, scope: Scope): void;
|
|
12
12
|
export declare function _closure(...closureSignals: ReturnType<typeof _closure_get>[]): (scope: Scope) => void;
|
|
13
|
-
export declare function _closure_get(valueAccessor: EncodedAccessor, fn: SignalFn, getOwnerScope?: (scope: Scope) => Scope, resumeId?: string):
|
|
13
|
+
export declare function _closure_get(valueAccessor: EncodedAccessor, fn: SignalFn, getOwnerScope?: (scope: Scope) => Scope, resumeId?: string, ownerValueAccessor?: EncodedAccessor): ((scope: Scope, resumed?: 1) => void) & {
|
|
14
14
|
scopeInstancesAccessor: string;
|
|
15
15
|
signalIndexAccessor: string;
|
|
16
16
|
index: number;
|