marko 6.0.43 → 6.0.44

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/dist/debug/dom.js CHANGED
@@ -2230,14 +2230,11 @@ var compat = {
2230
2230
  destroyBranch(this.scope);
2231
2231
  }
2232
2232
  },
2233
- resolveRegistered(value2, {
2234
- runtimeId,
2235
- componentIdPrefix
2236
- }) {
2233
+ resolveRegistered(value2, $global) {
2237
2234
  if (Array.isArray(value2) && typeof value2[0] === "string") {
2238
2235
  return getRegisteredWithScope(
2239
2236
  value2[0],
2240
- value2.length === 2 && self[runtimeId]?.[componentIdPrefix === "s" ? "_" : componentIdPrefix]?.s[value2[1]]
2237
+ value2.length === 2 && self[$global.runtimeId]?.[$global.renderId]?.s[value2[1]]
2241
2238
  );
2242
2239
  }
2243
2240
  return value2;
@@ -2134,14 +2134,11 @@ var compat = {
2134
2134
  destroyBranch(this.scope);
2135
2135
  }
2136
2136
  },
2137
- resolveRegistered(value2, {
2138
- runtimeId,
2139
- componentIdPrefix
2140
- }) {
2137
+ resolveRegistered(value2, $global) {
2141
2138
  if (Array.isArray(value2) && typeof value2[0] === "string") {
2142
2139
  return getRegisteredWithScope(
2143
2140
  value2[0],
2144
- value2.length === 2 && self[runtimeId]?.[componentIdPrefix === "s" ? "_" : componentIdPrefix]?.s[value2[1]]
2141
+ value2.length === 2 && self[$global.runtimeId]?.[$global.renderId]?.s[value2[1]]
2145
2142
  );
2146
2143
  }
2147
2144
  return value2;
@@ -3238,6 +3238,7 @@ function patchDynamicTag(patch) {
3238
3238
  var K_TAGS_API_STATE = Symbol();
3239
3239
  var COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap();
3240
3240
  var compat = {
3241
+ $global,
3241
3242
  fork,
3242
3243
  write,
3243
3244
  writeScript,
@@ -3273,7 +3274,7 @@ var compat = {
3273
3274
  let state = $global2[K_TAGS_API_STATE] ||= getChunk()?.boundary.state;
3274
3275
  if (!state) {
3275
3276
  $global2.runtimeId ||= DEFAULT_RUNTIME_ID;
3276
- $global2.renderId ||= $global2.componentIdPrefix || DEFAULT_RENDER_ID;
3277
+ $global2.renderId ||= $global2.componentIdPrefix || $global2.widgetIdPrefix || DEFAULT_RENDER_ID;
3277
3278
  $global2[K_TAGS_API_STATE] = state = new State2($global2);
3278
3279
  }
3279
3280
  const boundary = new Boundary(state);
@@ -3154,6 +3154,7 @@ function patchDynamicTag(patch) {
3154
3154
  var K_TAGS_API_STATE = Symbol();
3155
3155
  var COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap();
3156
3156
  var compat = {
3157
+ $global,
3157
3158
  fork,
3158
3159
  write,
3159
3160
  writeScript,
@@ -3189,7 +3190,7 @@ var compat = {
3189
3190
  let state = $global2[K_TAGS_API_STATE] ||= getChunk()?.boundary.state;
3190
3191
  if (!state) {
3191
3192
  $global2.runtimeId ||= DEFAULT_RUNTIME_ID;
3192
- $global2.renderId ||= $global2.componentIdPrefix || DEFAULT_RENDER_ID;
3193
+ $global2.renderId ||= $global2.componentIdPrefix || $global2.widgetIdPrefix || DEFAULT_RENDER_ID;
3193
3194
  $global2[K_TAGS_API_STATE] = state = new State2($global2);
3194
3195
  }
3195
3196
  const boundary = new Boundary(state);
@@ -11,9 +11,9 @@ export declare const compat: {
11
11
  setScopeNodes(branch: any, startNode: Node, endNode: Node): void;
12
12
  runComponentEffects(this: any): void;
13
13
  runComponentDestroy(this: any): void;
14
- resolveRegistered(value: any, { runtimeId, componentIdPrefix, }: {
14
+ resolveRegistered(value: any, $global: {
15
15
  runtimeId: string;
16
- componentIdPrefix: string;
16
+ renderId: string;
17
17
  }): any;
18
18
  createRenderer(params: NonNullable<Renderer["___params"]>, clone: () => {
19
19
  startNode: ChildNode;
package/dist/dom.js CHANGED
@@ -1458,13 +1458,10 @@ var classIdToBranch = /* @__PURE__ */ new Map(), compat = {
1458
1458
  runComponentDestroy() {
1459
1459
  this.scope && destroyBranch(this.scope);
1460
1460
  },
1461
- resolveRegistered(value2, {
1462
- runtimeId,
1463
- componentIdPrefix
1464
- }) {
1461
+ resolveRegistered(value2, $global) {
1465
1462
  return Array.isArray(value2) && typeof value2[0] == "string" ? getRegisteredWithScope(
1466
1463
  value2[0],
1467
- value2.length === 2 && self[runtimeId]?.[componentIdPrefix === "s" ? "_" : componentIdPrefix]?.s[value2[1]]
1464
+ value2.length === 2 && self[$global.runtimeId]?.[$global.renderId]?.s[value2[1]]
1468
1465
  ) : value2;
1469
1466
  },
1470
1467
  createRenderer(params, clone) {
package/dist/dom.mjs CHANGED
@@ -1365,13 +1365,10 @@ var classIdToBranch = /* @__PURE__ */ new Map(), compat = {
1365
1365
  runComponentDestroy() {
1366
1366
  this.scope && destroyBranch(this.scope);
1367
1367
  },
1368
- resolveRegistered(value2, {
1369
- runtimeId,
1370
- componentIdPrefix
1371
- }) {
1368
+ resolveRegistered(value2, $global) {
1372
1369
  return Array.isArray(value2) && typeof value2[0] == "string" ? getRegisteredWithScope(
1373
1370
  value2[0],
1374
- value2.length === 2 && self[runtimeId]?.[componentIdPrefix === "s" ? "_" : componentIdPrefix]?.s[value2[1]]
1371
+ value2.length === 2 && self[$global.runtimeId]?.[$global.renderId]?.s[value2[1]]
1375
1372
  ) : value2;
1376
1373
  },
1377
1374
  createRenderer(params, clone) {
@@ -1,7 +1,8 @@
1
1
  import { patchDynamicTag } from "./dynamic-tag";
2
2
  import { type ServerRenderer } from "./template";
3
- import { fork, nextScopeId, write, writeScript } from "./writer";
3
+ import { $global, fork, nextScopeId, write, writeScript } from "./writer";
4
4
  export declare const compat: {
5
+ $global: typeof $global;
5
6
  fork: typeof fork;
6
7
  write: typeof write;
7
8
  writeScript: typeof writeScript;
package/dist/html.js CHANGED
@@ -2083,6 +2083,7 @@ function patchDynamicTag(patch) {
2083
2083
 
2084
2084
  // src/html/compat.ts
2085
2085
  var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap(), compat = {
2086
+ $global,
2086
2087
  fork,
2087
2088
  write,
2088
2089
  writeScript,
@@ -2111,7 +2112,7 @@ var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap()
2111
2112
  },
2112
2113
  render(renderer, willRerender, classAPIOut, component, input) {
2113
2114
  let $global2 = classAPIOut.global, state = $global2[K_TAGS_API_STATE] ||= getChunk()?.boundary.state;
2114
- state || ($global2.runtimeId ||= "M", $global2.renderId ||= $global2.componentIdPrefix || "_", $global2[K_TAGS_API_STATE] = state = new State2($global2));
2115
+ state || ($global2.runtimeId ||= "M", $global2.renderId ||= $global2.componentIdPrefix || $global2.widgetIdPrefix || "_", $global2[K_TAGS_API_STATE] = state = new State2($global2));
2115
2116
  let boundary = new Boundary(state), head = new Chunk(
2116
2117
  boundary,
2117
2118
  null,
package/dist/html.mjs CHANGED
@@ -2002,6 +2002,7 @@ function patchDynamicTag(patch) {
2002
2002
 
2003
2003
  // src/html/compat.ts
2004
2004
  var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap(), compat = {
2005
+ $global,
2005
2006
  fork,
2006
2007
  write,
2007
2008
  writeScript,
@@ -2030,7 +2031,7 @@ var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap()
2030
2031
  },
2031
2032
  render(renderer, willRerender, classAPIOut, component, input) {
2032
2033
  let $global2 = classAPIOut.global, state = $global2[K_TAGS_API_STATE] ||= getChunk()?.boundary.state;
2033
- state || ($global2.runtimeId ||= "M", $global2.renderId ||= $global2.componentIdPrefix || "_", $global2[K_TAGS_API_STATE] = state = new State2($global2));
2034
+ state || ($global2.runtimeId ||= "M", $global2.renderId ||= $global2.componentIdPrefix || $global2.widgetIdPrefix || "_", $global2[K_TAGS_API_STATE] = state = new State2($global2));
2034
2035
  let boundary = new Boundary(state), head = new Chunk(
2035
2036
  boundary,
2036
2037
  null,
@@ -5691,7 +5691,7 @@ var await_default = {
5691
5691
  descriptionMoreURL: "https://markojs.com/docs/core-tags/#await"
5692
5692
  }
5693
5693
  ],
5694
- types: runtime_info_default.name + "/tag-types/await.d.marko"
5694
+ types: runtime_info_default.name + "/tags/await.d.marko"
5695
5695
  };
5696
5696
 
5697
5697
  // src/translator/core/client.ts
@@ -5827,7 +5827,7 @@ var const_default = {
5827
5827
  descriptionMoreURL: "https://markojs.com/docs/core-tags/#const"
5828
5828
  }
5829
5829
  ],
5830
- types: runtime_info_default.name + "/tag-types/const.d.marko"
5830
+ types: runtime_info_default.name + "/tags/const.d.marko"
5831
5831
  };
5832
5832
 
5833
5833
  // src/translator/core/debug.ts
@@ -5870,7 +5870,7 @@ var debug_default = {
5870
5870
  descriptionMoreURL: "https://markojs.com/docs/core-tags/#debug"
5871
5871
  }
5872
5872
  ],
5873
- types: runtime_info_default.name + "/tag-types/debug.d.marko"
5873
+ types: runtime_info_default.name + "/tags/debug.d.marko"
5874
5874
  };
5875
5875
 
5876
5876
  // src/translator/core/define.ts
@@ -7699,7 +7699,7 @@ var define_default = {
7699
7699
  descriptionMoreURL: "https://markojs.com/docs/core-tags/#define"
7700
7700
  }
7701
7701
  ],
7702
- types: runtime_info_default.name + "/tag-types/define.d.marko"
7702
+ types: runtime_info_default.name + "/tags/define.d.marko"
7703
7703
  };
7704
7704
 
7705
7705
  // src/translator/core/effect.ts
@@ -7733,7 +7733,7 @@ var effect_default = {
7733
7733
  }
7734
7734
  ],
7735
7735
  attributes: {},
7736
- types: runtime_info_default.name + "/tag-types/effect.d.marko"
7736
+ types: runtime_info_default.name + "/tags/effect.d.marko"
7737
7737
  };
7738
7738
 
7739
7739
  // src/translator/core/export.ts
@@ -8824,7 +8824,7 @@ var id_default = {
8824
8824
  descriptionMoreURL: "https://markojs.com/docs/core-tags/#id"
8825
8825
  }
8826
8826
  ],
8827
- types: runtime_info_default.name + "/tag-types/id.d.marko"
8827
+ types: runtime_info_default.name + "/tags/id.d.marko"
8828
8828
  };
8829
8829
 
8830
8830
  // src/translator/core/if.ts
@@ -9309,7 +9309,7 @@ var let_default = {
9309
9309
  descriptionMoreURL: "https://markojs.com/docs/core-tags/#let"
9310
9310
  }
9311
9311
  ],
9312
- types: runtime_info_default.name + "/tag-types/let.d.marko"
9312
+ types: runtime_info_default.name + "/tags/let.d.marko"
9313
9313
  };
9314
9314
 
9315
9315
  // src/translator/core/lifecycle.ts
@@ -9391,7 +9391,7 @@ var lifecycle_default = {
9391
9391
  descriptionMoreURL: "https://markojs.com/docs/core-tags/#effect"
9392
9392
  }
9393
9393
  ],
9394
- types: runtime_info_default.name + "/tag-types/lifecycle.d.marko"
9394
+ types: runtime_info_default.name + "/tags/lifecycle.d.marko"
9395
9395
  };
9396
9396
 
9397
9397
  // src/translator/core/log.ts
@@ -9443,7 +9443,7 @@ var log_default = {
9443
9443
  descriptionMoreURL: "https://markojs.com/docs/core-tags/#log"
9444
9444
  }
9445
9445
  ],
9446
- types: runtime_info_default.name + "/tag-types/log.d.marko"
9446
+ types: runtime_info_default.name + "/tags/log.d.marko"
9447
9447
  };
9448
9448
 
9449
9449
  // src/translator/core/script.ts
@@ -9564,7 +9564,7 @@ var script_default = {
9564
9564
  descriptionMoreURL: "https://markojs.com/docs/core-tags/#script"
9565
9565
  }
9566
9566
  ],
9567
- types: runtime_info_default.name + "/tag-types/script.d.marko"
9567
+ types: runtime_info_default.name + "/tags/script.d.marko"
9568
9568
  };
9569
9569
  function isAwaitExpression(node) {
9570
9570
  switch (node.type) {
@@ -9884,7 +9884,7 @@ var try_default = {
9884
9884
  descriptionMoreURL: "https://markojs.com/docs/core-tags/#try"
9885
9885
  }
9886
9886
  ],
9887
- types: runtime_info_default.name + "/tag-types/try.d.marko"
9887
+ types: runtime_info_default.name + "/tags/try.d.marko"
9888
9888
  };
9889
9889
 
9890
9890
  // src/translator/core/index.ts
package/index.d.ts CHANGED
@@ -23,9 +23,7 @@ declare global {
23
23
  /** Used to uniquely identify a instance of a Marko runtime. */
24
24
  runtimeId?: string;
25
25
  /** A list of globals that should be serialized to the browser. */
26
- serializedGlobals?:
27
- | (string | number)[]
28
- | Record<string | number, boolean>;
26
+ serializedGlobals?: string[] | Record<string, boolean>;
29
27
  }
30
28
 
31
29
  export type TemplateInput<Input> = Input & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "6.0.43",
3
+ "version": "6.0.44",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "./package.json": "./package.json",
24
24
  "./translator": "./dist/translator/index.js",
25
- "./tag-types/*": "./tag-types/*",
25
+ "./tags/*": "./tags/*",
26
26
  "./debug/*": {
27
27
  "types": "./dist/*.d.ts",
28
28
  "import": "./dist/debug/*.mjs",
@@ -48,7 +48,7 @@
48
48
  "build": "node -r ~ts ./scripts/bundle.ts"
49
49
  },
50
50
  "dependencies": {
51
- "@marko/compiler": "^5.39.32",
51
+ "@marko/compiler": "^5.39.33",
52
52
  "csstype": "^3.1.3",
53
53
  "magic-string": "^0.30.17"
54
54
  },
@@ -60,7 +60,7 @@
60
60
  "types": "./index.d.ts"
61
61
  },
62
62
  "./translator": "./src/translator/index.ts",
63
- "./tag-types/*": "./tag-types/*",
63
+ "./tags/*": "./tags/*",
64
64
  "./debug/*": "./src/*.ts",
65
65
  "./*": "./src/*.ts"
66
66
  }