@morscherlab/mint-sdk 1.2.0-beta.4 → 1.2.0-beta.5

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 (136) hide show
  1. package/dist/{EmptyState-p90quq8Z.js → EmptyState-NBqf2_8z.js} +2 -2
  2. package/dist/{EmptyState-p90quq8Z.js.map → EmptyState-NBqf2_8z.js.map} +1 -1
  3. package/dist/{ExperimentPopover-tLwJ7XF4.js → ExperimentPopover-CfOdh5Rm.js} +3 -3
  4. package/dist/{ExperimentPopover-tLwJ7XF4.js.map → ExperimentPopover-CfOdh5Rm.js.map} +1 -1
  5. package/dist/{ExperimentSelectorModal-B6P2msT4.js → ExperimentSelectorModal-DvIagrxY.js} +4 -4
  6. package/dist/{ExperimentSelectorModal-B6P2msT4.js.map → ExperimentSelectorModal-DvIagrxY.js.map} +1 -1
  7. package/dist/{SettingsModal-CkNM8qAI.js → SettingsModal-W3TYfnP9.js} +4 -7
  8. package/dist/SettingsModal-W3TYfnP9.js.map +1 -0
  9. package/dist/__tests__/components/PluginWorkspaceView.internal.test.d.ts +1 -0
  10. package/dist/__tests__/components/SecretInput.test.d.ts +1 -0
  11. package/dist/__tests__/components/WellEditPopupInternal.test.d.ts +1 -0
  12. package/dist/components/AppAvatarMenu.vue.d.ts +4 -0
  13. package/dist/components/AppSidebar.vue.d.ts +1 -1
  14. package/dist/components/BioTemplateExperimentWorkspaceView.vue.d.ts +1 -1
  15. package/dist/components/DropdownButton.vue.d.ts +2 -0
  16. package/dist/components/FitPanel.vue.d.ts +1 -1
  17. package/dist/components/PluginWorkspaceView.props.d.ts +29 -1
  18. package/dist/components/PluginWorkspaceView.vue.d.ts +5 -5
  19. package/dist/components/SecretInput.vue.d.ts +28 -0
  20. package/dist/components/SmartGroupFieldRecipe.vue.d.ts +1 -1
  21. package/dist/components/index.d.ts +9 -0
  22. package/dist/components/index.js +8 -8
  23. package/dist/components/internal/WellEditPopupInternal.vue.d.ts +3 -1
  24. package/dist/components/internal/WorkspaceControlsInternal.vue.d.ts +23 -0
  25. package/dist/components/internal/WorkspaceShellInternal.vue.d.ts +70 -0
  26. package/dist/components/internal/WorkspaceSidebarInternal.vue.d.ts +43 -0
  27. package/dist/{components-MGNL6tRn.js → components-B80gV0P6.js} +575 -561
  28. package/dist/components-B80gV0P6.js.map +1 -0
  29. package/dist/composables/flattenWorkspaceBindings.d.ts +61 -0
  30. package/dist/composables/index.d.ts +5 -0
  31. package/dist/composables/index.js +9 -9
  32. package/dist/composables/pluginWorkspaceModel.d.ts +164 -0
  33. package/dist/composables/useAsync.d.ts +5 -1
  34. package/dist/composables/useBioTemplateWorkspace.d.ts +4 -20
  35. package/dist/composables/useCommandHistory.d.ts +5 -1
  36. package/dist/composables/useFocusTrap.d.ts +21 -0
  37. package/dist/composables/useMenuKeyboard.d.ts +29 -0
  38. package/dist/composables/useOptimisticMutation.d.ts +5 -1
  39. package/dist/composables/usePluginWorkspace.d.ts +51 -0
  40. package/dist/composables/useResourceCrud.d.ts +5 -1
  41. package/dist/composables/useRovingFocus.d.ts +24 -0
  42. package/dist/composables/useWellPainting.d.ts +5 -1
  43. package/dist/composables/useWellPlateAdapter.d.ts +5 -1
  44. package/dist/composables/useWellPlateValidation.d.ts +5 -1
  45. package/dist/composables/workspaceRecipes.d.ts +188 -0
  46. package/dist/{composables-CKxOcvgh.js → composables-C8mmD5ta.js} +65 -17
  47. package/dist/composables-C8mmD5ta.js.map +1 -0
  48. package/dist/{experiment-utils-CLnzPPq5.js → experiment-utils-DV3DrvE_.js} +70 -51
  49. package/dist/experiment-utils-DV3DrvE_.js.map +1 -0
  50. package/dist/index.d.ts +1 -0
  51. package/dist/index.js +13 -13
  52. package/dist/install.js +7 -7
  53. package/dist/styles.css +100 -49
  54. package/dist/templates/builderReadUtils.d.ts +1 -1
  55. package/dist/templates/index.js +4 -4
  56. package/dist/{templates-BTJ9C9Kb.js → templates-CK72aKO1.js} +14 -23
  57. package/dist/templates-CK72aKO1.js.map +1 -0
  58. package/dist/types/form-builder.d.ts +1 -1
  59. package/dist/{useControlSchema-CXhxTul7.js → useControlSchema-_OVhavKq.js} +280 -63
  60. package/dist/useControlSchema-_OVhavKq.js.map +1 -0
  61. package/dist/{useDropdownState-DSb3BC3N.js → useDropdownState-D5G4UvWd.js} +2 -2
  62. package/dist/{useDropdownState-DSb3BC3N.js.map → useDropdownState-D5G4UvWd.js.map} +1 -1
  63. package/dist/{useExperimentSelector-D0pjj9WH.js → useExperimentSelector-DSEckf_g.js} +3 -3
  64. package/dist/{useExperimentSelector-D0pjj9WH.js.map → useExperimentSelector-DSEckf_g.js.map} +1 -1
  65. package/dist/{useFormBuilder-CuOFB3aP.js → useFormBuilder-Bd714C7y.js} +2 -2
  66. package/dist/{useFormBuilder-CuOFB3aP.js.map → useFormBuilder-Bd714C7y.js.map} +1 -1
  67. package/dist/{useProtocolTemplates-BWhQIWV5.js → useProtocolTemplates-Dq5Pzwyd.js} +481 -46
  68. package/dist/useProtocolTemplates-Dq5Pzwyd.js.map +1 -0
  69. package/dist/utils/pluginSecrets.d.ts +53 -0
  70. package/dist/utils/records.d.ts +4 -0
  71. package/package.json +1 -1
  72. package/src/__tests__/components/AppAvatarMenu.test.ts +123 -0
  73. package/src/__tests__/components/BaseTabs.test.ts +67 -0
  74. package/src/__tests__/components/DropdownButton.test.ts +134 -0
  75. package/src/__tests__/components/PluginWorkspaceView.internal.test.ts +230 -0
  76. package/src/__tests__/components/SecretInput.test.ts +87 -0
  77. package/src/__tests__/components/WellEditPopupInternal.test.ts +108 -0
  78. package/src/__tests__/composables/usePluginClient.test.ts +140 -0
  79. package/src/components/AppAvatarMenu.vue +34 -3
  80. package/src/components/BaseModal.vue +8 -56
  81. package/src/components/BaseTabs.vue +26 -1
  82. package/src/components/BioTemplateExperimentWorkspaceView.vue +10 -21
  83. package/src/components/BioTemplatePackWorkspaceView.vue +11 -15
  84. package/src/components/BioTemplatePresetWorkspaceView.vue +8 -13
  85. package/src/components/ComponentBindingRenderer.vue +1 -3
  86. package/src/components/ControlWorkspaceView.vue +11 -22
  87. package/src/components/DoseDesignWorkspaceView.vue +6 -25
  88. package/src/components/DropdownButton.vue +32 -2
  89. package/src/components/PluginWorkspaceView.props.ts +38 -0
  90. package/src/components/PluginWorkspaceView.vue +53 -224
  91. package/src/components/SecretInput.story.vue +79 -0
  92. package/src/components/SecretInput.vue +150 -0
  93. package/src/components/index.ts +9 -0
  94. package/src/components/internal/WellEditPopupInternal.vue +20 -1
  95. package/src/components/internal/WorkspaceControlsInternal.vue +20 -0
  96. package/src/components/internal/WorkspaceShellInternal.vue +125 -0
  97. package/src/components/internal/WorkspaceSidebarInternal.vue +82 -0
  98. package/src/composables/experimentDesignData.ts +1 -3
  99. package/src/composables/flattenWorkspaceBindings.ts +104 -0
  100. package/src/composables/formBuilderRegistry.ts +5 -0
  101. package/src/composables/index.ts +26 -0
  102. package/src/composables/pluginWorkspaceModel.ts +182 -0
  103. package/src/composables/useAsync.ts +5 -1
  104. package/src/composables/useBioTemplatePackWorkspace.ts +15 -9
  105. package/src/composables/useBioTemplatePresetWorkspace.ts +14 -15
  106. package/src/composables/useBioTemplateWorkspace.ts +18 -43
  107. package/src/composables/useCommandHistory.ts +5 -1
  108. package/src/composables/useFocusTrap.ts +91 -0
  109. package/src/composables/useMenuKeyboard.ts +90 -0
  110. package/src/composables/useOptimisticMutation.ts +5 -1
  111. package/src/composables/usePluginClient.ts +42 -4
  112. package/src/composables/usePluginWorkspace.ts +208 -0
  113. package/src/composables/useResourceCrud.ts +5 -1
  114. package/src/composables/useRovingFocus.ts +66 -0
  115. package/src/composables/useWellPainting.ts +5 -1
  116. package/src/composables/useWellPlateAdapter.ts +5 -1
  117. package/src/composables/useWellPlateValidation.ts +5 -1
  118. package/src/composables/workspaceRecipes.ts +267 -0
  119. package/src/index.ts +16 -0
  120. package/src/styles/components/secret-input.css +60 -0
  121. package/src/styles/index.css +1 -0
  122. package/src/templates/builderReadUtils.ts +1 -3
  123. package/src/templates/componentTargetResolvers.ts +1 -3
  124. package/src/templates/controlSchemaTargets.ts +1 -3
  125. package/src/types/form-builder.ts +1 -0
  126. package/src/utils/formModelSync.ts +1 -3
  127. package/src/utils/pluginIcon.ts +1 -3
  128. package/src/utils/pluginSecrets.ts +102 -0
  129. package/src/utils/records.ts +9 -0
  130. package/dist/SettingsModal-CkNM8qAI.js.map +0 -1
  131. package/dist/components-MGNL6tRn.js.map +0 -1
  132. package/dist/composables-CKxOcvgh.js.map +0 -1
  133. package/dist/experiment-utils-CLnzPPq5.js.map +0 -1
  134. package/dist/templates-BTJ9C9Kb.js.map +0 -1
  135. package/dist/useControlSchema-CXhxTul7.js.map +0 -1
  136. package/dist/useProtocolTemplates-BWhQIWV5.js.map +0 -1
@@ -0,0 +1,188 @@
1
+ import { TopBarVariant } from '../types';
2
+ import { FormEnhancements } from '../types/form-builder';
3
+ import { ControlModel, ControlModelBinding, ControlSchema, ControlWorkspaceOptions, UseControlWorkspaceReturn } from './useControlSchema';
4
+ /**
5
+ * Merges `initialValues`/external `modelValue`/`values` on top of a base
6
+ * `ControlWorkspaceOptions.initialValues`, matching the layering FormBuilder expects: base
7
+ * defaults, then caller-supplied initial values, then live external values win last. Shared by
8
+ * {@link controlWorkspaceProps} and {@link bioTemplatePresetWorkspaceProps} so both "generate a
9
+ * workspace from options, initialValues, and v-model" views merge options identically.
10
+ */
11
+ export declare function resolveControlOptionsWithExternalValues<TOptions extends ControlWorkspaceOptions>(base: TOptions, initialValues: Record<string, unknown> | undefined, externalValues: Record<string, unknown> | undefined): TOptions;
12
+ export interface ControlWorkspaceModelProps {
13
+ model?: ControlModel | ControlModelBinding;
14
+ controls?: ControlSchema;
15
+ controlOptions?: ControlWorkspaceOptions;
16
+ initialValues?: Record<string, unknown>;
17
+ modelValue?: Record<string, unknown>;
18
+ values?: Record<string, unknown>;
19
+ }
20
+ export interface ResolvedControlWorkspaceModel {
21
+ /** `modelValue` if provided, else `values` — the single external v-model source of truth. */
22
+ externalValues: Record<string, unknown> | undefined;
23
+ /** `model` resolved through `resolveControlModel()`, or undefined for a raw `controls` schema. */
24
+ resolvedModel: ControlModelBinding | undefined;
25
+ /** `controls` if provided, else the resolved model's controls, else `{}`. */
26
+ resolvedControls: ControlSchema;
27
+ /** `controlOptions` merged over the resolved model's own options, with initialValues/external values layered on top. */
28
+ resolvedControlOptions: ControlWorkspaceOptions;
29
+ }
30
+ /**
31
+ * Resolves ControlWorkspaceView's `model`/`controls`/`controlOptions`/`initialValues`/
32
+ * `modelValue`/`values` props into the schema + options pair `useControlWorkspace()` needs.
33
+ * Pure and framework-free so callers wrap each field in their own `computed()`.
34
+ *
35
+ * @example Recommended
36
+ * ```ts
37
+ * const resolved = computed(() => controlWorkspaceProps(props))
38
+ * const resolvedControls = computed(() => resolved.value.resolvedControls)
39
+ * ```
40
+ */
41
+ export declare function controlWorkspaceProps(props: ControlWorkspaceModelProps): ResolvedControlWorkspaceModel;
42
+ export interface DoseDesignWorkspacePassthroughProps {
43
+ workspace?: UseControlWorkspaceReturn<ControlSchema>;
44
+ controlOptions?: ControlWorkspaceOptions;
45
+ initialValues?: Record<string, unknown>;
46
+ modelValue?: Record<string, unknown>;
47
+ values?: Record<string, unknown>;
48
+ title?: string;
49
+ subtitle?: string;
50
+ topBarVariant?: TopBarVariant;
51
+ sidebarWidth?: string;
52
+ sidebarVariant?: 'default' | 'analysis';
53
+ responsiveSidebar?: boolean;
54
+ sidebarPosition?: 'left' | 'right';
55
+ sidebarTitle?: string;
56
+ sidebarSubtitle?: string;
57
+ sidebarBadge?: string | number;
58
+ floating?: boolean;
59
+ dense?: boolean;
60
+ showSettings?: boolean;
61
+ showFormActions?: boolean;
62
+ formEnhancements?: FormEnhancements<Record<string, unknown>>;
63
+ formLoading?: boolean;
64
+ formDisabled?: boolean;
65
+ formReadonly?: boolean;
66
+ formSize?: 'sm' | 'md' | 'lg';
67
+ }
68
+ /**
69
+ * Maps DoseDesignWorkspaceView's props straight through to the identically-named
70
+ * ControlWorkspaceView props it wraps — the ~25-key pass-through list that used to be spelled
71
+ * out attribute-by-attribute in the template. `model` is the caller's already-resolved dose
72
+ * design model, not the raw (possibly absent) `props.model`.
73
+ *
74
+ * @example Recommended
75
+ * ```vue
76
+ * <ControlWorkspaceView v-bind="doseDesignWorkspaceProps(props, resolvedModel)" />
77
+ * ```
78
+ */
79
+ export declare function doseDesignWorkspaceProps(props: DoseDesignWorkspacePassthroughProps, model: ControlModel | ControlModelBinding): {
80
+ model: ControlModel | ControlModelBinding;
81
+ workspace: UseControlWorkspaceReturn<ControlSchema> | undefined;
82
+ controlOptions: ControlWorkspaceOptions | undefined;
83
+ initialValues: Record<string, unknown> | undefined;
84
+ modelValue: Record<string, unknown> | undefined;
85
+ values: Record<string, unknown> | undefined;
86
+ title: string | undefined;
87
+ subtitle: string | undefined;
88
+ topBarVariant: TopBarVariant | undefined;
89
+ sidebarWidth: string | undefined;
90
+ sidebarVariant: "default" | "analysis" | undefined;
91
+ responsiveSidebar: boolean | undefined;
92
+ sidebarPosition: "left" | "right" | undefined;
93
+ sidebarTitle: string | undefined;
94
+ sidebarSubtitle: string | undefined;
95
+ sidebarBadge: string | number | undefined;
96
+ floating: boolean | undefined;
97
+ dense: boolean | undefined;
98
+ showSettings: boolean | undefined;
99
+ showFormActions: boolean | undefined;
100
+ formEnhancements: FormEnhancements<Record<string, unknown>> | undefined;
101
+ formLoading: boolean | undefined;
102
+ formDisabled: boolean | undefined;
103
+ formReadonly: boolean | undefined;
104
+ formSize: "sm" | "md" | "lg" | undefined;
105
+ };
106
+ export interface BioTemplateExperimentWorkspaceStatusProps {
107
+ status?: {
108
+ loading?: boolean;
109
+ saving?: boolean;
110
+ error?: string | null;
111
+ hasExperiment?: boolean;
112
+ currentExperimentId?: number;
113
+ lastLoadedAt?: Date | null;
114
+ lastSavedAt?: Date | null;
115
+ };
116
+ loading?: boolean;
117
+ error?: string | null;
118
+ hasExperiment?: boolean;
119
+ currentExperimentId?: number;
120
+ lastLoadedAt?: Date | null;
121
+ lastSavedAt?: Date | null;
122
+ }
123
+ export interface ResolvedBioTemplateExperimentStatus {
124
+ loading: boolean;
125
+ error: string | null | undefined;
126
+ hasExperiment: boolean;
127
+ currentExperimentId: number | undefined;
128
+ lastLoadedAt: Date | null | undefined;
129
+ lastSavedAt: Date | null | undefined;
130
+ }
131
+ /**
132
+ * Merges BioTemplateExperimentWorkspaceView's grouped `status` prop over its individual
133
+ * `loading`/`error`/`hasExperiment`/... props: `status` wins whenever the corresponding field
134
+ * on it is set, otherwise the flat prop (or its default) is used. Centralizes the six
135
+ * independent fallback rules generated plugin pages rely on when they pass a request/experiment
136
+ * `status` object instead of wiring each field by hand.
137
+ */
138
+ export declare function bioTemplateExperimentWorkspaceProps(props: BioTemplateExperimentWorkspaceStatusProps): ResolvedBioTemplateExperimentStatus;
139
+ export interface BioTemplatePackWorkspacePassthroughProps {
140
+ message?: string;
141
+ dense?: boolean;
142
+ readonly?: boolean;
143
+ showStatus?: boolean;
144
+ showTemplateSummary?: boolean;
145
+ loadLabel?: string;
146
+ resetLabel?: string;
147
+ saveLabel?: string;
148
+ }
149
+ /**
150
+ * Assembles the prop object BioTemplatePackWorkspaceView binds onto the
151
+ * BioTemplateExperimentWorkspaceView it wraps: its own display props passed straight through,
152
+ * plus the pack-derived `target`/`label`/`status`/`actions` computed by the caller.
153
+ */
154
+ export declare function bioTemplatePackWorkspaceProps<TTarget, TStatus, TActions>(props: BioTemplatePackWorkspacePassthroughProps, derived: {
155
+ target: TTarget;
156
+ label: string;
157
+ status: TStatus;
158
+ actions: TActions;
159
+ }): {
160
+ target: TTarget;
161
+ kind: "collection";
162
+ label: string;
163
+ message: string | undefined;
164
+ status: TStatus;
165
+ actions: TActions;
166
+ dense: boolean | undefined;
167
+ readonly: boolean | undefined;
168
+ showStatus: boolean | undefined;
169
+ showTemplateSummary: boolean | undefined;
170
+ loadLabel: string | undefined;
171
+ resetLabel: string | undefined;
172
+ saveLabel: string | undefined;
173
+ };
174
+ export interface BioTemplatePresetWorkspaceOptionsProps<TOptions extends ControlWorkspaceOptions> {
175
+ workspaceOptions?: TOptions;
176
+ initialValues?: Record<string, unknown>;
177
+ modelValue?: Record<string, unknown>;
178
+ values?: Record<string, unknown>;
179
+ }
180
+ /**
181
+ * Resolves BioTemplatePresetWorkspaceView's `workspaceOptions`/`initialValues`/`modelValue`/
182
+ * `values` props into the single options object `useBioTemplatePresetWorkspace()` needs,
183
+ * reusing the same base/initialValues/external-values layering as {@link controlWorkspaceProps}.
184
+ */
185
+ export declare function bioTemplatePresetWorkspaceProps<TOptions extends ControlWorkspaceOptions>(props: BioTemplatePresetWorkspaceOptionsProps<TOptions>): {
186
+ externalValues: Record<string, unknown> | undefined;
187
+ resolvedWorkspaceOptions: TOptions;
188
+ };
@@ -1,7 +1,7 @@
1
- import { r as useRequestSyncState } from "./EmptyState-p90quq8Z.js";
2
- import { B as currentExperimentFromContext, U as resolveCurrentExperimentId, V as getInjectedPlatformContext, et as useEventStream } from "./useControlSchema-CXhxTul7.js";
1
+ import { r as useRequestSyncState } from "./EmptyState-NBqf2_8z.js";
2
+ import { B as currentExperimentFromContext, U as resolveCurrentExperimentId, V as getInjectedPlatformContext, et as useEventStream, lt as PLUGIN_SECRET_FORMAT_KEY } from "./useControlSchema-_OVhavKq.js";
3
3
  import { i as useAuthStore, n as authenticationRequiredError, o as useSettingsStore, r as useApi, t as AuthenticationRequiredError } from "./useApi-CDBq6z23.js";
4
- import { i as usePlatformContext } from "./useFormBuilder-CuOFB3aP.js";
4
+ import { i as usePlatformContext } from "./useFormBuilder-Bd714C7y.js";
5
5
  import { computed, getCurrentInstance, onMounted, onUnmounted, ref, shallowRef, toValue, watch } from "vue";
6
6
  import axios from "axios";
7
7
  //#region src/composables/useAuth.ts
@@ -506,7 +506,11 @@ function defaultTransformError(error) {
506
506
  * const handleSubmit = () => submit(new FormData(formRef.value))
507
507
  * ```
508
508
  */
509
- /** Wraps an async function with reactive loading, error, and success state plus optional auto-execute. */
509
+ /**
510
+ * Wraps an async function with reactive loading, error, and success state plus optional auto-execute.
511
+ *
512
+ * @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `useRequestSyncState()` instead.
513
+ */
510
514
  function useAsync(asyncFn, options = {}) {
511
515
  const { initialData = null, immediate = false, immediateArgs = [], transformError = defaultTransformError, onSuccess, onError, resetOnExecute = false } = options;
512
516
  const data = ref(initialData);
@@ -778,7 +782,11 @@ function parseAnalysisArtifactTarget(query) {
778
782
  }
779
783
  //#endregion
780
784
  //#region src/composables/useCommandHistory.ts
781
- /** Generic command-stack state for plugin editors with undo/redo controls. */
785
+ /**
786
+ * Generic command-stack state for plugin editors with undo/redo controls.
787
+ *
788
+ * @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; keep command stacks plugin-local.
789
+ */
782
790
  function useCommandHistory(options = {}) {
783
791
  const maxDepth = Math.max(1, options.maxDepth ?? 50);
784
792
  const undoStack = ref([]);
@@ -841,7 +849,11 @@ function isPromiseLike(value) {
841
849
  }
842
850
  //#endregion
843
851
  //#region src/composables/useOptimisticMutation.ts
844
- /** Run async mutations with optional optimistic local updates and rollback. */
852
+ /**
853
+ * Run async mutations with optional optimistic local updates and rollback.
854
+ *
855
+ * @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `useRequestSyncState()` instead.
856
+ */
845
857
  function useOptimisticMutation(options) {
846
858
  const loading = shallowRef(false);
847
859
  const error = ref(null);
@@ -902,7 +914,11 @@ function readErrorMessage$1(value) {
902
914
  }
903
915
  //#endregion
904
916
  //#region src/composables/useResourceCrud.ts
905
- /** Common list/create/update/delete state wrapper for generated plugin clients. */
917
+ /**
918
+ * Common list/create/update/delete state wrapper for generated plugin clients.
919
+ *
920
+ * @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `useGeneratedPluginClient()` instead.
921
+ */
906
922
  function useResourceCrud(options) {
907
923
  const items = ref([...options.initialItems ?? []]);
908
924
  const loading = shallowRef(false);
@@ -1069,7 +1085,11 @@ var PLATE_DIMENSIONS = {
1069
1085
  cols: 24
1070
1086
  }
1071
1087
  };
1072
- /** Pointer painting/rectangle selection state for WellPlate-based editors. */
1088
+ /**
1089
+ * Pointer painting/rectangle selection state for WellPlate-based editors.
1090
+ *
1091
+ * @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `useWellPlateEditor()` instead.
1092
+ */
1073
1093
  function useWellPainting(options) {
1074
1094
  const activeMode = ref(options.initialMode ?? "select");
1075
1095
  const activePayload = ref(options.initialPayload);
@@ -1182,7 +1202,11 @@ function indexToRowLabel$1(index) {
1182
1202
  }
1183
1203
  //#endregion
1184
1204
  //#region src/composables/useWellPlateAdapter.ts
1185
- /** Convert domain rows into WellPlate's wells prop without hand-written adapters. */
1205
+ /**
1206
+ * Convert domain rows into WellPlate's wells prop without hand-written adapters.
1207
+ *
1208
+ * @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `useWellPlateEditor()` instead.
1209
+ */
1186
1210
  function useWellPlateAdapter(options) {
1187
1211
  return { wells: computed(() => createWellPlateWells(toValue(options.entries), options)) };
1188
1212
  }
@@ -1268,7 +1292,11 @@ function indexToRowLabel(index) {
1268
1292
  }
1269
1293
  //#endregion
1270
1294
  //#region src/composables/useWellPlateValidation.ts
1271
- /** Rule-driven validation state for WellPlate layout/design screens. */
1295
+ /**
1296
+ * Rule-driven validation state for WellPlate layout/design screens.
1297
+ *
1298
+ * @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `useWellPlateEditor()` instead.
1299
+ */
1272
1300
  function useWellPlateValidation(options) {
1273
1301
  const warnings = computed(() => runWellPlateValidation(toValue(options.context), toValue(options.rules)));
1274
1302
  return {
@@ -1635,6 +1663,24 @@ function usePluginClient(client) {
1635
1663
  return client;
1636
1664
  }
1637
1665
  var PLATFORM_OWNED_SETTINGS_KEY = "allowed_experiment_types";
1666
+ /**
1667
+ * Secret settings travel as `{ "$secret": "<id>" }` references, so an untouched
1668
+ * secret round-trips without ever exposing its value. Declaring the format on
1669
+ * every write keeps a `null` unambiguous: it clears the stored secret instead of
1670
+ * meaning "unchanged", which is what the deprecated placeholder form meant.
1671
+ */
1672
+ function withSecretFormat(payload, secretFormat) {
1673
+ if (!secretFormat) return payload;
1674
+ return {
1675
+ ...payload,
1676
+ [PLUGIN_SECRET_FORMAT_KEY]: secretFormat
1677
+ };
1678
+ }
1679
+ function responseSecretFormat(response) {
1680
+ if (!response || typeof response !== "object") return null;
1681
+ const format = response[PLUGIN_SECRET_FORMAT_KEY];
1682
+ return typeof format === "string" && format ? format : null;
1683
+ }
1638
1684
  function cloneRecord(value) {
1639
1685
  return JSON.parse(JSON.stringify(value));
1640
1686
  }
@@ -1672,6 +1718,7 @@ function usePluginSettings(options = {}) {
1672
1718
  const values = ref({});
1673
1719
  const savedValues = shallowRef({});
1674
1720
  const revision = ref(null);
1721
+ const secretFormat = ref(null);
1675
1722
  const request = useRequestSyncState("Plugin settings request failed.");
1676
1723
  const isLoading = ref(false);
1677
1724
  const isSaving = ref(false);
@@ -1692,11 +1739,12 @@ function usePluginSettings(options = {}) {
1692
1739
  function setValues(nextValues) {
1693
1740
  values.value = cloneRecord(nextValues);
1694
1741
  }
1695
- function applyLoaded(nextValues, nextRevision) {
1742
+ function applyLoaded(nextValues, nextRevision, nextSecretFormat = secretFormat.value) {
1696
1743
  const cloned = cloneRecord(nextValues);
1697
1744
  values.value = cloned;
1698
1745
  savedValues.value = cloneRecord(cloned);
1699
1746
  revision.value = nextRevision;
1747
+ secretFormat.value = nextSecretFormat;
1700
1748
  }
1701
1749
  async function load() {
1702
1750
  isLoading.value = true;
@@ -1708,7 +1756,7 @@ function usePluginSettings(options = {}) {
1708
1756
  success: "load",
1709
1757
  errorMessage: "Failed to load plugin settings"
1710
1758
  });
1711
- applyLoaded(responseSettingsPayload(response), responseSettingsRevision(response));
1759
+ applyLoaded(responseSettingsPayload(response), responseSettingsRevision(response), responseSecretFormat(response));
1712
1760
  } catch {} finally {
1713
1761
  isLoading.value = false;
1714
1762
  }
@@ -1725,7 +1773,7 @@ function usePluginSettings(options = {}) {
1725
1773
  const typedKeys = [...dirtyKeys].filter((key) => key !== PLATFORM_OWNED_SETTINGS_KEY);
1726
1774
  let nextRevision = revision.value;
1727
1775
  if (typedKeys.length) {
1728
- response = await request.run(() => platformApi.patch(`/plugins/${encodeURIComponent(resolvedPluginName.value)}/config`, { config: topLevelSettingsPatch(payload, typedKeys) }), {
1776
+ response = await request.run(() => platformApi.patch(`/plugins/${encodeURIComponent(resolvedPluginName.value)}/config`, { config: withSecretFormat(topLevelSettingsPatch(payload, typedKeys), secretFormat.value) }), {
1729
1777
  success: "save",
1730
1778
  errorMessage: "Failed to save plugin settings"
1731
1779
  });
@@ -1739,16 +1787,16 @@ function usePluginSettings(options = {}) {
1739
1787
  nextRevision = responseSettingsRevision(response) ?? nextRevision;
1740
1788
  }
1741
1789
  if (!response) return true;
1742
- applyLoaded(responseSettingsPayload(response), nextRevision);
1790
+ applyLoaded(responseSettingsPayload(response), nextRevision, responseSecretFormat(response) ?? secretFormat.value);
1743
1791
  return true;
1744
1792
  } else {
1745
1793
  const ifMatch = revision.value ? { headers: { "If-Match": `"${revision.value}"` } } : void 0;
1746
- response = await request.run(() => pluginApi.put("/settings", payload, ifMatch), {
1794
+ response = await request.run(() => pluginApi.put("/settings", withSecretFormat(payload, secretFormat.value), ifMatch), {
1747
1795
  success: "save",
1748
1796
  errorMessage: "Failed to save plugin settings"
1749
1797
  });
1750
1798
  }
1751
- applyLoaded(responseSettingsPayload(response), responseSettingsRevision(response) ?? revision.value);
1799
+ applyLoaded(responseSettingsPayload(response), responseSettingsRevision(response) ?? revision.value, responseSecretFormat(response) ?? secretFormat.value);
1752
1800
  return true;
1753
1801
  } catch {
1754
1802
  return false;
@@ -1900,4 +1948,4 @@ function useCurrentExperiment(options = {}) {
1900
1948
  //#endregion
1901
1949
  export { useAsync as A, createPluginResourceClient as C, buildAnalysisArtifactTargetQuery as D, useCommandHistory as E, resolvePluginFrontendBase as M, usePasskey as N, parseAnalysisArtifactTarget as O, useAuth as P, wellIdsInRectangle as S, useOptimisticMutation as T, createWellPlateWells as _, pluginFormDataFromPayload as a, useWellPainting as b, usePluginClient as c, buildPluginEndpointUrl as d, resolvePluginBaseUrl as f, createRowConditions as g, createColumnConditions as h, getPluginPageSelectorItems as i, useAsyncBatch as j, usePluginConfig as k, usePluginEventStream as l, useWellPlateValidation as m, downloadBlob as n, uploadPluginEndpoint as o, runWellPlateValidation as p, downloadPluginEndpoint as r, useCurrentExperiment as s, createPluginClient as t, usePluginSettings as u, useWellPlateAdapter as v, useResourceCrud as w, wellIdToCoordinate as x, coordinateToWellId as y };
1902
1950
 
1903
- //# sourceMappingURL=composables-CKxOcvgh.js.map
1951
+ //# sourceMappingURL=composables-C8mmD5ta.js.map