marko 6.0.115 → 6.0.117
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 +4 -0
- package/dist/debug/dom.mjs +4 -0
- package/dist/debug/html.js +4 -4
- package/dist/debug/html.mjs +3 -3
- package/dist/dom/dom.d.ts +1 -0
- package/dist/dom.d.ts +1 -1
- package/dist/dom.js +4 -0
- package/dist/dom.mjs +4 -0
- package/dist/html/content.d.ts +1 -1
- package/dist/html.d.ts +1 -1
- package/dist/html.js +4 -4
- package/dist/html.mjs +3 -3
- package/dist/translator/core/index.d.ts +1 -0
- package/dist/translator/core/title.d.ts +10 -0
- package/dist/translator/index.d.ts +1 -0
- package/dist/translator/index.js +779 -343
- package/dist/translator/util/binding-prop-tree.d.ts +1 -0
- package/dist/translator/util/optional.d.ts +1 -0
- package/dist/translator/util/references.d.ts +2 -0
- package/dist/translator/util/translate-attrs.d.ts +2 -1
- package/package.json +1 -1
- package/tags-html.d.ts +5 -0
|
@@ -19,6 +19,7 @@ export declare function size<T>(data: Opt<T>): number;
|
|
|
19
19
|
export declare function filter<T>(data: Opt<T>, cb: (item: T) => boolean): Opt<T>;
|
|
20
20
|
export declare function forEach<T>(data: Opt<T>, cb: (item: T, index: number) => void): void;
|
|
21
21
|
export declare function fromIter<T>(data: Iterable<T>): T | Many<T> | undefined;
|
|
22
|
+
export declare function toIter<T>(data: Opt<T>): Iterable<T>;
|
|
22
23
|
export declare function find<T>(data: Opt<T>, cb: (item: T, index: number) => boolean): Opt<T>;
|
|
23
24
|
export declare function toArray<T, R>(data: Opt<T>, cb: (item: T, index: number) => R): R[];
|
|
24
25
|
export declare function mapToString<T>(data: Opt<T>, sep: string, cb: (item: T, index: number) => string): string;
|
|
@@ -100,6 +100,7 @@ export declare function createSources(state: Sources["state"], param: Sources["p
|
|
|
100
100
|
export declare function compareSources(a: Sources, b: Sources): number;
|
|
101
101
|
export declare function mergeSources(a: undefined | Sources, b: undefined | Sources): Sources | undefined;
|
|
102
102
|
export declare const bindingUtil: Sorted<Binding>;
|
|
103
|
+
export declare const propsUtil: Sorted<string>;
|
|
103
104
|
export declare function dropReferences(node: t.Node | t.Node[]): void;
|
|
104
105
|
export declare function getCanonicalBinding(binding: Binding): Binding;
|
|
105
106
|
export declare function getAllTagReferenceNodes(tag: t.MarkoTag, referenceNodes?: t.Node[]): t.Node[];
|
|
@@ -114,6 +115,7 @@ export declare function getDebugNames(refs: ReferencedBindings): string;
|
|
|
114
115
|
export declare function getSectionInstancesAccessor(section: Section): string;
|
|
115
116
|
export declare function getSectionInstancesAccessorLiteral(section: Section): t.StringLiteral | t.NumericLiteral | undefined;
|
|
116
117
|
export declare function getReadReplacement(node: t.Identifier | t.MemberExpression | t.OptionalMemberExpression): t.Expression | undefined;
|
|
118
|
+
export declare function getObjectPropertyKeyString(expr: t.ObjectProperty | t.ObjectMethod): string | undefined;
|
|
117
119
|
export interface ReferencedExtra extends t.NodeExtra {
|
|
118
120
|
section: Section;
|
|
119
121
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { types as t } from "@marko/compiler";
|
|
2
2
|
import { type TemplateExports } from "../visitors/program";
|
|
3
|
+
import type { BindingPropTree } from "./binding-prop-tree";
|
|
3
4
|
import { type AttrTagLookup } from "./nested-attribute-tags";
|
|
4
5
|
type ContentKey = "renderBody" | "content";
|
|
5
|
-
export declare function translateAttrs(tag: t.NodePath<t.MarkoTag>,
|
|
6
|
+
export declare function translateAttrs(tag: t.NodePath<t.MarkoTag>, propTree?: BindingPropTree, skip?: Set<string>, statements?: t.Statement[], contentKey?: ContentKey): {
|
|
6
7
|
properties: (t.ObjectMethod | t.ObjectProperty | t.SpreadElement)[];
|
|
7
8
|
statements: t.Statement[];
|
|
8
9
|
};
|
package/package.json
CHANGED
package/tags-html.d.ts
CHANGED
|
@@ -3813,6 +3813,11 @@ declare global {
|
|
|
3813
3813
|
interface SVG
|
|
3814
3814
|
extends SVGAttributes<SVGSVGElement>,
|
|
3815
3815
|
SVGConditionalProcessingAttributes {
|
|
3816
|
+
/**
|
|
3817
|
+
* @see https://www.w3.org/TR/xml-names/#ns-decl
|
|
3818
|
+
*/
|
|
3819
|
+
xmlns?: AttrString;
|
|
3820
|
+
|
|
3816
3821
|
/**
|
|
3817
3822
|
* A list of four numbers `<min-x>`, `<min-y>`, `<width>` and `<height>`, separated by whitespace and/or a comma
|
|
3818
3823
|
* @see https://www.w3.org/TR/SVG2/coords.html#ViewBoxAttribute
|