marko 6.0.0-next.3.25 → 6.0.0-next.3.27
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/types.d.ts +4 -3
- package/dist/debug/dom.js +360 -340
- package/dist/debug/dom.mjs +360 -340
- package/dist/debug/html.js +7 -7
- package/dist/debug/html.mjs +7 -7
- package/dist/dom/compat.d.ts +3 -3
- package/dist/dom/dom.d.ts +2 -1
- package/dist/dom/reconcile.d.ts +1 -1
- package/dist/dom/renderer.d.ts +1 -1
- package/dist/dom/scope.d.ts +2 -2
- package/dist/dom/signals.d.ts +1 -1
- package/dist/dom/walker.d.ts +2 -2
- package/dist/dom.js +257 -249
- package/dist/dom.mjs +257 -249
- package/dist/html/writer.d.ts +3 -3
- package/dist/html.js +7 -7
- package/dist/html.mjs +7 -7
- package/dist/translator/index.js +40 -46
- package/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/debug/html.js
CHANGED
@@ -1486,13 +1486,13 @@ function register2(val, id, scopeId) {
|
|
1486
1486
|
function nextTagId() {
|
1487
1487
|
const state = $chunk.boundary.state;
|
1488
1488
|
const { $global: $global2 } = state;
|
1489
|
-
return "s" + $global2.runtimeId + $global2.renderId + (state.
|
1489
|
+
return "s" + $global2.runtimeId + $global2.renderId + (state.tagId++).toString(36);
|
1490
1490
|
}
|
1491
1491
|
function nextScopeId() {
|
1492
|
-
return $chunk.boundary.state.
|
1492
|
+
return $chunk.boundary.state.scopeId++;
|
1493
1493
|
}
|
1494
1494
|
function peekNextScopeId() {
|
1495
|
-
return $chunk.boundary.state.
|
1495
|
+
return $chunk.boundary.state.scopeId;
|
1496
1496
|
}
|
1497
1497
|
function peekNextScope() {
|
1498
1498
|
return ensureScopeWithId(peekNextScopeId());
|
@@ -1815,9 +1815,9 @@ var State2 = class {
|
|
1815
1815
|
this.nonceAttr = " " + escapeAttrValue($global2.cspNonce + "");
|
1816
1816
|
}
|
1817
1817
|
}
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1818
|
+
tagId = 1;
|
1819
|
+
scopeId = 1;
|
1820
|
+
reorderId = 1;
|
1821
1821
|
hasGlobals = false;
|
1822
1822
|
needsMainRuntime = false;
|
1823
1823
|
hasMainRuntime = false;
|
@@ -1849,7 +1849,7 @@ var State2 = class {
|
|
1849
1849
|
const encodeChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789";
|
1850
1850
|
const encodeLen = encodeChars.length;
|
1851
1851
|
const encodeStartLen = encodeLen - 10;
|
1852
|
-
let index = this.
|
1852
|
+
let index = this.reorderId++;
|
1853
1853
|
let mod = index % encodeStartLen;
|
1854
1854
|
let id = encodeChars[mod];
|
1855
1855
|
index = (index - mod) / encodeStartLen;
|
package/dist/debug/html.mjs
CHANGED
@@ -1406,13 +1406,13 @@ function register2(val, id, scopeId) {
|
|
1406
1406
|
function nextTagId() {
|
1407
1407
|
const state = $chunk.boundary.state;
|
1408
1408
|
const { $global: $global2 } = state;
|
1409
|
-
return "s" + $global2.runtimeId + $global2.renderId + (state.
|
1409
|
+
return "s" + $global2.runtimeId + $global2.renderId + (state.tagId++).toString(36);
|
1410
1410
|
}
|
1411
1411
|
function nextScopeId() {
|
1412
|
-
return $chunk.boundary.state.
|
1412
|
+
return $chunk.boundary.state.scopeId++;
|
1413
1413
|
}
|
1414
1414
|
function peekNextScopeId() {
|
1415
|
-
return $chunk.boundary.state.
|
1415
|
+
return $chunk.boundary.state.scopeId;
|
1416
1416
|
}
|
1417
1417
|
function peekNextScope() {
|
1418
1418
|
return ensureScopeWithId(peekNextScopeId());
|
@@ -1735,9 +1735,9 @@ var State2 = class {
|
|
1735
1735
|
this.nonceAttr = " " + escapeAttrValue($global2.cspNonce + "");
|
1736
1736
|
}
|
1737
1737
|
}
|
1738
|
-
|
1739
|
-
|
1740
|
-
|
1738
|
+
tagId = 1;
|
1739
|
+
scopeId = 1;
|
1740
|
+
reorderId = 1;
|
1741
1741
|
hasGlobals = false;
|
1742
1742
|
needsMainRuntime = false;
|
1743
1743
|
hasMainRuntime = false;
|
@@ -1769,7 +1769,7 @@ var State2 = class {
|
|
1769
1769
|
const encodeChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789";
|
1770
1770
|
const encodeLen = encodeChars.length;
|
1771
1771
|
const encodeStartLen = encodeLen - 10;
|
1772
|
-
let index = this.
|
1772
|
+
let index = this.reorderId++;
|
1773
1773
|
let mod = index % encodeStartLen;
|
1774
1774
|
let id = encodeChars[mod];
|
1775
1775
|
index = (index - mod) / encodeStartLen;
|
package/dist/dom/compat.d.ts
CHANGED
@@ -8,8 +8,8 @@ export declare const compat: {
|
|
8
8
|
registerRenderer(fn: any): void;
|
9
9
|
isOp(value: any): boolean;
|
10
10
|
isRenderer(renderer: any): boolean;
|
11
|
-
getStartNode(
|
12
|
-
setScopeNodes(
|
11
|
+
getStartNode(branch: any): any;
|
12
|
+
setScopeNodes(branch: any, startNode: Node, endNode: Node): void;
|
13
13
|
runComponentEffects(this: any): void;
|
14
14
|
runComponentDestroy(this: any): void;
|
15
15
|
resolveRegistered(value: any, { runtimeId, componentIdPrefix, }: {
|
@@ -17,5 +17,5 @@ export declare const compat: {
|
|
17
17
|
componentIdPrefix: string;
|
18
18
|
}): any;
|
19
19
|
createRenderer(setup: Renderer["___setup"], clone: Renderer["___clone"], args: Renderer["___args"]): Renderer;
|
20
|
-
render(out: any, component: any, renderer: Renderer, args: any):
|
20
|
+
render(out: any, component: any, renderer: Renderer, args: any): ChildNode | ParentNode | null | undefined;
|
21
21
|
};
|
package/dist/dom/dom.d.ts
CHANGED
@@ -9,7 +9,7 @@ export declare function textContent(node: ParentNode, value: unknown): void;
|
|
9
9
|
export declare function attrs(scope: Scope, nodeAccessor: Accessor, nextAttrs: Record<string, unknown>): void;
|
10
10
|
export declare function partialAttrs(scope: Scope, nodeAccessor: Accessor, nextAttrs: Record<string, unknown>, skip: Record<string, 1>): void;
|
11
11
|
export declare function attrsEvents(scope: Scope, nodeAccessor: Accessor): void;
|
12
|
-
export declare function html(scope: Scope, value: unknown,
|
12
|
+
export declare function html(scope: Scope, value: unknown, accessor: Accessor): void;
|
13
13
|
export declare function props(scope: Scope, nodeIndex: number, index: number): void;
|
14
14
|
export declare function normalizeAttrValue(value: unknown): string | undefined;
|
15
15
|
export declare function lifecycle(scope: Scope, index: string | number, thisObj: Record<string, unknown> & {
|
@@ -17,3 +17,4 @@ export declare function lifecycle(scope: Scope, index: string | number, thisObj:
|
|
17
17
|
onUpdate?: (this: unknown) => void;
|
18
18
|
onDestroy?: (this: unknown) => void;
|
19
19
|
}): void;
|
20
|
+
export declare function removeChildNodes(startNode: ChildNode, endNode: ChildNode): void;
|
package/dist/dom/reconcile.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { BranchScope } from "../common/types";
|
2
|
-
export declare function reconcile(parent:
|
2
|
+
export declare function reconcile(parent: ParentNode, oldBranches: BranchScope[], newBranches: BranchScope[], afterReference: Node | null): void;
|
package/dist/dom/renderer.d.ts
CHANGED
@@ -13,7 +13,7 @@ export type Renderer = {
|
|
13
13
|
type SetupFn = (scope: Scope) => void;
|
14
14
|
export declare function createBranchScopeWithRenderer(renderer: Renderer, $global: Scope["$global"], parentScope: Scope): BranchScope;
|
15
15
|
export declare function createBranchScopeWithTagNameOrRenderer(tagNameOrRenderer: Renderer | string, $global: Scope["$global"], parentScope: Scope): BranchScope;
|
16
|
-
export declare function
|
16
|
+
export declare function initBranch(renderer: Renderer, branch: BranchScope): Node;
|
17
17
|
export declare function dynamicTagAttrs(nodeAccessor: Accessor, getContent?: (scope: Scope) => Renderer, inputIsArgs?: boolean): (scope: Scope, attrsOrOp: (() => Record<string, unknown>) | SignalOp) => void;
|
18
18
|
export declare function createRendererWithOwner(template: string, rawWalks?: string, setup?: SetupFn, getArgs?: () => Signal<unknown>): (owner?: Scope) => Renderer;
|
19
19
|
export declare function createRenderer(template: string, walks?: string, setup?: SetupFn, getArgs?: () => Signal<unknown>): Renderer;
|
package/dist/dom/scope.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { BranchScope, Scope } from "../common/types";
|
2
2
|
export declare function createScope($global: Scope["$global"]): Scope;
|
3
3
|
export declare function finishPendingScopes(): void;
|
4
|
-
export declare function
|
4
|
+
export declare function getEmptyBranch(marker: Comment): BranchScope;
|
5
5
|
export declare function destroyBranch(branch: BranchScope): void;
|
6
6
|
export declare function removeAndDestroyBranch(branch: BranchScope): void;
|
7
|
-
export declare function
|
7
|
+
export declare function insertBranchBefore(branch: BranchScope, parentNode: ParentNode, nextSibling: Node | null): void;
|
package/dist/dom/signals.d.ts
CHANGED
@@ -14,7 +14,7 @@ export declare function intersection(count: number, fn: SignalFn<never>, getInte
|
|
14
14
|
export declare function closure<T>(fn: SignalFn<T> | 0, getIntersection?: () => Signal<never>): Signal<T>;
|
15
15
|
export declare function loopClosure<T>(ownerLoopNodeAccessor: Accessor, fn: SignalFn<T> | 0, getIntersection?: () => Signal<never>): SignalFn<T>;
|
16
16
|
export declare function conditionalClosure<T>(ownerConditionalNodeAccessor: Accessor, getRenderer: () => Renderer, fn: SignalFn<T> | 0, getIntersection?: () => Signal<never>): SignalFn<T>;
|
17
|
-
export declare function dynamicClosure<T>(
|
17
|
+
export declare function dynamicClosure<T>(fn: Signal<T> | 0, getOwnerScope?: (scope: Scope) => Scope, getIntersection?: () => Signal<never>): SignalFn<T>;
|
18
18
|
export declare function setTagVar(scope: Scope, childAccessor: Accessor, tagVarSignal: Signal<unknown>): void;
|
19
19
|
export declare const tagVarSignal: (scope: Scope, valueOrOp: unknown | SignalOp) => any;
|
20
20
|
export declare function setTagVarChange(scope: Scope, changeHandler: (value: unknown) => void): void;
|
package/dist/dom/walker.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { type
|
1
|
+
import { type BranchScope } from "../common/types";
|
2
2
|
export declare const walker: TreeWalker;
|
3
3
|
export declare function trimWalkString(walkString: string): string;
|
4
|
-
export declare function walk(startNode: Node, walkCodes: string,
|
4
|
+
export declare function walk(startNode: Node, walkCodes: string, branch: BranchScope): void;
|