marko 6.0.0-next.3.61 → 6.0.0-next.3.62
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 +8 -7
- package/dist/common/accessor.debug.d.ts +7 -6
- package/dist/debug/dom.js +20 -20
- package/dist/debug/dom.mjs +20 -20
- package/dist/debug/html.js +4 -4
- package/dist/debug/html.mjs +4 -4
- package/dist/dom.js +137 -137
- package/dist/dom.mjs +137 -137
- package/dist/html.js +7 -7
- package/dist/html.mjs +7 -7
- package/dist/translator/index.js +14 -12
- package/package.json +1 -1
@@ -12,13 +12,14 @@ export declare enum AccessorPrefix {
|
|
12
12
|
LifecycleAbortController = "k",
|
13
13
|
LoopScopeArray = "l",
|
14
14
|
LoopScopeMap = "m",
|
15
|
-
Promise = "n"
|
15
|
+
Promise = "n",
|
16
|
+
TagVariableChange = "o"
|
16
17
|
}
|
17
18
|
export declare enum AccessorProp {
|
18
|
-
BranchAccessor = "
|
19
|
-
CatchContent = "
|
20
|
-
PlaceholderBranch = "
|
21
|
-
PlaceholderContent = "
|
22
|
-
TagVariable = "
|
23
|
-
TagVariableChange = "
|
19
|
+
BranchAccessor = "a",
|
20
|
+
CatchContent = "b",
|
21
|
+
PlaceholderBranch = "c",
|
22
|
+
PlaceholderContent = "d",
|
23
|
+
TagVariable = "e",
|
24
|
+
TagVariableChange = "f"
|
24
25
|
}
|
@@ -12,13 +12,14 @@ export declare enum AccessorPrefix {
|
|
12
12
|
LifecycleAbortController = "LifecycleAbortController:",
|
13
13
|
LoopScopeArray = "LoopScopeArray:",
|
14
14
|
LoopScopeMap = "LoopScopeMap:",
|
15
|
-
Promise = "Promise:"
|
15
|
+
Promise = "Promise:",
|
16
|
+
TagVariableChange = "TagVariableChange:"
|
16
17
|
}
|
17
18
|
export declare enum AccessorProp {
|
18
|
-
BranchAccessor = "
|
19
|
-
CatchContent = "
|
19
|
+
BranchAccessor = "#BranchAccessor",
|
20
|
+
CatchContent = "#CatchContent",
|
20
21
|
PlaceholderBranch = "#PlaceholderBranch",
|
21
|
-
PlaceholderContent = "
|
22
|
-
TagVariable = "
|
23
|
-
TagVariableChange = "
|
22
|
+
PlaceholderContent = "#PlaceholderContent",
|
23
|
+
TagVariable = "#TagVariable",
|
24
|
+
TagVariableChange = "#TagVariableChange"
|
24
25
|
}
|
package/dist/debug/dom.js
CHANGED
@@ -1437,7 +1437,7 @@ function state(valueAccessor, fn) {
|
|
1437
1437
|
valueAccessor.lastIndexOf("/")
|
1438
1438
|
);
|
1439
1439
|
}
|
1440
|
-
const valueChangeAccessor = "
|
1440
|
+
const valueChangeAccessor = "TagVariableChange:" /* TagVariableChange */ + valueAccessor;
|
1441
1441
|
const update = (scope, value2) => {
|
1442
1442
|
if (scope[valueAccessor] !== value2) {
|
1443
1443
|
scope[valueAccessor] = value2;
|
@@ -1575,13 +1575,13 @@ function closure(valueAccessor, fn, getOwnerScope) {
|
|
1575
1575
|
};
|
1576
1576
|
}
|
1577
1577
|
function setTagVar(scope, childAccessor, tagVarSignal2) {
|
1578
|
-
scope[childAccessor]["
|
1578
|
+
scope[childAccessor]["#TagVariable" /* TagVariable */] = (value2) => tagVarSignal2(scope, value2);
|
1579
1579
|
}
|
1580
|
-
var tagVarSignal = (scope, value2) => scope["
|
1580
|
+
var tagVarSignal = (scope, value2) => scope["#TagVariable" /* TagVariable */]?.(value2);
|
1581
1581
|
function setTagVarChange(scope, changeHandler) {
|
1582
|
-
scope["
|
1582
|
+
scope["#TagVariableChange" /* TagVariableChange */] = changeHandler;
|
1583
1583
|
}
|
1584
|
-
var tagVarSignalChange = (scope, value2) => scope["
|
1584
|
+
var tagVarSignalChange = (scope, value2) => scope["#TagVariableChange" /* TagVariableChange */]?.(value2);
|
1585
1585
|
var tagIdsByGlobal = /* @__PURE__ */ new WeakMap();
|
1586
1586
|
function nextTagId({ $global }) {
|
1587
1587
|
const id = tagIdsByGlobal.get($global) || 0;
|
@@ -1624,7 +1624,7 @@ function awaitTag(nodeAccessor, renderer) {
|
|
1624
1624
|
let awaitBranch = scope[branchAccessor];
|
1625
1625
|
const referenceNode = scope[nodeAccessor];
|
1626
1626
|
const namespaceNode = (awaitBranch?.___startNode ?? referenceNode).parentNode;
|
1627
|
-
while (tryBranch && !tryBranch["
|
1627
|
+
while (tryBranch && !tryBranch["#PlaceholderContent" /* PlaceholderContent */]) {
|
1628
1628
|
tryBranch = tryBranch.___parentBranch;
|
1629
1629
|
}
|
1630
1630
|
const thisPromise = scope[promiseAccessor] = promise.then((data2) => {
|
@@ -1671,7 +1671,7 @@ function awaitTag(nodeAccessor, renderer) {
|
|
1671
1671
|
}
|
1672
1672
|
}).catch((error) => {
|
1673
1673
|
let tryBranch2 = scope.___closestBranch;
|
1674
|
-
while (tryBranch2 && !tryBranch2["
|
1674
|
+
while (tryBranch2 && !tryBranch2["#CatchContent" /* CatchContent */]) {
|
1675
1675
|
tryBranch2 = tryBranch2.___parentBranch;
|
1676
1676
|
}
|
1677
1677
|
if (!tryBranch2) {
|
@@ -1681,12 +1681,12 @@ function awaitTag(nodeAccessor, renderer) {
|
|
1681
1681
|
} else {
|
1682
1682
|
setConditionalRenderer(
|
1683
1683
|
tryBranch2._,
|
1684
|
-
tryBranch2["
|
1685
|
-
tryBranch2["
|
1684
|
+
tryBranch2["#BranchAccessor" /* BranchAccessor */],
|
1685
|
+
tryBranch2["#CatchContent" /* CatchContent */],
|
1686
1686
|
createAndSetupBranch
|
1687
1687
|
);
|
1688
|
-
tryBranch2["
|
1689
|
-
tryBranch2._["ConditionalScope:" /* ConditionalScope */ + tryBranch2["
|
1688
|
+
tryBranch2["#CatchContent" /* CatchContent */].___params?.(
|
1689
|
+
tryBranch2._["ConditionalScope:" /* ConditionalScope */ + tryBranch2["#BranchAccessor" /* BranchAccessor */]],
|
1690
1690
|
[error]
|
1691
1691
|
);
|
1692
1692
|
}
|
@@ -1698,7 +1698,7 @@ function awaitTag(nodeAccessor, renderer) {
|
|
1698
1698
|
if (tryBranch.___pendingAsyncCount && !tryBranch.___destroyed) {
|
1699
1699
|
const placeholderBranch = tryBranch["#PlaceholderBranch" /* PlaceholderBranch */] = createAndSetupBranch(
|
1700
1700
|
scope.$global,
|
1701
|
-
tryBranch["
|
1701
|
+
tryBranch["#PlaceholderContent" /* PlaceholderContent */],
|
1702
1702
|
tryBranch._,
|
1703
1703
|
tryBranch.___startNode.parentNode
|
1704
1704
|
);
|
@@ -1734,9 +1734,9 @@ function createTry(nodeAccessor, tryContent) {
|
|
1734
1734
|
}
|
1735
1735
|
const branch = scope[branchAccessor];
|
1736
1736
|
if (branch) {
|
1737
|
-
branch["
|
1738
|
-
branch["
|
1739
|
-
branch["
|
1737
|
+
branch["#BranchAccessor" /* BranchAccessor */] = nodeAccessor;
|
1738
|
+
branch["#CatchContent" /* CatchContent */] = normalizeDynamicRenderer(input.catch);
|
1739
|
+
branch["#PlaceholderContent" /* PlaceholderContent */] = normalizeDynamicRenderer(
|
1740
1740
|
input.placeholder
|
1741
1741
|
);
|
1742
1742
|
}
|
@@ -2048,19 +2048,19 @@ var enableCatch = () => {
|
|
2048
2048
|
runRender2(render);
|
2049
2049
|
} catch (error) {
|
2050
2050
|
let branch = render.___scope.___closestBranch;
|
2051
|
-
while (branch && !branch["
|
2051
|
+
while (branch && !branch["#CatchContent" /* CatchContent */])
|
2052
2052
|
branch = branch.___parentBranch;
|
2053
2053
|
if (!branch) {
|
2054
2054
|
throw error;
|
2055
2055
|
} else {
|
2056
2056
|
setConditionalRenderer(
|
2057
2057
|
branch._,
|
2058
|
-
branch["
|
2059
|
-
branch["
|
2058
|
+
branch["#BranchAccessor" /* BranchAccessor */],
|
2059
|
+
branch["#CatchContent" /* CatchContent */],
|
2060
2060
|
createAndSetupBranch
|
2061
2061
|
);
|
2062
|
-
branch["
|
2063
|
-
branch._["ConditionalScope:" /* ConditionalScope */ + branch["
|
2062
|
+
branch["#CatchContent" /* CatchContent */].___params?.(
|
2063
|
+
branch._["ConditionalScope:" /* ConditionalScope */ + branch["#BranchAccessor" /* BranchAccessor */]],
|
2064
2064
|
[error]
|
2065
2065
|
);
|
2066
2066
|
}
|
package/dist/debug/dom.mjs
CHANGED
@@ -1349,7 +1349,7 @@ function state(valueAccessor, fn) {
|
|
1349
1349
|
valueAccessor.lastIndexOf("/")
|
1350
1350
|
);
|
1351
1351
|
}
|
1352
|
-
const valueChangeAccessor = "
|
1352
|
+
const valueChangeAccessor = "TagVariableChange:" /* TagVariableChange */ + valueAccessor;
|
1353
1353
|
const update = (scope, value2) => {
|
1354
1354
|
if (scope[valueAccessor] !== value2) {
|
1355
1355
|
scope[valueAccessor] = value2;
|
@@ -1487,13 +1487,13 @@ function closure(valueAccessor, fn, getOwnerScope) {
|
|
1487
1487
|
};
|
1488
1488
|
}
|
1489
1489
|
function setTagVar(scope, childAccessor, tagVarSignal2) {
|
1490
|
-
scope[childAccessor]["
|
1490
|
+
scope[childAccessor]["#TagVariable" /* TagVariable */] = (value2) => tagVarSignal2(scope, value2);
|
1491
1491
|
}
|
1492
|
-
var tagVarSignal = (scope, value2) => scope["
|
1492
|
+
var tagVarSignal = (scope, value2) => scope["#TagVariable" /* TagVariable */]?.(value2);
|
1493
1493
|
function setTagVarChange(scope, changeHandler) {
|
1494
|
-
scope["
|
1494
|
+
scope["#TagVariableChange" /* TagVariableChange */] = changeHandler;
|
1495
1495
|
}
|
1496
|
-
var tagVarSignalChange = (scope, value2) => scope["
|
1496
|
+
var tagVarSignalChange = (scope, value2) => scope["#TagVariableChange" /* TagVariableChange */]?.(value2);
|
1497
1497
|
var tagIdsByGlobal = /* @__PURE__ */ new WeakMap();
|
1498
1498
|
function nextTagId({ $global }) {
|
1499
1499
|
const id = tagIdsByGlobal.get($global) || 0;
|
@@ -1536,7 +1536,7 @@ function awaitTag(nodeAccessor, renderer) {
|
|
1536
1536
|
let awaitBranch = scope[branchAccessor];
|
1537
1537
|
const referenceNode = scope[nodeAccessor];
|
1538
1538
|
const namespaceNode = (awaitBranch?.___startNode ?? referenceNode).parentNode;
|
1539
|
-
while (tryBranch && !tryBranch["
|
1539
|
+
while (tryBranch && !tryBranch["#PlaceholderContent" /* PlaceholderContent */]) {
|
1540
1540
|
tryBranch = tryBranch.___parentBranch;
|
1541
1541
|
}
|
1542
1542
|
const thisPromise = scope[promiseAccessor] = promise.then((data2) => {
|
@@ -1583,7 +1583,7 @@ function awaitTag(nodeAccessor, renderer) {
|
|
1583
1583
|
}
|
1584
1584
|
}).catch((error) => {
|
1585
1585
|
let tryBranch2 = scope.___closestBranch;
|
1586
|
-
while (tryBranch2 && !tryBranch2["
|
1586
|
+
while (tryBranch2 && !tryBranch2["#CatchContent" /* CatchContent */]) {
|
1587
1587
|
tryBranch2 = tryBranch2.___parentBranch;
|
1588
1588
|
}
|
1589
1589
|
if (!tryBranch2) {
|
@@ -1593,12 +1593,12 @@ function awaitTag(nodeAccessor, renderer) {
|
|
1593
1593
|
} else {
|
1594
1594
|
setConditionalRenderer(
|
1595
1595
|
tryBranch2._,
|
1596
|
-
tryBranch2["
|
1597
|
-
tryBranch2["
|
1596
|
+
tryBranch2["#BranchAccessor" /* BranchAccessor */],
|
1597
|
+
tryBranch2["#CatchContent" /* CatchContent */],
|
1598
1598
|
createAndSetupBranch
|
1599
1599
|
);
|
1600
|
-
tryBranch2["
|
1601
|
-
tryBranch2._["ConditionalScope:" /* ConditionalScope */ + tryBranch2["
|
1600
|
+
tryBranch2["#CatchContent" /* CatchContent */].___params?.(
|
1601
|
+
tryBranch2._["ConditionalScope:" /* ConditionalScope */ + tryBranch2["#BranchAccessor" /* BranchAccessor */]],
|
1602
1602
|
[error]
|
1603
1603
|
);
|
1604
1604
|
}
|
@@ -1610,7 +1610,7 @@ function awaitTag(nodeAccessor, renderer) {
|
|
1610
1610
|
if (tryBranch.___pendingAsyncCount && !tryBranch.___destroyed) {
|
1611
1611
|
const placeholderBranch = tryBranch["#PlaceholderBranch" /* PlaceholderBranch */] = createAndSetupBranch(
|
1612
1612
|
scope.$global,
|
1613
|
-
tryBranch["
|
1613
|
+
tryBranch["#PlaceholderContent" /* PlaceholderContent */],
|
1614
1614
|
tryBranch._,
|
1615
1615
|
tryBranch.___startNode.parentNode
|
1616
1616
|
);
|
@@ -1646,9 +1646,9 @@ function createTry(nodeAccessor, tryContent) {
|
|
1646
1646
|
}
|
1647
1647
|
const branch = scope[branchAccessor];
|
1648
1648
|
if (branch) {
|
1649
|
-
branch["
|
1650
|
-
branch["
|
1651
|
-
branch["
|
1649
|
+
branch["#BranchAccessor" /* BranchAccessor */] = nodeAccessor;
|
1650
|
+
branch["#CatchContent" /* CatchContent */] = normalizeDynamicRenderer(input.catch);
|
1651
|
+
branch["#PlaceholderContent" /* PlaceholderContent */] = normalizeDynamicRenderer(
|
1652
1652
|
input.placeholder
|
1653
1653
|
);
|
1654
1654
|
}
|
@@ -1960,19 +1960,19 @@ var enableCatch = () => {
|
|
1960
1960
|
runRender2(render);
|
1961
1961
|
} catch (error) {
|
1962
1962
|
let branch = render.___scope.___closestBranch;
|
1963
|
-
while (branch && !branch["
|
1963
|
+
while (branch && !branch["#CatchContent" /* CatchContent */])
|
1964
1964
|
branch = branch.___parentBranch;
|
1965
1965
|
if (!branch) {
|
1966
1966
|
throw error;
|
1967
1967
|
} else {
|
1968
1968
|
setConditionalRenderer(
|
1969
1969
|
branch._,
|
1970
|
-
branch["
|
1971
|
-
branch["
|
1970
|
+
branch["#BranchAccessor" /* BranchAccessor */],
|
1971
|
+
branch["#CatchContent" /* CatchContent */],
|
1972
1972
|
createAndSetupBranch
|
1973
1973
|
);
|
1974
|
-
branch["
|
1975
|
-
branch._["ConditionalScope:" /* ConditionalScope */ + branch["
|
1974
|
+
branch["#CatchContent" /* CatchContent */].___params?.(
|
1975
|
+
branch._["ConditionalScope:" /* ConditionalScope */ + branch["#BranchAccessor" /* BranchAccessor */]],
|
1976
1976
|
[error]
|
1977
1977
|
);
|
1978
1978
|
}
|
package/dist/debug/html.js
CHANGED
@@ -1644,7 +1644,7 @@ function withContext(key, value, cb) {
|
|
1644
1644
|
}
|
1645
1645
|
function setTagVar(parentScopeId, scopeOffsetAccessor, childScope, registryId) {
|
1646
1646
|
ensureScopeWithId(parentScopeId)[scopeOffsetAccessor] = nextScopeId();
|
1647
|
-
childScope["
|
1647
|
+
childScope["#TagVariable" /* TagVariable */] = register2(
|
1648
1648
|
{},
|
1649
1649
|
registryId,
|
1650
1650
|
parentScopeId
|
@@ -1961,9 +1961,9 @@ function tryContent(scopeId, accessor, content, input) {
|
|
1961
1961
|
content();
|
1962
1962
|
}
|
1963
1963
|
writeScope(branchId, {
|
1964
|
-
["
|
1965
|
-
["
|
1966
|
-
["
|
1964
|
+
["#BranchAccessor" /* BranchAccessor */]: accessor,
|
1965
|
+
["#CatchContent" /* CatchContent */]: catchContent,
|
1966
|
+
["#PlaceholderContent" /* PlaceholderContent */]: placeholderContent
|
1967
1967
|
});
|
1968
1968
|
writeScope(scopeId, {
|
1969
1969
|
["ConditionalScope:" /* ConditionalScope */ + accessor]: getScopeById(branchId)
|
package/dist/debug/html.mjs
CHANGED
@@ -1560,7 +1560,7 @@ function withContext(key, value, cb) {
|
|
1560
1560
|
}
|
1561
1561
|
function setTagVar(parentScopeId, scopeOffsetAccessor, childScope, registryId) {
|
1562
1562
|
ensureScopeWithId(parentScopeId)[scopeOffsetAccessor] = nextScopeId();
|
1563
|
-
childScope["
|
1563
|
+
childScope["#TagVariable" /* TagVariable */] = register2(
|
1564
1564
|
{},
|
1565
1565
|
registryId,
|
1566
1566
|
parentScopeId
|
@@ -1877,9 +1877,9 @@ function tryContent(scopeId, accessor, content, input) {
|
|
1877
1877
|
content();
|
1878
1878
|
}
|
1879
1879
|
writeScope(branchId, {
|
1880
|
-
["
|
1881
|
-
["
|
1882
|
-
["
|
1880
|
+
["#BranchAccessor" /* BranchAccessor */]: accessor,
|
1881
|
+
["#CatchContent" /* CatchContent */]: catchContent,
|
1882
|
+
["#PlaceholderContent" /* PlaceholderContent */]: placeholderContent
|
1883
1883
|
});
|
1884
1884
|
writeScope(scopeId, {
|
1885
1885
|
["ConditionalScope:" /* ConditionalScope */ + accessor]: getScopeById(branchId)
|