framer-api 0.0.1-alpha.5 → 0.0.1-alpha.7

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
@@ -43,6 +43,7 @@ interface Breakpoint {
43
43
 
44
44
  type LintRuleNameValue = "forbid-browser-apis";
45
45
  type LintIssueSeverityValue = "error" | "warning";
46
+ /** @deprecated The lintCode API was removed. This type will be removed in the near future. */
46
47
  type LintConfig = Record<LintRuleNameValue, LintIssueSeverityValue>;
47
48
  interface DiagnosticBase {
48
49
  message: string;
@@ -57,10 +58,12 @@ interface DiagnosticSpan {
57
58
  /** The last character, 0-based. */
58
59
  end: ts.LineAndCharacter;
59
60
  }
61
+ /** @deprecated The lintCode API was removed. This type will be removed in the near future. */
60
62
  interface LintLink {
61
63
  url: string;
62
64
  text: string;
63
65
  }
66
+ /** @deprecated The lintCode API was removed. This type will be removed in the near future. */
64
67
  interface LintDiagnostic extends DiagnosticBase {
65
68
  /** The span of the invalid code in the file. */
66
69
  span: DiagnosticSpan;
@@ -82,6 +85,7 @@ interface TypecheckDiagnostic extends DiagnosticBase {
82
85
  declare const getAiServiceInfo: unique symbol;
83
86
  declare const sendTrackingEvent: unique symbol;
84
87
  declare const environmentInfo: unique symbol;
88
+ declare const initialState: unique symbol;
85
89
  declare const showUncheckedPermissionToasts: unique symbol;
86
90
  declare const marshal: unique symbol;
87
91
  declare const unmarshal: unique symbol;
@@ -91,6 +95,7 @@ declare const $framerInternal: {
91
95
  readonly getAiServiceInfo: typeof getAiServiceInfo;
92
96
  readonly sendTrackingEvent: typeof sendTrackingEvent;
93
97
  readonly environmentInfo: typeof environmentInfo;
98
+ readonly initialState: typeof initialState;
94
99
  readonly showUncheckedPermissionToasts: typeof showUncheckedPermissionToasts;
95
100
  readonly marshal: typeof marshal;
96
101
  readonly unmarshal: typeof unmarshal;
@@ -1476,15 +1481,19 @@ interface WithDateVariableClass {
1476
1481
  interface WithDateVariableType {
1477
1482
  type: typeof dateVariableType;
1478
1483
  }
1479
- interface DateVariableData extends WithDateVariableClass, BaseVariableData, ExplicitPartial<WithStringDefaultValue> {
1484
+ interface WithDisplayTime {
1485
+ displayTime?: boolean;
1480
1486
  }
1481
- interface CreateDateVariable extends WithDateVariableType, CreateVariableBase, Partial<WithStringDefaultValue> {
1487
+ interface DateVariableData extends WithDateVariableClass, BaseVariableData, ExplicitPartial<WithStringDefaultValue>, WithDisplayTime {
1482
1488
  }
1483
- interface UpdateDateVariable extends WithDateVariableType, UpdateVariableBase, Partial<WithStringDefaultValue> {
1489
+ interface CreateDateVariable extends WithDateVariableType, CreateVariableBase, Partial<WithStringDefaultValue>, Partial<WithDisplayTime> {
1490
+ }
1491
+ interface UpdateDateVariable extends WithDateVariableType, UpdateVariableBase, Partial<WithStringDefaultValue>, Partial<WithDisplayTime> {
1484
1492
  }
1485
1493
  declare class DateVariable extends VariableBase {
1486
1494
  #private;
1487
1495
  readonly type: "date";
1496
+ get displayTime(): boolean | undefined;
1488
1497
  constructor(engine: PluginEngine, data: DateVariableData);
1489
1498
  static [$framerInternal.unmarshal](engine: PluginEngine, data: DateVariableData): DateVariable;
1490
1499
  [$framerInternal.marshal](): DateVariableData;
@@ -1628,7 +1637,10 @@ declare class LinkField extends FieldBaseWithRequired {
1628
1637
  readonly type = "link";
1629
1638
  }
1630
1639
  declare class DateField extends FieldBaseWithRequired {
1640
+ #private;
1631
1641
  readonly type = "date";
1642
+ get displayTime(): boolean | undefined;
1643
+ constructor(engine: PluginEngine, collectionId: string, data: DateFieldDefinitionData);
1632
1644
  }
1633
1645
  declare class FieldDivider extends FieldBase {
1634
1646
  readonly type = "divider";
@@ -2110,6 +2122,7 @@ declare const dateFieldType = "date";
2110
2122
  type DateFieldType = typeof dateFieldType;
2111
2123
  interface DateFieldBase {
2112
2124
  type: DateFieldType;
2125
+ displayTime?: boolean;
2113
2126
  }
2114
2127
  interface DateFieldDefinitionData extends DateFieldBase, WithFieldRequired, FieldDefinitionBase {
2115
2128
  }
@@ -3057,7 +3070,10 @@ declare class CodeFile implements Navigable {
3057
3070
  showProgressOnInstances(attributes?: ShowProgressOnInstancesAttributes): Promise<void>;
3058
3071
  /** @alpha */
3059
3072
  removeProgressFromInstances(): Promise<void>;
3060
- lint(rules: LintConfig): Promise<LintDiagnostic[]>;
3073
+ /**
3074
+ * @deprecated The implementation of this method was removed. The method will always return an empty array. The method will be removed in the near future.
3075
+ */
3076
+ lint(_rules: LintConfig): Promise<LintDiagnostic[]>;
3061
3077
  typecheck(compilerOptions?: ts.server.protocol.CompilerOptions): Promise<TypecheckDiagnostic[]>;
3062
3078
  /**
3063
3079
  * Navigate to this code file. May switch modes to reveal the relevant view.
@@ -3142,45 +3158,22 @@ interface DragCompleteError {
3142
3158
  type DragCompleteResult = DragCompleteSuccess | DragCompleteError;
3143
3159
  type DragCompleteCallback = (result: DragCompleteResult) => void;
3144
3160
 
3145
- interface SeparatorMenuItem {
3146
- type: "separator";
3147
- }
3148
- interface NormalMenuItem {
3149
- type?: never;
3150
- label: string;
3151
- secondaryLabel?: string;
3152
- enabled?: boolean;
3153
- visible?: boolean;
3154
- checked?: boolean;
3155
- submenu?: MenuItem[];
3156
- onAction?: () => void;
3157
- }
3158
- type MenuItem = NormalMenuItem | SeparatorMenuItem;
3159
- type NormalMenuItemSerializable = Omit<NormalMenuItem, "onAction" | "submenu"> & {
3160
- actionId?: number;
3161
- submenu?: MenuItemSerializable[];
3161
+ declare const publish: unique symbol;
3162
+ declare const getDeployments: unique symbol;
3163
+ declare const deploy: unique symbol;
3164
+ declare const getChangedPaths: unique symbol;
3165
+ declare const getChangeContributors: unique symbol;
3166
+ declare const createManagedCollection: unique symbol;
3167
+ declare const rejectAllPending: unique symbol;
3168
+ declare const $framerApiOnly: {
3169
+ readonly publish: typeof publish;
3170
+ readonly getDeployments: typeof getDeployments;
3171
+ readonly deploy: typeof deploy;
3172
+ readonly getChangedPaths: typeof getChangedPaths;
3173
+ readonly getChangeContributors: typeof getChangeContributors;
3174
+ readonly createManagedCollection: typeof createManagedCollection;
3175
+ readonly rejectAllPending: typeof rejectAllPending;
3162
3176
  };
3163
- type MenuItemSerializable = NormalMenuItemSerializable | SeparatorMenuItem;
3164
- type MenuPlacementVertical = "top" | "bottom";
3165
- type MenuPlacementHorizontal = "left" | "right";
3166
- type MenuPlacement = MenuPlacementVertical | MenuPlacementHorizontal | `${MenuPlacementVertical}-${MenuPlacementHorizontal}`;
3167
- interface ContextMenuConfig {
3168
- /**
3169
- * Coordinates of the anchor point.
3170
- */
3171
- location: {
3172
- x: number;
3173
- y: number;
3174
- };
3175
- /**
3176
- * Placement of the menu relative to the anchor point.
3177
- */
3178
- placement?: MenuPlacement;
3179
- /**
3180
- * Sets fixed width for the menu. If not set, the menu width is based on the content.
3181
- */
3182
- width?: number;
3183
- }
3184
3177
 
3185
3178
  type Ownership = {
3186
3179
  type: "project";
@@ -3230,7 +3223,7 @@ type NamespaceMembers<Class, Namespace extends string, Parent = undefined> = {
3230
3223
  [Member in Exclude<keyof Class, keyof Parent> as Member extends string ? `${Namespace}.${Member}` : never]: Class[Member];
3231
3224
  };
3232
3225
  type AllMembers = Omit<FramerPluginAPIAlpha, "isAllowedTo" | "subscribeToIsAllowedTo"> & NamespaceMembers<ImageAsset, "ImageAsset"> & NamespaceMembers<CodeFile, "CodeFile"> & NamespaceMembers<CodeFileVersion, "CodeFileVersion"> & NamespaceMembers<ComponentInstancePlaceholder, "ComponentInstancePlaceholder"> & NamespaceMembers<Field, "Field"> & NamespaceMembers<BooleanField, "BooleanField", Field> & NamespaceMembers<ColorField, "ColorField", Field> & NamespaceMembers<NumberField, "NumberField", Field> & NamespaceMembers<StringField, "StringField", Field> & NamespaceMembers<FormattedTextField, "FormattedTextField", Field> & NamespaceMembers<ImageField, "ImageField", Field> & NamespaceMembers<LinkField, "LinkField", Field> & NamespaceMembers<DateField, "DateField", Field> & NamespaceMembers<FieldDivider, "FieldDivider", Field> & NamespaceMembers<UnsupportedField, "UnsupportedField", Field> & NamespaceMembers<FileField, "FileField", Field> & NamespaceMembers<EnumField, "EnumField", Field> & NamespaceMembers<CollectionReferenceField, "CollectionReferenceField", Field> & NamespaceMembers<MultiCollectionReferenceField, "MultiCollectionReferenceField", Field> & NamespaceMembers<ManagedCollection, "ManagedCollection"> & NamespaceMembers<Collection, "Collection"> & NamespaceMembers<CollectionItem, "CollectionItem"> & NamespaceMembers<NodeMethods, "Node"> & NamespaceMembers<FrameNode, "FrameNode", NodeMethods> & NamespaceMembers<TextNode, "TextNode", NodeMethods> & NamespaceMembers<SVGNode, "SVGNode", NodeMethods> & NamespaceMembers<ComponentInstanceNode, "ComponentInstanceNode", NodeMethods> & NamespaceMembers<WebPageNode, "WebPageNode", NodeMethods> & NamespaceMembers<ComponentNode, "ComponentNode", NodeMethods> & NamespaceMembers<UnknownNode, "UnknownNode", NodeMethods> & NamespaceMembers<ColorStyle, "ColorStyle"> & NamespaceMembers<TextStyle, "TextStyle"> & NamespaceMembers<Variable, "Variable"> & NamespaceMembers<BooleanVariable, "BooleanVariable", Variable> & NamespaceMembers<NumberVariable, "NumberVariable", Variable> & NamespaceMembers<StringVariable, "StringVariable", Variable> & NamespaceMembers<FormattedTextVariable, "FormattedTextVariable", Variable> & NamespaceMembers<EnumCase, "EnumCase"> & NamespaceMembers<EnumVariable, "EnumVariable", Variable> & NamespaceMembers<ColorVariable, "ColorVariable", Variable> & NamespaceMembers<ImageVariable, "ImageVariable", Variable> & NamespaceMembers<FileVariable, "FileVariable", Variable> & NamespaceMembers<LinkVariable, "LinkVariable", Variable> & NamespaceMembers<DateVariable, "DateVariable", Variable> & NamespaceMembers<BorderVariable, "BorderVariable", Variable> & NamespaceMembers<UnsupportedVariable, "UnsupportedVariable", Variable> & NamespaceMembers<VectorSet, "VectorSet"> & NamespaceMembers<VectorSetItem, "VectorSetItem">;
3233
- declare const unprotectedMessageTypesSource: ["closeNotification", "closePlugin", "getActiveCollection", "getActiveLocale", "getActiveManagedCollection", "getCanvasRoot", "getChildren", "getCollection", "getCollectionFields", "getCollectionFields2", "getCollectionItems", "getCollectionItems2", "getCollections", "getColorStyle", "getColorStyles", "getCurrentUser", "getCurrentUser2", "getCustomCode", "getDefaultLocale", "getFont", "getFonts", "getImage", "getImageData", "getLocales", "getLocalizationGroups", "getManagedCollection", "getManagedCollectionFields", "getManagedCollectionFields2", "getManagedCollectionItemIds", "getManagedCollections", "getNode", "getNodesWithAttribute", "getNodesWithAttributeSet", "getNodesWithType", "getParent", "getPluginData", "getPluginDataForNode", "getPluginDataKeys", "getPluginDataKeysForNode", "getProjectInfo", "getProjectInfo2", "getPublishInfo", "getRect", "getSelection", "getSVGForNode", "getText", "getTextForNode", "getTextStyle", "getTextStyles", "hideUI", "setBackgroundMessage", "notify", "onPointerDown", "setActiveCollection", "setSelection", "showUI", "getCodeFileVersionContent", "lintCode", "typecheckCode", "getCodeFileVersions", "getCodeFiles", "getCodeFile", "getRedirects", "uploadFile", "uploadFiles", "uploadImage", "uploadImages", "zoomIntoView", "navigateTo", "getRuntimeErrorForModule", "getRuntimeErrorForCodeComponentNode", "showProgressOnInstances", "removeProgressFromInstances", "addComponentInstancePlaceholder", "updateComponentInstancePlaceholder", "removeComponentInstancePlaceholder", "setMenu", "showContextMenu", "getBreakpointSuggestionsForWebPage", "getActiveCollectionItemForWebPage", "getVariables", "getVectorSets", "getVectorSetItems", "getVectorSetItemVariables", "getChangedPagePaths", "getChangeAuthors", "INTERNAL_getAiServiceInfo", "INTERNAL_sendTrackingEvent", "INTERNAL_getHTMLForNode", "getAiServiceInfo", "sendTrackingEvent", "unstable_getCodeFile", "unstable_getCodeFiles", "unstable_getCodeFileVersionContent", "unstable_getCodeFileLint2", "unstable_getCodeFileTypecheck2", "unstable_getCodeFileVersions"];
3226
+ declare const unprotectedMessageTypesSource: ["closeNotification", "closePlugin", "setCloseWarning", "getActiveCollection", "getActiveLocale", "getActiveManagedCollection", "getCanvasRoot", "getChildren", "getCollection", "getCollectionFields", "getCollectionFields2", "getCollectionItems", "getCollectionItems2", "getCollections", "getColorStyle", "getColorStyles", "getCurrentUser", "getCurrentUser2", "getCustomCode", "getDefaultLocale", "getFont", "getFonts", "getImage", "getImageData", "getLocales", "getLocalizationGroups", "getManagedCollection", "getManagedCollectionFields", "getManagedCollectionFields2", "getManagedCollectionItemIds", "getManagedCollections", "getNode", "getNodesWithAttribute", "getNodesWithAttributeSet", "getNodesWithType", "getParent", "getPluginData", "getPluginDataForNode", "getPluginDataKeys", "getPluginDataKeysForNode", "getProjectInfo", "getProjectInfo2", "getPublishInfo", "getRect", "getSelection", "getSVGForNode", "getText", "getTextForNode", "getTextStyle", "getTextStyles", "hideUI", "setBackgroundMessage", "notify", "onPointerDown", "setActiveCollection", "setSelection", "showUI", "getCodeFileVersionContent", "typecheckCode", "getCodeFileVersions", "getCodeFiles", "getCodeFile", "getRedirects", "uploadFile", "uploadFiles", "uploadImage", "uploadImages", "zoomIntoView", "navigateTo", "getRuntimeErrorForModule", "getRuntimeErrorForCodeComponentNode", "showProgressOnInstances", "removeProgressFromInstances", "addComponentInstancePlaceholder", "updateComponentInstancePlaceholder", "removeComponentInstancePlaceholder", "setMenu", "showContextMenu", "getBreakpointSuggestionsForWebPage", "getActiveCollectionItemForWebPage", "getVariables", "getVectorSets", "getVectorSetItems", "getVectorSetItemVariables", "getChangedPaths", "getChangeContributors", "getDeployments", "INTERNAL_getAiServiceInfo", "INTERNAL_sendTrackingEvent", "INTERNAL_getHTMLForNode", "getAiServiceInfo", "sendTrackingEvent", "unstable_getCodeFile", "unstable_getCodeFiles", "unstable_getCodeFileVersionContent", "unstable_getCodeFileLint2", "unstable_getCodeFileTypecheck2", "unstable_getCodeFileVersions", "lintCode"];
3234
3227
  type UnprotectedMessageType = (typeof unprotectedMessageTypesSource)[number];
3235
3228
  type ProtectedMessageType = Exclude<keyof PluginMessageAPI, UnprotectedMessageType>;
3236
3229
  type Method = keyof {
@@ -3295,7 +3288,8 @@ declare const methodToMessageTypes: {
3295
3288
  readonly hideUI: [];
3296
3289
  /** @beta */
3297
3290
  readonly setBackgroundMessage: [];
3298
- /** @beta */
3291
+ readonly setCloseWarning: [];
3292
+ /** @deprecated The lintCode API was removed. */
3299
3293
  readonly lintCode: [];
3300
3294
  readonly makeDraggable: ["onDragEnd", "onDragStart", "onDrag", "setDragData", "preloadDetachedComponentLayers", "preloadImageUrlForInsertion", "preloadDragPreviewImage"];
3301
3295
  readonly notify: [];
@@ -3369,10 +3363,10 @@ declare const methodToMessageTypes: {
3369
3363
  /** @alpha */
3370
3364
  readonly "ComponentInstancePlaceholder.replaceWithComponentInstance": ["replaceComponentInstancePlaceholderWithComponentInstance"];
3371
3365
  readonly "Field.remove": ["removeCollectionFields"];
3372
- readonly "Field.setAttributes": ["addCollectionFields"];
3366
+ readonly "Field.setAttributes": ["addCollectionFields2"];
3373
3367
  readonly "EnumField.addCase": ["addEnumCase"];
3374
3368
  readonly "EnumField.setCaseOrder": ["setEnumCaseOrder"];
3375
- readonly "Collection.addFields": ["addCollectionFields"];
3369
+ readonly "Collection.addFields": ["addCollectionFields2"];
3376
3370
  readonly "Collection.addItems": ["addCollectionItems2"];
3377
3371
  readonly "Collection.getFields": [];
3378
3372
  readonly "Collection.getItems": [];
@@ -3454,22 +3448,24 @@ declare const methodToMessageTypes: {
3454
3448
  readonly "EnumVariable.addCase": ["addEnumCase"];
3455
3449
  /** @alpha */
3456
3450
  readonly "EnumVariable.setCaseOrder": ["setEnumCaseOrder"];
3457
- /** @alpha */
3458
- readonly publish: ["publish"];
3459
- /** @alpha */
3460
- readonly getChangedPagePaths: [];
3461
- /** @alpha */
3462
- readonly getChangeAuthors: [];
3463
- /** @alpha */
3451
+ readonly createCollection: ["createCollection"];
3464
3452
  readonly createManagedCollection: ["createManagedCollection"];
3465
3453
  readonly [getAiServiceInfo]: [];
3466
3454
  readonly [sendTrackingEvent]: [];
3467
3455
  readonly [getHTMLForNode]: [];
3468
3456
  readonly [setHTMLForNode]: [];
3457
+ readonly [publish]: ["publish"];
3458
+ readonly [getDeployments]: [];
3459
+ readonly [deploy]: ["deploy"];
3460
+ readonly [getChangedPaths]: [];
3461
+ readonly [getChangeContributors]: [];
3462
+ readonly [createManagedCollection]: ["createManagedCollection"];
3463
+ readonly [rejectAllPending]: [];
3469
3464
  };
3470
- type ProtectedMethod = keyof {
3465
+ type AllMethods = keyof {
3471
3466
  [K in Method as (typeof methodToMessageTypes)[K] extends [] ? never : K]: (typeof methodToMessageTypes)[K];
3472
3467
  };
3468
+ type ProtectedMethod = AllMethods & string;
3473
3469
  type PerMethodPermissionMap = {
3474
3470
  [K in ProtectedMethod]: boolean;
3475
3471
  };
@@ -3485,6 +3481,23 @@ interface PublishInfo {
3485
3481
  production: Publish | null;
3486
3482
  staging: Publish | null;
3487
3483
  }
3484
+ interface Deployment {
3485
+ id: string;
3486
+ createdAt: string;
3487
+ updatedAt: string;
3488
+ }
3489
+ type HostnameType = "default" | "custom" | "version";
3490
+ interface Hostname {
3491
+ hostname: string;
3492
+ type: HostnameType;
3493
+ isPrimary: boolean;
3494
+ isPublished: boolean;
3495
+ deploymentId: string;
3496
+ }
3497
+ interface PublishResult {
3498
+ deployment: Deployment;
3499
+ hostnames: Hostname[];
3500
+ }
3488
3501
 
3489
3502
  interface RedirectAttributes {
3490
3503
  /** The source path to redirect from */
@@ -3657,6 +3670,55 @@ type PluginSubscriptionEvent = PluginSubscriptionPublishInfo | PluginSubscriptio
3657
3670
  type PluginSubscriptionTopic = PluginSubscriptionEvent["topic"];
3658
3671
  type PluginToVekterMessage = PluginMethodInvocation | PluginSubscription | PluginReadySignal;
3659
3672
 
3673
+ type PickModes<T extends Mode> = Extract<Mode, T>;
3674
+ type InitialState = {
3675
+ mode: Mode;
3676
+ intent: "plugin/open";
3677
+ } | {
3678
+ mode: PickModes<"collection" | "syncManagedCollection" | "configureManagedCollection">;
3679
+ intent: "collection/add";
3680
+ };
3681
+
3682
+ interface SeparatorMenuItem {
3683
+ type: "separator";
3684
+ }
3685
+ interface NormalMenuItem {
3686
+ type?: never;
3687
+ label: string;
3688
+ secondaryLabel?: string;
3689
+ enabled?: boolean;
3690
+ visible?: boolean;
3691
+ checked?: boolean;
3692
+ submenu?: MenuItem[];
3693
+ onAction?: () => void;
3694
+ }
3695
+ type MenuItem = NormalMenuItem | SeparatorMenuItem;
3696
+ type NormalMenuItemSerializable = Omit<NormalMenuItem, "onAction" | "submenu"> & {
3697
+ actionId?: number;
3698
+ submenu?: MenuItemSerializable[];
3699
+ };
3700
+ type MenuItemSerializable = NormalMenuItemSerializable | SeparatorMenuItem;
3701
+ type MenuPlacementVertical = "top" | "bottom";
3702
+ type MenuPlacementHorizontal = "left" | "right";
3703
+ type MenuPlacement = MenuPlacementVertical | MenuPlacementHorizontal | `${MenuPlacementVertical}-${MenuPlacementHorizontal}`;
3704
+ interface ContextMenuConfig {
3705
+ /**
3706
+ * Coordinates of the anchor point.
3707
+ */
3708
+ location: {
3709
+ x: number;
3710
+ y: number;
3711
+ };
3712
+ /**
3713
+ * Placement of the menu relative to the anchor point.
3714
+ */
3715
+ placement?: MenuPlacement;
3716
+ /**
3717
+ * Sets fixed width for the menu. If not set, the menu width is based on the content.
3718
+ */
3719
+ width?: number;
3720
+ }
3721
+
3660
3722
  type NotificationVariant = "info" | "success" | "error" | "warning";
3661
3723
  interface NotifyOptionsBase {
3662
3724
  /** The Notification variant for styling of the notification. Defaults to "info" */
@@ -3852,7 +3914,7 @@ declare class FramerPluginAPI {
3852
3914
  /** Add a component instance by module URL. */
3853
3915
  addComponentInstance({ url, attributes, parentId, }: AddComponentInstanceOptions): Promise<ComponentInstanceNode>;
3854
3916
  /** Adds the layers of a component by module URL. */
3855
- addDetachedComponentLayers({ url, layout, attributes, }: AddDetachedComponentLayersOptions): Promise<FrameNode>;
3917
+ addDetachedComponentLayers({ url, layout, attributes }: AddDetachedComponentLayersOptions): Promise<FrameNode>;
3856
3918
  /** Preload the component layers for detached insertion. */
3857
3919
  preloadDetachedComponentLayers(url: string): Promise<void>;
3858
3920
  preloadImageUrlForInsertion(url: string): Promise<void>;
@@ -3952,7 +4014,9 @@ declare class FramerPluginAPI {
3952
4014
  /** Set the order of redirects */
3953
4015
  setRedirectOrder(redirectIds: string[]): Promise<void>;
3954
4016
  /** Create a new code file */
3955
- createCodeFile(name: string, code: string): Promise<CodeFile>;
4017
+ createCodeFile(name: string, code: string, options?: {
4018
+ editViaPlugin?: boolean;
4019
+ }): Promise<CodeFile>;
3956
4020
  /** Get an array of all code files */
3957
4021
  getCodeFiles(): Promise<readonly CodeFile[]>;
3958
4022
  /** Get a specific code file */
@@ -3963,15 +4027,19 @@ declare class FramerPluginAPI {
3963
4027
  * @param fileName - The name of the code file, must include the extension. Use `*.tsx` for TSX files, otherwise the React JSX syntax will be rejected.
3964
4028
  * @param content - The content of the code file.
3965
4029
  * @param rules - The rules to use for linting.
4030
+ *
4031
+ * @deprecated The implementation of this method was removed. The method will always return an empty array. The method will be removed in the near future.
3966
4032
  */
3967
- lintCode(fileName: string, content: string, rules: LintConfig): Promise<LintDiagnostic[]>;
4033
+ lintCode(_fileName: string, _content: string, _rules: LintConfig): Promise<LintDiagnostic[]>;
3968
4034
  /**
3969
4035
  * Type check a code file and return the diagnostics.
3970
4036
  *
3971
4037
  * @param fileName - The name of the code file, must include the extension. Use `*.tsx` for TSX files, otherwise the React JSX syntax will be rejected.
3972
4038
  * @param content - The content of the code file.
4039
+ * @param compilerOptions - Optional compiler options to override the default compiler options for type checking.
4040
+ * @param sessionId - Optional session ID. Pass it when repeatedly type checking the same file. If not provided, a new session will be created for each type check, which is slow.
3973
4041
  */
3974
- typecheckCode(fileName: string, content: string, compilerOptions?: ts.server.protocol.CompilerOptions): Promise<TypecheckDiagnostic[]>;
4042
+ typecheckCode(fileName: string, content: string, compilerOptions?: ts.server.protocol.CompilerOptions, sessionId?: string): Promise<TypecheckDiagnostic[]>;
3975
4043
  /**
3976
4044
  * Subscribe to changes in code files.
3977
4045
  * This will be called when code files are added, removed, or updated and will return an array of
@@ -4032,9 +4100,29 @@ declare class FramerPluginAPI {
4032
4100
  * ```
4033
4101
  */
4034
4102
  createWebPage(pagePath: string): Promise<WebPageNode>;
4103
+ /**
4104
+ * Create a new collection.
4105
+ */
4106
+ createCollection(name: string): Promise<Collection>;
4107
+ /**
4108
+ * Create a new managed collection.
4109
+ */
4110
+ createManagedCollection(name: string): Promise<ManagedCollection>;
4111
+ /**
4112
+ * Set a warning message to show when the user attempts to close the plugin. Set to false to disable.
4113
+ * - `string` to enable with a custom message.
4114
+ * - `false` to disable.
4115
+ * */
4116
+ setCloseWarning(message: string | false): Promise<void>;
4117
+ /**
4118
+ * Initial state data passed from Vekter during handshake.
4119
+ */
4120
+ get [$framerInternal.initialState](): InitialState;
4035
4121
  }
4036
4122
  /** @beta */
4037
4123
  declare class FramerPluginAPIBeta extends FramerPluginAPI {
4124
+ #private;
4125
+ constructor(engine: PluginEngine);
4038
4126
  }
4039
4127
  /** @alpha */
4040
4128
  declare class FramerPluginAPIAlpha extends FramerPluginAPIBeta {
@@ -4084,35 +4172,35 @@ declare class FramerPluginAPIAlpha extends FramerPluginAPIBeta {
4084
4172
  * @alpha
4085
4173
  */
4086
4174
  getVectorSets(): Promise<VectorSet[]>;
4087
- /**
4088
- * Publish the project.
4089
- * currently only intended to be used by framer-api
4090
- * @alpha
4091
- */
4092
- publish(): Promise<boolean>;
4093
- /**
4094
- * Get paths of pages changed between versions.
4095
- * currently only intended to be used by framer-api
4096
- * @alpha
4097
- */
4098
- getChangedPagePaths(fromVersion?: number, toVersion?: number): Promise<{
4175
+ /** @internal - Available only through framer-api */
4176
+ [$framerApiOnly.publish](): Promise<PublishResult>;
4177
+ /** @internal - Available only through framer-api */
4178
+ [$framerApiOnly.getDeployments](): Promise<Deployment[]>;
4179
+ /** @internal - Available only through framer-api */
4180
+ [$framerApiOnly.deploy](deploymentId: string, domains?: string[]): Promise<Hostname[]>;
4181
+ /** @internal - Available only through framer-api */
4182
+ [$framerApiOnly.getChangedPaths](): Promise<{
4099
4183
  added: string[];
4100
4184
  removed: string[];
4101
4185
  modified: string[];
4102
4186
  }>;
4187
+ /** @internal - Available only through framer-api */
4188
+ [$framerApiOnly.getChangeContributors](fromVersion?: number, toVersion?: number): Promise<string[]>;
4103
4189
  /**
4104
- * Get authors who made changes between versions.
4105
- * currently only intended to be used by framer-api
4106
- * @alpha
4107
- */
4108
- getChangeAuthors(fromVersion?: number, toVersion?: number): Promise<string[]>;
4109
- /**
4110
- * Create a new managed collection.
4111
- * currently only intended to be used by framer-api
4112
- * @alpha
4113
- */
4114
- createManagedCollection(name: string): Promise<ManagedCollection>;
4190
+ * @deprecated Use `createManagedCollection` instead.
4191
+ * @internal - Available only through framer-api
4192
+ * */
4193
+ [$framerApiOnly.createManagedCollection](name: string): Promise<ManagedCollection>;
4194
+ /** @internal - Rejects all pending method calls with the given error */
4195
+ [$framerApiOnly.rejectAllPending](error: FramerPluginError): void;
4115
4196
  }
4197
+ /**
4198
+ * Methods that are only available through framer-api (server API),
4199
+ * not through the plugin API.
4200
+ */
4201
+ type FramerApiOnlyMethods = {
4202
+ [K in keyof typeof $framerApiOnly]: FramerPluginAPIAlpha[(typeof $framerApiOnly)[K]];
4203
+ };
4116
4204
  interface UIOptions {
4117
4205
  /** The preferred UI width. */
4118
4206
  width?: number;
@@ -4180,6 +4268,7 @@ type MessageApiDragData = ComponentDragData | OtherDragData;
4180
4268
  interface PluginMessageAPI {
4181
4269
  hideUI: FramerPluginAPI["hideUI"];
4182
4270
  setBackgroundMessage: FramerPluginAPI["setBackgroundMessage"];
4271
+ setCloseWarning: (message: string | false) => Promise<void>;
4183
4272
  closePlugin: (...parameters: Parameters<FramerPluginAPI["closePlugin"]>) => Promise<void>;
4184
4273
  removeNode: FramerPluginAPI["removeNode"];
4185
4274
  removeNodes: FramerPluginAPI["removeNodes"];
@@ -4265,6 +4354,7 @@ interface PluginMessageAPI {
4265
4354
  addManagedCollectionItems: (id: NodeId, items: ApiV2ManagedCollectionItemInput[]) => Promise<void>;
4266
4355
  addManagedCollectionItems2: (id: NodeId, items: ManagedCollectionItemInput[]) => Promise<void>;
4267
4356
  removeManagedCollectionItems: (id: NodeId, itemIds: string[]) => Promise<void>;
4357
+ createCollection: (name: string) => Promise<CollectionData>;
4268
4358
  getCollection: (id: NodeId) => Promise<CollectionData | null>;
4269
4359
  getActiveCollection: () => Promise<CollectionData | null>;
4270
4360
  getCollections: () => Promise<CollectionData[]>;
@@ -4324,7 +4414,9 @@ interface PluginMessageAPI {
4324
4414
  unstable_getCodeFileLint2(fileName: string, content: string, rules: LintConfig): Promise<LintDiagnostic[]>;
4325
4415
  /** @deprecated */
4326
4416
  unstable_getCodeFileTypecheck2(fileName: string, content: string, compilerOptions?: ts.server.protocol.CompilerOptions): Promise<TypecheckDiagnostic[]>;
4327
- createCodeFile: (name: string, code: string) => Promise<CodeFileData>;
4417
+ createCodeFile: (name: string, code: string, options?: {
4418
+ editViaPlugin?: boolean;
4419
+ }) => Promise<CodeFileData>;
4328
4420
  getCodeFiles: () => Promise<readonly CodeFileData[]>;
4329
4421
  getCodeFile: (id: string) => Promise<CodeFileData | null>;
4330
4422
  renameCodeFile: (id: string, newName: string) => Promise<CodeFileData>;
@@ -4332,8 +4424,9 @@ interface PluginMessageAPI {
4332
4424
  setCodeFileContent: (id: string, code: string) => Promise<CodeFileData>;
4333
4425
  getCodeFileVersions: (id: string) => Promise<readonly CodeFileVersionData[]>;
4334
4426
  getCodeFileVersionContent: (fileId: string, versionId: string) => Promise<string>;
4427
+ /** @deprecated The lintCode API was removed. */
4335
4428
  lintCode(fileName: string, content: string, rules: LintConfig): Promise<LintDiagnostic[]>;
4336
- typecheckCode(fileName: string, content: string, compilerOptions?: ts.server.protocol.CompilerOptions): Promise<TypecheckDiagnostic[]>;
4429
+ typecheckCode(fileName: string, content: string, compilerOptions?: ts.server.protocol.CompilerOptions, sessionId?: string): Promise<TypecheckDiagnostic[]>;
4337
4430
  addRedirects: (redirects: RedirectInput[]) => Promise<RedirectData[]>;
4338
4431
  getRedirects: () => Promise<readonly RedirectData[]>;
4339
4432
  setRedirectOrder: (redirectIds: string[]) => Promise<void>;
@@ -4350,15 +4443,19 @@ interface PluginMessageAPI {
4350
4443
  setMenu: (menuItems: MenuItemSerializable[]) => Promise<void>;
4351
4444
  showContextMenu: (menuItems: MenuItemSerializable[], config: ContextMenuConfig) => Promise<void>;
4352
4445
  /** @alpha */
4353
- publish: () => Promise<boolean>;
4446
+ publish: () => Promise<PublishResult>;
4447
+ /** @alpha */
4448
+ getDeployments: () => Promise<Deployment[]>;
4354
4449
  /** @alpha */
4355
- getChangedPagePaths: (fromVersion?: number, toVersion?: number) => Promise<{
4450
+ deploy: (deploymentId: string, domains?: string[]) => Promise<Hostname[]>;
4451
+ /** @alpha */
4452
+ getChangedPaths: () => Promise<{
4356
4453
  added: string[];
4357
4454
  removed: string[];
4358
4455
  modified: string[];
4359
4456
  }>;
4360
4457
  /** @alpha */
4361
- getChangeAuthors: (fromVersion?: number, toVersion?: number) => Promise<string[]>;
4458
+ getChangeContributors: (fromVersion?: number, toVersion?: number) => Promise<string[]>;
4362
4459
  /** @alpha */
4363
4460
  createManagedCollection: (name: string) => Promise<CollectionData>;
4364
4461
  [getAiServiceInfoMessageType]: () => Promise<AiServiceInfo>;
@@ -4410,6 +4507,7 @@ interface PluginApiContext {
4410
4507
  environmentInfo: EnvironmentInfo | null;
4411
4508
  origin: string | null;
4412
4509
  theme: Theme | null;
4510
+ initialState: InitialState | null;
4413
4511
  }
4414
4512
  declare class PluginEngine {
4415
4513
  methodInvocationId: number;
@@ -4426,8 +4524,11 @@ declare class PluginEngine {
4426
4524
  readonly messageTypesCheckedInIsAllowedTo: Set<ProtectedMessageType>;
4427
4525
  showUncheckedPermissionToasts: boolean;
4428
4526
  readonly environmentInfo: EnvironmentInfo | null;
4527
+ /** @internal - Initial state passed from Vekter during handshake. */
4528
+ readonly initialState: InitialState;
4429
4529
  menuItemOnActionCallbackMap: Map<number, () => void>;
4430
4530
  contextMenuItemOnActionCallbackMap: Map<number, () => void>;
4531
+ rejectAllPending(error: Error): void;
4431
4532
  constructor(context?: PluginApiContext);
4432
4533
  invoke<MessageType extends keyof PluginMessageAPI>(messageType: MessageType, ...args: Parameters<PluginMessageAPI[MessageType]>): Promise<Awaited<ReturnType<PluginMessageAPI[MessageType]>>>;
4433
4534
  invokeTransferable<MessageType extends keyof PluginMessageAPI>(messageType: MessageType, transfer: Transferable[] | undefined, ...args: Parameters<PluginMessageAPI[MessageType]>): Promise<Awaited<ReturnType<PluginMessageAPI[MessageType]>>>;
@@ -4584,23 +4685,233 @@ declare const framer: FramerPluginAPIAlpha;
4584
4685
 
4585
4686
  declare function configure(environment: Record<string, string | undefined>): void;
4586
4687
 
4587
- /** Used to block methods at runtime */
4588
- declare const PUBLIC_API_BLOCKED_METHODS: readonly ["showUI", "hideUI", "closePlugin", "notify", "setMenu", "showContextMenu", "preloadDetachedComponentLayers", "preloadDragPreviewImage", "preloadImageUrlForInsertion", "getSelection", "getActiveCollection", "getActiveManagedCollection", "getActiveLocale", "zoomIntoView", "navigateTo", "getPluginData", "setPluginData", "getPluginDataKeys", "makeDraggable", "subscribeToSelection", "subscribeToImage", "subscribeToText"];
4589
- /**
4590
- * Methods hidden from public API but still available in headless mode.
4591
- */
4592
- declare const HIDDEN_FROM_PUBLIC_API: readonly ["setSelection"];
4593
- type PublicApiBlockedMethods = (typeof PUBLIC_API_BLOCKED_METHODS)[number] | (typeof HIDDEN_FROM_PUBLIC_API)[number];
4594
- type FramerHeadlessAPI = Omit<FramerPluginAPIAlpha, PublicApiBlockedMethods>;
4688
+ declare enum ErrorCode {
4689
+ PROJECT_CLOSED = "PROJECT_CLOSED",
4690
+ POOL_EXHAUSTED = "POOL_EXHAUSTED",
4691
+ TIMEOUT = "TIMEOUT",
4692
+ INTERNAL = "INTERNAL",
4693
+ NODE_NOT_FOUND = "NODE_NOT_FOUND",
4694
+ SCREENSHOT_TOO_LARGE = "SCREENSHOT_TOO_LARGE",
4695
+ INVALID_REQUEST = "INVALID_REQUEST",
4696
+ UNAUTHORIZED = "UNAUTHORIZED"
4697
+ }
4698
+ declare class FramerAPIError extends Error {
4699
+ readonly code: ErrorCode;
4700
+ constructor(message: string, code: ErrorCode);
4701
+ }
4702
+ declare function isRetryableError(error: unknown): boolean;
4703
+
4704
+ interface ScreenshotOptions {
4705
+ /**
4706
+ * Image format.
4707
+ * @default "png"
4708
+ */
4709
+ format?: "png" | "jpeg";
4710
+ /**
4711
+ * JPEG quality (0-100).
4712
+ * Only applies when format is "jpeg".
4713
+ * @default 100
4714
+ */
4715
+ quality?: number;
4716
+ /**
4717
+ * Pixel density multiplier for retina/HiDPI screenshots.
4718
+ * @default 1
4719
+ */
4720
+ scale?: 0.5 | 1 | 1.5 | 2 | 3 | 4;
4721
+ /**
4722
+ * Clip region in CSS pixels (before scale).
4723
+ * Captures only this portion of the node.
4724
+ */
4725
+ clip?: {
4726
+ x: number;
4727
+ y: number;
4728
+ width: number;
4729
+ height: number;
4730
+ };
4731
+ }
4732
+ interface ScreenshotResult {
4733
+ data: Buffer;
4734
+ mimeType: string;
4735
+ }
4736
+ declare const enabledMethods: {
4737
+ showUI: false;
4738
+ hideUI: false;
4739
+ closePlugin: false;
4740
+ setCloseWarning: true;
4741
+ notify: false;
4742
+ setMenu: false;
4743
+ showContextMenu: false;
4744
+ preloadDetachedComponentLayers: false;
4745
+ preloadDragPreviewImage: false;
4746
+ preloadImageUrlForInsertion: false;
4747
+ setBackgroundMessage: false;
4748
+ getSelection: false;
4749
+ getActiveCollection: false;
4750
+ getActiveManagedCollection: false;
4751
+ getActiveLocale: false;
4752
+ zoomIntoView: false;
4753
+ navigateTo: false;
4754
+ getPluginData: false;
4755
+ setPluginData: false;
4756
+ getPluginDataKeys: false;
4757
+ makeDraggable: false;
4758
+ subscribeToSelection: false;
4759
+ subscribeToImage: false;
4760
+ subscribeToText: false;
4761
+ subscribeToCustomCode: false;
4762
+ subscribeToColorStyles: false;
4763
+ subscribeToTextStyles: false;
4764
+ subscribeToRedirects: false;
4765
+ subscribeToCodeFiles: false;
4766
+ subscribeToOpenCodeFile: false;
4767
+ subscribeToIsAllowedTo: false;
4768
+ subscribeToCanvasRoot: false;
4769
+ subscribeToPublishInfo: false;
4770
+ unstable_ensureMinimumDependencyVersion: false;
4771
+ removeNode: true;
4772
+ removeNodes: true;
4773
+ addSVG: true;
4774
+ getRect: true;
4775
+ setText: true;
4776
+ getText: true;
4777
+ addText: true;
4778
+ setCustomCode: true;
4779
+ getCustomCode: true;
4780
+ getLocales: true;
4781
+ getDefaultLocale: true;
4782
+ getLocalizationGroups: true;
4783
+ setLocalizationData: true;
4784
+ getCurrentUser: true;
4785
+ getProjectInfo: true;
4786
+ setSelection: true;
4787
+ getCanvasRoot: true;
4788
+ getPublishInfo: true;
4789
+ cloneNode: true;
4790
+ getNode: true;
4791
+ getParent: true;
4792
+ getChildren: true;
4793
+ setAttributes: true;
4794
+ getNodesWithType: true;
4795
+ getNodesWithAttribute: true;
4796
+ getNodesWithAttributeSet: true;
4797
+ addImages: true;
4798
+ getImage: true;
4799
+ addImage: true;
4800
+ setImage: true;
4801
+ uploadImage: true;
4802
+ uploadImages: true;
4803
+ uploadFile: true;
4804
+ uploadFiles: true;
4805
+ setParent: true;
4806
+ addComponentInstance: true;
4807
+ addDetachedComponentLayers: true;
4808
+ getManagedCollection: true;
4809
+ getManagedCollections: true;
4810
+ getCollection: true;
4811
+ getCollections: true;
4812
+ getColorStyle: true;
4813
+ getColorStyles: true;
4814
+ createColorStyle: true;
4815
+ getTextStyle: true;
4816
+ getTextStyles: true;
4817
+ createTextStyle: true;
4818
+ getFont: true;
4819
+ getFonts: true;
4820
+ createCodeFile: true;
4821
+ getCodeFiles: true;
4822
+ getCodeFile: true;
4823
+ /** @deprecated The lintCode API was removed. */
4824
+ lintCode: true;
4825
+ typecheckCode: true;
4826
+ addRedirects: true;
4827
+ getRedirects: true;
4828
+ setRedirectOrder: true;
4829
+ removeRedirects: true;
4830
+ addComponentInstancePlaceholder: true;
4831
+ createCollection: true;
4832
+ getVectorSets: true;
4833
+ createDesignPage: true;
4834
+ createWebPage: true;
4835
+ createTextNode: true;
4836
+ createComponentNode: true;
4837
+ mode: true;
4838
+ isAllowedTo: false;
4839
+ createFrameNode: true;
4840
+ createManagedCollection: true;
4841
+ };
4842
+ type EnabledMethodsConfig = typeof enabledMethods;
4843
+ type BlockedMethods = {
4844
+ [K in keyof EnabledMethodsConfig]: EnabledMethodsConfig[K] extends false ? K : never;
4845
+ }[keyof EnabledMethodsConfig];
4846
+ /** Used by ActivePlugin.ts for vekter-side validation */
4847
+ type AvailablePluginMethods = Omit<FramerPluginAPIAlpha, BlockedMethods>;
4595
4848
  interface FramerConnectionMethods {
4596
4849
  disconnect(): Promise<void>;
4597
4850
  requestId?: string;
4598
4851
  [Symbol.dispose](): void;
4599
4852
  [Symbol.asyncDispose](): Promise<void>;
4600
4853
  }
4601
- type Framer = FramerHeadlessAPI & FramerConnectionMethods;
4854
+ interface FramerScreenshotMethods {
4855
+ screenshot(nodeId: string, options?: ScreenshotOptions): Promise<ScreenshotResult>;
4856
+ exportSVG(nodeId: string): Promise<string>;
4857
+ }
4858
+ type Framer = AvailablePluginMethods & FramerConnectionMethods & FramerScreenshotMethods & FramerApiOnlyMethods;
4602
4859
 
4603
- declare function connect(projectUrlOrId: string, token?: string): Promise<Framer>;
4604
- declare function withConnection<T>(projectUrlOrId: string, callback: (framer: Framer) => Promise<T>, token?: string): Promise<T>;
4860
+ /**
4861
+ * Connect to a Framer project and start using the Framer API.
4862
+ *
4863
+ * The returned Framer instance is very much aligned with the Plugin API, but has handling to end the connection gracefully.
4864
+ *
4865
+ * @example
4866
+ * ```typescript
4867
+ * const projectUrl = "https://framer.com/projects/Website--aabbccdd1122"
4868
+ * // Uses your API Key from the environment variable FRAMER_API_KEY
4869
+ * const framer = await connect(projectUrl)
4870
+ * // ...
4871
+ * await framer.disconnect()
4872
+ * ```
4873
+ *
4874
+ * @example
4875
+ * ```typescript
4876
+ * const projectUrl = "https://framer.com/projects/Website--aabbccdd1122"
4877
+ * // Uses your API Key from the environment variable FRAMER_API_KEY
4878
+ * // Works in Node.js v24+ and bun 1.3.0+, will automatically close the connection when the scope ends.
4879
+ * using framer = await connect(projectUrl)
4880
+ * ```
4881
+ *
4882
+ * @example
4883
+ * ```typescript
4884
+ * // Use your API key in the function call instead of the environment variable
4885
+ * const apiKey = "ap123"
4886
+ * const framer = await connect(projectUrl, apiKey)
4887
+ * ```
4888
+ */
4889
+ /**
4890
+ * @internal
4891
+ */
4892
+ interface ConnectOptions {
4893
+ /**
4894
+ * Override the api server URL (e.g., for local development)
4895
+ * @internal
4896
+ */
4897
+ serverUrl?: string;
4898
+ }
4899
+ declare function connect(projectUrlOrId: string, token?: string, options?: ConnectOptions): Promise<Framer>;
4900
+ /**
4901
+ * Connect to a Framer project and execute a callback with the Framer instance.
4902
+ * The connection will be closed automatically when the resolves.
4903
+ *
4904
+ * @example
4905
+ * ```typescript
4906
+ * const projectUrl = "https://framer.com/projects/Website--aabbccdd1122"
4907
+ * await withConnection(projectUrl, async (framer) => {
4908
+ * const info = await framer.getProjectInfo()
4909
+ * // ...
4910
+ * await myApi.doSomething(info)
4911
+ * // the connection is closed automatically when this callback resolves
4912
+ * })
4913
+ * ```
4914
+ */
4915
+ declare function withConnection<T>(projectUrlOrId: string, callback: (framer: Framer) => Promise<T>, token?: string, options?: ConnectOptions): Promise<T>;
4605
4916
 
4606
- export { type AllTraits, type AnyNode, type ApiVersion1ProjectInfo, type ApiVersion1User, type ArrayControl, type ArrayFieldDataEntry, type ArrayFieldDataEntryInput, type ArrayItem, type ArrayItemData, type ArrayItemInput, type AxisOverflow, type BooleanControl, BooleanField, BooleanVariable, type Border, type BorderControl, type BorderRadius, type BorderRadiusControl, type BorderStyle, BorderVariable, type BorderWidth, type Breakpoint, type CanvasNode, type CanvasRootNode, CodeFile, type CodeFileComponentExport, type CodeFileExport, type CodeFileOverrideExport, CodeFileVersion, Collection, CollectionItem, type CollectionItemData, type CollectionItemInput, type CollectionReferenceControl, CollectionReferenceField, type ColorControl, ColorField, type ColorStop, ColorStyle, ColorVariable, ComponentInstanceNode, ComponentInstancePlaceholder, type ComponentInstancePlaceholderAttributes, type ComponentInstancePlaceholderData, ComponentNode, type ComponentVariable, type ComputedValue, ConicGradient, type Control, type ControlAttributes, type CreateField, type CreateVariable, type CursorControl, type CustomCode, type CustomCodeLocation, type CustomCursorControl, type DateControl, DateField, DateVariable, DesignPageNode, type DiagnosticSpan, type EditableManagedCollectionField, EnumCase, type EnumCaseData, type EnumControl, EnumField, EnumVariable, type Field, type FieldData, type FieldDataEntry, type FieldDataEntryInput, type FieldDataInput, FieldDivider, type FileControl, FileField, FileVariable, type FitContent, type FitImage, Font, type FontControl, type FormattedTextControl, FormattedTextField, FormattedTextVariable, FrameNode, type Framer, FramerPluginClosedError, FramerPluginError, type FusedNumberControl, type GapControl, type Gesture, type Gradient, type GridContentAlignment, type GridItemAlignment, type GridItemColumnSpan, type GridLayout, type HeightConstraint, type HeightLength, ImageAsset, type ImageControl, ImageField, type ImageRendering, ImageVariable, type InlineLocalizationValueByLocale, type IsBreakpoint, type IsComponentGestureVariant, type IsComponentVariant, type LayoutType, type Length, LinearGradient, type LinkControl, LinkField, type LinkRelControl, LinkVariable, type LintConfig, type LintDiagnostic, type LintLink, type Locale, type LocaleId, type LocalizationData, type LocalizationGroup, type LocalizationGroupStatus, type LocalizationGroupStatusByLocale, type LocalizationSource, type LocalizationSourceId, type LocalizationSourceUpdate, type LocalizationValueByLocale, type LocalizedValueStatus, type LocalizedValueUpdate, ManagedCollection, type ManagedCollectionField, type ManagedCollectionFieldInput, type ManagedCollectionItemInput, type Mode, type MultiCollectionReferenceControl, MultiCollectionReferenceField, type NodeAttributeKey, type NodeId, type NodeRuntimeErrorResult, type NumberControl, NumberField, NumberVariable, type ObjectControl, type Overflow, type Ownership, type PaddingControl, type PageScopeControl, type Position, type ProjectInfo, type ProtectedMethod, type Publish, type PublishInfo, RadialGradient, type Rect$1 as Rect, Redirect, type RedirectInput, SVGNode, type ScrollSectionControl, type SetLocalizationDataResult, type ShadowControl, type ShowProgressOnInstancesAttributes, type StackAlignment, type StackDirection, type StackDistribution, type StackLayout, type StringControl, StringField, StringVariable, type TextAlignment, type TextDecoration, TextNode, TextStyle, type TextStyleBreakpoint, type TextStyleTag, type TextTransform, type TrackingIdControl, type TraitVariant, type TraitVariantData, type TraitVariantNode, type TransitionControl, type TypecheckDiagnostic, UnsupportedComputedValue, UnsupportedField, UnsupportedVariable, type UpdateFieldAttributes, type User, type Variable, VectorSet, type VectorSetData, VectorSetItem, type VectorSetItemControl, type VectorSetItemData, VectorSetItemNode, type VectorSetItemVariable, VectorSetNode, WebPageNode, type WidthConstraint, type WidthLength, type WithAspectRatioTrait, type WithBackgroundColorTrait, type WithBackgroundGradientTrait, type WithBackgroundImageTrait, type WithBorderRadiusTrait, type WithBorderTrait, type WithBreakpointTrait, type WithComponentInfoTrait, type WithComponentVariantTrait, type WithControlAttributesTrait, type WithFontTrait, type WithGridItemTrait, type WithIdTrait, type WithImageRenderingTrait, type WithInlineTextStyleTrait, type WithLayoutTrait, type WithLinkTrait, type WithLockedTrait, type WithNameTrait, type WithNullableComponentInfoTrait, type WithOpacityTrait, type WithOverflowTrait, type WithPinsTrait, type WithPositionTrait, type WithReplicaInfoTrait, type WithRequiredComponentInfoTrait, type WithRotationTrait, type WithSVGTrait, type WithSizeConstraintsTrait, type WithSizeTrait, type WithTextTruncationTrait, type WithVisibleTrait, type WithWebPageInfoTrait, type WithZIndexTrait, configure, connect, framer, hasGridLayout, hasStackLayout, isBreakpoint, isCodeFileComponentExport, isCodeFileOverrideExport, isColorStyle, isComponentGestureVariant, isComponentInstanceNode, isComponentNode, isComponentVariable, isComponentVariant, isComputedValue, isDesignPageNode, isField, isFileAsset, isFrameNode, isImageAsset, isSVGNode, isTextNode, isTextStyle, isVariable, isVectorSetItemNode, isVectorSetNode, isWebPageNode, supportsAspectRatio, supportsBackgroundColor, supportsBackgroundColorData, supportsBackgroundGradient, supportsBackgroundGradientData, supportsBackgroundImage, supportsBackgroundImageData, supportsBorder, supportsBorderRadius, supportsBreakpoint, supportsComponentInfo, supportsComponentVariant, supportsFont, supportsFontData, supportsImageRendering, supportsInlineTextStyle, supportsInlineTextStyleData, supportsLayout, supportsLink, supportsLocked, supportsName, supportsOpacity, supportsOverflow, supportsPins, supportsPosition, supportsRotation, supportsSVG, supportsSize, supportsSizeConstraints, supportsTextTruncation, supportsVisible, supportsZIndex, withConnection };
4917
+ export { type AllTraits, type AnyNode, type ApiVersion1ProjectInfo, type ApiVersion1User, type ArrayControl, type ArrayFieldDataEntry, type ArrayFieldDataEntryInput, type ArrayItem, type ArrayItemData, type ArrayItemInput, type AxisOverflow, type BooleanControl, BooleanField, BooleanVariable, type Border, type BorderControl, type BorderRadius, type BorderRadiusControl, type BorderStyle, BorderVariable, type BorderWidth, type Breakpoint, type CanvasNode, type CanvasRootNode, CodeFile, type CodeFileComponentExport, type CodeFileExport, type CodeFileOverrideExport, CodeFileVersion, Collection, CollectionItem, type CollectionItemData, type CollectionItemInput, type CollectionReferenceControl, CollectionReferenceField, type ColorControl, ColorField, type ColorStop, ColorStyle, ColorVariable, ComponentInstanceNode, ComponentInstancePlaceholder, type ComponentInstancePlaceholderAttributes, type ComponentInstancePlaceholderData, ComponentNode, type ComponentVariable, type ComputedValue, ConicGradient, type ConnectOptions, type Control, type ControlAttributes, type CreateField, type CreateVariable, type CursorControl, type CustomCode, type CustomCodeLocation, type CustomCursorControl, type DateControl, DateField, DateVariable, type Deployment, DesignPageNode, type DiagnosticSpan, type EditableManagedCollectionField, EnumCase, type EnumCaseData, type EnumControl, EnumField, EnumVariable, ErrorCode, type Field, type FieldData, type FieldDataEntry, type FieldDataEntryInput, type FieldDataInput, FieldDivider, type FileControl, FileField, FileVariable, type FitContent, type FitImage, Font, type FontControl, type FormattedTextControl, FormattedTextField, FormattedTextVariable, FrameNode, type Framer, FramerAPIError, FramerPluginClosedError, FramerPluginError, type FusedNumberControl, type GapControl, type Gesture, type Gradient, type GridContentAlignment, type GridItemAlignment, type GridItemColumnSpan, type GridLayout, type HeightConstraint, type HeightLength, type Hostname, type HostnameType, ImageAsset, type ImageControl, ImageField, type ImageRendering, ImageVariable, type InlineLocalizationValueByLocale, type IsBreakpoint, type IsComponentGestureVariant, type IsComponentVariant, type LayoutType, type Length, LinearGradient, type LinkControl, LinkField, type LinkRelControl, LinkVariable, type LintConfig, type LintDiagnostic, type LintLink, type Locale, type LocaleId, type LocalizationData, type LocalizationGroup, type LocalizationGroupStatus, type LocalizationGroupStatusByLocale, type LocalizationSource, type LocalizationSourceId, type LocalizationSourceUpdate, type LocalizationValueByLocale, type LocalizedValueStatus, type LocalizedValueUpdate, ManagedCollection, type ManagedCollectionField, type ManagedCollectionFieldInput, type ManagedCollectionItemInput, type Mode, type MultiCollectionReferenceControl, MultiCollectionReferenceField, type NodeAttributeKey, type NodeId, type NodeRuntimeErrorResult, type NumberControl, NumberField, NumberVariable, type ObjectControl, type Overflow, type Ownership, type PaddingControl, type PageScopeControl, type Position, type ProjectInfo, type ProtectedMethod, type Publish, type PublishInfo, type PublishResult, RadialGradient, type Rect$1 as Rect, Redirect, type RedirectInput, SVGNode, type ScreenshotOptions, type ScreenshotResult, type ScrollSectionControl, type SetLocalizationDataResult, type ShadowControl, type ShowProgressOnInstancesAttributes, type StackAlignment, type StackDirection, type StackDistribution, type StackLayout, type StringControl, StringField, StringVariable, type TextAlignment, type TextDecoration, TextNode, TextStyle, type TextStyleBreakpoint, type TextStyleTag, type TextTransform, type TrackingIdControl, type TraitVariant, type TraitVariantData, type TraitVariantNode, type TransitionControl, type TypecheckDiagnostic, UnsupportedComputedValue, UnsupportedField, UnsupportedVariable, type UpdateFieldAttributes, type User, type Variable, VectorSet, type VectorSetData, VectorSetItem, type VectorSetItemControl, type VectorSetItemData, VectorSetItemNode, type VectorSetItemVariable, VectorSetNode, WebPageNode, type WidthConstraint, type WidthLength, type WithAspectRatioTrait, type WithBackgroundColorTrait, type WithBackgroundGradientTrait, type WithBackgroundImageTrait, type WithBorderRadiusTrait, type WithBorderTrait, type WithBreakpointTrait, type WithComponentInfoTrait, type WithComponentVariantTrait, type WithControlAttributesTrait, type WithFontTrait, type WithGridItemTrait, type WithIdTrait, type WithImageRenderingTrait, type WithInlineTextStyleTrait, type WithLayoutTrait, type WithLinkTrait, type WithLockedTrait, type WithNameTrait, type WithNullableComponentInfoTrait, type WithOpacityTrait, type WithOverflowTrait, type WithPinsTrait, type WithPositionTrait, type WithReplicaInfoTrait, type WithRequiredComponentInfoTrait, type WithRotationTrait, type WithSVGTrait, type WithSizeConstraintsTrait, type WithSizeTrait, type WithTextTruncationTrait, type WithVisibleTrait, type WithWebPageInfoTrait, type WithZIndexTrait, configure, connect, framer, hasGridLayout, hasStackLayout, isBreakpoint, isCodeFileComponentExport, isCodeFileOverrideExport, isColorStyle, isComponentGestureVariant, isComponentInstanceNode, isComponentNode, isComponentVariable, isComponentVariant, isComputedValue, isDesignPageNode, isField, isFileAsset, isFrameNode, isImageAsset, isRetryableError, isSVGNode, isTextNode, isTextStyle, isVariable, isVectorSetItemNode, isVectorSetNode, isWebPageNode, supportsAspectRatio, supportsBackgroundColor, supportsBackgroundColorData, supportsBackgroundGradient, supportsBackgroundGradientData, supportsBackgroundImage, supportsBackgroundImageData, supportsBorder, supportsBorderRadius, supportsBreakpoint, supportsComponentInfo, supportsComponentVariant, supportsFont, supportsFontData, supportsImageRendering, supportsInlineTextStyle, supportsInlineTextStyleData, supportsLayout, supportsLink, supportsLocked, supportsName, supportsOpacity, supportsOverflow, supportsPins, supportsPosition, supportsRotation, supportsSVG, supportsSize, supportsSizeConstraints, supportsTextTruncation, supportsVisible, supportsZIndex, withConnection };