@marko/runtime-tags 6.2.3 → 6.2.5

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/README.md CHANGED
@@ -47,7 +47,7 @@ The following renders a button and a counter of how many times the button has be
47
47
  <th><svg viewBox="0 0 448 512"><path d="M357.2 48L427.8 48 273.6 224.2 455 464 313 464 201.7 318.6 74.5 464 3.8 464 168.7 275.5-5.2 48 140.4 48 240.9 180.9 357.2 48zM332.4 421.8l39.1 0-252.4-333.8-42 0 255.3 333.8z"></path></svg>
48
48
  <th><svg viewBox="0 0 512 512"><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM252.8 8c-138.7 0-244.8 105.3-244.8 244 0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1 100-33.2 167.8-128.1 167.8-239 0-138.7-112.5-244-251.2-244zM105.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg>
49
49
  <tbody><tr><td>
50
-
50
+
51
51
  Hang out in our [Discord server](https://discord.gg/marko) to ask questions & discuss marko<td>
52
52
 
53
53
  Keep up with the community on Bluesky at [@markojs.com](https://bsky.app/profile/markojs.com)<td>
package/dist/debug/dom.js CHANGED
@@ -431,9 +431,9 @@ function _const(valueAccessor, fn) {
431
431
  }
432
432
  function _or(id, fn, defaultPending = 1, scopeIdAccessor = "#Id") {
433
433
  return (scope) => {
434
- if (scope["#Gen"] === runId) if (id in scope) {
435
- if (!--scope[id]) fn(scope);
436
- } else scope[id] = defaultPending;
434
+ if (scope["#Gen"] === runId) if (~id in scope) {
435
+ if (!--scope[~id]) fn(scope);
436
+ } else scope[~id] = defaultPending;
437
437
  else queueRender(scope, fn, id, 0, scope[scopeIdAccessor]);
438
438
  };
439
439
  }
@@ -1809,10 +1809,10 @@ const caughtError = /* @__PURE__ */ new WeakSet();
1809
1809
  const placeholderShown = /* @__PURE__ */ new WeakSet();
1810
1810
  let pendingEffects = [];
1811
1811
  let pendingRenders = [];
1812
- const scopeKeyOffset = 1e3;
1812
+ const scopeKeyOffset = 1e6;
1813
1813
  function queueRender(scope, signal, signalKey, value, scopeKey = scope["#Id"]) {
1814
1814
  let render;
1815
- if (signalKey >= 0 && (render = scope[signalKey + scopeKeyOffset])) {
1815
+ if (signalKey >= 0 && (render = scope[signalKey])) {
1816
1816
  render["value"] = value;
1817
1817
  if (render["gen"] === runId || catchEnabled && render["pending"]) return;
1818
1818
  render["gen"] = runId;
@@ -1824,7 +1824,7 @@ function queueRender(scope, signal, signalKey, value, scopeKey = scope["#Id"]) {
1824
1824
  ["value"]: value,
1825
1825
  ["gen"]: runId
1826
1826
  };
1827
- if (signalKey >= 0) scope[signalKey + scopeKeyOffset] = render;
1827
+ if (signalKey >= 0) scope[signalKey] = render;
1828
1828
  }
1829
1829
  queuePendingRender(render);
1830
1830
  }
@@ -429,9 +429,9 @@ function _const(valueAccessor, fn) {
429
429
  }
430
430
  function _or(id, fn, defaultPending = 1, scopeIdAccessor = "#Id") {
431
431
  return (scope) => {
432
- if (scope["#Gen"] === runId) if (id in scope) {
433
- if (!--scope[id]) fn(scope);
434
- } else scope[id] = defaultPending;
432
+ if (scope["#Gen"] === runId) if (~id in scope) {
433
+ if (!--scope[~id]) fn(scope);
434
+ } else scope[~id] = defaultPending;
435
435
  else queueRender(scope, fn, id, 0, scope[scopeIdAccessor]);
436
436
  };
437
437
  }
@@ -1807,10 +1807,10 @@ const caughtError = /* @__PURE__ */ new WeakSet();
1807
1807
  const placeholderShown = /* @__PURE__ */ new WeakSet();
1808
1808
  let pendingEffects = [];
1809
1809
  let pendingRenders = [];
1810
- const scopeKeyOffset = 1e3;
1810
+ const scopeKeyOffset = 1e6;
1811
1811
  function queueRender(scope, signal, signalKey, value, scopeKey = scope["#Id"]) {
1812
1812
  let render;
1813
- if (signalKey >= 0 && (render = scope[signalKey + scopeKeyOffset])) {
1813
+ if (signalKey >= 0 && (render = scope[signalKey])) {
1814
1814
  render["value"] = value;
1815
1815
  if (render["gen"] === runId || catchEnabled && render["pending"]) return;
1816
1816
  render["gen"] = runId;
@@ -1822,7 +1822,7 @@ function queueRender(scope, signal, signalKey, value, scopeKey = scope["#Id"]) {
1822
1822
  ["value"]: value,
1823
1823
  ["gen"]: runId
1824
1824
  };
1825
- if (signalKey >= 0) scope[signalKey + scopeKeyOffset] = render;
1825
+ if (signalKey >= 0) scope[signalKey] = render;
1826
1826
  }
1827
1827
  queuePendingRender(render);
1828
1828
  }
@@ -263,7 +263,7 @@ const KNOWN_SYMBOLS = (() => {
263
263
  }
264
264
  return KNOWN_SYMBOLS;
265
265
  })();
266
- const KNOWN_FUNCTIONS = new Map([
266
+ const KNOWN_FUNCTIONS = /* @__PURE__ */ new Map([
267
267
  [AggregateError, "AggregateError"],
268
268
  [Array, "Array"],
269
269
  [Array.from, "Array.from"],
@@ -482,7 +482,7 @@ const KNOWN_FUNCTIONS = new Map([
482
482
  [WeakMap, "WeakMap"],
483
483
  [WeakSet, "WeakSet"]
484
484
  ]);
485
- const KNOWN_OBJECTS = new Map([
485
+ const KNOWN_OBJECTS = /* @__PURE__ */ new Map([
486
486
  [Atomics, "Atomics"],
487
487
  [console, "console"],
488
488
  [globalThis, "globalThis"],
@@ -2440,7 +2440,7 @@ let tickQueue;
2440
2440
  function queueTick(cb) {
2441
2441
  if (tickQueue) tickQueue.add(cb);
2442
2442
  else {
2443
- tickQueue = new Set([cb]);
2443
+ tickQueue = /* @__PURE__ */ new Set([cb]);
2444
2444
  tick(flushTickQueue);
2445
2445
  }
2446
2446
  }
@@ -261,7 +261,7 @@ const KNOWN_SYMBOLS = (() => {
261
261
  }
262
262
  return KNOWN_SYMBOLS;
263
263
  })();
264
- const KNOWN_FUNCTIONS = new Map([
264
+ const KNOWN_FUNCTIONS = /* @__PURE__ */ new Map([
265
265
  [AggregateError, "AggregateError"],
266
266
  [Array, "Array"],
267
267
  [Array.from, "Array.from"],
@@ -480,7 +480,7 @@ const KNOWN_FUNCTIONS = new Map([
480
480
  [WeakMap, "WeakMap"],
481
481
  [WeakSet, "WeakSet"]
482
482
  ]);
483
- const KNOWN_OBJECTS = new Map([
483
+ const KNOWN_OBJECTS = /* @__PURE__ */ new Map([
484
484
  [Atomics, "Atomics"],
485
485
  [console, "console"],
486
486
  [globalThis, "globalThis"],
@@ -2438,7 +2438,7 @@ let tickQueue;
2438
2438
  function queueTick(cb) {
2439
2439
  if (tickQueue) tickQueue.add(cb);
2440
2440
  else {
2441
- tickQueue = new Set([cb]);
2441
+ tickQueue = /* @__PURE__ */ new Set([cb]);
2442
2442
  tick(flushTickQueue);
2443
2443
  }
2444
2444
  }
package/dist/dom.js CHANGED
@@ -49,7 +49,7 @@ let empty = [], rest = Symbol(), toDelimitedString = function toDelimitedString(
49
49
  };
50
50
  }, _for_of = /* @__PURE__ */ loop(([all, by = bySecondArg], cb) => {
51
51
  typeof by == "string" ? forOf(all, (item, i) => cb(item[by], [item, i])) : forOf(all, (item, i) => cb(by(item, i), [item, i]));
52
- }), _for_in = /* @__PURE__ */ loop(([obj, by = byFirstArg], cb) => forIn(obj, (key, value) => cb(by(key, value), [key, value]))), _for_to = /* @__PURE__ */ loop(([to, from, step, by = byFirstArg], cb) => forTo(to, from, step, (v) => cb(by(v), [v]))), _for_until = /* @__PURE__ */ loop(([until, from, step, by = byFirstArg], cb) => forUntil(until, from, step, (v) => cb(by(v), [v]))), rendering, runId = 2, caughtError = /* @__PURE__ */ new WeakSet(), placeholderShown = /* @__PURE__ */ new WeakSet(), pendingEffects = [], pendingRenders = [], scopeKeyOffset = 1e3, runEffects = ((effects) => {
52
+ }), _for_in = /* @__PURE__ */ loop(([obj, by = byFirstArg], cb) => forIn(obj, (key, value) => cb(by(key, value), [key, value]))), _for_to = /* @__PURE__ */ loop(([to, from, step, by = byFirstArg], cb) => forTo(to, from, step, (v) => cb(by(v), [v]))), _for_until = /* @__PURE__ */ loop(([until, from, step, by = byFirstArg], cb) => forUntil(until, from, step, (v) => cb(by(v), [v]))), rendering, runId = 2, caughtError = /* @__PURE__ */ new WeakSet(), placeholderShown = /* @__PURE__ */ new WeakSet(), pendingEffects = [], pendingRenders = [], runEffects = ((effects) => {
53
53
  for (let i = 0; i < effects.length;) effects[i++](effects[i++]);
54
54
  }), runRender = (render) => render.c(render.b, render.d), catchEnabled, classIdToBranch = /* @__PURE__ */ new Map(), scopesByRender = /* @__PURE__ */ new WeakMap(), getRenderScopes = ($global) => {
55
55
  let render = self[$global.runtimeId]?.[$global.renderId], scopes = render && scopesByRender.get(render);
@@ -299,7 +299,7 @@ function _const(valueAccessor, fn) {
299
299
  }
300
300
  function _or(id, fn, defaultPending = 1, scopeIdAccessor = "L") {
301
301
  return scopeIdAccessor !== "L" && (scopeIdAccessor = decodeAccessor(scopeIdAccessor)), (scope) => {
302
- scope.H === runId ? id in scope ? --scope[id] || fn(scope) : scope[id] = defaultPending : queueRender(scope, fn, id, 0, scope[scopeIdAccessor]);
302
+ scope.H === runId ? ~id in scope ? --scope[~id] || fn(scope) : scope[~id] = defaultPending : queueRender(scope, fn, id, 0, scope[scopeIdAccessor]);
303
303
  };
304
304
  }
305
305
  function _for_closure(ownerLoopNodeAccessor, fn) {
@@ -1117,16 +1117,16 @@ function byFirstArg(name) {
1117
1117
  //#region src/dom/queue.ts
1118
1118
  function queueRender(scope, signal, signalKey, value, scopeKey = scope.L) {
1119
1119
  let render;
1120
- if (signalKey >= 0 && (render = scope[signalKey + scopeKeyOffset])) {
1120
+ if (signalKey >= 0 && (render = scope[signalKey])) {
1121
1121
  if (render.d = value, render.e === runId || catchEnabled && render.f) return;
1122
1122
  render.e = runId;
1123
1123
  } else render = {
1124
- a: scopeKey * scopeKeyOffset + signalKey,
1124
+ a: scopeKey * 1e6 + signalKey,
1125
1125
  b: scope,
1126
1126
  c: signal,
1127
1127
  d: value,
1128
1128
  e: runId
1129
- }, signalKey >= 0 && (scope[signalKey + scopeKeyOffset] = render);
1129
+ }, signalKey >= 0 && (scope[signalKey] = render);
1130
1130
  queuePendingRender(render);
1131
1131
  }
1132
1132
  function queuePendingRender(render) {
package/dist/dom.mjs CHANGED
@@ -49,7 +49,7 @@ let empty = [], rest = Symbol(), toDelimitedString = function toDelimitedString(
49
49
  };
50
50
  }, _for_of = /* @__PURE__ */ loop(([all, by = bySecondArg], cb) => {
51
51
  typeof by == "string" ? forOf(all, (item, i) => cb(item[by], [item, i])) : forOf(all, (item, i) => cb(by(item, i), [item, i]));
52
- }), _for_in = /* @__PURE__ */ loop(([obj, by = byFirstArg], cb) => forIn(obj, (key, value) => cb(by(key, value), [key, value]))), _for_to = /* @__PURE__ */ loop(([to, from, step, by = byFirstArg], cb) => forTo(to, from, step, (v) => cb(by(v), [v]))), _for_until = /* @__PURE__ */ loop(([until, from, step, by = byFirstArg], cb) => forUntil(until, from, step, (v) => cb(by(v), [v]))), rendering, runId = 2, caughtError = /* @__PURE__ */ new WeakSet(), placeholderShown = /* @__PURE__ */ new WeakSet(), pendingEffects = [], pendingRenders = [], scopeKeyOffset = 1e3, runEffects = ((effects) => {
52
+ }), _for_in = /* @__PURE__ */ loop(([obj, by = byFirstArg], cb) => forIn(obj, (key, value) => cb(by(key, value), [key, value]))), _for_to = /* @__PURE__ */ loop(([to, from, step, by = byFirstArg], cb) => forTo(to, from, step, (v) => cb(by(v), [v]))), _for_until = /* @__PURE__ */ loop(([until, from, step, by = byFirstArg], cb) => forUntil(until, from, step, (v) => cb(by(v), [v]))), rendering, runId = 2, caughtError = /* @__PURE__ */ new WeakSet(), placeholderShown = /* @__PURE__ */ new WeakSet(), pendingEffects = [], pendingRenders = [], runEffects = ((effects) => {
53
53
  for (let i = 0; i < effects.length;) effects[i++](effects[i++]);
54
54
  }), runRender = (render) => render.c(render.b, render.d), catchEnabled, classIdToBranch = /* @__PURE__ */ new Map(), scopesByRender = /* @__PURE__ */ new WeakMap(), getRenderScopes = ($global) => {
55
55
  let render = self[$global.runtimeId]?.[$global.renderId], scopes = render && scopesByRender.get(render);
@@ -298,7 +298,7 @@ function _const(valueAccessor, fn) {
298
298
  }
299
299
  function _or(id, fn, defaultPending = 1, scopeIdAccessor = "L") {
300
300
  return scopeIdAccessor !== "L" && (scopeIdAccessor = decodeAccessor(scopeIdAccessor)), (scope) => {
301
- scope.H === runId ? id in scope ? --scope[id] || fn(scope) : scope[id] = defaultPending : queueRender(scope, fn, id, 0, scope[scopeIdAccessor]);
301
+ scope.H === runId ? ~id in scope ? --scope[~id] || fn(scope) : scope[~id] = defaultPending : queueRender(scope, fn, id, 0, scope[scopeIdAccessor]);
302
302
  };
303
303
  }
304
304
  function _for_closure(ownerLoopNodeAccessor, fn) {
@@ -1116,16 +1116,16 @@ function byFirstArg(name) {
1116
1116
  //#region src/dom/queue.ts
1117
1117
  function queueRender(scope, signal, signalKey, value, scopeKey = scope.L) {
1118
1118
  let render;
1119
- if (signalKey >= 0 && (render = scope[signalKey + scopeKeyOffset])) {
1119
+ if (signalKey >= 0 && (render = scope[signalKey])) {
1120
1120
  if (render.d = value, render.e === runId || catchEnabled && render.f) return;
1121
1121
  render.e = runId;
1122
1122
  } else render = {
1123
- a: scopeKey * scopeKeyOffset + signalKey,
1123
+ a: scopeKey * 1e6 + signalKey,
1124
1124
  b: scope,
1125
1125
  c: signal,
1126
1126
  d: value,
1127
1127
  e: runId
1128
- }, signalKey >= 0 && (scope[signalKey + scopeKeyOffset] = render);
1128
+ }, signalKey >= 0 && (scope[signalKey] = render);
1129
1129
  queuePendingRender(render);
1130
1130
  }
1131
1131
  function queuePendingRender(render) {
package/dist/html.js CHANGED
@@ -11,7 +11,7 @@ let empty = [], rest = Symbol(), toDelimitedString = function toDelimitedString(
11
11
  typeof symbol == "symbol" && KNOWN_SYMBOLS.set(symbol, "Symbol." + name);
12
12
  }
13
13
  return KNOWN_SYMBOLS;
14
- })(), KNOWN_FUNCTIONS = new Map([
14
+ })(), KNOWN_FUNCTIONS = /* @__PURE__ */ new Map([
15
15
  [AggregateError, "AggregateError"],
16
16
  [Array, "Array"],
17
17
  [Array.from, "Array.from"],
@@ -229,7 +229,7 @@ let empty = [], rest = Symbol(), toDelimitedString = function toDelimitedString(
229
229
  [URIError, "URIError"],
230
230
  [WeakMap, "WeakMap"],
231
231
  [WeakSet, "WeakSet"]
232
- ]), KNOWN_OBJECTS = new Map([
232
+ ]), KNOWN_OBJECTS = /* @__PURE__ */ new Map([
233
233
  [Atomics, "Atomics"],
234
234
  [console, "console"],
235
235
  [globalThis, "globalThis"],
@@ -1586,7 +1586,7 @@ function concatScripts(a, b) {
1586
1586
  return a ? b ? a + ";" + b : a : b;
1587
1587
  }
1588
1588
  function queueTick(cb) {
1589
- tickQueue ? tickQueue.add(cb) : (tickQueue = new Set([cb]), tick(flushTickQueue));
1589
+ tickQueue ? tickQueue.add(cb) : (tickQueue = /* @__PURE__ */ new Set([cb]), tick(flushTickQueue));
1590
1590
  }
1591
1591
  function offTick(cb) {
1592
1592
  tickQueue?.delete(cb);
package/dist/html.mjs CHANGED
@@ -11,7 +11,7 @@ let empty = [], rest = Symbol(), toDelimitedString = function toDelimitedString(
11
11
  typeof symbol == "symbol" && KNOWN_SYMBOLS.set(symbol, "Symbol." + name);
12
12
  }
13
13
  return KNOWN_SYMBOLS;
14
- })(), KNOWN_FUNCTIONS = new Map([
14
+ })(), KNOWN_FUNCTIONS = /* @__PURE__ */ new Map([
15
15
  [AggregateError, "AggregateError"],
16
16
  [Array, "Array"],
17
17
  [Array.from, "Array.from"],
@@ -229,7 +229,7 @@ let empty = [], rest = Symbol(), toDelimitedString = function toDelimitedString(
229
229
  [URIError, "URIError"],
230
230
  [WeakMap, "WeakMap"],
231
231
  [WeakSet, "WeakSet"]
232
- ]), KNOWN_OBJECTS = new Map([
232
+ ]), KNOWN_OBJECTS = /* @__PURE__ */ new Map([
233
233
  [Atomics, "Atomics"],
234
234
  [console, "console"],
235
235
  [globalThis, "globalThis"],
@@ -1585,7 +1585,7 @@ function concatScripts(a, b) {
1585
1585
  return a ? b ? a + ";" + b : a : b;
1586
1586
  }
1587
1587
  function queueTick(cb) {
1588
- tickQueue ? tickQueue.add(cb) : (tickQueue = new Set([cb]), tick(flushTickQueue));
1588
+ tickQueue ? tickQueue.add(cb) : (tickQueue = /* @__PURE__ */ new Set([cb]), tick(flushTickQueue));
1589
1589
  }
1590
1590
  function offTick(cb) {
1591
1591
  tickQueue?.delete(cb);
@@ -305,235 +305,8 @@ patchIteratorNext(AsyncGenerator.prototype);
305
305
  }
306
306
  return KNOWN_SYMBOLS;
307
307
  })();
308
- new Map([
309
- [AggregateError, "AggregateError"],
310
- [Array, "Array"],
311
- [Array.from, "Array.from"],
312
- [Array.isArray, "Array.isArray"],
313
- [Array.of, "Array.of"],
314
- [ArrayBuffer, "ArrayBuffer"],
315
- [ArrayBuffer.isView, "ArrayBuffer.isView"],
316
- [Atomics.add, "Atomics.add"],
317
- [Atomics.and, "Atomics.and"],
318
- [Atomics.compareExchange, "Atomics.compareExchange"],
319
- [Atomics.exchange, "Atomics.exchange"],
320
- [Atomics.isLockFree, "Atomics.isLockFree"],
321
- [Atomics.load, "Atomics.load"],
322
- [Atomics.notify, "Atomics.notify"],
323
- [Atomics.or, "Atomics.or"],
324
- [Atomics.store, "Atomics.store"],
325
- [Atomics.sub, "Atomics.sub"],
326
- [Atomics.wait, "Atomics.wait"],
327
- [BigInt, "BigInt"],
328
- [BigInt.asIntN, "BigInt.asIntN"],
329
- [BigInt.asUintN, "BigInt.asUintN"],
330
- [BigInt64Array, "BigInt64Array"],
331
- [BigInt64Array.from, "BigInt64Array.from"],
332
- [BigInt64Array.of, "BigInt64Array.of"],
333
- [BigUint64Array, "BigUint64Array"],
334
- [BigUint64Array.from, "BigUint64Array.from"],
335
- [BigUint64Array.of, "BigUint64Array.of"],
336
- [Boolean, "Boolean"],
337
- [console.assert, "console.assert"],
338
- [console.clear, "console.clear"],
339
- [console.count, "console.count"],
340
- [console.countReset, "console.countReset"],
341
- [console.debug, "console.debug"],
342
- [console.dir, "console.dir"],
343
- [console.dirxml, "console.dirxml"],
344
- [console.error, "console.error"],
345
- [console.group, "console.group"],
346
- [console.groupCollapsed, "console.groupCollapsed"],
347
- [console.groupEnd, "console.groupEnd"],
348
- [console.info, "console.info"],
349
- [console.log, "console.log"],
350
- [console.table, "console.table"],
351
- [console.time, "console.time"],
352
- [console.timeEnd, "console.timeEnd"],
353
- [console.timeLog, "console.timeLog"],
354
- [console.timeStamp, "console.timeStamp"],
355
- [console.trace, "console.trace"],
356
- [console.warn, "console.warn"],
357
- [DataView, "DataView"],
358
- [Date, "Date"],
359
- [Date.now, "Date.now"],
360
- [Date.parse, "Date.parse"],
361
- [Date.UTC, "Date.UTC"],
362
- [decodeURI, "decodeURI"],
363
- [decodeURIComponent, "decodeURIComponent"],
364
- [encodeURI, "encodeURI"],
365
- [encodeURIComponent, "encodeURIComponent"],
366
- [Error, "Error"],
367
- [EvalError, "EvalError"],
368
- [Float32Array, "Float32Array"],
369
- [Float32Array.from, "Float32Array.from"],
370
- [Float32Array.of, "Float32Array.of"],
371
- [Float64Array, "Float64Array"],
372
- [Float64Array.from, "Float64Array.from"],
373
- [Float64Array.of, "Float64Array.of"],
374
- [Function, "Function"],
375
- [globalThis.atob, "atob"],
376
- [globalThis.btoa, "btoa"],
377
- [globalThis.clearImmediate, "clearImmediate"],
378
- [globalThis.clearInterval, "clearInterval"],
379
- [globalThis.clearTimeout, "clearTimeout"],
380
- [globalThis.crypto?.getRandomValues, "crypto.getRandomValues"],
381
- [globalThis.crypto?.randomUUID, "crypto.randomUUID"],
382
- [globalThis.fetch, "fetch"],
383
- [globalThis.performance?.now, "performance.now"],
384
- [globalThis.queueMicrotask, "queueMicrotask"],
385
- [globalThis.setImmediate, "setImmediate"],
386
- [globalThis.setInterval, "setInterval"],
387
- [globalThis.setTimeout, "setTimeout"],
388
- [globalThis.structuredClone, "structuredClone"],
389
- [globalThis.URL, "URL"],
390
- [globalThis.URLSearchParams, "URLSearchParams"],
391
- [globalThis.WritableStream, "WritableStream"],
392
- [Int16Array, "Int16Array"],
393
- [Int16Array.from, "Int16Array.from"],
394
- [Int16Array.of, "Int16Array.of"],
395
- [Int32Array, "Int32Array"],
396
- [Int32Array.from, "Int32Array.from"],
397
- [Int32Array.of, "Int32Array.of"],
398
- [Int8Array, "Int8Array"],
399
- [Int8Array.from, "Int8Array.from"],
400
- [Int8Array.of, "Int8Array.of"],
401
- [Intl.Collator, "Intl.Collator"],
402
- [Intl.DateTimeFormat, "Intl.DateTimeFormat"],
403
- [Intl.DisplayNames, "Intl.DisplayNames"],
404
- [Intl.getCanonicalLocales, "Intl.getCanonicalLocales"],
405
- [Intl.ListFormat, "Intl.ListFormat"],
406
- [Intl.Locale, "Intl.Locale"],
407
- [Intl.NumberFormat, "Intl.NumberFormat"],
408
- [Intl.PluralRules, "Intl.PluralRules"],
409
- [Intl.RelativeTimeFormat, "Intl.RelativeTimeFormat"],
410
- [Intl.Segmenter, "Intl.Segmenter"],
411
- [Intl.supportedValuesOf, "Intl.supportedValuesOf"],
412
- [isFinite, "isFinite"],
413
- [isNaN, "isNaN"],
414
- [JSON.parse, "JSON.parse"],
415
- [JSON.stringify, "JSON.stringify"],
416
- [Map, "Map"],
417
- [Map.groupBy, "Map.groupBy"],
418
- [Math.abs, "Math.abs"],
419
- [Math.acos, "Math.acos"],
420
- [Math.acosh, "Math.acosh"],
421
- [Math.asin, "Math.asin"],
422
- [Math.asinh, "Math.asinh"],
423
- [Math.atan, "Math.atan"],
424
- [Math.atan2, "Math.atan2"],
425
- [Math.atanh, "Math.atanh"],
426
- [Math.cbrt, "Math.cbrt"],
427
- [Math.ceil, "Math.ceil"],
428
- [Math.clz32, "Math.clz32"],
429
- [Math.cos, "Math.cos"],
430
- [Math.cosh, "Math.cosh"],
431
- [Math.exp, "Math.exp"],
432
- [Math.expm1, "Math.expm1"],
433
- [Math.floor, "Math.floor"],
434
- [Math.fround, "Math.fround"],
435
- [Math.hypot, "Math.hypot"],
436
- [Math.imul, "Math.imul"],
437
- [Math.log, "Math.log"],
438
- [Math.log10, "Math.log10"],
439
- [Math.log1p, "Math.log1p"],
440
- [Math.log2, "Math.log2"],
441
- [Math.max, "Math.max"],
442
- [Math.min, "Math.min"],
443
- [Math.pow, "Math.pow"],
444
- [Math.random, "Math.random"],
445
- [Math.round, "Math.round"],
446
- [Math.sign, "Math.sign"],
447
- [Math.sin, "Math.sin"],
448
- [Math.sinh, "Math.sinh"],
449
- [Math.sqrt, "Math.sqrt"],
450
- [Math.tan, "Math.tan"],
451
- [Math.tanh, "Math.tanh"],
452
- [Math.trunc, "Math.trunc"],
453
- [Number, "Number"],
454
- [Number.isFinite, "Number.isFinite"],
455
- [Number.isInteger, "Number.isInteger"],
456
- [Number.isNaN, "Number.isNaN"],
457
- [Number.isSafeInteger, "Number.isSafeInteger"],
458
- [Number.parseFloat, "Number.parseFloat"],
459
- [Number.parseInt, "Number.parseInt"],
460
- [Object, "Object"],
461
- [Object.assign, "Object.assign"],
462
- [Object.create, "Object.create"],
463
- [Object.defineProperties, "Object.defineProperties"],
464
- [Object.defineProperty, "Object.defineProperty"],
465
- [Object.entries, "Object.entries"],
466
- [Object.freeze, "Object.freeze"],
467
- [Object.fromEntries, "Object.fromEntries"],
468
- [Object.getOwnPropertyDescriptor, "Object.getOwnPropertyDescriptor"],
469
- [Object.getOwnPropertyDescriptors, "Object.getOwnPropertyDescriptors"],
470
- [Object.getOwnPropertyNames, "Object.getOwnPropertyNames"],
471
- [Object.getOwnPropertySymbols, "Object.getOwnPropertySymbols"],
472
- [Object.getPrototypeOf, "Object.getPrototypeOf"],
473
- [Object.is, "Object.is"],
474
- [Object.isExtensible, "Object.isExtensible"],
475
- [Object.isFrozen, "Object.isFrozen"],
476
- [Object.isSealed, "Object.isSealed"],
477
- [Object.keys, "Object.keys"],
478
- [Object.preventExtensions, "Object.preventExtensions"],
479
- [Object.seal, "Object.seal"],
480
- [Object.setPrototypeOf, "Object.setPrototypeOf"],
481
- [Object.values, "Object.values"],
482
- [parseFloat, "parseFloat"],
483
- [parseInt, "parseInt"],
484
- [Promise, "Promise"],
485
- [Proxy, "Proxy"],
486
- [RangeError, "RangeError"],
487
- [ReferenceError, "ReferenceError"],
488
- [Reflect.apply, "Reflect.apply"],
489
- [Reflect.construct, "Reflect.construct"],
490
- [Reflect.defineProperty, "Reflect.defineProperty"],
491
- [Reflect.deleteProperty, "Reflect.deleteProperty"],
492
- [Reflect.get, "Reflect.get"],
493
- [Reflect.getOwnPropertyDescriptor, "Reflect.getOwnPropertyDescriptor"],
494
- [Reflect.getPrototypeOf, "Reflect.getPrototypeOf"],
495
- [Reflect.has, "Reflect.has"],
496
- [Reflect.isExtensible, "Reflect.isExtensible"],
497
- [Reflect.ownKeys, "Reflect.ownKeys"],
498
- [Reflect.preventExtensions, "Reflect.preventExtensions"],
499
- [Reflect.set, "Reflect.set"],
500
- [Reflect.setPrototypeOf, "Reflect.setPrototypeOf"],
501
- [RegExp, "RegExp"],
502
- [Set, "Set"],
503
- [String, "String"],
504
- [String.fromCharCode, "String.fromCharCode"],
505
- [String.fromCodePoint, "String.fromCodePoint"],
506
- [String.raw, "String.raw"],
507
- [Symbol, "Symbol"],
508
- [Symbol.for, "Symbol.for"],
509
- [SyntaxError, "SyntaxError"],
510
- [TypeError, "TypeError"],
511
- [Uint16Array, "Uint16Array"],
512
- [Uint16Array.from, "Uint16Array.from"],
513
- [Uint16Array.of, "Uint16Array.of"],
514
- [Uint32Array, "Uint32Array"],
515
- [Uint32Array.from, "Uint32Array.from"],
516
- [Uint32Array.of, "Uint32Array.of"],
517
- [Uint8Array, "Uint8Array"],
518
- [Uint8Array.from, "Uint8Array.from"],
519
- [Uint8Array.of, "Uint8Array.of"],
520
- [Uint8ClampedArray, "Uint8ClampedArray"],
521
- [Uint8ClampedArray.from, "Uint8ClampedArray.from"],
522
- [Uint8ClampedArray.of, "Uint8ClampedArray.of"],
523
- [URIError, "URIError"],
524
- [WeakMap, "WeakMap"],
525
- [WeakSet, "WeakSet"]
526
- ]);
527
- new Map([
528
- [Atomics, "Atomics"],
529
- [console, "console"],
530
- [globalThis, "globalThis"],
531
- [globalThis.crypto, "crypto"],
532
- [Intl, "Intl"],
533
- [JSON, "JSON"],
534
- [Math, "Math"],
535
- [Reflect, "Reflect"]
536
- ]);
308
+ Array.from, Array.isArray, Array.of, ArrayBuffer.isView, Atomics.add, Atomics.and, Atomics.compareExchange, Atomics.exchange, Atomics.isLockFree, Atomics.load, Atomics.notify, Atomics.or, Atomics.store, Atomics.sub, Atomics.wait, BigInt.asIntN, BigInt.asUintN, BigInt64Array, BigInt64Array.from, BigInt64Array.of, BigUint64Array, BigUint64Array.from, BigUint64Array.of, console.timeStamp, Date.now, Date.parse, Date.UTC, Float32Array.from, Float32Array.of, Float64Array.from, Float64Array.of, globalThis.atob, globalThis.btoa, globalThis.clearImmediate, globalThis.clearInterval, globalThis.clearTimeout, globalThis.crypto?.getRandomValues, globalThis.crypto?.randomUUID, globalThis.fetch, globalThis.performance?.now, globalThis.queueMicrotask, globalThis.setImmediate, globalThis.setInterval, globalThis.setTimeout, globalThis.structuredClone, globalThis.URL, globalThis.URLSearchParams, globalThis.WritableStream, Int16Array.from, Int16Array.of, Int32Array.from, Int32Array.of, Int8Array.from, Int8Array.of, Intl.Collator, Intl.DateTimeFormat, Intl.DisplayNames, Intl.getCanonicalLocales, Intl.ListFormat, Intl.Locale, Intl.NumberFormat, Intl.PluralRules, Intl.RelativeTimeFormat, Intl.Segmenter, Intl.supportedValuesOf, Map.groupBy, Number.isFinite, Number.isInteger, Number.isNaN, Number.isSafeInteger, Number.parseFloat, Number.parseInt, String.fromCharCode, String.fromCodePoint, String.raw, Symbol.for, Uint16Array.from, Uint16Array.of, Uint32Array.from, Uint32Array.of, Uint8Array.from, Uint8Array.of, Uint8ClampedArray.from, Uint8ClampedArray.of;
309
+ Atomics, globalThis.crypto;
537
310
  function toAccess(accessor) {
538
311
  const start = accessor[0];
539
312
  return start === "[" ? accessor : start === "\"" || start >= "0" && start <= "9" ? "[" + accessor + "]" : "." + accessor;
@@ -1679,7 +1452,7 @@ var function_default = { analyze(fn) {
1679
1452
  if (refs === true) registerFunction(fnExtra, true);
1680
1453
  else if (refs.size) getReferencesByFn().set(fnExtra, refs);
1681
1454
  } else if (shouldAlwaysRegister(markoRoot)) registerFunction(fnExtra, true);
1682
- else getReferencesByFn().set(fnExtra, new Set([exprRoot.node.extra ??= {}]));
1455
+ else getReferencesByFn().set(fnExtra, /* @__PURE__ */ new Set([exprRoot.node.extra ??= {}]));
1683
1456
  } };
1684
1457
  function finalizeFunctionRegistry() {
1685
1458
  for (const [fnExtra, exprExtras] of getReferencesByFn()) {
@@ -2247,7 +2020,7 @@ let _dynamic_tag = (scopeId, accessor, tag, inputOrArgs, content, inputIsArgs, s
2247
2020
  const { hasOwnProperty } = {};
2248
2021
  //#endregion
2249
2022
  //#region src/translator/util/runtime.ts
2250
- const pureDOMFunctions = new Set([
2023
+ const pureDOMFunctions = /* @__PURE__ */ new Set([
2251
2024
  "_await_promise",
2252
2025
  "_await_content",
2253
2026
  "_child_setup",
@@ -2606,7 +2379,8 @@ function exit(path) {
2606
2379
  getSteps(getSection(path)).push(1);
2607
2380
  }
2608
2381
  function enterShallow(path) {
2609
- getSteps(getSection(path)).push(0, 1);
2382
+ const section = getSection(path);
2383
+ getSteps(section).push(0, 1);
2610
2384
  }
2611
2385
  function injectWalks(tag, name, expr) {
2612
2386
  const section = getSection(tag);
@@ -5763,7 +5537,7 @@ var program_default = {
5763
5537
  if (isDOMPageEntry) {
5764
5538
  const entryFile = program.hub.file;
5765
5539
  const { filename } = entryFile.opts;
5766
- const visitedFiles = new Set([(0, _marko_compiler_babel_utils.resolveRelativePath)(entryFile, filename)]);
5540
+ const visitedFiles = /* @__PURE__ */ new Set([(0, _marko_compiler_babel_utils.resolveRelativePath)(entryFile, filename)]);
5767
5541
  entry_builder_default.visit(entryFile, entryFile, function visitChild(resolved) {
5768
5542
  if (!visitedFiles.has(resolved)) {
5769
5543
  visitedFiles.add(resolved);
@@ -5905,7 +5679,7 @@ function knownTagAnalyze(tag, contentSection, propTree) {
5905
5679
  const tagBody = tag.get("body");
5906
5680
  const tagExtra = tag.node.extra ??= {};
5907
5681
  const childScopeBinding = tagExtra[kChildScopeBinding] = createBinding("#childScope", 0, section);
5908
- const attrExprs = new Set([tagExtra]);
5682
+ const attrExprs = /* @__PURE__ */ new Set([tagExtra]);
5909
5683
  startSection(tagBody);
5910
5684
  trackParamsReferences(tagBody, 3);
5911
5685
  getKnownTags(section).push(tagExtra);
@@ -5941,7 +5715,7 @@ function knownTagTranslateHTML(tag, tagIdentifier, contentSection, propTree) {
5941
5715
  const peekScopeId = generateUidIdentifier(childScopeBinding?.name);
5942
5716
  tag.insertBefore(_marko_compiler.types.variableDeclaration("const", [_marko_compiler.types.variableDeclarator(peekScopeId, callRuntime("_peek_scope_id"))]));
5943
5717
  setBindingSerializedValue(section, childScopeBinding, callRuntime("_existing_scope", peekScopeId));
5944
- if (tagVar) statements.push(_marko_compiler.types.expressionStatement(callRuntime("_var", getScopeIdIdentifier(section), getScopeAccessorLiteral(tag.node.extra[kChildOffsetScopeBinding$1]), peekScopeId, _marko_compiler.types.stringLiteral(getResumeRegisterId(section, node.var.extra?.binding, "var")))));
5718
+ if (tagVar) statements.push(_marko_compiler.types.expressionStatement(callRuntime("_var", getScopeIdIdentifier(section), getScopeAccessorLiteral(tag.node.extra[kChildOffsetScopeBinding$1]), peekScopeId, _marko_compiler.types.stringLiteral(getResumeRegisterId(section, tagVar.extra?.binding, "var")))));
5945
5719
  }
5946
5720
  if (contentSection.paramReasonGroups) {
5947
5721
  let childSerializeReasonExpr;
@@ -6688,9 +6462,9 @@ function createBindingsAndTrackReferences(lVal, type, scope, section, upstreamAl
6688
6462
  for (const prop of lVal.properties) if (prop.type === "RestElement") createBindingsAndTrackReferences(prop.argument, type, scope, section, patternBinding, void 0, excludeProperties);
6689
6463
  else {
6690
6464
  let key;
6691
- if (prop.key.type === "Identifier") key = prop.key.name;
6465
+ if (!prop.computed && prop.key.type === "Identifier") key = prop.key.name;
6692
6466
  else if (prop.key.type === "StringLiteral") key = prop.key.value;
6693
- else throw new Error("computed keys not supported in object pattern");
6467
+ else throw scope.path.hub.buildError(prop.key, "Only identifier and string literal keys are supported when destructuring.");
6694
6468
  if (hasRest) excludeProperties = propsUtil.add(excludeProperties, key);
6695
6469
  if (_marko_compiler.types.isLVal(prop.value)) {
6696
6470
  createBindingsAndTrackReferences(prop.value, type, scope, section, patternBinding, key, void 0);
@@ -8242,7 +8016,6 @@ var log_default = {
8242
8016
  };
8243
8017
  //#endregion
8244
8018
  //#region src/translator/core/script.ts
8245
- const htmlScriptTagAlternateMsg = " For a native html [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.";
8246
8019
  var script_default = {
8247
8020
  parse(tag) {
8248
8021
  const { node } = tag;
@@ -8250,7 +8023,7 @@ var script_default = {
8250
8023
  if (body.length) {
8251
8024
  let code = "";
8252
8025
  for (const child of body) {
8253
- if (child.type !== "MarkoText") throw tag.hub.file.hub.buildError(child, "Unexpected content in [`<script>` tag](https://markojs.com/docs/reference/core-tag#script). Only javascript and typescript is supported." + htmlScriptTagAlternateMsg, SyntaxError);
8026
+ if (child.type !== "MarkoText") throw tag.hub.file.hub.buildError(child, "Unexpected content in [`<script>` tag](https://markojs.com/docs/reference/core-tag#script). Only javascript and typescript is supported. For a native html [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.", SyntaxError);
8254
8027
  code += child.value;
8255
8028
  }
8256
8029
  const start = body[0]?.start;
@@ -8269,7 +8042,7 @@ var script_default = {
8269
8042
  (0, _marko_compiler_babel_utils.assertNoParams)(tag);
8270
8043
  assertNoBodyContent(tag);
8271
8044
  (0, _marko_compiler_babel_utils.assertNoAttributeTags)(tag);
8272
- if (node.var) throw tag.hub.buildError(node.var, "The [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) does not support a tag variable reference." + htmlScriptTagAlternateMsg);
8045
+ if (node.var) throw tag.hub.buildError(node.var, "The [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) does not support a tag variable reference. For a native html [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.");
8273
8046
  let seenValueAttr = false;
8274
8047
  for (const attr of node.attributes) if (attr.type === "MarkoAttribute" && attr.name === "value") {
8275
8048
  if (seenValueAttr) throw tag.hub.buildError(attr, "Invalid duplicate value attribute.");
@@ -8277,7 +8050,7 @@ var script_default = {
8277
8050
  (attr.value.extra ??= {}).isEffect = true;
8278
8051
  addSetupExpr(getOrCreateSection(tag), attr.value);
8279
8052
  (0, _marko_compiler_babel_utils.getProgram)().node.extra.isInteractive = true;
8280
- } else throw tag.hub.buildError(attr, "The [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) does not support html attributes." + htmlScriptTagAlternateMsg);
8053
+ } else throw tag.hub.buildError(attr, "The [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) does not support html attributes. For a native html [`<script>` tag](https://markojs.com/docs/reference/core-tag#script) use the `html-script` core tag instead.");
8281
8054
  if (!seenValueAttr) dropNodes(getAllTagReferenceNodes(node));
8282
8055
  },
8283
8056
  translate: { exit(tag) {
@@ -8532,9 +8305,6 @@ var static_default = {
8532
8305
  descriptionMoreURL: "https://markojs.com/docs/syntax/#static-javascript"
8533
8306
  }]
8534
8307
  };
8535
- //#endregion
8536
- //#region src/translator/util/style-interpolation.ts
8537
- const htmlStyleTagAlternateMsg = " For a native html [`<style>` tag](https://markojs.com/docs/reference/core-tag#style) use the `html-style` core tag instead.";
8538
8308
  function checkStyleInterpolations(tag) {
8539
8309
  const { body } = tag.node.body;
8540
8310
  let stringQuote = "";
@@ -8615,6 +8385,7 @@ const cssGluedBefore = /[\w%]$/;
8615
8385
  //#endregion
8616
8386
  //#region src/translator/core/style.ts
8617
8387
  const STYLE_EXT_REG = /^style((?:\.[a-zA-Z0-9$_-]+)+)?/;
8388
+ const programStyleCounts = /* @__PURE__ */ new WeakMap();
8618
8389
  var style_default = {
8619
8390
  analyze(tag) {
8620
8391
  (0, _marko_compiler_babel_utils.assertNoArgs)(tag);
@@ -8668,7 +8439,7 @@ function collectDynamicStyleNames(tag) {
8668
8439
  index = dynamicStyleNameOffset(tag);
8669
8440
  }
8670
8441
  names.push(dynamicStyleName(tag, index++));
8671
- } else if (!_marko_compiler.types.isMarkoText(child)) throw tag.hub.buildError(child, "The [`<style>` tag](https://markojs.com/docs/reference/core-tag#style) only supports text and `${...}` interpolations." + htmlStyleTagAlternateMsg);
8442
+ } else if (!_marko_compiler.types.isMarkoText(child)) throw tag.hub.buildError(child, "The [`<style>` tag](https://markojs.com/docs/reference/core-tag#style) only supports text and `${...}` interpolations. For a native html [`<style>` tag](https://markojs.com/docs/reference/core-tag#style) use the `html-style` core tag instead.");
8672
8443
  return names;
8673
8444
  }
8674
8445
  function dynamicStyleNameOffset(tag) {
@@ -8701,7 +8472,7 @@ function assertNoStyleAttributes(tag) {
8701
8472
  const extClass = (STYLE_EXT_REG.exec(node.rawValue || "")?.[1]?.slice(1))?.replace(/\./g, " ");
8702
8473
  for (const attr of node.attributes) {
8703
8474
  if (attr.start == null && attr.type === "MarkoAttribute" && attr.name === "class" && attr.value.type === "StringLiteral" && attr.value.value === extClass) continue;
8704
- throw tag.hub.buildError(attr.value, "The `style` does not support html attributes." + htmlStyleTagAlternateMsg);
8475
+ throw tag.hub.buildError(attr.value, "The `style` does not support html attributes. For a native html [`<style>` tag](https://markojs.com/docs/reference/core-tag#style) use the `html-style` core tag instead.");
8705
8476
  }
8706
8477
  }
8707
8478
  function translateHTML$1(tag) {
@@ -8773,6 +8544,11 @@ function getStyleImportPath(file, node, names) {
8773
8544
  const { filename, sourceMaps } = file.opts;
8774
8545
  let ext = STYLE_EXT_REG.exec(node.rawValue || "")?.[1] || ".css";
8775
8546
  if (node.var && !/\.module\./.test(ext)) ext = ".module" + ext;
8547
+ const program = (0, _marko_compiler_babel_utils.getProgram)().node;
8548
+ let counts = programStyleCounts.get(program);
8549
+ if (!counts) programStyleCounts.set(program, counts = {});
8550
+ const index = counts[ext] || 0;
8551
+ counts[ext] = index + 1;
8776
8552
  const magicString = sourceMaps ? new magic_string.default(file.code, { filename }) : void 0;
8777
8553
  let code = "";
8778
8554
  let last = 0;
@@ -8805,7 +8581,7 @@ function getStyleImportPath(file, node, names) {
8805
8581
  }
8806
8582
  }
8807
8583
  return resolveVirtualDependency(filename, {
8808
- virtualPath: `./${path.default.basename(filename) + ext}`,
8584
+ virtualPath: `./${path.default.basename(filename)}${index ? `.${index}` : ""}${ext}`,
8809
8585
  code,
8810
8586
  map
8811
8587
  });
@@ -9949,7 +9725,7 @@ function createInteropTranslator(translate5) {
9949
9725
  const entryFile = program.hub.file;
9950
9726
  const { output, entry } = entryFile.markoOpts;
9951
9727
  if (!(output === "dom" && entry === "page" || output === "hydrate")) return enterProgram?.call(this, program, state);
9952
- const visitedFiles = new Set([(0, _marko_compiler_babel_utils.resolveRelativePath)(entryFile, entryFile.opts.filename)]);
9728
+ const visitedFiles = /* @__PURE__ */ new Set([(0, _marko_compiler_babel_utils.resolveRelativePath)(entryFile, entryFile.opts.filename)]);
9953
9729
  entryBuilder.visit(entryFile, entryFile, function visitChild(resolved) {
9954
9730
  if (!visitedFiles.has(resolved)) {
9955
9731
  visitedFiles.add(resolved);
@@ -9988,7 +9764,7 @@ function mergeTaglibs(libs5, libs6) {
9988
9764
  const libs5Map = new Map(libs5);
9989
9765
  const libs6Map = new Map(libs6);
9990
9766
  const merged = [];
9991
- for (const taglibId of new Set([...libs5Map.keys(), ...libs6Map.keys()])) merged.push([taglibId, mergeObjects(libs5Map.get(taglibId), libs6Map.get(taglibId), (key, value5, value6) => {
9767
+ for (const taglibId of /* @__PURE__ */ new Set([...libs5Map.keys(), ...libs6Map.keys()])) merged.push([taglibId, mergeObjects(libs5Map.get(taglibId), libs6Map.get(taglibId), (key, value5, value6) => {
9992
9768
  switch (key) {
9993
9769
  case "migrate":
9994
9770
  case "analyze":
@@ -4,4 +4,4 @@ import { type SerializeReason, type SerializeReasons } from "./serialize-reasons
4
4
  export declare function getScopeReasonDeclaration(section: Section): t.VariableDeclaration;
5
5
  export declare function getSerializeGuard(section: Section, reason: undefined | SerializeReason, optional: boolean): t.Expression | undefined;
6
6
  export declare function getSerializeGuardForAny(section: Section, reasons: undefined | SerializeReasons, optional: boolean): t.Expression | undefined;
7
- export declare function getExprIfSerialized<T extends undefined | SerializeReason, R extends T extends {} ? t.Expression : undefined>(section: Section, reason: T, expr: t.Expression): R;
7
+ export declare function getExprIfSerialized<T extends undefined | SerializeReason, R extends (T extends {} ? t.Expression : undefined)>(section: Section, reason: T, expr: t.Expression): R;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marko/runtime-tags",
3
- "version": "6.2.3",
3
+ "version": "6.2.5",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",
package/tags-html.d.ts CHANGED
@@ -922,13 +922,7 @@ declare global {
922
922
  * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fs-method
923
923
  */
924
924
  method?:
925
- | AttrMissing
926
- | "POST"
927
- | "post"
928
- | "GET"
929
- | "get"
930
- | "dialog"
931
- | "DIALOG";
925
+ AttrMissing | "POST" | "post" | "GET" | "get" | "dialog" | "DIALOG";
932
926
  /**
933
927
  * The name attribute represents the form's name within the forms collection.
934
928
  * @see https://html.spec.whatwg.org/multipage/forms.html#attr-form-name
@@ -2645,12 +2639,7 @@ declare global {
2645
2639
  * @see https://svgwg.org/specs/animations/#AnimateTransformElementTypeAttribute
2646
2640
  */
2647
2641
  type?:
2648
- | AttrMissing
2649
- | "translate"
2650
- | "scale"
2651
- | "rotate"
2652
- | "skewX"
2653
- | "skewY";
2642
+ AttrMissing | "translate" | "scale" | "rotate" | "skewX" | "skewY";
2654
2643
  }
2655
2644
 
2656
2645
  /**
@@ -3577,11 +3566,7 @@ declare global {
3577
3566
  * @see https://www.w3.org/TR/SVG2/painting.html#OrientAttribute
3578
3567
  */
3579
3568
  orient?:
3580
- | AttrMissing
3581
- | "auto"
3582
- | "auto-start-reverse"
3583
- | number
3584
- | (string & {});
3569
+ AttrMissing | "auto" | "auto-start-reverse" | number | (string & {});
3585
3570
  }
3586
3571
 
3587
3572
  /**
@@ -3701,9 +3686,7 @@ declare global {
3701
3686
  * @see https://www.w3.org/TR/SVG2/pservers.html#PatternElementPatternContentUnitsAttribute
3702
3687
  */
3703
3688
  patternContentUnits?:
3704
- | AttrMissing
3705
- | "userSpaceOnUse"
3706
- | "objectBoundingBox";
3689
+ AttrMissing | "userSpaceOnUse" | "objectBoundingBox";
3707
3690
 
3708
3691
  /**
3709
3692
  * @see https://www.w3.org/TR/SVG2/pservers.html#PatternElementPatternTransformAttribute
@@ -3951,23 +3934,13 @@ declare global {
3951
3934
  * @see https://www.w3.org/TR/SVG2/struct.html#SymbolElementRefXAttribute
3952
3935
  */
3953
3936
  refX?:
3954
- | AttrMissing
3955
- | "left"
3956
- | "center"
3957
- | "right"
3958
- | number
3959
- | (string & {});
3937
+ AttrMissing | "left" | "center" | "right" | number | (string & {});
3960
3938
 
3961
3939
  /**
3962
3940
  * @see https://www.w3.org/TR/SVG2/struct.html#SymbolElementRefYAttribute
3963
3941
  */
3964
3942
  refY?:
3965
- | AttrMissing
3966
- | "top"
3967
- | "center"
3968
- | "bottom"
3969
- | number
3970
- | (string & {});
3943
+ AttrMissing | "top" | "center" | "bottom" | number | (string & {});
3971
3944
 
3972
3945
  /**
3973
3946
  * @see https://www.w3.org/TR/SVG2/geometry.html#XProperty
@@ -4197,11 +4170,7 @@ declare global {
4197
4170
  * @see https://html.spec.whatwg.org/multipage/interaction.html#attr-autocapitalize
4198
4171
  */
4199
4172
  autocapitalize?:
4200
- | AttrOnOff
4201
- | "characters"
4202
- | "none"
4203
- | "sentences"
4204
- | "words";
4173
+ AttrOnOff | "characters" | "none" | "sentences" | "words";
4205
4174
 
4206
4175
  /**
4207
4176
  * Indicates whether the element should automatically get focus when the page loads.
@@ -4470,16 +4439,13 @@ declare global {
4470
4439
  color?: AttrMissing | csstype.Property.Color;
4471
4440
  "color-interpolation"?: AttrMissing | csstype.Property.ColorInterpolation;
4472
4441
  "color-interpolation-filters"?:
4473
- | AttrMissing
4474
- | csstype.Property.ColorInterpolation;
4442
+ AttrMissing | csstype.Property.ColorInterpolation;
4475
4443
  "color-rendering"?: AttrMissing | csstype.Property.ColorRendering;
4476
4444
  cursor?: AttrMissing | csstype.Property.Cursor;
4477
4445
  direction?: AttrMissing | csstype.Property.Direction;
4478
4446
  display?: AttrMissing | csstype.Property.Display;
4479
4447
  "dominant-baseline"?:
4480
- | AttrMissing
4481
- | csstype.Property.DominantBaseline
4482
- | number;
4448
+ AttrMissing | csstype.Property.DominantBaseline | number;
4483
4449
  /**
4484
4450
  * @see https://www.w3.org/TR/SVG11/filters.html#EnableBackgroundProperty
4485
4451
  */
@@ -4494,19 +4460,15 @@ declare global {
4494
4460
  "font-family"?: AttrMissing | csstype.Property.FontFamily;
4495
4461
  "font-size"?: AttrMissing | csstype.Property.FontSize | number;
4496
4462
  "font-size-adjust"?:
4497
- | AttrMissing
4498
- | csstype.Property.FontSizeAdjust
4499
- | number;
4463
+ AttrMissing | csstype.Property.FontSizeAdjust | number;
4500
4464
  "font-stretch"?: AttrMissing | csstype.Property.FontStretch;
4501
4465
  "font-style"?: AttrMissing | csstype.Property.FontStyle;
4502
4466
  "font-variant"?: AttrMissing | csstype.Property.FontVariant;
4503
4467
  "font-weight"?: AttrMissing | csstype.Property.FontWeight | number;
4504
4468
  "glyph-orientation-horizontal"?:
4505
- | AttrMissing
4506
- | csstype.Property.GlyphOrientationVertical;
4469
+ AttrMissing | csstype.Property.GlyphOrientationVertical;
4507
4470
  "glyph-orientation-vertical"?:
4508
- | AttrMissing
4509
- | csstype.Property.GlyphOrientationVertical;
4471
+ AttrMissing | csstype.Property.GlyphOrientationVertical;
4510
4472
  "image-rendering"?: AttrMissing | csstype.Property.ImageRendering;
4511
4473
  isolation?: AttrMissing | csstype.Property.Isolation;
4512
4474
  kerning?: AttrMissing | csstype.Property.FontKerning | number;
@@ -4526,19 +4488,13 @@ declare global {
4526
4488
  "stop-opacity"?: AttrMissing | csstype.Property.StopOpacity | number;
4527
4489
  stroke?: AttrMissing | csstype.Property.Stroke;
4528
4490
  "stroke-dasharray"?:
4529
- | AttrMissing
4530
- | csstype.Property.StrokeDasharray
4531
- | number;
4491
+ AttrMissing | csstype.Property.StrokeDasharray | number;
4532
4492
  "stroke-dashoffset"?:
4533
- | AttrMissing
4534
- | csstype.Property.StrokeDashoffset
4535
- | number;
4493
+ AttrMissing | csstype.Property.StrokeDashoffset | number;
4536
4494
  "stroke-linecap"?: AttrMissing | csstype.Property.StrokeLinecap;
4537
4495
  "stroke-linejoin"?: AttrMissing | csstype.Property.StrokeLinejoin;
4538
4496
  "stroke-miterlimit"?:
4539
- | AttrMissing
4540
- | csstype.Property.StrokeMiterlimit
4541
- | number;
4497
+ AttrMissing | csstype.Property.StrokeMiterlimit | number;
4542
4498
  "stroke-opacity"?: AttrMissing | csstype.Property.StrokeOpacity | number;
4543
4499
  "stroke-width"?: AttrMissing | csstype.Property.StrokeWidth | number;
4544
4500
  "text-anchor"?: AttrMissing | csstype.Property.TextAnchor;
@@ -5596,13 +5552,7 @@ interface CommonAttributes<T extends Element> {
5596
5552
  * @see https://www.w3.org/TR/wai-aria-1.1/#aria-current
5597
5553
  */
5598
5554
  "aria-current"?:
5599
- | AttrBooleanString
5600
- | "date"
5601
- | "location"
5602
- | "page"
5603
- | "step"
5604
- | "time"
5605
- | "true";
5555
+ AttrBooleanString | "date" | "location" | "page" | "step" | "time" | "true";
5606
5556
  /**
5607
5557
  * Identifies the element (or elements) that describes the object.
5608
5558
  * @see https://www.w3.org/TR/wai-aria-1.1/#aria-describedby
@@ -5631,13 +5581,7 @@ interface CommonAttributes<T extends Element> {
5631
5581
  * @see https://www.w3.org/TR/wai-aria-1.1/#aria-dropeffect
5632
5582
  * */
5633
5583
  "aria-dropeffect"?:
5634
- | AttrMissing
5635
- | "copy"
5636
- | "execute"
5637
- | "link"
5638
- | "move"
5639
- | "none"
5640
- | "popup";
5584
+ AttrMissing | "copy" | "execute" | "link" | "move" | "none" | "popup";
5641
5585
  /**
5642
5586
  * Identifies the element that provides an error message for the object.
5643
5587
  * @see https://www.w3.org/TR/wai-aria-1.1/#aria-errormessage
@@ -5667,12 +5611,7 @@ interface CommonAttributes<T extends Element> {
5667
5611
  * @see https://www.w3.org/TR/wai-aria-1.1/#aria-haspopup
5668
5612
  */
5669
5613
  "aria-haspopup"?:
5670
- | AttrBooleanString
5671
- | "dialog"
5672
- | "grid"
5673
- | "listbox"
5674
- | "menu"
5675
- | "tree";
5614
+ AttrBooleanString | "dialog" | "grid" | "listbox" | "menu" | "tree";
5676
5615
  /**
5677
5616
  * Indicates whether the element is exposed to an accessibility API.
5678
5617
  * @see https://www.w3.org/TR/wai-aria-1.1/#aria-hidden
@@ -5928,22 +5867,13 @@ interface CommonAttributes<T extends Element> {
5928
5867
  }
5929
5868
  type AttrMissing = undefined | null | false;
5930
5869
  type AttrClass =
5931
- | AttrMissing
5932
- | string
5933
- | AttrClass[]
5934
- | Record<string, AttrMissing | boolean>;
5870
+ AttrMissing | string | AttrClass[] | Record<string, AttrMissing | boolean>;
5935
5871
  type AttrStyle = AttrMissing | string | Marko.CSS.Properties | AttrStyle[];
5936
5872
  type AttrCrossOrigin = AttrBoolean | "anonymous" | "use-credentials";
5937
5873
  type AttrEventHandler<Event, Target> =
5938
- | AttrMissing
5939
- | ((event: Event, target: Target) => unknown);
5874
+ AttrMissing | ((event: Event, target: Target) => unknown);
5940
5875
  type AttrTarget =
5941
- | AttrMissing
5942
- | "_blank"
5943
- | "_parent"
5944
- | "_self"
5945
- | "_top"
5946
- | (string & {});
5876
+ AttrMissing | "_blank" | "_parent" | "_self" | "_top" | (string & {});
5947
5877
  type AttrReferrerPolicy =
5948
5878
  | AttrMissing
5949
5879
  | "no-referrer-when-downgrade"
@@ -5973,13 +5903,7 @@ type AttrHref =
5973
5903
  * so any URL is accepted while suggesting common prefixes in autocomplete.
5974
5904
  */
5975
5905
  type AttrSrc =
5976
- | AttrMissing
5977
- | "/"
5978
- | "./"
5979
- | "https://"
5980
- | "data:"
5981
- | "blob:"
5982
- | (string & {});
5906
+ AttrMissing | "/" | "./" | "https://" | "data:" | "blob:" | (string & {});
5983
5907
  /**
5984
5908
  * MIME type for type, codetype, and enctype attributes. Use (string & {}) so
5985
5909
  * any MIME type is accepted while suggesting common values in autocomplete.