lucid-extension-sdk 0.0.294 → 0.0.296

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
@@ -1423,7 +1423,9 @@ export type MeasureTextResult = {
1423
1423
  'h': number;
1424
1424
  };
1425
1425
  export declare enum MermaidDiagramType {
1426
- FLOWCHART = "flowchart"
1426
+ FLOWCHART = "flowchart",
1427
+ CLASS_DIAGRAM = "class_diagram",
1428
+ ERD = "erd"
1427
1429
  }
1428
1430
  export type AddDiagramFromMermaidQuery = {
1429
1431
  /** Type of diagram as an enum, e.g., flowchart. */
package/commandtypes.js CHANGED
@@ -170,11 +170,11 @@ var GetLLMContextType;
170
170
  var MermaidDiagramType;
171
171
  (function (MermaidDiagramType) {
172
172
  MermaidDiagramType["FLOWCHART"] = "flowchart";
173
+ MermaidDiagramType["CLASS_DIAGRAM"] = "class_diagram";
174
+ MermaidDiagramType["ERD"] = "erd";
173
175
  // The following types are not yet supported.
174
176
  // SEQUENCE_DIAGRAM = 'sequence_diagram',
175
- // CLASS_DIAGRAM = 'class_diagram',
176
177
  // STATE_DIAGRAM = 'state_diagram',
177
- // ERD = 'erd',
178
178
  // USER_JOURNEY = 'user_journey',
179
179
  // GANTT = 'gantt',
180
180
  // PIECHART = 'piechart',
@@ -76,8 +76,6 @@ export declare class SchemaPatch extends Patch {
76
76
  columnsDeleted: string[];
77
77
  /** */
78
78
  columnOrdering: [string, string | null][] | undefined;
79
- /** Changes to the primary key */
80
- primaryKey: string[] | undefined;
81
79
  constructor(
82
80
  /** The id of the patch */
83
81
  id: string,
@@ -89,8 +87,6 @@ export declare class SchemaPatch extends Patch {
89
87
  columnsDeleted: string[],
90
88
  /** */
91
89
  columnOrdering: [string, string | null][] | undefined,
92
- /** Changes to the primary key */
93
- primaryKey: string[] | undefined,
94
90
  /** The syncSourceId of the changed data source */
95
91
  syncSourceId: string,
96
92
  /** The syncCollectionId of the changed collection */
@@ -116,7 +116,6 @@ class ThirdPartyColumnPatch {
116
116
  static deserialize(data) {
117
117
  var _a;
118
118
  const result = new ThirdPartyColumnPatch((_a = data['name']) !== null && _a !== void 0 ? _a : undefined, data['fieldType'] != null ? (0, fieldtypedefinition_1.deserializeFieldTypeDefinition)(data['fieldType']) : undefined);
119
- console.log(`\n\nSerialization result: ${JSON.stringify(result.toJSON())}\n\n`);
120
119
  return result;
121
120
  }
122
121
  }
@@ -133,8 +132,6 @@ class SchemaPatch extends Patch {
133
132
  columnsDeleted,
134
133
  /** */
135
134
  columnOrdering,
136
- /** Changes to the primary key */
137
- primaryKey,
138
135
  /** The syncSourceId of the changed data source */
139
136
  syncSourceId,
140
137
  /** The syncCollectionId of the changed collection */
@@ -144,7 +141,6 @@ class SchemaPatch extends Patch {
144
141
  this.columnsChanged = columnsChanged;
145
142
  this.columnsDeleted = columnsDeleted;
146
143
  this.columnOrdering = columnOrdering;
147
- this.primaryKey = primaryKey;
148
144
  }
149
145
  toJSON() {
150
146
  return {
@@ -160,13 +156,13 @@ class SchemaPatch extends Patch {
160
156
  clone() {
161
157
  return new SchemaPatch(this.id, this.columnsAdded.map((columnAdded) => columnAdded.clone()), objMap(this.columnsChanged, (columnChange) => columnChange.clone()), [...this.columnsDeleted], this.columnOrdering && [
162
158
  ...this.columnOrdering.map(([base, target]) => [base, target]),
163
- ], this.primaryKey && [...this.primaryKey], this.syncSourceId, this.syncCollectionId);
159
+ ], this.syncSourceId, this.syncCollectionId);
164
160
  }
165
161
  }
166
162
  exports.SchemaPatch = SchemaPatch;
167
163
  function _schemaPatchParser(id, patch) {
168
- var _a, _b;
169
- return new SchemaPatch(id, patch['columnsAdded'].map(ThirdPartyColumn.deserialize), objMap(patch['columnsChanged'], ThirdPartyColumnPatch.deserialize), patch['columnsDeleted'], (_a = patch['columnOrdering']) !== null && _a !== void 0 ? _a : undefined, (_b = patch['primaryKey']) !== null && _b !== void 0 ? _b : undefined, patch['syncSourceId'], patch['syncCollectionId']);
164
+ var _a;
165
+ return new SchemaPatch(id, patch['columnsAdded'].map(ThirdPartyColumn.deserialize), objMap(patch['columnsChanged'], ThirdPartyColumnPatch.deserialize), patch['columnsDeleted'], (_a = patch['columnOrdering']) !== null && _a !== void 0 ? _a : undefined, patch['syncSourceId'], patch['syncCollectionId']);
170
166
  }
171
167
  const schemaPatchParser = (id, patch) => {
172
168
  if ((0, serializedpatchtypes_1.patchSchemaValidator)(patch)) {
@@ -37,7 +37,6 @@ export declare const patchSchemaValidator: (subject: unknown) => subject is impo
37
37
  };
38
38
  columnsDeleted: (p1: unknown) => p1 is string[];
39
39
  columnOrdering: (x: unknown) => x is [string, string | null][] | null | undefined;
40
- primaryKey: (x: unknown) => x is string[] | null | undefined;
41
40
  syncSourceId: typeof isString;
42
41
  syncCollectionId: typeof isString;
43
42
  adapterType: (x: unknown) => x is "EXTENSION_API";
@@ -69,7 +68,6 @@ export declare const patchValidator: (x: unknown) => x is import("../../core/gua
69
68
  };
70
69
  columnsDeleted: (p1: unknown) => p1 is string[];
71
70
  columnOrdering: (x: unknown) => x is [string, string | null][] | null | undefined;
72
- primaryKey: (x: unknown) => x is string[] | null | undefined;
73
71
  syncSourceId: typeof isString;
74
72
  syncCollectionId: typeof isString;
75
73
  adapterType: (x: unknown) => x is "EXTENSION_API";
@@ -27,7 +27,6 @@ exports.patchSchemaValidator = (0, validators_1.objectValidator)({
27
27
  columnsChanged: (0, validators_1.mapValidator)(exports.thirdPartyColumnPatchValidator),
28
28
  columnsDeleted: (0, validators_1.arrayValidator)(checks_1.isString),
29
29
  columnOrdering: (0, validators_1.nullableOption)((0, validators_1.arrayValidator)((0, validators_1.tupleValidator)(checks_1.isString, (0, validators_1.nullable)(checks_1.isString)))),
30
- primaryKey: (0, validators_1.nullableOption)((0, validators_1.arrayValidator)(checks_1.isString)),
31
30
  syncSourceId: checks_1.isString,
32
31
  syncCollectionId: checks_1.isString,
33
32
  adapterType: (0, checks_1.isLiteral)('EXTENSION_API'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.294",
3
+ "version": "0.0.296",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",