marko 6.0.0-next.3.63 → 6.0.0-next.3.65

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/html.js CHANGED
@@ -178,7 +178,7 @@ function forTo(to, from, step, cb) {
178
178
  }
179
179
 
180
180
  // src/html/inlined-runtimes.ts
181
- var WALKER_RUNTIME_CODE = '(e=>self[e]=self[e]||(l=>{let t,d={},s=[],f=document,i=f.createTreeWalker(f,129),n=self[e][l]={i:l=e+l,d:f,l:d,v:s,x(){},w(e){for(;e=i.nextNode();)this.x(n=(n=e.data)&&!n.indexOf(l)&&(d[t=n.slice(x+1)]=e,n[x]),t,e),n>"#"&&s.push(e)}},x=l.length}))', REORDER_RUNTIME_CODE = '(e=>{let i,t,r,l={},o=(e,i)=>{e.replaceWith(...i.childNodes),i.remove()};e.d.head.append(e.d.querySelector("style["+e.i+"]")||""),e.j={},e.x=(d,n,a,c,p)=>{"#"==d?(l[n]=t).i++:a==r&&i(),"T"==a.tagName&&(n=a.getAttribute(e.i))&&((c=e.l["^"+n])&&(l[n]={i:1,c(i=e.l[n]||a){for(;i.parentNode!==c.parentNode;)i=i.parentNode;for(;i!=r;(r=c.nextSibling).remove());o(c,a)}}),r=a.nextSibling,t=l[n],i=()=>{c||o(e.l[n],a),--t.i||t.c()},(d=e.j[n])&&(p=t.c,t.c=()=>p()+d(e)))}})';
181
+ var WALKER_RUNTIME_CODE = '(e=>self[e]=self[e]||(l=>{let t,d={},s=[],f=document,i=f.createTreeWalker(f,129),n=self[e][l]={i:l=e+l,d:f,l:d,v:s,x(){},w(e){for(;e=i.nextNode();)this.x(n=(n=e.data)&&!n.indexOf(l)&&(d[t=n.slice(x+1)]=e,n[x]),t,e),n>"#"&&s.push(e)}},x=l.length}))', REORDER_RUNTIME_CODE = '(e=>{let i,t,r,l={},o=(e,i)=>{e.replaceWith(...i.childNodes),i.remove()};e.d.head.append(e.d.querySelector("style["+e.i+"]")||""),e.j={},e.x=(d,n,a,c,p)=>{"#"==d?(l[n]=t).i++:a==r&&i(),"T"==a.tagName&&(n=a.getAttribute(e.i))&&((c=e.l["^"+n])&&(l[n]={i:1,c(i=e.l[n]||a){for(;i.parentNode!==c.parentNode;)i=i.parentNode;for(;i!=r;(r=c.nextSibling).remove());o(c,a)}}),r=a.nextSibling,t=l[n],i=()=>{c||o(e.l[n],a),--t.i||t.c()},(d=e.j[n])&&(p=t.c,t.c=()=>p()+d(e.r)))}})';
182
182
 
183
183
  // src/html/serializer.ts
184
184
  var { hasOwnProperty } = {}, Generator = function* () {
@@ -1141,9 +1141,9 @@ function hoist(scopeId, id) {
1141
1141
  }
1142
1142
  function resumeClosestBranch(scopeId) {
1143
1143
  let branchId = $chunk.context?.[branchIdKey];
1144
- branchId !== void 0 && branchId !== scopeId && $chunk.writeHTML(
1145
- $chunk.boundary.state.mark("$" /* ClosestBranch */, "" + scopeId)
1146
- );
1144
+ branchId !== void 0 && branchId !== scopeId && writeScope(scopeId, {
1145
+ g: branchId
1146
+ });
1147
1147
  }
1148
1148
  var branchIdKey = Symbol();
1149
1149
  function resumeForOf(list, cb, scopeId, accessor) {
@@ -1789,7 +1789,7 @@ var DEFAULT_RUNTIME_ID = "M", DEFAULT_RENDER_ID = "_";
1789
1789
  var voidElementsReg = /^(?:area|b(?:ase|r)|col|embed|hr|i(?:mg|nput)|link|meta|param|source|track|wbr)$/;
1790
1790
  function dynamicTagId(tagName) {
1791
1791
  let normalizedRenderer = normalizeDynamicRenderer(tagName);
1792
- return normalizedRenderer?.g || normalizedRenderer;
1792
+ return normalizedRenderer?.h || normalizedRenderer;
1793
1793
  }
1794
1794
  var dynamicTagInput = (scopeId, accessor, tag, input, content) => {
1795
1795
  if (!tag && !content) {
@@ -1862,7 +1862,7 @@ var dynamicTagInput = (scopeId, accessor, tag, input, content) => {
1862
1862
  ), result;
1863
1863
  };
1864
1864
  function createContent(id, fn) {
1865
- return fn.g = id, fn;
1865
+ return fn.h = id, fn;
1866
1866
  }
1867
1867
  function registerContent(id, fn, scopeId) {
1868
1868
  return register2(createContent(id, fn), id, scopeId);
@@ -1889,7 +1889,7 @@ var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap()
1889
1889
  writeScript,
1890
1890
  nextScopeId,
1891
1891
  isTagsAPI(fn) {
1892
- return !!fn.g;
1892
+ return !!fn.h;
1893
1893
  },
1894
1894
  patchDynamicTag,
1895
1895
  writeSetScopeForComponent(m5c) {
package/dist/html.mjs CHANGED
@@ -97,7 +97,7 @@ function forTo(to, from, step, cb) {
97
97
  }
98
98
 
99
99
  // src/html/inlined-runtimes.ts
100
- var WALKER_RUNTIME_CODE = '(e=>self[e]=self[e]||(l=>{let t,d={},s=[],f=document,i=f.createTreeWalker(f,129),n=self[e][l]={i:l=e+l,d:f,l:d,v:s,x(){},w(e){for(;e=i.nextNode();)this.x(n=(n=e.data)&&!n.indexOf(l)&&(d[t=n.slice(x+1)]=e,n[x]),t,e),n>"#"&&s.push(e)}},x=l.length}))', REORDER_RUNTIME_CODE = '(e=>{let i,t,r,l={},o=(e,i)=>{e.replaceWith(...i.childNodes),i.remove()};e.d.head.append(e.d.querySelector("style["+e.i+"]")||""),e.j={},e.x=(d,n,a,c,p)=>{"#"==d?(l[n]=t).i++:a==r&&i(),"T"==a.tagName&&(n=a.getAttribute(e.i))&&((c=e.l["^"+n])&&(l[n]={i:1,c(i=e.l[n]||a){for(;i.parentNode!==c.parentNode;)i=i.parentNode;for(;i!=r;(r=c.nextSibling).remove());o(c,a)}}),r=a.nextSibling,t=l[n],i=()=>{c||o(e.l[n],a),--t.i||t.c()},(d=e.j[n])&&(p=t.c,t.c=()=>p()+d(e)))}})';
100
+ var WALKER_RUNTIME_CODE = '(e=>self[e]=self[e]||(l=>{let t,d={},s=[],f=document,i=f.createTreeWalker(f,129),n=self[e][l]={i:l=e+l,d:f,l:d,v:s,x(){},w(e){for(;e=i.nextNode();)this.x(n=(n=e.data)&&!n.indexOf(l)&&(d[t=n.slice(x+1)]=e,n[x]),t,e),n>"#"&&s.push(e)}},x=l.length}))', REORDER_RUNTIME_CODE = '(e=>{let i,t,r,l={},o=(e,i)=>{e.replaceWith(...i.childNodes),i.remove()};e.d.head.append(e.d.querySelector("style["+e.i+"]")||""),e.j={},e.x=(d,n,a,c,p)=>{"#"==d?(l[n]=t).i++:a==r&&i(),"T"==a.tagName&&(n=a.getAttribute(e.i))&&((c=e.l["^"+n])&&(l[n]={i:1,c(i=e.l[n]||a){for(;i.parentNode!==c.parentNode;)i=i.parentNode;for(;i!=r;(r=c.nextSibling).remove());o(c,a)}}),r=a.nextSibling,t=l[n],i=()=>{c||o(e.l[n],a),--t.i||t.c()},(d=e.j[n])&&(p=t.c,t.c=()=>p()+d(e.r)))}})';
101
101
 
102
102
  // src/html/serializer.ts
103
103
  var { hasOwnProperty } = {}, Generator = function* () {
@@ -1060,9 +1060,9 @@ function hoist(scopeId, id) {
1060
1060
  }
1061
1061
  function resumeClosestBranch(scopeId) {
1062
1062
  let branchId = $chunk.context?.[branchIdKey];
1063
- branchId !== void 0 && branchId !== scopeId && $chunk.writeHTML(
1064
- $chunk.boundary.state.mark("$" /* ClosestBranch */, "" + scopeId)
1065
- );
1063
+ branchId !== void 0 && branchId !== scopeId && writeScope(scopeId, {
1064
+ g: branchId
1065
+ });
1066
1066
  }
1067
1067
  var branchIdKey = Symbol();
1068
1068
  function resumeForOf(list, cb, scopeId, accessor) {
@@ -1708,7 +1708,7 @@ var DEFAULT_RUNTIME_ID = "M", DEFAULT_RENDER_ID = "_";
1708
1708
  var voidElementsReg = /^(?:area|b(?:ase|r)|col|embed|hr|i(?:mg|nput)|link|meta|param|source|track|wbr)$/;
1709
1709
  function dynamicTagId(tagName) {
1710
1710
  let normalizedRenderer = normalizeDynamicRenderer(tagName);
1711
- return normalizedRenderer?.g || normalizedRenderer;
1711
+ return normalizedRenderer?.h || normalizedRenderer;
1712
1712
  }
1713
1713
  var dynamicTagInput = (scopeId, accessor, tag, input, content) => {
1714
1714
  if (!tag && !content) {
@@ -1781,7 +1781,7 @@ var dynamicTagInput = (scopeId, accessor, tag, input, content) => {
1781
1781
  ), result;
1782
1782
  };
1783
1783
  function createContent(id, fn) {
1784
- return fn.g = id, fn;
1784
+ return fn.h = id, fn;
1785
1785
  }
1786
1786
  function registerContent(id, fn, scopeId) {
1787
1787
  return register2(createContent(id, fn), id, scopeId);
@@ -1808,7 +1808,7 @@ var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap()
1808
1808
  writeScript,
1809
1809
  nextScopeId,
1810
1810
  isTagsAPI(fn) {
1811
- return !!fn.g;
1811
+ return !!fn.h;
1812
1812
  },
1813
1813
  patchDynamicTag,
1814
1814
  writeSetScopeForComponent(m5c) {
@@ -138,6 +138,7 @@ var AccessorProp = /* @__PURE__ */ ((AccessorProp3) => {
138
138
  AccessorProp3["PlaceholderContent"] = "#PlaceholderContent";
139
139
  AccessorProp3["TagVariable"] = "#TagVariable";
140
140
  AccessorProp3["TagVariableChange"] = "#TagVariableChange";
141
+ AccessorProp3["ClosestBranchId"] = "#ClosestBranchId";
141
142
  return AccessorProp3;
142
143
  })(AccessorProp || {});
143
144
 
@@ -1452,6 +1453,7 @@ var AccessorProp2 = /* @__PURE__ */ ((AccessorProp3) => {
1452
1453
  AccessorProp3["PlaceholderContent"] = "d";
1453
1454
  AccessorProp3["TagVariable"] = "e";
1454
1455
  AccessorProp3["TagVariableChange"] = "f";
1456
+ AccessorProp3["ClosestBranchId"] = "g";
1455
1457
  return AccessorProp3;
1456
1458
  })(AccessorProp2 || {});
1457
1459
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "6.0.0-next.3.63",
3
+ "version": "6.0.0-next.3.65",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",