@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.
- package/dist/{EmptyState-p90quq8Z.js → EmptyState-NBqf2_8z.js} +2 -2
- package/dist/{EmptyState-p90quq8Z.js.map → EmptyState-NBqf2_8z.js.map} +1 -1
- package/dist/{ExperimentPopover-tLwJ7XF4.js → ExperimentPopover-CfOdh5Rm.js} +3 -3
- package/dist/{ExperimentPopover-tLwJ7XF4.js.map → ExperimentPopover-CfOdh5Rm.js.map} +1 -1
- package/dist/{ExperimentSelectorModal-B6P2msT4.js → ExperimentSelectorModal-DvIagrxY.js} +4 -4
- package/dist/{ExperimentSelectorModal-B6P2msT4.js.map → ExperimentSelectorModal-DvIagrxY.js.map} +1 -1
- package/dist/{SettingsModal-CkNM8qAI.js → SettingsModal-W3TYfnP9.js} +4 -7
- package/dist/SettingsModal-W3TYfnP9.js.map +1 -0
- package/dist/__tests__/components/PluginWorkspaceView.internal.test.d.ts +1 -0
- package/dist/__tests__/components/SecretInput.test.d.ts +1 -0
- package/dist/__tests__/components/WellEditPopupInternal.test.d.ts +1 -0
- package/dist/components/AppAvatarMenu.vue.d.ts +4 -0
- package/dist/components/AppSidebar.vue.d.ts +1 -1
- package/dist/components/BioTemplateExperimentWorkspaceView.vue.d.ts +1 -1
- package/dist/components/DropdownButton.vue.d.ts +2 -0
- package/dist/components/FitPanel.vue.d.ts +1 -1
- package/dist/components/PluginWorkspaceView.props.d.ts +29 -1
- package/dist/components/PluginWorkspaceView.vue.d.ts +5 -5
- package/dist/components/SecretInput.vue.d.ts +28 -0
- package/dist/components/SmartGroupFieldRecipe.vue.d.ts +1 -1
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.js +8 -8
- package/dist/components/internal/WellEditPopupInternal.vue.d.ts +3 -1
- package/dist/components/internal/WorkspaceControlsInternal.vue.d.ts +23 -0
- package/dist/components/internal/WorkspaceShellInternal.vue.d.ts +70 -0
- package/dist/components/internal/WorkspaceSidebarInternal.vue.d.ts +43 -0
- package/dist/{components-MGNL6tRn.js → components-B80gV0P6.js} +575 -561
- package/dist/components-B80gV0P6.js.map +1 -0
- package/dist/composables/flattenWorkspaceBindings.d.ts +61 -0
- package/dist/composables/index.d.ts +5 -0
- package/dist/composables/index.js +9 -9
- package/dist/composables/pluginWorkspaceModel.d.ts +164 -0
- package/dist/composables/useAsync.d.ts +5 -1
- package/dist/composables/useBioTemplateWorkspace.d.ts +4 -20
- package/dist/composables/useCommandHistory.d.ts +5 -1
- package/dist/composables/useFocusTrap.d.ts +21 -0
- package/dist/composables/useMenuKeyboard.d.ts +29 -0
- package/dist/composables/useOptimisticMutation.d.ts +5 -1
- package/dist/composables/usePluginWorkspace.d.ts +51 -0
- package/dist/composables/useResourceCrud.d.ts +5 -1
- package/dist/composables/useRovingFocus.d.ts +24 -0
- package/dist/composables/useWellPainting.d.ts +5 -1
- package/dist/composables/useWellPlateAdapter.d.ts +5 -1
- package/dist/composables/useWellPlateValidation.d.ts +5 -1
- package/dist/composables/workspaceRecipes.d.ts +188 -0
- package/dist/{composables-CKxOcvgh.js → composables-C8mmD5ta.js} +65 -17
- package/dist/composables-C8mmD5ta.js.map +1 -0
- package/dist/{experiment-utils-CLnzPPq5.js → experiment-utils-DV3DrvE_.js} +70 -51
- package/dist/experiment-utils-DV3DrvE_.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +13 -13
- package/dist/install.js +7 -7
- package/dist/styles.css +100 -49
- package/dist/templates/builderReadUtils.d.ts +1 -1
- package/dist/templates/index.js +4 -4
- package/dist/{templates-BTJ9C9Kb.js → templates-CK72aKO1.js} +14 -23
- package/dist/templates-CK72aKO1.js.map +1 -0
- package/dist/types/form-builder.d.ts +1 -1
- package/dist/{useControlSchema-CXhxTul7.js → useControlSchema-_OVhavKq.js} +280 -63
- package/dist/useControlSchema-_OVhavKq.js.map +1 -0
- package/dist/{useDropdownState-DSb3BC3N.js → useDropdownState-D5G4UvWd.js} +2 -2
- package/dist/{useDropdownState-DSb3BC3N.js.map → useDropdownState-D5G4UvWd.js.map} +1 -1
- package/dist/{useExperimentSelector-D0pjj9WH.js → useExperimentSelector-DSEckf_g.js} +3 -3
- package/dist/{useExperimentSelector-D0pjj9WH.js.map → useExperimentSelector-DSEckf_g.js.map} +1 -1
- package/dist/{useFormBuilder-CuOFB3aP.js → useFormBuilder-Bd714C7y.js} +2 -2
- package/dist/{useFormBuilder-CuOFB3aP.js.map → useFormBuilder-Bd714C7y.js.map} +1 -1
- package/dist/{useProtocolTemplates-BWhQIWV5.js → useProtocolTemplates-Dq5Pzwyd.js} +481 -46
- package/dist/useProtocolTemplates-Dq5Pzwyd.js.map +1 -0
- package/dist/utils/pluginSecrets.d.ts +53 -0
- package/dist/utils/records.d.ts +4 -0
- package/package.json +1 -1
- package/src/__tests__/components/AppAvatarMenu.test.ts +123 -0
- package/src/__tests__/components/BaseTabs.test.ts +67 -0
- package/src/__tests__/components/DropdownButton.test.ts +134 -0
- package/src/__tests__/components/PluginWorkspaceView.internal.test.ts +230 -0
- package/src/__tests__/components/SecretInput.test.ts +87 -0
- package/src/__tests__/components/WellEditPopupInternal.test.ts +108 -0
- package/src/__tests__/composables/usePluginClient.test.ts +140 -0
- package/src/components/AppAvatarMenu.vue +34 -3
- package/src/components/BaseModal.vue +8 -56
- package/src/components/BaseTabs.vue +26 -1
- package/src/components/BioTemplateExperimentWorkspaceView.vue +10 -21
- package/src/components/BioTemplatePackWorkspaceView.vue +11 -15
- package/src/components/BioTemplatePresetWorkspaceView.vue +8 -13
- package/src/components/ComponentBindingRenderer.vue +1 -3
- package/src/components/ControlWorkspaceView.vue +11 -22
- package/src/components/DoseDesignWorkspaceView.vue +6 -25
- package/src/components/DropdownButton.vue +32 -2
- package/src/components/PluginWorkspaceView.props.ts +38 -0
- package/src/components/PluginWorkspaceView.vue +53 -224
- package/src/components/SecretInput.story.vue +79 -0
- package/src/components/SecretInput.vue +150 -0
- package/src/components/index.ts +9 -0
- package/src/components/internal/WellEditPopupInternal.vue +20 -1
- package/src/components/internal/WorkspaceControlsInternal.vue +20 -0
- package/src/components/internal/WorkspaceShellInternal.vue +125 -0
- package/src/components/internal/WorkspaceSidebarInternal.vue +82 -0
- package/src/composables/experimentDesignData.ts +1 -3
- package/src/composables/flattenWorkspaceBindings.ts +104 -0
- package/src/composables/formBuilderRegistry.ts +5 -0
- package/src/composables/index.ts +26 -0
- package/src/composables/pluginWorkspaceModel.ts +182 -0
- package/src/composables/useAsync.ts +5 -1
- package/src/composables/useBioTemplatePackWorkspace.ts +15 -9
- package/src/composables/useBioTemplatePresetWorkspace.ts +14 -15
- package/src/composables/useBioTemplateWorkspace.ts +18 -43
- package/src/composables/useCommandHistory.ts +5 -1
- package/src/composables/useFocusTrap.ts +91 -0
- package/src/composables/useMenuKeyboard.ts +90 -0
- package/src/composables/useOptimisticMutation.ts +5 -1
- package/src/composables/usePluginClient.ts +42 -4
- package/src/composables/usePluginWorkspace.ts +208 -0
- package/src/composables/useResourceCrud.ts +5 -1
- package/src/composables/useRovingFocus.ts +66 -0
- package/src/composables/useWellPainting.ts +5 -1
- package/src/composables/useWellPlateAdapter.ts +5 -1
- package/src/composables/useWellPlateValidation.ts +5 -1
- package/src/composables/workspaceRecipes.ts +267 -0
- package/src/index.ts +16 -0
- package/src/styles/components/secret-input.css +60 -0
- package/src/styles/index.css +1 -0
- package/src/templates/builderReadUtils.ts +1 -3
- package/src/templates/componentTargetResolvers.ts +1 -3
- package/src/templates/controlSchemaTargets.ts +1 -3
- package/src/types/form-builder.ts +1 -0
- package/src/utils/formModelSync.ts +1 -3
- package/src/utils/pluginIcon.ts +1 -3
- package/src/utils/pluginSecrets.ts +102 -0
- package/src/utils/records.ts +9 -0
- package/dist/SettingsModal-CkNM8qAI.js.map +0 -1
- package/dist/components-MGNL6tRn.js.map +0 -1
- package/dist/composables-CKxOcvgh.js.map +0 -1
- package/dist/experiment-utils-CLnzPPq5.js.map +0 -1
- package/dist/templates-BTJ9C9Kb.js.map +0 -1
- package/dist/useControlSchema-CXhxTul7.js.map +0 -1
- package/dist/useProtocolTemplates-BWhQIWV5.js.map +0 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { BioTemplateComponentBinding, BioTemplateComponentBindingsById, BioTemplateComponentImport, BioTemplateComponentPropsByComponent, BioTemplateComponentPropsBinding, BioTemplateComponentPropsById, BioTemplateComponentPropsLookupOptions, BioTemplateComponentSnippet, BioTemplateComponentUsage } from './useBioTemplateComponents';
|
|
3
|
+
/**
|
|
4
|
+
* The template-component slice of `UseBioTemplateWorkspaceReturn`: the ~9 keys every
|
|
5
|
+
* bio-template workspace composable (`useBioTemplateWorkspace`, `useBioTemplatePackWorkspace`,
|
|
6
|
+
* `useBioTemplatePresetWorkspace`) re-exposes verbatim from `useBioTemplateComponents()`.
|
|
7
|
+
*/
|
|
8
|
+
export interface BioTemplateWorkspaceComponentBindings {
|
|
9
|
+
componentBindings: BioTemplateComponentBinding[];
|
|
10
|
+
componentBindingsById: BioTemplateComponentBindingsById;
|
|
11
|
+
componentImports: BioTemplateComponentImport[];
|
|
12
|
+
componentProps: BioTemplateComponentPropsBinding[];
|
|
13
|
+
componentPropsById: BioTemplateComponentPropsById;
|
|
14
|
+
componentPropsByComponent: BioTemplateComponentPropsByComponent;
|
|
15
|
+
componentSnippets: BioTemplateComponentSnippet[];
|
|
16
|
+
componentUsage: BioTemplateComponentUsage | null;
|
|
17
|
+
getComponentProps: (component: string, options?: BioTemplateComponentPropsLookupOptions) => Record<string, unknown> | undefined;
|
|
18
|
+
}
|
|
19
|
+
/** Structural source shape accepted by {@link flattenWorkspaceComponentBindings}. */
|
|
20
|
+
export interface BioTemplateWorkspaceComponentSource {
|
|
21
|
+
componentBindings: BioTemplateComponentBinding[];
|
|
22
|
+
componentBindingsById: BioTemplateComponentBindingsById;
|
|
23
|
+
componentImports: BioTemplateComponentImport[];
|
|
24
|
+
componentProps: BioTemplateComponentPropsBinding[];
|
|
25
|
+
componentPropsById: BioTemplateComponentPropsById;
|
|
26
|
+
componentPropsByComponent: BioTemplateComponentPropsByComponent;
|
|
27
|
+
componentSnippets: BioTemplateComponentSnippet[];
|
|
28
|
+
componentUsage: BioTemplateComponentUsage | null;
|
|
29
|
+
getComponentProps: (component: string, options?: BioTemplateComponentPropsLookupOptions) => Record<string, unknown> | undefined;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Pick the shared template-component binding keys off a resolved bio-template workspace
|
|
33
|
+
* (or its `components` source directly), so composables that build on `useBioTemplateWorkspace`
|
|
34
|
+
* spread one object instead of re-listing all 9 keys by hand.
|
|
35
|
+
*
|
|
36
|
+
* @example Recommended
|
|
37
|
+
* ```ts
|
|
38
|
+
* const bindings = { renderer, ...flattenWorkspaceComponentBindings(components) }
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function flattenWorkspaceComponentBindings(source: BioTemplateWorkspaceComponentSource): BioTemplateWorkspaceComponentBindings;
|
|
42
|
+
/** Keys of {@link BioTemplateWorkspaceComponentBindings} that are plain (non-reactive) values, lifted to `ComputedRef`s by {@link liftWorkspaceComponentBindings}. */
|
|
43
|
+
export type LiftedBioTemplateWorkspaceComponentBindings = {
|
|
44
|
+
[K in Exclude<keyof BioTemplateWorkspaceComponentBindings, 'getComponentProps'>]: ComputedRef<BioTemplateWorkspaceComponentBindings[K]>;
|
|
45
|
+
} & {
|
|
46
|
+
getComponentProps: BioTemplateWorkspaceComponentBindings['getComponentProps'];
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* `computed()`-lifted version of {@link flattenWorkspaceComponentBindings} for composables
|
|
50
|
+
* that hold their resolved workspace behind a `ComputedRef` (e.g. a regenerated workspace
|
|
51
|
+
* swapped in via `shallowRef`/`effectScope`), so each key stays independently reactive
|
|
52
|
+
* instead of forcing consumers to unwrap the whole workspace to read one field.
|
|
53
|
+
* `getComponentProps` stays a plain callable function, matching the un-lifted composables.
|
|
54
|
+
*
|
|
55
|
+
* @example Recommended
|
|
56
|
+
* ```ts
|
|
57
|
+
* const workspace = computed(() => workspaceRef.value)
|
|
58
|
+
* const { componentBindings, componentProps, getComponentProps } = liftWorkspaceComponentBindings(workspace)
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export declare function liftWorkspaceComponentBindings<TSource extends BioTemplateWorkspaceComponentSource>(workspace: ComputedRef<TSource>): LiftedBioTemplateWorkspaceComponentBindings;
|
|
@@ -61,3 +61,8 @@ export { useBioTemplatePresetWorkspace, type BioTemplatePresetWorkspaceBindings,
|
|
|
61
61
|
export { useBioTemplatePackWorkspace, type UseBioTemplatePackWorkspaceOptions, type UseBioTemplatePackWorkspaceReturn, } from './useBioTemplatePackWorkspace';
|
|
62
62
|
export { buildPluginEndpointUrl, createPluginClient, downloadBlob, downloadPluginEndpoint, getPluginPageSelectorItems, pluginFormDataFromPayload, resolvePluginBaseUrl, uploadPluginEndpoint, usePluginClient, usePluginEventStream, usePluginSettings, useCurrentExperiment, type BuildPluginEndpointUrlOptions, type DownloadBlobOptions, type DownloadPluginEndpointOptions, type PluginContract, type PluginContractSettings, type PluginClientRequestOptions, type PluginEndpointContract, type PluginEndpointDefinition, type PluginHttpMethod, type PluginNavItemContract, type PluginEndpointRequestOptions, type PluginEventStreamMessage, type PluginEventStreamOptions, type PluginFormDataPayload, type PluginFormDataValue, type CreatePluginClientOptions, type UseCurrentExperimentOptions, type UseCurrentExperimentReturn, type UsePluginEventStreamReturn, type UsePluginSettingsOptions, type UsePluginSettingsReturn, } from './usePluginClient';
|
|
63
63
|
export { combinePluginJobSources, usePluginJobCenter, useJobsStatusTray, type CombinedPluginJobCenterSource, type JobsStatusTrayAdapter, type JobStreamMessage, type PluginJobCenterSource, type JobsStatusTrayTab, type UseJobsStatusTrayOptions, type UseJobsStatusTrayReturn, type UsePluginJobCenterOptions, type UsePluginJobCenterReturn, } from './useJobsStatusTray';
|
|
64
|
+
export { usePluginWorkspace, type PluginWorkspaceSlotsLike, type UsePluginWorkspaceOptions, type UsePluginWorkspaceReturn, } from './usePluginWorkspace';
|
|
65
|
+
export { type PluginWorkspaceControlsModel, type PluginWorkspaceShellModel, type PluginWorkspaceSidebarModel, } from './pluginWorkspaceModel';
|
|
66
|
+
export { useFocusTrap, type UseFocusTrapOptions, type UseFocusTrapReturn, } from './useFocusTrap';
|
|
67
|
+
export { useRovingFocus, type UseRovingFocusOptions, type UseRovingFocusReturn, } from './useRovingFocus';
|
|
68
|
+
export { useMenuKeyboard, type UseMenuKeyboardOptions, type UseMenuKeyboardReturn, } from './useMenuKeyboard';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as SORT_OPTIONS, c as formatExperimentDate, d as resolveExperimentCode, i as EXPERIMENT_STATUS_VARIANT_MAP, l as formatExperimentStatus, n as EXPERIMENT_STATUS_LABELS, o as datePresetToISO, p as
|
|
2
|
-
import { r as useRequestSyncState } from "../EmptyState-
|
|
3
|
-
import { A as useConcentrationUnits, C as controlsToViewIds, Ct as
|
|
4
|
-
import { $ as
|
|
1
|
+
import { a as SORT_OPTIONS, c as formatExperimentDate, d as resolveExperimentCode, i as EXPERIMENT_STATUS_VARIANT_MAP, l as formatExperimentStatus, m as useEventListener, n as EXPERIMENT_STATUS_LABELS, o as datePresetToISO, p as useFocusTrap, r as EXPERIMENT_STATUS_OPTIONS, s as experimentIdFromRoute, t as DATE_PRESET_OPTIONS, u as getExperimentStatusVariant } from "../experiment-utils-DV3DrvE_.js";
|
|
2
|
+
import { r as useRequestSyncState } from "../EmptyState-NBqf2_8z.js";
|
|
3
|
+
import { A as useConcentrationUnits, At as formatTimeSlot, C as controlsToViewIds, Ct as addMinutes, D as getTypeDefault, Dt as findNearestTimeSlotIndex, E as getFieldRegistryEntry, Et as findAvailableSlots, F as ATOMIC_WEIGHTS, Ft as rangesOverlap, G as createGeneratedAnalysisTransport, Ht as useSelectionLimit, I as useChemicalFormula, It as snapToSlot, K as useGeneratedAnalysis, Lt as toMinutes, Mt as generateTimeSlots, N as useSequenceUtils, Nt as isTimeInRange, Ot as formatDuration, Pt as parseTime, Rt as useTimeUtils, S as controlsToTopBarSettingsConfig, T as getDefaultControlView, Tt as durationMinutes, Vt as useListSelection, W as resolveCurrentPluginId, _ as controlsToFormSchema, a as defineDoseCalculatorControlProps, b as controlsToSettingsSchema, c as defineWellPlateDoseComponentBindings, d as defineControlModel, h as controlValuesToComponentProps, i as useControlSchema, jt as fromMinutes, kt as formatTime, l as defineWellPlateDoseControlProps, m as controlValuesToComponentBindingsById, n as defineControls, o as defineDoseDesignControlModel, p as controlValuesToComponentBindings, q as usePluginJobs, r as getControlDefaults, s as defineWellPlateControlProps, t as defineControlComponentBindings, u as useControlWorkspace, v as controlsToSectionFormSchema, w as controlsToViewItems, wt as compareTime, x as controlsToSidebarPanels, y as controlsToSectionFormSchemas, z as useAnalysisArtifacts } from "../useControlSchema-_OVhavKq.js";
|
|
4
|
+
import { $ as useTheme, A as useFileImport, B as useDoseCalculator, D as detectDelimiter, F as extractSampleNamesFromDesignData, G as DEFAULT_MOBILE_VIEWPORT_QUERY, H as useJobsStatusTray, I as extractSampleOptionsFromDesignData, J as useAppExperiment, K as useMobileSupportGate, L as unwrapExperimentDesignData, M as extractSamplesFromDesignData, N as useAutoGroup, O as parseDelimitedText, Q as usePresenceHeartbeat, R as DEFAULT_COLORS, U as usePluginJobCenter, V as combinePluginJobSources, W as usePluginWorkspace, X as useRuntimeAlignment, Y as getInjectedFrontendRevision, Z as getPresenceClientId, _ as useScheduleDrag, a as useReagentSeries, at as useSortedItems, b as useExpansionSet, c as useBioTemplatePresetWorkspace, d as getBioTemplateComponentProps, et as useToast, f as toBioTemplateComponentPropsByComponent, g as useExperimentSave, h as useTemplateCollection, i as generateDilutionSeries, it as compareSortValues, j as validateImportFile, k as readFileAsText, l as useBioTemplatePackWorkspace, m as useBioTemplateControls, n as DEFAULT_PRESETS, nt as normalizeSearchQuery, o as useGroupAssignment, ot as useMenuKeyboard, p as useBioTemplateComponents, q as APP_EXPERIMENT_KEY, r as DEFAULT_UNITS, rt as useTextSearch, s as useRackEditor, st as useRovingFocus, t as useProtocolTemplates, tt as candidateMatchesSearch, u as useBioTemplateWorkspace, v as useExperimentSamples, x as useSampleGroups, y as useExperimentData, z as useWellPlateEditor } from "../useProtocolTemplates-Dq5Pzwyd.js";
|
|
5
5
|
import { r as useApi, t as AuthenticationRequiredError } from "../useApi-CDBq6z23.js";
|
|
6
|
-
import { i as usePlatformContext, n as evaluateCondition, r as useForm, t as useFormBuilder } from "../useFormBuilder-
|
|
6
|
+
import { i as usePlatformContext, n as evaluateCondition, r as useForm, t as useFormBuilder } from "../useFormBuilder-Bd714C7y.js";
|
|
7
7
|
import { t as ANALYSIS_FILE_ARTIFACT_SCHEMA } from "../analysisArtifactTypes-DQ0MjwHZ.js";
|
|
8
|
-
import { B as toBioTemplateComponentProps, H as toBioTemplateComponentPropsById, L as toBioTemplateComponentBindings, P as getBioTemplateComponentBindings, R as toBioTemplateComponentBindingsById, l as requireBioTemplateControlSchema, o as getBioTemplateControlSchema } from "../templates-
|
|
9
|
-
import { n as useDebouncedWatch, t as useExperimentSelector } from "../useExperimentSelector-
|
|
10
|
-
import { A as useAsync, C as createPluginResourceClient, D as buildAnalysisArtifactTargetQuery, E as useCommandHistory, M as resolvePluginFrontendBase, N as usePasskey, O as parseAnalysisArtifactTarget, P as useAuth, S as wellIdsInRectangle, T as useOptimisticMutation, _ as createWellPlateWells, a as pluginFormDataFromPayload, b as useWellPainting, c as usePluginClient, d as buildPluginEndpointUrl, f as resolvePluginBaseUrl, g as createRowConditions, h as createColumnConditions, i as getPluginPageSelectorItems, j as useAsyncBatch, k as usePluginConfig, l as usePluginEventStream, m as useWellPlateValidation, n as downloadBlob, o as uploadPluginEndpoint, p as runWellPlateValidation, r as downloadPluginEndpoint, s as useCurrentExperiment, t as createPluginClient, u as usePluginSettings, v as useWellPlateAdapter, w as useResourceCrud, x as wellIdToCoordinate, y as coordinateToWellId } from "../composables-
|
|
11
|
-
export { ANALYSIS_FILE_ARTIFACT_SCHEMA, APP_EXPERIMENT_KEY, ATOMIC_WEIGHTS, AuthenticationRequiredError, DATE_PRESET_OPTIONS, DEFAULT_COLORS, DEFAULT_MOBILE_VIEWPORT_QUERY, DEFAULT_PRESETS, DEFAULT_UNITS, EXPERIMENT_STATUS_LABELS, EXPERIMENT_STATUS_OPTIONS, EXPERIMENT_STATUS_VARIANT_MAP, SORT_OPTIONS, addMinutes, buildAnalysisArtifactTargetQuery, buildPluginEndpointUrl, candidateMatchesSearch, combinePluginJobSources, compareSortValues, compareTime, controlValuesToComponentBindings, controlValuesToComponentBindingsById, controlValuesToComponentProps, controlsToFormSchema, controlsToSectionFormSchema, controlsToSectionFormSchemas, controlsToSettingsSchema, controlsToSidebarPanels, controlsToTopBarSettingsConfig, controlsToViewIds, controlsToViewItems, coordinateToWellId, createColumnConditions, createGeneratedAnalysisTransport, createPluginClient, createPluginResourceClient, createRowConditions, createWellPlateWells, datePresetToISO, defineControlComponentBindings, defineControlModel, defineControls, defineDoseCalculatorControlProps, defineDoseDesignControlModel, defineWellPlateControlProps, defineWellPlateDoseComponentBindings, defineWellPlateDoseControlProps, detectDelimiter, downloadBlob, downloadPluginEndpoint, durationMinutes, evaluateCondition, experimentIdFromRoute, extractSampleNamesFromDesignData, extractSampleOptionsFromDesignData, extractSamplesFromDesignData, findAvailableSlots, findNearestTimeSlotIndex, formatDuration, formatExperimentDate, formatExperimentStatus, formatTime, formatTimeSlot, fromMinutes, generateDilutionSeries, generateTimeSlots, getBioTemplateComponentBindings, getBioTemplateComponentProps, getBioTemplateControlSchema, getControlDefaults, getDefaultControlView, getExperimentStatusVariant, getFieldRegistryEntry, getInjectedFrontendRevision, getPluginPageSelectorItems, getPresenceClientId, getTypeDefault, isTimeInRange, normalizeSearchQuery, parseAnalysisArtifactTarget, parseDelimitedText, parseTime, pluginFormDataFromPayload, rangesOverlap, readFileAsText, requireBioTemplateControlSchema, resolveCurrentPluginId, resolveExperimentCode, resolvePluginBaseUrl, resolvePluginFrontendBase, runWellPlateValidation, snapToSlot, toBioTemplateComponentBindings, toBioTemplateComponentBindingsById, toBioTemplateComponentProps, toBioTemplateComponentPropsByComponent, toBioTemplateComponentPropsById, toMinutes, unwrapExperimentDesignData, uploadPluginEndpoint, useAnalysisArtifacts, useApi, useAppExperiment, useAsync, useAsyncBatch, useAuth, useAutoGroup, useBioTemplateComponents, useBioTemplateControls, useBioTemplatePackWorkspace, useBioTemplatePresetWorkspace, useBioTemplateWorkspace, useChemicalFormula, useCommandHistory, useConcentrationUnits, useControlSchema, useControlWorkspace, useCurrentExperiment, useDebouncedWatch, useDoseCalculator, useEventListener, useExpansionSet, useExperimentData, useExperimentSamples, useExperimentSave, useExperimentSelector, useFileImport, useForm, useFormBuilder, useGeneratedAnalysis, useGroupAssignment, useJobsStatusTray, useListSelection, useMobileSupportGate, useOptimisticMutation, usePasskey, usePlatformContext, usePluginClient, usePluginConfig, usePluginEventStream, usePluginJobCenter, usePluginJobs, usePluginSettings, usePresenceHeartbeat, useProtocolTemplates, useRackEditor, useReagentSeries, useRequestSyncState, useResourceCrud, useRuntimeAlignment, useSampleGroups, useScheduleDrag, useSelectionLimit, useSequenceUtils, useSortedItems, useTemplateCollection, useTextSearch, useTheme, useTimeUtils, useToast, useWellPainting, useWellPlateAdapter, useWellPlateEditor, useWellPlateValidation, validateImportFile, wellIdToCoordinate, wellIdsInRectangle };
|
|
8
|
+
import { B as toBioTemplateComponentProps, H as toBioTemplateComponentPropsById, L as toBioTemplateComponentBindings, P as getBioTemplateComponentBindings, R as toBioTemplateComponentBindingsById, l as requireBioTemplateControlSchema, o as getBioTemplateControlSchema } from "../templates-CK72aKO1.js";
|
|
9
|
+
import { n as useDebouncedWatch, t as useExperimentSelector } from "../useExperimentSelector-DSEckf_g.js";
|
|
10
|
+
import { A as useAsync, C as createPluginResourceClient, D as buildAnalysisArtifactTargetQuery, E as useCommandHistory, M as resolvePluginFrontendBase, N as usePasskey, O as parseAnalysisArtifactTarget, P as useAuth, S as wellIdsInRectangle, T as useOptimisticMutation, _ as createWellPlateWells, a as pluginFormDataFromPayload, b as useWellPainting, c as usePluginClient, d as buildPluginEndpointUrl, f as resolvePluginBaseUrl, g as createRowConditions, h as createColumnConditions, i as getPluginPageSelectorItems, j as useAsyncBatch, k as usePluginConfig, l as usePluginEventStream, m as useWellPlateValidation, n as downloadBlob, o as uploadPluginEndpoint, p as runWellPlateValidation, r as downloadPluginEndpoint, s as useCurrentExperiment, t as createPluginClient, u as usePluginSettings, v as useWellPlateAdapter, w as useResourceCrud, x as wellIdToCoordinate, y as coordinateToWellId } from "../composables-C8mmD5ta.js";
|
|
11
|
+
export { ANALYSIS_FILE_ARTIFACT_SCHEMA, APP_EXPERIMENT_KEY, ATOMIC_WEIGHTS, AuthenticationRequiredError, DATE_PRESET_OPTIONS, DEFAULT_COLORS, DEFAULT_MOBILE_VIEWPORT_QUERY, DEFAULT_PRESETS, DEFAULT_UNITS, EXPERIMENT_STATUS_LABELS, EXPERIMENT_STATUS_OPTIONS, EXPERIMENT_STATUS_VARIANT_MAP, SORT_OPTIONS, addMinutes, buildAnalysisArtifactTargetQuery, buildPluginEndpointUrl, candidateMatchesSearch, combinePluginJobSources, compareSortValues, compareTime, controlValuesToComponentBindings, controlValuesToComponentBindingsById, controlValuesToComponentProps, controlsToFormSchema, controlsToSectionFormSchema, controlsToSectionFormSchemas, controlsToSettingsSchema, controlsToSidebarPanels, controlsToTopBarSettingsConfig, controlsToViewIds, controlsToViewItems, coordinateToWellId, createColumnConditions, createGeneratedAnalysisTransport, createPluginClient, createPluginResourceClient, createRowConditions, createWellPlateWells, datePresetToISO, defineControlComponentBindings, defineControlModel, defineControls, defineDoseCalculatorControlProps, defineDoseDesignControlModel, defineWellPlateControlProps, defineWellPlateDoseComponentBindings, defineWellPlateDoseControlProps, detectDelimiter, downloadBlob, downloadPluginEndpoint, durationMinutes, evaluateCondition, experimentIdFromRoute, extractSampleNamesFromDesignData, extractSampleOptionsFromDesignData, extractSamplesFromDesignData, findAvailableSlots, findNearestTimeSlotIndex, formatDuration, formatExperimentDate, formatExperimentStatus, formatTime, formatTimeSlot, fromMinutes, generateDilutionSeries, generateTimeSlots, getBioTemplateComponentBindings, getBioTemplateComponentProps, getBioTemplateControlSchema, getControlDefaults, getDefaultControlView, getExperimentStatusVariant, getFieldRegistryEntry, getInjectedFrontendRevision, getPluginPageSelectorItems, getPresenceClientId, getTypeDefault, isTimeInRange, normalizeSearchQuery, parseAnalysisArtifactTarget, parseDelimitedText, parseTime, pluginFormDataFromPayload, rangesOverlap, readFileAsText, requireBioTemplateControlSchema, resolveCurrentPluginId, resolveExperimentCode, resolvePluginBaseUrl, resolvePluginFrontendBase, runWellPlateValidation, snapToSlot, toBioTemplateComponentBindings, toBioTemplateComponentBindingsById, toBioTemplateComponentProps, toBioTemplateComponentPropsByComponent, toBioTemplateComponentPropsById, toMinutes, unwrapExperimentDesignData, uploadPluginEndpoint, useAnalysisArtifacts, useApi, useAppExperiment, useAsync, useAsyncBatch, useAuth, useAutoGroup, useBioTemplateComponents, useBioTemplateControls, useBioTemplatePackWorkspace, useBioTemplatePresetWorkspace, useBioTemplateWorkspace, useChemicalFormula, useCommandHistory, useConcentrationUnits, useControlSchema, useControlWorkspace, useCurrentExperiment, useDebouncedWatch, useDoseCalculator, useEventListener, useExpansionSet, useExperimentData, useExperimentSamples, useExperimentSave, useExperimentSelector, useFileImport, useFocusTrap, useForm, useFormBuilder, useGeneratedAnalysis, useGroupAssignment, useJobsStatusTray, useListSelection, useMenuKeyboard, useMobileSupportGate, useOptimisticMutation, usePasskey, usePlatformContext, usePluginClient, usePluginConfig, usePluginEventStream, usePluginJobCenter, usePluginJobs, usePluginSettings, usePluginWorkspace, usePresenceHeartbeat, useProtocolTemplates, useRackEditor, useReagentSeries, useRequestSyncState, useResourceCrud, useRovingFocus, useRuntimeAlignment, useSampleGroups, useScheduleDrag, useSelectionLimit, useSequenceUtils, useSortedItems, useTemplateCollection, useTextSearch, useTheme, useTimeUtils, useToast, useWellPainting, useWellPlateAdapter, useWellPlateEditor, useWellPlateValidation, validateImportFile, wellIdToCoordinate, wellIdsInRectangle };
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { AccountMenuItem, PageSelectorItemInput, PillNavItemInput, PluginSwitcherInfo, SidebarToolSection, TopBarSettingsConfig, TopBarVariant } from '../types';
|
|
2
|
+
import { FormEnhancements, FormSchema } from '../types/form-builder';
|
|
3
|
+
import { ControlComponentBinding, ControlComponentBindingsById, ControlModel, ControlModelBinding, ControlSchema, ControlWorkspaceOptions } from './useControlSchema';
|
|
4
|
+
import { PluginWorkspaceSidebarVariant } from '../components/PluginWorkspaceView.props';
|
|
5
|
+
/**
|
|
6
|
+
* Scoped-slot payload shared by PluginWorkspaceView's `default`, `topbar`, and `sidebar`
|
|
7
|
+
* slots: the resolved active view plus the values and component bindings/props derived
|
|
8
|
+
* from the compact control schema. WorkspaceControlsInternal renders a component's default
|
|
9
|
+
* slot bound to exactly this shape.
|
|
10
|
+
*/
|
|
11
|
+
export interface PluginWorkspaceControlsModel {
|
|
12
|
+
/** Currently resolved workspace view id. */
|
|
13
|
+
activeView: string;
|
|
14
|
+
/** Sets the active view, updating any uncontrolled state and emitting `update:activeView`. */
|
|
15
|
+
setActiveView: (viewId: string) => void;
|
|
16
|
+
/** Current control values, shared between the auto-rendered sidebar form and the default slot. */
|
|
17
|
+
values: Record<string, unknown>;
|
|
18
|
+
/** Ordered SDK component bindings resolved from the current control values. */
|
|
19
|
+
componentBindings: ControlComponentBinding[];
|
|
20
|
+
/** SDK component bindings resolved from the current control values, keyed by binding id. */
|
|
21
|
+
componentBindingsById: ControlComponentBindingsById;
|
|
22
|
+
/** Flat component props resolved from the current control values. */
|
|
23
|
+
componentProps: Record<string, unknown>;
|
|
24
|
+
/** Named component prop mappings resolved from the current control values. */
|
|
25
|
+
componentPropsById: Record<string, Record<string, unknown>>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Resolved AppLayout + AppTopBar configuration consumed by WorkspaceShellInternal: top bar
|
|
29
|
+
* chrome and navigation, plus the AppLayout layout/collapse props that own the responsive
|
|
30
|
+
* mobile sidebar toggle.
|
|
31
|
+
*/
|
|
32
|
+
export interface PluginWorkspaceShellModel {
|
|
33
|
+
/** AppLayout sidebar position. */
|
|
34
|
+
sidebarPosition: 'left' | 'right';
|
|
35
|
+
/** AppLayout sidebar width, forwarded so the layout can reserve space before AppSidebar mounts. */
|
|
36
|
+
sidebarWidth?: string;
|
|
37
|
+
/** AppLayout floating style. */
|
|
38
|
+
floating: boolean;
|
|
39
|
+
/** Convert the sidebar into an SDK-owned mobile overlay below the AppLayout breakpoint. */
|
|
40
|
+
responsiveSidebar: boolean;
|
|
41
|
+
/** Accessible label for the mobile sidebar toggle. */
|
|
42
|
+
sidebarToggleLabel: string;
|
|
43
|
+
/** Accessible label used when the mobile sidebar is open. */
|
|
44
|
+
sidebarCloseLabel: string;
|
|
45
|
+
/** Whether AppLayout should render a `#sidebar` template at all. */
|
|
46
|
+
hasSidebarSurface: boolean;
|
|
47
|
+
/** App or plugin title shown in the top bar. */
|
|
48
|
+
title: string;
|
|
49
|
+
/** Secondary copy shown under the title. */
|
|
50
|
+
subtitle?: string;
|
|
51
|
+
/** Top bar visual treatment. */
|
|
52
|
+
topBarVariant: TopBarVariant;
|
|
53
|
+
/** Home link used by the top bar brand icon. */
|
|
54
|
+
homePath: string;
|
|
55
|
+
/** Show the default MINT logo when no icon/logo slot is provided. */
|
|
56
|
+
showLogo: boolean;
|
|
57
|
+
/** Preferred route-level page selector entries. */
|
|
58
|
+
pageSelector?: PageSelectorItemInput[];
|
|
59
|
+
/** Resolved active page selector id. */
|
|
60
|
+
currentPageSelectorId: string;
|
|
61
|
+
/** Optional plugin switcher shown in the left navigation position. */
|
|
62
|
+
pluginSwitcher?: PluginSwitcherInfo;
|
|
63
|
+
/** Resolved centered pill navigation, generated from the control schema when omitted. */
|
|
64
|
+
pillNav?: PillNavItemInput[];
|
|
65
|
+
/** Resolved active centered pill id. */
|
|
66
|
+
currentPillId: string;
|
|
67
|
+
/** Show the theme toggle button. */
|
|
68
|
+
showThemeToggle: boolean;
|
|
69
|
+
/** Show the settings button and modal. */
|
|
70
|
+
showSettings: boolean;
|
|
71
|
+
/** Built-in settings modal configuration. */
|
|
72
|
+
settingsConfig?: TopBarSettingsConfig;
|
|
73
|
+
/** Show the standalone badge when not integrated into the platform. */
|
|
74
|
+
showStandaloneLabel: boolean;
|
|
75
|
+
/** Custom standalone badge label. */
|
|
76
|
+
standaloneLabel: string;
|
|
77
|
+
/** Account dropdown entries. */
|
|
78
|
+
accountMenu?: AccountMenuItem[];
|
|
79
|
+
/** Show the notifications icon button. */
|
|
80
|
+
showNotifications: boolean;
|
|
81
|
+
/** Draw a notification dot on the notifications icon. */
|
|
82
|
+
hasNotificationDot: boolean;
|
|
83
|
+
/** Show the admin shortcut. */
|
|
84
|
+
showAdmin: boolean;
|
|
85
|
+
/** Route used by the admin shortcut. */
|
|
86
|
+
adminPath: string;
|
|
87
|
+
/** Account display name. */
|
|
88
|
+
userName?: string;
|
|
89
|
+
/** Explicit account avatar initial. */
|
|
90
|
+
userInitial?: string;
|
|
91
|
+
/** Account email shown in the avatar menu. */
|
|
92
|
+
userEmail?: string;
|
|
93
|
+
/** Names of AppTopBar passthrough slots the caller actually provided. */
|
|
94
|
+
topBarSlotNames: string[];
|
|
95
|
+
/** Scoped-slot payload exposed to the `topbar` override slot. */
|
|
96
|
+
controls: PluginWorkspaceControlsModel;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Resolved AppSidebar configuration consumed by WorkspaceSidebarInternal: sidebar chrome,
|
|
100
|
+
* panels/forms, collapse behavior, and the compact control-schema props that drive
|
|
101
|
+
* AppSidebar's auto-generated form.
|
|
102
|
+
*/
|
|
103
|
+
export interface PluginWorkspaceSidebarModel {
|
|
104
|
+
/** Sidebar chrome title. */
|
|
105
|
+
title?: string;
|
|
106
|
+
/** Sidebar chrome subtitle. */
|
|
107
|
+
subtitle?: string;
|
|
108
|
+
/** Optional compact badge/count rendered in the sidebar header. */
|
|
109
|
+
badge?: string | number;
|
|
110
|
+
/** AppSidebar visual preset. */
|
|
111
|
+
variant: PluginWorkspaceSidebarVariant;
|
|
112
|
+
/** Map of view IDs to sidebar tool sections. */
|
|
113
|
+
panels: Record<string, SidebarToolSection[]>;
|
|
114
|
+
/** Resolved active view, used to pick which panels/forms render. */
|
|
115
|
+
activeView: string;
|
|
116
|
+
/** AppSidebar floating style (always false: PluginWorkspaceView docks the sidebar inside AppLayout). */
|
|
117
|
+
floating: boolean;
|
|
118
|
+
/** Compact AppSidebar density. */
|
|
119
|
+
dense: boolean;
|
|
120
|
+
/** Sidebar CSS width. */
|
|
121
|
+
width?: string;
|
|
122
|
+
/** Sidebar position, mirrors the shell's `sidebarPosition`. */
|
|
123
|
+
side: 'left' | 'right';
|
|
124
|
+
/** Optional FormBuilder schemas keyed by section ID. */
|
|
125
|
+
forms: Record<string, FormSchema>;
|
|
126
|
+
/** DOM id for the AppSidebar scrollable content area. */
|
|
127
|
+
contentId?: string;
|
|
128
|
+
/** Render the sidebar shell even when no panel matches the active view. */
|
|
129
|
+
showWhenEmpty: boolean;
|
|
130
|
+
/** Optional compact control model for the generated sidebar form. */
|
|
131
|
+
model?: ControlModel | ControlModelBinding;
|
|
132
|
+
/** Compact control schema for the generated sidebar form. */
|
|
133
|
+
controlSchema?: ControlSchema;
|
|
134
|
+
/** Options passed to compact control schema generation. */
|
|
135
|
+
controlOptions: ControlWorkspaceOptions;
|
|
136
|
+
/** Shared values for the auto-rendered sidebar form. */
|
|
137
|
+
values: Record<string, unknown>;
|
|
138
|
+
/** Runtime FormBuilder enhancements for the auto-rendered sidebar form. */
|
|
139
|
+
formEnhancements?: FormEnhancements<Record<string, unknown>>;
|
|
140
|
+
/** Show submit/cancel actions inside the auto-rendered sidebar form. */
|
|
141
|
+
showFormActions: boolean;
|
|
142
|
+
/** Loading/saving state for the auto-rendered sidebar form. */
|
|
143
|
+
formLoading: boolean;
|
|
144
|
+
/** Disabled state for the auto-rendered sidebar form. */
|
|
145
|
+
formDisabled: boolean;
|
|
146
|
+
/** Readonly state for the auto-rendered sidebar form. */
|
|
147
|
+
formReadonly: boolean;
|
|
148
|
+
/** Size passed to the auto-rendered sidebar form. */
|
|
149
|
+
formSize: 'sm' | 'md' | 'lg';
|
|
150
|
+
/** Show a built-in collapse/expand button in the sidebar chrome. */
|
|
151
|
+
collapsible?: boolean;
|
|
152
|
+
/** Controlled sidebar collapsed state. */
|
|
153
|
+
collapsed?: boolean;
|
|
154
|
+
/** Initial sidebar collapsed state when uncontrolled. */
|
|
155
|
+
defaultCollapsed: boolean;
|
|
156
|
+
/** Sidebar width when collapsed. */
|
|
157
|
+
collapsedWidth: string;
|
|
158
|
+
/** Accessible label for the sidebar collapse action. */
|
|
159
|
+
collapseButtonLabel: string;
|
|
160
|
+
/** Accessible label for the sidebar expand action. */
|
|
161
|
+
expandButtonLabel: string;
|
|
162
|
+
/** Names of AppSidebar passthrough slots the caller actually provided. */
|
|
163
|
+
slotNames: string[];
|
|
164
|
+
}
|
|
@@ -100,7 +100,11 @@ export interface UseAsyncOptions<T> {
|
|
|
100
100
|
* const handleSubmit = () => submit(new FormData(formRef.value))
|
|
101
101
|
* ```
|
|
102
102
|
*/
|
|
103
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* Wraps an async function with reactive loading, error, and success state plus optional auto-execute.
|
|
105
|
+
*
|
|
106
|
+
* @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `useRequestSyncState()` instead.
|
|
107
|
+
*/
|
|
104
108
|
export declare function useAsync<T>(asyncFn: (...args: unknown[]) => Promise<T>, options?: UseAsyncOptions<T>): UseAsyncReturn<T>;
|
|
105
109
|
/**
|
|
106
110
|
* Create a batch of async operations that can be executed in parallel.
|
|
@@ -1,28 +1,21 @@
|
|
|
1
1
|
import { BioTemplateEnvelope, TemplateCollectionEnvelope } from '../templates';
|
|
2
2
|
import { ControlWorkspaceFormBinding, ControlWorkspaceOptions, ControlWorkspacePillNavBinding, ControlWorkspaceSidebarBinding, ControlWorkspaceTopBarSettingsBinding, UseControlSchemaReturn, UseControlWorkspaceReturn } from './controlSchemaTypes';
|
|
3
3
|
import { BioTemplateControlSchema, BioTemplateControlTarget } from './useBioTemplateControls';
|
|
4
|
-
import {
|
|
4
|
+
import { UseBioTemplateComponentsReturn } from './useBioTemplateComponents';
|
|
5
|
+
import { BioTemplateWorkspaceComponentBindings } from './flattenWorkspaceBindings';
|
|
5
6
|
export type BioTemplateWorkspaceTarget = BioTemplateControlTarget;
|
|
6
7
|
export interface BioTemplateRendererBinding {
|
|
7
8
|
target: BioTemplateEnvelope<unknown> | TemplateCollectionEnvelope;
|
|
8
9
|
}
|
|
9
|
-
export interface BioTemplateWorkspaceBindings {
|
|
10
|
+
export interface BioTemplateWorkspaceBindings extends BioTemplateWorkspaceComponentBindings {
|
|
10
11
|
renderer: BioTemplateRendererBinding | null;
|
|
11
12
|
form: ControlWorkspaceFormBinding;
|
|
12
13
|
sidebar: ControlWorkspaceSidebarBinding;
|
|
13
14
|
topBar: UseControlWorkspaceReturn<BioTemplateControlSchema>['bindings']['topBar'];
|
|
14
15
|
topBarSettings: ControlWorkspaceTopBarSettingsBinding;
|
|
15
16
|
pillNav: ControlWorkspacePillNavBinding;
|
|
16
|
-
componentBindings: BioTemplateComponentBinding[];
|
|
17
|
-
componentBindingsById: BioTemplateComponentBindingsById;
|
|
18
|
-
componentProps: BioTemplateComponentPropsBinding[];
|
|
19
|
-
componentPropsById: BioTemplateComponentPropsById;
|
|
20
|
-
componentPropsByComponent: BioTemplateComponentPropsByComponent;
|
|
21
|
-
componentSnippets: BioTemplateComponentSnippet[];
|
|
22
|
-
componentUsage: BioTemplateComponentUsage | null;
|
|
23
|
-
getComponentProps: UseBioTemplateComponentsReturn['getComponentProps'];
|
|
24
17
|
}
|
|
25
|
-
export interface UseBioTemplateWorkspaceReturn {
|
|
18
|
+
export interface UseBioTemplateWorkspaceReturn extends BioTemplateWorkspaceComponentBindings {
|
|
26
19
|
target: BioTemplateWorkspaceTarget;
|
|
27
20
|
controls: UseControlSchemaReturn<BioTemplateControlSchema>;
|
|
28
21
|
workspace: UseControlWorkspaceReturn<BioTemplateControlSchema>;
|
|
@@ -37,15 +30,6 @@ export interface UseBioTemplateWorkspaceReturn {
|
|
|
37
30
|
topBarSettings: ControlWorkspaceTopBarSettingsBinding;
|
|
38
31
|
bindings: BioTemplateWorkspaceBindings;
|
|
39
32
|
renderer: BioTemplateRendererBinding | null;
|
|
40
|
-
componentBindings: BioTemplateComponentBinding[];
|
|
41
|
-
componentBindingsById: BioTemplateComponentBindingsById;
|
|
42
|
-
componentImports: BioTemplateComponentImport[];
|
|
43
|
-
componentProps: BioTemplateComponentPropsBinding[];
|
|
44
|
-
componentPropsById: BioTemplateComponentPropsById;
|
|
45
|
-
componentPropsByComponent: BioTemplateComponentPropsByComponent;
|
|
46
|
-
componentSnippets: BioTemplateComponentSnippet[];
|
|
47
|
-
componentUsage: BioTemplateComponentUsage | null;
|
|
48
|
-
getComponentProps: UseBioTemplateComponentsReturn['getComponentProps'];
|
|
49
33
|
}
|
|
50
34
|
/** One-stop wiring for BioTemplateRenderer, FormBuilder, AppSidebar, and template-aware SDK components. */
|
|
51
35
|
export declare function useBioTemplateWorkspace(target: BioTemplateWorkspaceTarget, options?: ControlWorkspaceOptions): UseBioTemplateWorkspaceReturn;
|
|
@@ -25,5 +25,9 @@ export interface UseCommandHistoryReturn<TCommand extends CommandHistoryCommand
|
|
|
25
25
|
redo: () => CommandHistoryResult;
|
|
26
26
|
clear: () => void;
|
|
27
27
|
}
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Generic command-stack state for plugin editors with undo/redo controls.
|
|
30
|
+
*
|
|
31
|
+
* @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; keep command stacks plugin-local.
|
|
32
|
+
*/
|
|
29
33
|
export declare function useCommandHistory<TCommand extends CommandHistoryCommand = CommandHistoryCommand>(options?: UseCommandHistoryOptions): UseCommandHistoryReturn<TCommand>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
export interface UseFocusTrapOptions {
|
|
3
|
+
/** Ref to the trap's container element. Focusable elements are queried within it. */
|
|
4
|
+
containerRef: Ref<HTMLElement | null>;
|
|
5
|
+
/** Reactive flag — the trap activates when this becomes `true` and releases when it becomes `false`. */
|
|
6
|
+
active: Ref<boolean>;
|
|
7
|
+
/** Restore focus to the element that was focused before activation, when the trap releases. Default `true`. */
|
|
8
|
+
restoreFocus?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface UseFocusTrapReturn {
|
|
11
|
+
/** Focusable descendants of the container, in DOM order, excluding roving-tabindex (`tabindex="-1"`) elements. */
|
|
12
|
+
getFocusableElements: () => HTMLElement[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Traps Tab focus within a container while `active` is true: Tab wraps from the last
|
|
16
|
+
* focusable element back to the first (and Shift+Tab from the first to the last), the
|
|
17
|
+
* first focusable element (or the container itself, if none) receives focus when the
|
|
18
|
+
* trap activates, and focus returns to whatever was focused beforehand when it releases.
|
|
19
|
+
* Used by BaseModal and WellEditPopupInternal.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useFocusTrap(options: UseFocusTrapOptions): UseFocusTrapReturn;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface UseMenuKeyboardOptions {
|
|
2
|
+
/** Returns the currently navigable items inside the open panel, in DOM order. */
|
|
3
|
+
items: () => HTMLElement[];
|
|
4
|
+
/** True while the panel is open. */
|
|
5
|
+
isOpen: () => boolean;
|
|
6
|
+
/** Opens the panel. */
|
|
7
|
+
open: () => void;
|
|
8
|
+
/** Closes the panel. When `returnFocus` is true, focus should return to the trigger. */
|
|
9
|
+
close: (returnFocus?: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
export interface UseMenuKeyboardReturn {
|
|
12
|
+
/**
|
|
13
|
+
* Bind to the trigger's `@keydown`. ArrowDown/Enter/Space open the panel (when
|
|
14
|
+
* closed) and focus its first item; ArrowUp opens it focused on the last item.
|
|
15
|
+
*/
|
|
16
|
+
handleTriggerKeydown: (event: KeyboardEvent) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Bind to the open panel's `@keydown`. ArrowUp/ArrowDown cycle focus with
|
|
19
|
+
* wraparound, Home/End jump to the first/last item, Escape closes and returns
|
|
20
|
+
* focus to the trigger, and Tab closes without moving focus.
|
|
21
|
+
*/
|
|
22
|
+
handlePanelKeydown: (event: KeyboardEvent) => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Shared keyboard contract for menu- and listbox-style disclosure panels (the
|
|
26
|
+
* WAI-ARIA menu button pattern). Used by AppAvatarMenu and DropdownButton; ActionMenu
|
|
27
|
+
* implements the same contract inline.
|
|
28
|
+
*/
|
|
29
|
+
export declare function useMenuKeyboard(options: UseMenuKeyboardOptions): UseMenuKeyboardReturn;
|
|
@@ -24,5 +24,9 @@ export interface UseOptimisticMutationReturn<TVariables, TData, TSnapshot = unkn
|
|
|
24
24
|
clearError: () => void;
|
|
25
25
|
reset: () => void;
|
|
26
26
|
}
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Run async mutations with optional optimistic local updates and rollback.
|
|
29
|
+
*
|
|
30
|
+
* @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `useRequestSyncState()` instead.
|
|
31
|
+
*/
|
|
28
32
|
export declare function useOptimisticMutation<TVariables, TData, TSnapshot = unknown>(options: UseOptimisticMutationOptions<TVariables, TData, TSnapshot>): UseOptimisticMutationReturn<TVariables, TData, TSnapshot>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { PageSelectorItem, PillNavItem } from '../types';
|
|
3
|
+
import { PluginWorkspaceViewEmit, PluginWorkspaceViewProps } from '../components/PluginWorkspaceView.props';
|
|
4
|
+
import { PluginWorkspaceControlsModel, PluginWorkspaceShellModel, PluginWorkspaceSidebarModel } from './pluginWorkspaceModel';
|
|
5
|
+
/**
|
|
6
|
+
* Loosely-typed view of a component's `useSlots()` result: only slot presence and names are
|
|
7
|
+
* read here, so this accepts any `defineSlots()` shape without fighting Vue's `Slot` render
|
|
8
|
+
* function type. Mirrors the `SlotKeyMap` helper type in PluginWorkspaceView.shell.ts.
|
|
9
|
+
*/
|
|
10
|
+
export type PluginWorkspaceSlotsLike = Readonly<Record<string, unknown>>;
|
|
11
|
+
export interface UsePluginWorkspaceOptions {
|
|
12
|
+
/** PluginWorkspaceView's own reactive props object (from `defineProps`). */
|
|
13
|
+
props: PluginWorkspaceViewProps;
|
|
14
|
+
/** PluginWorkspaceView's own slots (from `useSlots()`), used to detect provided passthrough slots. */
|
|
15
|
+
slots: PluginWorkspaceSlotsLike;
|
|
16
|
+
/** PluginWorkspaceView's own typed `emit` function (from `defineEmits<PluginWorkspaceViewEmits>()`). */
|
|
17
|
+
emit: PluginWorkspaceViewEmit;
|
|
18
|
+
}
|
|
19
|
+
export interface UsePluginWorkspaceReturn {
|
|
20
|
+
/** Model consumed by WorkspaceShellInternal's `shell` prop. */
|
|
21
|
+
shell: ComputedRef<PluginWorkspaceShellModel>;
|
|
22
|
+
/** Model consumed by WorkspaceSidebarInternal's `sidebar` prop. */
|
|
23
|
+
sidebar: ComputedRef<PluginWorkspaceSidebarModel>;
|
|
24
|
+
/** Model consumed by WorkspaceControlsInternal's `controls` prop, and by the raw `default` slot. */
|
|
25
|
+
controls: ComputedRef<PluginWorkspaceControlsModel>;
|
|
26
|
+
/** Whether AppLayout should render a sidebar surface at all. */
|
|
27
|
+
hasSidebarSurface: ComputedRef<boolean>;
|
|
28
|
+
/** Applies an AppSidebar `update:model-value` payload to the shared control values and emits `update:modelValue`/`update:values`. */
|
|
29
|
+
handleControlValuesUpdate: (values: Record<string, unknown>) => void;
|
|
30
|
+
/** Resolves an AppTopBar `page-selector-select` payload into the active view and emits `page-selector-select`. */
|
|
31
|
+
handlePageSelectorSelect: (page: PageSelectorItem) => void;
|
|
32
|
+
/** Resolves an AppTopBar `pill-select` payload into the active view and emits `pill-select`. */
|
|
33
|
+
handlePillSelect: (item: PillNavItem) => void;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Maps PluginWorkspaceView's flat 72-prop surface into the three typed model objects
|
|
37
|
+
* (`shell`, `sidebar`, `controls`) rendered by its internal pieces
|
|
38
|
+
* (WorkspaceShellInternal, WorkspaceSidebarInternal, WorkspaceControlsInternal). Reuses the
|
|
39
|
+
* existing `usePluginWorkspaceControls` / `usePluginWorkspaceNavigation` composables and the
|
|
40
|
+
* PluginWorkspaceView.shell slot-detection helpers, so it changes only how that state is
|
|
41
|
+
* assembled and exposed, not the underlying behavior.
|
|
42
|
+
*
|
|
43
|
+
* @example Recommended
|
|
44
|
+
* ```ts
|
|
45
|
+
* const props = withDefaults(defineProps<PluginWorkspaceViewProps>(), { ... })
|
|
46
|
+
* const emit = defineEmits<PluginWorkspaceViewEmits>()
|
|
47
|
+
* const slots = useSlots()
|
|
48
|
+
* const { shell, sidebar, controls } = usePluginWorkspace({ props, slots, emit })
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export declare function usePluginWorkspace(options: UsePluginWorkspaceOptions): UsePluginWorkspaceReturn;
|
|
@@ -28,7 +28,11 @@ export interface UseResourceCrudReturn<TItem, TCreate, TUpdate, TKey extends Res
|
|
|
28
28
|
removeLocal: (keyOrItem: TKey | TItem) => void;
|
|
29
29
|
clearError: () => void;
|
|
30
30
|
}
|
|
31
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Common list/create/update/delete state wrapper for generated plugin clients.
|
|
33
|
+
*
|
|
34
|
+
* @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `useGeneratedPluginClient()` instead.
|
|
35
|
+
*/
|
|
32
36
|
export declare function useResourceCrud<TItem, TCreate = Partial<TItem>, TUpdate = Partial<TItem>, TKey extends ResourceKey = ResourceKey>(options: UseResourceCrudOptions<TItem, TCreate, TUpdate, TKey>): UseResourceCrudReturn<TItem, TCreate, TUpdate, TKey>;
|
|
33
37
|
export interface PluginResourceClientOptions<TClient, TItem, TCreate = Partial<TItem>, TUpdate = Partial<TItem>, TKey extends ResourceKey = ResourceKey> {
|
|
34
38
|
client: TClient;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface UseRovingFocusOptions {
|
|
2
|
+
/** Selectable item ids, in DOM order. Already excludes items skipped entirely (e.g. disabled tabs). */
|
|
3
|
+
ids: () => string[];
|
|
4
|
+
/** The id that is currently active/selected. */
|
|
5
|
+
activeId: () => string | undefined;
|
|
6
|
+
/** Activates an id (e.g. emit `update:modelValue`). The composable focuses the matching element afterward. */
|
|
7
|
+
activate: (id: string) => void;
|
|
8
|
+
/** Returns the focusable element for an id, queried lazily so it reflects the post-activation DOM. */
|
|
9
|
+
getElement: (id: string) => HTMLElement | null | undefined;
|
|
10
|
+
/** Arrow-key axis: `'horizontal'` (Left/Right, default) or `'vertical'` (Up/Down). */
|
|
11
|
+
orientation?: 'horizontal' | 'vertical';
|
|
12
|
+
}
|
|
13
|
+
export interface UseRovingFocusReturn {
|
|
14
|
+
/** Bind to each item's `@keydown`. */
|
|
15
|
+
handleKeydown: (event: KeyboardEvent) => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* WAI-ARIA roving-tabindex navigation with automatic activation (the tabs pattern):
|
|
19
|
+
* Left/Right (or Up/Down when `orientation` is `'vertical'`) move to the adjacent item
|
|
20
|
+
* and activate it immediately, wrapping past the ends; Home/End jump to the first/last
|
|
21
|
+
* item. Only the active item should carry `tabindex="0"`; give every other item
|
|
22
|
+
* `tabindex="-1"`. Used by BaseTabs.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useRovingFocus(options: UseRovingFocusOptions): UseRovingFocusReturn;
|
|
@@ -28,7 +28,11 @@ export interface UseWellPaintingReturn<TMode extends string = string, TPayload =
|
|
|
28
28
|
onWellMouseUp: () => void;
|
|
29
29
|
cancel: () => void;
|
|
30
30
|
}
|
|
31
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Pointer painting/rectangle selection state for WellPlate-based editors.
|
|
33
|
+
*
|
|
34
|
+
* @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `useWellPlateEditor()` instead.
|
|
35
|
+
*/
|
|
32
36
|
export declare function useWellPainting<TMode extends string = string, TPayload = unknown>(options: UseWellPaintingOptions<TMode, TPayload>): UseWellPaintingReturn<TMode, TPayload>;
|
|
33
37
|
export declare function wellIdToCoordinate(wellId: string): WellCoordinate | null;
|
|
34
38
|
export declare function coordinateToWellId(coord: WellCoordinate): string;
|
|
@@ -19,7 +19,11 @@ export interface WellPlateAdapterOptions<TEntry> {
|
|
|
19
19
|
export interface UseWellPlateAdapterReturn {
|
|
20
20
|
wells: ComputedRef<Record<string, Partial<Well>>>;
|
|
21
21
|
}
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Convert domain rows into WellPlate's wells prop without hand-written adapters.
|
|
24
|
+
*
|
|
25
|
+
* @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `useWellPlateEditor()` instead.
|
|
26
|
+
*/
|
|
23
27
|
export declare function useWellPlateAdapter<TEntry>(options: WellPlateAdapterOptions<TEntry>): UseWellPlateAdapterReturn;
|
|
24
28
|
export declare function createWellPlateWells<TEntry>(entries: readonly TEntry[], options: Omit<WellPlateAdapterOptions<TEntry>, 'entries'>): Record<string, Partial<Well>>;
|
|
25
29
|
export interface AxisConditionEntry {
|
|
@@ -22,6 +22,10 @@ export interface UseWellPlateValidationReturn<TType extends string = string> {
|
|
|
22
22
|
warningCount: ComputedRef<number>;
|
|
23
23
|
errorCount: ComputedRef<number>;
|
|
24
24
|
}
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Rule-driven validation state for WellPlate layout/design screens.
|
|
27
|
+
*
|
|
28
|
+
* @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `useWellPlateEditor()` instead.
|
|
29
|
+
*/
|
|
26
30
|
export declare function useWellPlateValidation<TContext, TType extends string = string>(options: UseWellPlateValidationOptions<TContext, TType>): UseWellPlateValidationReturn<TType>;
|
|
27
31
|
export declare function runWellPlateValidation<TContext, TType extends string = string>(context: TContext, rules: readonly WellPlateValidationRule<TContext, TType>[]): WellPlateValidationWarning<TType>[];
|