@superblocksteam/library 2.0.40-next.14 → 2.0.40-next.3

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.
@@ -0,0 +1,4 @@
1
+ import { root_store_default } from "./root-store-D7IuNpKE.js";
2
+ import "./utils-CCBWAYIM.js";
3
+
4
+ export { root_store_default as default };
@@ -143,7 +143,7 @@ var DeployedParentBridge = class {
143
143
  socketError(_message) {}
144
144
  aiGenerate(_prompt) {}
145
145
  addComponentToAiContext(_sourceId) {}
146
- toggleComponentInAiContext(_sourceId, _instanceId, _label) {}
146
+ toggleComponentInAiContext(_sourceId, _instanceId) {}
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, label) {
382
+ toggleComponentInAiContext(sourceId, instanceId) {
383
383
  const editStore = getEditStore();
384
384
  if (editStore?.ai.isAlternateSourceIdTarget(sourceId, instanceId)) {
385
385
  editStore.ai.toggleTargetedInstance(instanceId);
@@ -389,8 +389,7 @@ var SuperblocksEditorBridge = class SuperblocksEditorBridge {
389
389
  type: "ai-updates",
390
390
  payload: {
391
391
  type: "toggle-component-in-context",
392
- component: sourceId,
393
- label
392
+ component: sourceId
394
393
  }
395
394
  });
396
395
  }
@@ -993,7 +992,7 @@ var registry_default = EventRegistry;
993
992
 
994
993
  //#endregion
995
994
  //#region src/lib/triggers/run-event-handlers.ts
996
- const getRootStore = () => import("./root-store-Q_vdc108.js").then((module) => module.default);
995
+ const getRootStore = () => import("./root-store-C8Wjgal-.js").then((module) => module.default);
997
996
  const runEventHandlers = async ({ flow, name, scopeId, additionalContext }) => {
998
997
  const context$1 = {
999
998
  scopeId,
@@ -3625,8 +3624,8 @@ var ApiManager = class {
3625
3624
  loadApiManifest({ apis = {}, apiDependencies = [] }) {
3626
3625
  this.setAllApis(apis);
3627
3626
  apiDependencies.forEach((dep) => {
3628
- this.setApiDepCandidates(dep.scopeId, dep.apiName, dep.params);
3629
- this.setApiReferences(dep.scopeId, dep.apiName, dep.dependencies);
3627
+ this.setApiDepCandidates(dep.apiName, dep.params);
3628
+ this.setApiReferences(dep.apiName, dep.dependencies);
3630
3629
  });
3631
3630
  const apisToSet = Object.values(apis).map(({ api, scopeId }) => ({
3632
3631
  ...api,
@@ -3653,14 +3652,12 @@ var ApiManager = class {
3653
3652
  setApisLoaded() {
3654
3653
  this.rootStore.setApisLoaded();
3655
3654
  }
3656
- setApiDepCandidates(scopeId, apiName, deps) {
3657
- if (!this.apiNameToDepCandidates[scopeId]) this.apiNameToDepCandidates[scopeId] = {};
3658
- this.apiNameToDepCandidates[scopeId][apiName] = deps;
3655
+ setApiDepCandidates(apiName, deps) {
3656
+ this.apiNameToDepCandidates[apiName] = deps;
3659
3657
  if (!this.rootStore.isApisLoaded) this.rootStore.setApisLoaded();
3660
3658
  }
3661
- setApiReferences(scopeId, apiName, deps) {
3662
- if (!this.apiNameToApiReferences[scopeId]) this.apiNameToApiReferences[scopeId] = {};
3663
- this.apiNameToApiReferences[scopeId][apiName] = deps;
3659
+ setApiReferences(apiName, deps) {
3660
+ this.apiNameToApiReferences[apiName] = deps;
3664
3661
  }
3665
3662
  updateApi(api, scopeId) {
3666
3663
  if (!this.apisByName[scopeId]) this.apisByName[scopeId] = {};
@@ -3739,7 +3736,7 @@ var ApiManager = class {
3739
3736
  error: "No application ID was found"
3740
3737
  };
3741
3738
  }
3742
- const inputs = getApiDeps(this.rootStore.entityManager, scopeId, this.apiNameToDepCandidates[scopeId]?.[apiName] ?? []);
3739
+ const inputs = getApiDeps(this.rootStore.entityManager, scopeId, this.apiNameToDepCandidates[apiName] ?? []);
3743
3740
  if (!this.agentUrls.length) {
3744
3741
  editorBridge.setApiResponse(apiName, {
3745
3742
  status: "STATUS_COMPLETED",
@@ -4413,7 +4410,7 @@ var NameManager = class {
4413
4410
  this.untrackIdentifier(instanceId);
4414
4411
  }
4415
4412
  getExistingIdentifier(instanceId) {
4416
- const identifier = this._allPossibleIdentifiers[instanceId];
4413
+ const identifier = this._mountedIdentifiers[instanceId] ?? this._allPossibleIdentifiers[instanceId];
4417
4414
  if (!identifier) {
4418
4415
  console.log(`No identifier found for instanceId ${instanceId}`);
4419
4416
  return;
@@ -4556,4 +4553,4 @@ var root_store_default = new RootStore();
4556
4553
 
4557
4554
  //#endregion
4558
4555
  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 };
4559
- //# sourceMappingURL=root-store-D4uiJaOf.js.map
4556
+ //# sourceMappingURL=root-store-D7IuNpKE.js.map