marko 6.0.13 → 6.0.14
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/debug/dom.js +2 -2
- package/dist/debug/dom.mjs +2 -2
- package/dist/dom/renderer.d.ts +9 -3
- package/dist/dom.js +2 -2
- package/dist/dom.mjs +2 -2
- package/dist/translator/index.js +2 -2
- package/package.json +1 -1
package/dist/debug/dom.js
CHANGED
@@ -1338,7 +1338,7 @@ function createContent(id, template, walks, setup, params, closures, dynamicScop
|
|
1338
1338
|
walks = walks ? walks.replace(/[^\0-1]+$/, "") : "";
|
1339
1339
|
setup ||= void 0;
|
1340
1340
|
params ||= void 0;
|
1341
|
-
closures
|
1341
|
+
closures = closures ? closures._ || closures : void 0;
|
1342
1342
|
const clone = template ? (branch, ns) => {
|
1343
1343
|
((cloneCache[ns] ||= {})[template] ||= createCloneableHTML(
|
1344
1344
|
template,
|
@@ -1507,7 +1507,7 @@ function loopClosure(valueAccessor, ownerLoopNodeAccessor, fn) {
|
|
1507
1507
|
const loopScopeAccessor = "LoopScopeArray:" /* LoopScopeArray */ + ownerLoopNodeAccessor;
|
1508
1508
|
const loopScopeMapAccessor = "LoopScopeMap:" /* LoopScopeMap */ + ownerLoopNodeAccessor;
|
1509
1509
|
const ownerSignal = (ownerScope) => {
|
1510
|
-
const scopes = ownerScope[loopScopeAccessor]
|
1510
|
+
const scopes = ownerScope[loopScopeAccessor] ||= ownerScope[loopScopeMapAccessor] ? [...ownerScope[loopScopeMapAccessor].values()] : [];
|
1511
1511
|
const [firstScope] = scopes;
|
1512
1512
|
if (firstScope) {
|
1513
1513
|
queueRender(
|
package/dist/debug/dom.mjs
CHANGED
@@ -1246,7 +1246,7 @@ function createContent(id, template, walks, setup, params, closures, dynamicScop
|
|
1246
1246
|
walks = walks ? walks.replace(/[^\0-1]+$/, "") : "";
|
1247
1247
|
setup ||= void 0;
|
1248
1248
|
params ||= void 0;
|
1249
|
-
closures
|
1249
|
+
closures = closures ? closures._ || closures : void 0;
|
1250
1250
|
const clone = template ? (branch, ns) => {
|
1251
1251
|
((cloneCache[ns] ||= {})[template] ||= createCloneableHTML(
|
1252
1252
|
template,
|
@@ -1415,7 +1415,7 @@ function loopClosure(valueAccessor, ownerLoopNodeAccessor, fn) {
|
|
1415
1415
|
const loopScopeAccessor = "LoopScopeArray:" /* LoopScopeArray */ + ownerLoopNodeAccessor;
|
1416
1416
|
const loopScopeMapAccessor = "LoopScopeMap:" /* LoopScopeMap */ + ownerLoopNodeAccessor;
|
1417
1417
|
const ownerSignal = (ownerScope) => {
|
1418
|
-
const scopes = ownerScope[loopScopeAccessor]
|
1418
|
+
const scopes = ownerScope[loopScopeAccessor] ||= ownerScope[loopScopeMapAccessor] ? [...ownerScope[loopScopeMapAccessor].values()] : [];
|
1419
1419
|
const [firstScope] = scopes;
|
1420
1420
|
if (firstScope) {
|
1421
1421
|
queueRender(
|
package/dist/dom/renderer.d.ts
CHANGED
@@ -13,7 +13,13 @@ type SetupFn = (scope: Scope) => void;
|
|
13
13
|
export declare function createBranch($global: Scope["$global"], renderer: Renderer | string, parentScope: Scope | undefined, parentNode: ParentNode): BranchScope;
|
14
14
|
export declare function createAndSetupBranch($global: Scope["$global"], renderer: Renderer, parentScope: Scope | undefined, parentNode: ParentNode): BranchScope;
|
15
15
|
export declare function setupBranch(renderer: Renderer, branch: BranchScope): BranchScope;
|
16
|
-
export declare function createContent(id: string, template: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?: Signal<unknown> | 0, closures?:
|
17
|
-
|
18
|
-
|
16
|
+
export declare function createContent(id: string, template: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?: Signal<unknown> | 0, closures?: {
|
17
|
+
_: Signal<unknown>;
|
18
|
+
} | Signal<unknown> | 0, dynamicScopesAccessor?: Accessor): (owner?: Scope) => Renderer;
|
19
|
+
export declare function registerContent(id: string, template: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?: Signal<unknown> | 0, closures?: {
|
20
|
+
_: Signal<unknown>;
|
21
|
+
} | Signal<unknown> | 0, dynamicScopesAccessor?: Accessor): (owner?: Scope) => Renderer;
|
22
|
+
export declare function createRenderer(template: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?: Signal<unknown> | 0, closures?: {
|
23
|
+
_: Signal<unknown>;
|
24
|
+
} | Signal<unknown> | 0): Renderer;
|
19
25
|
export {};
|
package/dist/dom.js
CHANGED
@@ -884,7 +884,7 @@ function setupBranch(renderer, branch) {
|
|
884
884
|
), branch;
|
885
885
|
}
|
886
886
|
function createContent(id, template, walks, setup, params, closures, dynamicScopesAccessor) {
|
887
|
-
walks = walks ? walks.replace(/[^\0-1]+$/, "") : "", setup ||= void 0, params ||= void 0, closures
|
887
|
+
walks = walks ? walks.replace(/[^\0-1]+$/, "") : "", setup ||= void 0, params ||= void 0, closures = closures ? closures._ || closures : void 0;
|
888
888
|
let clone = template ? (branch, ns) => {
|
889
889
|
((cloneCache[ns] ||= {})[template] ||= createCloneableHTML(
|
890
890
|
template,
|
@@ -980,7 +980,7 @@ function intersection(id, fn, defaultPending = 1, scopeIdAccessor = /* @__KEY__
|
|
980
980
|
}
|
981
981
|
function loopClosure(valueAccessor, ownerLoopNodeAccessor, fn) {
|
982
982
|
let childSignal = closure(valueAccessor, fn), loopScopeAccessor = "l" /* LoopScopeArray */ + ownerLoopNodeAccessor, loopScopeMapAccessor = "m" /* LoopScopeMap */ + ownerLoopNodeAccessor, ownerSignal = (ownerScope) => {
|
983
|
-
let scopes = ownerScope[loopScopeAccessor]
|
983
|
+
let scopes = ownerScope[loopScopeAccessor] ||= ownerScope[loopScopeMapAccessor] ? [...ownerScope[loopScopeMapAccessor].values()] : [], [firstScope] = scopes;
|
984
984
|
firstScope && queueRender(
|
985
985
|
ownerScope,
|
986
986
|
() => {
|
package/dist/dom.mjs
CHANGED
@@ -795,7 +795,7 @@ function setupBranch(renderer, branch) {
|
|
795
795
|
), branch;
|
796
796
|
}
|
797
797
|
function createContent(id, template, walks, setup, params, closures, dynamicScopesAccessor) {
|
798
|
-
walks = walks ? walks.replace(/[^\0-1]+$/, "") : "", setup ||= void 0, params ||= void 0, closures
|
798
|
+
walks = walks ? walks.replace(/[^\0-1]+$/, "") : "", setup ||= void 0, params ||= void 0, closures = closures ? closures._ || closures : void 0;
|
799
799
|
let clone = template ? (branch, ns) => {
|
800
800
|
((cloneCache[ns] ||= {})[template] ||= createCloneableHTML(
|
801
801
|
template,
|
@@ -891,7 +891,7 @@ function intersection(id, fn, defaultPending = 1, scopeIdAccessor = /* @__KEY__
|
|
891
891
|
}
|
892
892
|
function loopClosure(valueAccessor, ownerLoopNodeAccessor, fn) {
|
893
893
|
let childSignal = closure(valueAccessor, fn), loopScopeAccessor = "l" /* LoopScopeArray */ + ownerLoopNodeAccessor, loopScopeMapAccessor = "m" /* LoopScopeMap */ + ownerLoopNodeAccessor, ownerSignal = (ownerScope) => {
|
894
|
-
let scopes = ownerScope[loopScopeAccessor]
|
894
|
+
let scopes = ownerScope[loopScopeAccessor] ||= ownerScope[loopScopeMapAccessor] ? [...ownerScope[loopScopeMapAccessor].values()] : [], [firstScope] = scopes;
|
895
895
|
firstScope && queueRender(
|
896
896
|
ownerScope,
|
897
897
|
() => {
|
package/dist/translator/index.js
CHANGED
@@ -4040,7 +4040,7 @@ var dom_default = {
|
|
4040
4040
|
const tagParamsSignal = childSection.params && initValue(childSection.params);
|
4041
4041
|
const { walks: walks2, writes: writes2, setup: setup2 } = getSectionMeta(childSection);
|
4042
4042
|
const identifier = import_compiler21.types.identifier(childSection.name);
|
4043
|
-
const referencedClosures = childSection.referencedClosures ? import_compiler21.types.arrowFunctionExpression(
|
4043
|
+
const referencedClosures = childSection.referencedClosures ? Array.isArray(childSection.referencedClosures) ? import_compiler21.types.arrowFunctionExpression(
|
4044
4044
|
[scopeIdentifier],
|
4045
4045
|
toFirstExpressionOrBlock(
|
4046
4046
|
toArray(childSection.referencedClosures, (closure) => {
|
@@ -4056,7 +4056,7 @@ var dom_default = {
|
|
4056
4056
|
);
|
4057
4057
|
})
|
4058
4058
|
)
|
4059
|
-
) : void 0;
|
4059
|
+
) : getSignal(childSection, childSection.referencedClosures).identifier : void 0;
|
4060
4060
|
const renderer = getSectionParentIsOwner(childSection) ? callRuntime(
|
4061
4061
|
"createRenderer",
|
4062
4062
|
...replaceNullishAndEmptyFunctionsWith0([
|