@superblocksteam/library 2.0.40-next.0 → 2.0.40-next.10

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.
@@ -143,7 +143,7 @@ var DeployedParentBridge = class {
143
143
  socketError(_message) {}
144
144
  aiGenerate(_prompt) {}
145
145
  addComponentToAiContext(_sourceId) {}
146
- toggleComponentInAiContext(_sourceId, _instanceId) {}
146
+ toggleComponentInAiContext(_sourceId, _instanceId, _label) {}
147
147
  setAiContextMode(_mode) {}
148
148
  sendRuntimeError(_data) {}
149
149
  sendClearRuntimeError(_id) {}
@@ -379,7 +379,7 @@ var SuperblocksEditorBridge = class SuperblocksEditorBridge {
379
379
  }
380
380
  });
381
381
  }
382
- toggleComponentInAiContext(sourceId, instanceId) {
382
+ toggleComponentInAiContext(sourceId, instanceId, label) {
383
383
  const editStore = getEditStore();
384
384
  if (editStore?.ai.isAlternateSourceIdTarget(sourceId, instanceId)) {
385
385
  editStore.ai.toggleTargetedInstance(instanceId);
@@ -389,7 +389,8 @@ var SuperblocksEditorBridge = class SuperblocksEditorBridge {
389
389
  type: "ai-updates",
390
390
  payload: {
391
391
  type: "toggle-component-in-context",
392
- component: sourceId
392
+ component: sourceId,
393
+ label
393
394
  }
394
395
  });
395
396
  }
@@ -992,7 +993,7 @@ var registry_default = EventRegistry;
992
993
 
993
994
  //#endregion
994
995
  //#region src/lib/triggers/run-event-handlers.ts
995
- const getRootStore = () => import("./root-store-C8Wjgal-.js").then((module) => module.default);
996
+ const getRootStore = () => import("./root-store-BiFc0PAV.js").then((module) => module.default);
996
997
  const runEventHandlers = async ({ flow, name, scopeId, additionalContext }) => {
997
998
  const context$1 = {
998
999
  scopeId,
@@ -3624,8 +3625,8 @@ var ApiManager = class {
3624
3625
  loadApiManifest({ apis = {}, apiDependencies = [] }) {
3625
3626
  this.setAllApis(apis);
3626
3627
  apiDependencies.forEach((dep) => {
3627
- this.setApiDepCandidates(dep.apiName, dep.params);
3628
- this.setApiReferences(dep.apiName, dep.dependencies);
3628
+ this.setApiDepCandidates(dep.scopeId, dep.apiName, dep.params);
3629
+ this.setApiReferences(dep.scopeId, dep.apiName, dep.dependencies);
3629
3630
  });
3630
3631
  const apisToSet = Object.values(apis).map(({ api, scopeId }) => ({
3631
3632
  ...api,
@@ -3652,12 +3653,14 @@ var ApiManager = class {
3652
3653
  setApisLoaded() {
3653
3654
  this.rootStore.setApisLoaded();
3654
3655
  }
3655
- setApiDepCandidates(apiName, deps) {
3656
- this.apiNameToDepCandidates[apiName] = deps;
3656
+ setApiDepCandidates(scopeId, apiName, deps) {
3657
+ if (!this.apiNameToDepCandidates[scopeId]) this.apiNameToDepCandidates[scopeId] = {};
3658
+ this.apiNameToDepCandidates[scopeId][apiName] = deps;
3657
3659
  if (!this.rootStore.isApisLoaded) this.rootStore.setApisLoaded();
3658
3660
  }
3659
- setApiReferences(apiName, deps) {
3660
- this.apiNameToApiReferences[apiName] = deps;
3661
+ setApiReferences(scopeId, apiName, deps) {
3662
+ if (!this.apiNameToApiReferences[scopeId]) this.apiNameToApiReferences[scopeId] = {};
3663
+ this.apiNameToApiReferences[scopeId][apiName] = deps;
3661
3664
  }
3662
3665
  updateApi(api, scopeId) {
3663
3666
  if (!this.apisByName[scopeId]) this.apisByName[scopeId] = {};
@@ -3736,7 +3739,7 @@ var ApiManager = class {
3736
3739
  error: "No application ID was found"
3737
3740
  };
3738
3741
  }
3739
- const inputs = getApiDeps(this.rootStore.entityManager, scopeId, this.apiNameToDepCandidates[apiName] ?? []);
3742
+ const inputs = getApiDeps(this.rootStore.entityManager, scopeId, this.apiNameToDepCandidates[scopeId]?.[apiName] ?? []);
3740
3743
  if (!this.agentUrls.length) {
3741
3744
  editorBridge.setApiResponse(apiName, {
3742
3745
  status: "STATUS_COMPLETED",
@@ -4553,4 +4556,4 @@ var root_store_default = new RootStore();
4553
4556
 
4554
4557
  //#endregion
4555
4558
  export { CLASS_NAMES, DEFAULT_ANONYMOUS_SOURCE_ID, DevTools, EventFlow, GLOBAL_SCOPE_ID, LazyFunction, NavigationEvent, Prop, PropsPanelCategory, RecordProp, Section, VALIDATORS, addNewPromise, colors, createInternalPropsList, createManagedPropsList, createPropertiesPanelDefinition, editorBridge, generateId, getEditStore, getName, iframeMessageHandler, isEditMode, isEmbeddedBySuperblocksFirstParty, isLocalLink, isName, isNameEqual, navigation, rejectById, resolveById, root_store_default, run_event_handlers_default, sendNotification, startEditorSync, system_error_default };
4556
- //# sourceMappingURL=root-store-D7IuNpKE.js.map
4559
+ //# sourceMappingURL=root-store-9yoF7VAG.js.map