lucid-extension-sdk 0.0.452 → 0.0.453
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/commandtypes.d.ts +7 -0
- package/document/pageproxy.js +1 -1
- package/package.json +1 -1
- package/ui/menu.d.ts +3 -3
- package/ui/menu.js +2 -2
package/commandtypes.d.ts
CHANGED
|
@@ -1222,6 +1222,13 @@ export type CreateBlockQuery = {
|
|
|
1222
1222
|
'c': string;
|
|
1223
1223
|
/** If specified, the stencil for a custom shape. Only valid if the class name is 'CustomBlock' */
|
|
1224
1224
|
's'?: UnsafeJsonSerializableOrUndefined | undefined;
|
|
1225
|
+
/** If specified, the initial bounding box for the block, set during creation*/
|
|
1226
|
+
'b'?: {
|
|
1227
|
+
x: number;
|
|
1228
|
+
y: number;
|
|
1229
|
+
w: number;
|
|
1230
|
+
h: number;
|
|
1231
|
+
} | undefined;
|
|
1225
1232
|
};
|
|
1226
1233
|
export type CreateBlockResult = string;
|
|
1227
1234
|
export type CreateCardsQuery = {
|
package/document/pageproxy.js
CHANGED
|
@@ -136,9 +136,9 @@ class PageProxy extends elementproxy_1.ElementProxy {
|
|
|
136
136
|
'p': this.id,
|
|
137
137
|
'c': def.className,
|
|
138
138
|
's': def.stencil,
|
|
139
|
+
'b': def.boundingBox,
|
|
139
140
|
});
|
|
140
141
|
const block = this.client.getBlockProxy(id);
|
|
141
|
-
block.setBoundingBox(def.boundingBox);
|
|
142
142
|
if (def.properties) {
|
|
143
143
|
for (const key in def.properties) {
|
|
144
144
|
block.properties.set(key, def.properties[key]);
|
package/package.json
CHANGED
package/ui/menu.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare const MenuType: {
|
|
|
8
8
|
readonly Main: 1;
|
|
9
9
|
/** The context menu that appears when the user right-clicks the canvas. */
|
|
10
10
|
readonly Context: 2;
|
|
11
|
-
/** The side dock in Lucidspark
|
|
11
|
+
/** The side dock in Lucidspark */
|
|
12
12
|
readonly ContentDock: 3;
|
|
13
13
|
};
|
|
14
14
|
export type MenuType = (typeof MenuType)[keyof typeof MenuType];
|
|
@@ -60,7 +60,7 @@ export interface CustomDropdownMenu extends CustomMenuConfig {
|
|
|
60
60
|
location?: MenuLocation;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
* Data to create a content dock icon in Spark
|
|
63
|
+
* Data to create a content dock icon in Spark
|
|
64
64
|
*/
|
|
65
65
|
export interface CustomContentDockMenu extends CustomMenuConfig {
|
|
66
66
|
/** The icon to display on the menu item.
|
|
@@ -148,7 +148,7 @@ export declare class Menu {
|
|
|
148
148
|
*/
|
|
149
149
|
addContextMenuItem(item: CustomMenuConfig): void;
|
|
150
150
|
/**
|
|
151
|
-
* Create an icon tied to an action (required) that appears in the left toolbar in Lucidspark
|
|
151
|
+
* Create an icon tied to an action (required) that appears in the left toolbar in Lucidspark (not in Lucidchart).
|
|
152
152
|
*
|
|
153
153
|
* The action must be registered with
|
|
154
154
|
* [EditorClient.registerAction](/extension-sdk/#classes_editorclient-EditorClient_registeraction)
|
package/ui/menu.js
CHANGED
|
@@ -11,7 +11,7 @@ exports.MenuType = {
|
|
|
11
11
|
Main: 1,
|
|
12
12
|
/** The context menu that appears when the user right-clicks the canvas. */
|
|
13
13
|
Context: 2,
|
|
14
|
-
/** The side dock in Lucidspark
|
|
14
|
+
/** The side dock in Lucidspark */
|
|
15
15
|
ContentDock: 3,
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
@@ -117,7 +117,7 @@ class Menu {
|
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
/**
|
|
120
|
-
* Create an icon tied to an action (required) that appears in the left toolbar in Lucidspark
|
|
120
|
+
* Create an icon tied to an action (required) that appears in the left toolbar in Lucidspark (not in Lucidchart).
|
|
121
121
|
*
|
|
122
122
|
* The action must be registered with
|
|
123
123
|
* [EditorClient.registerAction](/extension-sdk/#classes_editorclient-EditorClient_registeraction)
|