@webflow/designer-extension-typings 2.0.23 → 2.0.25

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.
@@ -1,4 +1,6 @@
1
- Copyright (c) 2023 Webflow, Inc
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Webflow, Inc
2
4
 
3
5
  Permission is hereby granted, free of charge, to any person ob-
4
6
  taining a copy of this software and associated documentation
package/api.d.ts CHANGED
@@ -80,6 +80,22 @@ interface WebflowApi {
80
80
  */
81
81
  setSelectedElement(element: AnyElement): Promise<null | AnyElement>;
82
82
 
83
+ /**
84
+ * Captures a screenshot of the specified element.
85
+ * @returns A promise that resolves to a base64 string representing the screenshot of the element.
86
+ * @example
87
+ * ```ts
88
+ * const selectedElement = await webflow.getSelectedElement();
89
+ * if (selectedElement) {
90
+ * const screenshot = await webflow.getElementSnapshot(selectedElement);
91
+ * console.log('Screenshot:', screenshot);
92
+ * }else{
93
+ * console.log('No element selected');
94
+ * }
95
+ * ```
96
+ */
97
+ getElementSnapshot(element: AnyElement): Promise<null | string>;
98
+
83
99
  elementBuilder(elementPreset: ElementPreset<AnyElement>): BuilderElement;
84
100
  /**
85
101
  * Get the current media query breakpoint ID.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@webflow/designer-extension-typings",
3
- "version": "2.0.23",
4
- "license": "SEE LICENSE IN LICENSE",
3
+ "version": "2.0.25",
4
+ "license": "MIT",
5
5
  "description": "Typings for the Webflow Designer Extension API",
6
6
  "main": "",
7
7
  "scripts": {
package/styles.d.ts CHANGED
@@ -189,6 +189,14 @@ interface Style {
189
189
  * ```
190
190
  */
191
191
  removeAllVariableModes(options?: BreakpointAndPseudo): Promise<null>;
192
+ /**
193
+ * Retrieves the parent style for a combo class and otherwise returns null.
194
+ * @example
195
+ * ```ts
196
+ * const parentStyle = await myStyle.getParent();
197
+ * ```
198
+ */
199
+ getParent(): Promise<Style | null>;
192
200
  }
193
201
 
194
202
  type StyleId = string;