marko 6.3.19 → 6.3.21

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 (64) hide show
  1. package/cheatsheet.md +29 -3
  2. package/dist/common/accessor.d.ts +21 -75
  3. package/dist/common/accessor.debug.d.ts +21 -75
  4. package/dist/common/constants/accessor-prefix.d.ts +16 -0
  5. package/dist/common/constants/accessor-prefix.debug.d.ts +16 -0
  6. package/dist/common/constants/accessor-prop.d.ts +30 -0
  7. package/dist/common/constants/accessor-prop.debug.d.ts +30 -0
  8. package/dist/common/constants/closure-signal-prop.d.ts +6 -0
  9. package/dist/common/constants/closure-signal-prop.debug.d.ts +6 -0
  10. package/dist/common/constants/controlled-type.d.ts +9 -0
  11. package/dist/common/constants/keyed-scopes-prop.d.ts +4 -0
  12. package/dist/common/constants/keyed-scopes-prop.debug.d.ts +4 -0
  13. package/dist/common/constants/load-signal-value.d.ts +5 -0
  14. package/dist/common/constants/load-signal-value.debug.d.ts +5 -0
  15. package/dist/common/constants/node-type.d.ts +7 -0
  16. package/dist/common/constants/pending-render-prop.d.ts +9 -0
  17. package/dist/common/constants/pending-render-prop.debug.d.ts +9 -0
  18. package/dist/common/constants/renderer-prop.d.ts +12 -0
  19. package/dist/common/constants/renderer-prop.debug.d.ts +12 -0
  20. package/dist/common/constants/resume-symbol.d.ts +10 -0
  21. package/dist/common/constants/walk-code.d.ts +17 -0
  22. package/dist/common/constants/walk-range-size.d.ts +7 -0
  23. package/dist/common/types.d.ts +15 -45
  24. package/dist/debug/dom.js +291 -225
  25. package/dist/debug/dom.mjs +291 -225
  26. package/dist/debug/html.js +189 -42
  27. package/dist/debug/html.mjs +189 -42
  28. package/dist/dom/compat.d.ts +1 -1
  29. package/dist/dom/control-flow.d.ts +1 -1
  30. package/dist/dom/renderer.d.ts +2 -2
  31. package/dist/dom/scope.d.ts +1 -1
  32. package/dist/dom.js +8 -6
  33. package/dist/dom.mjs +8 -6
  34. package/dist/html/constants/char.d.ts +11 -0
  35. package/dist/html/constants/flush-status.d.ts +6 -0
  36. package/dist/html/constants/mark.d.ts +6 -0
  37. package/dist/html/constants/runtime-key.d.ts +7 -0
  38. package/dist/html/writer.d.ts +19 -23
  39. package/dist/html.js +128 -29
  40. package/dist/html.mjs +128 -29
  41. package/dist/translator/core/if.d.ts +7 -7
  42. package/dist/translator/core/index.d.ts +7 -7
  43. package/dist/translator/index.d.ts +9 -9
  44. package/dist/translator/index.js +191 -133
  45. package/dist/translator/interop/constants/feature-type.d.ts +5 -0
  46. package/dist/translator/interop/index.d.ts +2 -2
  47. package/dist/translator/util/body-to-text-literal.d.ts +2 -2
  48. package/dist/translator/util/constants/binding-type.d.ts +10 -0
  49. package/dist/translator/util/constants/compile-stage.d.ts +8 -0
  50. package/dist/translator/util/constants/content-type.d.ts +8 -0
  51. package/dist/translator/util/constants/step.d.ts +5 -0
  52. package/dist/translator/util/constants/tag-name-type.d.ts +7 -0
  53. package/dist/translator/util/is-static.d.ts +1 -1
  54. package/dist/translator/util/references.d.ts +5 -12
  55. package/dist/translator/util/sections.d.ts +4 -8
  56. package/dist/translator/util/signals.d.ts +1 -0
  57. package/dist/translator/util/tag-name-type.d.ts +4 -7
  58. package/dist/translator/util/walks.d.ts +4 -6
  59. package/dist/translator/visitors/constants/sibling-text.d.ts +7 -0
  60. package/dist/translator/visitors/placeholder.d.ts +2 -6
  61. package/dist/translator/visitors/tag/constants/class-hydration.d.ts +5 -0
  62. package/dist/translator/visitors/tag/dynamic-tag.d.ts +2 -4
  63. package/package.json +16 -16
  64. package/tags-html.d.ts +98 -22
@@ -2,11 +2,6 @@ import { types as t } from "@marko/compiler";
2
2
  import { type Tag } from "@marko/compiler/babel-utils";
3
3
  export declare const IfTag: Tag;
4
4
  export declare const ElseIfTag: {
5
- autocomplete: {
6
- snippet: string;
7
- description: string;
8
- descriptionMoreURL: string;
9
- }[];
10
5
  attributeGroups?: string[];
11
6
  patternAttributes?: import("@marko/compiler/babel-utils").Attribute[];
12
7
  attributes?: {
@@ -43,12 +38,13 @@ export declare const ElseIfTag: {
43
38
  text?: boolean;
44
39
  html?: boolean;
45
40
  };
46
- };
47
- export declare const ElseTag: {
48
41
  autocomplete: {
42
+ snippet: string;
49
43
  description: string;
50
44
  descriptionMoreURL: string;
51
45
  }[];
46
+ };
47
+ export declare const ElseTag: {
52
48
  attributeGroups?: string[];
53
49
  patternAttributes?: import("@marko/compiler/babel-utils").Attribute[];
54
50
  attributes?: {
@@ -85,5 +81,9 @@ export declare const ElseTag: {
85
81
  text?: boolean;
86
82
  html?: boolean;
87
83
  };
84
+ autocomplete: {
85
+ description: string;
86
+ descriptionMoreURL: string;
87
+ }[];
88
88
  };
89
89
  export declare function flattenTextOnlyConditional(rootTag: t.NodePath<t.MarkoTag>): void;
@@ -9,11 +9,6 @@ declare const _default: {
9
9
  "<define>": import("@marko/compiler/babel-utils").Tag;
10
10
  "<effect>": import("@marko/compiler/babel-utils").Tag;
11
11
  "<else-if>": {
12
- autocomplete: {
13
- snippet: string;
14
- description: string;
15
- descriptionMoreURL: string;
16
- }[];
17
12
  attributeGroups?: string[];
18
13
  patternAttributes?: import("@marko/compiler/babel-utils").Attribute[];
19
14
  attributes?: {
@@ -50,12 +45,13 @@ declare const _default: {
50
45
  text?: boolean;
51
46
  html?: boolean;
52
47
  };
53
- };
54
- "<else>": {
55
48
  autocomplete: {
49
+ snippet: string;
56
50
  description: string;
57
51
  descriptionMoreURL: string;
58
52
  }[];
53
+ };
54
+ "<else>": {
59
55
  attributeGroups?: string[];
60
56
  patternAttributes?: import("@marko/compiler/babel-utils").Attribute[];
61
57
  attributes?: {
@@ -92,6 +88,10 @@ declare const _default: {
92
88
  text?: boolean;
93
89
  html?: boolean;
94
90
  };
91
+ autocomplete: {
92
+ description: string;
93
+ descriptionMoreURL: string;
94
+ }[];
95
95
  };
96
96
  "<export>": import("@marko/compiler/babel-utils").Tag;
97
97
  "<for>": import("@marko/compiler/babel-utils").Tag;
@@ -1,12 +1,11 @@
1
1
  import type { Config } from "@marko/compiler";
2
- export { version } from "../../package.json";
2
+ export declare const version: string;
3
3
  export declare const cheatsheet = "../../cheatsheet.md";
4
4
  export declare const tagDiscoveryDirs: string[];
5
5
  export { default as internalEntryBuilder } from "./util/entry-builder";
6
6
  export declare const preferAPI = "tags";
7
7
  export declare const transform: import("@marko/compiler/babel-types").Visitor<unknown>, analyze: import("@marko/compiler/babel-types").Visitor<unknown>, translate: import("@marko/compiler/babel-types").Visitor<unknown>;
8
8
  export declare const taglibs: (string | {
9
- migrate: import("@marko/compiler/babel-types").Visitor<unknown>;
10
9
  taglibId: string;
11
10
  "<attrs>": import("@marko/compiler/babel-utils").Tag;
12
11
  "<await>": import("@marko/compiler/babel-utils").Tag;
@@ -17,11 +16,6 @@ export declare const taglibs: (string | {
17
16
  "<define>": import("@marko/compiler/babel-utils").Tag;
18
17
  "<effect>": import("@marko/compiler/babel-utils").Tag;
19
18
  "<else-if>": {
20
- autocomplete: {
21
- snippet: string;
22
- description: string;
23
- descriptionMoreURL: string;
24
- }[];
25
19
  attributeGroups?: string[];
26
20
  patternAttributes?: import("@marko/compiler/babel-utils").Attribute[];
27
21
  attributes?: {
@@ -58,12 +52,13 @@ export declare const taglibs: (string | {
58
52
  text?: boolean;
59
53
  html?: boolean;
60
54
  };
61
- };
62
- "<else>": {
63
55
  autocomplete: {
56
+ snippet: string;
64
57
  description: string;
65
58
  descriptionMoreURL: string;
66
59
  }[];
60
+ };
61
+ "<else>": {
67
62
  attributeGroups?: string[];
68
63
  patternAttributes?: import("@marko/compiler/babel-utils").Attribute[];
69
64
  attributes?: {
@@ -100,6 +95,10 @@ export declare const taglibs: (string | {
100
95
  text?: boolean;
101
96
  html?: boolean;
102
97
  };
98
+ autocomplete: {
99
+ description: string;
100
+ descriptionMoreURL: string;
101
+ }[];
103
102
  };
104
103
  "<export>": import("@marko/compiler/babel-utils").Tag;
105
104
  "<for>": import("@marko/compiler/babel-utils").Tag;
@@ -119,6 +118,7 @@ export declare const taglibs: (string | {
119
118
  "<static>": import("@marko/compiler/babel-utils").Tag;
120
119
  "<style>": import("@marko/compiler/babel-utils").Tag;
121
120
  "<try>": import("@marko/compiler/babel-utils").Tag;
121
+ migrate: import("@marko/compiler/babel-types").Visitor<unknown>;
122
122
  })[][];
123
123
  export declare function getRuntimeEntryFiles(output: Config["output"], optimize: boolean): string[];
124
124
  export { createInteropTranslator } from "./interop";
@@ -7,6 +7,15 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
7
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
8
  var __getProtoOf = Object.getPrototypeOf;
9
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __exportAll = (all, no_symbols) => {
11
+ let target = {};
12
+ for (var name in all) __defProp(target, name, {
13
+ get: all[name],
14
+ enumerable: true
15
+ });
16
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
17
+ return target;
18
+ };
10
19
  var __copyProps = (to, from, except, desc) => {
11
20
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
12
21
  key = keys[i];
@@ -23,21 +32,22 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
23
32
  }) : target, mod));
24
33
  //#endregion
25
34
  let package_json = require("../../package.json");
35
+ package_json = __toESM(package_json, 1);
26
36
  let _marko_compiler = require("@marko/compiler");
27
37
  let _marko_compiler_babel_utils = require("@marko/compiler/babel-utils");
28
38
  let node_path = require("node:path");
29
- node_path = __toESM(node_path);
39
+ node_path = __toESM(node_path, 1);
30
40
  let path = require("path");
31
- path = __toESM(path);
41
+ path = __toESM(path, 1);
32
42
  let magic_string = require("magic-string");
33
- magic_string = __toESM(magic_string);
43
+ magic_string = __toESM(magic_string, 1);
34
44
  let fastest_levenshtein = require("fastest-levenshtein");
35
45
  let _marko_compiler_internal_babel = require("@marko/compiler/internal/babel");
36
46
  let _marko_compiler_modules = require("@marko/compiler/modules");
37
- _marko_compiler_modules = __toESM(_marko_compiler_modules);
47
+ _marko_compiler_modules = __toESM(_marko_compiler_modules, 1);
38
48
  //#region src/translator/util/runtime-info.ts
39
49
  var runtime_info_default = {
40
- name: package_json.name,
50
+ name: package_json.default.name,
41
51
  taglibId: "marko-core"
42
52
  };
43
53
  //#endregion
@@ -93,53 +103,91 @@ var attrs_default = {
93
103
  }]
94
104
  };
95
105
  //#endregion
96
- //#region src/common/accessor.debug.ts
97
- let AccessorPrefix$1 = /* @__PURE__ */ function(AccessorPrefix) {
98
- AccessorPrefix["BranchScopes"] = "BranchScopes:";
99
- AccessorPrefix["ClosureScopes"] = "ClosureScopes:";
100
- AccessorPrefix["ClosureSignalIndex"] = "ClosureSignalIndex:";
101
- AccessorPrefix["ConditionalRenderer"] = "ConditionalRenderer:";
102
- AccessorPrefix["ControlledHandler"] = "ControlledHandler:";
103
- AccessorPrefix["ControlledType"] = "ControlledType:";
104
- AccessorPrefix["ControlledValue"] = "ControlledValue:";
105
- AccessorPrefix["DynamicHTMLLastChild"] = "DynamicHTMLLastChild:";
106
- AccessorPrefix["EventAttributes"] = "EventAttributes:";
107
- AccessorPrefix["KeyedScopes"] = "KeyedScopes:";
108
- AccessorPrefix["Lifecycle"] = "Lifecycle:";
109
- AccessorPrefix["Promise"] = "Promise:";
110
- AccessorPrefix["TagVariableChange"] = "TagVariableChange:";
111
- return AccessorPrefix;
112
- }({});
113
- let AccessorProp$1 = /* @__PURE__ */ function(AccessorProp) {
114
- AccessorProp["Global"] = "$global";
115
- AccessorProp["Owner"] = "_";
116
- AccessorProp["AbortControllers"] = "#AbortControllers";
117
- AccessorProp["AbortScopes"] = "#AbortScopes";
118
- AccessorProp["AwaitCounter"] = "#AwaitCounter";
119
- AccessorProp["BranchAccessor"] = "#BranchAccessor";
120
- AccessorProp["BranchScopes"] = "#BranchScopes";
121
- AccessorProp["CatchContent"] = "#CatchContent";
122
- AccessorProp["ClosestBranch"] = "#ClosestBranch";
123
- AccessorProp["ClosestBranchId"] = "#ClosestBranchId";
124
- AccessorProp["Gen"] = "#Gen";
125
- AccessorProp["DetachedAwait"] = "#DetachedAwait";
126
- AccessorProp["EndNode"] = "#EndNode";
127
- AccessorProp["Id"] = "#Id";
128
- AccessorProp["Load"] = "#Load";
129
- AccessorProp["LoopKey"] = "#LoopKey";
130
- AccessorProp["LoopIndex"] = "#LoopIndex";
131
- AccessorProp["ParentBranch"] = "#ParentBranch";
132
- AccessorProp["PendingEffects"] = "#PendingEffects";
133
- AccessorProp["PendingRenders"] = "#PendingRenders";
134
- AccessorProp["PendingScopes"] = "#PendingScopes";
135
- AccessorProp["PlaceholderBranch"] = "#PlaceholderBranch";
136
- AccessorProp["PlaceholderContent"] = "#PlaceholderContent";
137
- AccessorProp["Renderer"] = "#Renderer";
138
- AccessorProp["StartNode"] = "#StartNode";
139
- AccessorProp["TagVariable"] = "#TagVariable";
140
- AccessorProp["TagVariableChange"] = "#TagVariableChange";
141
- return AccessorProp;
142
- }({});
106
+ //#region src/common/constants/accessor-prefix.debug.ts
107
+ var accessor_prefix_debug_exports = /* @__PURE__ */ __exportAll({
108
+ BranchScopes: () => BranchScopes$3,
109
+ ClosureScopes: () => ClosureScopes$1,
110
+ ClosureSignalIndex: () => ClosureSignalIndex$1,
111
+ ConditionalRenderer: () => ConditionalRenderer$1,
112
+ ControlledHandler: () => ControlledHandler$1,
113
+ ControlledType: () => ControlledType$1,
114
+ ControlledValue: () => ControlledValue$1,
115
+ DynamicHTMLLastChild: () => DynamicHTMLLastChild$1,
116
+ EventAttributes: () => EventAttributes$1,
117
+ KeyedScopes: () => KeyedScopes$1,
118
+ Lifecycle: () => Lifecycle$1,
119
+ Promise: () => Promise$2,
120
+ TagVariableChange: () => TagVariableChange$3
121
+ });
122
+ const BranchScopes$3 = "BranchScopes:";
123
+ const ClosureScopes$1 = "ClosureScopes:";
124
+ const ClosureSignalIndex$1 = "ClosureSignalIndex:";
125
+ const ConditionalRenderer$1 = "ConditionalRenderer:";
126
+ const ControlledHandler$1 = "ControlledHandler:";
127
+ const ControlledType$1 = "ControlledType:";
128
+ const ControlledValue$1 = "ControlledValue:";
129
+ const DynamicHTMLLastChild$1 = "DynamicHTMLLastChild:";
130
+ const EventAttributes$1 = "EventAttributes:";
131
+ const KeyedScopes$1 = "KeyedScopes:";
132
+ const Lifecycle$1 = "Lifecycle:";
133
+ const Promise$2 = "Promise:";
134
+ const TagVariableChange$3 = "TagVariableChange:";
135
+ //#endregion
136
+ //#region src/common/constants/accessor-prop.debug.ts
137
+ var accessor_prop_debug_exports = /* @__PURE__ */ __exportAll({
138
+ AbortControllers: () => AbortControllers$1,
139
+ AbortScopes: () => AbortScopes$1,
140
+ AwaitCounter: () => AwaitCounter$1,
141
+ BranchAccessor: () => BranchAccessor$1,
142
+ BranchScopes: () => BranchScopes$2,
143
+ CatchContent: () => CatchContent$1,
144
+ ClosestBranch: () => ClosestBranch$1,
145
+ ClosestBranchId: () => ClosestBranchId$1,
146
+ DetachedAwait: () => DetachedAwait$1,
147
+ EndNode: () => EndNode$1,
148
+ Gen: () => Gen$1,
149
+ Global: () => Global$1,
150
+ Id: () => "#Id",
151
+ Load: () => Load$1,
152
+ LoopIndex: () => LoopIndex$1,
153
+ LoopKey: () => LoopKey$1,
154
+ Owner: () => "_",
155
+ ParentBranch: () => ParentBranch$1,
156
+ PendingEffects: () => PendingEffects$1,
157
+ PendingRenders: () => PendingRenders$1,
158
+ PendingScopes: () => PendingScopes$1,
159
+ PlaceholderBranch: () => PlaceholderBranch$1,
160
+ PlaceholderContent: () => PlaceholderContent$1,
161
+ Renderer: () => Renderer$1,
162
+ StartNode: () => StartNode$1,
163
+ TagVariable: () => TagVariable$1,
164
+ TagVariableChange: () => TagVariableChange$2
165
+ });
166
+ const Global$1 = "$global";
167
+ const AbortControllers$1 = "#AbortControllers";
168
+ const AbortScopes$1 = "#AbortScopes";
169
+ const AwaitCounter$1 = "#AwaitCounter";
170
+ const BranchAccessor$1 = "#BranchAccessor";
171
+ const BranchScopes$2 = "#BranchScopes";
172
+ const CatchContent$1 = "#CatchContent";
173
+ const ClosestBranch$1 = "#ClosestBranch";
174
+ const ClosestBranchId$1 = "#ClosestBranchId";
175
+ const Gen$1 = "#Gen";
176
+ const DetachedAwait$1 = "#DetachedAwait";
177
+ const EndNode$1 = "#EndNode";
178
+ const Load$1 = "#Load";
179
+ const LoopKey$1 = "#LoopKey";
180
+ const LoopIndex$1 = "#LoopIndex";
181
+ const ParentBranch$1 = "#ParentBranch";
182
+ const PendingEffects$1 = "#PendingEffects";
183
+ const PendingRenders$1 = "#PendingRenders";
184
+ const PendingScopes$1 = "#PendingScopes";
185
+ const PlaceholderBranch$1 = "#PlaceholderBranch";
186
+ const PlaceholderContent$1 = "#PlaceholderContent";
187
+ const Renderer$1 = "#Renderer";
188
+ const StartNode$1 = "#StartNode";
189
+ const TagVariable$1 = "#TagVariable";
190
+ const TagVariableChange$2 = "#TagVariableChange";
143
191
  //#endregion
144
192
  //#region src/translator/util/evaluate.ts
145
193
  function evaluate(value) {
@@ -335,9 +383,12 @@ function patchIteratorNext(proto) {
335
383
  proto.next[kTouchedIterator] = true;
336
384
  }
337
385
  //#endregion
386
+ //#region src/translator/util/constants/compile-stage.ts
387
+ const translate$1 = "translate";
388
+ //#endregion
338
389
  //#region src/translator/util/get-compile-stage.ts
339
390
  function isTranslate() {
340
- return getCompileStage() === "translate";
391
+ return getCompileStage() === translate$1;
341
392
  }
342
393
  function getCompileStage() {
343
394
  return (0, _marko_compiler_babel_utils.getFile)().___compileStage;
@@ -850,53 +901,53 @@ function joinRepeatable(compare, a, b) {
850
901
  return compareResult === 0 ? a : compareResult < 0 ? [a, b] : [b, a];
851
902
  }
852
903
  //#endregion
853
- //#region src/common/accessor.ts
854
- let AccessorPrefix = /* @__PURE__ */ function(AccessorPrefix) {
855
- AccessorPrefix["BranchScopes"] = "A";
856
- AccessorPrefix["ClosureScopes"] = "B";
857
- AccessorPrefix["ClosureSignalIndex"] = "C";
858
- AccessorPrefix["ConditionalRenderer"] = "D";
859
- AccessorPrefix["ControlledHandler"] = "E";
860
- AccessorPrefix["ControlledType"] = "F";
861
- AccessorPrefix["ControlledValue"] = "G";
862
- AccessorPrefix["DynamicHTMLLastChild"] = "H";
863
- AccessorPrefix["EventAttributes"] = "I";
864
- AccessorPrefix["KeyedScopes"] = "O";
865
- AccessorPrefix["Lifecycle"] = "K";
866
- AccessorPrefix["Promise"] = "L";
867
- AccessorPrefix["TagVariableChange"] = "M";
868
- return AccessorPrefix;
869
- }({});
870
- let AccessorProp = /* @__PURE__ */ function(AccessorProp) {
871
- AccessorProp["Global"] = "$";
872
- AccessorProp["Owner"] = "_";
873
- AccessorProp["AbortControllers"] = "A";
874
- AccessorProp["AbortScopes"] = "B";
875
- AccessorProp["AwaitCounter"] = "O";
876
- AccessorProp["BranchAccessor"] = "C";
877
- AccessorProp["BranchScopes"] = "D";
878
- AccessorProp["CatchContent"] = "E";
879
- AccessorProp["ClosestBranch"] = "F";
880
- AccessorProp["ClosestBranchId"] = "G";
881
- AccessorProp["Gen"] = "H";
882
- AccessorProp["DetachedAwait"] = "V";
883
- AccessorProp["EndNode"] = "K";
884
- AccessorProp["Id"] = "L";
885
- AccessorProp["Load"] = "X";
886
- AccessorProp["LoopKey"] = "M";
887
- AccessorProp["LoopIndex"] = "I";
888
- AccessorProp["ParentBranch"] = "N";
889
- AccessorProp["PendingEffects"] = "J";
890
- AccessorProp["PendingRenders"] = "W";
891
- AccessorProp["PendingScopes"] = "Y";
892
- AccessorProp["PlaceholderBranch"] = "P";
893
- AccessorProp["PlaceholderContent"] = "Q";
894
- AccessorProp["Renderer"] = "R";
895
- AccessorProp["StartNode"] = "S";
896
- AccessorProp["TagVariable"] = "T";
897
- AccessorProp["TagVariableChange"] = "U";
898
- return AccessorProp;
899
- }({});
904
+ //#region src/common/constants/accessor-prefix.ts
905
+ var accessor_prefix_exports = /* @__PURE__ */ __exportAll({
906
+ BranchScopes: () => "A",
907
+ ClosureScopes: () => "B",
908
+ ClosureSignalIndex: () => "C",
909
+ ConditionalRenderer: () => "D",
910
+ ControlledHandler: () => "E",
911
+ ControlledType: () => "F",
912
+ ControlledValue: () => "G",
913
+ DynamicHTMLLastChild: () => "H",
914
+ EventAttributes: () => "I",
915
+ KeyedScopes: () => "O",
916
+ Lifecycle: () => "K",
917
+ Promise: () => "L",
918
+ TagVariableChange: () => "M"
919
+ });
920
+ //#endregion
921
+ //#region src/common/constants/accessor-prop.ts
922
+ var accessor_prop_exports = /* @__PURE__ */ __exportAll({
923
+ AbortControllers: () => "A",
924
+ AbortScopes: () => "B",
925
+ AwaitCounter: () => "O",
926
+ BranchAccessor: () => "C",
927
+ BranchScopes: () => "D",
928
+ CatchContent: () => "E",
929
+ ClosestBranch: () => "F",
930
+ ClosestBranchId: () => "G",
931
+ DetachedAwait: () => "V",
932
+ EndNode: () => "K",
933
+ Gen: () => "H",
934
+ Global: () => "$",
935
+ Id: () => "L",
936
+ Load: () => "X",
937
+ LoopIndex: () => "I",
938
+ LoopKey: () => "M",
939
+ Owner: () => "_",
940
+ ParentBranch: () => "N",
941
+ PendingEffects: () => "J",
942
+ PendingRenders: () => "W",
943
+ PendingScopes: () => "Y",
944
+ PlaceholderBranch: () => "P",
945
+ PlaceholderContent: () => "Q",
946
+ Renderer: () => "R",
947
+ StartNode: () => "S",
948
+ TagVariable: () => "T",
949
+ TagVariableChange: () => "U"
950
+ });
900
951
  //#endregion
901
952
  //#region src/translator/util/marko-config.ts
902
953
  function isOutputHTML() {
@@ -919,10 +970,10 @@ function getReadyId(file = (0, _marko_compiler_babel_utils.getFile)()) {
919
970
  //#endregion
920
971
  //#region src/translator/util/get-accessor-char.ts
921
972
  function getAccessorPrefix() {
922
- return isOptimize() ? AccessorPrefix : AccessorPrefix$1;
973
+ return isOptimize() ? accessor_prefix_exports : accessor_prefix_debug_exports;
923
974
  }
924
975
  function getAccessorProp() {
925
- return isOptimize() ? AccessorProp : AccessorProp$1;
976
+ return isOptimize() ? accessor_prop_exports : accessor_prop_debug_exports;
926
977
  }
927
978
  //#endregion
928
979
  //#region src/translator/util/serialize-reasons.ts
@@ -1804,7 +1855,7 @@ function _script(scopeId, registryId) {
1804
1855
  }
1805
1856
  function _resume_branch(scopeId) {
1806
1857
  const branchId = $chunk.context?.[kBranchId];
1807
- if (branchId !== void 0 && branchId !== scopeId) writeScope(scopeId, { ["#ClosestBranchId"]: branchId });
1858
+ if (branchId !== void 0 && branchId !== scopeId) writeScope(scopeId, { [ClosestBranchId$1]: branchId });
1808
1859
  }
1809
1860
  let writeScope = (scopeId, partialScope) => {
1810
1861
  const { state } = $chunk.boundary;
@@ -1934,7 +1985,7 @@ function _attrs(data, nodeAccessor, scopeId, tagName) {
1934
1985
  if (name && !(isVoid(value) || skip.test(name) || name === "content" && tagName !== "meta")) if (isEventHandler(name)) {
1935
1986
  if (!events) {
1936
1987
  events = {};
1937
- writeScope(scopeId, { ["EventAttributes:" + nodeAccessor]: events });
1988
+ writeScope(scopeId, { [EventAttributes$1 + nodeAccessor]: events });
1938
1989
  }
1939
1990
  events[getEventHandlerName(name)] = value;
1940
1991
  } else result += nonVoidAttr(name, value);
@@ -1945,12 +1996,12 @@ function _attrs(data, nodeAccessor, scopeId, tagName) {
1945
1996
  }
1946
1997
  function writeControlledScope(type, scopeId, nodeAccessor, value, valueChange, serializeType) {
1947
1998
  writeScope(scopeId, serializeType ? {
1948
- ["ControlledType:" + nodeAccessor]: type,
1949
- ["ControlledValue:" + nodeAccessor]: value,
1950
- ["ControlledHandler:" + nodeAccessor]: valueChange
1999
+ [ControlledType$1 + nodeAccessor]: type,
2000
+ [ControlledValue$1 + nodeAccessor]: value,
2001
+ [ControlledHandler$1 + nodeAccessor]: valueChange
1951
2002
  } : {
1952
- ["ControlledValue:" + nodeAccessor]: value,
1953
- ["ControlledHandler:" + nodeAccessor]: valueChange
2003
+ [ControlledValue$1 + nodeAccessor]: value,
2004
+ [ControlledHandler$1 + nodeAccessor]: valueChange
1954
2005
  });
1955
2006
  }
1956
2007
  function stringAttr(name, value) {
@@ -2021,7 +2072,7 @@ let _dynamic_tag = (scopeId, accessor, tag, inputOrArgs, content, inputIsArgs, s
2021
2072
  const childScope = getScopeById(branchId);
2022
2073
  const needsScript = childScope && (childScope["EventAttributes:a"] || childScope["ControlledHandler:a"]);
2023
2074
  if (needsScript) {
2024
- writeScope(branchId, { ["#Renderer"]: renderer });
2075
+ writeScope(branchId, { [Renderer$1]: renderer });
2025
2076
  _script(branchId, "d");
2026
2077
  }
2027
2078
  if (shouldResume || needsScript) _html(state.mark("'", scopeId + " " + accessor + " " + branchId));
@@ -2046,7 +2097,7 @@ let _dynamic_tag = (scopeId, accessor, tag, inputOrArgs, content, inputIsArgs, s
2046
2097
  if (shouldResume) _html(state.mark("]", scopeId + " " + accessor + (rendered ? " " + branchId : "")));
2047
2098
  }
2048
2099
  if (rendered) {
2049
- if (shouldResume) writeScope(scopeId, { ["ConditionalRenderer:" + accessor]: renderer?.["id"] || renderer });
2100
+ if (shouldResume) writeScope(scopeId, { [ConditionalRenderer$1 + accessor]: renderer?.["id"] || renderer });
2050
2101
  } else _scope_id();
2051
2102
  return result;
2052
2103
  };
@@ -2906,6 +2957,7 @@ function getSignal(section, referencedBindings, name) {
2906
2957
  renderReferencedBindings: void 0,
2907
2958
  effect: [],
2908
2959
  effectReferencedBindings: void 0,
2960
+ hasHTMLEffect: false,
2909
2961
  build: void 0,
2910
2962
  export: !!exportName,
2911
2963
  hasSideEffect: !!(referencedBindings && (Array.isArray(referencedBindings) || referencedBindings.type === 0 || referencedBindings.type === 1 || referencedBindings.section !== section || referencedBindings.closureSections || referencedBindings.hoists)),
@@ -2967,7 +3019,7 @@ function initValue(binding, isLet = false) {
2967
3019
  return signal;
2968
3020
  }
2969
3021
  function signalHasStatements(signal) {
2970
- if (signal.extraArgs || signal.forcePersist || signal.render.length || signal.effect.length || signal.values.length || signal.intersection) return true;
3022
+ if (signal.extraArgs || signal.forcePersist || signal.render.length || signal.effect.length || signal.hasHTMLEffect || signal.values.length || signal.intersection) return true;
2971
3023
  const binding = signal.referencedBindings;
2972
3024
  if (binding) {
2973
3025
  if (!Array.isArray(binding) && (binding.closureSections || binding.type === 0 || binding.section === signal.section && (binding.hoists || binding.aliases.size || hasNonConstantPropertyAlias(binding)))) return true;
@@ -3255,7 +3307,8 @@ function toReturnedFunction(rawFn) {
3255
3307
  return fn.type === "FunctionDeclaration" ? [fn, _marko_compiler.types.returnStatement(fn.id)] : [_marko_compiler.types.returnStatement(fn)];
3256
3308
  }
3257
3309
  function addHTMLEffectCall(section, referencedBindings) {
3258
- addStatement("effect", section, referencedBindings, void 0, false);
3310
+ const signal = getSignal(section, referencedBindings);
3311
+ signal.hasHTMLEffect = signal.hasSideEffect = true;
3259
3312
  }
3260
3313
  function writeHTMLResumeStatements(path) {
3261
3314
  const section = getSectionForBody(path);
@@ -3287,7 +3340,7 @@ function writeHTMLResumeStatements(path) {
3287
3340
  }
3288
3341
  }
3289
3342
  });
3290
- for (let i = allSignals.length; i--;) if (allSignals[i].effect.length) {
3343
+ for (let i = allSignals.length; i--;) if (allSignals[i].hasHTMLEffect) {
3291
3344
  const signalRefs = allSignals[i].referencedBindings;
3292
3345
  body.push(_marko_compiler.types.expressionStatement(callRuntime("_script", scopeIdIdentifier, _marko_compiler.types.stringLiteral(getResumeRegisterId(section, signalRefs)))));
3293
3346
  }
@@ -7377,7 +7430,12 @@ function addBindingGetter(binding, { invoked, hoisted }) {
7377
7430
  }
7378
7431
  }
7379
7432
  function isLazyRead(expr, read, binding, isChangeHandlerRead) {
7380
- return !!(expr.invokeOnly && read.deferred && !isChangeHandlerRead && !binding.upstreamAlias && binding.type !== 0 && binding.type !== 6 && (binding.type !== 4 || binding.section === expr.section));
7433
+ return !!(expr.invokeOnly && read.deferred && !isChangeHandlerRead && (!binding.upstreamAlias || isParamBinding(binding)) && binding.type !== 0 && binding.type !== 6 && (binding.type !== 4 || binding.section === expr.section));
7434
+ }
7435
+ function isParamBinding(binding) {
7436
+ let root = binding;
7437
+ while (root.upstreamAlias) root = root.upstreamAlias;
7438
+ return root === root.section.params;
7381
7439
  }
7382
7440
  function resolveReferencedBindings(expr, reads, intersectionsBySection) {
7383
7441
  let referencedBindings;
@@ -9829,6 +9887,10 @@ function getFileNameWithLoc(fileName, { node: { loc } }) {
9829
9887
  return fileName;
9830
9888
  }
9831
9889
  //#endregion
9890
+ //#region src/translator/interop/constants/feature-type.ts
9891
+ const Class = "class";
9892
+ const Tags = "tags";
9893
+ //#endregion
9832
9894
  //#region src/translator/interop/feature-detection.ts
9833
9895
  function isTagsAPI(file = (0, _marko_compiler_babel_utils.getFile)()) {
9834
9896
  const program = file.path;
@@ -9838,11 +9900,11 @@ function isTagsAPI(file = (0, _marko_compiler_babel_utils.getFile)()) {
9838
9900
  const lookup = (0, _marko_compiler_babel_utils.getTaglibLookup)(file);
9839
9901
  const tagsDir = getTagsDir(file.opts.filename);
9840
9902
  const state = {};
9841
- if (tagsDir && !lookup.manualTagsDirs?.has(tagsDir)) addFeature(state, "tags", "Template file within a tags directory", program);
9903
+ if (tagsDir && !lookup.manualTagsDirs?.has(tagsDir)) addFeature(state, Tags, "Template file within a tags directory", program);
9842
9904
  scanBody(state, program.get("body"));
9843
9905
  featureType = file.metadata.marko.api = programExtra.featureType = state.feature?.type || (lookup.exclusiveTagDiscoveryDirs === "tags" ? "tags" : "class");
9844
9906
  }
9845
- return featureType === "tags";
9907
+ return featureType === Tags;
9846
9908
  }
9847
9909
  function getTagsDir(filename) {
9848
9910
  const pathSeparator = /\/|\\/.exec(filename)?.[0];
@@ -9869,23 +9931,23 @@ function scanBody(state, body) {
9869
9931
  scanTag(state, child);
9870
9932
  break;
9871
9933
  case "MarkoComment":
9872
- if (/^\s*use tags\s*$/.test(child.node.value)) addFeature(state, "tags", "<!-- use tags -->", child);
9873
- else if (/^\s*use class\s*$/.test(child.node.value)) addFeature(state, "class", "<!-- use class -->", child);
9934
+ if (/^\s*use tags\s*$/.test(child.node.value)) addFeature(state, Tags, "<!-- use tags -->", child);
9935
+ else if (/^\s*use class\s*$/.test(child.node.value)) addFeature(state, Class, "<!-- use class -->", child);
9874
9936
  break;
9875
9937
  case "MarkoScriptlet":
9876
- if (!child.node.static) addFeature(state, "class", "Scriptlet", child);
9938
+ if (!child.node.static) addFeature(state, Class, "Scriptlet", child);
9877
9939
  break;
9878
9940
  case "MarkoClass":
9879
- addFeature(state, "class", "Class block", child.get("body"));
9941
+ addFeature(state, Class, "Class block", child.get("body"));
9880
9942
  break;
9881
9943
  }
9882
9944
  }
9883
9945
  function scanTag(state, tag) {
9884
- if (tag.node.var) addFeature(state, "tags", "Tag variable", tag.get("var"));
9946
+ if (tag.node.var) addFeature(state, Tags, "Tag variable", tag.get("var"));
9885
9947
  const tagDef = (0, _marko_compiler_babel_utils.getTagDef)(tag);
9886
9948
  if (tagDef) {
9887
9949
  if (tagDef.name === "style") {
9888
- if (/^style(?:(?:\.[^.\s\\/:*?"<>|({]+)+)?\s*\{/.test(tag.node.rawValue || "")) addFeature(state, "class", `style block`, tag.get("name"));
9950
+ if (/^style(?:(?:\.[^.\s\\/:*?"<>|({]+)+)?\s*\{/.test(tag.node.rawValue || "")) addFeature(state, Class, `style block`, tag.get("name"));
9889
9951
  } else if (tagDef.taglibId === runtime_info_default.taglibId) {
9890
9952
  const feature = getFeatureTypeFromCoreTagName(tagDef.name);
9891
9953
  if (feature) addFeature(state, feature, `<${tagDef.name}> tag`, tag.get("name"));
@@ -9894,10 +9956,10 @@ function scanTag(state, tag) {
9894
9956
  if (!tagDef?.parseOptions?.rawOpenTag) {
9895
9957
  for (const attr of tag.get("attributes")) if (attr.isMarkoAttribute()) {
9896
9958
  if (attr.node.arguments?.length) {
9897
- addFeature(state, "class", "Attribute arguments", attr.get("arguments")[0]);
9959
+ addFeature(state, Class, "Attribute arguments", attr.get("arguments")[0]);
9898
9960
  break;
9899
9961
  } else if (attr.node.bound) {
9900
- addFeature(state, "tags", "Bound attribute", attr);
9962
+ addFeature(state, Tags, "Bound attribute", attr);
9901
9963
  break;
9902
9964
  }
9903
9965
  }
@@ -9914,7 +9976,7 @@ function getFeatureTypeFromCoreTagName(tagName) {
9914
9976
  case "init-components":
9915
9977
  case "macro":
9916
9978
  case "module-code":
9917
- case "while": return "class";
9979
+ case "while": return Class;
9918
9980
  case "const":
9919
9981
  case "debug":
9920
9982
  case "define":
@@ -9924,7 +9986,7 @@ function getFeatureTypeFromCoreTagName(tagName) {
9924
9986
  case "log":
9925
9987
  case "return":
9926
9988
  case "show":
9927
- case "try": return "tags";
9989
+ case "try": return Tags;
9928
9990
  default: return;
9929
9991
  }
9930
9992
  }
@@ -10110,6 +10172,7 @@ function getVisitorExit(visit) {
10110
10172
  }
10111
10173
  //#endregion
10112
10174
  //#region src/translator/index.ts
10175
+ const version = package_json.default.version;
10113
10176
  const cheatsheet = "../../cheatsheet.md";
10114
10177
  const visitors = extractVisitors({
10115
10178
  Program: program_default,
@@ -10146,9 +10209,4 @@ exports.tagDiscoveryDirs = tagDiscoveryDirs;
10146
10209
  exports.taglibs = taglibs;
10147
10210
  exports.transform = transform;
10148
10211
  exports.translate = translate;
10149
- Object.defineProperty(exports, "version", {
10150
- enumerable: true,
10151
- get: function() {
10152
- return package_json.version;
10153
- }
10154
- });
10212
+ exports.version = version;