marko 6.4.14 → 6.4.16

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 (81) hide show
  1. package/dist/debug/dom/catch.feat.js +1 -1
  2. package/dist/debug/dom/catch.feat.mjs +1 -1
  3. package/dist/debug/dom/compat.feat.js +1 -1
  4. package/dist/debug/dom/compat.feat.mjs +1 -1
  5. package/dist/debug/dom/controllable-input.feat.js +1 -1
  6. package/dist/debug/dom/controllable-input.feat.mjs +1 -1
  7. package/dist/debug/dom/controllable-open.feat.js +1 -1
  8. package/dist/debug/dom/controllable-open.feat.mjs +1 -1
  9. package/dist/debug/dom/controllable-select.feat.js +1 -1
  10. package/dist/debug/dom/controllable-select.feat.mjs +1 -1
  11. package/dist/debug/dom/controllable-textarea.feat.js +1 -1
  12. package/dist/debug/dom/controllable-textarea.feat.mjs +1 -1
  13. package/dist/debug/dom/controllable.feat.js +1 -1
  14. package/dist/debug/dom/controllable.feat.mjs +1 -1
  15. package/dist/debug/dom/dynamic-tag-script.feat.js +1 -1
  16. package/dist/debug/dom/dynamic-tag-script.feat.mjs +1 -1
  17. package/dist/debug/dom/dynamic-tag-var.feat.js +1 -1
  18. package/dist/debug/dom/dynamic-tag-var.feat.mjs +1 -1
  19. package/dist/debug/dom/lazy.feat.js +1 -1
  20. package/dist/debug/dom/lazy.feat.mjs +1 -1
  21. package/dist/debug/dom/placeholder.feat.js +1 -1
  22. package/dist/debug/dom/placeholder.feat.mjs +1 -1
  23. package/dist/debug/{dom-sfzdCRAg.js → dom-BLoTKI2r.js} +3 -3
  24. package/dist/debug/{dom-BORByF2b.mjs → dom-DlBA4dCe.mjs} +2 -2
  25. package/dist/debug/dom.js +3 -2
  26. package/dist/debug/dom.mjs +2 -2
  27. package/dist/debug/html/compat.feat.js +1 -1
  28. package/dist/debug/html/compat.feat.mjs +1 -1
  29. package/dist/debug/{html-DMo6pc_h.mjs → html-DM7X2D_b.mjs} +37 -29
  30. package/dist/debug/{html-DfZjMkhx.js → html-Du0z056z.js} +37 -29
  31. package/dist/debug/html.js +1 -1
  32. package/dist/debug/html.mjs +1 -1
  33. package/dist/dom/catch.feat.js +1 -1
  34. package/dist/dom/catch.feat.mjs +1 -1
  35. package/dist/dom/compat.feat.js +1 -1
  36. package/dist/dom/compat.feat.mjs +1 -1
  37. package/dist/dom/controllable-input.feat.js +1 -1
  38. package/dist/dom/controllable-input.feat.mjs +1 -1
  39. package/dist/dom/controllable-open.feat.js +1 -1
  40. package/dist/dom/controllable-open.feat.mjs +1 -1
  41. package/dist/dom/controllable-select.feat.js +1 -1
  42. package/dist/dom/controllable-select.feat.mjs +1 -1
  43. package/dist/dom/controllable-textarea.feat.js +1 -1
  44. package/dist/dom/controllable-textarea.feat.mjs +1 -1
  45. package/dist/dom/controllable.feat.js +1 -1
  46. package/dist/dom/controllable.feat.mjs +1 -1
  47. package/dist/dom/dynamic-tag-script.feat.js +1 -1
  48. package/dist/dom/dynamic-tag-script.feat.mjs +1 -1
  49. package/dist/dom/dynamic-tag-var.feat.js +1 -1
  50. package/dist/dom/dynamic-tag-var.feat.mjs +1 -1
  51. package/dist/dom/lazy.feat.js +1 -1
  52. package/dist/dom/lazy.feat.mjs +1 -1
  53. package/dist/dom/placeholder.feat.js +1 -1
  54. package/dist/dom/placeholder.feat.mjs +1 -1
  55. package/dist/dom/renderer.d.ts +1 -1
  56. package/dist/{dom-DRiewpRL.js → dom-BRtFOIF-.js} +2 -2
  57. package/dist/{dom-DKn1bCPC.mjs → dom-Cqajrs_w.mjs} +2 -2
  58. package/dist/dom.d.ts +1 -1
  59. package/dist/dom.js +2 -2
  60. package/dist/dom.mjs +2 -2
  61. package/dist/html/assets.d.ts +1 -1
  62. package/dist/html/compat.feat.js +1 -1
  63. package/dist/html/compat.feat.mjs +1 -1
  64. package/dist/html/control-flow.d.ts +9 -9
  65. package/dist/html/for.d.ts +3 -3
  66. package/dist/html/inlined-runtimes.d.ts +1 -1
  67. package/dist/html/inlined-runtimes.debug.d.ts +1 -1
  68. package/dist/html/serializer.d.ts +2 -0
  69. package/dist/html/writer.d.ts +3 -2
  70. package/dist/{html-DrHsybFm.js → html-4A3vJpIT.js} +32 -32
  71. package/dist/{html-DMDc0zKs.mjs → html-C3dQGQ2x.mjs} +32 -32
  72. package/dist/html.js +1 -1
  73. package/dist/html.mjs +1 -1
  74. package/dist/translator/index.js +251 -160
  75. package/dist/translator/interop/build-aggregate-error.d.ts +1 -1
  76. package/dist/translator/util/cyclic-memo.d.ts +2 -0
  77. package/dist/translator/util/sections.d.ts +1 -0
  78. package/dist/translator/util/solve-reasons.d.ts +6 -4
  79. package/dist/translator/util/write-guard.d.ts +2 -0
  80. package/dist/translator/util/writer.d.ts +1 -2
  81. package/package.json +4 -4
@@ -1,2 +1,2 @@
1
1
  import type { types as t } from "@marko/compiler";
2
- export declare function buildAggregateError(file: t.BabelFile, rootMsg: string, ...paths: [string, t.NodePath][]): SyntaxError;
2
+ export declare function buildAggregateError(file: t.BabelFile, rootMsg: string, ...features: [string, t.Node][]): SyntaxError;
@@ -4,5 +4,7 @@ export declare function createAnalysisMemo<K extends object, R>(compute: (key: K
4
4
  export declare function createPassMemo<K extends object, R>(compute: (key: K) => R, cycleAnswer: R): (key: K) => R;
5
5
  export declare function resetPassMemos(): void;
6
6
  type MemoPath = Opt<string> | true;
7
+ type PathKey<K> = [K, MemoPath];
7
8
  export declare function createPassPathMemo<K extends object, R>(compute: (key: K, path: MemoPath) => R, cycleAnswer: R): (key: K, path: MemoPath) => R;
9
+ export declare function createPathKeys<K extends object>(): (key: K, path: MemoPath) => PathKey<K>;
8
10
  export {};
@@ -168,6 +168,7 @@ export declare function getRendererReason(section: Section): false | Sources;
168
168
  export declare function isOptionalBranch(section: Section): section is Section & {
169
169
  branch: NonNullable<Section["branch"]>;
170
170
  };
171
+ export declare function isLoopBody(section: Section): boolean;
171
172
  export declare function isInParentSection(binding: Binding, section: Section): boolean;
172
173
  export declare function isDirectClosure(section: Section, closure: Binding): boolean;
173
174
  export declare function isDynamicClosure(section: Section, closure: Binding): boolean;
@@ -7,9 +7,11 @@ export declare function solveReasons(intersectionsBySection: Map<Section, Inters
7
7
  export declare function getReasonForBinding(binding: Binding, properties?: Opt<string> | true): undefined | Reason;
8
8
  export declare function getReasonForExpr(extra: t.NodeExtra): undefined | Reason;
9
9
  export declare function bindingLandsRetained(binding: Binding, properties: Opt<string>): boolean;
10
- export declare function getContentSites({ binding, properties, }: NonNullable<Section["derives"]>): {
10
+ export declare function getContentSites({ binding, properties, }: NonNullable<Section["derives"]>): ContentSites;
11
+ interface ContentSites {
11
12
  unseen: boolean;
12
- sites: Opt<t.MarkoTagExtra>;
13
- deepSites: Opt<t.MarkoTagExtra>;
14
- };
13
+ sites?: Opt<t.MarkoTagExtra>;
14
+ deepSites?: Opt<t.MarkoTagExtra>;
15
+ }
15
16
  export declare function landsRetained(extra: t.NodeExtra): boolean;
17
+ export {};
@@ -10,6 +10,8 @@ export declare function buildGroupMask(groups: {
10
10
  }[]): t.Expression | undefined;
11
11
  export declare function getScopeReasonStatement(section: Section): t.Statement;
12
12
  export declare function getWriteReason(binding: Binding): Sources | undefined;
13
+ export declare function getMarkerGuard(nodeBinding: Binding): t.Expression | undefined;
14
+ export declare function isMarkerWritten(nodeBinding: Binding): boolean;
13
15
  export declare function getBranchWriteReason(section: Section): Sources | undefined;
14
16
  export declare function isBranchAlwaysMarked(section: Section): boolean;
15
17
  export declare function getWriteGuard(section: Section, reason: undefined | Reason, omitUnconditional: boolean): t.Expression | undefined;
@@ -1,9 +1,8 @@
1
1
  import { types as t } from "@marko/compiler";
2
2
  import { type Binding } from "./bindings";
3
- import type { Reason } from "./reasons";
4
3
  type Write = string | t.Expression | (() => undefined | string | t.Expression);
5
4
  export declare function writeTo(path: t.NodePath<any>, trailer?: boolean): (strs: TemplateStringsArray, ...exprs: Write[]) => void;
6
5
  export declare function flushBefore(path: t.NodePath<any>): void;
7
6
  export declare function flushInto(path: t.NodePath<t.MarkoTag> | t.NodePath<t.Program>): t.NodePath<t.MarkoTagBody | t.Program>;
8
- export declare function markNode(path: t.NodePath<t.MarkoTag | t.MarkoPlaceholder>, nodeBinding: Binding, reason: undefined | false | Reason, deferred?: boolean): void;
7
+ export declare function markNode(path: t.NodePath<t.MarkoTag | t.MarkoPlaceholder>, nodeBinding: Binding, deferred?: boolean): void;
9
8
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "6.4.14",
3
+ "version": "6.4.16",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",
@@ -51,14 +51,14 @@
51
51
  }
52
52
  },
53
53
  "dependencies": {
54
- "@marko/compiler": "^5.43.0",
54
+ "@marko/compiler": "^5.43.4",
55
55
  "csstype": "^3.2.3",
56
56
  "fastest-levenshtein": "^1.0.16",
57
57
  "magic-string": "^1.4.5"
58
58
  },
59
59
  "devDependencies": {
60
- "@marko/runtime-tags": "npm:marko@6.4.14",
61
- "marko": "5.40.1"
60
+ "@marko/runtime-tags": "npm:marko@6.4.16",
61
+ "marko": "5.40.4"
62
62
  },
63
63
  "engines": {
64
64
  "node": ">=22.12.0"