marko 6.0.114 → 6.0.116

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.
@@ -4,5 +4,6 @@ export type BindingPropTree = {
4
4
  props: {
5
5
  [prop: string]: BindingPropTree;
6
6
  } | undefined;
7
+ rest: BindingPropTree | undefined;
7
8
  };
8
9
  export declare function getBindingPropTree(binding: Binding): BindingPropTree;
@@ -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;
@@ -114,6 +114,7 @@ export declare function getDebugNames(refs: ReferencedBindings): string;
114
114
  export declare function getSectionInstancesAccessor(section: Section): string;
115
115
  export declare function getSectionInstancesAccessorLiteral(section: Section): t.StringLiteral | t.NumericLiteral | undefined;
116
116
  export declare function getReadReplacement(node: t.Identifier | t.MemberExpression | t.OptionalMemberExpression): t.Expression | undefined;
117
+ export declare function getObjectPropertyKeyString(expr: t.ObjectProperty | t.ObjectMethod): string | undefined;
117
118
  export interface ReferencedExtra extends t.NodeExtra {
118
119
  section: Section;
119
120
  }
@@ -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>, templateExports?: TemplateExports, statements?: t.Statement[], contentKey?: ContentKey): {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "6.0.114",
3
+ "version": "6.0.116",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",
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