@morscherlab/mint-sdk 1.4.12 → 1.4.13

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.
@@ -787,6 +787,12 @@ function usePluginWorkspace(options) {
787
787
  });
788
788
  const topBarSlotNames = computed(() => getPluginWorkspaceTopBarSlotNames(slots));
789
789
  const sidebarSlotNames = computed(() => getPluginWorkspaceSidebarSlotNames(slots));
790
+ const internalCollapsed = ref(false);
791
+ const sidebarCollapsed = computed(() => props.sidebarCollapsed ?? internalCollapsed.value);
792
+ function handleSidebarCollapsedUpdate(value) {
793
+ internalCollapsed.value = value;
794
+ emit("update:sidebarCollapsed", value);
795
+ }
790
796
  const hasSidebarSurface = computed(() => hasPluginWorkspaceSidebarSurface({
791
797
  sidebar: sidebarSpec.value,
792
798
  hasSidebarSlot: Boolean(slots.sidebar),
@@ -806,7 +812,7 @@ function usePluginWorkspace(options) {
806
812
  const sidebar = sidebarSpec.value === false ? {} : sidebarSpec.value;
807
813
  return {
808
814
  sidebarPosition: sidebar.position ?? "left",
809
- sidebarWidth: sidebar.width,
815
+ sidebarWidth: sidebarCollapsed.value ? sidebar.collapsedWidth ?? "3rem" : sidebar.width,
810
816
  floating: props.spec?.floating ?? true,
811
817
  responsiveSidebar: sidebar.responsive ?? true,
812
818
  sidebarToggleLabel: sidebar.toggleLabel ?? "Open workspace sidebar",
@@ -834,7 +840,7 @@ function usePluginWorkspace(options) {
834
840
  },
835
841
  activeView: navigationState.resolvedActiveView.value,
836
842
  values: controlsState.internalControlValues,
837
- collapsed: props.sidebarCollapsed,
843
+ collapsed: sidebarCollapsed.value,
838
844
  formLoading: props.formLoading ?? false,
839
845
  formDisabled: props.formDisabled ?? false,
840
846
  formReadonly: props.formReadonly ?? false,
@@ -844,7 +850,8 @@ function usePluginWorkspace(options) {
844
850
  controls,
845
851
  hasSidebarSurface,
846
852
  handleControlValuesUpdate: controlsState.handleControlValuesUpdate,
847
- handlePillSelect: navigationState.handlePillSelect
853
+ handlePillSelect: navigationState.handlePillSelect,
854
+ handleSidebarCollapsedUpdate
848
855
  };
849
856
  }
850
857
  //#endregion
@@ -2774,7 +2781,7 @@ var AppTopBar_default = /* @__PURE__ */ defineComponent({
2774
2781
  }, props.spec));
2775
2782
  const settingsConfig = computed(() => toValue(config.value.settings) || void 0);
2776
2783
  const showSettings = computed(() => settingsConfig.value !== void 0);
2777
- const SettingsModal = defineAsyncComponent(() => import("./SettingsModal-BCuw7uli.js").then((n) => n.n));
2784
+ const SettingsModal = defineAsyncComponent(() => import("./SettingsModal-jW7Z4i_1.js").then((n) => n.n));
2778
2785
  const ExperimentPopover = defineAsyncComponent(() => import("./ExperimentPopover-CzV1--OY.js").then((n) => n.n));
2779
2786
  const ExperimentSelectorModal = defineAsyncComponent(() => import("./ExperimentSelectorModal-CUkKmgfr.js").then((n) => n.n));
2780
2787
  const emit = __emit;
@@ -4536,4 +4543,4 @@ var AppSidebar_default = /* @__PURE__ */ defineComponent({
4536
4543
  //#endregion
4537
4544
  export { controlValuesToComponentBindingsById as A, usePluginWorkspace as C, useControlSchema as D, getControlDefaults as E, getDefaultControlView as F, CollapsibleCard_default as I, ThemeToggle_default as L, controlsTo as M, controlsToFormSchema as N, controlBindings as O, controlsToSettingsSchema as P, useTheme as R, AppLayout_default as S, defineControls 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, controlValuesToComponentProps as j, controlValuesToComponentBindings 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, defineControlComponentBindings as w, normalizeLabelItemInput as x, PluginIcon_default as y };
4538
4545
 
4539
- //# sourceMappingURL=AppSidebar-C5zxZifu.js.map
4546
+ //# sourceMappingURL=AppSidebar-CIBehlYL.js.map