marko 6.0.0-next.3.64 → 6.0.0-next.3.66
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/accessor.d.ts +2 -1
- package/dist/common/accessor.debug.d.ts +2 -1
- package/dist/common/types.d.ts +1 -2
- package/dist/debug/dom.js +18 -26
- package/dist/debug/dom.mjs +18 -26
- package/dist/debug/html.js +3 -3
- package/dist/debug/html.mjs +3 -3
- package/dist/dom.js +128 -134
- package/dist/dom.mjs +128 -134
- package/dist/html.js +6 -6
- package/dist/html.mjs +6 -6
- package/dist/translator/index.js +15 -6
- package/package.json +2 -2
package/dist/html.js
CHANGED
@@ -1141,9 +1141,9 @@ function hoist(scopeId, id) {
|
|
1141
1141
|
}
|
1142
1142
|
function resumeClosestBranch(scopeId) {
|
1143
1143
|
let branchId = $chunk.context?.[branchIdKey];
|
1144
|
-
branchId !== void 0 && branchId !== scopeId &&
|
1145
|
-
|
1146
|
-
);
|
1144
|
+
branchId !== void 0 && branchId !== scopeId && writeScope(scopeId, {
|
1145
|
+
g: branchId
|
1146
|
+
});
|
1147
1147
|
}
|
1148
1148
|
var branchIdKey = Symbol();
|
1149
1149
|
function resumeForOf(list, cb, scopeId, accessor) {
|
@@ -1789,7 +1789,7 @@ var DEFAULT_RUNTIME_ID = "M", DEFAULT_RENDER_ID = "_";
|
|
1789
1789
|
var voidElementsReg = /^(?:area|b(?:ase|r)|col|embed|hr|i(?:mg|nput)|link|meta|param|source|track|wbr)$/;
|
1790
1790
|
function dynamicTagId(tagName) {
|
1791
1791
|
let normalizedRenderer = normalizeDynamicRenderer(tagName);
|
1792
|
-
return normalizedRenderer?.
|
1792
|
+
return normalizedRenderer?.h || normalizedRenderer;
|
1793
1793
|
}
|
1794
1794
|
var dynamicTagInput = (scopeId, accessor, tag, input, content) => {
|
1795
1795
|
if (!tag && !content) {
|
@@ -1862,7 +1862,7 @@ var dynamicTagInput = (scopeId, accessor, tag, input, content) => {
|
|
1862
1862
|
), result;
|
1863
1863
|
};
|
1864
1864
|
function createContent(id, fn) {
|
1865
|
-
return fn.
|
1865
|
+
return fn.h = id, fn;
|
1866
1866
|
}
|
1867
1867
|
function registerContent(id, fn, scopeId) {
|
1868
1868
|
return register2(createContent(id, fn), id, scopeId);
|
@@ -1889,7 +1889,7 @@ var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap()
|
|
1889
1889
|
writeScript,
|
1890
1890
|
nextScopeId,
|
1891
1891
|
isTagsAPI(fn) {
|
1892
|
-
return !!fn.
|
1892
|
+
return !!fn.h;
|
1893
1893
|
},
|
1894
1894
|
patchDynamicTag,
|
1895
1895
|
writeSetScopeForComponent(m5c) {
|
package/dist/html.mjs
CHANGED
@@ -1060,9 +1060,9 @@ function hoist(scopeId, id) {
|
|
1060
1060
|
}
|
1061
1061
|
function resumeClosestBranch(scopeId) {
|
1062
1062
|
let branchId = $chunk.context?.[branchIdKey];
|
1063
|
-
branchId !== void 0 && branchId !== scopeId &&
|
1064
|
-
|
1065
|
-
);
|
1063
|
+
branchId !== void 0 && branchId !== scopeId && writeScope(scopeId, {
|
1064
|
+
g: branchId
|
1065
|
+
});
|
1066
1066
|
}
|
1067
1067
|
var branchIdKey = Symbol();
|
1068
1068
|
function resumeForOf(list, cb, scopeId, accessor) {
|
@@ -1708,7 +1708,7 @@ var DEFAULT_RUNTIME_ID = "M", DEFAULT_RENDER_ID = "_";
|
|
1708
1708
|
var voidElementsReg = /^(?:area|b(?:ase|r)|col|embed|hr|i(?:mg|nput)|link|meta|param|source|track|wbr)$/;
|
1709
1709
|
function dynamicTagId(tagName) {
|
1710
1710
|
let normalizedRenderer = normalizeDynamicRenderer(tagName);
|
1711
|
-
return normalizedRenderer?.
|
1711
|
+
return normalizedRenderer?.h || normalizedRenderer;
|
1712
1712
|
}
|
1713
1713
|
var dynamicTagInput = (scopeId, accessor, tag, input, content) => {
|
1714
1714
|
if (!tag && !content) {
|
@@ -1781,7 +1781,7 @@ var dynamicTagInput = (scopeId, accessor, tag, input, content) => {
|
|
1781
1781
|
), result;
|
1782
1782
|
};
|
1783
1783
|
function createContent(id, fn) {
|
1784
|
-
return fn.
|
1784
|
+
return fn.h = id, fn;
|
1785
1785
|
}
|
1786
1786
|
function registerContent(id, fn, scopeId) {
|
1787
1787
|
return register2(createContent(id, fn), id, scopeId);
|
@@ -1808,7 +1808,7 @@ var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap()
|
|
1808
1808
|
writeScript,
|
1809
1809
|
nextScopeId,
|
1810
1810
|
isTagsAPI(fn) {
|
1811
|
-
return !!fn.
|
1811
|
+
return !!fn.h;
|
1812
1812
|
},
|
1813
1813
|
patchDynamicTag,
|
1814
1814
|
writeSetScopeForComponent(m5c) {
|
package/dist/translator/index.js
CHANGED
@@ -28,8 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
29
|
|
30
30
|
// src/translator/index.ts
|
31
|
-
var
|
32
|
-
__export(
|
31
|
+
var index_exports = {};
|
32
|
+
__export(index_exports, {
|
33
33
|
analyze: () => analyze,
|
34
34
|
getRuntimeEntryFiles: () => getRuntimeEntryFiles,
|
35
35
|
internalEntryBuilder: () => entry_builder_default,
|
@@ -39,7 +39,7 @@ __export(translator_exports, {
|
|
39
39
|
transform: () => transform,
|
40
40
|
translate: () => translate
|
41
41
|
});
|
42
|
-
module.exports = __toCommonJS(
|
42
|
+
module.exports = __toCommonJS(index_exports);
|
43
43
|
|
44
44
|
// src/translator/util/runtime-info.ts
|
45
45
|
var import_package = require("../../package.json");
|
@@ -138,6 +138,7 @@ var AccessorProp = /* @__PURE__ */ ((AccessorProp3) => {
|
|
138
138
|
AccessorProp3["PlaceholderContent"] = "#PlaceholderContent";
|
139
139
|
AccessorProp3["TagVariable"] = "#TagVariable";
|
140
140
|
AccessorProp3["TagVariableChange"] = "#TagVariableChange";
|
141
|
+
AccessorProp3["ClosestBranchId"] = "#ClosestBranchId";
|
141
142
|
return AccessorProp3;
|
142
143
|
})(AccessorProp || {});
|
143
144
|
|
@@ -1452,6 +1453,7 @@ var AccessorProp2 = /* @__PURE__ */ ((AccessorProp3) => {
|
|
1452
1453
|
AccessorProp3["PlaceholderContent"] = "d";
|
1453
1454
|
AccessorProp3["TagVariable"] = "e";
|
1454
1455
|
AccessorProp3["TagVariableChange"] = "f";
|
1456
|
+
AccessorProp3["ClosestBranchId"] = "g";
|
1455
1457
|
return AccessorProp3;
|
1456
1458
|
})(AccessorProp2 || {});
|
1457
1459
|
|
@@ -2253,7 +2255,11 @@ function getSignal(section, referencedBindings, name2 = generateSignalName(refer
|
|
2253
2255
|
return callRuntime(
|
2254
2256
|
"intersection",
|
2255
2257
|
import_compiler17.types.numericLiteral(id),
|
2256
|
-
getSignalFn(
|
2258
|
+
getSignalFn(
|
2259
|
+
signal,
|
2260
|
+
[scopeIdentifier],
|
2261
|
+
signal.renderReferencedBindings
|
2262
|
+
),
|
2257
2263
|
scopeOffset || referencedBindings.length > 2 ? import_compiler17.types.numericLiteral(referencedBindings.length - 1) : void 0,
|
2258
2264
|
scopeOffset && getScopeAccessorLiteral(scopeOffset)
|
2259
2265
|
);
|
@@ -2514,7 +2520,9 @@ function addRenderReferences(signal, referencedBindings) {
|
|
2514
2520
|
);
|
2515
2521
|
}
|
2516
2522
|
function addValue(targetSection, referencedBindings, signal, value, scope = scopeIdentifier) {
|
2517
|
-
getSignal(targetSection, referencedBindings)
|
2523
|
+
const parentSignal = getSignal(targetSection, referencedBindings);
|
2524
|
+
addRenderReferences(parentSignal, referencedBindings);
|
2525
|
+
parentSignal.values.push({
|
2518
2526
|
signal,
|
2519
2527
|
value,
|
2520
2528
|
scope
|
@@ -8856,7 +8864,8 @@ var referenced_identifier_default = {
|
|
8856
8864
|
scopeIdentifier,
|
8857
8865
|
import_compiler51.types.numericLiteral(exprId)
|
8858
8866
|
])
|
8859
|
-
)
|
8867
|
+
),
|
8868
|
+
false
|
8860
8869
|
);
|
8861
8870
|
}
|
8862
8871
|
identifier.replaceWith(
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "marko",
|
3
|
-
"version": "6.0.0-next.3.
|
3
|
+
"version": "6.0.0-next.3.66",
|
4
4
|
"description": "Optimized runtime for Marko templates.",
|
5
5
|
"keywords": [
|
6
6
|
"api",
|
@@ -48,7 +48,7 @@
|
|
48
48
|
"build": "node -r ~ts ./scripts/bundle.ts"
|
49
49
|
},
|
50
50
|
"dependencies": {
|
51
|
-
"@marko/compiler": "^5.39.
|
51
|
+
"@marko/compiler": "^5.39.14",
|
52
52
|
"csstype": "^3.1.3",
|
53
53
|
"magic-string": "^0.30.17"
|
54
54
|
},
|