marko 6.4.9 → 6.4.11
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 +1 -1
- package/dist/common/accessor.d.ts +0 -3
- package/dist/common/accessor.debug.d.ts +0 -3
- package/dist/common/helpers.d.ts +1 -1
- package/dist/common/types.d.ts +4 -3
- package/dist/debug/dom/catch.feat.js +2 -3
- package/dist/debug/dom/catch.feat.mjs +2 -3
- package/dist/debug/dom/controllable-input.feat.js +2 -3
- package/dist/debug/dom/controllable-input.feat.mjs +2 -3
- package/dist/debug/dom/controllable-open.feat.js +2 -3
- package/dist/debug/dom/controllable-open.feat.mjs +2 -3
- package/dist/debug/dom/controllable-select.feat.js +2 -3
- package/dist/debug/dom/controllable-select.feat.mjs +2 -3
- package/dist/debug/dom/controllable-textarea.feat.js +2 -3
- package/dist/debug/dom/controllable-textarea.feat.mjs +2 -3
- package/dist/debug/dom/controllable.feat.js +2 -3
- package/dist/debug/dom/controllable.feat.mjs +2 -3
- package/dist/debug/dom/dynamic-tag-script.feat.js +2 -3
- package/dist/debug/dom/dynamic-tag-script.feat.mjs +2 -3
- package/dist/debug/dom/dynamic-tag-var.feat.js +2 -3
- package/dist/debug/dom/dynamic-tag-var.feat.mjs +2 -3
- package/dist/debug/dom/lazy.feat.js +2 -3
- package/dist/debug/dom/lazy.feat.mjs +2 -3
- package/dist/debug/dom/placeholder.feat.js +2 -3
- package/dist/debug/dom/placeholder.feat.mjs +2 -3
- package/dist/debug/{dom-VKjkbuuo.mjs → dom-DjUZd-9y.mjs} +221 -261
- package/dist/debug/{dom-QkYva5Qx.js → dom-mQ5mPBTF.js} +226 -260
- package/dist/debug/dom.js +10 -18
- package/dist/debug/dom.mjs +10 -19
- package/dist/debug/html.js +87 -125
- package/dist/debug/html.mjs +87 -125
- package/dist/dom/abort-signal.d.ts +1 -1
- package/dist/dom/catch.feat.js +4 -5
- package/dist/dom/catch.feat.mjs +2 -3
- package/dist/dom/control-flow.d.ts +4 -4
- package/dist/dom/controllable-input.feat.js +1 -2
- package/dist/dom/controllable-input.feat.mjs +1 -2
- package/dist/dom/controllable-open.feat.js +2 -3
- package/dist/dom/controllable-open.feat.mjs +2 -3
- package/dist/dom/controllable-select.feat.js +2 -3
- package/dist/dom/controllable-select.feat.mjs +2 -3
- package/dist/dom/controllable-textarea.feat.js +2 -3
- package/dist/dom/controllable-textarea.feat.mjs +2 -3
- package/dist/dom/controllable.feat.js +1 -2
- package/dist/dom/controllable.feat.mjs +1 -2
- package/dist/dom/dynamic-tag-script.feat.js +3 -4
- package/dist/dom/dynamic-tag-script.feat.mjs +2 -3
- package/dist/dom/dynamic-tag-var.feat.js +3 -4
- package/dist/dom/dynamic-tag-var.feat.mjs +1 -2
- package/dist/dom/lazy.feat.js +2 -3
- package/dist/dom/lazy.feat.mjs +2 -3
- package/dist/dom/load.d.ts +3 -4
- package/dist/dom/placeholder.feat.js +2 -3
- package/dist/dom/placeholder.feat.mjs +2 -3
- package/dist/dom/queue.d.ts +1 -2
- package/dist/dom/signals.d.ts +5 -7
- package/dist/{dom-IujlfJ6b.js → dom-B8j2453O.js} +158 -190
- package/dist/{dom-DtKQb840.mjs → dom-HEWdZCCb.mjs} +134 -172
- package/dist/dom.d.ts +1 -1
- package/dist/dom.js +22 -30
- package/dist/dom.mjs +10 -19
- package/dist/html/assets.d.ts +3 -4
- package/dist/html/for.d.ts +0 -1
- package/dist/html/writer.d.ts +2 -2
- package/dist/html.d.ts +1 -1
- package/dist/html.js +99 -131
- package/dist/html.mjs +99 -132
- package/dist/translator/index.d.ts +0 -1
- package/dist/translator/index.js +4771 -4760
- package/dist/translator/interop/out-global.d.ts +5 -0
- package/dist/translator/util/assert.d.ts +13 -2
- package/dist/translator/util/entry-builder.d.ts +1 -1
- package/dist/translator/util/finalize-references.d.ts +2 -1
- package/dist/translator/util/for-selector.d.ts +1 -1
- package/dist/translator/util/known-tag.d.ts +10 -1
- package/dist/translator/util/references.d.ts +11 -5
- package/dist/translator/util/runtime.d.ts +1 -0
- package/dist/translator/util/sections.d.ts +6 -1
- package/dist/translator/util/signals.d.ts +2 -1
- package/dist/translator/util/sources.d.ts +1 -1
- package/dist/translator/util/style-interpolation.d.ts +1 -1
- package/dist/translator/util/tag-name-type.d.ts +4 -0
- package/dist/translator/util/visitors.d.ts +1 -1
- package/dist/translator/util/write-guard.d.ts +2 -0
- package/dist/translator/visitors/program/index.d.ts +0 -4
- package/dist/translator/visitors/referenced-identifier.d.ts +3 -1
- package/package.json +6 -6
- package/tags/lifecycle.d.marko +2 -0
- package/dist/common/constants/keyed-scopes-prop.d.ts +0 -4
- package/dist/common/constants/keyed-scopes-prop.debug.d.ts +0 -4
package/dist/html.mjs
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
let empty = [], rest = Symbol(), unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "\\3B " : "\\\\",
|
|
2
|
-
let str = "", sep = "", part;
|
|
3
|
-
if (val) {
|
|
4
|
-
if (typeof val != "object") str += val;
|
|
5
|
-
else if (Array.isArray(val)) for (let v of val) part = toDelimitedString(v, delimiter, stringify), part && (str += sep + part, sep = delimiter);
|
|
6
|
-
else for (let name in val) part = stringify(name, val[name]), part && (str += sep + part, sep = delimiter);
|
|
7
|
-
}
|
|
8
|
-
return str;
|
|
9
|
-
}, K_SCOPE_ID = Symbol("Scope ID"), kTouchedIterator = /* @__PURE__ */ Symbol.for("marko.touchedIterator"), { hasOwnProperty } = {}, objectProto = Object.prototype, arrayProto = Array.prototype, Generator = (/* @__PURE__ */ (function* () {})()).constructor, AsyncGenerator = (/* @__PURE__ */ (async function* () {})()).constructor, REGISTRY = /* @__PURE__ */ new WeakMap(), KNOWN_SYMBOLS = /* @__PURE__ */ (() => {
|
|
1
|
+
let empty = [], rest = Symbol(), unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "\\3B " : "\\\\", K_SCOPE_ID = Symbol("Scope ID"), kTouchedIterator = /* @__PURE__ */ Symbol.for("marko.touchedIterator"), { hasOwnProperty } = {}, objectProto = Object.prototype, arrayProto = Array.prototype, Generator = (/* @__PURE__ */ (function* () {})()).constructor, AsyncGenerator = (/* @__PURE__ */ (async function* () {})()).constructor, REGISTRY = /* @__PURE__ */ new WeakMap(), KNOWN_SYMBOLS = /* @__PURE__ */ (() => {
|
|
10
2
|
let KNOWN_SYMBOLS = /* @__PURE__ */ new Map();
|
|
11
3
|
for (let name of Object.getOwnPropertyNames(Symbol)) {
|
|
12
4
|
let symbol = Symbol[name];
|
|
@@ -247,20 +239,18 @@ let empty = [], rest = Symbol(), unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeSty
|
|
|
247
239
|
}, unsafeQuoteReg = /["\\<\n\r\u2028\u2029\0\ud800-\udfff]/u, kSelectedValue = Symbol("selectedValue"), checkedValuesRefs = /* @__PURE__ */ new WeakMap(), singleQuoteAttrReplacements = /['\r]|&(?=[#a-zA-Z])/g, doubleQuoteAttrReplacements = /["\r]|&(?=[#a-zA-Z])/g, needsQuotedAttr = /["'>\s]|&[#a-zA-Z]|\/$/g, $chunk, kPendingContexts = Symbol("Pending Contexts"), kBranchId = Symbol("Branch Id"), kAsyncContent = Symbol("Async Content"), writeScope = (scopeId, partialScope) => {
|
|
248
240
|
let { state } = $chunk.boundary, target = $chunk.channel, scope = scopeWithId(state, scopeId);
|
|
249
241
|
return state.needsWalkerRuntime = !0, countResumeWrite($chunk), writeAsyncVisits($chunk), Object.assign(scope, partialScope), state.queueScope(target, scopeId, partialScope), scope;
|
|
250
|
-
}, ALL_GROUPS = 715827883,
|
|
242
|
+
}, ALL_GROUPS = 715827883, tick = globalThis.setImmediate || globalThis.setTimeout || globalThis.queueMicrotask || ((cb) => Promise.resolve().then(cb)), tickQueue, unsafeXMLReg = /[<&\r]/g, replaceUnsafeXML = (c) => c === "&" ? "&" : c === "<" ? "<" : " ", escapeXMLStr = (str) => unsafeXMLReg.test(str) ? str.replace(unsafeXMLReg, replaceUnsafeXML) : str, unsafeScriptReg = /<(\/?script|!--)/gi, escapeScriptStr = (str) => unsafeScriptReg.test(str) ? str.replace(unsafeScriptReg, "\\u003C$1") : str, unsafeScriptTemplateLiteralReg = /[`\\\r]|\$\{|<(?=\/?script|!--)/gi, replaceUnsafeScriptTemplateLiteral = (c) => c === "<" ? "\\x3C" : c === "\r" ? "\\r" : "\\" + c, quoteScriptTemplateLiteral = (str) => "`" + (unsafeScriptTemplateLiteralReg.test(str) ? str.replace(unsafeScriptTemplateLiteralReg, replaceUnsafeScriptTemplateLiteral) : str) + "`", unsafeStyleReg = /<(\/style)/gi, escapeStyleStr = (str) => unsafeStyleReg.test(str) ? str.replace(unsafeStyleReg, "\\3C$1") : str, unsafeCommentReg = />/g, voidElementsReg = /^(?:area|b(?:ase|r)|col|embed|hr|i(?:mg|nput)|link|meta|param|source|track|wbr)$/, _dynamic_tag = (scopeId, accessor, tag, inputOrArgs, content, inputIsArgs, markerGuard, tagVar) => {
|
|
251
243
|
let shouldResume = markerGuard !== 0, renderer = normalizeDynamicRenderer(tag), state = getState(), branchId = _peek_scope_id(), rendered, result;
|
|
252
244
|
if (typeof renderer == "string") {
|
|
253
245
|
let input = (inputIsArgs ? inputOrArgs[0] : inputOrArgs) || {};
|
|
254
|
-
rendered = !0, (()
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
needsScript && _script(branchId, "_d"), (shouldResume || needsScript) && _html(state.mark("(", scopeId + " " + accessor + " " + branchId));
|
|
261
|
-
})(), result = _el(scopeId, "-" + accessor);
|
|
246
|
+
if (rendered = !0, _scope_id(), _html(`<${renderer}${_attrs(input, "a", branchId, renderer)}>`), !voidElementsReg.test(renderer)) {
|
|
247
|
+
let renderContent = content || normalizeDynamicRenderer(input.content);
|
|
248
|
+
renderer === "textarea" ? _html(_attrs_textarea_value(branchId, "a", input)) : renderer === "select" && ("value" in input || "valueChange" in input) ? _attr_select_value(branchId, "a", input.value, input.valueChange, renderContent ? () => _dynamic_tag(branchId, "a", renderContent, void 0, 0, void 0, markerGuard) : void 0, 1) : renderContent && _dynamic_tag(branchId, "a", renderContent, void 0, 0, void 0, markerGuard), _html(`</${renderer}>`);
|
|
249
|
+
}
|
|
250
|
+
let childScope = getScopeById(branchId), needsScript = childScope && (childScope.Ia || childScope.Ea);
|
|
251
|
+
needsScript && _script(branchId, "_d"), (shouldResume || needsScript) && _html(state.mark("(", scopeId + " " + accessor + " " + branchId)), result = _el(scopeId, "-" + accessor);
|
|
262
252
|
} else {
|
|
263
|
-
let chunk =
|
|
253
|
+
let chunk = $chunk, beforeBranch = shouldResume ? deferBranchStart(chunk) : void 0, render = () => {
|
|
264
254
|
if (renderer) try {
|
|
265
255
|
return _set_scope_reason(shouldResume ? ALL_GROUPS : 0), inputIsArgs ? renderer(...inputOrArgs) : renderer(content ? {
|
|
266
256
|
...inputOrArgs,
|
|
@@ -333,11 +323,11 @@ let empty = [], rest = Symbol(), unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeSty
|
|
|
333
323
|
return joined;
|
|
334
324
|
},
|
|
335
325
|
appendChunks(chunks) {
|
|
336
|
-
let chunk =
|
|
326
|
+
let chunk = $chunk;
|
|
337
327
|
for (let part of chunks) chunk.append(part), part.effects && (chunk.lastEffect = part.lastEffect);
|
|
338
328
|
},
|
|
339
329
|
deferReorders(reorders) {
|
|
340
|
-
let chunk =
|
|
330
|
+
let chunk = $chunk;
|
|
341
331
|
for (let i = reorders.length; i--;) {
|
|
342
332
|
let carrier = chunk.fork(chunk.boundary, chunk.next);
|
|
343
333
|
carrier.deferredReorder = reorders[i], chunk.next = carrier;
|
|
@@ -425,7 +415,7 @@ let empty = [], rest = Symbol(), unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeSty
|
|
|
425
415
|
return !!pendingClassFunctions.get($global)?.length;
|
|
426
416
|
}
|
|
427
417
|
}, pendingClassFunctions = /* @__PURE__ */ new WeakMap();
|
|
428
|
-
|
|
418
|
+
// src/common/attr-tag.ts
|
|
429
419
|
function attrTag(attrs) {
|
|
430
420
|
return attrs[Symbol.iterator] = attrTagIterator, attrs[rest] = empty, attrs;
|
|
431
421
|
}
|
|
@@ -435,8 +425,7 @@ function attrTags(first, attrs) {
|
|
|
435
425
|
function* attrTagIterator() {
|
|
436
426
|
yield this, yield* this[rest];
|
|
437
427
|
}
|
|
438
|
-
|
|
439
|
-
//#region src/common/helpers.ts
|
|
428
|
+
// src/common/helpers.ts
|
|
440
429
|
function stringifyClassEntry(name, value) {
|
|
441
430
|
return value ? name : "";
|
|
442
431
|
}
|
|
@@ -451,6 +440,15 @@ function escapeStyleValue(str) {
|
|
|
451
440
|
for (let c of result) c === "(" ? closers = ")" + closers : c === "[" ? closers = "]" + closers : c === closers[0] && (closers = closers.slice(1));
|
|
452
441
|
return result + closers;
|
|
453
442
|
}
|
|
443
|
+
function toDelimitedString(val, delimiter, stringify) {
|
|
444
|
+
let str = "", sep = "", part;
|
|
445
|
+
if (val) {
|
|
446
|
+
if (typeof val != "object") str += val;
|
|
447
|
+
else if (Array.isArray(val)) for (let v of val) part = toDelimitedString(v, delimiter, stringify), part && (str += sep + part, sep = delimiter);
|
|
448
|
+
else for (let name in val) part = stringify(name, val[name]), part && (str += sep + part, sep = delimiter);
|
|
449
|
+
}
|
|
450
|
+
return str;
|
|
451
|
+
}
|
|
454
452
|
function isEventHandler(name) {
|
|
455
453
|
return /^on[A-Z-]/.test(name);
|
|
456
454
|
}
|
|
@@ -477,15 +475,16 @@ function normalizeDynamicRenderer(value) {
|
|
|
477
475
|
if ("a" in normalized) return normalized;
|
|
478
476
|
}
|
|
479
477
|
}
|
|
480
|
-
|
|
481
|
-
//#region src/common/errors.ts
|
|
478
|
+
// src/common/errors.ts
|
|
482
479
|
function _assert_class_toggles(classes, toggles) {}
|
|
483
480
|
function _el_read_error() {}
|
|
484
481
|
function _hoist_read_error() {}
|
|
485
482
|
function _signal_read_error() {}
|
|
486
483
|
function _assert_hoist(value) {}
|
|
487
|
-
|
|
488
|
-
|
|
484
|
+
// src/common/opt.ts
|
|
485
|
+
function toArray(opt) {
|
|
486
|
+
return opt ? Array.isArray(opt) ? opt : [opt] : [];
|
|
487
|
+
}
|
|
489
488
|
function reduce(opt, cb, acc) {
|
|
490
489
|
if (opt) {
|
|
491
490
|
if (Array.isArray(opt)) for (let item of opt) acc = cb(acc, item);
|
|
@@ -613,7 +612,7 @@ function writeScopesRoot(state, flushes) {
|
|
|
613
612
|
state.writeScopeProps(flush[2], ref) ? (buf[openIndex] = nextSlotId === -1 ? state.scopesCursor(scopeId) + "{" : (scopeId === nextSlotId ? "" : "," + (scopeId - nextSlotId)) + ",{", scopesIndex === -1 && (scopesIndex = openIndex), nextSlotId = scopeId + 1, buf.push("}")) : buf.pop();
|
|
614
613
|
}
|
|
615
614
|
let extras = "";
|
|
616
|
-
(state.deferredRefs.size ||
|
|
615
|
+
(state.deferredRefs.size || hasMatchingCalls(state, state.channel?.readyId)) && (extras = state.writeTrailing(scopesIndex));
|
|
617
616
|
let result = extras && "(";
|
|
618
617
|
for (let chunk of buf) result += chunk;
|
|
619
618
|
return result += extras, result ? state.wrapPayload(result, extras) : "";
|
|
@@ -670,9 +669,6 @@ function writeCallArg(state, val, valueId) {
|
|
|
670
669
|
ref && !ref.id && ref.scopeId === void 0 && !isAncestorChannelRef(state, ref) && (ref.id = valueId || nextRefAccess(state), state.buf[startIndex] = ref.id + "=" + state.buf[startIndex]);
|
|
671
670
|
} else state.buf.push("void 0");
|
|
672
671
|
}
|
|
673
|
-
function hasChannelCalls(state) {
|
|
674
|
-
return hasMatchingCalls(state, state.channel?.readyId);
|
|
675
|
-
}
|
|
676
672
|
function hasMatchingCalls(state, readyId) {
|
|
677
673
|
if (!readyId) return state.queuedCalls.length > 0;
|
|
678
674
|
for (let call of state.queuedReadyCalls) if (call.channel.readyId === readyId) return !0;
|
|
@@ -999,26 +995,18 @@ function writeRequest(state, val, ref) {
|
|
|
999
995
|
state.buf.push("new Request(" + quote(val.url, 0)), hasBody && (state.buf.push(",{body:"), writeProp(state, val.body, ref, "body") ? (state.buf.push(",duplex:\"half\""), sep = ",", bodySerialized = !0) : state.buf.pop());
|
|
1000
996
|
let options = "";
|
|
1001
997
|
val.cache !== "default" && (options += sep + "cache:" + quote(val.cache, 0), sep = ","), val.credentials !== "same-origin" && (options += sep + "credentials:" + quote(val.credentials, 0), sep = ",");
|
|
1002
|
-
let
|
|
1003
|
-
|
|
1004
|
-
else {
|
|
1005
|
-
state.refs.set(val.headers, new Reference(ref, "headers", state.flushId, null));
|
|
1006
|
-
let headers = stringEntriesToHeadersInit(val.headers);
|
|
1007
|
-
headers && (options += sep + "headers:" + headers, sep = ",");
|
|
1008
|
-
}
|
|
1009
|
-
return val.integrity && (options += sep + "integrity:" + quote(val.integrity, 0), sep = ","), val.keepalive && (options += sep + "keepalive:true", sep = ","), val.method !== "GET" && (options += sep + "method:" + quote(val.method, 0), sep = ","), val.mode !== "cors" && (options += sep + "mode:" + quote(val.mode, 0), sep = ","), val.redirect !== "follow" && (options += sep + "redirect:" + quote(val.redirect, 0), sep = ","), val.referrer !== "about:client" && (options += sep + "referrer:" + quote(val.referrer, 0), sep = ","), val.referrerPolicy && (options += sep + "referrerPolicy:" + quote(val.referrerPolicy, 0)), state.buf.push(bodySerialized ? options + "})" : options ? ",{" + options + "})" : ")"), !0;
|
|
998
|
+
let headers = headersOption(state, val.headers, ref);
|
|
999
|
+
return headers && (options += sep + "headers:" + headers, sep = ","), val.integrity && (options += sep + "integrity:" + quote(val.integrity, 0), sep = ","), val.keepalive && (options += sep + "keepalive:true", sep = ","), val.method !== "GET" && (options += sep + "method:" + quote(val.method, 0), sep = ","), val.mode !== "cors" && (options += sep + "mode:" + quote(val.mode, 0), sep = ","), val.redirect !== "follow" && (options += sep + "redirect:" + quote(val.redirect, 0), sep = ","), val.referrer !== "about:client" && (options += sep + "referrer:" + quote(val.referrer, 0), sep = ","), val.referrerPolicy && (options += sep + "referrerPolicy:" + quote(val.referrerPolicy, 0)), state.buf.push(bodySerialized ? options + "})" : options ? ",{" + options + "})" : ")"), !0;
|
|
1010
1000
|
}
|
|
1011
1001
|
function writeResponse(state, val, ref) {
|
|
1012
1002
|
let sep = "", options = "";
|
|
1013
1003
|
val.status !== 200 && (options += "status:" + val.status, sep = ","), val.statusText && (options += sep + "statusText:" + quote(val.statusText, 0), sep = ",");
|
|
1014
|
-
let
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
}
|
|
1021
|
-
return !val.body || val.bodyUsed ? state.buf.push("new Response" + (options ? "(null,{" + options + "})" : "")) : (state.buf.push("new Response("), state.buf.push((writeProp(state, val.body, ref, "body") ? "" : "null") + (options ? ",{" + options + "})" : ")"))), !0;
|
|
1004
|
+
let headers = headersOption(state, val.headers, ref);
|
|
1005
|
+
return headers && (options += sep + "headers:" + headers), !val.body || val.bodyUsed ? state.buf.push("new Response" + (options ? "(null,{" + options + "})" : "")) : (state.buf.push("new Response("), state.buf.push((writeProp(state, val.body, ref, "body") ? "" : "null") + (options ? ",{" + options + "})" : ")"))), !0;
|
|
1006
|
+
}
|
|
1007
|
+
function headersOption(state, headers, ref) {
|
|
1008
|
+
let seen = state.refs.get(headers);
|
|
1009
|
+
return seen ? ensureRefAccess(state, seen) : (state.refs.set(headers, new Reference(ref, "headers", state.flushId, null)), stringEntriesToHeadersInit(headers));
|
|
1022
1010
|
}
|
|
1023
1011
|
function writeIntl(state, val, name, ref) {
|
|
1024
1012
|
let { locale, ...options } = val.resolvedOptions();
|
|
@@ -1278,8 +1266,7 @@ function patchIteratorNext(proto) {
|
|
|
1278
1266
|
return this[kTouchedIterator] = 1, next.call(this, value);
|
|
1279
1267
|
}, proto.next[kTouchedIterator] = !0;
|
|
1280
1268
|
}
|
|
1281
|
-
|
|
1282
|
-
//#region src/html/attrs.ts
|
|
1269
|
+
// src/html/attrs.ts
|
|
1283
1270
|
function _attr_class(value) {
|
|
1284
1271
|
return stringAttr("class", toDelimitedString(value, " ", stringifyClassEntry));
|
|
1285
1272
|
}
|
|
@@ -1327,7 +1314,7 @@ function _attr_details_or_dialog_open(scopeId, nodeAccessor, open, openChange, s
|
|
|
1327
1314
|
return openChange && writeControlledScope(4, scopeId, nodeAccessor, normalizedOpen || void 0, openChange, serializeType), normalizedOpen ? " open" : "";
|
|
1328
1315
|
}
|
|
1329
1316
|
function _attr_nonce() {
|
|
1330
|
-
return
|
|
1317
|
+
return getState().nonceAttr;
|
|
1331
1318
|
}
|
|
1332
1319
|
function _style_html(decls) {
|
|
1333
1320
|
let id = _id();
|
|
@@ -1370,7 +1357,7 @@ function _attrs(data, nodeAccessor, scopeId, tagName) {
|
|
|
1370
1357
|
case "style":
|
|
1371
1358
|
result += _attr_style(value);
|
|
1372
1359
|
break;
|
|
1373
|
-
default: name && !(isNullishOrFalse(value) ||
|
|
1360
|
+
default: name && !(isNullishOrFalse(value) || name === "content" && tagName !== "meta" || skip.test(name)) && (isEventHandler(name) ? (events || (events = {}, writeScope(scopeId, { ["I" + nodeAccessor]: events })), events[getEventType(name)] = value) : result += stringifyAttr(name, value));
|
|
1374
1361
|
}
|
|
1375
1362
|
}
|
|
1376
1363
|
return result;
|
|
@@ -1435,10 +1422,8 @@ function normalizedValueMatches(a, b) {
|
|
|
1435
1422
|
function normalizeStrAttrValue(value) {
|
|
1436
1423
|
return isNotNullishOrFalse(value) && value !== !0 ? value + "" : "";
|
|
1437
1424
|
}
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
//#endregion
|
|
1441
|
-
//#region src/html/writer.ts
|
|
1425
|
+
// src/html/inlined-runtimes.ts
|
|
1426
|
+
// src/html/writer.ts
|
|
1442
1427
|
function getChunk() {
|
|
1443
1428
|
return $chunk;
|
|
1444
1429
|
}
|
|
@@ -1464,7 +1449,7 @@ function getScopeId(scope) {
|
|
|
1464
1449
|
return scope[K_SCOPE_ID];
|
|
1465
1450
|
}
|
|
1466
1451
|
function getScopeById(scopeId) {
|
|
1467
|
-
|
|
1452
|
+
return $chunk.boundary.state.scopes.get(scopeId);
|
|
1468
1453
|
}
|
|
1469
1454
|
function $global() {
|
|
1470
1455
|
return $chunk.boundary.state.$global;
|
|
@@ -1519,7 +1504,7 @@ function mayDrop(written) {
|
|
|
1519
1504
|
return !1;
|
|
1520
1505
|
}
|
|
1521
1506
|
function _script(scopeId, registryId, markerGuard) {
|
|
1522
|
-
markerGuard === 0 && ($chunk.channel.readyId || $chunk
|
|
1507
|
+
markerGuard === 0 && ($chunk.channel.readyId || getAsyncContent($chunk)) && _resume_branch(scopeId), $chunk.boundary.state.queueEffect(scopeId, registryId);
|
|
1523
1508
|
}
|
|
1524
1509
|
function _trailers(html) {
|
|
1525
1510
|
$chunk.boundary.state.trailerHTML += html;
|
|
@@ -1557,7 +1542,7 @@ function markText(scopeId, accessor, text, markerGuard) {
|
|
|
1557
1542
|
return state.needsWalkerRuntime = !0, text ? (markerGuard === 2 ? "<!>" : "") + text + state.mark("$", scopeId + " " + accessor) : state.mark("%", scopeId + " " + accessor);
|
|
1558
1543
|
}
|
|
1559
1544
|
function _resume_branch(scopeId) {
|
|
1560
|
-
let branchId =
|
|
1545
|
+
let branchId = getContext(kBranchId);
|
|
1561
1546
|
branchId !== void 0 && branchId !== scopeId && writeScope(scopeId, { G: branchId });
|
|
1562
1547
|
}
|
|
1563
1548
|
function _attr_content(nodeAccessor, scopeId, content, markerGuard) {
|
|
@@ -1741,8 +1726,10 @@ var State = class {
|
|
|
1741
1726
|
mark(code, str) {
|
|
1742
1727
|
return "<!--" + this.commentPrefix + code + str + "-->";
|
|
1743
1728
|
}
|
|
1744
|
-
}
|
|
1745
|
-
|
|
1729
|
+
};
|
|
1730
|
+
function NOOP() {}
|
|
1731
|
+
var Boundary = class {
|
|
1732
|
+
onNext = NOOP;
|
|
1746
1733
|
count = 0;
|
|
1747
1734
|
resumeWrites = 0;
|
|
1748
1735
|
state;
|
|
@@ -1898,7 +1885,7 @@ var State = class {
|
|
|
1898
1885
|
}
|
|
1899
1886
|
flushReadyScripts(boundary, reservations, holdEffects) {
|
|
1900
1887
|
let { channel } = this, { readyId } = channel, scripts = "", held = this.takeDeferredReady();
|
|
1901
|
-
if (held) for (let chunk of
|
|
1888
|
+
if (held) for (let chunk of toArray(held)) chunk.boundary.aborted || (scripts = concatScripts(scripts, chunk.flushReadyScripts(boundary, reservations, holdEffects)), (chunk.effects || chunk.deferredReady) && (this.deferredReady = push(this.deferredReady, chunk)));
|
|
1902
1889
|
if (readyId && !this.async) {
|
|
1903
1890
|
let { state } = boundary, effects = holdEffects ? "" : this.effects;
|
|
1904
1891
|
effects && flushSerializerGlobals(boundary), flushSerializer(boundary, channel);
|
|
@@ -1925,7 +1912,7 @@ var State = class {
|
|
|
1925
1912
|
}
|
|
1926
1913
|
readyResumeScripts && (needsWalk = !0);
|
|
1927
1914
|
let effects = this.async ? "" : joinHeldEffects(this.takeHeldEffects(), this.effects), { html, scripts } = this;
|
|
1928
|
-
html && state.hasReorderRuntime && (html = state.mark("*", "") + html), state.needsWalkerRuntime && !state.hasWalkerRuntime && (state.hasWalkerRuntime = !0, scripts = concatScripts(scripts, state.runtimeScript())), scripts = concatScripts(scripts, readyResumeScripts), effects && (needsWalk = !0, flushSerializerGlobals(boundary), state.resumes = state.resumes
|
|
1915
|
+
html && state.hasReorderRuntime && (html = state.mark("*", "") + html), state.needsWalkerRuntime && !state.hasWalkerRuntime && (state.hasWalkerRuntime = !0, scripts = concatScripts(scripts, state.runtimeScript())), scripts = concatScripts(scripts, readyResumeScripts), effects && (needsWalk = !0, flushSerializerGlobals(boundary), state.resumes = concatSequence(state.resumes, "\"" + effects + "\""));
|
|
1929
1916
|
let reordered = "", needsResumeArray = !1;
|
|
1930
1917
|
if (state.writeReorders) {
|
|
1931
1918
|
for (let reorderedChunk of state.writeReorders) {
|
|
@@ -2038,17 +2025,16 @@ function depsMarker(deps) {
|
|
|
2038
2025
|
return marker;
|
|
2039
2026
|
}
|
|
2040
2027
|
function getFilteredGlobals($global) {
|
|
2041
|
-
if (!$global) return 0;
|
|
2042
2028
|
let serializedGlobals = $global.serializedGlobals;
|
|
2043
2029
|
if (!serializedGlobals) return 0;
|
|
2044
2030
|
let filtered = 0;
|
|
2045
2031
|
if (Array.isArray(serializedGlobals)) for (let key of serializedGlobals) {
|
|
2046
2032
|
let value = $global[key];
|
|
2047
|
-
value !== void 0 && (filtered
|
|
2033
|
+
value !== void 0 && ((filtered ||= {})[key] = value);
|
|
2048
2034
|
}
|
|
2049
2035
|
else for (let key in serializedGlobals) if (serializedGlobals[key]) {
|
|
2050
2036
|
let value = $global[key];
|
|
2051
|
-
value !== void 0 && (filtered
|
|
2037
|
+
value !== void 0 && ((filtered ||= {})[key] = value);
|
|
2052
2038
|
}
|
|
2053
2039
|
return filtered;
|
|
2054
2040
|
}
|
|
@@ -2078,8 +2064,7 @@ function flushTickQueue() {
|
|
|
2078
2064
|
});
|
|
2079
2065
|
}
|
|
2080
2066
|
}
|
|
2081
|
-
|
|
2082
|
-
//#region src/html/content.ts
|
|
2067
|
+
// src/html/content.ts
|
|
2083
2068
|
function _to_text(val) {
|
|
2084
2069
|
return val || val === 0 ? val + "" : "";
|
|
2085
2070
|
}
|
|
@@ -2087,7 +2072,7 @@ function _unescaped(val) {
|
|
|
2087
2072
|
return val ? val + "" : val === 0 ? "0" : "";
|
|
2088
2073
|
}
|
|
2089
2074
|
function _escape(val) {
|
|
2090
|
-
return val ?
|
|
2075
|
+
return val || val === 0 ? typeof val == "number" ? val + "" : escapeXMLStr(val + "") : "";
|
|
2091
2076
|
}
|
|
2092
2077
|
function _escape_script(val) {
|
|
2093
2078
|
return val ? escapeScriptStr(val + "") : val === 0 ? "0" : "";
|
|
@@ -2104,16 +2089,14 @@ function escapeCommentStr(str) {
|
|
|
2104
2089
|
function _escape_comment(val) {
|
|
2105
2090
|
return val ? escapeCommentStr(val + "") : val === 0 ? "0" : "";
|
|
2106
2091
|
}
|
|
2107
|
-
|
|
2108
|
-
//#region src/html/dynamic-tag.ts
|
|
2092
|
+
// src/html/dynamic-tag.ts
|
|
2109
2093
|
function _content(id, fn, scopeId) {
|
|
2110
2094
|
return fn.a = id, fn.e = scopeId, fn;
|
|
2111
2095
|
}
|
|
2112
2096
|
function _content_resume(id, fn, scopeId, locals) {
|
|
2113
2097
|
return _resume(_content(id, fn, scopeId), id, scopeId, locals);
|
|
2114
2098
|
}
|
|
2115
|
-
|
|
2116
|
-
//#region src/html/template.ts
|
|
2099
|
+
// src/html/template.ts
|
|
2117
2100
|
function render(input = {}) {
|
|
2118
2101
|
return startRender(this, input, State);
|
|
2119
2102
|
}
|
|
@@ -2259,30 +2242,29 @@ var ServerRendered = class {
|
|
|
2259
2242
|
return;
|
|
2260
2243
|
}
|
|
2261
2244
|
let { boundary } = head, onNext = boundary.onNext = (write) => {
|
|
2262
|
-
if (flushing)
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
if (status === 2) {
|
|
2271
|
-
tick || offTick(onNext), settle(boundary), onAbort(boundary.reason);
|
|
2272
|
-
return;
|
|
2273
|
-
}
|
|
2274
|
-
if (write || status === 0) {
|
|
2275
|
-
if (head = head.consume(boundary), boundary.aborted) continue;
|
|
2276
|
-
let html = head.flushHTML(boundary);
|
|
2277
|
-
if (boundary.aborted) continue;
|
|
2278
|
-
if (html && onWrite(html), !boundary.count) {
|
|
2279
|
-
tick || offTick(onNext), settle(boundary), onClose();
|
|
2245
|
+
if (flushing) again = !0;
|
|
2246
|
+
else {
|
|
2247
|
+
flushing = !0;
|
|
2248
|
+
do {
|
|
2249
|
+
again = !1;
|
|
2250
|
+
let status = boundary.flush();
|
|
2251
|
+
if (status === 2) {
|
|
2252
|
+
tick || offTick(onNext), settle(boundary), onAbort(boundary.reason);
|
|
2280
2253
|
return;
|
|
2281
2254
|
}
|
|
2282
|
-
write
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2255
|
+
if (write || status === 0) {
|
|
2256
|
+
if (head = head.consume(boundary), boundary.aborted) continue;
|
|
2257
|
+
let html = head.flushHTML(boundary);
|
|
2258
|
+
if (boundary.aborted) continue;
|
|
2259
|
+
if (html && onWrite(html), !boundary.count) {
|
|
2260
|
+
tick || offTick(onNext), settle(boundary), onClose();
|
|
2261
|
+
return;
|
|
2262
|
+
}
|
|
2263
|
+
write && (tick = !0);
|
|
2264
|
+
} else tick && (tick = !1, queueTick(onNext));
|
|
2265
|
+
} while (again);
|
|
2266
|
+
flushing = !1;
|
|
2267
|
+
}
|
|
2286
2268
|
};
|
|
2287
2269
|
return onNext(), boundary;
|
|
2288
2270
|
}
|
|
@@ -2295,11 +2277,9 @@ var ServerRendered = class {
|
|
|
2295
2277
|
}
|
|
2296
2278
|
};
|
|
2297
2279
|
function settle(boundary) {
|
|
2298
|
-
boundary.onNext = NOOP
|
|
2280
|
+
boundary.onNext = NOOP, boundary.state.$global.signal?.removeEventListener("abort", boundary);
|
|
2299
2281
|
}
|
|
2300
|
-
|
|
2301
|
-
//#endregion
|
|
2302
|
-
//#region src/html/assets.ts
|
|
2282
|
+
// src/html/assets.ts
|
|
2303
2283
|
function withLoadAssets(template, id, flush, assetId, triggers) {
|
|
2304
2284
|
let renderer = (input) => (writeLoadAsset(assetId, flush, triggers), writeWaitReady(assetId, template(), input));
|
|
2305
2285
|
return _template(id, renderer), renderer;
|
|
@@ -2361,17 +2341,18 @@ function addAsset(g, id, flush, triggers) {
|
|
|
2361
2341
|
}), asset;
|
|
2362
2342
|
}
|
|
2363
2343
|
function triggerScript(id, html, triggers) {
|
|
2364
|
-
let htmlStr = quoteScriptTemplateLiteral(html), exprs = triggers.map(
|
|
2365
|
-
let options = trigger.options && toObjectExpression(trigger.options);
|
|
2366
|
-
switch (trigger.type) {
|
|
2367
|
-
case "visible": return `(e=>e&&new IntersectionObserver((e,i)=>e.some(e=>e.isIntersecting)&&i.disconnect()+l()${options ? `,${options}` : ""}).observe(e))(${querySelectorOrLoad(trigger.selector)})`;
|
|
2368
|
-
case "idle": return `(self.requestIdleCallback||l)(l${options ? `,${options}` : ""})`;
|
|
2369
|
-
case "media": return `(m=>m.matches?l():m.addEventListener("change",l,{once:1}))(matchMedia(${JSON.stringify(trigger.selector)}))`;
|
|
2370
|
-
default: return `(e=>e?.addEventListener("${trigger.type.slice(3)}",l,{once:1}))(${querySelectorOrLoad(trigger.selector)})`;
|
|
2371
|
-
}
|
|
2372
|
-
});
|
|
2344
|
+
let htmlStr = quoteScriptTemplateLiteral(html), exprs = triggers.map(triggerExpression);
|
|
2373
2345
|
return `((h,d,l=$=>{d||document.head.append(new Range().createContextualFragment(d=h))})=>${exprs.length > 1 ? `{${exprs.join(";")}}` : exprs[0]})(${htmlStr})`;
|
|
2374
2346
|
}
|
|
2347
|
+
function triggerExpression(trigger) {
|
|
2348
|
+
let options = trigger.options && toObjectExpression(trigger.options);
|
|
2349
|
+
switch (trigger.type) {
|
|
2350
|
+
case "visible": return `(e=>e&&new IntersectionObserver((e,i)=>e.some(e=>e.isIntersecting)&&i.disconnect()+l()${options ? `,${options}` : ""}).observe(e))(${querySelectorOrLoad(trigger.selector)})`;
|
|
2351
|
+
case "idle": return `(self.requestIdleCallback||l)(l${options ? `,${options}` : ""})`;
|
|
2352
|
+
case "media": return `(m=>m.matches?l():m.addEventListener("change",l,{once:1}))(matchMedia(${JSON.stringify(trigger.selector)}))`;
|
|
2353
|
+
default: return `(e=>e?.addEventListener("${trigger.type.slice(3)}",l,{once:1}))(${querySelectorOrLoad(trigger.selector)})`;
|
|
2354
|
+
}
|
|
2355
|
+
}
|
|
2375
2356
|
function querySelectorOrLoad(selector) {
|
|
2376
2357
|
return `document.querySelector(${JSON.stringify(selector)})||l()`;
|
|
2377
2358
|
}
|
|
@@ -2380,10 +2361,8 @@ function toObjectExpression(options) {
|
|
|
2380
2361
|
for (let key in options) Object.hasOwn(options, key) && (result += sep + toObjectKey(key) + ":" + JSON.stringify(options[key]), sep = ",");
|
|
2381
2362
|
return result + "}";
|
|
2382
2363
|
}
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
//#endregion
|
|
2386
|
-
//#region src/common/for.ts
|
|
2364
|
+
// src/common/compat-meta.ts
|
|
2365
|
+
// src/common/for.ts
|
|
2387
2366
|
function forIn(obj, cb) {
|
|
2388
2367
|
for (let key in obj) cb(key, obj[key]);
|
|
2389
2368
|
}
|
|
@@ -2401,8 +2380,7 @@ function forUntil(until, from, step, cb) {
|
|
|
2401
2380
|
let start = from || 0, delta = step || 1;
|
|
2402
2381
|
for (let steps = (until - start) / delta, i = 0; i < steps; i++) cb(start + i * delta);
|
|
2403
2382
|
}
|
|
2404
|
-
|
|
2405
|
-
//#region src/html/for.ts
|
|
2383
|
+
// src/html/for.ts
|
|
2406
2384
|
function forOfBy(by, item, index) {
|
|
2407
2385
|
return by ? typeof by == "string" ? item[by] : by(item, index) : index;
|
|
2408
2386
|
}
|
|
@@ -2412,8 +2390,7 @@ function forInBy(by, name, value) {
|
|
|
2412
2390
|
function forStepBy(by, index) {
|
|
2413
2391
|
return by ? by(index) : index;
|
|
2414
2392
|
}
|
|
2415
|
-
|
|
2416
|
-
//#region src/html/control-flow.ts
|
|
2393
|
+
// src/html/control-flow.ts
|
|
2417
2394
|
function _show_start(display, markerGuard, branchExprGuard, parentEndTag) {
|
|
2418
2395
|
display ? resumesMarker(markerGuard, branchExprGuard, parentEndTag) && $chunk.writeHTML($chunk.boundary.state.mark("[", "")) : $chunk.writeHTML("<t hidden>");
|
|
2419
2396
|
}
|
|
@@ -2470,13 +2447,13 @@ function forBranches(by, cb, iterate, scopeId, accessor, branchGuard, markerGuar
|
|
|
2470
2447
|
let { state } = $chunk.boundary, resumeKeys = markerGuard !== 0, resumeMarker = resumesMarker(markerGuard, branchExprGuard, parentEndTag), flushBranchIds = "", loopScopes;
|
|
2471
2448
|
iterate((itemKey, sameAsIndex, a, b) => {
|
|
2472
2449
|
let branchId = _peek_scope_id();
|
|
2473
|
-
resumeMarker && (singleNode ? flushBranchIds = " " + branchId + flushBranchIds : ($chunk.writeHTML(state.mark("[", flushBranchIds)), flushBranchIds = branchId + "")), withBranchId(branchId, cb, a, b);
|
|
2450
|
+
resumeMarker && (singleNode ? flushBranchIds = " " + branchId + flushBranchIds : ($chunk.writeHTML(state.mark("[", flushBranchIds)), flushBranchIds = branchId + "")), resumeMarker ? withBranchId(branchId, cb, a, b) : cb(a, b);
|
|
2474
2451
|
let branchScope = writeScope(branchId, resumeKeys && !sameAsIndex ? { M: itemKey } : {});
|
|
2475
2452
|
resumeMarker || (loopScopes = push(loopScopes, branchScope));
|
|
2476
2453
|
}), loopScopes && writeScope(scopeId, { ["A" + accessor]: loopScopes }), writeBranchEnd(scopeId, accessor, branchExprGuard, markerGuard, parentEndTag, singleNode, singleNode ? flushBranchIds : flushBranchIds ? " " + flushBranchIds : "");
|
|
2477
2454
|
}
|
|
2478
2455
|
function _if(cb, scopeId, accessor, branchGuard, markerGuard, branchExprGuard, parentEndTag, singleNode) {
|
|
2479
|
-
let resumeBranch = branchGuard !== 0, resumeMarker = resumesMarker(markerGuard, branchExprGuard, parentEndTag), branchId = _peek_scope_id(), chunk = $chunk, beforeBranch = resumeMarker && resumeBranch && !singleNode ? deferBranchStart(chunk) : void 0, branchIndex = resumeBranch ? withBranchId(branchId, cb) : cb(), shouldWriteBranch = resumeBranch && branchIndex !== void 0;
|
|
2456
|
+
let resumeBranch = branchGuard !== 0, resumeMarker = resumesMarker(markerGuard, branchExprGuard, parentEndTag), branchId = _peek_scope_id(), chunk = $chunk, beforeBranch = resumeMarker && resumeBranch && !singleNode ? deferBranchStart(chunk) : void 0, branchIndex = resumeBranch && resumeMarker ? withBranchId(branchId, cb) : cb(), shouldWriteBranch = resumeBranch && branchIndex !== void 0;
|
|
2480
2457
|
beforeBranch !== void 0 && applyBranchStart(chunk, beforeBranch, shouldWriteBranch), shouldWriteBranch && (branchIndex || !resumeMarker) && writeScope(scopeId, {
|
|
2481
2458
|
["D" + accessor]: branchIndex || void 0,
|
|
2482
2459
|
["A" + accessor]: resumeMarker ? void 0 : writeScope(branchId, {})
|
|
@@ -2487,10 +2464,7 @@ function resumesMarker(markerGuard, branchExprGuard, parentEndTag) {
|
|
|
2487
2464
|
}
|
|
2488
2465
|
function writeBranchEnd(scopeId, accessor, branchExprGuard, markerGuard, parentEndTag, singleNode, branchIds) {
|
|
2489
2466
|
let endTag = parentEndTag || "";
|
|
2490
|
-
|
|
2491
|
-
let { state } = $chunk.boundary, mark = singleNode ? state.mark(parentEndTag ? "}" : "|", scopeId + " " + accessor + (branchIds || "")) : state.mark(parentEndTag ? ")" : "]", scopeId + " " + accessor + (branchIds || ""));
|
|
2492
|
-
$chunk.writeHTML(mark + endTag);
|
|
2493
|
-
} else markerGuard === 0 ? $chunk.writeHTML(endTag) : $chunk.writeHTML(endTag + _el_mark(scopeId, accessor));
|
|
2467
|
+
resumesMarker(markerGuard, branchExprGuard, parentEndTag) ? $chunk.writeHTML($chunk.boundary.state.mark(singleNode ? parentEndTag ? "}" : "|" : parentEndTag ? ")" : "]", scopeId + " " + accessor + branchIds) + endTag) : markerGuard === 0 ? $chunk.writeHTML(endTag) : $chunk.writeHTML(endTag + _el_mark(scopeId, accessor));
|
|
2494
2468
|
}
|
|
2495
2469
|
function _await(scopeId, accessor, promise, content, markerGuard) {
|
|
2496
2470
|
let resumeMarker = markerGuard !== 0;
|
|
@@ -2525,17 +2499,13 @@ function _try(scopeId, accessor, content, placeholderContent, catchContent, plac
|
|
|
2525
2499
|
}
|
|
2526
2500
|
function tryPlaceholder(content, placeholder, branchId, scopeId, placeholderBranchId) {
|
|
2527
2501
|
let chunk = $chunk, { boundary } = chunk, body = chunk.fork(boundary, null);
|
|
2528
|
-
|
|
2529
|
-
chunk.append(body);
|
|
2530
|
-
return;
|
|
2531
|
-
}
|
|
2532
|
-
chunk.next = chunk.forkRest(boundary), captureContext(chunk), chunk.placeholder = {
|
|
2502
|
+
body === body.render(content) ? chunk.append(body) : (chunk.next = chunk.forkRest(boundary), captureContext(chunk), chunk.placeholder = {
|
|
2533
2503
|
body,
|
|
2534
2504
|
render: placeholder,
|
|
2535
2505
|
branchId,
|
|
2536
2506
|
scopeId,
|
|
2537
2507
|
placeholderBranchId
|
|
2538
|
-
};
|
|
2508
|
+
});
|
|
2539
2509
|
}
|
|
2540
2510
|
function tryBoundary(content, catchContent, branchId, renderers) {
|
|
2541
2511
|
let chunk = $chunk, { boundary } = chunk, { state } = boundary, bodyBoundary = new Boundary(state, void 0, boundary);
|
|
@@ -2588,8 +2558,7 @@ function writeTryRenderers(branchId, catchContent, placeholderContent) {
|
|
|
2588
2558
|
Q: placeholderContent
|
|
2589
2559
|
});
|
|
2590
2560
|
}
|
|
2591
|
-
|
|
2592
|
-
//#region src/html/compat.ts
|
|
2561
|
+
// src/html/compat.ts
|
|
2593
2562
|
function drainClassFunctions($global, writeScope) {
|
|
2594
2563
|
let pending = pendingClassFunctions.get($global), scopeByHost = {};
|
|
2595
2564
|
for (let [id, fn, hostId] of pending) register(id, fn, scopeByHost[hostId] ||= writeScope(hostId));
|
|
@@ -2599,6 +2568,4 @@ function swapReorders(state, reorders) {
|
|
|
2599
2568
|
let { writeReorders } = state;
|
|
2600
2569
|
return state.writeReorders = reorders, writeReorders;
|
|
2601
2570
|
}
|
|
2602
|
-
function NOOP() {}
|
|
2603
|
-
//#endregion
|
|
2604
2571
|
export { $global, _assert_class_toggles, _assert_hoist, _attr, _attr_and, _attr_class, _attr_content, _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open as _attr_dialog_open, _attr_input_checked, _attr_input_checkedValue, _attr_input_value, _attr_nonce, _attr_nullish, _attr_option_value, _attr_or, _attr_select_value, _attr_style, _attr_textarea_value, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, _attrs_select_value, _attrs_textarea_value, _await, _content, _content_resume, _dynamic_tag, _el, _el_mark, _el_read_error, _escape, _escape_comment, _escape_script, _escape_style, _escape_style_value, _existing_scope, _flush_head, _for_in, _for_of, _for_to, _for_until, _hoist, _hoist_read_error, _html, _html_mark, _id, _if, _peek_scope_id, _resume, _resume_branch, _resume_locals, writeScope as _scope, _scope_id, _scope_reason, _scope_with_id, _script, _set_scope_reason, _show_end, _show_start, _signal_read_error, _style_html, _subscribe, _template, _text_mark, _textarea_value, _to_text, _trailers, _try, _unescaped, _var, _write_guard, _write_if, attrTag, attrTags, compat, forIn, forOf, forTo, forUntil, withLoadAssets, withPageAssets };
|
|
@@ -118,7 +118,6 @@ export declare const taglibs: (string | {
|
|
|
118
118
|
"<static>": import("@marko/compiler/babel-utils").Tag;
|
|
119
119
|
"<style>": import("@marko/compiler/babel-utils").Tag;
|
|
120
120
|
"<try>": import("@marko/compiler/babel-utils").Tag;
|
|
121
|
-
migrate: import("@marko/compiler/babel-types").Visitor<unknown>;
|
|
122
121
|
})[][];
|
|
123
122
|
export declare function getRuntimeEntryFiles(output: Config["output"], optimize: boolean): string[];
|
|
124
123
|
export { createInteropTranslator } from "./interop";
|