lucid-extension-sdk 0.0.324 → 0.0.326

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 CHANGED
@@ -28,6 +28,7 @@ export declare const enum CommandName {
28
28
  AddAuthorizationFlowHandler = "aafh",
29
29
  AddCardIntegration = "aci",
30
30
  AddDiagramFromMermaid = "adfm",
31
+ AddDiagramFromLuma = "luma",
31
32
  AddDiagramFromText = "adft",
32
33
  AddLineTextArea = "alta",
33
34
  AddMenuItem = "ami",
@@ -180,6 +181,10 @@ export type CommandArgs = {
180
181
  query: AddDiagramFromMermaidQuery;
181
182
  result: AddDiagramFromMermaidResult;
182
183
  };
184
+ [CommandName.AddDiagramFromLuma]: {
185
+ query: AddDiagramFromLumaQuery;
186
+ result: AddDiagramFromLumaResult;
187
+ };
183
188
  [CommandName.AddDiagramFromText]: {
184
189
  query: AddDiagramFromTextQuery;
185
190
  result: AddDiagramFromTextResult;
@@ -1589,6 +1594,15 @@ export type AddDiagramFromMermaidQuery = {
1589
1594
  };
1590
1595
  /** A list of shape ids that represent the mermaid diagram. Empty if the rendering fails. */
1591
1596
  export type AddDiagramFromMermaidResult = Promise<string[]>;
1597
+ export type AddDiagramFromLumaQuery = {
1598
+ /** A luma diagram syntax string, e.g., A > B > C */
1599
+ 'm': string;
1600
+ /** The point on the canvas for placing the diagram */
1601
+ 'o'?: Point | undefined;
1602
+ /** If true, place the diagram exactly at the point. Otherwise, place it in open space near the point. */
1603
+ 'e'?: boolean | undefined;
1604
+ };
1605
+ export type AddDiagramFromLumaResult = Promise<string[]>;
1592
1606
  export type OffsetItemsQuery = {
1593
1607
  /** IDs of the items (blocks, lines, groups) to move */
1594
1608
  'ids': string[];
package/commandtypes.js CHANGED
@@ -7,6 +7,7 @@ exports.commandTitles = new Map([
7
7
  ["aafh" /* CommandName.AddAuthorizationFlowHandler */, 'AddAuthorizationFlowHandler'],
8
8
  ["aci" /* CommandName.AddCardIntegration */, 'AddCardIntegration'],
9
9
  ["adfm" /* CommandName.AddDiagramFromMermaid */, 'AddDiagramFromMermaid'],
10
+ ["luma" /* CommandName.AddDiagramFromLuma */, 'AddDiagramFromLuma'],
10
11
  ["adft" /* CommandName.AddDiagramFromText */, 'AddDiagramFromText'],
11
12
  ["alta" /* CommandName.AddLineTextArea */, 'AddLineTextArea'],
12
13
  ["ami" /* CommandName.AddMenuItem */, 'AddMenuItem'],
@@ -158,7 +158,9 @@ function objectValidatorWithList(validatorStructure) {
158
158
  let valid = true;
159
159
  Object.entries(validatorStructure).forEach(([key, validator]) => {
160
160
  if (!validator(subject[key])) {
161
- invalidFields === null || invalidFields === void 0 ? void 0 : invalidFields.push(key);
161
+ if (invalidFields && Array.isArray(invalidFields)) {
162
+ invalidFields.push(key);
163
+ }
162
164
  valid = false;
163
165
  }
164
166
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.324",
3
+ "version": "0.0.326",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",