@webflow/designer-extension-typings 2.0.23 → 2.0.24
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/api.d.ts +16 -0
- package/package.json +1 -1
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.
|