marko 6.4.8 → 6.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/constants/closure-signal-prop.d.ts +1 -1
- package/dist/common/constants/closure-signal-prop.debug.d.ts +1 -1
- package/dist/debug/dom/catch.feat.js +1 -1
- package/dist/debug/dom/catch.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-D8znnhpf.js → dom-QkYva5Qx.js} +35 -61
- package/dist/debug/{dom-CFCBDift.mjs → dom-VKjkbuuo.mjs} +36 -50
- package/dist/debug/dom.js +4 -4
- package/dist/debug/dom.mjs +4 -4
- package/dist/debug/html.js +20 -13
- package/dist/debug/html.mjs +18 -11
- package/dist/dom/catch.feat.js +3 -3
- package/dist/dom/catch.feat.mjs +1 -1
- package/dist/dom/compat.d.ts +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/dom.d.ts +2 -3
- package/dist/dom/dynamic-tag-script.feat.js +2 -2
- package/dist/dom/dynamic-tag-script.feat.mjs +1 -1
- package/dist/dom/dynamic-tag-var.feat.js +3 -3
- 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 +3 -3
- package/dist/dom/placeholder.feat.mjs +1 -1
- package/dist/dom/resume.d.ts +1 -1
- package/dist/dom/scope.d.ts +1 -1
- package/dist/dom/signals.d.ts +1 -1
- package/dist/{dom-CVAevsbz.mjs → dom-DtKQb840.mjs} +19 -33
- package/dist/{dom-Bpkm72vV.js → dom-IujlfJ6b.js} +82 -106
- package/dist/dom.js +31 -31
- package/dist/dom.mjs +4 -4
- package/dist/html/serializer.d.ts +1 -1
- package/dist/html/writer.d.ts +3 -3
- package/dist/html.d.ts +1 -1
- package/dist/html.js +21 -15
- package/dist/html.mjs +21 -15
- package/dist/translator/core/show.d.ts +3 -4
- package/dist/translator/index.js +998 -967
- package/dist/translator/util/bindings.d.ts +6 -5
- package/dist/translator/util/branch-tag.d.ts +1 -1
- package/dist/translator/util/constants/slot-kind.d.ts +1 -1
- package/dist/translator/util/module-registrations.d.ts +1 -1
- package/dist/translator/util/optional.d.ts +1 -0
- package/dist/translator/util/params-tree.d.ts +3 -3
- package/dist/translator/util/reasons.d.ts +2 -2
- package/dist/translator/util/references.d.ts +13 -10
- package/dist/translator/util/replace-with-statements.d.ts +4 -0
- package/dist/translator/util/runtime.d.ts +1 -0
- package/dist/translator/util/scope-accessor.d.ts +1 -1
- package/dist/translator/util/sections.d.ts +38 -14
- package/dist/translator/util/signals.d.ts +3 -11
- package/dist/translator/util/slots.d.ts +1 -1
- package/dist/translator/util/solve-reasons.d.ts +5 -0
- package/dist/translator/util/static-text.d.ts +1 -0
- package/dist/translator/util/structure.d.ts +3 -2
- package/dist/translator/util/tag-import.d.ts +0 -2
- package/dist/translator/util/write-guard.d.ts +2 -0
- package/dist/translator/visitors/placeholder.d.ts +4 -4
- package/package.json +3 -3
- package/dist/translator/visitors/constants/sibling-text.d.ts +0 -6
|
@@ -46,7 +46,7 @@ let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "
|
|
|
46
46
|
if (node === lastChild && !newNode) return;
|
|
47
47
|
}
|
|
48
48
|
let newFirstChild = scope[accessor] = newContent.firstChild || newContent.appendChild(new Text()), newLastChild = scope["H" + accessor] = newContent.lastChild, branch = scope.F;
|
|
49
|
-
branch?.S === firstChild && (branch.S = newFirstChild), branch?.K === lastChild && (branch.K = newLastChild),
|
|
49
|
+
branch?.S === firstChild && (branch.S = newFirstChild), branch?.K === lastChild && (branch.K = newLastChild), firstChild.before(...newContent.childNodes), removeChildNodes(firstChild, lastChild);
|
|
50
50
|
}
|
|
51
51
|
}), R = /[\p{L}\p{N}]/gu, inputType = "", controllableScripts = {}, controllableSpreadHelpers = {}, _if = /*@__PURE__*/ withBranches((nodeAccessor, ...branchesArgs) => {
|
|
52
52
|
nodeAccessor = decodeAccessor(nodeAccessor);
|
|
@@ -55,19 +55,14 @@ let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "
|
|
|
55
55
|
return (scope, newBranch) => {
|
|
56
56
|
newBranch !== (scope[branchAccessor] ?? (scope["A" + nodeAccessor] && 0)) && setBranch(scope, nodeAccessor, branches[scope[branchAccessor] = newBranch], createAndSetupBranch);
|
|
57
57
|
};
|
|
58
|
-
}), _show = /*@__PURE__*/ withBranches((nodeAccessor, startNodeAccessor
|
|
59
|
-
nodeAccessor = decodeAccessor(nodeAccessor), startNodeAccessor !== void 0 && (startNodeAccessor = decodeAccessor(startNodeAccessor))
|
|
58
|
+
}), _show = /*@__PURE__*/ withBranches((nodeAccessor, startNodeAccessor) => {
|
|
59
|
+
nodeAccessor = decodeAccessor(nodeAccessor), startNodeAccessor !== void 0 && (startNodeAccessor = decodeAccessor(startNodeAccessor));
|
|
60
60
|
let rangeAccessor = "A" + nodeAccessor;
|
|
61
61
|
return (scope, display) => {
|
|
62
62
|
let referenceNode = scope[nodeAccessor], onlyChild = referenceNode.nodeType === 1, parentNode = onlyChild ? referenceNode : referenceNode.parentNode, range = scope[rangeAccessor];
|
|
63
|
-
range || (range = scope[rangeAccessor] = {}, range.S = onlyChild ? parentNode.
|
|
63
|
+
range || (range = scope[rangeAccessor] = {}, range.S = onlyChild ? parentNode.insertBefore(new Text(), parentNode.firstChild) : startNodeAccessor ? scope[startNodeAccessor] : referenceNode.previousSibling);
|
|
64
64
|
let startNode = range.S;
|
|
65
|
-
|
|
66
|
-
let wrapper = startNode;
|
|
67
|
-
wrapper.firstChild || wrapper.appendChild(new Text()), range = scope[rangeAccessor] = {}, range.S = startNode = wrapper.firstChild, range.K = wrapper.lastChild, wrapper.replaceWith(...wrapper.childNodes);
|
|
68
|
-
}
|
|
69
|
-
let inDom = onlyChild ? !!parentNode.firstChild : startNode.parentNode === parentNode;
|
|
70
|
-
display ? inDom || insertBranchBefore(range, parentNode, onlyChild ? null : referenceNode) : inDom && (onlyChild && (range.S = parentNode.firstChild, range.K = parentNode.lastChild), tempDetachBranch(range));
|
|
65
|
+
range.L && startNode.tagName === "T" ? display && startNode.replaceWith(range.S = new Text(), ...startNode.childNodes) : display ? startNode.parentNode !== parentNode && parentNode.insertBefore(startNode.parentNode, onlyChild ? null : referenceNode) : startNode.parentNode === parentNode && (range.K = onlyChild ? parentNode.lastChild : referenceNode.previousSibling, detachBranch(range));
|
|
71
66
|
};
|
|
72
67
|
}), _dynamic_tag = /*@__PURE__*/ withBranches((nodeAccessor, getContent, getTagVar, inputIsArgs) => {
|
|
73
68
|
let scopeOffsetAccessor = getTagVar && decodeAccessor(nodeAccessor + 1);
|
|
@@ -389,9 +384,9 @@ function removeAndDestroyBranch(branch) {
|
|
|
389
384
|
destroyBranch(branch), removeChildNodes(branch.S, branch.K);
|
|
390
385
|
}
|
|
391
386
|
function insertBranchBefore(branch, parentNode, nextSibling) {
|
|
392
|
-
|
|
387
|
+
parentNode.insertBefore(branch.S.parentNode || branch.S, nextSibling);
|
|
393
388
|
}
|
|
394
|
-
function
|
|
389
|
+
function detachBranch(branch) {
|
|
395
390
|
let fragment = new DocumentFragment();
|
|
396
391
|
fragment.namespaceURI = branch.S.parentNode.namespaceURI, insertChildNodes(fragment, null, branch.S, branch.K);
|
|
397
392
|
}
|
|
@@ -646,7 +641,7 @@ function runResumeEffects(render) {
|
|
|
646
641
|
isResuming = 0;
|
|
647
642
|
}
|
|
648
643
|
}
|
|
649
|
-
function getRegisteredWithScope(
|
|
644
|
+
function getRegisteredWithScope(scope, id) {
|
|
650
645
|
return scope ? _resumed[id](scope) : _resumed[id];
|
|
651
646
|
}
|
|
652
647
|
function _var_resume(id, signal) {
|
|
@@ -718,12 +713,12 @@ function _content_closures(renderer, closureFns) {
|
|
|
718
713
|
};
|
|
719
714
|
}
|
|
720
715
|
function createCloneableHTML(html, ns) {
|
|
721
|
-
let { firstChild, lastChild } = parseHTML(html, ns), parent =
|
|
716
|
+
let { firstChild, lastChild } = parseHTML(html, ns), parent = new DocumentFragment();
|
|
722
717
|
return insertChildNodes(parent, null, firstChild, lastChild), firstChild === lastChild && firstChild.nodeType < 8 ? (branch, walks) => {
|
|
723
718
|
walk(branch.S = branch.K = firstChild.cloneNode(!0), walks, branch);
|
|
724
719
|
} : (branch, walks) => {
|
|
725
720
|
let clone = parent.cloneNode(!0);
|
|
726
|
-
walk(clone.firstChild, walks, branch), branch.S = clone.firstChild, branch.K = clone.lastChild;
|
|
721
|
+
clone.namespaceURI = ns, walk(clone.firstChild, walks, branch), branch.S = clone.firstChild, branch.K = clone.lastChild;
|
|
727
722
|
};
|
|
728
723
|
}
|
|
729
724
|
//#endregion
|
|
@@ -847,25 +842,16 @@ function _lifecycle(scope, thisObj, index = 0) {
|
|
|
847
842
|
instance ? (Object.assign(instance, thisObj), instance.onUpdate?.()) : (scope[accessor] = thisObj, Object.assign(thisObj, thisObj.onMount?.()), trackAbort(scope, accessor, (_) => thisObj.onDestroy?.()));
|
|
848
843
|
}
|
|
849
844
|
function removeChildNodes(startNode, endNode) {
|
|
850
|
-
|
|
851
|
-
for (; startNode !== stop;) {
|
|
845
|
+
for (endNode = endNode.nextSibling; startNode !== endNode;) {
|
|
852
846
|
let next = startNode.nextSibling;
|
|
853
847
|
startNode.remove(), startNode = next;
|
|
854
848
|
}
|
|
855
849
|
}
|
|
856
850
|
function insertChildNodes(parentNode, referenceNode, startNode, endNode) {
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
for (; startNode !== stop;) {
|
|
861
|
-
let next = startNode.nextSibling;
|
|
862
|
-
parentNode.insertBefore(startNode, referenceNode), startNode = next;
|
|
863
|
-
}
|
|
851
|
+
for (endNode = endNode.nextSibling; startNode !== endNode;) {
|
|
852
|
+
let next = startNode.nextSibling;
|
|
853
|
+
parentNode.insertBefore(startNode, referenceNode), startNode = next;
|
|
864
854
|
}
|
|
865
|
-
return parentNode;
|
|
866
|
-
}
|
|
867
|
-
function toInsertNode(startNode, endNode) {
|
|
868
|
-
return startNode === endNode ? startNode : insertChildNodes(new DocumentFragment(), null, startNode, endNode);
|
|
869
855
|
}
|
|
870
856
|
//#endregion
|
|
871
857
|
//#region src/dom/resolve-cursor-position.ts
|
|
@@ -1103,7 +1089,7 @@ function _await_promise(nodeAccessor, params) {
|
|
|
1103
1089
|
}
|
|
1104
1090
|
}
|
|
1105
1091
|
})), countAwait(awaitCounter, scope, (_) => {
|
|
1106
|
-
awaitBranch.V || (awaitBranch.S.parentNode.insertBefore(scope[nodeAccessor], awaitBranch.S),
|
|
1092
|
+
awaitBranch.V || (awaitBranch.S.parentNode.insertBefore(scope[nodeAccessor], awaitBranch.S), detachBranch(tryBranch));
|
|
1107
1093
|
})) : awaitCounter = startAwait(scope, tryBranch));
|
|
1108
1094
|
let thisPromise = scope[promiseAccessor] = promise.then((data) => {
|
|
1109
1095
|
if (thisPromise === scope[promiseAccessor]) {
|
|
@@ -1134,7 +1120,7 @@ function startAwait(scope, tryBranch = findTryWithPlaceholder(scope)) {
|
|
|
1134
1120
|
if (!tryBranch) return;
|
|
1135
1121
|
let awaitCounter = tryBranch.O;
|
|
1136
1122
|
return awaitCounter?.i || (awaitCounter = createAwaitCounter(tryBranch, (_) => dismissPlaceholder(tryBranch))), countAwait(awaitCounter, tryBranch, (_) => {
|
|
1137
|
-
(tryBranch.P = createAndSetupBranch(tryBranch.$, tryBranch.Q(), tryBranch._, tryBranch.S.parentNode)).PT = tryBranch, insertBranchBefore(tryBranch.P, tryBranch.S.parentNode, tryBranch.S),
|
|
1123
|
+
(tryBranch.P = createAndSetupBranch(tryBranch.$, tryBranch.Q(), tryBranch._, tryBranch.S.parentNode)).PT = tryBranch, insertBranchBefore(tryBranch.P, tryBranch.S.parentNode, tryBranch.S), detachBranch(tryBranch);
|
|
1138
1124
|
}), awaitCounter;
|
|
1139
1125
|
}
|
|
1140
1126
|
function countAwait(awaitCounter, scope, render) {
|
|
@@ -1171,7 +1157,7 @@ function runPendingEffects(tryBranch) {
|
|
|
1171
1157
|
}
|
|
1172
1158
|
function dismissPlaceholder(tryBranch) {
|
|
1173
1159
|
let placeholderBranch = tryBranch.P;
|
|
1174
|
-
placeholderBranch && (tryBranch.P = 0,
|
|
1160
|
+
placeholderBranch && (tryBranch.P = 0, insertBranchBefore(tryBranch, placeholderBranch.S.parentNode, placeholderBranch.S), removeAndDestroyBranch(placeholderBranch));
|
|
1175
1161
|
}
|
|
1176
1162
|
function _try(nodeAccessor, template, walks, setup, placeholderContent, catchContent) {
|
|
1177
1163
|
nodeAccessor = decodeAccessor(nodeAccessor);
|
|
@@ -1230,7 +1216,7 @@ function reorderKeyed(newScopes, start, newEnd, parentNode, afterReference) {
|
|
|
1230
1216
|
}
|
|
1231
1217
|
}
|
|
1232
1218
|
for (hi = tails[tail], lo = tail + 1; lo-- > 0;) tails[lo] = hi, hi = pred[hi];
|
|
1233
|
-
for (let i = diffLen; i--;) ~tail && i === tails[tail] ? tail-- : insertBranchBefore(newScopes[start + i], parentNode, afterReference), afterReference = newScopes[start + i].S;
|
|
1219
|
+
for (let i = diffLen; i--;) ~tail && i === tails[tail] ? tail-- : (~sources[i] && detachBranch(newScopes[start + i]), insertBranchBefore(newScopes[start + i], parentNode, afterReference)), afterReference = newScopes[start + i].S;
|
|
1234
1220
|
}
|
|
1235
1221
|
function bySecondArg(_item, index) {
|
|
1236
1222
|
return index;
|
|
@@ -1239,4 +1225,4 @@ function byFirstArg(name) {
|
|
|
1239
1225
|
return name;
|
|
1240
1226
|
}
|
|
1241
1227
|
//#endregion
|
|
1242
|
-
export { _attr_style_items as $,
|
|
1228
|
+
export { _attr_style_items as $, _on as $t, _attr_input_value as A, _closure_get as At, _controllable_select as B, _let as Bt, _attr_details_or_dialog_open_script as C, getRegisteredWithScope as Ct, _attr_input_checkedValue_script as D, readyFailed as Dt, _attr_input_checkedValue_default as E, ready as Et, _attr_select_value as F, _global_read as Ft, _attr_class as G, _script as Gt, controllableScripts as H, _or as Ht, _attr_select_value_default as I, _hoist as It, _attr_class_names as J, _assert_init as Jt, _attr_class_item as K, _var as Kt, _attr_select_value_script as L, _hoist_resume as Lt, _attr_input_value_default as M, _el_read as Mt, _attr_input_value_dynamic_default as N, _for_closure as Nt, _attr_input_checked_default as O, withLazy as Ot, _attr_input_value_script as P, _for_selector as Pt, _attr_style_item as Q, syncGen as Qt, _controllable_input as R, _id as Rt, _attr_details_or_dialog_open_default as S, _var_resume as St, _attr_input_checkedValue as T, initEmbedded as Tt, controllableSpreadHelpers as U, _return as Ut, _controllable_textarea as V, _let_change as Vt, _attr as W, _return_change as Wt, _attr_nonce as X, insertBranchBefore as Xt, _attr_content as Y, destroyBranch as Yt, _attr_style as Z, removeAndDestroyBranch as Zt, patchDynamicTag as _, _assert_class_toggles as _n, createBranch as _t, _for_in as a, prepareEffects as an, _html as at, startAwait as b, _call as bn, _el as bt, _for_to as c, queueRender as cn, _style_shell as ct, _for_until_unkeyed as d, runEffects as dn, _to_text as dt, $signal as en, _attrs as et, _if as f, runId as fn, _content as ft, installDynamicTagVar as g, forUntil as gn, createAndSetupBranch as gt, dynamicTagScript as h, forTo as hn, _return_setup as ht, _dynamic_tag_content as i, installCatch as in, _attrs_script as it, _attr_input_value_attribute_default as j, _const as jt, _attr_input_checked_script as k, _closure as kt, _for_to_unkeyed as l, rendering as ln, _text as lt, _try as m, forOf as mn, _content_resume as mt, _await_promise as n, createBranchRenders as nn, _attrs_partial as nt, _for_of as o, queueAsyncRender as on, _lifecycle as ot, _show as p, forIn as pn, _content_closures as pt, _attr_class_items as q, _var_change as qt, _dynamic_tag as r, installBranchRenders as rn, _attrs_partial_content as rt, _for_of_unkeyed as s, queueEffect as sn, _style_rule_item as st, _await_content as t, $signalReset as tn, _attrs_content as tt, _for_until as u, run as un, _text_content as ut, renderCatch as v, _assert_hoist as vn, setupBranch as vt, _attr_input_checked as w, init as wt, _attr_details_or_dialog_open as x, withBranches as xn, _resumed as xt, runPendingEffects as y, _hoist_read_error as yn, _dynamic_tag_var_resume as yt, _controllable_open as z, _if_closure as zt };
|