@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.
- package/{LICENSE → LICENCE} +3 -1
- package/api.d.ts +16 -0
- package/package.json +2 -2
- package/styles.d.ts +8 -0
package/{LICENSE → LICENCE}
RENAMED
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
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;
|