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.
Files changed (80) hide show
  1. package/cheatsheet.md +1 -1
  2. package/dist/common/constants/accessor-prop.d.ts +1 -0
  3. package/dist/common/constants/accessor-prop.debug.d.ts +1 -0
  4. package/dist/common/errors.d.ts +1 -0
  5. package/dist/common/opt.d.ts +1 -0
  6. package/dist/common/types.d.ts +1 -0
  7. package/dist/debug/dom/catch.feat.js +1 -1
  8. package/dist/debug/dom/catch.feat.mjs +1 -1
  9. package/dist/debug/dom/controllable-input.feat.js +1 -1
  10. package/dist/debug/dom/controllable-input.feat.mjs +1 -1
  11. package/dist/debug/dom/controllable-open.feat.js +1 -1
  12. package/dist/debug/dom/controllable-open.feat.mjs +1 -1
  13. package/dist/debug/dom/controllable-select.feat.js +1 -1
  14. package/dist/debug/dom/controllable-select.feat.mjs +1 -1
  15. package/dist/debug/dom/controllable-textarea.feat.js +1 -1
  16. package/dist/debug/dom/controllable-textarea.feat.mjs +1 -1
  17. package/dist/debug/dom/controllable.feat.js +1 -1
  18. package/dist/debug/dom/controllable.feat.mjs +1 -1
  19. package/dist/debug/dom/dynamic-tag-script.feat.js +1 -1
  20. package/dist/debug/dom/dynamic-tag-script.feat.mjs +1 -1
  21. package/dist/debug/dom/dynamic-tag-var.feat.js +6 -2
  22. package/dist/debug/dom/dynamic-tag-var.feat.mjs +6 -2
  23. package/dist/debug/dom/lazy.feat.js +1 -1
  24. package/dist/debug/dom/lazy.feat.mjs +1 -1
  25. package/dist/debug/dom/placeholder.feat.js +1 -1
  26. package/dist/debug/dom/placeholder.feat.mjs +1 -1
  27. package/dist/debug/{dom-ClV4kVOO.js → dom-C7F3yZTh.js} +119 -24
  28. package/dist/debug/{dom-LFrKxOk5.mjs → dom-uEY0J_H9.mjs} +78 -25
  29. package/dist/debug/dom.js +16 -4
  30. package/dist/debug/dom.mjs +14 -5
  31. package/dist/debug/html.js +288 -78
  32. package/dist/debug/html.mjs +288 -79
  33. package/dist/dom/catch.feat.js +4 -4
  34. package/dist/dom/catch.feat.mjs +1 -1
  35. package/dist/dom/control-flow.d.ts +2 -2
  36. package/dist/dom/controllable-input.feat.js +2 -2
  37. package/dist/dom/controllable-input.feat.mjs +1 -1
  38. package/dist/dom/controllable-open.feat.js +2 -2
  39. package/dist/dom/controllable-open.feat.mjs +1 -1
  40. package/dist/dom/controllable-select.feat.js +2 -2
  41. package/dist/dom/controllable-select.feat.mjs +1 -1
  42. package/dist/dom/controllable-textarea.feat.js +2 -2
  43. package/dist/dom/controllable-textarea.feat.mjs +1 -1
  44. package/dist/dom/controllable.feat.js +2 -2
  45. package/dist/dom/controllable.feat.mjs +1 -1
  46. package/dist/dom/dom.d.ts +1 -0
  47. package/dist/dom/dynamic-tag-script.feat.js +2 -2
  48. package/dist/dom/dynamic-tag-script.feat.mjs +1 -1
  49. package/dist/dom/dynamic-tag-var.feat.js +4 -2
  50. package/dist/dom/dynamic-tag-var.feat.mjs +4 -3
  51. package/dist/dom/lazy.feat.js +1 -1
  52. package/dist/dom/lazy.feat.mjs +1 -1
  53. package/dist/dom/load.d.ts +1 -0
  54. package/dist/dom/placeholder.feat.js +3 -3
  55. package/dist/dom/placeholder.feat.mjs +1 -1
  56. package/dist/dom/queue.d.ts +4 -1
  57. package/dist/{dom-CNglVi8P.js → dom-CtIT8Mpr.js} +201 -138
  58. package/dist/{dom-DfP3MCo0.mjs → dom-DHg9YChM.mjs} +60 -27
  59. package/dist/dom.d.ts +3 -3
  60. package/dist/dom.js +41 -34
  61. package/dist/dom.mjs +12 -5
  62. package/dist/html/assets.d.ts +12 -6
  63. package/dist/html/attrs.d.ts +1 -0
  64. package/dist/html/compat.d.ts +10 -2
  65. package/dist/html/serializer.d.ts +1 -0
  66. package/dist/html/writer.d.ts +8 -0
  67. package/dist/html.d.ts +1 -1
  68. package/dist/html.js +207 -62
  69. package/dist/html.mjs +207 -62
  70. package/dist/translator/index.js +432 -213
  71. package/dist/translator/util/bindings.d.ts +9 -1
  72. package/dist/translator/util/constants/structure-kind.d.ts +1 -0
  73. package/dist/translator/util/known-tag.d.ts +2 -1
  74. package/dist/translator/util/module-read.d.ts +21 -0
  75. package/dist/translator/util/references.d.ts +1 -0
  76. package/dist/translator/util/runtime.d.ts +2 -0
  77. package/dist/translator/util/sections.d.ts +5 -1
  78. package/dist/translator/util/structure.d.ts +1 -0
  79. package/package.json +3 -3
  80. package/tags-html.d.ts +6 -5
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
- let require_control_flow = require("../dom-CNglVi8P.js"), handlePendingTry = (fn, scope, branch) => {
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.an(branch, require_control_flow.on, require_control_flow.b))(branch.O.c), [])).push(scope), /* @__PURE__ */ new Set())).add(fn);
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.rn((effects) => {
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.y(render.b, error);
21
+ require_control_flow.b(render.b, error);
22
22
  }
23
23
  });
24
24
  //#endregion
@@ -4,7 +4,7 @@ let handlePendingTry = (fn, scope, branch) => {
4
4
  branch = branch.N;
5
5
  }
6
6
  };
7
- import { an as queueAsyncRender, b as runPendingEffects, on as queueEffect, rn as installCatch, y as renderCatch } from "../dom-DfP3MCo0.mjs";
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 bindNativeTagVar: undefined | ((branch: Scope) => void);
17
- export declare function installDynamicTagVar(bind: typeof bindNativeTagVar): void;
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-CNglVi8P.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;
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 { D as _attr_input_checkedValue_script, P as _attr_input_value_script, U as controllableScripts, k as _attr_input_checked_script } from "../dom-DfP3MCo0.mjs";
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-CNglVi8P.js");
2
+ let require_control_flow = require("../dom-CtIT8Mpr.js");
3
3
  //#region src/dom/controllable-open.feat.ts
4
- require_control_flow.U[4] = require_control_flow.C;
4
+ require_control_flow.W[4] = require_control_flow.w;
5
5
  //#endregion
@@ -1,4 +1,4 @@
1
- import { C as _attr_details_or_dialog_open_script, U as controllableScripts } from "../dom-DfP3MCo0.mjs";
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-CNglVi8P.js");
2
+ let require_control_flow = require("../dom-CtIT8Mpr.js");
3
3
  //#region src/dom/controllable-select.feat.ts
4
- require_control_flow.U[3] = require_control_flow.L;
4
+ require_control_flow.W[3] = require_control_flow.R;
5
5
  //#endregion
@@ -1,4 +1,4 @@
1
- import { L as _attr_select_value_script, U as controllableScripts } from "../dom-DfP3MCo0.mjs";
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-CNglVi8P.js");
2
+ let require_control_flow = require("../dom-CtIT8Mpr.js");
3
3
  //#region src/dom/controllable-textarea.feat.ts
4
- require_control_flow.U[2] = require_control_flow.P;
4
+ require_control_flow.W[2] = require_control_flow.F;
5
5
  //#endregion
@@ -1,4 +1,4 @@
1
- import { P as _attr_input_value_script, U as controllableScripts } from "../dom-DfP3MCo0.mjs";
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-CNglVi8P.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;
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 _controllable_select, H as controllableRenders, R as _controllable_input, V as _controllable_textarea, z as _controllable_open } from "../dom-DfP3MCo0.mjs";
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-CNglVi8P.js");
2
+ let require_control_flow = require("../dom-CtIT8Mpr.js");
3
3
  //#region src/dom/dynamic-tag-script.feat.ts
4
- require_control_flow.xt._d = require_control_flow.yn(require_control_flow.g);
4
+ require_control_flow.wt._d = require_control_flow.Tn(require_control_flow._);
5
5
  //#endregion
@@ -1,4 +1,4 @@
1
- import { g as dynamicTagScript, xt as _resumed, yn as withBranches } from "../dom-DfP3MCo0.mjs";
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
- //#region src/dom/dynamic-tag-var.feat.ts
3
- require("../dom-CNglVi8P.js")._((branch) => branch.T(() => branch.S));
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 { _ as installDynamicTagVar } from "../dom-DfP3MCo0.mjs";
2
- //#region src/dom/dynamic-tag-var.feat.ts
3
- installDynamicTagVar((branch) => branch.T(() => branch.S));
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
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  //#region src/dom/lazy.feat.ts
3
- require("../dom-CNglVi8P.js").Ot();
3
+ require("../dom-CtIT8Mpr.js").jt();
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- import { Ot as withLazy } from "../dom-DfP3MCo0.mjs";
1
+ import { jt as withLazy } from "../dom-DHg9YChM.mjs";
2
2
  //#region src/dom/lazy.feat.ts
3
3
  withLazy();
4
4
  //#endregion
@@ -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-CNglVi8P.js");
2
+ let require_control_flow = require("../dom-CtIT8Mpr.js");
3
3
  //#region src/dom/placeholder.feat.ts
4
- require_control_flow.xt._f = (tryBranch) => {
5
- tryBranch.P &&= (require_control_flow.Xt(tryBranch.P), 0);
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 { Xt as destroyBranch, xt as _resumed } from "../dom-DfP3MCo0.mjs";
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);
@@ -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 function queuePendingRender(render: PendingRender): void;
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 {};