@animaapp/anima-sdk 0.2.4 → 0.2.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@animaapp/anima-sdk",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "type": "module",
5
5
  "description": "Anima's JavaScript utilities library",
6
6
  "author": "Anima App, Inc.",
package/src/anima.ts CHANGED
@@ -73,6 +73,7 @@ export class Anima {
73
73
  Accept: "text/event-stream",
74
74
  },
75
75
  body: JSON.stringify({
76
+ tracking: params.tracking,
76
77
  fileKey: params.fileKey,
77
78
  figmaToken: params.figmaToken,
78
79
  nodesId: params.nodesId,
@@ -87,6 +88,7 @@ export class Anima {
87
88
  enableCompactStructure: settings.enableCompactStructure,
88
89
  enableAutoSplit: settings.enableAutoSplit,
89
90
  autoSplitThreshold: settings.autoSplitThreshold,
91
+ disableMarkedForExport: settings.disableMarkedForExport,
90
92
  }),
91
93
  });
92
94
 
package/src/settings.ts CHANGED
@@ -3,6 +3,7 @@ import { z } from "zod";
3
3
  const CodegenSettingsSchema = z
4
4
  .object({
5
5
  language: z.enum(["typescript", "javascript"]).optional(),
6
+ disableMarkedForExport: z.boolean().optional(),
6
7
  })
7
8
  .and(
8
9
  z.union([
@@ -51,6 +52,7 @@ export type CodegenSettings = {
51
52
  enableCompactStructure?: boolean;
52
53
  enableAutoSplit?: boolean;
53
54
  autoSplitThreshold?: number;
55
+ disableMarkedForExport?: boolean;
54
56
  };
55
57
 
56
58
  export const validateSettings = (obj: unknown): CodegenSettings => {
package/src/types.ts CHANGED
@@ -29,12 +29,17 @@ export type AssetsStorage =
29
29
  | { strategy: "host" }
30
30
  | { strategy: "external"; url: string };
31
31
 
32
+ export type TrackingInfos = {
33
+ externalId: string;
34
+ }
35
+
32
36
  export type GetCodeParams = {
33
37
  fileKey: string;
34
38
  figmaToken?: string;
35
39
  nodesId: string[];
36
40
  assetsStorage?: AssetsStorage;
37
41
  settings: CodegenSettings;
42
+ tracking?: TrackingInfos;
38
43
  };
39
44
 
40
45
  export type GetCodeHandler =