marko 6.0.121 → 6.0.123
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/html.js +7 -7
- package/dist/debug/html.mjs +7 -7
- package/dist/html/compat.d.ts +2 -3
- package/dist/html/dynamic-tag.d.ts +1 -1
- package/dist/html.js +7 -7
- package/dist/html.mjs +7 -7
- package/dist/translator/core/client.d.ts +2 -13
- package/dist/translator/core/index.d.ts +3 -36
- package/dist/translator/core/server.d.ts +2 -13
- package/dist/translator/core/static.d.ts +2 -13
- package/dist/translator/index.d.ts +4 -36
- package/dist/translator/index.js +627 -123
- package/dist/translator/interop/build-aggregate-error.d.ts +2 -0
- package/dist/translator/interop/feature-detection.d.ts +2 -0
- package/dist/translator/interop/index.d.ts +12 -0
- package/package.json +2 -2
package/dist/debug/html.js
CHANGED
|
@@ -3244,9 +3244,9 @@ function _content(id, fn) {
|
|
|
3244
3244
|
function _content_resume(id, fn, scopeId) {
|
|
3245
3245
|
return _resume(_content(id, fn), id, scopeId);
|
|
3246
3246
|
}
|
|
3247
|
-
|
|
3248
|
-
_dynamic_tag =
|
|
3249
|
-
const patched = patch(scopeId, accessor
|
|
3247
|
+
var patchDynamicTag = /* @__PURE__ */ ((originalDynamicTag) => (patch) => {
|
|
3248
|
+
_dynamic_tag = (scopeId, accessor, tag, input, content, inputIsArgs, resume) => {
|
|
3249
|
+
const patched = patch(tag, scopeId, accessor);
|
|
3250
3250
|
if (patched !== tag) patched.___id = tag;
|
|
3251
3251
|
return originalDynamicTag(
|
|
3252
3252
|
scopeId,
|
|
@@ -3257,8 +3257,8 @@ function patchDynamicTag(patch) {
|
|
|
3257
3257
|
inputIsArgs,
|
|
3258
3258
|
resume
|
|
3259
3259
|
);
|
|
3260
|
-
}
|
|
3261
|
-
}
|
|
3260
|
+
};
|
|
3261
|
+
})(_dynamic_tag);
|
|
3262
3262
|
|
|
3263
3263
|
// src/html/compat.ts
|
|
3264
3264
|
var K_TAGS_API_STATE = Symbol();
|
|
@@ -3291,8 +3291,8 @@ var compat = {
|
|
|
3291
3291
|
};
|
|
3292
3292
|
},
|
|
3293
3293
|
patchDynamicTag,
|
|
3294
|
-
writeSetScopeForComponent(branchId, m5c) {
|
|
3295
|
-
writeScope(branchId, { m5c });
|
|
3294
|
+
writeSetScopeForComponent(branchId, m5c, m5i) {
|
|
3295
|
+
writeScope(branchId, { m5c, m5i });
|
|
3296
3296
|
_script(branchId, SET_SCOPE_REGISTER_ID);
|
|
3297
3297
|
},
|
|
3298
3298
|
toJSON(state) {
|
package/dist/debug/html.mjs
CHANGED
|
@@ -3151,9 +3151,9 @@ function _content(id, fn) {
|
|
|
3151
3151
|
function _content_resume(id, fn, scopeId) {
|
|
3152
3152
|
return _resume(_content(id, fn), id, scopeId);
|
|
3153
3153
|
}
|
|
3154
|
-
|
|
3155
|
-
_dynamic_tag =
|
|
3156
|
-
const patched = patch(scopeId, accessor
|
|
3154
|
+
var patchDynamicTag = /* @__PURE__ */ ((originalDynamicTag) => (patch) => {
|
|
3155
|
+
_dynamic_tag = (scopeId, accessor, tag, input, content, inputIsArgs, resume) => {
|
|
3156
|
+
const patched = patch(tag, scopeId, accessor);
|
|
3157
3157
|
if (patched !== tag) patched.___id = tag;
|
|
3158
3158
|
return originalDynamicTag(
|
|
3159
3159
|
scopeId,
|
|
@@ -3164,8 +3164,8 @@ function patchDynamicTag(patch) {
|
|
|
3164
3164
|
inputIsArgs,
|
|
3165
3165
|
resume
|
|
3166
3166
|
);
|
|
3167
|
-
}
|
|
3168
|
-
}
|
|
3167
|
+
};
|
|
3168
|
+
})(_dynamic_tag);
|
|
3169
3169
|
|
|
3170
3170
|
// src/html/compat.ts
|
|
3171
3171
|
var K_TAGS_API_STATE = Symbol();
|
|
@@ -3198,8 +3198,8 @@ var compat = {
|
|
|
3198
3198
|
};
|
|
3199
3199
|
},
|
|
3200
3200
|
patchDynamicTag,
|
|
3201
|
-
writeSetScopeForComponent(branchId, m5c) {
|
|
3202
|
-
writeScope(branchId, { m5c });
|
|
3201
|
+
writeSetScopeForComponent(branchId, m5c, m5i) {
|
|
3202
|
+
writeScope(branchId, { m5c, m5i });
|
|
3203
3203
|
_script(branchId, SET_SCOPE_REGISTER_ID);
|
|
3204
3204
|
},
|
|
3205
3205
|
toJSON(state) {
|
package/dist/html/compat.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { patchDynamicTag } from "./dynamic-tag";
|
|
2
1
|
import type { ServerRenderer } from "./template";
|
|
3
2
|
import { _await, _html, _peek_scope_id, _scope_id, $global, Chunk, isInResumedBranch, State, writeScript } from "./writer";
|
|
4
3
|
export declare const compat: {
|
|
@@ -12,8 +11,8 @@ export declare const compat: {
|
|
|
12
11
|
ensureState($global: any): State;
|
|
13
12
|
isTagsAPI(fn: any): boolean;
|
|
14
13
|
onFlush(fn: (chunk: Chunk) => void): void;
|
|
15
|
-
patchDynamicTag:
|
|
16
|
-
writeSetScopeForComponent(branchId: number, m5c: string): void;
|
|
14
|
+
patchDynamicTag: (patch: (tag: unknown, scopeId: number, accessor: import("../common/types").Accessor) => unknown) => void;
|
|
15
|
+
writeSetScopeForComponent(branchId: number, m5c: string, m5i: unknown): void;
|
|
17
16
|
toJSON(state: State): (this: WeakKey) => [registryId: string, scopeId: unknown] | undefined;
|
|
18
17
|
flushScript($global: any): string;
|
|
19
18
|
render(renderer: ServerRenderer, willRerender: boolean, classAPIOut: any, component: any, input: any, completeChunks: Chunk[]): void;
|
|
@@ -7,5 +7,5 @@ interface BodyContentObject {
|
|
|
7
7
|
export declare let _dynamic_tag: (scopeId: number, accessor: Accessor, tag: unknown | string | ServerRenderer | BodyContentObject, inputOrArgs: unknown, content?: (() => void) | 0, inputIsArgs?: 1, serializeReason?: 1 | 0) => unknown;
|
|
8
8
|
export declare function _content(id: string, fn: ServerRenderer): ServerRenderer;
|
|
9
9
|
export declare function _content_resume(id: string, fn: ServerRenderer, scopeId?: number): ServerRenderer;
|
|
10
|
-
export declare
|
|
10
|
+
export declare const patchDynamicTag: (patch: (tag: unknown, scopeId: number, accessor: Accessor) => unknown) => void;
|
|
11
11
|
export {};
|
package/dist/html.js
CHANGED
|
@@ -2038,9 +2038,9 @@ function _content(id, fn) {
|
|
|
2038
2038
|
function _content_resume(id, fn, scopeId) {
|
|
2039
2039
|
return _resume(_content(id, fn), id, scopeId);
|
|
2040
2040
|
}
|
|
2041
|
-
|
|
2042
|
-
_dynamic_tag =
|
|
2043
|
-
let patched = patch(scopeId, accessor
|
|
2041
|
+
var patchDynamicTag = /* @__PURE__ */ ((originalDynamicTag) => (patch) => {
|
|
2042
|
+
_dynamic_tag = (scopeId, accessor, tag, input, content, inputIsArgs, resume) => {
|
|
2043
|
+
let patched = patch(tag, scopeId, accessor);
|
|
2044
2044
|
return patched !== tag && (patched.a = tag), originalDynamicTag(
|
|
2045
2045
|
scopeId,
|
|
2046
2046
|
accessor,
|
|
@@ -2050,8 +2050,8 @@ function patchDynamicTag(patch) {
|
|
|
2050
2050
|
inputIsArgs,
|
|
2051
2051
|
resume
|
|
2052
2052
|
);
|
|
2053
|
-
}
|
|
2054
|
-
}
|
|
2053
|
+
};
|
|
2054
|
+
})(_dynamic_tag);
|
|
2055
2055
|
|
|
2056
2056
|
// src/html/compat.ts
|
|
2057
2057
|
var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap(), compat = {
|
|
@@ -2076,8 +2076,8 @@ var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap()
|
|
|
2076
2076
|
};
|
|
2077
2077
|
},
|
|
2078
2078
|
patchDynamicTag,
|
|
2079
|
-
writeSetScopeForComponent(branchId, m5c) {
|
|
2080
|
-
writeScope(branchId, { m5c }), _script(branchId, SET_SCOPE_REGISTER_ID);
|
|
2079
|
+
writeSetScopeForComponent(branchId, m5c, m5i) {
|
|
2080
|
+
writeScope(branchId, { m5c, m5i }), _script(branchId, SET_SCOPE_REGISTER_ID);
|
|
2081
2081
|
},
|
|
2082
2082
|
toJSON(state) {
|
|
2083
2083
|
return function() {
|
package/dist/html.mjs
CHANGED
|
@@ -1948,9 +1948,9 @@ function _content(id, fn) {
|
|
|
1948
1948
|
function _content_resume(id, fn, scopeId) {
|
|
1949
1949
|
return _resume(_content(id, fn), id, scopeId);
|
|
1950
1950
|
}
|
|
1951
|
-
|
|
1952
|
-
_dynamic_tag =
|
|
1953
|
-
let patched = patch(scopeId, accessor
|
|
1951
|
+
var patchDynamicTag = /* @__PURE__ */ ((originalDynamicTag) => (patch) => {
|
|
1952
|
+
_dynamic_tag = (scopeId, accessor, tag, input, content, inputIsArgs, resume) => {
|
|
1953
|
+
let patched = patch(tag, scopeId, accessor);
|
|
1954
1954
|
return patched !== tag && (patched.a = tag), originalDynamicTag(
|
|
1955
1955
|
scopeId,
|
|
1956
1956
|
accessor,
|
|
@@ -1960,8 +1960,8 @@ function patchDynamicTag(patch) {
|
|
|
1960
1960
|
inputIsArgs,
|
|
1961
1961
|
resume
|
|
1962
1962
|
);
|
|
1963
|
-
}
|
|
1964
|
-
}
|
|
1963
|
+
};
|
|
1964
|
+
})(_dynamic_tag);
|
|
1965
1965
|
|
|
1966
1966
|
// src/html/compat.ts
|
|
1967
1967
|
var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap(), compat = {
|
|
@@ -1986,8 +1986,8 @@ var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap()
|
|
|
1986
1986
|
};
|
|
1987
1987
|
},
|
|
1988
1988
|
patchDynamicTag,
|
|
1989
|
-
writeSetScopeForComponent(branchId, m5c) {
|
|
1990
|
-
writeScope(branchId, { m5c }), _script(branchId, SET_SCOPE_REGISTER_ID);
|
|
1989
|
+
writeSetScopeForComponent(branchId, m5c, m5i) {
|
|
1990
|
+
writeScope(branchId, { m5c, m5i }), _script(branchId, SET_SCOPE_REGISTER_ID);
|
|
1991
1991
|
},
|
|
1992
1992
|
toJSON(state) {
|
|
1993
1993
|
return function() {
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const _default:
|
|
3
|
-
parse(tag: t.NodePath<t.MarkoTag>): void;
|
|
4
|
-
parseOptions: {
|
|
5
|
-
statement: boolean;
|
|
6
|
-
rawOpenTag: boolean;
|
|
7
|
-
};
|
|
8
|
-
autocomplete: {
|
|
9
|
-
displayText: string;
|
|
10
|
-
description: string;
|
|
11
|
-
descriptionMoreURL: string;
|
|
12
|
-
}[];
|
|
13
|
-
};
|
|
1
|
+
import { type Tag } from "@marko/compiler/babel-utils";
|
|
2
|
+
declare const _default: Tag;
|
|
14
3
|
export default _default;
|
|
@@ -2,18 +2,7 @@ declare const _default: {
|
|
|
2
2
|
taglibId: string;
|
|
3
3
|
"<attrs>": import("@marko/compiler/babel-utils").Tag;
|
|
4
4
|
"<await>": import("@marko/compiler/babel-utils").Tag;
|
|
5
|
-
"<client>":
|
|
6
|
-
parse(tag: import("@marko/compiler/babel-types").NodePath<import("@marko/compiler/babel-types").MarkoTag>): void;
|
|
7
|
-
parseOptions: {
|
|
8
|
-
statement: boolean;
|
|
9
|
-
rawOpenTag: boolean;
|
|
10
|
-
};
|
|
11
|
-
autocomplete: {
|
|
12
|
-
displayText: string;
|
|
13
|
-
description: string;
|
|
14
|
-
descriptionMoreURL: string;
|
|
15
|
-
}[];
|
|
16
|
-
};
|
|
5
|
+
"<client>": import("@marko/compiler/babel-utils").Tag;
|
|
17
6
|
"<const>": import("@marko/compiler/babel-utils").Tag;
|
|
18
7
|
"<debug>": import("@marko/compiler/babel-utils").Tag;
|
|
19
8
|
"<define>": import("@marko/compiler/babel-utils").Tag;
|
|
@@ -130,30 +119,8 @@ declare const _default: {
|
|
|
130
119
|
"<log>": import("@marko/compiler/babel-utils").Tag;
|
|
131
120
|
"<return>": import("@marko/compiler/babel-utils").Tag;
|
|
132
121
|
"<script>": import("@marko/compiler/babel-utils").Tag;
|
|
133
|
-
"<server>":
|
|
134
|
-
|
|
135
|
-
parseOptions: {
|
|
136
|
-
statement: boolean;
|
|
137
|
-
rawOpenTag: boolean;
|
|
138
|
-
};
|
|
139
|
-
autocomplete: {
|
|
140
|
-
displayText: string;
|
|
141
|
-
description: string;
|
|
142
|
-
descriptionMoreURL: string;
|
|
143
|
-
}[];
|
|
144
|
-
};
|
|
145
|
-
"<static>": {
|
|
146
|
-
parse(tag: import("@marko/compiler/babel-types").NodePath<import("@marko/compiler/babel-types").MarkoTag>): void;
|
|
147
|
-
parseOptions: {
|
|
148
|
-
statement: boolean;
|
|
149
|
-
rawOpenTag: boolean;
|
|
150
|
-
};
|
|
151
|
-
autocomplete: {
|
|
152
|
-
displayText: string;
|
|
153
|
-
description: string;
|
|
154
|
-
descriptionMoreURL: string;
|
|
155
|
-
}[];
|
|
156
|
-
};
|
|
122
|
+
"<server>": import("@marko/compiler/babel-utils").Tag;
|
|
123
|
+
"<static>": import("@marko/compiler/babel-utils").Tag;
|
|
157
124
|
"<style>": import("@marko/compiler/babel-utils").Tag;
|
|
158
125
|
"<try>": import("@marko/compiler/babel-utils").Tag;
|
|
159
126
|
};
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const _default:
|
|
3
|
-
parse(tag: t.NodePath<t.MarkoTag>): void;
|
|
4
|
-
parseOptions: {
|
|
5
|
-
statement: boolean;
|
|
6
|
-
rawOpenTag: boolean;
|
|
7
|
-
};
|
|
8
|
-
autocomplete: {
|
|
9
|
-
displayText: string;
|
|
10
|
-
description: string;
|
|
11
|
-
descriptionMoreURL: string;
|
|
12
|
-
}[];
|
|
13
|
-
};
|
|
1
|
+
import { type Tag } from "@marko/compiler/babel-utils";
|
|
2
|
+
declare const _default: Tag;
|
|
14
3
|
export default _default;
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const _default:
|
|
3
|
-
parse(tag: t.NodePath<t.MarkoTag>): void;
|
|
4
|
-
parseOptions: {
|
|
5
|
-
statement: boolean;
|
|
6
|
-
rawOpenTag: boolean;
|
|
7
|
-
};
|
|
8
|
-
autocomplete: {
|
|
9
|
-
displayText: string;
|
|
10
|
-
description: string;
|
|
11
|
-
descriptionMoreURL: string;
|
|
12
|
-
}[];
|
|
13
|
-
};
|
|
1
|
+
import { type Tag } from "@marko/compiler/babel-utils";
|
|
2
|
+
declare const _default: Tag;
|
|
14
3
|
export default _default;
|
|
@@ -8,18 +8,7 @@ export declare const taglibs: (string | {
|
|
|
8
8
|
taglibId: string;
|
|
9
9
|
"<attrs>": import("@marko/compiler/babel-utils").Tag;
|
|
10
10
|
"<await>": import("@marko/compiler/babel-utils").Tag;
|
|
11
|
-
"<client>":
|
|
12
|
-
parse(tag: import("@marko/compiler/babel-types").NodePath<import("@marko/compiler/babel-types").MarkoTag>): void;
|
|
13
|
-
parseOptions: {
|
|
14
|
-
statement: boolean;
|
|
15
|
-
rawOpenTag: boolean;
|
|
16
|
-
};
|
|
17
|
-
autocomplete: {
|
|
18
|
-
displayText: string;
|
|
19
|
-
description: string;
|
|
20
|
-
descriptionMoreURL: string;
|
|
21
|
-
}[];
|
|
22
|
-
};
|
|
11
|
+
"<client>": import("@marko/compiler/babel-utils").Tag;
|
|
23
12
|
"<const>": import("@marko/compiler/babel-utils").Tag;
|
|
24
13
|
"<debug>": import("@marko/compiler/babel-utils").Tag;
|
|
25
14
|
"<define>": import("@marko/compiler/babel-utils").Tag;
|
|
@@ -136,34 +125,13 @@ export declare const taglibs: (string | {
|
|
|
136
125
|
"<log>": import("@marko/compiler/babel-utils").Tag;
|
|
137
126
|
"<return>": import("@marko/compiler/babel-utils").Tag;
|
|
138
127
|
"<script>": import("@marko/compiler/babel-utils").Tag;
|
|
139
|
-
"<server>":
|
|
140
|
-
|
|
141
|
-
parseOptions: {
|
|
142
|
-
statement: boolean;
|
|
143
|
-
rawOpenTag: boolean;
|
|
144
|
-
};
|
|
145
|
-
autocomplete: {
|
|
146
|
-
displayText: string;
|
|
147
|
-
description: string;
|
|
148
|
-
descriptionMoreURL: string;
|
|
149
|
-
}[];
|
|
150
|
-
};
|
|
151
|
-
"<static>": {
|
|
152
|
-
parse(tag: import("@marko/compiler/babel-types").NodePath<import("@marko/compiler/babel-types").MarkoTag>): void;
|
|
153
|
-
parseOptions: {
|
|
154
|
-
statement: boolean;
|
|
155
|
-
rawOpenTag: boolean;
|
|
156
|
-
};
|
|
157
|
-
autocomplete: {
|
|
158
|
-
displayText: string;
|
|
159
|
-
description: string;
|
|
160
|
-
descriptionMoreURL: string;
|
|
161
|
-
}[];
|
|
162
|
-
};
|
|
128
|
+
"<server>": import("@marko/compiler/babel-utils").Tag;
|
|
129
|
+
"<static>": import("@marko/compiler/babel-utils").Tag;
|
|
163
130
|
"<style>": import("@marko/compiler/babel-utils").Tag;
|
|
164
131
|
"<try>": import("@marko/compiler/babel-utils").Tag;
|
|
165
132
|
})[][];
|
|
166
133
|
export declare function getRuntimeEntryFiles(output: Config["output"], optimize: boolean): string[];
|
|
134
|
+
export { createInteropTranslator } from "./interop";
|
|
167
135
|
declare module "@marko/compiler/dist/types" {
|
|
168
136
|
interface ProgramExtra {
|
|
169
137
|
}
|