@animaapp/anima-sdk 0.4.4 → 0.5.0

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/index.d.ts CHANGED
@@ -15,13 +15,13 @@ export declare class Anima {
15
15
  protected hasAuth(): boolean;
16
16
  set auth(auth: Auth);
17
17
  protected get headers(): Record<string, string>;
18
- generateCode(params: GetCodeParams, handler?: GetCodeHandler): Promise<AnimaSDKResult>;
18
+ generateCode(params: GetCodeParams, handler?: GetCodeHandler, signal?: AbortSignal): Promise<AnimaSDKResult>;
19
19
  /**
20
20
  * @experimental
21
21
  * This API is experimental and may change or be removed in future releases.
22
22
  * Link2Code (l2c) flow.
23
23
  */
24
- generateLink2Code(params: GetLink2CodeParams, handler?: GetLink2CodeHandler): Promise<AnimaSDKResult>;
24
+ generateLink2Code(params: GetLink2CodeParams, handler?: GetLink2CodeHandler, signal?: AbortSignal): Promise<AnimaSDKResult>;
25
25
  }
26
26
 
27
27
  export declare type AnimaFiles = Record<string, {
@@ -106,6 +106,7 @@ export declare type CodegenSettings = {
106
106
  allowAutoSelectFirstNode?: boolean;
107
107
  enableDisplayScreenModelId?: boolean;
108
108
  enableGeneratePackageLock?: boolean;
109
+ codegenSettings?: Record<string, unknown>;
109
110
  };
110
111
 
111
112
  /**
@@ -189,7 +190,7 @@ export declare const findChildrenNode: (node: FigmaNode, targetNodeId: string) =
189
190
 
190
191
  export declare const formatToFigmaLink: ({ fileKey, nodeId, duplicate, }: {
191
192
  fileKey: string;
192
- nodeId: string;
193
+ nodeId?: string;
193
194
  duplicate?: boolean;
194
195
  }) => URL;
195
196
 
@@ -237,9 +238,9 @@ export declare type GetCodeParams = {
237
238
 
238
239
  export declare const getFigmaApiErrorType: (error: Error) => FigmaApiErrorType;
239
240
 
240
- export declare const getFigmaFile: ({ fileKey, authToken, figmaRestApi, params, }: GetFilePagesParams) => Promise<GetFileResponse>;
241
+ export declare const getFigmaFile: ({ fileKey, authToken, figmaRestApi, params, signal, }: GetFilePagesParams) => Promise<GetFileResponse>;
241
242
 
242
- export declare const getFileNodes: ({ fileKey, authToken, nodeIds, figmaRestApi, params, }: GetFileNodesParams) => Promise<{
243
+ export declare const getFileNodes: ({ fileKey, authToken, nodeIds, figmaRestApi, params, signal, }: GetFileNodesParams) => Promise<{
243
244
  [key: string]: {
244
245
  document: Node_2;
245
246
  components: {
@@ -261,6 +262,7 @@ export declare type GetFileNodesParams = {
261
262
  nodeIds: string[];
262
263
  figmaRestApi?: FigmaRestApi;
263
264
  params?: Record<string, string | number>;
265
+ signal?: AbortSignal;
264
266
  };
265
267
 
266
268
  export declare type GetFilePagesParams = {
@@ -268,6 +270,7 @@ export declare type GetFilePagesParams = {
268
270
  authToken?: string;
269
271
  figmaRestApi?: FigmaRestApi;
270
272
  params?: Record<string, string | number | undefined>;
273
+ signal?: AbortSignal;
271
274
  };
272
275
 
273
276
  export declare type GetFilePagesResult = FigmaPage[] | undefined;
@@ -361,6 +364,7 @@ export declare type L2CParamsReactConvention = {
361
364
  framework: 'react';
362
365
  language: L2CParamsLanguage;
363
366
  styling: L2CParamsStyling;
367
+ enableGeneratePackageLock?: boolean;
364
368
  };
365
369
 
366
370
  export declare type L2CParamsStyling = 'tailwind' | 'inline-styles';