marko 6.4.14 → 6.4.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/debug/dom/catch.feat.js +1 -1
  2. package/dist/debug/dom/catch.feat.mjs +1 -1
  3. package/dist/debug/dom/compat.feat.js +1 -1
  4. package/dist/debug/dom/compat.feat.mjs +1 -1
  5. package/dist/debug/dom/controllable-input.feat.js +1 -1
  6. package/dist/debug/dom/controllable-input.feat.mjs +1 -1
  7. package/dist/debug/dom/controllable-open.feat.js +1 -1
  8. package/dist/debug/dom/controllable-open.feat.mjs +1 -1
  9. package/dist/debug/dom/controllable-select.feat.js +1 -1
  10. package/dist/debug/dom/controllable-select.feat.mjs +1 -1
  11. package/dist/debug/dom/controllable-textarea.feat.js +1 -1
  12. package/dist/debug/dom/controllable-textarea.feat.mjs +1 -1
  13. package/dist/debug/dom/controllable.feat.js +1 -1
  14. package/dist/debug/dom/controllable.feat.mjs +1 -1
  15. package/dist/debug/dom/dynamic-tag-script.feat.js +1 -1
  16. package/dist/debug/dom/dynamic-tag-script.feat.mjs +1 -1
  17. package/dist/debug/dom/dynamic-tag-var.feat.js +1 -1
  18. package/dist/debug/dom/dynamic-tag-var.feat.mjs +1 -1
  19. package/dist/debug/dom/lazy.feat.js +1 -1
  20. package/dist/debug/dom/lazy.feat.mjs +1 -1
  21. package/dist/debug/dom/placeholder.feat.js +1 -1
  22. package/dist/debug/dom/placeholder.feat.mjs +1 -1
  23. package/dist/debug/{dom-sfzdCRAg.js → dom-BLoTKI2r.js} +3 -3
  24. package/dist/debug/{dom-BORByF2b.mjs → dom-DlBA4dCe.mjs} +2 -2
  25. package/dist/debug/dom.js +3 -2
  26. package/dist/debug/dom.mjs +2 -2
  27. package/dist/debug/html/compat.feat.js +1 -1
  28. package/dist/debug/html/compat.feat.mjs +1 -1
  29. package/dist/debug/{html-DMo6pc_h.mjs → html-DM7X2D_b.mjs} +37 -29
  30. package/dist/debug/{html-DfZjMkhx.js → html-Du0z056z.js} +37 -29
  31. package/dist/debug/html.js +1 -1
  32. package/dist/debug/html.mjs +1 -1
  33. package/dist/dom/catch.feat.js +1 -1
  34. package/dist/dom/catch.feat.mjs +1 -1
  35. package/dist/dom/compat.feat.js +1 -1
  36. package/dist/dom/compat.feat.mjs +1 -1
  37. package/dist/dom/controllable-input.feat.js +1 -1
  38. package/dist/dom/controllable-input.feat.mjs +1 -1
  39. package/dist/dom/controllable-open.feat.js +1 -1
  40. package/dist/dom/controllable-open.feat.mjs +1 -1
  41. package/dist/dom/controllable-select.feat.js +1 -1
  42. package/dist/dom/controllable-select.feat.mjs +1 -1
  43. package/dist/dom/controllable-textarea.feat.js +1 -1
  44. package/dist/dom/controllable-textarea.feat.mjs +1 -1
  45. package/dist/dom/controllable.feat.js +1 -1
  46. package/dist/dom/controllable.feat.mjs +1 -1
  47. package/dist/dom/dynamic-tag-script.feat.js +1 -1
  48. package/dist/dom/dynamic-tag-script.feat.mjs +1 -1
  49. package/dist/dom/dynamic-tag-var.feat.js +1 -1
  50. package/dist/dom/dynamic-tag-var.feat.mjs +1 -1
  51. package/dist/dom/lazy.feat.js +1 -1
  52. package/dist/dom/lazy.feat.mjs +1 -1
  53. package/dist/dom/placeholder.feat.js +1 -1
  54. package/dist/dom/placeholder.feat.mjs +1 -1
  55. package/dist/dom/renderer.d.ts +1 -1
  56. package/dist/{dom-DRiewpRL.js → dom-BRtFOIF-.js} +2 -2
  57. package/dist/{dom-DKn1bCPC.mjs → dom-Cqajrs_w.mjs} +2 -2
  58. package/dist/dom.d.ts +1 -1
  59. package/dist/dom.js +2 -2
  60. package/dist/dom.mjs +2 -2
  61. package/dist/html/assets.d.ts +1 -1
  62. package/dist/html/compat.feat.js +1 -1
  63. package/dist/html/compat.feat.mjs +1 -1
  64. package/dist/html/control-flow.d.ts +9 -9
  65. package/dist/html/for.d.ts +3 -3
  66. package/dist/html/inlined-runtimes.d.ts +1 -1
  67. package/dist/html/inlined-runtimes.debug.d.ts +1 -1
  68. package/dist/html/serializer.d.ts +2 -0
  69. package/dist/html/writer.d.ts +3 -2
  70. package/dist/{html-DrHsybFm.js → html-4A3vJpIT.js} +32 -32
  71. package/dist/{html-DMDc0zKs.mjs → html-C3dQGQ2x.mjs} +32 -32
  72. package/dist/html.js +1 -1
  73. package/dist/html.mjs +1 -1
  74. package/dist/translator/index.js +251 -160
  75. package/dist/translator/interop/build-aggregate-error.d.ts +1 -1
  76. package/dist/translator/util/cyclic-memo.d.ts +2 -0
  77. package/dist/translator/util/sections.d.ts +1 -0
  78. package/dist/translator/util/solve-reasons.d.ts +6 -4
  79. package/dist/translator/util/write-guard.d.ts +2 -0
  80. package/dist/translator/util/writer.d.ts +1 -2
  81. package/package.json +4 -4
@@ -361,13 +361,13 @@ var State$1 = class {
361
361
  let scope = registered.scope, scopeId = scope[K_SCOPE_ID];
362
362
  trackScope(this, scope, scopeId);
363
363
  let locals = registered.locals?.(this.boundary.state.scope);
364
- if (locals) {
365
- this.buf.push(registered.access + "(_(" + scopeId + ")");
366
- for (let local of locals) this.buf.push(","), writePlainObject(this, local, newArgReference(this, ref, local));
367
- } else this.buf.push("_(" + scopeId + "," + quoteRegistryId(registered.id));
368
- this.buf.push(")");
364
+ locals ? (this.buf.push(registered.access + "(_(" + scopeId + ")"), writeLocalArgs(this, ref, locals)) : this.buf.push("_(" + scopeId + "," + quoteRegistryId(registered.id)), this.buf.push(")");
369
365
  }
370
- }, Reference = class {
366
+ };
367
+ function writeLocalArgs(state, ref, locals) {
368
+ for (let local of locals) state.buf.push(","), writePlainObject(state, local, newArgReference(state, ref, local));
369
+ }
370
+ var Reference = class {
371
371
  assignments = null;
372
372
  deferredMembers = null;
373
373
  scopeId = void 0;
@@ -1292,12 +1292,6 @@ function withContext(key, value, cb, cbValue, cbValue2) {
1292
1292
  ctx[kPendingContexts]--, ctx[key] = prev;
1293
1293
  }
1294
1294
  }
1295
- function captureContext(chunk) {
1296
- chunk.context?.[kPendingContexts] && (chunk.context = {
1297
- ...chunk.context,
1298
- [kPendingContexts]: 0
1299
- });
1300
- }
1301
1295
  function isInResumedBranch() {
1302
1296
  return $chunk?.context?.[kBranchId] !== void 0;
1303
1297
  }
@@ -1509,8 +1503,28 @@ var State = class {
1509
1503
  serializeFlush(boundary) {
1510
1504
  flushSerializer(boundary, this);
1511
1505
  }
1506
+ getSerializedGlobals() {
1507
+ let { $global } = this, serializedGlobals = $global.serializedGlobals;
1508
+ if (!serializedGlobals) return 0;
1509
+ let filtered = 0;
1510
+ if (Array.isArray(serializedGlobals)) for (let key of serializedGlobals) {
1511
+ let value = $global[key];
1512
+ value !== void 0 && ((filtered ||= {})[key] = value);
1513
+ }
1514
+ else for (let key in serializedGlobals) if (serializedGlobals[key]) {
1515
+ let value = $global[key];
1516
+ value !== void 0 && ((filtered ||= {})[key] = value);
1517
+ }
1518
+ return filtered;
1519
+ }
1512
1520
  runtimeScript() {
1513
- return "(e=>(self[e]||=(l,f=e+l,s=f.length,a={},d=[],t=document,n=t.createTreeWalker(t,129))=>t=self[e][l]={i:f,l:a,v:d,x(){},w(e,l,r){for(;e=n.nextNode();)t.x(l=(l=e.data)&&!l.indexOf(f)&&(r=l.slice(s+1),(l=l[s])>\"#\"||(a[r]=e),l),r,e),l>\"#\"&&d.push(e)}},self[e]))(\"" + this.$global.runtimeId + "\")(\"" + this.$global.renderId + "\")";
1521
+ return "(e=>(self[e]||=(l,f=e+l,s=f.length,a={},d=[],t=document,n=t.createTreeWalker(t,129))=>t=self[e][l]={i:f,l:a,v:d,x(){},w(e,l,r){for(;e=n.nextNode();)t.x(l=(l=e.data)&&!l.indexOf(f)&&(r=l.slice(s+1),(l=l[s])>\"#\"||(a[r]=e),l),r,e),l>\"#\"&&d.push(e);n.currentNode=document.currentScript}},self[e]))(\"" + this.$global.runtimeId + "\")(\"" + this.$global.renderId + "\")";
1522
+ }
1523
+ captureContext(chunk) {
1524
+ chunk.context?.[kPendingContexts] && (chunk.context = {
1525
+ ...chunk.context,
1526
+ [kPendingContexts]: 0
1527
+ });
1514
1528
  }
1515
1529
  keepsTryMarks(chunk, resumeWrites) {
1516
1530
  return chunk !== $chunk || chunk.boundary.resumeWrites !== resumeWrites;
@@ -1805,7 +1819,7 @@ function flushSerializer(boundary, channel) {
1805
1819
  }
1806
1820
  if (!channel.readyId && !state.hasWrittenGlobals) {
1807
1821
  state.hasWrittenGlobals = !0;
1808
- let globals = getFilteredGlobals(state.$global);
1822
+ let globals = state.getSerializedGlobals();
1809
1823
  globals && flushes.push([
1810
1824
  0,
1811
1825
  globals,
@@ -1827,7 +1841,7 @@ function flushSerializerGlobals(boundary) {
1827
1841
  let { state } = boundary;
1828
1842
  if (state.hasWrittenGlobals) return;
1829
1843
  state.hasWrittenGlobals = !0;
1830
- let globals = getFilteredGlobals(state.$global);
1844
+ let globals = state.getSerializedGlobals();
1831
1845
  globals && (state.needsWalkerRuntime = !0, state.resumes = concatSequence(state.resumes, stringifyScopes(state.serializer, [[
1832
1846
  0,
1833
1847
  globals,
@@ -1842,20 +1856,6 @@ function readyBatch(state, channel, deps, resumes) {
1842
1856
  }
1843
1857
  return resumes && own[readyId]++, concatSequence(wait && wait + "}", resumes);
1844
1858
  }
1845
- function getFilteredGlobals($global) {
1846
- let serializedGlobals = $global.serializedGlobals;
1847
- if (!serializedGlobals) return 0;
1848
- let filtered = 0;
1849
- if (Array.isArray(serializedGlobals)) for (let key of serializedGlobals) {
1850
- let value = $global[key];
1851
- value !== void 0 && ((filtered ||= {})[key] = value);
1852
- }
1853
- else for (let key in serializedGlobals) if (serializedGlobals[key]) {
1854
- let value = $global[key];
1855
- value !== void 0 && ((filtered ||= {})[key] = value);
1856
- }
1857
- return filtered;
1858
- }
1859
1859
  function concatEffects(a, b) {
1860
1860
  return a ? b ? a + " " + b : a : b;
1861
1861
  }
@@ -2319,7 +2319,7 @@ function _await(scopeId, accessor, promise, content, markerGuard) {
2319
2319
  return;
2320
2320
  }
2321
2321
  let chunk = $chunk, { boundary } = chunk, startId = _peek_scope_id(), after = chunk.next = chunk.forkRest(boundary);
2322
- chunk.async = !0, captureContext(chunk), boundary.startAsync(), promise.then((value) => {
2322
+ chunk.async = !0, boundary.state.captureContext(chunk), boundary.startAsync(), promise.then((value) => {
2323
2323
  if (chunk.async && (chunk.async = !1, !boundary.aborted)) {
2324
2324
  let { state } = boundary;
2325
2325
  chunk.render(() => {
@@ -2342,7 +2342,7 @@ function _try(scopeId, accessor, content, placeholderContent, catchContent, plac
2342
2342
  }
2343
2343
  function tryPlaceholder(content, placeholder, branchId, scopeId, placeholderBranchId) {
2344
2344
  let chunk = $chunk, { boundary } = chunk, body = chunk.fork(boundary, null);
2345
- body === body.render(content) ? chunk.append(body) : (chunk.next = chunk.forkRest(boundary), captureContext(chunk), chunk.placeholder = {
2345
+ body === body.render(content) ? chunk.append(body) : (chunk.next = chunk.forkRest(boundary), boundary.state.captureContext(chunk), chunk.placeholder = {
2346
2346
  body,
2347
2347
  render: placeholder,
2348
2348
  branchId,
@@ -2365,7 +2365,7 @@ function tryBoundary(content, catchContent, branchId, renderers) {
2365
2365
  return reorderId && (chunk.catchRange = {
2366
2366
  id: reorderId,
2367
2367
  end: bodyEnd
2368
- }, captureContext(chunk)), bodyBoundary.onNext = () => {
2368
+ }, state.captureContext(chunk)), bodyBoundary.onNext = () => {
2369
2369
  if (!boundary.aborted) {
2370
2370
  if (bodyBoundary.aborted) {
2371
2371
  if (!reorderId) {
package/dist/html.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- let require_control_flow = require("./html-DrHsybFm.js"), empty = [], rest = Symbol();
2
+ let require_control_flow = require("./html-4A3vJpIT.js"), empty = [], rest = Symbol();
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  // src/common/attr-tag.ts
5
5
  function attrTag(attrs) {
package/dist/html.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  let empty = [], rest = Symbol();
2
- import { $ as _subscribe, A as $global, At as _attrs_select_value, B as _hoist, Bt as _signal_read_error, C as _escape_comment, Ct as _attr_select_value, D as _to_text, Dt as _attrs_content, E as _escape_style_value, Et as _attrs, G as _resume, H as _html_mark, I as _attr_content, It as _assert_class_toggles, J as _scope_id, K as _resume_branch, L as _el, Lt as _assert_hoist, Mt as _style_html, Nt as _textarea_value, O as _unescaped, Ot as _attrs_partial, Q as _set_scope_reason, R as _el_mark, Rt as _el_read_error, S as _escape, St as _attr_or, T as _escape_style, Tt as _attr_textarea_value, U as _id, V as _html, W as _peek_scope_id, X as _scope_with_id, Y as _scope_reason, Z as _script, _t as _attr_input_checkedValue, a as _for_until, b as _content_resume, bt as _attr_nullish, c as _show_start, d as forOf, et as _text_mark, f as forTo, ft as _attr, g as withPageAssets, gt as _attr_input_checked, h as withLoadAssets, ht as _attr_details_or_dialog_open, i as _for_to, it as _write_if, jt as _attrs_textarea_value, kt as _attrs_partial_content, l as _try, m as _flush_head, mt as _attr_class, n as _for_in, nt as _var, o as _if, p as forUntil, pt as _attr_and, q as _resume_locals, r as _for_of, rt as _write_guard, s as _show_end, t as _await, tt as _trailers, u as forIn, ut as writeScope, v as _template, vt as _attr_input_value, w as _escape_script, wt as _attr_style, x as _dynamic_tag, xt as _attr_option_value, y as _content, yt as _attr_nonce, z as _existing_scope, zt as _hoist_read_error } from "./html-DMDc0zKs.mjs";
2
+ import { $ as _subscribe, A as $global, At as _attrs_select_value, B as _hoist, Bt as _signal_read_error, C as _escape_comment, Ct as _attr_select_value, D as _to_text, Dt as _attrs_content, E as _escape_style_value, Et as _attrs, G as _resume, H as _html_mark, I as _attr_content, It as _assert_class_toggles, J as _scope_id, K as _resume_branch, L as _el, Lt as _assert_hoist, Mt as _style_html, Nt as _textarea_value, O as _unescaped, Ot as _attrs_partial, Q as _set_scope_reason, R as _el_mark, Rt as _el_read_error, S as _escape, St as _attr_or, T as _escape_style, Tt as _attr_textarea_value, U as _id, V as _html, W as _peek_scope_id, X as _scope_with_id, Y as _scope_reason, Z as _script, _t as _attr_input_checkedValue, a as _for_until, b as _content_resume, bt as _attr_nullish, c as _show_start, d as forOf, et as _text_mark, f as forTo, ft as _attr, g as withPageAssets, gt as _attr_input_checked, h as withLoadAssets, ht as _attr_details_or_dialog_open, i as _for_to, it as _write_if, jt as _attrs_textarea_value, kt as _attrs_partial_content, l as _try, m as _flush_head, mt as _attr_class, n as _for_in, nt as _var, o as _if, p as forUntil, pt as _attr_and, q as _resume_locals, r as _for_of, rt as _write_guard, s as _show_end, t as _await, tt as _trailers, u as forIn, ut as writeScope, v as _template, vt as _attr_input_value, w as _escape_script, wt as _attr_style, x as _dynamic_tag, xt as _attr_option_value, y as _content, yt as _attr_nonce, z as _existing_scope, zt as _hoist_read_error } from "./html-C3dQGQ2x.mjs";
3
3
  // src/common/attr-tag.ts
4
4
  function attrTag(attrs) {
5
5
  return attrs[Symbol.iterator] = attrTagIterator, attrs[rest] = empty, attrs;