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
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type Scope } from "../common/types";
|
|
2
2
|
export declare function $signalReset(scope: Scope, id: string | number): void;
|
|
3
3
|
export declare function $signal(scope: Scope, id: string | number): AbortSignal;
|
|
4
|
+
/** Runs `abort` as a destroyed scope's `$signal` would fire, without creating one. */
|
|
5
|
+
export declare function trackAbort(scope: Scope, id: string | number, abort: () => void): void;
|
|
4
6
|
/** Enrols `scope` with its branch so destroying the branch cleans it up. */
|
|
5
7
|
export declare function trackCleanup(scope: Scope, subscribers?: Set<Scope>): void;
|
|
6
8
|
export declare let abortsEnabled: undefined | 1;
|
package/dist/dom/catch.feat.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
let require_control_flow = require("../dom-BSsI9OPC.js"), handlePendingTry = (fn, scope, branch) => {
|
|
2
3
|
for (; branch;) {
|
|
3
|
-
if (branch.O?.i) return (
|
|
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.on, require_control_flow.b))(branch.O.c), [])).push(scope), /* @__PURE__ */ new Set())).add(fn);
|
|
4
5
|
branch = branch.N;
|
|
5
6
|
}
|
|
6
7
|
};
|
|
7
8
|
//#region src/dom/catch.feat.ts
|
|
8
|
-
require_control_flow.rn((
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
for (; i < effects.length;) fn = effects[i++], scope = effects[i++], (branch = scope.F)?.H !== 0 && !(checkPending && handlePendingTry(fn, scope, branch)) && fn(scope);
|
|
12
|
-
} else runEffects(effects);
|
|
9
|
+
require_control_flow.rn((effects) => {
|
|
10
|
+
let i = 0, fn, scope, branch;
|
|
11
|
+
for (; i < effects.length;) fn = effects[i++], scope = effects[i++], (branch = scope.F)?.H !== 0 && !handlePendingTry(fn, scope, branch) && fn(scope);
|
|
13
12
|
}, (runRender) => (render) => {
|
|
14
13
|
try {
|
|
15
14
|
let branch = render.b.F;
|
package/dist/dom/catch.feat.mjs
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
let handlePendingTry = (fn, scope, branch) => {
|
|
2
2
|
for (; branch;) {
|
|
3
|
-
if (branch.O?.i) return (
|
|
3
|
+
if (branch.O?.i) return (scope.J ||= ((branch.JS ||= (branch.O.m && ((complete) => branch.O.c = () => complete() || queueAsyncRender(branch, queueEffect, runPendingEffects))(branch.O.c), [])).push(scope), /* @__PURE__ */ new Set())).add(fn);
|
|
4
4
|
branch = branch.N;
|
|
5
5
|
}
|
|
6
6
|
};
|
|
7
|
-
import {
|
|
7
|
+
import { an as queueAsyncRender, b as runPendingEffects, on as queueEffect, rn as installCatch, y as renderCatch } from "../dom-B-v8Gw6T.mjs";
|
|
8
8
|
//#region src/dom/catch.feat.ts
|
|
9
|
-
installCatch((
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
for (; i < effects.length;) fn = effects[i++], scope = effects[i++], (branch = scope.F)?.H !== 0 && !(checkPending && handlePendingTry(fn, scope, branch)) && fn(scope);
|
|
13
|
-
} else runEffects(effects);
|
|
9
|
+
installCatch((effects) => {
|
|
10
|
+
let i = 0, fn, scope, branch;
|
|
11
|
+
for (; i < effects.length;) fn = effects[i++], scope = effects[i++], (branch = scope.F)?.H !== 0 && !handlePendingTry(fn, scope, branch) && fn(scope);
|
|
14
12
|
}, (runRender) => (render) => {
|
|
15
13
|
try {
|
|
16
14
|
let branch = render.b.F;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { type Accessor, AccessorProp, type AwaitCounter, type BranchScope, type EncodedAccessor, type Scope } from "../common/types";
|
|
2
|
-
import { type Renderer, type SetupFn } from "./renderer";
|
|
2
|
+
import { _content, type Renderer, type SetupFn } from "./renderer";
|
|
3
3
|
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 addAwaitCounter(scope: Scope, tryBranch?: BranchScope | undefined): AwaitCounter | undefined;
|
|
7
|
-
export declare function
|
|
8
|
-
|
|
9
|
-
placeholder: unknown;
|
|
10
|
-
}) => void;
|
|
7
|
+
export declare function runPendingEffects(tryBranch: BranchScope): void;
|
|
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;
|
|
11
9
|
export declare function renderCatch(scope: Scope, error: unknown): void;
|
|
12
10
|
export declare const _if: (nodeAccessor: EncodedAccessor, ...branchesArgs: (string | SetupFn | 0)[]) => (scope: Scope, newBranch: number) => void;
|
|
13
11
|
export declare const _show: (nodeAccessor: EncodedAccessor, startNodeAccessor?: EncodedAccessor, endNodeAccessor?: EncodedAccessor) => (scope: Scope, display: unknown) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
let require_control_flow = require("../dom-BSsI9OPC.js");
|
|
3
|
+
require_control_flow.U[0] = require_control_flow.k, require_control_flow.U[1] = require_control_flow.D, require_control_flow.U[2] = require_control_flow.P;
|
|
3
4
|
//#endregion
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as _attr_input_checkedValue_script, P as _attr_input_value_script, U as controllableScripts, k as _attr_input_checked_script } from "../dom-B-v8Gw6T.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,5 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
let require_control_flow = require("../dom-BSsI9OPC.js");
|
|
2
3
|
//#region src/dom/controllable-open.feat.ts
|
|
3
|
-
require_control_flow.
|
|
4
|
+
require_control_flow.U[4] = require_control_flow.C;
|
|
4
5
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as _attr_details_or_dialog_open_script, U as controllableScripts } from "../dom-B-v8Gw6T.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,5 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
let require_control_flow = require("../dom-BSsI9OPC.js");
|
|
2
3
|
//#region src/dom/controllable-select.feat.ts
|
|
3
|
-
require_control_flow.
|
|
4
|
+
require_control_flow.U[3] = require_control_flow.L;
|
|
4
5
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as _attr_select_value_script, U as controllableScripts } from "../dom-B-v8Gw6T.mjs";
|
|
2
2
|
//#region src/dom/controllable-select.feat.ts
|
|
3
3
|
controllableScripts[3] = _attr_select_value_script;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
let require_control_flow = require("../dom-BSsI9OPC.js");
|
|
2
3
|
//#region src/dom/controllable-textarea.feat.ts
|
|
3
|
-
require_control_flow.
|
|
4
|
+
require_control_flow.U[2] = require_control_flow.P;
|
|
4
5
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { P as _attr_input_value_script, U as controllableScripts } from "../dom-B-v8Gw6T.mjs";
|
|
2
2
|
//#region src/dom/controllable-textarea.feat.ts
|
|
3
3
|
controllableScripts[2] = _attr_input_value_script;
|
|
4
4
|
//#endregion
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
let require_control_flow = require("../dom-BSsI9OPC.js");
|
|
3
|
+
require("./controllable-input.feat.js"), require("./controllable-open.feat.js"), require("./controllable-select.feat.js"), require_control_flow.H.INPUT = require_control_flow.R, require_control_flow.H.TEXTAREA = require_control_flow.V, require_control_flow.H.SELECT = require_control_flow.B, require_control_flow.H.DETAILS = require_control_flow.H.DIALOG = require_control_flow.z;
|
|
3
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as
|
|
1
|
+
import { B as _controllable_select, H as controllableRenders, R as _controllable_input, V as _controllable_textarea, z as _controllable_open } from "../dom-B-v8Gw6T.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,5 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
let require_control_flow = require("../dom-BSsI9OPC.js");
|
|
2
3
|
//#region src/dom/dynamic-tag-script.feat.ts
|
|
3
|
-
require_control_flow.
|
|
4
|
+
require_control_flow.xt._d = require_control_flow.yn(require_control_flow.g);
|
|
4
5
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as dynamicTagScript, xt as _resumed, yn as withBranches } from "../dom-B-v8Gw6T.mjs";
|
|
2
2
|
//#region src/dom/dynamic-tag-script.feat.ts
|
|
3
3
|
_resumed._d = withBranches(dynamicTagScript);
|
|
4
4
|
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/dom/load.d.ts
CHANGED
|
@@ -10,9 +10,9 @@ interface LoadSignal {
|
|
|
10
10
|
export interface LoadTrigger {
|
|
11
11
|
<T>(load: () => Promise<T>): () => Promise<T>;
|
|
12
12
|
}
|
|
13
|
-
export declare
|
|
14
|
-
export declare
|
|
15
|
-
export declare
|
|
13
|
+
export declare function _load_template(id: string, load: () => Promise<Renderer>): Template & Renderer;
|
|
14
|
+
export declare function _load_setup(load: () => Promise<LoadModule>): (owner: Scope, child: BranchScope, marker: ChildNode) => void;
|
|
15
|
+
export declare function _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?: {
|
|
18
18
|
timeout?: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
let require_control_flow = require("../dom-BSsI9OPC.js");
|
|
2
3
|
//#region src/dom/placeholder.feat.ts
|
|
3
|
-
require_control_flow.
|
|
4
|
-
tryBranch.P &&= (require_control_flow.
|
|
4
|
+
require_control_flow.xt._f = (tryBranch) => {
|
|
5
|
+
tryBranch.P &&= (require_control_flow.Xt(tryBranch.P), 0);
|
|
5
6
|
};
|
|
6
7
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Xt as destroyBranch, xt as _resumed } from "../dom-B-v8Gw6T.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/queue.d.ts
CHANGED
|
@@ -11,8 +11,6 @@ export type PendingRender = {
|
|
|
11
11
|
};
|
|
12
12
|
export declare let rendering: undefined | 0 | 1;
|
|
13
13
|
export declare let runId: number;
|
|
14
|
-
export declare const caughtError: WeakSet<unknown[]>;
|
|
15
|
-
export declare const placeholderShown: WeakSet<unknown[]>;
|
|
16
14
|
export declare let pendingEffects: unknown[];
|
|
17
15
|
export declare function queueRender<T, U extends Scope = Scope>(scope: U, signal: Signal<T, U>, signalKey: number, value?: T, scopeKey?: number): void;
|
|
18
16
|
export declare function queuePendingRender(render: PendingRender): void;
|
|
@@ -20,7 +18,7 @@ export declare function queueEffect<S extends Scope, T extends ExecFn<S>>(scope:
|
|
|
20
18
|
export declare function run(): void;
|
|
21
19
|
export declare function queueAsyncRender<T, U extends Scope = Scope>(scope: U, signal: Signal<T, U>, value?: T): void;
|
|
22
20
|
export declare function prepareEffects(fn: () => void): unknown[];
|
|
23
|
-
export declare let runEffects: (effects: unknown[]
|
|
21
|
+
export declare let runEffects: (effects: unknown[]) => void;
|
|
24
22
|
declare let runRender: (render: PendingRender) => void;
|
|
25
|
-
export declare function installCatch(
|
|
23
|
+
export declare function installCatch(catchEffects: typeof runEffects, wrapRender: (base: typeof runRender) => typeof runRender): void;
|
|
26
24
|
export {};
|
package/dist/dom/resume.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export interface RenderData {
|
|
|
26
26
|
export declare const _resumed: Record<string, unknown>;
|
|
27
27
|
export declare function ready(readyId: string): void;
|
|
28
28
|
export declare function readyFailed(readyId: string): void;
|
|
29
|
-
export declare function withLazy
|
|
29
|
+
export declare function withLazy(): void;
|
|
30
30
|
export declare function initEmbedded(readyId: string, runtimeId?: string): void;
|
|
31
31
|
export declare function init(runtimeId?: string): void;
|
|
32
32
|
export declare let isResuming: undefined | 0 | 1;
|
package/dist/dom/scope.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export declare function syncGen(scope: Scope): void;
|
|
|
4
4
|
export declare function _assert_init(scope: Scope, accessor: string): any;
|
|
5
5
|
export declare function collectScopes(fn: () => void): Scope[];
|
|
6
6
|
export declare function skipScope(): number;
|
|
7
|
-
export declare function findBranchWithKey(scope: Scope, key: string): BranchScope | undefined;
|
|
8
7
|
export declare function destroyBranch(branch: BranchScope): void;
|
|
9
8
|
export declare function destroyScope(scope: Scope): void;
|
|
10
9
|
export declare function removeAndDestroyBranch(branch: BranchScope): void;
|