@morscherlab/mint-sdk 1.5.0-beta.8 → 1.5.0-beta.9

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.
@@ -786,6 +786,12 @@ function usePluginWorkspace(options) {
786
786
  });
787
787
  const topBarSlotNames = computed(() => getPluginWorkspaceTopBarSlotNames(slots));
788
788
  const sidebarSlotNames = computed(() => getPluginWorkspaceSidebarSlotNames(slots));
789
+ const internalCollapsed = ref(false);
790
+ const sidebarCollapsed = computed(() => props.sidebarCollapsed ?? internalCollapsed.value);
791
+ function handleSidebarCollapsedUpdate(value) {
792
+ internalCollapsed.value = value;
793
+ emit("update:sidebarCollapsed", value);
794
+ }
789
795
  const hasSidebarSurface = computed(() => hasPluginWorkspaceSidebarSurface({
790
796
  sidebar: sidebarSpec.value,
791
797
  hasSidebarSlot: Boolean(slots.sidebar),
@@ -805,7 +811,7 @@ function usePluginWorkspace(options) {
805
811
  const sidebar = sidebarSpec.value === false ? {} : sidebarSpec.value;
806
812
  return {
807
813
  sidebarPosition: sidebar.position ?? "left",
808
- sidebarWidth: sidebar.width,
814
+ sidebarWidth: sidebarCollapsed.value ? sidebar.collapsedWidth ?? "3rem" : sidebar.width,
809
815
  floating: props.spec?.floating ?? true,
810
816
  responsiveSidebar: sidebar.responsive ?? true,
811
817
  sidebarToggleLabel: sidebar.toggleLabel ?? "Open workspace sidebar",
@@ -833,7 +839,7 @@ function usePluginWorkspace(options) {
833
839
  },
834
840
  activeView: navigationState.resolvedActiveView.value,
835
841
  values: controlsState.internalControlValues,
836
- collapsed: props.sidebarCollapsed,
842
+ collapsed: sidebarCollapsed.value,
837
843
  formLoading: props.formLoading ?? false,
838
844
  formDisabled: props.formDisabled ?? false,
839
845
  formReadonly: props.formReadonly ?? false,
@@ -843,7 +849,8 @@ function usePluginWorkspace(options) {
843
849
  controls,
844
850
  hasSidebarSurface,
845
851
  handleControlValuesUpdate: controlsState.handleControlValuesUpdate,
846
- handlePillSelect: navigationState.handlePillSelect
852
+ handlePillSelect: navigationState.handlePillSelect,
853
+ handleSidebarCollapsedUpdate
847
854
  };
848
855
  }
849
856
  //#endregion
@@ -2932,7 +2939,7 @@ var AppTopBar_default = /* @__PURE__ */ defineComponent({
2932
2939
  overflowActions.value.find((action) => action.id === item.id)?.onSelect();
2933
2940
  }
2934
2941
  const drawer = inject(APP_LAYOUT_SIDEBAR_KEY, null);
2935
- const SettingsModal = defineAsyncComponent(() => import("./SettingsModal-DPNblTe9.js").then((n) => n.n));
2942
+ const SettingsModal = defineAsyncComponent(() => import("./SettingsModal-DwfrD1ER.js").then((n) => n.n));
2936
2943
  const ExperimentPopover = defineAsyncComponent(() => import("./ExperimentPopover-DYy_s0kI.js").then((n) => n.n));
2937
2944
  const ExperimentSelectorModal = defineAsyncComponent(() => import("./ExperimentSelectorModal-Bfh5bdkv.js").then((n) => n.n));
2938
2945
  const emit = __emit;
@@ -4797,4 +4804,4 @@ var AppSidebar_default = /* @__PURE__ */ defineComponent({
4797
4804
  //#endregion
4798
4805
  export { controlValuesToComponentBindings as A, warnDeprecatedOnce as C, getControlDefaults as D, defineControls as E, controlsToSettingsSchema as F, getDefaultControlView as I, CollapsibleCard_default as L, controlValuesToComponentProps as M, controlsTo as N, useControlSchema as O, controlsToFormSchema as P, ThemeToggle_default as R, AppLayout_default as S, defineControlComponentBindings as T, provideOnboarding as _, pickExistingRecordKeys as a, normalizeItemInput as b, valuesEqual as c, useForm as d, AppTopBar_default as f, defineOnboarding as g, ONBOARDING_KEY as h, formSchemaFieldNames as i, controlValuesToComponentBindingsById as j, controlBindings as k, useFormBuilder as l, ANCHOR_WAIT_MS as m, FormSchemaInternal_default as n, pickRecordKeys as o, providePluginIdentity as p, FormFieldRendererInternal_default as r, recordValuesEqualForKeys as s, AppSidebar_default as t, evaluateCondition as u, useOnboarding as v, usePluginWorkspace as w, normalizeLabelItemInput as x, PluginIcon_default as y, useTheme as z };
4799
4806
 
4800
- //# sourceMappingURL=AppSidebar-C1DT4nsZ.js.map
4807
+ //# sourceMappingURL=AppSidebar-C-Vq5x4I.js.map