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.js
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let empty = [], rest = Symbol(), unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "\\3B " : "\\\\",
|
|
3
|
-
let str = "", sep = "", part;
|
|
4
|
-
if (val) {
|
|
5
|
-
if (typeof val != "object") str += val;
|
|
6
|
-
else if (Array.isArray(val)) for (let v of val) part = toDelimitedString(v, delimiter, stringify), part && (str += sep + part, sep = delimiter);
|
|
7
|
-
else for (let name in val) part = stringify(name, val[name]), part && (str += sep + part, sep = delimiter);
|
|
8
|
-
}
|
|
9
|
-
return str;
|
|
10
|
-
}, 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__ */ (() => {
|
|
2
|
+
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__ */ (() => {
|
|
11
3
|
let KNOWN_SYMBOLS = /* @__PURE__ */ new Map();
|
|
12
4
|
for (let name of Object.getOwnPropertyNames(Symbol)) {
|
|
13
5
|
let symbol = Symbol[name];
|
|
@@ -248,20 +240,18 @@ let empty = [], rest = Symbol(), unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeSty
|
|
|
248
240
|
}, 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) => {
|
|
249
241
|
let { state } = $chunk.boundary, target = $chunk.channel, scope = scopeWithId(state, scopeId);
|
|
250
242
|
return state.needsWalkerRuntime = !0, countResumeWrite($chunk), writeAsyncVisits($chunk), Object.assign(scope, partialScope), state.queueScope(target, scopeId, partialScope), scope;
|
|
251
|
-
}, ALL_GROUPS = 715827883,
|
|
243
|
+
}, 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) => {
|
|
252
244
|
let shouldResume = markerGuard !== 0, renderer = normalizeDynamicRenderer(tag), state = getState(), branchId = _peek_scope_id(), rendered, result;
|
|
253
245
|
if (typeof renderer == "string") {
|
|
254
246
|
let input = (inputIsArgs ? inputOrArgs[0] : inputOrArgs) || {};
|
|
255
|
-
rendered = !0, (()
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
needsScript && _script(branchId, "_d"), (shouldResume || needsScript) && _html(state.mark("(", scopeId + " " + accessor + " " + branchId));
|
|
262
|
-
})(), result = _el(scopeId, "-" + accessor);
|
|
247
|
+
if (rendered = !0, _scope_id(), _html(`<${renderer}${_attrs(input, "a", branchId, renderer)}>`), !voidElementsReg.test(renderer)) {
|
|
248
|
+
let renderContent = content || normalizeDynamicRenderer(input.content);
|
|
249
|
+
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}>`);
|
|
250
|
+
}
|
|
251
|
+
let childScope = getScopeById(branchId), needsScript = childScope && (childScope.Ia || childScope.Ea);
|
|
252
|
+
needsScript && _script(branchId, "_d"), (shouldResume || needsScript) && _html(state.mark("(", scopeId + " " + accessor + " " + branchId)), result = _el(scopeId, "-" + accessor);
|
|
263
253
|
} else {
|
|
264
|
-
let chunk =
|
|
254
|
+
let chunk = $chunk, beforeBranch = shouldResume ? deferBranchStart(chunk) : void 0, render = () => {
|
|
265
255
|
if (renderer) try {
|
|
266
256
|
return _set_scope_reason(shouldResume ? ALL_GROUPS : 0), inputIsArgs ? renderer(...inputOrArgs) : renderer(content ? {
|
|
267
257
|
...inputOrArgs,
|
|
@@ -334,11 +324,11 @@ let empty = [], rest = Symbol(), unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeSty
|
|
|
334
324
|
return joined;
|
|
335
325
|
},
|
|
336
326
|
appendChunks(chunks) {
|
|
337
|
-
let chunk =
|
|
327
|
+
let chunk = $chunk;
|
|
338
328
|
for (let part of chunks) chunk.append(part), part.effects && (chunk.lastEffect = part.lastEffect);
|
|
339
329
|
},
|
|
340
330
|
deferReorders(reorders) {
|
|
341
|
-
let chunk =
|
|
331
|
+
let chunk = $chunk;
|
|
342
332
|
for (let i = reorders.length; i--;) {
|
|
343
333
|
let carrier = chunk.fork(chunk.boundary, chunk.next);
|
|
344
334
|
carrier.deferredReorder = reorders[i], chunk.next = carrier;
|
|
@@ -427,7 +417,7 @@ let empty = [], rest = Symbol(), unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeSty
|
|
|
427
417
|
}
|
|
428
418
|
}, pendingClassFunctions = /* @__PURE__ */ new WeakMap();
|
|
429
419
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
430
|
-
|
|
420
|
+
// src/common/attr-tag.ts
|
|
431
421
|
function attrTag(attrs) {
|
|
432
422
|
return attrs[Symbol.iterator] = attrTagIterator, attrs[rest] = empty, attrs;
|
|
433
423
|
}
|
|
@@ -437,8 +427,7 @@ function attrTags(first, attrs) {
|
|
|
437
427
|
function* attrTagIterator() {
|
|
438
428
|
yield this, yield* this[rest];
|
|
439
429
|
}
|
|
440
|
-
|
|
441
|
-
//#region src/common/helpers.ts
|
|
430
|
+
// src/common/helpers.ts
|
|
442
431
|
function stringifyClassEntry(name, value) {
|
|
443
432
|
return value ? name : "";
|
|
444
433
|
}
|
|
@@ -453,6 +442,15 @@ function escapeStyleValue(str) {
|
|
|
453
442
|
for (let c of result) c === "(" ? closers = ")" + closers : c === "[" ? closers = "]" + closers : c === closers[0] && (closers = closers.slice(1));
|
|
454
443
|
return result + closers;
|
|
455
444
|
}
|
|
445
|
+
function toDelimitedString(val, delimiter, stringify) {
|
|
446
|
+
let str = "", sep = "", part;
|
|
447
|
+
if (val) {
|
|
448
|
+
if (typeof val != "object") str += val;
|
|
449
|
+
else if (Array.isArray(val)) for (let v of val) part = toDelimitedString(v, delimiter, stringify), part && (str += sep + part, sep = delimiter);
|
|
450
|
+
else for (let name in val) part = stringify(name, val[name]), part && (str += sep + part, sep = delimiter);
|
|
451
|
+
}
|
|
452
|
+
return str;
|
|
453
|
+
}
|
|
456
454
|
function isEventHandler(name) {
|
|
457
455
|
return /^on[A-Z-]/.test(name);
|
|
458
456
|
}
|
|
@@ -479,15 +477,16 @@ function normalizeDynamicRenderer(value) {
|
|
|
479
477
|
if ("a" in normalized) return normalized;
|
|
480
478
|
}
|
|
481
479
|
}
|
|
482
|
-
|
|
483
|
-
//#region src/common/errors.ts
|
|
480
|
+
// src/common/errors.ts
|
|
484
481
|
function _assert_class_toggles(classes, toggles) {}
|
|
485
482
|
function _el_read_error() {}
|
|
486
483
|
function _hoist_read_error() {}
|
|
487
484
|
function _signal_read_error() {}
|
|
488
485
|
function _assert_hoist(value) {}
|
|
489
|
-
|
|
490
|
-
|
|
486
|
+
// src/common/opt.ts
|
|
487
|
+
function toArray(opt) {
|
|
488
|
+
return opt ? Array.isArray(opt) ? opt : [opt] : [];
|
|
489
|
+
}
|
|
491
490
|
function reduce(opt, cb, acc) {
|
|
492
491
|
if (opt) {
|
|
493
492
|
if (Array.isArray(opt)) for (let item of opt) acc = cb(acc, item);
|
|
@@ -615,7 +614,7 @@ function writeScopesRoot(state, flushes) {
|
|
|
615
614
|
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();
|
|
616
615
|
}
|
|
617
616
|
let extras = "";
|
|
618
|
-
(state.deferredRefs.size ||
|
|
617
|
+
(state.deferredRefs.size || hasMatchingCalls(state, state.channel?.readyId)) && (extras = state.writeTrailing(scopesIndex));
|
|
619
618
|
let result = extras && "(";
|
|
620
619
|
for (let chunk of buf) result += chunk;
|
|
621
620
|
return result += extras, result ? state.wrapPayload(result, extras) : "";
|
|
@@ -672,9 +671,6 @@ function writeCallArg(state, val, valueId) {
|
|
|
672
671
|
ref && !ref.id && ref.scopeId === void 0 && !isAncestorChannelRef(state, ref) && (ref.id = valueId || nextRefAccess(state), state.buf[startIndex] = ref.id + "=" + state.buf[startIndex]);
|
|
673
672
|
} else state.buf.push("void 0");
|
|
674
673
|
}
|
|
675
|
-
function hasChannelCalls(state) {
|
|
676
|
-
return hasMatchingCalls(state, state.channel?.readyId);
|
|
677
|
-
}
|
|
678
674
|
function hasMatchingCalls(state, readyId) {
|
|
679
675
|
if (!readyId) return state.queuedCalls.length > 0;
|
|
680
676
|
for (let call of state.queuedReadyCalls) if (call.channel.readyId === readyId) return !0;
|
|
@@ -1001,26 +997,18 @@ function writeRequest(state, val, ref) {
|
|
|
1001
997
|
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());
|
|
1002
998
|
let options = "";
|
|
1003
999
|
val.cache !== "default" && (options += sep + "cache:" + quote(val.cache, 0), sep = ","), val.credentials !== "same-origin" && (options += sep + "credentials:" + quote(val.credentials, 0), sep = ",");
|
|
1004
|
-
let
|
|
1005
|
-
|
|
1006
|
-
else {
|
|
1007
|
-
state.refs.set(val.headers, new Reference(ref, "headers", state.flushId, null));
|
|
1008
|
-
let headers = stringEntriesToHeadersInit(val.headers);
|
|
1009
|
-
headers && (options += sep + "headers:" + headers, sep = ",");
|
|
1010
|
-
}
|
|
1011
|
-
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;
|
|
1000
|
+
let headers = headersOption(state, val.headers, ref);
|
|
1001
|
+
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;
|
|
1012
1002
|
}
|
|
1013
1003
|
function writeResponse(state, val, ref) {
|
|
1014
1004
|
let sep = "", options = "";
|
|
1015
1005
|
val.status !== 200 && (options += "status:" + val.status, sep = ","), val.statusText && (options += sep + "statusText:" + quote(val.statusText, 0), sep = ",");
|
|
1016
|
-
let
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
}
|
|
1023
|
-
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;
|
|
1006
|
+
let headers = headersOption(state, val.headers, ref);
|
|
1007
|
+
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;
|
|
1008
|
+
}
|
|
1009
|
+
function headersOption(state, headers, ref) {
|
|
1010
|
+
let seen = state.refs.get(headers);
|
|
1011
|
+
return seen ? ensureRefAccess(state, seen) : (state.refs.set(headers, new Reference(ref, "headers", state.flushId, null)), stringEntriesToHeadersInit(headers));
|
|
1024
1012
|
}
|
|
1025
1013
|
function writeIntl(state, val, name, ref) {
|
|
1026
1014
|
let { locale, ...options } = val.resolvedOptions();
|
|
@@ -1280,8 +1268,7 @@ function patchIteratorNext(proto) {
|
|
|
1280
1268
|
return this[kTouchedIterator] = 1, next.call(this, value);
|
|
1281
1269
|
}, proto.next[kTouchedIterator] = !0;
|
|
1282
1270
|
}
|
|
1283
|
-
|
|
1284
|
-
//#region src/html/attrs.ts
|
|
1271
|
+
// src/html/attrs.ts
|
|
1285
1272
|
function _attr_class(value) {
|
|
1286
1273
|
return stringAttr("class", toDelimitedString(value, " ", stringifyClassEntry));
|
|
1287
1274
|
}
|
|
@@ -1329,7 +1316,7 @@ function _attr_details_or_dialog_open(scopeId, nodeAccessor, open, openChange, s
|
|
|
1329
1316
|
return openChange && writeControlledScope(4, scopeId, nodeAccessor, normalizedOpen || void 0, openChange, serializeType), normalizedOpen ? " open" : "";
|
|
1330
1317
|
}
|
|
1331
1318
|
function _attr_nonce() {
|
|
1332
|
-
return
|
|
1319
|
+
return getState().nonceAttr;
|
|
1333
1320
|
}
|
|
1334
1321
|
function _style_html(decls) {
|
|
1335
1322
|
let id = _id();
|
|
@@ -1372,7 +1359,7 @@ function _attrs(data, nodeAccessor, scopeId, tagName) {
|
|
|
1372
1359
|
case "style":
|
|
1373
1360
|
result += _attr_style(value);
|
|
1374
1361
|
break;
|
|
1375
|
-
default: name && !(isNullishOrFalse(value) ||
|
|
1362
|
+
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));
|
|
1376
1363
|
}
|
|
1377
1364
|
}
|
|
1378
1365
|
return result;
|
|
@@ -1437,10 +1424,8 @@ function normalizedValueMatches(a, b) {
|
|
|
1437
1424
|
function normalizeStrAttrValue(value) {
|
|
1438
1425
|
return isNotNullishOrFalse(value) && value !== !0 ? value + "" : "";
|
|
1439
1426
|
}
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
//#endregion
|
|
1443
|
-
//#region src/html/writer.ts
|
|
1427
|
+
// src/html/inlined-runtimes.ts
|
|
1428
|
+
// src/html/writer.ts
|
|
1444
1429
|
function getChunk() {
|
|
1445
1430
|
return $chunk;
|
|
1446
1431
|
}
|
|
@@ -1466,7 +1451,7 @@ function getScopeId(scope) {
|
|
|
1466
1451
|
return scope[K_SCOPE_ID];
|
|
1467
1452
|
}
|
|
1468
1453
|
function getScopeById(scopeId) {
|
|
1469
|
-
|
|
1454
|
+
return $chunk.boundary.state.scopes.get(scopeId);
|
|
1470
1455
|
}
|
|
1471
1456
|
function $global() {
|
|
1472
1457
|
return $chunk.boundary.state.$global;
|
|
@@ -1521,7 +1506,7 @@ function mayDrop(written) {
|
|
|
1521
1506
|
return !1;
|
|
1522
1507
|
}
|
|
1523
1508
|
function _script(scopeId, registryId, markerGuard) {
|
|
1524
|
-
markerGuard === 0 && ($chunk.channel.readyId || $chunk
|
|
1509
|
+
markerGuard === 0 && ($chunk.channel.readyId || getAsyncContent($chunk)) && _resume_branch(scopeId), $chunk.boundary.state.queueEffect(scopeId, registryId);
|
|
1525
1510
|
}
|
|
1526
1511
|
function _trailers(html) {
|
|
1527
1512
|
$chunk.boundary.state.trailerHTML += html;
|
|
@@ -1559,7 +1544,7 @@ function markText(scopeId, accessor, text, markerGuard) {
|
|
|
1559
1544
|
return state.needsWalkerRuntime = !0, text ? (markerGuard === 2 ? "<!>" : "") + text + state.mark("$", scopeId + " " + accessor) : state.mark("%", scopeId + " " + accessor);
|
|
1560
1545
|
}
|
|
1561
1546
|
function _resume_branch(scopeId) {
|
|
1562
|
-
let branchId =
|
|
1547
|
+
let branchId = getContext(kBranchId);
|
|
1563
1548
|
branchId !== void 0 && branchId !== scopeId && writeScope(scopeId, { G: branchId });
|
|
1564
1549
|
}
|
|
1565
1550
|
function _attr_content(nodeAccessor, scopeId, content, markerGuard) {
|
|
@@ -1743,8 +1728,10 @@ var State = class {
|
|
|
1743
1728
|
mark(code, str) {
|
|
1744
1729
|
return "<!--" + this.commentPrefix + code + str + "-->";
|
|
1745
1730
|
}
|
|
1746
|
-
}
|
|
1747
|
-
|
|
1731
|
+
};
|
|
1732
|
+
function NOOP() {}
|
|
1733
|
+
var Boundary = class {
|
|
1734
|
+
onNext = NOOP;
|
|
1748
1735
|
count = 0;
|
|
1749
1736
|
resumeWrites = 0;
|
|
1750
1737
|
state;
|
|
@@ -1900,7 +1887,7 @@ var State = class {
|
|
|
1900
1887
|
}
|
|
1901
1888
|
flushReadyScripts(boundary, reservations, holdEffects) {
|
|
1902
1889
|
let { channel } = this, { readyId } = channel, scripts = "", held = this.takeDeferredReady();
|
|
1903
|
-
if (held) for (let chunk of
|
|
1890
|
+
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)));
|
|
1904
1891
|
if (readyId && !this.async) {
|
|
1905
1892
|
let { state } = boundary, effects = holdEffects ? "" : this.effects;
|
|
1906
1893
|
effects && flushSerializerGlobals(boundary), flushSerializer(boundary, channel);
|
|
@@ -1927,7 +1914,7 @@ var State = class {
|
|
|
1927
1914
|
}
|
|
1928
1915
|
readyResumeScripts && (needsWalk = !0);
|
|
1929
1916
|
let effects = this.async ? "" : joinHeldEffects(this.takeHeldEffects(), this.effects), { html, scripts } = this;
|
|
1930
|
-
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
|
|
1917
|
+
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 + "\""));
|
|
1931
1918
|
let reordered = "", needsResumeArray = !1;
|
|
1932
1919
|
if (state.writeReorders) {
|
|
1933
1920
|
for (let reorderedChunk of state.writeReorders) {
|
|
@@ -2040,17 +2027,16 @@ function depsMarker(deps) {
|
|
|
2040
2027
|
return marker;
|
|
2041
2028
|
}
|
|
2042
2029
|
function getFilteredGlobals($global) {
|
|
2043
|
-
if (!$global) return 0;
|
|
2044
2030
|
let serializedGlobals = $global.serializedGlobals;
|
|
2045
2031
|
if (!serializedGlobals) return 0;
|
|
2046
2032
|
let filtered = 0;
|
|
2047
2033
|
if (Array.isArray(serializedGlobals)) for (let key of serializedGlobals) {
|
|
2048
2034
|
let value = $global[key];
|
|
2049
|
-
value !== void 0 && (filtered
|
|
2035
|
+
value !== void 0 && ((filtered ||= {})[key] = value);
|
|
2050
2036
|
}
|
|
2051
2037
|
else for (let key in serializedGlobals) if (serializedGlobals[key]) {
|
|
2052
2038
|
let value = $global[key];
|
|
2053
|
-
value !== void 0 && (filtered
|
|
2039
|
+
value !== void 0 && ((filtered ||= {})[key] = value);
|
|
2054
2040
|
}
|
|
2055
2041
|
return filtered;
|
|
2056
2042
|
}
|
|
@@ -2080,8 +2066,7 @@ function flushTickQueue() {
|
|
|
2080
2066
|
});
|
|
2081
2067
|
}
|
|
2082
2068
|
}
|
|
2083
|
-
|
|
2084
|
-
//#region src/html/content.ts
|
|
2069
|
+
// src/html/content.ts
|
|
2085
2070
|
function _to_text(val) {
|
|
2086
2071
|
return val || val === 0 ? val + "" : "";
|
|
2087
2072
|
}
|
|
@@ -2089,7 +2074,7 @@ function _unescaped(val) {
|
|
|
2089
2074
|
return val ? val + "" : val === 0 ? "0" : "";
|
|
2090
2075
|
}
|
|
2091
2076
|
function _escape(val) {
|
|
2092
|
-
return val ?
|
|
2077
|
+
return val || val === 0 ? typeof val == "number" ? val + "" : escapeXMLStr(val + "") : "";
|
|
2093
2078
|
}
|
|
2094
2079
|
function _escape_script(val) {
|
|
2095
2080
|
return val ? escapeScriptStr(val + "") : val === 0 ? "0" : "";
|
|
@@ -2106,16 +2091,14 @@ function escapeCommentStr(str) {
|
|
|
2106
2091
|
function _escape_comment(val) {
|
|
2107
2092
|
return val ? escapeCommentStr(val + "") : val === 0 ? "0" : "";
|
|
2108
2093
|
}
|
|
2109
|
-
|
|
2110
|
-
//#region src/html/dynamic-tag.ts
|
|
2094
|
+
// src/html/dynamic-tag.ts
|
|
2111
2095
|
function _content(id, fn, scopeId) {
|
|
2112
2096
|
return fn.a = id, fn.e = scopeId, fn;
|
|
2113
2097
|
}
|
|
2114
2098
|
function _content_resume(id, fn, scopeId, locals) {
|
|
2115
2099
|
return _resume(_content(id, fn, scopeId), id, scopeId, locals);
|
|
2116
2100
|
}
|
|
2117
|
-
|
|
2118
|
-
//#region src/html/template.ts
|
|
2101
|
+
// src/html/template.ts
|
|
2119
2102
|
function render(input = {}) {
|
|
2120
2103
|
return startRender(this, input, State);
|
|
2121
2104
|
}
|
|
@@ -2261,30 +2244,29 @@ var ServerRendered = class {
|
|
|
2261
2244
|
return;
|
|
2262
2245
|
}
|
|
2263
2246
|
let { boundary } = head, onNext = boundary.onNext = (write) => {
|
|
2264
|
-
if (flushing)
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
if (status === 2) {
|
|
2273
|
-
tick || offTick(onNext), settle(boundary), onAbort(boundary.reason);
|
|
2274
|
-
return;
|
|
2275
|
-
}
|
|
2276
|
-
if (write || status === 0) {
|
|
2277
|
-
if (head = head.consume(boundary), boundary.aborted) continue;
|
|
2278
|
-
let html = head.flushHTML(boundary);
|
|
2279
|
-
if (boundary.aborted) continue;
|
|
2280
|
-
if (html && onWrite(html), !boundary.count) {
|
|
2281
|
-
tick || offTick(onNext), settle(boundary), onClose();
|
|
2247
|
+
if (flushing) again = !0;
|
|
2248
|
+
else {
|
|
2249
|
+
flushing = !0;
|
|
2250
|
+
do {
|
|
2251
|
+
again = !1;
|
|
2252
|
+
let status = boundary.flush();
|
|
2253
|
+
if (status === 2) {
|
|
2254
|
+
tick || offTick(onNext), settle(boundary), onAbort(boundary.reason);
|
|
2282
2255
|
return;
|
|
2283
2256
|
}
|
|
2284
|
-
write
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2257
|
+
if (write || status === 0) {
|
|
2258
|
+
if (head = head.consume(boundary), boundary.aborted) continue;
|
|
2259
|
+
let html = head.flushHTML(boundary);
|
|
2260
|
+
if (boundary.aborted) continue;
|
|
2261
|
+
if (html && onWrite(html), !boundary.count) {
|
|
2262
|
+
tick || offTick(onNext), settle(boundary), onClose();
|
|
2263
|
+
return;
|
|
2264
|
+
}
|
|
2265
|
+
write && (tick = !0);
|
|
2266
|
+
} else tick && (tick = !1, queueTick(onNext));
|
|
2267
|
+
} while (again);
|
|
2268
|
+
flushing = !1;
|
|
2269
|
+
}
|
|
2288
2270
|
};
|
|
2289
2271
|
return onNext(), boundary;
|
|
2290
2272
|
}
|
|
@@ -2297,11 +2279,9 @@ var ServerRendered = class {
|
|
|
2297
2279
|
}
|
|
2298
2280
|
};
|
|
2299
2281
|
function settle(boundary) {
|
|
2300
|
-
boundary.onNext = NOOP
|
|
2282
|
+
boundary.onNext = NOOP, boundary.state.$global.signal?.removeEventListener("abort", boundary);
|
|
2301
2283
|
}
|
|
2302
|
-
|
|
2303
|
-
//#endregion
|
|
2304
|
-
//#region src/html/assets.ts
|
|
2284
|
+
// src/html/assets.ts
|
|
2305
2285
|
function withLoadAssets(template, id, flush, assetId, triggers) {
|
|
2306
2286
|
let renderer = (input) => (writeLoadAsset(assetId, flush, triggers), writeWaitReady(assetId, template(), input));
|
|
2307
2287
|
return _template(id, renderer), renderer;
|
|
@@ -2363,17 +2343,18 @@ function addAsset(g, id, flush, triggers) {
|
|
|
2363
2343
|
}), asset;
|
|
2364
2344
|
}
|
|
2365
2345
|
function triggerScript(id, html, triggers) {
|
|
2366
|
-
let htmlStr = quoteScriptTemplateLiteral(html), exprs = triggers.map(
|
|
2367
|
-
let options = trigger.options && toObjectExpression(trigger.options);
|
|
2368
|
-
switch (trigger.type) {
|
|
2369
|
-
case "visible": return `(e=>e&&new IntersectionObserver((e,i)=>e.some(e=>e.isIntersecting)&&i.disconnect()+l()${options ? `,${options}` : ""}).observe(e))(${querySelectorOrLoad(trigger.selector)})`;
|
|
2370
|
-
case "idle": return `(self.requestIdleCallback||l)(l${options ? `,${options}` : ""})`;
|
|
2371
|
-
case "media": return `(m=>m.matches?l():m.addEventListener("change",l,{once:1}))(matchMedia(${JSON.stringify(trigger.selector)}))`;
|
|
2372
|
-
default: return `(e=>e?.addEventListener("${trigger.type.slice(3)}",l,{once:1}))(${querySelectorOrLoad(trigger.selector)})`;
|
|
2373
|
-
}
|
|
2374
|
-
});
|
|
2346
|
+
let htmlStr = quoteScriptTemplateLiteral(html), exprs = triggers.map(triggerExpression);
|
|
2375
2347
|
return `((h,d,l=$=>{d||document.head.append(new Range().createContextualFragment(d=h))})=>${exprs.length > 1 ? `{${exprs.join(";")}}` : exprs[0]})(${htmlStr})`;
|
|
2376
2348
|
}
|
|
2349
|
+
function triggerExpression(trigger) {
|
|
2350
|
+
let options = trigger.options && toObjectExpression(trigger.options);
|
|
2351
|
+
switch (trigger.type) {
|
|
2352
|
+
case "visible": return `(e=>e&&new IntersectionObserver((e,i)=>e.some(e=>e.isIntersecting)&&i.disconnect()+l()${options ? `,${options}` : ""}).observe(e))(${querySelectorOrLoad(trigger.selector)})`;
|
|
2353
|
+
case "idle": return `(self.requestIdleCallback||l)(l${options ? `,${options}` : ""})`;
|
|
2354
|
+
case "media": return `(m=>m.matches?l():m.addEventListener("change",l,{once:1}))(matchMedia(${JSON.stringify(trigger.selector)}))`;
|
|
2355
|
+
default: return `(e=>e?.addEventListener("${trigger.type.slice(3)}",l,{once:1}))(${querySelectorOrLoad(trigger.selector)})`;
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2377
2358
|
function querySelectorOrLoad(selector) {
|
|
2378
2359
|
return `document.querySelector(${JSON.stringify(selector)})||l()`;
|
|
2379
2360
|
}
|
|
@@ -2382,10 +2363,8 @@ function toObjectExpression(options) {
|
|
|
2382
2363
|
for (let key in options) Object.hasOwn(options, key) && (result += sep + toObjectKey(key) + ":" + JSON.stringify(options[key]), sep = ",");
|
|
2383
2364
|
return result + "}";
|
|
2384
2365
|
}
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
//#endregion
|
|
2388
|
-
//#region src/common/for.ts
|
|
2366
|
+
// src/common/compat-meta.ts
|
|
2367
|
+
// src/common/for.ts
|
|
2389
2368
|
function forIn(obj, cb) {
|
|
2390
2369
|
for (let key in obj) cb(key, obj[key]);
|
|
2391
2370
|
}
|
|
@@ -2403,8 +2382,7 @@ function forUntil(until, from, step, cb) {
|
|
|
2403
2382
|
let start = from || 0, delta = step || 1;
|
|
2404
2383
|
for (let steps = (until - start) / delta, i = 0; i < steps; i++) cb(start + i * delta);
|
|
2405
2384
|
}
|
|
2406
|
-
|
|
2407
|
-
//#region src/html/for.ts
|
|
2385
|
+
// src/html/for.ts
|
|
2408
2386
|
function forOfBy(by, item, index) {
|
|
2409
2387
|
return by ? typeof by == "string" ? item[by] : by(item, index) : index;
|
|
2410
2388
|
}
|
|
@@ -2414,8 +2392,7 @@ function forInBy(by, name, value) {
|
|
|
2414
2392
|
function forStepBy(by, index) {
|
|
2415
2393
|
return by ? by(index) : index;
|
|
2416
2394
|
}
|
|
2417
|
-
|
|
2418
|
-
//#region src/html/control-flow.ts
|
|
2395
|
+
// src/html/control-flow.ts
|
|
2419
2396
|
function _show_start(display, markerGuard, branchExprGuard, parentEndTag) {
|
|
2420
2397
|
display ? resumesMarker(markerGuard, branchExprGuard, parentEndTag) && $chunk.writeHTML($chunk.boundary.state.mark("[", "")) : $chunk.writeHTML("<t hidden>");
|
|
2421
2398
|
}
|
|
@@ -2472,13 +2449,13 @@ function forBranches(by, cb, iterate, scopeId, accessor, branchGuard, markerGuar
|
|
|
2472
2449
|
let { state } = $chunk.boundary, resumeKeys = markerGuard !== 0, resumeMarker = resumesMarker(markerGuard, branchExprGuard, parentEndTag), flushBranchIds = "", loopScopes;
|
|
2473
2450
|
iterate((itemKey, sameAsIndex, a, b) => {
|
|
2474
2451
|
let branchId = _peek_scope_id();
|
|
2475
|
-
resumeMarker && (singleNode ? flushBranchIds = " " + branchId + flushBranchIds : ($chunk.writeHTML(state.mark("[", flushBranchIds)), flushBranchIds = branchId + "")), withBranchId(branchId, cb, a, b);
|
|
2452
|
+
resumeMarker && (singleNode ? flushBranchIds = " " + branchId + flushBranchIds : ($chunk.writeHTML(state.mark("[", flushBranchIds)), flushBranchIds = branchId + "")), resumeMarker ? withBranchId(branchId, cb, a, b) : cb(a, b);
|
|
2476
2453
|
let branchScope = writeScope(branchId, resumeKeys && !sameAsIndex ? { M: itemKey } : {});
|
|
2477
2454
|
resumeMarker || (loopScopes = push(loopScopes, branchScope));
|
|
2478
2455
|
}), loopScopes && writeScope(scopeId, { ["A" + accessor]: loopScopes }), writeBranchEnd(scopeId, accessor, branchExprGuard, markerGuard, parentEndTag, singleNode, singleNode ? flushBranchIds : flushBranchIds ? " " + flushBranchIds : "");
|
|
2479
2456
|
}
|
|
2480
2457
|
function _if(cb, scopeId, accessor, branchGuard, markerGuard, branchExprGuard, parentEndTag, singleNode) {
|
|
2481
|
-
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;
|
|
2458
|
+
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;
|
|
2482
2459
|
beforeBranch !== void 0 && applyBranchStart(chunk, beforeBranch, shouldWriteBranch), shouldWriteBranch && (branchIndex || !resumeMarker) && writeScope(scopeId, {
|
|
2483
2460
|
["D" + accessor]: branchIndex || void 0,
|
|
2484
2461
|
["A" + accessor]: resumeMarker ? void 0 : writeScope(branchId, {})
|
|
@@ -2489,10 +2466,7 @@ function resumesMarker(markerGuard, branchExprGuard, parentEndTag) {
|
|
|
2489
2466
|
}
|
|
2490
2467
|
function writeBranchEnd(scopeId, accessor, branchExprGuard, markerGuard, parentEndTag, singleNode, branchIds) {
|
|
2491
2468
|
let endTag = parentEndTag || "";
|
|
2492
|
-
|
|
2493
|
-
let { state } = $chunk.boundary, mark = singleNode ? state.mark(parentEndTag ? "}" : "|", scopeId + " " + accessor + (branchIds || "")) : state.mark(parentEndTag ? ")" : "]", scopeId + " " + accessor + (branchIds || ""));
|
|
2494
|
-
$chunk.writeHTML(mark + endTag);
|
|
2495
|
-
} else markerGuard === 0 ? $chunk.writeHTML(endTag) : $chunk.writeHTML(endTag + _el_mark(scopeId, accessor));
|
|
2469
|
+
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));
|
|
2496
2470
|
}
|
|
2497
2471
|
function _await(scopeId, accessor, promise, content, markerGuard) {
|
|
2498
2472
|
let resumeMarker = markerGuard !== 0;
|
|
@@ -2527,17 +2501,13 @@ function _try(scopeId, accessor, content, placeholderContent, catchContent, plac
|
|
|
2527
2501
|
}
|
|
2528
2502
|
function tryPlaceholder(content, placeholder, branchId, scopeId, placeholderBranchId) {
|
|
2529
2503
|
let chunk = $chunk, { boundary } = chunk, body = chunk.fork(boundary, null);
|
|
2530
|
-
|
|
2531
|
-
chunk.append(body);
|
|
2532
|
-
return;
|
|
2533
|
-
}
|
|
2534
|
-
chunk.next = chunk.forkRest(boundary), captureContext(chunk), chunk.placeholder = {
|
|
2504
|
+
body === body.render(content) ? chunk.append(body) : (chunk.next = chunk.forkRest(boundary), captureContext(chunk), chunk.placeholder = {
|
|
2535
2505
|
body,
|
|
2536
2506
|
render: placeholder,
|
|
2537
2507
|
branchId,
|
|
2538
2508
|
scopeId,
|
|
2539
2509
|
placeholderBranchId
|
|
2540
|
-
};
|
|
2510
|
+
});
|
|
2541
2511
|
}
|
|
2542
2512
|
function tryBoundary(content, catchContent, branchId, renderers) {
|
|
2543
2513
|
let chunk = $chunk, { boundary } = chunk, { state } = boundary, bodyBoundary = new Boundary(state, void 0, boundary);
|
|
@@ -2590,8 +2560,7 @@ function writeTryRenderers(branchId, catchContent, placeholderContent) {
|
|
|
2590
2560
|
Q: placeholderContent
|
|
2591
2561
|
});
|
|
2592
2562
|
}
|
|
2593
|
-
|
|
2594
|
-
//#region src/html/compat.ts
|
|
2563
|
+
// src/html/compat.ts
|
|
2595
2564
|
function drainClassFunctions($global, writeScope) {
|
|
2596
2565
|
let pending = pendingClassFunctions.get($global), scopeByHost = {};
|
|
2597
2566
|
for (let [id, fn, hostId] of pending) register(id, fn, scopeByHost[hostId] ||= writeScope(hostId));
|
|
@@ -2601,7 +2570,6 @@ function swapReorders(state, reorders) {
|
|
|
2601
2570
|
let { writeReorders } = state;
|
|
2602
2571
|
return state.writeReorders = reorders, writeReorders;
|
|
2603
2572
|
}
|
|
2604
|
-
function NOOP() {}
|
|
2605
2573
|
exports.$global = $global, exports._assert_class_toggles = _assert_class_toggles, exports._assert_hoist = _assert_hoist, exports._attr = _attr, exports._attr_and = _attr_and, exports._attr_class = _attr_class, exports._attr_content = _attr_content, exports._attr_details_open = _attr_details_or_dialog_open, exports._attr_dialog_open = _attr_details_or_dialog_open, exports._attr_input_checked = _attr_input_checked, exports._attr_input_checkedValue = _attr_input_checkedValue, exports._attr_input_value = _attr_input_value, exports._attr_nonce = _attr_nonce, exports._attr_nullish = _attr_nullish, exports._attr_option_value = _attr_option_value, exports._attr_or = _attr_or, exports._attr_select_value = _attr_select_value, exports._attr_style = _attr_style, exports._attr_textarea_value = _attr_textarea_value, exports._attrs = _attrs, exports._attrs_content = _attrs_content, exports._attrs_partial = _attrs_partial, exports._attrs_partial_content = _attrs_partial_content, exports._attrs_select_value = _attrs_select_value, exports._attrs_textarea_value = _attrs_textarea_value, exports._await = _await, exports._content = _content, exports._content_resume = _content_resume, Object.defineProperty(exports, "_dynamic_tag", {
|
|
2606
2574
|
enumerable: !0,
|
|
2607
2575
|
get: function() {
|