marko 6.4.1 → 6.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cheatsheet.md +1 -1
- package/dist/common/constants/accessor-prop.d.ts +1 -0
- package/dist/common/constants/accessor-prop.debug.d.ts +1 -0
- package/dist/common/errors.d.ts +1 -0
- package/dist/common/opt.d.ts +1 -0
- package/dist/common/types.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 +6 -2
- package/dist/debug/dom/dynamic-tag-var.feat.mjs +6 -2
- 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-ClV4kVOO.js → dom-C7F3yZTh.js} +119 -24
- package/dist/debug/{dom-LFrKxOk5.mjs → dom-uEY0J_H9.mjs} +78 -25
- package/dist/debug/dom.js +16 -4
- package/dist/debug/dom.mjs +14 -5
- package/dist/debug/html.js +288 -78
- package/dist/debug/html.mjs +288 -79
- package/dist/dom/catch.feat.js +4 -4
- package/dist/dom/catch.feat.mjs +1 -1
- package/dist/dom/control-flow.d.ts +2 -2
- 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/dom.d.ts +1 -0
- 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 +4 -2
- package/dist/dom/dynamic-tag-var.feat.mjs +4 -3
- package/dist/dom/lazy.feat.js +1 -1
- package/dist/dom/lazy.feat.mjs +1 -1
- package/dist/dom/load.d.ts +1 -0
- package/dist/dom/placeholder.feat.js +3 -3
- package/dist/dom/placeholder.feat.mjs +1 -1
- package/dist/dom/queue.d.ts +4 -1
- package/dist/{dom-CNglVi8P.js → dom-CtIT8Mpr.js} +201 -138
- package/dist/{dom-DfP3MCo0.mjs → dom-DHg9YChM.mjs} +60 -27
- package/dist/dom.d.ts +3 -3
- package/dist/dom.js +41 -34
- package/dist/dom.mjs +12 -5
- package/dist/html/assets.d.ts +12 -6
- package/dist/html/attrs.d.ts +1 -0
- package/dist/html/compat.d.ts +10 -2
- package/dist/html/serializer.d.ts +1 -0
- package/dist/html/writer.d.ts +8 -0
- package/dist/html.d.ts +1 -1
- package/dist/html.js +207 -62
- package/dist/html.mjs +207 -62
- package/dist/translator/index.js +432 -213
- package/dist/translator/util/bindings.d.ts +9 -1
- package/dist/translator/util/constants/structure-kind.d.ts +1 -0
- package/dist/translator/util/known-tag.d.ts +2 -1
- package/dist/translator/util/module-read.d.ts +21 -0
- package/dist/translator/util/references.d.ts +1 -0
- package/dist/translator/util/runtime.d.ts +2 -0
- package/dist/translator/util/sections.d.ts +5 -1
- package/dist/translator/util/structure.d.ts +1 -0
- package/package.json +3 -3
- package/tags-html.d.ts +6 -5
package/dist/dom/catch.feat.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-CtIT8Mpr.js"), handlePendingTry = (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.
|
|
4
|
+
if (branch.O?.i) return (scope.J ||= ((branch.JS ||= (branch.O.m && ((complete) => branch.O.c = () => complete() || require_control_flow.un(branch, require_control_flow.dn, require_control_flow.x))(branch.O.c), [])).push(scope), /* @__PURE__ */ new Set())).add(fn);
|
|
5
5
|
branch = branch.N;
|
|
6
6
|
}
|
|
7
7
|
};
|
|
8
8
|
//#region src/dom/catch.feat.ts
|
|
9
|
-
require_control_flow.
|
|
9
|
+
require_control_flow.cn((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 && !handlePendingTry(fn, scope, branch) && fn(scope);
|
|
12
12
|
}, (runRender) => (render) => {
|
|
@@ -18,7 +18,7 @@ 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.b(render.b, error);
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
//#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 { b as renderCatch, cn as installCatch, dn as queueEffect, un as queueAsyncRender, x as runPendingEffects } from "../dom-DHg9YChM.mjs";
|
|
8
8
|
//#region src/dom/catch.feat.ts
|
|
9
9
|
installCatch((effects) => {
|
|
10
10
|
let i = 0, fn, scope, branch;
|
|
@@ -13,8 +13,8 @@ export declare function rendererKey(renderer: Renderer | string | undefined): st
|
|
|
13
13
|
export declare function patchDynamicTag(fn: <T extends typeof _dynamic_tag>(cond: T) => T): void;
|
|
14
14
|
export declare let _dynamic_tag: (nodeAccessor: EncodedAccessor, getContent?: ((scope: Scope) => Renderer) | 0, getTagVar?: (() => Signal<unknown>) | 0, inputIsArgs?: 1) => Signal<Renderer | string | undefined>;
|
|
15
15
|
export declare const _dynamic_tag_content: (nodeAccessor: EncodedAccessor) => Signal<Renderer | undefined>;
|
|
16
|
-
export declare let
|
|
17
|
-
export declare function installDynamicTagVar(bind: typeof
|
|
16
|
+
export declare let bindTagVar: undefined | ((scope: Scope, branch: BranchScope, scopeKey: number, renderer?: Renderer | string) => void);
|
|
17
|
+
export declare function installDynamicTagVar(bind: NonNullable<typeof bindTagVar>): void;
|
|
18
18
|
export declare function dynamicTagScript(branch: Scope): void;
|
|
19
19
|
export declare function setConditionalRenderer<T>(scope: Scope, nodeAccessor: Accessor, newRenderer: T, createBranch: ($global: Scope[typeof AccessorProp.Global], renderer: NonNullable<T>, parentScope: Scope, parentNode: ParentNode) => BranchScope): void;
|
|
20
20
|
export declare const _for_of: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?: Signal<unknown>) => (scope: Scope, value: [all: unknown[], by?: ((item: unknown, index: number) => unknown) | undefined]) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
3
|
-
require_control_flow.
|
|
2
|
+
let require_control_flow = require("../dom-CtIT8Mpr.js");
|
|
3
|
+
require_control_flow.W[0] = require_control_flow.A, require_control_flow.W[1] = require_control_flow.O, require_control_flow.W[2] = require_control_flow.F;
|
|
4
4
|
//#endregion
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as _attr_input_checked_script, F as _attr_input_value_script, O as _attr_input_checkedValue_script, W as controllableScripts } from "../dom-DHg9YChM.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,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-CtIT8Mpr.js");
|
|
3
3
|
//#region src/dom/controllable-open.feat.ts
|
|
4
|
-
require_control_flow.
|
|
4
|
+
require_control_flow.W[4] = require_control_flow.w;
|
|
5
5
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { W as controllableScripts, w as _attr_details_or_dialog_open_script } from "../dom-DHg9YChM.mjs";
|
|
2
2
|
//#region src/dom/controllable-open.feat.ts
|
|
3
3
|
controllableScripts[4] = _attr_details_or_dialog_open_script;
|
|
4
4
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-CtIT8Mpr.js");
|
|
3
3
|
//#region src/dom/controllable-select.feat.ts
|
|
4
|
-
require_control_flow.
|
|
4
|
+
require_control_flow.W[3] = require_control_flow.R;
|
|
5
5
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { R as _attr_select_value_script, W as controllableScripts } from "../dom-DHg9YChM.mjs";
|
|
2
2
|
//#region src/dom/controllable-select.feat.ts
|
|
3
3
|
controllableScripts[3] = _attr_select_value_script;
|
|
4
4
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-CtIT8Mpr.js");
|
|
3
3
|
//#region src/dom/controllable-textarea.feat.ts
|
|
4
|
-
require_control_flow.
|
|
4
|
+
require_control_flow.W[2] = require_control_flow.F;
|
|
5
5
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as _attr_input_value_script, W as controllableScripts } from "../dom-DHg9YChM.mjs";
|
|
2
2
|
//#region src/dom/controllable-textarea.feat.ts
|
|
3
3
|
controllableScripts[2] = _attr_input_value_script;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
3
|
-
require("./controllable-input.feat.js"), require("./controllable-open.feat.js"), require("./controllable-select.feat.js"), require_control_flow.
|
|
2
|
+
let require_control_flow = require("../dom-CtIT8Mpr.js");
|
|
3
|
+
require("./controllable-input.feat.js"), require("./controllable-open.feat.js"), require("./controllable-select.feat.js"), require_control_flow.U.INPUT = require_control_flow.z, require_control_flow.U.TEXTAREA = require_control_flow.H, require_control_flow.U.SELECT = require_control_flow.V, require_control_flow.U.DETAILS = require_control_flow.U.DIALOG = require_control_flow.B;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as
|
|
1
|
+
import { B as _controllable_open, H as _controllable_textarea, U as controllableRenders, V as _controllable_select, z as _controllable_input } from "../dom-DHg9YChM.mjs";
|
|
2
2
|
import "./controllable-input.feat.mjs";
|
|
3
3
|
import "./controllable-open.feat.mjs";
|
|
4
4
|
import "./controllable-select.feat.mjs";
|
package/dist/dom/dom.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare function _attr(element: Element, name: string, value: unknown): v
|
|
|
5
5
|
export declare function _attr_class(element: Element, value: unknown): void;
|
|
6
6
|
export declare function _attr_class_items(element: Element, items: Record<string, unknown>): void;
|
|
7
7
|
export declare function _attr_class_item(element: Element, name: string, value: unknown): void;
|
|
8
|
+
export declare function _attr_class_names(element: Element, names: string, value: unknown): void;
|
|
8
9
|
export declare function _attr_style(element: Element, value: unknown): void;
|
|
9
10
|
export declare function _attr_style_items(element: HTMLElement, items: Record<string, unknown>): void;
|
|
10
11
|
export declare function _attr_style_item(element: HTMLElement, name: string, value: unknown): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-CtIT8Mpr.js");
|
|
3
3
|
//#region src/dom/dynamic-tag-script.feat.ts
|
|
4
|
-
require_control_flow.
|
|
4
|
+
require_control_flow.wt._d = require_control_flow.Tn(require_control_flow._);
|
|
5
5
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Tn as withBranches, _ as dynamicTagScript, wt as _resumed } from "../dom-DHg9YChM.mjs";
|
|
2
2
|
//#region src/dom/dynamic-tag-script.feat.ts
|
|
3
3
|
_resumed._d = withBranches(dynamicTagScript);
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
let require_control_flow = require("../dom-CtIT8Mpr.js");
|
|
3
|
+
require_control_flow.sn(), require_control_flow.v((scope, branch, scopeKey, renderer) => {
|
|
4
|
+
branch.BR = require_control_flow.on(scope, scopeKey), typeof renderer == "string" && branch.T(() => branch.S);
|
|
5
|
+
});
|
|
4
6
|
//#endregion
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { on as createBranchRenders, sn as installBranchRenders, v as installDynamicTagVar } from "../dom-DHg9YChM.mjs";
|
|
2
|
+
installBranchRenders(), installDynamicTagVar((scope, branch, scopeKey, renderer) => {
|
|
3
|
+
branch.BR = createBranchRenders(scope, scopeKey), typeof renderer == "string" && branch.T(() => branch.S);
|
|
4
|
+
});
|
|
4
5
|
//#endregion
|
package/dist/dom/lazy.feat.js
CHANGED
package/dist/dom/lazy.feat.mjs
CHANGED
package/dist/dom/load.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export interface LoadTrigger {
|
|
|
12
12
|
}
|
|
13
13
|
export declare function _load_template(id: string, load: () => Promise<Renderer>): Template & Renderer;
|
|
14
14
|
export declare function _load_setup(load: () => Promise<LoadModule>): (owner: Scope, child: BranchScope, marker: ChildNode) => void;
|
|
15
|
+
export declare function _load_setup_var(load: () => Promise<LoadModule>): (owner: Scope, child: BranchScope, marker: ChildNode) => void;
|
|
15
16
|
export declare function _load_signal(load: () => Promise<LoadSignal>): Signal;
|
|
16
17
|
export declare function _load_visible_trigger(selector: string, options?: IntersectionObserverInit): LoadTrigger;
|
|
17
18
|
export declare function _load_idle_trigger(options?: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-CtIT8Mpr.js");
|
|
3
3
|
//#region src/dom/placeholder.feat.ts
|
|
4
|
-
require_control_flow.
|
|
5
|
-
tryBranch.P &&= (require_control_flow
|
|
4
|
+
require_control_flow.wt._f = (tryBranch) => {
|
|
5
|
+
tryBranch.P &&= (require_control_flow.$t(tryBranch.P), 0);
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $t as destroyBranch, wt as _resumed } from "../dom-DHg9YChM.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
|
@@ -13,7 +13,9 @@ export declare let rendering: undefined | 0 | 1;
|
|
|
13
13
|
export declare let runId: number;
|
|
14
14
|
export declare let pendingEffects: unknown[];
|
|
15
15
|
export declare function queueRender<T, U extends Scope = Scope>(scope: U, signal: Signal<T, U>, signalKey: number, value?: T, scopeKey?: number): void;
|
|
16
|
-
export declare
|
|
16
|
+
export declare let queuePendingRender: (render: PendingRender) => void;
|
|
17
|
+
export declare function createBranchRenders(scope: Scope, scopeKey: number): PendingRender;
|
|
18
|
+
export declare function installBranchRenders(): void;
|
|
17
19
|
export declare function queueEffect<S extends Scope, T extends ExecFn<S>>(scope: S, fn: T): void;
|
|
18
20
|
export declare function run(): void;
|
|
19
21
|
export declare function queueAsyncRender<T, U extends Scope = Scope>(scope: U, signal: Signal<T, U>, value?: T): void;
|
|
@@ -21,4 +23,5 @@ export declare function prepareEffects(fn: () => void): unknown[];
|
|
|
21
23
|
export declare let runEffects: (effects: unknown[]) => void;
|
|
22
24
|
declare let runRender: (render: PendingRender) => void;
|
|
23
25
|
export declare function installCatch(catchEffects: typeof runEffects, wrapRender: (base: typeof runRender) => typeof runRender): void;
|
|
26
|
+
export declare function runRenders(renders?: PendingRender[]): void;
|
|
24
27
|
export {};
|