marko 6.0.156 → 6.0.158
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/errors.d.ts +2 -0
- package/dist/common/helpers.d.ts +2 -0
- package/dist/debug/dom.js +22 -15
- package/dist/debug/dom.mjs +22 -15
- package/dist/debug/html.js +12 -1
- package/dist/debug/html.mjs +12 -1
- package/dist/dom.d.ts +1 -1
- package/dist/dom.js +4 -0
- package/dist/dom.mjs +4 -0
- package/dist/html/writer.d.ts +1 -1
- package/dist/html.js +4 -1
- package/dist/html.mjs +4 -1
- package/dist/translator/index.js +444 -346
- package/dist/translator/util/known-tag.d.ts +1 -1
- package/dist/translator/util/references.d.ts +5 -1
- package/index.d.ts +1 -1
- package/package.json +2 -2
- package/tags-html.d.ts +1 -1
|
@@ -20,6 +20,6 @@ declare module "@marko/compiler/dist/types" {
|
|
|
20
20
|
}
|
|
21
21
|
export declare function knownTagAnalyze(tag: t.NodePath<t.MarkoTag>, contentSection: Section, propTree: BindingPropTree | undefined): void;
|
|
22
22
|
export declare function knownTagTranslateHTML(tag: t.NodePath<t.MarkoTag>, tagIdentifier: t.Expression, contentSection: Section, propTree: BindingPropTree | undefined): void;
|
|
23
|
-
export declare function knownTagTranslateDOM(tag: t.NodePath<t.MarkoTag>, propTree: BindingPropTree | undefined, getBindingIdentifier: (binding: Binding,
|
|
23
|
+
export declare function knownTagTranslateDOM(tag: t.NodePath<t.MarkoTag>, propTree: BindingPropTree | undefined, getBindingIdentifier: (binding: Binding, preferredName?: string) => t.Identifier, callSetup: (section: Section, childBinding: Binding) => void): void;
|
|
24
24
|
export declare function finalizeKnownTags(section: Section): void;
|
|
25
25
|
export {};
|
|
@@ -63,11 +63,13 @@ export interface Getter {
|
|
|
63
63
|
interface Read {
|
|
64
64
|
binding: Binding;
|
|
65
65
|
extra: t.NodeExtra;
|
|
66
|
+
ownVar: boolean;
|
|
66
67
|
getter: Getter | undefined;
|
|
67
68
|
}
|
|
68
69
|
interface ExtraRead {
|
|
69
70
|
binding: Binding;
|
|
70
71
|
props: Opt<string>;
|
|
72
|
+
ownVar: boolean;
|
|
71
73
|
getter: Getter | undefined;
|
|
72
74
|
}
|
|
73
75
|
declare module "@marko/compiler/dist/types" {
|
|
@@ -107,6 +109,7 @@ export declare function getOrCreatePropertyAlias(binding: Binding, property: str
|
|
|
107
109
|
export declare function trackDomVarReferences(tag: t.NodePath<t.MarkoTag>, binding: Binding): Binding | undefined;
|
|
108
110
|
export declare function trackVarReferences(tag: t.NodePath<t.MarkoTag>, type: BindingType, upstreamAlias?: Binding["upstreamAlias"]): Binding | undefined;
|
|
109
111
|
export declare function trackParamsReferences(body: t.NodePath<t.MarkoTagBody | t.Program>, type: BindingType): Binding | undefined;
|
|
112
|
+
export declare function isReferenceInOwnBody(bindingPath: t.NodePath, reference: t.NodePath): boolean;
|
|
110
113
|
export declare function isReferenceHoisted(bindingPath: t.NodePath, reference: t.NodePath): boolean;
|
|
111
114
|
export declare function setReferencesScope(path: t.NodePath<any>): void;
|
|
112
115
|
export declare function mergeReferences<T extends t.Node>(section: Section, target: T, nodes: (t.Node | undefined)[]): NonNullable<T["extra"]> & ReferencedExtra;
|
|
@@ -139,7 +142,8 @@ export declare function getSectionInstancesAccessorLiteral(section: Section): t.
|
|
|
139
142
|
export declare function getReadReplacement(node: t.Identifier | t.MemberExpression | t.OptionalMemberExpression, signal?: Signal): t.Expression | undefined;
|
|
140
143
|
export declare function hasNonConstantPropertyAlias(ref: Binding): boolean;
|
|
141
144
|
export declare function pruneBinding(binding: Binding): boolean;
|
|
142
|
-
export declare function createRead(binding: Binding, props: Opt<string>,
|
|
145
|
+
export declare function createRead(binding: Binding, props: Opt<string>, ownVar?: boolean): ExtraRead;
|
|
146
|
+
export declare function createGetterRead(binding: Binding, props: Opt<string>, getter: Getter): ExtraRead;
|
|
143
147
|
export declare function getObjectPropertyKeyString(expr: t.ObjectProperty | t.ObjectMethod): string | undefined;
|
|
144
148
|
export interface ReferencedExtra extends t.NodeExtra {
|
|
145
149
|
section: Section;
|
package/index.d.ts
CHANGED
|
@@ -79,7 +79,7 @@ declare global {
|
|
|
79
79
|
/** The top level api for a Marko Template. */
|
|
80
80
|
export abstract class Template<Input = unknown, Return = unknown> {
|
|
81
81
|
/**
|
|
82
|
-
* The
|
|
82
|
+
* The following types are processed up by the @marko/language-tools
|
|
83
83
|
* and inlined into the compiled template.
|
|
84
84
|
*
|
|
85
85
|
* This is done to support generics on each of these methods
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "marko",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.158",
|
|
4
4
|
"description": "Optimized runtime for Marko templates.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"build": "node -r ~ts ./scripts/bundle.ts"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@marko/compiler": "^5.39.
|
|
52
|
+
"@marko/compiler": "^5.39.62",
|
|
53
53
|
"csstype": "^3.2.3",
|
|
54
54
|
"fastest-levenshtein": "^1.0.16",
|
|
55
55
|
"magic-string": "^0.30.21"
|
package/tags-html.d.ts
CHANGED
|
@@ -5673,7 +5673,7 @@ interface CommonAttributes<T extends Element> {
|
|
|
5673
5673
|
/**
|
|
5674
5674
|
* Identifies the element (or elements) that labels the current element.
|
|
5675
5675
|
* @see https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby
|
|
5676
|
-
* @see aria-
|
|
5676
|
+
* @see aria-describedby
|
|
5677
5677
|
*/
|
|
5678
5678
|
"aria-labelledby"?: AttrString;
|
|
5679
5679
|
/**
|