@superblocksteam/library 2.0.3-next.140 → 2.0.3-next.141

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 (24) hide show
  1. package/dist/{allPaths-DwTDUyvP.js → allPaths-BwTkClxz.js} +2 -2
  2. package/dist/{allPaths-DwTDUyvP.js.map → allPaths-BwTkClxz.js.map} +1 -1
  3. package/dist/{allPaths-B4GCrz52.js → allPaths-ZORERYA-.js} +2 -2
  4. package/dist/{allPaths-B4GCrz52.js.map → allPaths-ZORERYA-.js.map} +1 -1
  5. package/dist/{allPathsLoader-DtkAwWTV.js → allPathsLoader-CJtlJ6ie.js} +3 -3
  6. package/dist/{allPathsLoader-Dxv5ra-q.js.map → allPathsLoader-CJtlJ6ie.js.map} +1 -1
  7. package/dist/{allPathsLoader-Dxv5ra-q.js → allPathsLoader-cGVNdvFv.js} +3 -3
  8. package/dist/{allPathsLoader-DtkAwWTV.js.map → allPathsLoader-cGVNdvFv.js.map} +1 -1
  9. package/dist/{index-CF-A-L3f.js → index-BSZAGX_L.js} +109 -233
  10. package/dist/{index-CF-A-L3f.js.map → index-BSZAGX_L.js.map} +1 -1
  11. package/dist/index.js +2 -2
  12. package/dist/{splitPathsBySizeLoader-D9-UGIn0.js → splitPathsBySizeLoader-CixAR-eZ.js} +2 -2
  13. package/dist/{splitPathsBySizeLoader-D9-UGIn0.js.map → splitPathsBySizeLoader-CixAR-eZ.js.map} +1 -1
  14. package/dist/{splitPathsBySizeLoader-IfEMZadL.js → splitPathsBySizeLoader-hWG7CcPp.js} +2 -2
  15. package/dist/{splitPathsBySizeLoader-IfEMZadL.js.map → splitPathsBySizeLoader-hWG7CcPp.js.map} +1 -1
  16. package/dist-types/lib/internal-details/lib/features/api-store.d.ts +7 -6
  17. package/dist-types/lib/triggers/implementations/apis/cancel-apis.d.ts +6 -5
  18. package/dist-types/lib/triggers/implementations/apis/run-apis.d.ts +4 -4
  19. package/dist-types/lib/triggers/registry.d.ts +5 -5
  20. package/dist-types/lib/triggers/run-event-handlers.d.ts +1 -10
  21. package/dist-types/lib/user-facing/entities/api/props.d.ts +4 -4
  22. package/dist-types/lib/user-facing/state/create-bindable-entity-proxy.d.ts +1 -1
  23. package/package.json +2 -2
  24. package/dist-types/lib/user-facing/state/create-entity-proxy.d.ts +0 -1
@@ -2692,14 +2692,14 @@ function getLoaderFn$1(options) {
2692
2692
  if (!(loader === "all")) return [3, 3];
2693
2693
  return [4, import(
2694
2694
  /* webpackChunkName: "blueprint-icons-all-paths-loader" */
2695
- "./allPathsLoader-Dxv5ra-q.js"
2695
+ "./allPathsLoader-CJtlJ6ie.js"
2696
2696
  )];
2697
2697
  case 2:
2698
2698
  return [2, _b2.sent().allPathsLoader];
2699
2699
  case 3:
2700
2700
  return [4, import(
2701
2701
  /* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
2702
- "./splitPathsBySizeLoader-IfEMZadL.js"
2702
+ "./splitPathsBySizeLoader-hWG7CcPp.js"
2703
2703
  )];
2704
2704
  case 4:
2705
2705
  return [2, _b2.sent().splitPathsBySizeLoader];
@@ -56908,28 +56908,11 @@ __decoratorMetadata(_init, InteractionLayerManager);
56908
56908
  const generateId$1 = () => {
56909
56909
  return Math.random().toString(36).substring(2, 15);
56910
56910
  };
56911
- const getName = (name) => {
56912
- return {
56913
- isAnonymous: !name,
56914
- value: name ?? Math.random().toString(36).substring(7),
56915
- __isName: true
56916
- };
56917
- };
56918
- const isName = (name) => {
56919
- return typeof name === "object" && name != null && "__isName" in name;
56920
- };
56921
- const isNameEqual = (a3, b3) => {
56922
- return a3.value === b3.value && a3.isAnonymous === b3.isAnonymous;
56923
- };
56924
56911
  const CancelApisTrigger = {
56925
56912
  type: TriggerStepType.CANCEL_APIS,
56926
- async execute(context2, step) {
56913
+ async execute(_context, step) {
56927
56914
  const apis = step.apis;
56928
- for (const api2 of apis) {
56929
- context2.rootStore.apis.cancelApi(api2.name, {
56930
- scopeId: context2.scopeId
56931
- });
56932
- }
56915
+ await Promise.all(apis.map((api2) => api2.cancel()));
56933
56916
  },
56934
56917
  create(apis, onCancel) {
56935
56918
  return {
@@ -56942,12 +56925,29 @@ const CancelApisTrigger = {
56942
56925
  const RunApisTrigger = {
56943
56926
  type: TriggerStepType.RUN_APIS,
56944
56927
  async execute(context2, step, onFinish) {
56945
- const executions = step.apis.map(
56946
- (api2) => context2.rootStore.apis.runApi(api2.name, {
56947
- scopeId: context2.scopeId
56948
- })
56949
- );
56928
+ const executions = step.apis.map((api2) => api2.run());
56950
56929
  return Promise.allSettled(executions).then((responses) => {
56930
+ const error = responses.find(
56931
+ (response) => {
56932
+ var _a2, _b2, _c2;
56933
+ return response.status === "rejected" || ((_a2 = response.value) == null ? void 0 : _a2.errors) && ((_c2 = (_b2 = response.value) == null ? void 0 : _b2.errors) == null ? void 0 : _c2.length) > 0;
56934
+ }
56935
+ );
56936
+ if (!error && step.onSuccess) {
56937
+ runEventHandlers({
56938
+ flow: step.onSuccess,
56939
+ name: context2.name,
56940
+ scopeId: context2.scopeId,
56941
+ additionalContext: context2.additionalContext
56942
+ });
56943
+ } else if (step.onError) {
56944
+ runEventHandlers({
56945
+ flow: step.onError,
56946
+ name: context2.name,
56947
+ scopeId: context2.scopeId,
56948
+ additionalContext: context2.additionalContext
56949
+ });
56950
+ }
56951
56951
  onFinish == null ? void 0 : onFinish(responses);
56952
56952
  });
56953
56953
  },
@@ -57002,6 +57002,19 @@ const ControlSlideoutTrigger = {
57002
57002
  };
57003
57003
  }
57004
57004
  };
57005
+ const getName = (name) => {
57006
+ return {
57007
+ isAnonymous: !name,
57008
+ value: name ?? Math.random().toString(36).substring(7),
57009
+ __isName: true
57010
+ };
57011
+ };
57012
+ const isName = (name) => {
57013
+ return typeof name === "object" && name != null && "__isName" in name;
57014
+ };
57015
+ const isNameEqual = (a3, b3) => {
57016
+ return a3.value === b3.value && a3.isAnonymous === b3.isAnonymous;
57017
+ };
57005
57018
  const ResetComponentTrigger = {
57006
57019
  type: TriggerStepType.RESET_COMPONENT,
57007
57020
  async execute(context2, step) {
@@ -57261,22 +57274,6 @@ const EventRegistry = {
57261
57274
  const getRootStore = () => Promise.resolve().then(() => rootStore$1).then(
57262
57275
  (module2) => module2.default
57263
57276
  );
57264
- function isApiStep(step) {
57265
- return step.type === TriggerStepType$1.RUN_APIS;
57266
- }
57267
- const runApiScopeHandlers = ({
57268
- apiNames,
57269
- scopeInfo,
57270
- handlerName,
57271
- additionalContext
57272
- }) => {
57273
- apiNames.forEach((apiName) => {
57274
- const apiScopeInfo = scopeInfo[apiName];
57275
- if ((apiScopeInfo == null ? void 0 : apiScopeInfo[handlerName]) && typeof apiScopeInfo[handlerName] === "function") {
57276
- apiScopeInfo[handlerName](additionalContext);
57277
- }
57278
- });
57279
- };
57280
57277
  const runEventHandlers = async ({
57281
57278
  flow: flow3,
57282
57279
  name,
@@ -57295,49 +57292,7 @@ const runEventHandlers = async ({
57295
57292
  const stepType = step.type;
57296
57293
  const trigger2 = EventRegistry[stepType];
57297
57294
  if (trigger2) {
57298
- await trigger2.execute(context2, step, (responses) => {
57299
- if (isApiStep(step)) {
57300
- const error = responses.find(
57301
- (response) => {
57302
- var _a2, _b2, _c2;
57303
- return response.status === "rejected" || ((_a2 = response.value) == null ? void 0 : _a2.errors) && ((_c2 = (_b2 = response.value) == null ? void 0 : _b2.errors) == null ? void 0 : _c2.length) > 0;
57304
- }
57305
- );
57306
- const joinedApiNames = step.apis.map((api2) => api2.name).join(", ");
57307
- const scopeInfo = context2.rootStore.entityManager.getState(scopeId);
57308
- if (!error) {
57309
- if (step.onSuccess) {
57310
- runEventHandlers({
57311
- flow: step.onSuccess,
57312
- name: getName(`${joinedApiNames} onSuccess`),
57313
- scopeId: context2.scopeId,
57314
- additionalContext
57315
- });
57316
- }
57317
- runApiScopeHandlers({
57318
- apiNames: step.apis.map((api2) => api2.name),
57319
- scopeInfo,
57320
- handlerName: "onSuccess",
57321
- additionalContext
57322
- });
57323
- } else if (error) {
57324
- if (error && step.onError) {
57325
- runEventHandlers({
57326
- flow: step.onError,
57327
- name: getName(`${joinedApiNames} onError`),
57328
- scopeId: context2.scopeId,
57329
- additionalContext
57330
- });
57331
- }
57332
- runApiScopeHandlers({
57333
- apiNames: step.apis.map((api2) => api2.name),
57334
- scopeInfo,
57335
- handlerName: "onError",
57336
- additionalContext
57337
- });
57338
- }
57339
- }
57340
- });
57295
+ await trigger2.execute(context2, step);
57341
57296
  } else {
57342
57297
  console.error(
57343
57298
  `Trigger ${step.type} not found`
@@ -62588,7 +62543,11 @@ class SbEventFlow {
62588
62543
  }
62589
62544
  runApis(apis, onSuccess, onError2) {
62590
62545
  return this.addStep(
62591
- EventRegistry.executeApi.create(apis, onSuccess, onError2)
62546
+ EventRegistry.executeApi.create(
62547
+ apis,
62548
+ onSuccess,
62549
+ onError2
62550
+ )
62592
62551
  );
62593
62552
  }
62594
62553
  static cancelApis(apis, onCancel) {
@@ -63963,7 +63922,7 @@ class ApiManager {
63963
63922
  instanceId: oldName
63964
63923
  });
63965
63924
  }
63966
- async runApi(apiName, { scopeId }) {
63925
+ async runApi(apiName, scopeId) {
63967
63926
  var _a2, _b2, _c2;
63968
63927
  const api2 = this.apisByName[apiName];
63969
63928
  editorBridge.setApiStarted(apiName);
@@ -64019,21 +63978,26 @@ class ApiManager {
64019
63978
  });
64020
63979
  const parsedResult = parseStreamResult(events2);
64021
63980
  parsedResult && decodeBytestringsInV2ExecutionResponse(parsedResult);
64022
- const name = {
64023
- value: apiName,
64024
- isAnonymous: false
64025
- };
64026
- const entity = this.rootStore.entityManager.getEntity(scopeId, name);
64027
- if (entity) {
64028
- entity.response = (_c2 = parsedResult == null ? void 0 : parsedResult.output) == null ? void 0 : _c2.result;
64029
- } else {
64030
- console.warn("API entity not found", apiName);
64031
- }
64032
63981
  delete this.runningApiControllers[apiName];
64033
63982
  editorBridge.setApiResponse(apiName, parsedResult);
64034
- return parsedResult;
63983
+ const error = this.findError(parsedResult);
63984
+ const data2 = ((_c2 = parsedResult == null ? void 0 : parsedResult.output) == null ? void 0 : _c2.result) ?? null;
63985
+ return { data: data2, error };
64035
63986
  }
64036
- async cancelApi(apiName, { scopeId }) {
63987
+ findError(apiResponse) {
63988
+ var _a2;
63989
+ if (apiResponse && "systemError" in apiResponse) {
63990
+ return void 0;
63991
+ }
63992
+ const firstUnhandledError = (_a2 = apiResponse == null ? void 0 : apiResponse.errors) == null ? void 0 : _a2.find(
63993
+ (error) => !(error == null ? void 0 : error.handled)
63994
+ );
63995
+ if (!firstUnhandledError) {
63996
+ return void 0;
63997
+ }
63998
+ return `Error in API: ${firstUnhandledError == null ? void 0 : firstUnhandledError.message}`;
63999
+ }
64000
+ async cancelApi(apiName, _scopeId) {
64037
64001
  const abortController = this.runningApiControllers[apiName];
64038
64002
  if (!abortController) {
64039
64003
  console.warn(`No running API execution found for ${apiName}`);
@@ -64041,14 +64005,6 @@ class ApiManager {
64041
64005
  }
64042
64006
  abortController.abort();
64043
64007
  delete this.runningApiControllers[apiName];
64044
- const name = {
64045
- value: apiName,
64046
- isAnonymous: false
64047
- };
64048
- const entity = this.rootStore.entityManager.getEntity(scopeId, name);
64049
- if (entity) {
64050
- entity.response = null;
64051
- }
64052
64008
  editorBridge.setApiResponse(apiName, {
64053
64009
  status: "STATUS_CANCELLED",
64054
64010
  execution: null,
@@ -109667,10 +109623,10 @@ const Layers$1 = {
109667
109623
  max: 99999
109668
109624
  /* LayerMax */
109669
109625
  };
109670
- const createBindableEntityProxy = (entity, identifier2) => {
109626
+ const createBindableEntityProxy = (entityAccessor, identifier2) => {
109671
109627
  return new Proxy(
109672
109628
  {
109673
- entity,
109629
+ entity: entityAccessor(),
109674
109630
  [BindingMetaSymbol]: identifier2
109675
109631
  },
109676
109632
  {
@@ -109678,6 +109634,7 @@ const createBindableEntityProxy = (entity, identifier2) => {
109678
109634
  if (prop === BindingMetaSymbol) {
109679
109635
  return identifier2;
109680
109636
  }
109637
+ const entity = entityAccessor();
109681
109638
  if (prop === "toJSON") {
109682
109639
  return () => {
109683
109640
  if (!entity) return null;
@@ -109696,6 +109653,7 @@ const createBindableEntityProxy = (entity, identifier2) => {
109696
109653
  return entity == null ? void 0 : entity[prop];
109697
109654
  },
109698
109655
  set(_target, prop, value) {
109656
+ const entity = entityAccessor();
109699
109657
  if (!entity) {
109700
109658
  return false;
109701
109659
  }
@@ -109703,6 +109661,7 @@ const createBindableEntityProxy = (entity, identifier2) => {
109703
109661
  return true;
109704
109662
  },
109705
109663
  deleteProperty(_target, prop) {
109664
+ const entity = entityAccessor();
109706
109665
  if (!entity) {
109707
109666
  return false;
109708
109667
  }
@@ -109710,24 +109669,28 @@ const createBindableEntityProxy = (entity, identifier2) => {
109710
109669
  return true;
109711
109670
  },
109712
109671
  has(_target, prop) {
109672
+ const entity = entityAccessor();
109713
109673
  if (!entity) {
109714
109674
  return false;
109715
109675
  }
109716
109676
  return prop in entity;
109717
109677
  },
109718
109678
  ownKeys(_target) {
109679
+ const entity = entityAccessor();
109719
109680
  if (!entity) {
109720
109681
  return [];
109721
109682
  }
109722
109683
  return Object.keys(entity);
109723
109684
  },
109724
109685
  getOwnPropertyDescriptor(_target, prop) {
109686
+ const entity = entityAccessor();
109725
109687
  if (!entity) {
109726
109688
  return void 0;
109727
109689
  }
109728
109690
  return Object.getOwnPropertyDescriptor(entity, prop);
109729
109691
  },
109730
109692
  defineProperty(_target, prop, descriptor) {
109693
+ const entity = entityAccessor();
109731
109694
  if (!entity) {
109732
109695
  return false;
109733
109696
  }
@@ -109735,6 +109698,7 @@ const createBindableEntityProxy = (entity, identifier2) => {
109735
109698
  return true;
109736
109699
  },
109737
109700
  preventExtensions(_target) {
109701
+ const entity = entityAccessor();
109738
109702
  if (!entity) {
109739
109703
  return false;
109740
109704
  }
@@ -109742,18 +109706,21 @@ const createBindableEntityProxy = (entity, identifier2) => {
109742
109706
  return true;
109743
109707
  },
109744
109708
  isExtensible(_target) {
109709
+ const entity = entityAccessor();
109745
109710
  if (!entity) {
109746
109711
  return false;
109747
109712
  }
109748
109713
  return Object.isExtensible(entity);
109749
109714
  },
109750
109715
  getPrototypeOf(_target) {
109716
+ const entity = entityAccessor();
109751
109717
  if (!entity) {
109752
109718
  return null;
109753
109719
  }
109754
109720
  return Object.getPrototypeOf(entity);
109755
109721
  },
109756
109722
  setPrototypeOf(_target, proto4) {
109723
+ const entity = entityAccessor();
109757
109724
  if (!entity) {
109758
109725
  return false;
109759
109726
  }
@@ -109763,91 +109730,6 @@ const createBindableEntityProxy = (entity, identifier2) => {
109763
109730
  }
109764
109731
  );
109765
109732
  };
109766
- function createEntityProxy$1(entities, entityName) {
109767
- return new Proxy(
109768
- {},
109769
- {
109770
- get(_target, prop) {
109771
- const entity = entities[entityName];
109772
- return entity == null ? void 0 : entity[prop];
109773
- },
109774
- set(_target, prop, value) {
109775
- const entity = entities[entityName];
109776
- if (!entity) {
109777
- return false;
109778
- }
109779
- entity[prop] = value;
109780
- return true;
109781
- },
109782
- deleteProperty(_target, prop) {
109783
- const entity = entities[entityName];
109784
- if (!entity) {
109785
- return false;
109786
- }
109787
- delete entity[prop];
109788
- return true;
109789
- },
109790
- has(_target, prop) {
109791
- const entity = entities[entityName];
109792
- if (!entity) {
109793
- return false;
109794
- }
109795
- return prop in entity;
109796
- },
109797
- ownKeys(_target) {
109798
- const entity = entities[entityName];
109799
- if (!entity) {
109800
- return [];
109801
- }
109802
- return Object.keys(entity);
109803
- },
109804
- getOwnPropertyDescriptor(_target, prop) {
109805
- const entity = entities[entityName];
109806
- if (!entity) {
109807
- return void 0;
109808
- }
109809
- return Object.getOwnPropertyDescriptor(entity, prop);
109810
- },
109811
- defineProperty(_target, prop, descriptor) {
109812
- const entity = entities[entityName];
109813
- if (!entity) {
109814
- return false;
109815
- }
109816
- return Object.defineProperty(entity, prop, descriptor);
109817
- },
109818
- preventExtensions(_target) {
109819
- const entity = entities[entityName];
109820
- if (!entity) {
109821
- return false;
109822
- }
109823
- Object.preventExtensions(entity);
109824
- return true;
109825
- },
109826
- isExtensible(_target) {
109827
- const entity = entities[entityName];
109828
- if (!entity) {
109829
- return false;
109830
- }
109831
- return Object.isExtensible(entity);
109832
- },
109833
- getPrototypeOf(_target) {
109834
- const entity = entities[entityName];
109835
- if (!entity) {
109836
- return null;
109837
- }
109838
- return Object.getPrototypeOf(entity);
109839
- },
109840
- setPrototypeOf(_target, proto4) {
109841
- const entity = entities[entityName];
109842
- if (!entity) {
109843
- return false;
109844
- }
109845
- Object.setPrototypeOf(entity, proto4);
109846
- return true;
109847
- }
109848
- }
109849
- );
109850
- }
109851
109733
  const existingScopeIds = /* @__PURE__ */ new Set();
109852
109734
  function internalCreateScope(getInitialEntities, options) {
109853
109735
  return createSbScope(getInitialEntities, options);
@@ -109885,25 +109767,19 @@ function createSbScope(getInitialEntities, options) {
109885
109767
  if (typeof key2 !== "string") {
109886
109768
  return void 0;
109887
109769
  }
109888
- const entity = rootStore.entityManager.getEntity(scopeId, {
109889
- value: key2,
109890
- isAnonymous: false
109891
- });
109892
- return createBindableEntityProxy(entity, getBinding(key2));
109770
+ return createBindableEntityProxy(
109771
+ () => rootStore.entityManager.getEntity(scopeId, {
109772
+ value: key2,
109773
+ isAnonymous: false
109774
+ }),
109775
+ getBinding(key2)
109776
+ );
109893
109777
  }
109894
109778
  }
109895
109779
  );
109896
- const lazyEntities = new Proxy({}, {
109897
- get(_target, key2) {
109898
- if (typeof key2 !== "string") {
109899
- return void 0;
109900
- }
109901
- return createEntityProxy$1(entities, key2);
109902
- }
109903
- });
109904
109780
  return {
109905
109781
  entities,
109906
- initialEntities: getInitialEntities({ entities: lazyEntities }),
109782
+ initialEntities: getInitialEntities({ entities }),
109907
109783
  scopeInfo: {
109908
109784
  scopeId,
109909
109785
  name,
@@ -143484,14 +143360,14 @@ function getLoaderFn(options) {
143484
143360
  if (!(loader === "all")) return [3, 3];
143485
143361
  return [4, import(
143486
143362
  /* webpackChunkName: "blueprint-icons-all-paths-loader" */
143487
- "./allPathsLoader-DtkAwWTV.js"
143363
+ "./allPathsLoader-cGVNdvFv.js"
143488
143364
  )];
143489
143365
  case 2:
143490
143366
  return [2, _b2.sent().allPathsLoader];
143491
143367
  case 3:
143492
143368
  return [4, import(
143493
143369
  /* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
143494
- "./splitPathsBySizeLoader-D9-UGIn0.js"
143370
+ "./splitPathsBySizeLoader-CixAR-eZ.js"
143495
143371
  )];
143496
143372
  case 4:
143497
143373
  return [2, _b2.sent().splitPathsBySizeLoader];
@@ -177402,31 +177278,32 @@ const propertiesDefinition = {
177402
177278
  isRunning: Prop.boolean().default(false).readAndWrite()
177403
177279
  }),
177404
177280
  functions: Section.category("Derived").children({
177405
- run: Prop.function(function(_s2) {
177281
+ run: Prop.function(async function(_s2) {
177282
+ var _a2, _b2;
177406
177283
  const api2 = this;
177284
+ api2.error = null;
177407
177285
  api2.isRunning = true;
177408
- rootStore.apis.runApi(api2.name, {
177409
- scopeId: api2.scopeId
177410
- }).then((response) => {
177411
- var _a2, _b2;
177412
- api2.isRunning = false;
177413
- api2.response = (_a2 = response == null ? void 0 : response.output) == null ? void 0 : _a2.result;
177414
- api2.error = null;
177415
- return (_b2 = api2.onSuccess) == null ? void 0 : _b2.call(api2);
177416
- }).catch((error) => {
177417
- var _a2;
177418
- api2.error = error;
177419
- api2.response = null;
177420
- api2.isRunning = false;
177421
- return (_a2 = api2.onError) == null ? void 0 : _a2.call(api2);
177422
- });
177286
+ const result = await rootStore.apis.runApi(api2.name, api2.scopeId).catch(
177287
+ (err) => ({
177288
+ error: err,
177289
+ data: null
177290
+ })
177291
+ );
177292
+ api2.isRunning = false;
177293
+ if (!result.error) {
177294
+ api2.response = result.data;
177295
+ await ((_a2 = api2.onSuccess) == null ? void 0 : _a2.call(api2));
177296
+ return api2.response;
177297
+ } else {
177298
+ api2.error = result.error;
177299
+ await ((_b2 = api2.onError) == null ? void 0 : _b2.call(api2));
177300
+ return null;
177301
+ }
177423
177302
  }),
177424
- cancel: Prop.function(function(_s2) {
177303
+ cancel: Prop.function(async function(_s2) {
177425
177304
  const api2 = this;
177426
177305
  api2.isRunning = false;
177427
- rootStore.apis.cancelApi(api2.name, {
177428
- scopeId: api2.scopeId
177429
- });
177306
+ await rootStore.apis.cancelApi(api2.name, api2.scopeId);
177430
177307
  })
177431
177308
  })
177432
177309
  };
@@ -178410,9 +178287,8 @@ const EmbedWrapper = (props) => {
178410
178287
  if (!api2 || api2.type !== "SbApi") {
178411
178288
  throw new Error(`API ${apiName} not found`);
178412
178289
  }
178413
- const flow3 = SbEventFlow.start().runApis([api2]);
178414
178290
  runEventHandlers({
178415
- flow: flow3,
178291
+ flow: SbEventFlow.runApis([api2]),
178416
178292
  name: getName(apiName),
178417
178293
  scopeId,
178418
178294
  additionalContext: {
@@ -191616,4 +191492,4 @@ export {
191616
191492
  SbProvider as y,
191617
191493
  SbEventFlow as z
191618
191494
  };
191619
- //# sourceMappingURL=index-CF-A-L3f.js.map
191495
+ //# sourceMappingURL=index-BSZAGX_L.js.map