marko 6.4.15 → 6.5.0
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/cheatsheet.md +12 -1
- package/dist/debug/dom/catch.feat.js +2 -2
- package/dist/debug/dom/catch.feat.mjs +2 -2
- package/dist/debug/dom/compat.feat.js +1 -1
- package/dist/debug/dom/compat.feat.mjs +1 -1
- package/dist/debug/dom/controllable-input.feat.js +1 -1
- package/dist/debug/dom/controllable-input.feat.mjs +1 -1
- package/dist/debug/dom/controllable-open.feat.js +1 -1
- package/dist/debug/dom/controllable-open.feat.mjs +1 -1
- package/dist/debug/dom/controllable-select.feat.js +1 -1
- package/dist/debug/dom/controllable-select.feat.mjs +1 -1
- package/dist/debug/dom/controllable-textarea.feat.js +1 -1
- package/dist/debug/dom/controllable-textarea.feat.mjs +1 -1
- package/dist/debug/dom/controllable.feat.js +1 -1
- package/dist/debug/dom/controllable.feat.mjs +1 -1
- package/dist/debug/dom/dynamic-tag-script.feat.js +1 -1
- package/dist/debug/dom/dynamic-tag-script.feat.mjs +1 -1
- package/dist/debug/dom/dynamic-tag-var.feat.js +1 -1
- package/dist/debug/dom/dynamic-tag-var.feat.mjs +1 -1
- package/dist/debug/dom/lazy.feat.js +1 -1
- package/dist/debug/dom/lazy.feat.mjs +1 -1
- package/dist/debug/dom/placeholder.feat.js +1 -1
- package/dist/debug/dom/placeholder.feat.mjs +1 -1
- package/dist/debug/{dom-sfzdCRAg.js → dom-BiJ_UKJV.js} +12 -12
- package/dist/debug/{dom-BORByF2b.mjs → dom-D3A8gh_D.mjs} +5 -5
- package/dist/debug/dom.js +3 -2
- package/dist/debug/dom.mjs +2 -2
- package/dist/debug/html/compat.feat.js +1 -1
- package/dist/debug/html/compat.feat.mjs +1 -1
- package/dist/debug/{html-C17tAtch.mjs → html-Bfl3MJP9.mjs} +29 -22
- package/dist/debug/{html-7qRi22mK.js → html-shBfuhlc.js} +29 -22
- package/dist/debug/html.js +1 -1
- package/dist/debug/html.mjs +1 -1
- package/dist/dom/catch.feat.js +3 -3
- package/dist/dom/catch.feat.mjs +2 -2
- package/dist/dom/compat.feat.js +1 -1
- package/dist/dom/compat.feat.mjs +1 -1
- package/dist/dom/control-flow.d.ts +1 -1
- package/dist/dom/controllable-input.feat.js +1 -1
- package/dist/dom/controllable-input.feat.mjs +1 -1
- package/dist/dom/controllable-open.feat.js +1 -1
- package/dist/dom/controllable-open.feat.mjs +1 -1
- package/dist/dom/controllable-select.feat.js +1 -1
- package/dist/dom/controllable-select.feat.mjs +1 -1
- package/dist/dom/controllable-textarea.feat.js +1 -1
- package/dist/dom/controllable-textarea.feat.mjs +1 -1
- package/dist/dom/controllable.feat.js +1 -1
- package/dist/dom/controllable.feat.mjs +1 -1
- package/dist/dom/dynamic-tag-script.feat.js +1 -1
- package/dist/dom/dynamic-tag-script.feat.mjs +1 -1
- package/dist/dom/dynamic-tag-var.feat.js +1 -1
- package/dist/dom/dynamic-tag-var.feat.mjs +1 -1
- package/dist/dom/lazy.feat.js +1 -1
- package/dist/dom/lazy.feat.mjs +1 -1
- package/dist/dom/placeholder.feat.js +1 -1
- package/dist/dom/placeholder.feat.mjs +1 -1
- package/dist/dom/renderer.d.ts +1 -1
- package/dist/{dom-DRiewpRL.js → dom-B3piR0q1.js} +7 -7
- package/dist/{dom-DKn1bCPC.mjs → dom-CPk_8CMB.mjs} +5 -5
- package/dist/dom.d.ts +1 -1
- package/dist/dom.js +3 -3
- package/dist/dom.mjs +2 -2
- package/dist/html/assets.d.ts +1 -1
- package/dist/html/compat.feat.js +1 -1
- package/dist/html/compat.feat.mjs +1 -1
- package/dist/html/control-flow.d.ts +9 -9
- package/dist/html/for.d.ts +3 -3
- package/dist/html/serializer.d.ts +2 -0
- package/dist/html/writer.d.ts +2 -2
- package/dist/{html-6w1jd6wm.mjs → html-BD-y50wS.mjs} +27 -24
- package/dist/{html-BaAyg2TB.js → html-aFBpTKdf.js} +27 -24
- package/dist/html.js +1 -1
- package/dist/html.mjs +1 -1
- package/dist/translator/core/define.d.ts +6 -0
- package/dist/translator/core/show.d.ts +1 -1
- package/dist/translator/index.js +808 -751
- package/dist/translator/interop/build-aggregate-error.d.ts +1 -1
- package/dist/translator/util/assert.d.ts +2 -0
- package/dist/translator/util/bindings.d.ts +15 -8
- package/dist/translator/util/cyclic-memo.d.ts +2 -1
- package/dist/translator/util/entry-builder.d.ts +2 -3
- package/dist/translator/util/finalize-references.d.ts +0 -1
- package/dist/translator/util/for-selector.d.ts +0 -1
- package/dist/translator/util/module-registrations.d.ts +1 -0
- package/dist/translator/util/optional.d.ts +7 -5
- package/dist/translator/util/reasons.d.ts +1 -2
- package/dist/translator/util/references.d.ts +6 -5
- package/dist/translator/util/sections.d.ts +5 -1
- package/dist/translator/util/signals.d.ts +1 -1
- package/dist/translator/util/slots.d.ts +1 -2
- package/dist/translator/util/solve-reasons.d.ts +8 -6
- package/dist/translator/util/structure.d.ts +1 -0
- package/dist/translator/util/write-guard.d.ts +2 -0
- package/dist/translator/util/writer.d.ts +1 -2
- package/dist/translator/visitors/tag/native-tag.d.ts +2 -0
- package/index.d.ts +11 -0
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "\\3B " : "\\\\", classAPIRenderer, K_SCOPE_ID = Symbol("Scope ID"),
|
|
1
|
+
let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "\\3B " : "\\\\", classAPIRenderer, K_SCOPE_ID = Symbol("Scope ID"), { hasOwnProperty } = {}, objectProto = Object.prototype, arrayProto = Array.prototype, Generator = (/* @__PURE__ */ (function* () {})()).constructor, AsyncGenerator = (/* @__PURE__ */ (async function* () {})()).constructor, kTouchedIterator = /* @__PURE__ */ patchIteratorsNext(), REGISTRY = /* @__PURE__ */ new WeakMap(), KNOWN_SYMBOLS = /* @__PURE__ */ (() => {
|
|
2
2
|
let KNOWN_SYMBOLS = /* @__PURE__ */ new Map();
|
|
3
3
|
for (let name of Object.getOwnPropertyNames(Symbol)) {
|
|
4
4
|
let symbol = Symbol[name];
|
|
@@ -324,7 +324,7 @@ function concat(opt, other) {
|
|
|
324
324
|
}
|
|
325
325
|
return Array.isArray(other) ? [opt, ...other] : [opt, other];
|
|
326
326
|
}
|
|
327
|
-
|
|
327
|
+
// src/html/serializer.ts
|
|
328
328
|
var State$1 = class {
|
|
329
329
|
ids = 0;
|
|
330
330
|
flushId = 0;
|
|
@@ -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
|
-
|
|
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
|
-
}
|
|
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;
|
|
@@ -1078,12 +1078,16 @@ function hasOnlyZeros(typedArray) {
|
|
|
1078
1078
|
for (let i = 0; i < typedArray.length; i++) if (typedArray[i] !== zero) return !1;
|
|
1079
1079
|
return !0;
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1082
|
-
|
|
1081
|
+
function patchIteratorsNext() {
|
|
1082
|
+
let key = Symbol.for("marko.touchedIterator");
|
|
1083
|
+
return patchIteratorNext(Generator.prototype, key), patchIteratorNext(AsyncGenerator.prototype, key), key;
|
|
1084
|
+
}
|
|
1085
|
+
function patchIteratorNext(proto, key) {
|
|
1086
|
+
if (proto.next[key]) return;
|
|
1083
1087
|
let { next } = proto;
|
|
1084
1088
|
proto.next = function(value) {
|
|
1085
|
-
return this[
|
|
1086
|
-
}, proto.next[
|
|
1089
|
+
return this[key] = 1, next.call(this, value);
|
|
1090
|
+
}, proto.next[key] = !0;
|
|
1087
1091
|
}
|
|
1088
1092
|
// src/html/attrs.ts
|
|
1089
1093
|
function _attr_class(value) {
|
|
@@ -1292,12 +1296,6 @@ function withContext(key, value, cb, cbValue, cbValue2) {
|
|
|
1292
1296
|
ctx[kPendingContexts]--, ctx[key] = prev;
|
|
1293
1297
|
}
|
|
1294
1298
|
}
|
|
1295
|
-
function captureContext(chunk) {
|
|
1296
|
-
chunk.context?.[kPendingContexts] && (chunk.context = {
|
|
1297
|
-
...chunk.context,
|
|
1298
|
-
[kPendingContexts]: 0
|
|
1299
|
-
});
|
|
1300
|
-
}
|
|
1301
1299
|
function isInResumedBranch() {
|
|
1302
1300
|
return $chunk?.context?.[kBranchId] !== void 0;
|
|
1303
1301
|
}
|
|
@@ -1512,6 +1510,12 @@ var State = class {
|
|
|
1512
1510
|
runtimeScript() {
|
|
1513
1511
|
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 + "\")";
|
|
1514
1512
|
}
|
|
1513
|
+
captureContext(chunk) {
|
|
1514
|
+
chunk.context?.[kPendingContexts] && (chunk.context = {
|
|
1515
|
+
...chunk.context,
|
|
1516
|
+
[kPendingContexts]: 0
|
|
1517
|
+
});
|
|
1518
|
+
}
|
|
1515
1519
|
keepsTryMarks(chunk, resumeWrites) {
|
|
1516
1520
|
return chunk !== $chunk || chunk.boundary.resumeWrites !== resumeWrites;
|
|
1517
1521
|
}
|
|
@@ -1843,9 +1847,8 @@ function readyBatch(state, channel, deps, resumes) {
|
|
|
1843
1847
|
return resumes && own[readyId]++, concatSequence(wait && wait + "}", resumes);
|
|
1844
1848
|
}
|
|
1845
1849
|
function getFilteredGlobals($global) {
|
|
1846
|
-
let serializedGlobals = $global.serializedGlobals;
|
|
1847
|
-
if (!serializedGlobals) return
|
|
1848
|
-
let filtered = 0;
|
|
1850
|
+
let serializedGlobals = $global.serializedGlobals, filtered = $global.cspNonce ? { cspNonce: $global.cspNonce } : 0;
|
|
1851
|
+
if (!serializedGlobals) return filtered;
|
|
1849
1852
|
if (Array.isArray(serializedGlobals)) for (let key of serializedGlobals) {
|
|
1850
1853
|
let value = $global[key];
|
|
1851
1854
|
value !== void 0 && ((filtered ||= {})[key] = value);
|
|
@@ -2319,7 +2322,7 @@ function _await(scopeId, accessor, promise, content, markerGuard) {
|
|
|
2319
2322
|
return;
|
|
2320
2323
|
}
|
|
2321
2324
|
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) => {
|
|
2325
|
+
chunk.async = !0, boundary.state.captureContext(chunk), boundary.startAsync(), promise.then((value) => {
|
|
2323
2326
|
if (chunk.async && (chunk.async = !1, !boundary.aborted)) {
|
|
2324
2327
|
let { state } = boundary;
|
|
2325
2328
|
chunk.render(() => {
|
|
@@ -2342,7 +2345,7 @@ function _try(scopeId, accessor, content, placeholderContent, catchContent, plac
|
|
|
2342
2345
|
}
|
|
2343
2346
|
function tryPlaceholder(content, placeholder, branchId, scopeId, placeholderBranchId) {
|
|
2344
2347
|
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 = {
|
|
2348
|
+
body === body.render(content) ? chunk.append(body) : (chunk.next = chunk.forkRest(boundary), boundary.state.captureContext(chunk), chunk.placeholder = {
|
|
2346
2349
|
body,
|
|
2347
2350
|
render: placeholder,
|
|
2348
2351
|
branchId,
|
|
@@ -2365,7 +2368,7 @@ function tryBoundary(content, catchContent, branchId, renderers) {
|
|
|
2365
2368
|
return reorderId && (chunk.catchRange = {
|
|
2366
2369
|
id: reorderId,
|
|
2367
2370
|
end: bodyEnd
|
|
2368
|
-
}, captureContext(chunk)), bodyBoundary.onNext = () => {
|
|
2371
|
+
}, state.captureContext(chunk)), bodyBoundary.onNext = () => {
|
|
2369
2372
|
if (!boundary.aborted) {
|
|
2370
2373
|
if (bodyBoundary.aborted) {
|
|
2371
2374
|
if (!reorderId) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "\\3B " : "\\\\", classAPIRenderer, K_SCOPE_ID = Symbol("Scope ID"),
|
|
2
|
+
let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "\\3B " : "\\\\", classAPIRenderer, K_SCOPE_ID = Symbol("Scope ID"), { hasOwnProperty } = {}, objectProto = Object.prototype, arrayProto = Array.prototype, Generator = (/* @__PURE__ */ (function* () {})()).constructor, AsyncGenerator = (/* @__PURE__ */ (async function* () {})()).constructor, kTouchedIterator = /* @__PURE__ */ patchIteratorsNext(), REGISTRY = /* @__PURE__ */ new WeakMap(), KNOWN_SYMBOLS = /* @__PURE__ */ (() => {
|
|
3
3
|
let KNOWN_SYMBOLS = /* @__PURE__ */ new Map();
|
|
4
4
|
for (let name of Object.getOwnPropertyNames(Symbol)) {
|
|
5
5
|
let symbol = Symbol[name];
|
|
@@ -325,7 +325,7 @@ function concat(opt, other) {
|
|
|
325
325
|
}
|
|
326
326
|
return Array.isArray(other) ? [opt, ...other] : [opt, other];
|
|
327
327
|
}
|
|
328
|
-
|
|
328
|
+
// src/html/serializer.ts
|
|
329
329
|
var State$1 = class {
|
|
330
330
|
ids = 0;
|
|
331
331
|
flushId = 0;
|
|
@@ -362,13 +362,13 @@ var State$1 = class {
|
|
|
362
362
|
let scope = registered.scope, scopeId = scope[K_SCOPE_ID];
|
|
363
363
|
trackScope(this, scope, scopeId);
|
|
364
364
|
let locals = registered.locals?.(this.boundary.state.scope);
|
|
365
|
-
|
|
366
|
-
this.buf.push(registered.access + "(_(" + scopeId + ")");
|
|
367
|
-
for (let local of locals) this.buf.push(","), writePlainObject(this, local, newArgReference(this, ref, local));
|
|
368
|
-
} else this.buf.push("_(" + scopeId + "," + quoteRegistryId(registered.id));
|
|
369
|
-
this.buf.push(")");
|
|
365
|
+
locals ? (this.buf.push(registered.access + "(_(" + scopeId + ")"), writeLocalArgs(this, ref, locals)) : this.buf.push("_(" + scopeId + "," + quoteRegistryId(registered.id)), this.buf.push(")");
|
|
370
366
|
}
|
|
371
|
-
}
|
|
367
|
+
};
|
|
368
|
+
function writeLocalArgs(state, ref, locals) {
|
|
369
|
+
for (let local of locals) state.buf.push(","), writePlainObject(state, local, newArgReference(state, ref, local));
|
|
370
|
+
}
|
|
371
|
+
var Reference = class {
|
|
372
372
|
assignments = null;
|
|
373
373
|
deferredMembers = null;
|
|
374
374
|
scopeId = void 0;
|
|
@@ -1079,12 +1079,16 @@ function hasOnlyZeros(typedArray) {
|
|
|
1079
1079
|
for (let i = 0; i < typedArray.length; i++) if (typedArray[i] !== zero) return !1;
|
|
1080
1080
|
return !0;
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1083
|
-
|
|
1082
|
+
function patchIteratorsNext() {
|
|
1083
|
+
let key = Symbol.for("marko.touchedIterator");
|
|
1084
|
+
return patchIteratorNext(Generator.prototype, key), patchIteratorNext(AsyncGenerator.prototype, key), key;
|
|
1085
|
+
}
|
|
1086
|
+
function patchIteratorNext(proto, key) {
|
|
1087
|
+
if (proto.next[key]) return;
|
|
1084
1088
|
let { next } = proto;
|
|
1085
1089
|
proto.next = function(value) {
|
|
1086
|
-
return this[
|
|
1087
|
-
}, proto.next[
|
|
1090
|
+
return this[key] = 1, next.call(this, value);
|
|
1091
|
+
}, proto.next[key] = !0;
|
|
1088
1092
|
}
|
|
1089
1093
|
// src/html/attrs.ts
|
|
1090
1094
|
function _attr_class(value) {
|
|
@@ -1293,12 +1297,6 @@ function withContext(key, value, cb, cbValue, cbValue2) {
|
|
|
1293
1297
|
ctx[kPendingContexts]--, ctx[key] = prev;
|
|
1294
1298
|
}
|
|
1295
1299
|
}
|
|
1296
|
-
function captureContext(chunk) {
|
|
1297
|
-
chunk.context?.[kPendingContexts] && (chunk.context = {
|
|
1298
|
-
...chunk.context,
|
|
1299
|
-
[kPendingContexts]: 0
|
|
1300
|
-
});
|
|
1301
|
-
}
|
|
1302
1300
|
function isInResumedBranch() {
|
|
1303
1301
|
return $chunk?.context?.[kBranchId] !== void 0;
|
|
1304
1302
|
}
|
|
@@ -1513,6 +1511,12 @@ var State = class {
|
|
|
1513
1511
|
runtimeScript() {
|
|
1514
1512
|
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 + "\")";
|
|
1515
1513
|
}
|
|
1514
|
+
captureContext(chunk) {
|
|
1515
|
+
chunk.context?.[kPendingContexts] && (chunk.context = {
|
|
1516
|
+
...chunk.context,
|
|
1517
|
+
[kPendingContexts]: 0
|
|
1518
|
+
});
|
|
1519
|
+
}
|
|
1516
1520
|
keepsTryMarks(chunk, resumeWrites) {
|
|
1517
1521
|
return chunk !== $chunk || chunk.boundary.resumeWrites !== resumeWrites;
|
|
1518
1522
|
}
|
|
@@ -1844,9 +1848,8 @@ function readyBatch(state, channel, deps, resumes) {
|
|
|
1844
1848
|
return resumes && own[readyId]++, concatSequence(wait && wait + "}", resumes);
|
|
1845
1849
|
}
|
|
1846
1850
|
function getFilteredGlobals($global) {
|
|
1847
|
-
let serializedGlobals = $global.serializedGlobals;
|
|
1848
|
-
if (!serializedGlobals) return
|
|
1849
|
-
let filtered = 0;
|
|
1851
|
+
let serializedGlobals = $global.serializedGlobals, filtered = $global.cspNonce ? { cspNonce: $global.cspNonce } : 0;
|
|
1852
|
+
if (!serializedGlobals) return filtered;
|
|
1850
1853
|
if (Array.isArray(serializedGlobals)) for (let key of serializedGlobals) {
|
|
1851
1854
|
let value = $global[key];
|
|
1852
1855
|
value !== void 0 && ((filtered ||= {})[key] = value);
|
|
@@ -2320,7 +2323,7 @@ function _await(scopeId, accessor, promise, content, markerGuard) {
|
|
|
2320
2323
|
return;
|
|
2321
2324
|
}
|
|
2322
2325
|
let chunk = $chunk, { boundary } = chunk, startId = _peek_scope_id(), after = chunk.next = chunk.forkRest(boundary);
|
|
2323
|
-
chunk.async = !0, captureContext(chunk), boundary.startAsync(), promise.then((value) => {
|
|
2326
|
+
chunk.async = !0, boundary.state.captureContext(chunk), boundary.startAsync(), promise.then((value) => {
|
|
2324
2327
|
if (chunk.async && (chunk.async = !1, !boundary.aborted)) {
|
|
2325
2328
|
let { state } = boundary;
|
|
2326
2329
|
chunk.render(() => {
|
|
@@ -2343,7 +2346,7 @@ function _try(scopeId, accessor, content, placeholderContent, catchContent, plac
|
|
|
2343
2346
|
}
|
|
2344
2347
|
function tryPlaceholder(content, placeholder, branchId, scopeId, placeholderBranchId) {
|
|
2345
2348
|
let chunk = $chunk, { boundary } = chunk, body = chunk.fork(boundary, null);
|
|
2346
|
-
body === body.render(content) ? chunk.append(body) : (chunk.next = chunk.forkRest(boundary), captureContext(chunk), chunk.placeholder = {
|
|
2349
|
+
body === body.render(content) ? chunk.append(body) : (chunk.next = chunk.forkRest(boundary), boundary.state.captureContext(chunk), chunk.placeholder = {
|
|
2347
2350
|
body,
|
|
2348
2351
|
render: placeholder,
|
|
2349
2352
|
branchId,
|
|
@@ -2366,7 +2369,7 @@ function tryBoundary(content, catchContent, branchId, renderers) {
|
|
|
2366
2369
|
return reorderId && (chunk.catchRange = {
|
|
2367
2370
|
id: reorderId,
|
|
2368
2371
|
end: bodyEnd
|
|
2369
|
-
}, captureContext(chunk)), bodyBoundary.onNext = () => {
|
|
2372
|
+
}, state.captureContext(chunk)), bodyBoundary.onNext = () => {
|
|
2370
2373
|
if (!boundary.aborted) {
|
|
2371
2374
|
if (bodyBoundary.aborted) {
|
|
2372
2375
|
if (!reorderId) {
|
package/dist/html.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("./html-
|
|
2
|
+
let require_control_flow = require("./html-aFBpTKdf.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-
|
|
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-BD-y50wS.mjs";
|
|
3
3
|
// src/common/attr-tag.ts
|
|
4
4
|
function attrTag(attrs) {
|
|
5
5
|
return attrs[Symbol.iterator] = attrTagIterator, attrs[rest] = empty, attrs;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import { type Tag } from "@marko/compiler/babel-utils";
|
|
2
|
+
declare const kOnlyDirectReferences: unique symbol;
|
|
3
|
+
declare module "@marko/compiler/dist/types" {
|
|
4
|
+
interface MarkoTagExtra {
|
|
5
|
+
[kOnlyDirectReferences]?: true;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
2
8
|
declare const _default: Tag;
|
|
3
9
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Tag } from "@marko/compiler/babel-utils";
|
|
2
|
-
import {
|
|
2
|
+
import type { Binding } from "../util/bindings";
|
|
3
3
|
import { type Section } from "../util/sections";
|
|
4
4
|
declare const kStartBinding: unique symbol;
|
|
5
5
|
declare const kStaticDisplay: unique symbol;
|