@webflow/designer-extension-typings 2.0.19 → 2.0.21

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": "@webflow/designer-extension-typings",
3
- "version": "2.0.19",
3
+ "version": "2.0.21",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "Typings for the Webflow Designer Extension API",
6
6
  "main": "",
package/styles.d.ts CHANGED
@@ -170,10 +170,10 @@ interface Style {
170
170
  * @param options - Options to remove variable modes based on breakpoints and pseudo classes / states.
171
171
  * @example
172
172
  * ```ts
173
- * await myStyle.removeVariableModes({
174
- * 'collection-id-1': 'mode-id-1',
175
- * 'collection-id-2': 'mode-id-2',
176
- * });
173
+ * const collection = await webflow.getVariableCollectionById('collection-id');
174
+ * const mode = await collection.getVariableModeByName('Dark');
175
+ * const modeTwo = await collection.getVariableModeByName('Light');
176
+ * await myStyle.removeVariableModes([mode, modeTwo]);
177
177
  * ```
178
178
  */
179
179
  removeVariableModes(
package/variables.d.ts CHANGED
@@ -510,23 +510,28 @@ interface VariableCollection {
510
510
  getAllVariables(): Promise<Array<Variable>>;
511
511
  createColorVariable(
512
512
  name: string,
513
- value: string | ColorVariable | CustomValue
513
+ value: string | ColorVariable | CustomValue,
514
+ modes?: {[key: VariableModeId]: string | ColorVariable | CustomValue}
514
515
  ): Promise<ColorVariable>;
515
516
  createSizeVariable(
516
517
  name: string,
517
- value: SizeValue | SizeVariable | CustomValue
518
+ value: SizeValue | SizeVariable | CustomValue,
519
+ modes?: {[key: VariableModeId]: SizeValue | SizeVariable | CustomValue}
518
520
  ): Promise<SizeVariable>;
519
521
  createNumberVariable(
520
522
  name: string,
521
- value: number | NumberVariable | CustomValue
523
+ value: number | NumberVariable | CustomValue,
524
+ modes?: {[key: VariableModeId]: number | NumberVariable | CustomValue}
522
525
  ): Promise<NumberVariable>;
523
526
  createPercentageVariable(
524
527
  name: string,
525
- value: number | PercentageVariable | CustomValue
528
+ value: number | PercentageVariable | CustomValue,
529
+ modes?: {[key: VariableModeId]: number | PercentageVariable | CustomValue}
526
530
  ): Promise<PercentageVariable>;
527
531
  createFontFamilyVariable(
528
532
  name: string,
529
- value: string | FontFamilyVariable | CustomValue
533
+ value: string | FontFamilyVariable | CustomValue,
534
+ modes?: {[key: VariableModeId]: string | FontFamilyVariable | CustomValue}
530
535
  ): Promise<FontFamilyVariable>;
531
536
  /**
532
537
  * Sets the name of the variable collection.