@webflow/designer-extension-typings 2.0.11 → 2.0.13

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/assets.d.ts CHANGED
@@ -39,6 +39,27 @@ interface Asset {
39
39
  */
40
40
  getName(): Promise<string>;
41
41
 
42
+ /**
43
+ * Set the name of the asset.
44
+ * @example
45
+ * ```ts
46
+ * const asset = await webflow.getAssetById('123');
47
+ * await asset.setName('new name');
48
+ * ```
49
+ */
50
+ setName(name: string): Promise<null>;
51
+
52
+ /**
53
+ * Replace the current asset with a new file.
54
+ * @example
55
+ * ```ts
56
+ * const asset = await webflow.getAssetById('123');
57
+ * const newFile = new File([blob], 'cat.png', { type: 'image/png' });
58
+ * await asset.setFile(newFile);
59
+ * ```
60
+ */
61
+ setFile(fileBlob: File): Promise<null>;
62
+
42
63
  /**
43
64
  * Get the mime type of the asset.
44
65
  * @example
@@ -3,10 +3,12 @@ interface BuilderElement {
3
3
 
4
4
  readonly id: ElementId;
5
5
  readonly builderElement: boolean;
6
+ readonly textContent: true;
6
7
 
7
8
  getTag(): null | string;
8
9
  setTag(tag: string): null;
9
10
  append(child: ElementPreset<AnyElement>): BuilderElement;
10
11
  setAttribute(name: string, value: string): null;
11
12
  setStyles(styles: Array<Style>): null;
13
+ setTextContent(content: string): null;
12
14
  }
@@ -2663,6 +2663,8 @@ interface FormCheckboxInputElement
2663
2663
  readonly id: FullElementId;
2664
2664
  readonly type: 'FormCheckboxInput';
2665
2665
  readonly plugin: 'Form';
2666
+ getName(): Promise<string>;
2667
+ setName(name: string): Promise<null>;
2666
2668
  getRequired(): Promise<boolean>;
2667
2669
  setRequired(value: boolean): Promise<null>;
2668
2670
  }
@@ -2734,6 +2736,8 @@ interface FormRadioInputElement
2734
2736
  readonly id: FullElementId;
2735
2737
  readonly type: 'FormRadioInput';
2736
2738
  readonly plugin: 'Form';
2739
+ getName(): Promise<string>;
2740
+ setName(name: string): Promise<null>;
2737
2741
  getRequired(): Promise<boolean>;
2738
2742
  setRequired(value: boolean): Promise<null>;
2739
2743
  }
@@ -2762,6 +2766,8 @@ interface FormSelectElement
2762
2766
  readonly id: FullElementId;
2763
2767
  readonly type: 'FormSelect';
2764
2768
  readonly plugin: 'Form';
2769
+ getName(): Promise<string>;
2770
+ setName(name: string): Promise<null>;
2765
2771
  getRequired(): Promise<boolean>;
2766
2772
  setRequired(value: boolean): Promise<null>;
2767
2773
  }
@@ -2790,6 +2796,8 @@ interface FormTextareaElement
2790
2796
  readonly id: FullElementId;
2791
2797
  readonly type: 'FormTextarea';
2792
2798
  readonly plugin: 'Form';
2799
+ getName(): Promise<string>;
2800
+ setName(name: string): Promise<null>;
2793
2801
  getRequired(): Promise<boolean>;
2794
2802
  setRequired(value: boolean): Promise<null>;
2795
2803
  }
@@ -2805,6 +2813,8 @@ interface FormTextInputElement
2805
2813
  readonly id: FullElementId;
2806
2814
  readonly type: 'FormTextInput';
2807
2815
  readonly plugin: 'Form';
2816
+ getName(): Promise<string>;
2817
+ setName(name: string): Promise<null>;
2808
2818
  getRequired(): Promise<boolean>;
2809
2819
  setRequired(value: boolean): Promise<null>;
2810
2820
  }
@@ -2850,6 +2860,8 @@ interface FormFileUploadWrapperElement
2850
2860
  readonly id: FullElementId;
2851
2861
  readonly type: 'FormFileUploadWrapper';
2852
2862
  readonly plugin: 'Form';
2863
+ getName(): Promise<string>;
2864
+ setName(name: string): Promise<null>;
2853
2865
  getRequired(): Promise<boolean>;
2854
2866
  setRequired(value: boolean): Promise<null>;
2855
2867
  }
@@ -4323,6 +4335,19 @@ interface UserErrorMsgElement
4323
4335
  readonly plugin: 'Users';
4324
4336
  }
4325
4337
 
4338
+ interface CodeIslandElement
4339
+ extends WebflowElement,
4340
+ CustomAttributes,
4341
+ DomId,
4342
+ Styles,
4343
+ NoChildren,
4344
+ NoTextContent,
4345
+ NoAppConnections {
4346
+ readonly id: FullElementId;
4347
+ readonly type: 'CodeIsland';
4348
+ readonly plugin: 'Code';
4349
+ }
4350
+
4326
4351
  type AnyElement =
4327
4352
  | ComponentElement
4328
4353
  | UnknownElement
@@ -4645,4 +4670,5 @@ type AnyElement =
4645
4670
  | UserSignUpErrorMsgElement
4646
4671
  | UserResetPasswordErrorMsgElement
4647
4672
  | UserUpdatePasswordErrorMsgElement
4648
- | UserErrorMsgElement;
4673
+ | UserErrorMsgElement
4674
+ | CodeIslandElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webflow/designer-extension-typings",
3
- "version": "2.0.11",
3
+ "version": "2.0.13",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "Typings for the Webflow Designer Extension API",
6
6
  "main": "",