marko 6.0.166 → 6.0.168
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 +1 -1
- package/dist/debug/dom.mjs +1 -1
- package/dist/debug/html.js +4 -2
- package/dist/debug/html.mjs +4 -2
- package/dist/html/writer.d.ts +1 -1
- package/dist/html.js +396 -390
- package/dist/html.mjs +395 -389
- package/dist/translator/index.js +2 -1
- package/package.json +1 -1
package/dist/debug/dom.js
CHANGED
|
@@ -32,7 +32,7 @@ function _assert_hoist(value) {
|
|
|
32
32
|
if (typeof value !== "function") throw new Error(`Hoisted values must be functions, received type "${typeof value}".`);
|
|
33
33
|
}
|
|
34
34
|
function _assert_init(scope, accessor) {
|
|
35
|
-
if (scope["#Creating"] || !(accessor in scope)) throw new ReferenceError(`Cannot access
|
|
35
|
+
if (scope["#Creating"] || !(accessor in scope)) throw new ReferenceError(`Cannot access '${accessor}' before initialization`);
|
|
36
36
|
return scope[accessor];
|
|
37
37
|
}
|
|
38
38
|
function assertExclusiveAttrs(attrs, onError = throwErr) {
|
package/dist/debug/dom.mjs
CHANGED
|
@@ -30,7 +30,7 @@ function _assert_hoist(value) {
|
|
|
30
30
|
if (typeof value !== "function") throw new Error(`Hoisted values must be functions, received type "${typeof value}".`);
|
|
31
31
|
}
|
|
32
32
|
function _assert_init(scope, accessor) {
|
|
33
|
-
if (scope["#Creating"] || !(accessor in scope)) throw new ReferenceError(`Cannot access
|
|
33
|
+
if (scope["#Creating"] || !(accessor in scope)) throw new ReferenceError(`Cannot access '${accessor}' before initialization`);
|
|
34
34
|
return scope[accessor];
|
|
35
35
|
}
|
|
36
36
|
function assertExclusiveAttrs(attrs, onError = throwErr) {
|
package/dist/debug/html.js
CHANGED
|
@@ -1484,9 +1484,11 @@ function withContext(key, value, cb, cbValue) {
|
|
|
1484
1484
|
ctx[key] = prev;
|
|
1485
1485
|
}
|
|
1486
1486
|
}
|
|
1487
|
-
function _var(parentScopeId, scopeOffsetAccessor, childScopeId, registryId) {
|
|
1487
|
+
function _var(parentScopeId, scopeOffsetAccessor, childScopeId, registryId, nodeAccessor) {
|
|
1488
1488
|
_scope_with_id(parentScopeId)[scopeOffsetAccessor] = _scope_id();
|
|
1489
|
-
|
|
1489
|
+
const childScope = _scope_with_id(childScopeId);
|
|
1490
|
+
childScope["#TagVariable"] = _resume({}, registryId, parentScopeId);
|
|
1491
|
+
if (nodeAccessor !== void 0) writeScope(parentScopeId, { ["BranchScopes:" + nodeAccessor]: childScope });
|
|
1490
1492
|
}
|
|
1491
1493
|
function _resume(val, id, scopeId) {
|
|
1492
1494
|
return scopeId === void 0 ? register(id, val) : $chunk.boundary.state.serializer.register(id, val, _scope_with_id(scopeId));
|
package/dist/debug/html.mjs
CHANGED
|
@@ -1482,9 +1482,11 @@ function withContext(key, value, cb, cbValue) {
|
|
|
1482
1482
|
ctx[key] = prev;
|
|
1483
1483
|
}
|
|
1484
1484
|
}
|
|
1485
|
-
function _var(parentScopeId, scopeOffsetAccessor, childScopeId, registryId) {
|
|
1485
|
+
function _var(parentScopeId, scopeOffsetAccessor, childScopeId, registryId, nodeAccessor) {
|
|
1486
1486
|
_scope_with_id(parentScopeId)[scopeOffsetAccessor] = _scope_id();
|
|
1487
|
-
|
|
1487
|
+
const childScope = _scope_with_id(childScopeId);
|
|
1488
|
+
childScope["#TagVariable"] = _resume({}, registryId, parentScopeId);
|
|
1489
|
+
if (nodeAccessor !== void 0) writeScope(parentScopeId, { ["BranchScopes:" + nodeAccessor]: childScope });
|
|
1488
1490
|
}
|
|
1489
1491
|
function _resume(val, id, scopeId) {
|
|
1490
1492
|
return scopeId === void 0 ? register(id, val) : $chunk.boundary.state.serializer.register(id, val, _scope_with_id(scopeId));
|
package/dist/html/writer.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export declare function _script(scopeId: number, registryId: string): void;
|
|
|
23
23
|
export declare function _attr_content(nodeAccessor: Accessor, scopeId: number, content: unknown, serializeReason?: 1 | 0): void;
|
|
24
24
|
export declare function withContext<T>(key: PropertyKey, value: unknown, cb: () => T): T;
|
|
25
25
|
export declare function withContext<T, U>(key: PropertyKey, value: unknown, cb: (value: U) => T, cbValue: U): T;
|
|
26
|
-
export declare function _var(parentScopeId: number, scopeOffsetAccessor: Accessor, childScopeId: number, registryId: string): void;
|
|
26
|
+
export declare function _var(parentScopeId: number, scopeOffsetAccessor: Accessor, childScopeId: number, registryId: string, nodeAccessor?: Accessor): void;
|
|
27
27
|
export declare function _resume<T extends WeakKey>(val: T, id: string, scopeId?: number): T;
|
|
28
28
|
export declare function _id(): string;
|
|
29
29
|
export declare function _scope_id(): number;
|