@superblocksteam/library 2.0.3-next.100 → 2.0.3-next.103

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.
Files changed (22) hide show
  1. package/dist/{allPaths-BIcW22ON.js → allPaths-D17klCNI.js} +2 -2
  2. package/dist/{allPaths-BIcW22ON.js.map → allPaths-D17klCNI.js.map} +1 -1
  3. package/dist/{allPaths-TFa77ssf.js → allPaths-qwLVp8ey.js} +2 -2
  4. package/dist/{allPaths-TFa77ssf.js.map → allPaths-qwLVp8ey.js.map} +1 -1
  5. package/dist/{allPathsLoader-66hpXNFC.js → allPathsLoader-BBePZAWr.js} +3 -3
  6. package/dist/{allPathsLoader-NDdzt1-S.js.map → allPathsLoader-BBePZAWr.js.map} +1 -1
  7. package/dist/{allPathsLoader-NDdzt1-S.js → allPathsLoader-C6kYq5jL.js} +3 -3
  8. package/dist/{allPathsLoader-66hpXNFC.js.map → allPathsLoader-C6kYq5jL.js.map} +1 -1
  9. package/dist/{index-BBdi2OTU.js → index-Cf5B7k85.js} +297 -127
  10. package/dist/{index-BBdi2OTU.js.map → index-Cf5B7k85.js.map} +1 -1
  11. package/dist/index.js +2 -2
  12. package/dist/{splitPathsBySizeLoader-BQDszFo7.js → splitPathsBySizeLoader-Cy4Y9soq.js} +2 -2
  13. package/dist/{splitPathsBySizeLoader-BQDszFo7.js.map → splitPathsBySizeLoader-Cy4Y9soq.js.map} +1 -1
  14. package/dist/{splitPathsBySizeLoader-DF5UX5DW.js → splitPathsBySizeLoader-D3MLR09i.js} +2 -2
  15. package/dist/{splitPathsBySizeLoader-DF5UX5DW.js.map → splitPathsBySizeLoader-D3MLR09i.js.map} +1 -1
  16. package/dist-types/edit-mode/features/operation-store.d.ts +20 -21
  17. package/dist-types/edit-mode/features/runtime-entities-manager.d.ts +16 -7
  18. package/dist-types/edit-mode/features/runtime-widgets-manager.d.ts +5 -1
  19. package/dist-types/edit-mode/source-update-api.d.ts +2 -1
  20. package/dist-types/lib/index.d.ts +1 -0
  21. package/dist-types/lib/internal-details/lib/types.d.ts +2 -1
  22. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { T as clientExports } from "./index-BBdi2OTU.js";
2
- import { U, V, O, W, X, Y, Z, $, a0, a1, y, a2, a3, a4, a5, a6, R, a7, P, a8, a9, aa, ab, Q, x, S, o, d, e, m, q, l, L, z, t, u, f, n, i, g, y as y2, c, j, s, k, h, w, v, A, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, B, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, K, aR, aS, aT, aU, aV, aW, E, aX, aY, aZ, a_, a$, G, b0, b1, C, b2, b3, b4, r, J, H, b5, b6, b7, N, D, F, b8, b9, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, M, bF } from "./index-BBdi2OTU.js";
1
+ import { T as clientExports } from "./index-Cf5B7k85.js";
2
+ import { U, V, O, W, X, Y, Z, $, a0, a1, y, a2, a3, a4, a5, a6, R, a7, P, a8, a9, aa, ab, Q, x, S, o, d, e, m, q, l, L, z, t, u, f, n, i, g, y as y2, c, j, s, k, h, w, v, A, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, B, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, K, aR, aS, aT, aU, aV, aW, E, aX, aY, aZ, a_, a$, G, b0, b1, C, b2, b3, b4, r, J, H, b5, b6, b7, N, D, F, b8, b9, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, M, bF } from "./index-Cf5B7k85.js";
3
3
  const createRoot = clientExports.createRoot;
4
4
  export {
5
5
  U as Await,
@@ -1,4 +1,4 @@
1
- import { _ as __awaiter, a as __generator, p as pascalCase, I as IconSize } from "./index-BBdi2OTU.js";
1
+ import { _ as __awaiter, a as __generator, p as pascalCase, I as IconSize } from "./index-Cf5B7k85.js";
2
2
  var splitPathsBySizeLoader = function(name, size) {
3
3
  return __awaiter(void 0, void 0, void 0, function() {
4
4
  var key, pathsRecord;
@@ -31,4 +31,4 @@ var splitPathsBySizeLoader = function(name, size) {
31
31
  export {
32
32
  splitPathsBySizeLoader
33
33
  };
34
- //# sourceMappingURL=splitPathsBySizeLoader-BQDszFo7.js.map
34
+ //# sourceMappingURL=splitPathsBySizeLoader-Cy4Y9soq.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"splitPathsBySizeLoader-BQDszFo7.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.18.1_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/paths-loaders/splitPathsBySizeLoader.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __awaiter, __generator } from \"tslib\";\nimport { pascalCase } from \"change-case\";\nimport { IconSize } from \"../iconTypes\";\n/**\n * A dynamic loader for icon paths that generates separate chunks for the two size variants.\n */\nexport var splitPathsBySizeLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var key, pathsRecord;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n key = pascalCase(name);\n if (!(size === IconSize.STANDARD)) return [3 /*break*/, 2];\n return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-16px-paths\" */\n \"../generated/16px/paths\")];\n case 1:\n pathsRecord = _a.sent();\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-20px-paths\" */\n \"../generated/20px/paths\")];\n case 3:\n pathsRecord = _a.sent();\n _a.label = 4;\n case 4: return [2 /*return*/, pathsRecord[key]];\n }\n });\n}); };\n//# sourceMappingURL=splitPathsBySizeLoader.js.map"],"names":[],"mappings":";AAqBU,IAAC,yBAAyB,SAAU,MAAM,MAAM;AAAE,SAAO,UAAU,QAAQ,QAAQ,QAAQ,WAAY;AAC7G,QAAI,KAAK;AACT,WAAO,YAAY,MAAM,SAAU,IAAI;AACnC,cAAQ,GAAG,OAAK;AAAA,QACZ,KAAK;AACD,gBAAM,WAAW,IAAI;AACrB,cAAI,EAAE,SAAS,SAAS,UAAW,QAAO,CAAC,GAAa,CAAC;AACzD,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEjB;AAAA,UAAyB,kBAAC;AAAA,QAClC,KAAK;AACD,wBAAc,GAAG,KAAM;AACvB,iBAAO,CAAC,GAAa,CAAC;AAAA,QAC1B,KAAK;AAAG,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEzB;AAAA,UAAyB,kBAAC;AAAA,QAC9B,KAAK;AACD,wBAAc,GAAG,KAAM;AACvB,aAAG,QAAQ;AAAA,QACf,KAAK;AAAG,iBAAO,CAAC,GAAc,YAAY,GAAG,CAAC;AAAA,MAC1D;AAAA,IACA,CAAK;AAAA,EACL,CAAC;AAAE;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"splitPathsBySizeLoader-Cy4Y9soq.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.18.1_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/paths-loaders/splitPathsBySizeLoader.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __awaiter, __generator } from \"tslib\";\nimport { pascalCase } from \"change-case\";\nimport { IconSize } from \"../iconTypes\";\n/**\n * A dynamic loader for icon paths that generates separate chunks for the two size variants.\n */\nexport var splitPathsBySizeLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var key, pathsRecord;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n key = pascalCase(name);\n if (!(size === IconSize.STANDARD)) return [3 /*break*/, 2];\n return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-16px-paths\" */\n \"../generated/16px/paths\")];\n case 1:\n pathsRecord = _a.sent();\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-20px-paths\" */\n \"../generated/20px/paths\")];\n case 3:\n pathsRecord = _a.sent();\n _a.label = 4;\n case 4: return [2 /*return*/, pathsRecord[key]];\n }\n });\n}); };\n//# sourceMappingURL=splitPathsBySizeLoader.js.map"],"names":[],"mappings":";AAqBU,IAAC,yBAAyB,SAAU,MAAM,MAAM;AAAE,SAAO,UAAU,QAAQ,QAAQ,QAAQ,WAAY;AAC7G,QAAI,KAAK;AACT,WAAO,YAAY,MAAM,SAAU,IAAI;AACnC,cAAQ,GAAG,OAAK;AAAA,QACZ,KAAK;AACD,gBAAM,WAAW,IAAI;AACrB,cAAI,EAAE,SAAS,SAAS,UAAW,QAAO,CAAC,GAAa,CAAC;AACzD,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEjB;AAAA,UAAyB,kBAAC;AAAA,QAClC,KAAK;AACD,wBAAc,GAAG,KAAM;AACvB,iBAAO,CAAC,GAAa,CAAC;AAAA,QAC1B,KAAK;AAAG,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEzB;AAAA,UAAyB,kBAAC;AAAA,QAC9B,KAAK;AACD,wBAAc,GAAG,KAAM;AACvB,aAAG,QAAQ;AAAA,QACf,KAAK;AAAG,iBAAO,CAAC,GAAc,YAAY,GAAG,CAAC;AAAA,MAC1D;AAAA,IACA,CAAK;AAAA,EACL,CAAC;AAAE;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import { _ as __awaiter, a as __generator, p as pascalCase, b as IconSize } from "./index-BBdi2OTU.js";
1
+ import { _ as __awaiter, a as __generator, p as pascalCase, b as IconSize } from "./index-Cf5B7k85.js";
2
2
  var splitPathsBySizeLoader = function(name, size) {
3
3
  return __awaiter(void 0, void 0, void 0, function() {
4
4
  var key, pathsRecord;
@@ -31,4 +31,4 @@ var splitPathsBySizeLoader = function(name, size) {
31
31
  export {
32
32
  splitPathsBySizeLoader
33
33
  };
34
- //# sourceMappingURL=splitPathsBySizeLoader-DF5UX5DW.js.map
34
+ //# sourceMappingURL=splitPathsBySizeLoader-D3MLR09i.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"splitPathsBySizeLoader-DF5UX5DW.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.20.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/paths-loaders/splitPathsBySizeLoader.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __awaiter, __generator } from \"tslib\";\nimport { pascalCase } from \"change-case\";\nimport { IconSize } from \"../iconTypes\";\n/**\n * A dynamic loader for icon paths that generates separate chunks for the two size variants.\n */\nexport var splitPathsBySizeLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var key, pathsRecord;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n key = pascalCase(name);\n if (!(size === IconSize.STANDARD)) return [3 /*break*/, 2];\n return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-16px-paths\" */\n \"../generated/16px/paths\")];\n case 1:\n pathsRecord = _a.sent();\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-20px-paths\" */\n \"../generated/20px/paths\")];\n case 3:\n pathsRecord = _a.sent();\n _a.label = 4;\n case 4: return [2 /*return*/, pathsRecord[key]];\n }\n });\n}); };\n//# sourceMappingURL=splitPathsBySizeLoader.js.map"],"names":[],"mappings":";AAqBU,IAAC,yBAAyB,SAAU,MAAM,MAAM;AAAE,SAAO,UAAU,QAAQ,QAAQ,QAAQ,WAAY;AAC7G,QAAI,KAAK;AACT,WAAO,YAAY,MAAM,SAAU,IAAI;AACnC,cAAQ,GAAG,OAAK;AAAA,QACZ,KAAK;AACD,gBAAM,WAAW,IAAI;AACrB,cAAI,EAAE,SAAS,SAAS,UAAW,QAAO,CAAC,GAAa,CAAC;AACzD,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEjB;AAAA,UAAyB,kBAAC;AAAA,QAClC,KAAK;AACD,wBAAc,GAAG,KAAM;AACvB,iBAAO,CAAC,GAAa,CAAC;AAAA,QAC1B,KAAK;AAAG,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEzB;AAAA,UAAyB,kBAAC;AAAA,QAC9B,KAAK;AACD,wBAAc,GAAG,KAAM;AACvB,aAAG,QAAQ;AAAA,QACf,KAAK;AAAG,iBAAO,CAAC,GAAc,YAAY,GAAG,CAAC;AAAA,MAC1D;AAAA,IACA,CAAK;AAAA,EACL,CAAC;AAAE;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"splitPathsBySizeLoader-D3MLR09i.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.20.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/paths-loaders/splitPathsBySizeLoader.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __awaiter, __generator } from \"tslib\";\nimport { pascalCase } from \"change-case\";\nimport { IconSize } from \"../iconTypes\";\n/**\n * A dynamic loader for icon paths that generates separate chunks for the two size variants.\n */\nexport var splitPathsBySizeLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var key, pathsRecord;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n key = pascalCase(name);\n if (!(size === IconSize.STANDARD)) return [3 /*break*/, 2];\n return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-16px-paths\" */\n \"../generated/16px/paths\")];\n case 1:\n pathsRecord = _a.sent();\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-20px-paths\" */\n \"../generated/20px/paths\")];\n case 3:\n pathsRecord = _a.sent();\n _a.label = 4;\n case 4: return [2 /*return*/, pathsRecord[key]];\n }\n });\n}); };\n//# sourceMappingURL=splitPathsBySizeLoader.js.map"],"names":[],"mappings":";AAqBU,IAAC,yBAAyB,SAAU,MAAM,MAAM;AAAE,SAAO,UAAU,QAAQ,QAAQ,QAAQ,WAAY;AAC7G,QAAI,KAAK;AACT,WAAO,YAAY,MAAM,SAAU,IAAI;AACnC,cAAQ,GAAG,OAAK;AAAA,QACZ,KAAK;AACD,gBAAM,WAAW,IAAI;AACrB,cAAI,EAAE,SAAS,SAAS,UAAW,QAAO,CAAC,GAAa,CAAC;AACzD,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEjB;AAAA,UAAyB,kBAAC;AAAA,QAClC,KAAK;AACD,wBAAc,GAAG,KAAM;AACvB,iBAAO,CAAC,GAAa,CAAC;AAAA,QAC1B,KAAK;AAAG,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEzB;AAAA,UAAyB,kBAAC;AAAA,QAC9B,KAAK;AACD,wBAAc,GAAG,KAAM;AACvB,aAAG,QAAQ;AAAA,QACf,KAAK;AAAG,iBAAO,CAAC,GAAc,YAAY,GAAG,CAAC;AAAA,MAC1D;AAAA,IACA,CAAK;AAAA,EACL,CAAC;AAAE;","x_google_ignoreList":[0]}
@@ -1,37 +1,34 @@
1
- import type { PropertyInfo, ReparentRequest, SbElement, SetPropertiesRequest, SetPropertyRequest, SourceLocation } from "@superblocksteam/library-shared/types";
2
- export type ReparentTransaction = {
3
- type: "reparent";
1
+ import type { CreateRequest, DeleteRequest, EditOperations, PropertyInfo, ReparentRequest, SbElement, SetPropertiesRequest, SetPropertyRequest, SourceLocation } from "@superblocksteam/library-shared/types";
2
+ type OptimisticOperation<P> = {
3
+ type: keyof EditOperations;
4
+ payload: P;
4
5
  id: string;
5
- affectedSourceIds: string[];
6
- payload: Omit<ReparentRequest, "transaction">;
7
6
  callback?: () => void;
8
7
  };
9
- type SetPropertiesTransaction = {
10
- type: "setProperties";
11
- id: string;
12
- sourceId: string;
13
- payload: Omit<SetPropertiesRequest, "transaction">;
14
- callback?: () => void;
15
- };
16
- type SetPropertyTransaction = {
17
- type: "setProperty";
18
- id: string;
19
- sourceId: string;
20
- payload: Omit<SetPropertyRequest, "transaction">;
21
- callback?: () => void;
22
- };
23
- type PendingTransaction = ReparentTransaction | SetPropertiesTransaction | SetPropertyTransaction;
8
+ export type ReparentTransaction = OptimisticOperation<ReparentRequest>;
9
+ type SetPropertiesTransaction = OptimisticOperation<SetPropertiesRequest>;
10
+ type SetPropertyTransaction = OptimisticOperation<SetPropertyRequest>;
11
+ type CreateComponentTransaction = OptimisticOperation<CreateRequest>;
12
+ type DeleteComponentsTransaction = OptimisticOperation<DeleteRequest>;
13
+ type PendingTransaction = ReparentTransaction | SetPropertiesTransaction | SetPropertyTransaction | CreateComponentTransaction | DeleteComponentsTransaction;
24
14
  declare class OperationManager {
25
15
  private pendingTransactions;
16
+ private waitingForBatch;
17
+ private batchOperations;
18
+ private batchOperationTransactionId;
26
19
  visibleSourceIds: string[];
27
20
  constructor();
28
21
  get allPendingTransactions(): PendingTransaction[];
29
22
  get pendingReparentOperations(): ReparentTransaction[];
23
+ get pendingDeleteOperations(): DeleteComponentsTransaction[];
30
24
  get pendingSetPropertiesOperations(): SetPropertiesTransaction[];
31
- get pendingSetPropertyOperations(): SetPropertyTransaction[];
25
+ get hasPendingOperations(): boolean;
32
26
  get allNames(): never[];
27
+ private executeOrAddToBatch;
33
28
  private addPendingTransaction;
34
29
  clearPendingTransactions(transactionIds: string[]): void;
30
+ batchUpdate(performOperations: () => void): void;
31
+ createComponent(payload: CreateRequest): void;
35
32
  dropComponent(action: {
36
33
  from: {
37
34
  source: SourceLocation;
@@ -41,9 +38,11 @@ declare class OperationManager {
41
38
  };
42
39
  propsToChange?: Record<string, PropertyInfo>;
43
40
  }): void;
41
+ ackDeletedComponents(payload: DeleteRequest): void;
44
42
  writeRuntimeProperties(sourceId: SbElement, transactionId: string, updates: Record<string, PropertyInfo<unknown>>): void;
45
43
  setWidgetProperties(sourceId: SbElement, properties: Record<string, PropertyInfo<unknown>>, callback?: () => void): void;
46
44
  setWidgetProperty(sourceId: SbElement, property: string, value: PropertyInfo<unknown>, callback?: () => void): void;
47
45
  ensureFilesSynced(): Promise<void>;
46
+ generateSourceId(): SbElement;
48
47
  }
49
48
  export default OperationManager;
@@ -2,7 +2,7 @@ import RuntimeWidgetsManager from "./runtime-widgets-manager.js";
2
2
  import type { ChildElement, RuntimeWidgetMeta } from "./runtime-widgets-manager.js";
3
3
  import type { IEntityManager } from "../../lib/internal-details/lib/evaluator/base-entity-manager.js";
4
4
  import type { IdentifierInfo, NameManager } from "../../lib/internal-details/lib/features/name-manager.js";
5
- import type { SbElement, SbInstance } from "@superblocksteam/library-shared/types";
5
+ import type { CreateRequest, DeleteRequest, SbElement, SbInstance } from "@superblocksteam/library-shared/types";
6
6
  declare class RuntimeEntitiesManager {
7
7
  readonly nameManager: NameManager;
8
8
  readonly entityManager: IEntityManager;
@@ -16,6 +16,7 @@ declare class RuntimeEntitiesManager {
16
16
  fallbackScopeId: string;
17
17
  isInCustomComponent: boolean;
18
18
  }): void;
19
+ addOptimisticCreateWidget(createRequest: CreateRequest): void;
19
20
  private getOptimisticWidgetMeta;
20
21
  getEditorWidgetMeta(instanceId: SbInstance): RuntimeWidgetMeta | undefined;
21
22
  getEditorWidgetSourceId(instanceId: SbInstance): `SB-${string}` | undefined;
@@ -33,16 +34,24 @@ declare class RuntimeEntitiesManager {
33
34
  getEditorWidgetChildren(instanceId: SbInstance): ChildElement[];
34
35
  get hasEditOperationsPending(): boolean;
35
36
  get getPendingOperations(): ((import("./operation-store.js").ReparentTransaction | {
36
- type: "setProperties";
37
+ type: keyof import("@superblocksteam/library-shared/types").EditOperations;
38
+ payload: import("@superblocksteam/library-shared/types").SetPropertiesRequest;
37
39
  id: string;
38
- sourceId: string;
39
- payload: Omit<import("@superblocksteam/library-shared/types").SetPropertiesRequest, "transaction">;
40
40
  callback?: () => void;
41
41
  } | {
42
- type: "setProperty";
42
+ type: keyof import("@superblocksteam/library-shared/types").EditOperations;
43
+ payload: import("@superblocksteam/library-shared/types").SetPropertyRequest;
44
+ id: string;
45
+ callback?: () => void;
46
+ } | {
47
+ type: keyof import("@superblocksteam/library-shared/types").EditOperations;
48
+ payload: CreateRequest;
49
+ id: string;
50
+ callback?: () => void;
51
+ } | {
52
+ type: keyof import("@superblocksteam/library-shared/types").EditOperations;
53
+ payload: DeleteRequest;
43
54
  id: string;
44
- sourceId: string;
45
- payload: Omit<import("@superblocksteam/library-shared/types").SetPropertyRequest, "transaction">;
46
55
  callback?: () => void;
47
56
  }) | {
48
57
  instanceId: SbInstance;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import type { Name } from "../../lib/internal-details/lib/evaluator/names.js";
3
3
  import type { IdentifierInfo, NameManager } from "../../lib/internal-details/lib/features/name-manager.js";
4
- import type { SbElement, SbInstance } from "@superblocksteam/library-shared/types";
4
+ import type { CreateRequest, SbElement, SbInstance } from "@superblocksteam/library-shared/types";
5
5
  import type { ReactNode } from "react";
6
6
  export type ChildFunction = React.FunctionComponent;
7
7
  export type ChildElement = {
@@ -43,6 +43,10 @@ declare class RuntimeWidgetsManager {
43
43
  isInCustomComponent: boolean;
44
44
  fallbackScopeId: string;
45
45
  }): void;
46
+ addWidgetFromPayload(details: {
47
+ rootInstanceId: SbInstance;
48
+ parentInstanceId: SbInstance;
49
+ }, createRequest: CreateRequest): void;
46
50
  getMeta(id: SbInstance): RuntimeWidgetMeta | undefined;
47
51
  getSourceIdCount(sourceId: SbElement): number;
48
52
  isChildOf(childId: SbInstance, parentId: SbInstance): boolean;
@@ -1,4 +1,4 @@
1
- import type { EditOperationType, EditOperations, ReparentRequest, CreateRequest, SetPropertyRequest, SetPropertiesRequest, BatchUpdateRequest, ApiUpdateRequest, AddEntityRequest, UpdateEntityRequest, UpdateThemeRequest, DeleteEntityRequest } from "@superblocksteam/library-shared/types";
1
+ import type { EditOperationType, EditOperations, ReparentRequest, CreateRequest, SetPropertyRequest, SetPropertiesRequest, BatchUpdateRequest, ApiUpdateRequest, AddEntityRequest, UpdateEntityRequest, UpdateThemeRequest, DeleteEntityRequest, DeleteRequest } from "@superblocksteam/library-shared/types";
2
2
  type CamelCase<S extends string> = S extends `${infer Head}-${infer Tail}` ? `${Head}${Capitalize<CamelCase<Tail>>}` : S extends `${infer Head}:${infer Tail}` ? `${Head}${Capitalize<CamelCase<Tail>>}` : S;
3
3
  type IOperationAPI = {
4
4
  [K in EditOperationType as CamelCase<K>]: (payload: Parameters<EditOperations[K]>[0]) => Promise<ReturnType<EditOperations[K]> | undefined>;
@@ -10,6 +10,7 @@ declare class OperationAPI implements IOperationAPI {
10
10
  connect(peerId: string, userId?: string): Promise<void>;
11
11
  editorMoveComponent: (payload: ReparentRequest) => Promise<void | undefined>;
12
12
  editorCreateComponent: (payload: CreateRequest) => Promise<`SB-${string}` | undefined>;
13
+ editorDeleteComponents: (payload: DeleteRequest) => Promise<void | undefined>;
13
14
  editorSetProperty: (payload: SetPropertyRequest) => Promise<void | undefined>;
14
15
  editorSetProperties: (payload: SetPropertiesRequest) => Promise<any>;
15
16
  editorBatchUpdate: (payload: BatchUpdateRequest) => Promise<unknown[] | undefined>;
@@ -11,6 +11,7 @@ export { SbModal } from "./user-facing/components/modal/index.jsx";
11
11
  export { SbSlideout } from "./user-facing/components/slideout/index.jsx";
12
12
  export { SbTable } from "./user-facing/components/table/index.jsx";
13
13
  export { SbDropdown } from "./user-facing/components/dropdown/index.jsx";
14
+ export type * from "./user-facing/components/dropdown/types.ts";
14
15
  export { SbCustom } from "./user-facing/components/custom/index.jsx";
15
16
  export { SbKeyValue } from "./user-facing/components/key-value/index.jsx";
16
17
  export { registerComponent, type CustomComponentProps, } from "./user-facing/components/custom/register-custom-component.jsx";
@@ -1,5 +1,5 @@
1
1
  import type { PropertiesPanelDefinition } from "@superblocksteam/library-shared/props";
2
- import type { AppToEditorMessage, DeleteMeLibraryApi, PayloadAction, PropertyInfo, SbElement, TransactionInfo } from "@superblocksteam/library-shared/types";
2
+ import type { AppToEditorMessage, DeleteMeLibraryApi, DeleteRequest, PayloadAction, PropertyInfo, SbElement, TransactionInfo } from "@superblocksteam/library-shared/types";
3
3
  import type { OrchestratorViewMode, PlaceholderInfo } from "@superblocksteam/shared";
4
4
  import type { XYCoord } from "react-dnd";
5
5
  export type ExecutionError = {
@@ -117,6 +117,7 @@ export type FromParentToChildMessageTypesMap = {
117
117
  "sb-retrieve-property-panel-props": {
118
118
  sourceId: string;
119
119
  };
120
+ "sb-delete-components": DeleteRequest;
120
121
  "parent-action-batch": PayloadAction<unknown>[];
121
122
  click: void;
122
123
  "register-keypress": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superblocksteam/library",
3
- "version": "2.0.3-next.100",
3
+ "version": "2.0.3-next.103",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -32,7 +32,7 @@
32
32
  "@react-hook/resize-observer": "1.2.6",
33
33
  "@superblocksteam/fast-deep-equal": "3.1.4",
34
34
  "@superblocksteam/iso-currency": "2.0.0",
35
- "@superblocksteam/library-shared": "2.0.3-next.100",
35
+ "@superblocksteam/library-shared": "2.0.3-next.103",
36
36
  "@superblocksteam/shared": "0.8939.0",
37
37
  "antd": "4.24.15",
38
38
  "apca-w3": "^0.1.9",
@@ -126,7 +126,7 @@
126
126
  ]
127
127
  },
128
128
  "scripts": {
129
- "build": "pnpm run --stream \"/^build:.*/\" && pnpm run build:docs-utils",
129
+ "build": "pnpm run --stream \"/^build:.*/\"",
130
130
  "build:docs-utils": "vite build --config vite.docs-utils.config.js",
131
131
  "build:dts": "tsc --build tsconfig.app.json",
132
132
  "build:lib": "vite build",