@morscherlab/mint-sdk 1.2.0-beta.1 → 1.2.0-beta.10

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 (408) hide show
  1. package/README.md +35 -5
  2. package/dist/{ExperimentPopover-tLwJ7XF4.js → ExperimentPopover-oL0fg_A0.js} +6 -4
  3. package/dist/ExperimentPopover-oL0fg_A0.js.map +1 -0
  4. package/dist/{ExperimentSelectorModal-DyPAUCLw.js → ExperimentSelectorModal-BeEOomw_.js} +5 -5
  5. package/dist/ExperimentSelectorModal-BeEOomw_.js.map +1 -0
  6. package/dist/{SettingsModal-BgKY93zh.js → SettingsModal-Dphh3RrI.js} +5 -8
  7. package/dist/SettingsModal-Dphh3RrI.js.map +1 -0
  8. package/dist/{EmptyState-p90quq8Z.js → Skeleton-DxtwJ5gt.js} +111 -93
  9. package/dist/Skeleton-DxtwJ5gt.js.map +1 -0
  10. package/dist/__tests__/components/ExperimentTimeline.test.d.ts +1 -0
  11. package/dist/__tests__/components/PluginWorkspaceView.internal.test.d.ts +1 -0
  12. package/dist/__tests__/components/SecretInput.test.d.ts +1 -0
  13. package/dist/__tests__/components/WellEditPopupInternal.test.d.ts +1 -0
  14. package/dist/__tests__/composables/useListReorder.test.d.ts +1 -0
  15. package/dist/__tests__/composables/usePluginConfig.test.d.ts +15 -0
  16. package/dist/__tests__/styles/cssTokens.test.d.ts +1 -0
  17. package/dist/components/ActionMenu.vue.d.ts +1 -1
  18. package/dist/components/AppAvatarMenu.vue.d.ts +4 -0
  19. package/dist/components/AppPluginSwitcher.vue.d.ts +2 -0
  20. package/dist/components/AppSidebar.vue.d.ts +1 -1
  21. package/dist/components/AuditTrail.vue.d.ts +13 -0
  22. package/dist/components/AutoGroupModal.vue.d.ts +1 -1
  23. package/dist/components/BatchProgressList.vue.d.ts +17 -0
  24. package/dist/components/BioTemplateExperimentWorkspaceView.vue.d.ts +2 -2
  25. package/dist/components/DataFrame.vue.d.ts +14 -2
  26. package/dist/components/DatePicker.vue.d.ts +1 -1
  27. package/dist/components/DateTimePicker.vue.d.ts +2 -0
  28. package/dist/components/DropdownButton.vue.d.ts +2 -0
  29. package/dist/components/ExperimentDataViewer.vue.d.ts +26 -1
  30. package/dist/components/ExperimentPopover.vue.d.ts +1 -0
  31. package/dist/components/ExperimentTimeline.vue.d.ts +29 -1
  32. package/dist/components/FitPanel.vue.d.ts +1 -1
  33. package/dist/components/JobsStatusTray.vue.d.ts +9 -2
  34. package/dist/components/LcmsSequenceTable.vue.d.ts +29 -1
  35. package/dist/components/PluginWorkspaceView.props.d.ts +29 -1
  36. package/dist/components/PluginWorkspaceView.vue.d.ts +5 -5
  37. package/dist/components/ProgressBar.vue.d.ts +1 -1
  38. package/dist/components/ProtocolStepEditor.vue.d.ts +1 -0
  39. package/dist/components/ReagentList.vue.d.ts +29 -1
  40. package/dist/components/SampleHierarchyTree.vue.d.ts +29 -1
  41. package/dist/components/SampleLegend.vue.d.ts +1 -1
  42. package/dist/components/SampleSelector.drag.d.ts +13 -0
  43. package/dist/components/SampleSelector.tree.d.ts +2 -0
  44. package/dist/components/SampleSelector.vue.d.ts +35 -2
  45. package/dist/components/ScheduleCalendar.vue.d.ts +20 -0
  46. package/dist/components/SecretInput.vue.d.ts +28 -0
  47. package/dist/components/SettingsModal.vue.d.ts +1 -1
  48. package/dist/components/SmartGroupFieldRecipe.vue.d.ts +2 -1
  49. package/dist/components/TimePicker.vue.d.ts +1 -0
  50. package/dist/components/WellPlate.geometry.d.ts +15 -0
  51. package/dist/components/WellPlate.interaction.d.ts +13 -0
  52. package/dist/components/WellPlate.vue.d.ts +29 -0
  53. package/dist/components/index.d.ts +9 -0
  54. package/dist/components/index.js +8 -8
  55. package/dist/components/internal/AppTopBarPageSelectorInternal.vue.d.ts +2 -0
  56. package/dist/components/internal/DataStateInternal.vue.d.ts +43 -0
  57. package/dist/components/internal/WellEditPopupInternal.vue.d.ts +3 -1
  58. package/dist/components/internal/WorkspaceControlsInternal.vue.d.ts +23 -0
  59. package/dist/components/internal/WorkspaceShellInternal.vue.d.ts +70 -0
  60. package/dist/components/internal/WorkspaceSidebarInternal.vue.d.ts +43 -0
  61. package/dist/{components-DkHddRMl.js → components-CgAUzF8F.js} +2497 -2235
  62. package/dist/components-CgAUzF8F.js.map +1 -0
  63. package/dist/composables/controlSchemaTypes.d.ts +34 -0
  64. package/dist/composables/flattenWorkspaceBindings.d.ts +61 -0
  65. package/dist/composables/index.d.ts +9 -2
  66. package/dist/composables/index.js +10 -10
  67. package/dist/composables/pluginWorkspaceModel.d.ts +164 -0
  68. package/dist/composables/useAsync.d.ts +5 -1
  69. package/dist/composables/useBioTemplateWorkspace.d.ts +4 -20
  70. package/dist/composables/useCommandHistory.d.ts +5 -1
  71. package/dist/composables/useDropdownState.d.ts +18 -2
  72. package/dist/composables/useEventStream.d.ts +9 -0
  73. package/dist/composables/useFocusTrap.d.ts +21 -0
  74. package/dist/composables/useGeneratedAnalysis.d.ts +3 -1
  75. package/dist/composables/useJobsStatusTray.d.ts +25 -1
  76. package/dist/composables/useListReorder.d.ts +90 -0
  77. package/dist/composables/useMenuKeyboard.d.ts +29 -0
  78. package/dist/composables/useOptimisticMutation.d.ts +5 -1
  79. package/dist/composables/usePluginClient.d.ts +2 -0
  80. package/dist/composables/usePluginConfig.d.ts +27 -0
  81. package/dist/composables/usePluginWorkspace.d.ts +51 -0
  82. package/dist/composables/useRequestSyncState.d.ts +42 -2
  83. package/dist/composables/useResourceCrud.d.ts +5 -1
  84. package/dist/composables/useRovingFocus.d.ts +24 -0
  85. package/dist/composables/useScheduleDrag.d.ts +1 -0
  86. package/dist/composables/useWellPainting.d.ts +5 -1
  87. package/dist/composables/useWellPlateAdapter.d.ts +5 -1
  88. package/dist/composables/useWellPlateValidation.d.ts +5 -1
  89. package/dist/composables/workspaceRecipes.d.ts +188 -0
  90. package/dist/{composables-C_i90sGS.js → composables-B_pia3hO.js} +209 -82
  91. package/dist/composables-B_pia3hO.js.map +1 -0
  92. package/dist/{useApi-J6zFkHmn.js → errors-_W0-LbA6.js} +103 -3
  93. package/dist/errors-_W0-LbA6.js.map +1 -0
  94. package/dist/{experiment-Cq145oEW.js → experiment-Cwl9AYxw.js} +3 -8
  95. package/dist/experiment-Cwl9AYxw.js.map +1 -0
  96. package/dist/{experiment-utils-CLnzPPq5.js → experiment-utils-DV3DrvE_.js} +70 -51
  97. package/dist/experiment-utils-DV3DrvE_.js.map +1 -0
  98. package/dist/index.d.ts +1 -0
  99. package/dist/index.js +15 -15
  100. package/dist/install.js +2 -7
  101. package/dist/install.js.map +1 -1
  102. package/dist/permissions.d.ts +42 -1
  103. package/dist/permissions.js +20 -10
  104. package/dist/permissions.js.map +1 -1
  105. package/dist/stores/auth.d.ts +6 -0
  106. package/dist/stores/index.d.ts +1 -1
  107. package/dist/stores/index.js +3 -3
  108. package/dist/stores/settings.d.ts +31 -1
  109. package/dist/styles.css +11247 -29501
  110. package/dist/templates/builderReadUtils.d.ts +1 -1
  111. package/dist/templates/index.js +2 -4
  112. package/dist/{templates-DsP51i-S.js → templates-Qq113pyZ.js} +303 -106
  113. package/dist/templates-Qq113pyZ.js.map +1 -0
  114. package/dist/types/auth.d.ts +1 -0
  115. package/dist/types/form-builder.d.ts +1 -1
  116. package/dist/{useControlSchema-BDx2Olha.js → useControlSchema-aMZlb4Sc.js} +462 -1130
  117. package/dist/useControlSchema-aMZlb4Sc.js.map +1 -0
  118. package/dist/{useDropdownState-DSb3BC3N.js → useDropdownState-DitCtrTT.js} +22 -6
  119. package/dist/useDropdownState-DitCtrTT.js.map +1 -0
  120. package/dist/{useExperimentSelector-CV4iNfMS.js → useExperimentSelector-I8HC8hUu.js} +4 -4
  121. package/dist/{useExperimentSelector-CV4iNfMS.js.map → useExperimentSelector-I8HC8hUu.js.map} +1 -1
  122. package/dist/{useFormBuilder-BLxG3BOX.js → useFormBuilder-TCxNnqeb.js} +2 -2
  123. package/dist/{useFormBuilder-BLxG3BOX.js.map → useFormBuilder-TCxNnqeb.js.map} +1 -1
  124. package/dist/{useProtocolTemplates-CS_SQl6U.js → useProtocolTemplates-BmX_iVBR.js} +766 -212
  125. package/dist/useProtocolTemplates-BmX_iVBR.js.map +1 -0
  126. package/dist/utils/color.d.ts +13 -0
  127. package/dist/utils/errors.d.ts +9 -0
  128. package/dist/utils/pluginSecrets.d.ts +53 -0
  129. package/dist/utils/records.d.ts +4 -0
  130. package/package.json +1 -1
  131. package/src/__tests__/components/ActionMenu.test.ts +94 -0
  132. package/src/__tests__/components/AppAvatarMenu.test.ts +123 -0
  133. package/src/__tests__/components/BaseTabs.test.ts +67 -0
  134. package/src/__tests__/components/DataFrame.test.ts +183 -11
  135. package/src/__tests__/components/DataStates.test.ts +176 -0
  136. package/src/__tests__/components/DatePicker.test.ts +76 -0
  137. package/src/__tests__/components/DateTimePicker.test.ts +36 -0
  138. package/src/__tests__/components/DropdownButton.test.ts +134 -0
  139. package/src/__tests__/components/ExperimentTimeline.test.ts +63 -0
  140. package/src/__tests__/components/GroupAssigner.test.ts +53 -0
  141. package/src/__tests__/components/LcmsSequenceTable.test.ts +22 -0
  142. package/src/__tests__/components/PluginWorkspaceView.internal.test.ts +230 -0
  143. package/src/__tests__/components/RackEditor.test.ts +35 -0
  144. package/src/__tests__/components/ReagentList.test.ts +64 -2
  145. package/src/__tests__/components/RetiredStyles.test.ts +31 -0
  146. package/src/__tests__/components/SampleSelector.drag.test.ts +51 -1
  147. package/src/__tests__/components/ScheduleCalendar.test.ts +63 -0
  148. package/src/__tests__/components/SecretInput.test.ts +87 -0
  149. package/src/__tests__/components/SegmentedControl.test.ts +88 -0
  150. package/src/__tests__/components/TimePicker.test.ts +61 -0
  151. package/src/__tests__/components/WellEditPopupInternal.test.ts +108 -0
  152. package/src/__tests__/components/WellPlate.interaction.test.ts +59 -0
  153. package/src/__tests__/composables/useAuth.test.ts +2 -0
  154. package/src/__tests__/composables/useDropdownState.test.ts +58 -1
  155. package/src/__tests__/composables/useListReorder.test.ts +145 -0
  156. package/src/__tests__/composables/usePluginClient.test.ts +140 -0
  157. package/src/__tests__/composables/usePluginConfig.test.ts +497 -0
  158. package/src/__tests__/composables/useRequestSyncState.test.ts +140 -0
  159. package/src/__tests__/docs/frontendDocsCatalog.test.ts +39 -7
  160. package/src/__tests__/stores/settings.test.ts +71 -1
  161. package/src/__tests__/styles/cssTokens.test.ts +131 -0
  162. package/src/__tests__/utils/permissions.test.ts +68 -0
  163. package/src/components/ActionMenu.vue +45 -88
  164. package/src/components/AlertBox.vue +0 -4
  165. package/src/components/AppAvatarMenu.vue +26 -7
  166. package/src/components/AppLayout.vue +0 -4
  167. package/src/components/AppPluginSwitcher.story.vue +87 -0
  168. package/src/components/AppPluginSwitcher.vue +2 -5
  169. package/src/components/AppSidebar.vue +0 -4
  170. package/src/components/AppToastContainer.vue +6 -8
  171. package/src/components/AppTopBar.vue +0 -4
  172. package/src/components/ArtifactSaveDialog.vue +0 -4
  173. package/src/components/ArtifactSelectorModal.vue +0 -4
  174. package/src/components/AuditTrail.story.vue +18 -0
  175. package/src/components/AuditTrail.vue +27 -7
  176. package/src/components/AutoGroupModal.vue +0 -4
  177. package/src/components/Avatar.vue +0 -4
  178. package/src/components/BaseButton.vue +0 -4
  179. package/src/components/BaseCheckbox.vue +0 -4
  180. package/src/components/BaseInput.vue +0 -4
  181. package/src/components/BaseModal.vue +8 -60
  182. package/src/components/BasePill.vue +0 -4
  183. package/src/components/BaseRadioGroup.vue +0 -4
  184. package/src/components/BaseSelect.vue +0 -4
  185. package/src/components/BaseSlider.vue +0 -4
  186. package/src/components/BaseTabs.vue +26 -5
  187. package/src/components/BaseTextarea.vue +0 -4
  188. package/src/components/BaseToggle.vue +0 -4
  189. package/src/components/BatchProgressList.story.vue +18 -0
  190. package/src/components/BatchProgressList.vue +32 -4
  191. package/src/components/BioTemplateExperimentWorkspaceView.vue +10 -21
  192. package/src/components/BioTemplatePackWorkspaceView.vue +11 -15
  193. package/src/components/BioTemplatePresetWorkspaceView.vue +8 -13
  194. package/src/components/Breadcrumb.vue +0 -4
  195. package/src/components/Calendar.vue +0 -4
  196. package/src/components/ChartContainer.story.vue +1 -1
  197. package/src/components/ChartContainer.vue +0 -4
  198. package/src/components/ChemicalFormula.vue +0 -4
  199. package/src/components/CollapsibleCard.vue +0 -4
  200. package/src/components/ColorSlider.vue +0 -4
  201. package/src/components/ComponentBindingRenderer.vue +1 -3
  202. package/src/components/ConcentrationInput.vue +0 -4
  203. package/src/components/ConfirmDialog.vue +0 -4
  204. package/src/components/ControlWorkspaceView.vue +11 -22
  205. package/src/components/DataFrame.story.vue +14 -0
  206. package/src/components/DataFrame.vue +97 -23
  207. package/src/components/DatePicker.vue +73 -27
  208. package/src/components/DateTimePicker.vue +45 -17
  209. package/src/components/Divider.vue +0 -4
  210. package/src/components/DoseCalculator.vue +0 -4
  211. package/src/components/DoseDesignWorkspaceView.vue +6 -25
  212. package/src/components/DropdownButton.vue +24 -6
  213. package/src/components/EmptyState.vue +0 -4
  214. package/src/components/ExperimentCodeBadge.vue +0 -4
  215. package/src/components/ExperimentDataViewer.story.vue +3 -0
  216. package/src/components/ExperimentDataViewer.vue +33 -13
  217. package/src/components/ExperimentPopover.vue +2 -5
  218. package/src/components/ExperimentSelectorModal.vue +0 -4
  219. package/src/components/ExperimentTimeline.story.vue +18 -0
  220. package/src/components/ExperimentTimeline.vue +81 -75
  221. package/src/components/FileUploader.vue +0 -4
  222. package/src/components/FitPanel.vue +0 -4
  223. package/src/components/FormActions.story.vue +96 -0
  224. package/src/components/FormActions.vue +0 -4
  225. package/src/components/FormBuilder.vue +0 -4
  226. package/src/components/FormField.vue +0 -4
  227. package/src/components/FormulaInput.vue +0 -4
  228. package/src/components/GeneratedPathInput.story.vue +68 -0
  229. package/src/components/GeneratedPlotlyResult.story.vue +96 -0
  230. package/src/components/GeneratedPlotlyResult.vue +3 -3
  231. package/src/components/GeneratedPluginView.story.vue +145 -0
  232. package/src/components/GeneratedPluginView.vue +10 -10
  233. package/src/components/GeneratedResultRenderer.story.vue +117 -0
  234. package/src/components/GeneratedResultRenderer.vue +4 -4
  235. package/src/components/GroupAssigner.vue +67 -5
  236. package/src/components/IconButton.vue +0 -4
  237. package/src/components/InstrumentAlertLog.vue +0 -4
  238. package/src/components/InstrumentStateBadge.vue +0 -4
  239. package/src/components/InstrumentStatusCard.vue +0 -4
  240. package/src/components/JobsStatusTray.vue +16 -5
  241. package/src/components/LcmsSequenceTable.vue +81 -50
  242. package/src/components/LoadingSpinner.vue +0 -4
  243. package/src/components/MobileSupportGate.vue +0 -4
  244. package/src/components/MoleculeInput.vue +0 -4
  245. package/src/components/MultiSelect.vue +0 -4
  246. package/src/components/NumberInput.vue +0 -4
  247. package/src/components/PlateMapEditor.vue +3 -14
  248. package/src/components/PluginIcon.vue +0 -4
  249. package/src/components/PluginWorkspaceView.props.ts +38 -0
  250. package/src/components/PluginWorkspaceView.vue +53 -224
  251. package/src/components/ProgressBar.vue +0 -4
  252. package/src/components/ProtocolStepEditor.vue +2 -4
  253. package/src/components/RackEditor.vue +51 -70
  254. package/src/components/ReagentEditor.vue +0 -4
  255. package/src/components/ReagentList.story.vue +18 -0
  256. package/src/components/ReagentList.vue +127 -82
  257. package/src/components/ResourceCard.vue +0 -4
  258. package/src/components/RuntimeUpdateNotice.story.vue +49 -0
  259. package/src/components/RuntimeUpdateNotice.vue +4 -4
  260. package/src/components/SampleHierarchyTree.story.vue +18 -0
  261. package/src/components/SampleHierarchyTree.vue +32 -9
  262. package/src/components/SampleLegend.vue +2 -8
  263. package/src/components/SampleSelector.drag.ts +51 -0
  264. package/src/components/SampleSelector.story.vue +6 -0
  265. package/src/components/SampleSelector.tree.ts +2 -0
  266. package/src/components/SampleSelector.vue +49 -10
  267. package/src/components/SampleSelectorGroupNode.vue +19 -0
  268. package/src/components/ScheduleCalendar.story.vue +6 -0
  269. package/src/components/ScheduleCalendar.vue +82 -7
  270. package/src/components/ScientificNumber.vue +0 -4
  271. package/src/components/SecretInput.story.vue +79 -0
  272. package/src/components/SecretInput.vue +150 -0
  273. package/src/components/SectionCard.vue +0 -4
  274. package/src/components/SegmentedControl.vue +48 -5
  275. package/src/components/SequenceInput.vue +0 -4
  276. package/src/components/SequenceProgressBar.story.vue +110 -0
  277. package/src/components/SequenceProgressBar.vue +0 -4
  278. package/src/components/SettingsModal.vue +0 -4
  279. package/src/components/Skeleton.vue +0 -4
  280. package/src/components/SmartGroupFieldRecipe.vue +8 -6
  281. package/src/components/SmartGroupManual.vue +0 -4
  282. package/src/components/StatusIndicator.vue +0 -4
  283. package/src/components/StepWizard.vue +0 -4
  284. package/src/components/TagsInput.vue +4 -6
  285. package/src/components/ThemeToggle.vue +0 -4
  286. package/src/components/TimePicker.vue +36 -7
  287. package/src/components/TimeRangeInput.vue +0 -4
  288. package/src/components/Tooltip.story.vue +3 -3
  289. package/src/components/Tooltip.vue +0 -4
  290. package/src/components/UnitInput.vue +0 -4
  291. package/src/components/WellPlate.geometry.ts +60 -1
  292. package/src/components/WellPlate.interaction.ts +44 -0
  293. package/src/components/WellPlate.story.vue +8 -0
  294. package/src/components/WellPlate.vue +53 -7
  295. package/src/components/index.ts +9 -0
  296. package/src/components/internal/AppTopBarPageSelectorInternal.vue +2 -5
  297. package/src/components/internal/AppTopBarPillNavInternal.vue +0 -4
  298. package/src/components/internal/DataStateInternal.vue +74 -0
  299. package/src/components/internal/FormSectionRenderer.vue +0 -4
  300. package/src/components/internal/WellEditPopupInternal.vue +20 -5
  301. package/src/components/internal/WorkspaceControlsInternal.vue +20 -0
  302. package/src/components/internal/WorkspaceShellInternal.vue +125 -0
  303. package/src/components/internal/WorkspaceSidebarInternal.vue +82 -0
  304. package/src/composables/controlSchemaTypes.ts +34 -0
  305. package/src/composables/experimentDesignData.ts +1 -3
  306. package/src/composables/flattenWorkspaceBindings.ts +104 -0
  307. package/src/composables/formBuilderRegistry.ts +5 -0
  308. package/src/composables/index.ts +43 -0
  309. package/src/composables/pluginWorkspaceModel.ts +182 -0
  310. package/src/composables/useAsync.ts +5 -1
  311. package/src/composables/useAuth.ts +3 -0
  312. package/src/composables/useBioTemplatePackWorkspace.ts +15 -9
  313. package/src/composables/useBioTemplatePresetWorkspace.ts +14 -15
  314. package/src/composables/useBioTemplateWorkspace.ts +18 -43
  315. package/src/composables/useCommandHistory.ts +5 -1
  316. package/src/composables/useDropdownState.ts +35 -5
  317. package/src/composables/useEventStream.ts +14 -2
  318. package/src/composables/useFileImport.ts +2 -7
  319. package/src/composables/useFocusTrap.ts +91 -0
  320. package/src/composables/useGeneratedAnalysis.ts +22 -10
  321. package/src/composables/useJobsStatusTray.ts +184 -17
  322. package/src/composables/useListReorder.story.vue +143 -0
  323. package/src/composables/useListReorder.ts +242 -0
  324. package/src/composables/useMenuKeyboard.ts +90 -0
  325. package/src/composables/useOptimisticMutation.ts +6 -16
  326. package/src/composables/usePluginClient.ts +47 -4
  327. package/src/composables/usePluginConfig.ts +252 -0
  328. package/src/composables/usePluginWorkspace.ts +208 -0
  329. package/src/composables/useRackEditor.ts +2 -11
  330. package/src/composables/useRequestSyncState.ts +98 -28
  331. package/src/composables/useResourceCrud.ts +6 -16
  332. package/src/composables/useRovingFocus.ts +66 -0
  333. package/src/composables/useScheduleDrag.ts +37 -0
  334. package/src/composables/useWellPainting.ts +10 -30
  335. package/src/composables/useWellPlateAdapter.ts +5 -1
  336. package/src/composables/useWellPlateEditor.ts +1 -11
  337. package/src/composables/useWellPlateValidation.ts +5 -1
  338. package/src/composables/workspaceRecipes.ts +267 -0
  339. package/src/index.ts +16 -0
  340. package/src/permissions.ts +48 -9
  341. package/src/stores/auth.ts +1 -0
  342. package/src/stores/experiment.ts +2 -7
  343. package/src/stores/index.ts +9 -1
  344. package/src/stores/settings.ts +93 -1
  345. package/src/styles/components/audit-trail.css +5 -5
  346. package/src/styles/components/batch-progress-list.css +7 -0
  347. package/src/styles/components/color-slider.css +2 -2
  348. package/src/styles/components/data-state.css +30 -0
  349. package/src/styles/components/dataframe.css +29 -35
  350. package/src/styles/components/experiment-data-viewer.css +4 -4
  351. package/src/styles/components/experiment-timeline.css +3 -30
  352. package/src/styles/components/form-builder.css +5 -5
  353. package/src/styles/components/lcms-sequence-table.css +16 -1
  354. package/src/styles/components/multi-select.css +1 -1
  355. package/src/styles/components/reagent-list.css +38 -31
  356. package/src/styles/components/sample-hierarchy-tree.css +5 -19
  357. package/src/styles/components/sample-selector.css +9 -2
  358. package/src/styles/components/schedule-calendar.css +8 -0
  359. package/src/styles/components/scientific-number.css +1 -1
  360. package/src/styles/components/secret-input.css +60 -0
  361. package/src/styles/components/well-plate.css +8 -0
  362. package/src/styles/index.css +9 -0
  363. package/src/styles/variables.css +29 -0
  364. package/src/templates/builderPresetControls.ts +1 -1
  365. package/src/templates/builderReadUtils.ts +1 -3
  366. package/src/templates/componentPlateHelpers.ts +3 -1
  367. package/src/templates/componentTargetResolvers.ts +1 -3
  368. package/src/templates/controlSchemaTargets.ts +1 -3
  369. package/src/templates/doseResponseAdapters.ts +2 -13
  370. package/src/templates/elisaAssayCollectionBuilder.ts +2 -2
  371. package/src/templates/plateMapBuilder.ts +2 -2
  372. package/src/templates/qpcrPlateBuilder.ts +1 -1
  373. package/src/templates/templateValidators.ts +1 -1
  374. package/src/templates/timeCourseBuilder.ts +2 -2
  375. package/src/templates/wellPlateScreenCollectionBuilder.ts +2 -2
  376. package/src/types/auth.ts +1 -0
  377. package/src/types/form-builder.ts +1 -0
  378. package/src/utils/color.ts +51 -0
  379. package/src/utils/errors.ts +29 -0
  380. package/src/utils/formModelSync.ts +1 -3
  381. package/src/utils/pluginIcon.ts +1 -3
  382. package/src/utils/pluginSecrets.ts +102 -0
  383. package/src/utils/records.ts +9 -0
  384. package/dist/EmptyState-p90quq8Z.js.map +0 -1
  385. package/dist/ExperimentPopover-tLwJ7XF4.js.map +0 -1
  386. package/dist/ExperimentSelectorModal-DyPAUCLw.js.map +0 -1
  387. package/dist/SettingsModal-BgKY93zh.js.map +0 -1
  388. package/dist/components-DkHddRMl.js.map +0 -1
  389. package/dist/composables/autoGroupConstants.d.ts +0 -1
  390. package/dist/composables/autoGroupGrouping.d.ts +0 -3
  391. package/dist/composables/useAutoGroupInputSources.d.ts +0 -32
  392. package/dist/composables-C_i90sGS.js.map +0 -1
  393. package/dist/experiment-Cq145oEW.js.map +0 -1
  394. package/dist/experiment-utils-CLnzPPq5.js.map +0 -1
  395. package/dist/templates/builderDefaults.d.ts +0 -1
  396. package/dist/templates/plateGeometry.d.ts +0 -4
  397. package/dist/templates-DsP51i-S.js.map +0 -1
  398. package/dist/useApi-J6zFkHmn.js.map +0 -1
  399. package/dist/useControlSchema-BDx2Olha.js.map +0 -1
  400. package/dist/useDropdownState-DSb3BC3N.js.map +0 -1
  401. package/dist/useProtocolTemplates-CS_SQl6U.js.map +0 -1
  402. package/src/__tests__/composables/useAutoGroupInputSources.test.ts +0 -127
  403. package/src/composables/autoGroupConstants.ts +0 -4
  404. package/src/composables/autoGroupGrouping.ts +0 -148
  405. package/src/composables/useAutoGroupInputSources.ts +0 -147
  406. package/src/templates/builderDefaults.ts +0 -11
  407. package/src/templates/plateGeometry.ts +0 -62
  408. /package/dist/__tests__/{composables/useAutoGroupInputSources.test.d.ts → components/DataStates.test.d.ts} +0 -0
@@ -37,8 +37,67 @@ export const WELL_PLATE_SIZE_CONFIGS: Record<WellPlateSize, WellPlateSizeConfig>
37
37
  fill: { cellWidth: '100%', cellHeight: '32px', headerWidth: '32px', headerHeight: '24px', fontSize: '0.75rem', gap: '2px' },
38
38
  }
39
39
 
40
+ /**
41
+ * Spreadsheet-style row label for a zero-based row index: A…Z, then AA, AB, …
42
+ *
43
+ * This is the single row-label generator for the SDK — plate grids, rack
44
+ * grids, well-id parsing and the template builders all go through it.
45
+ */
46
+ export function rowLabel(index: number): string {
47
+ let label = ''
48
+ let current = index
49
+ for (;;) {
50
+ label = String.fromCharCode(65 + (current % 26)) + label
51
+ current = Math.floor(current / 26) - 1
52
+ if (current < 0) return label
53
+ }
54
+ }
55
+
56
+ /** Inverse of {@link rowLabel}: 'A' → 0, 'Z' → 25, 'AA' → 26. */
57
+ export function rowIndex(label: string): number {
58
+ return [...label].reduce((value, char) => value * 26 + char.charCodeAt(0) - 64, 0) - 1
59
+ }
60
+
40
61
  export function createPlateRowLabels(config: WellPlateConfig): string[] {
41
- return Array.from({ length: config.rows }, (_, index) => String.fromCharCode(65 + index))
62
+ return Array.from({ length: config.rows }, (_, index) => rowLabel(index))
63
+ }
64
+
65
+ function plateConfigOrThrow(format: number): WellPlateConfig {
66
+ const config = PLATE_CONFIGS[format as WellPlateFormat]
67
+ if (!config) throw new Error(`Unsupported plate format '${format}'.`)
68
+ return config
69
+ }
70
+
71
+ /** Every well id of a plate, row-major (A1, A2, … B1, …). */
72
+ export function wellIdsForFormat(format: number): string[] {
73
+ const { rows, cols } = plateConfigOrThrow(format)
74
+ return Array.from({ length: rows }, (_, row) =>
75
+ Array.from({ length: cols }, (_col, col) => `${rowLabel(row)}${col + 1}`)
76
+ ).flat()
77
+ }
78
+
79
+ /** Throw unless `wellId` names a well that exists on a `format`-well plate. */
80
+ export function assertWellInFormat(wellId: string, format: number): void {
81
+ const { rows, cols } = plateConfigOrThrow(format)
82
+ const match = /^([A-Z]+)([1-9][0-9]*)$/.exec(wellId.toUpperCase())
83
+ if (!match) {
84
+ throw new Error(`Invalid well id '${wellId}'.`)
85
+ }
86
+ const row = rowIndex(match[1])
87
+ const col = Number(match[2]) - 1
88
+ if (row < 0 || col < 0 || row >= rows || col >= cols) {
89
+ throw new Error(`Well '${wellId}' is outside a ${format}-well plate.`)
90
+ }
91
+ }
92
+
93
+ /** Coerce an unknown value to a supported plate format, else `fallback`. */
94
+ export function readPlateFormat(value: unknown, fallback: WellPlateFormat): WellPlateFormat {
95
+ const parsed = typeof value === 'number'
96
+ ? value
97
+ : typeof value === 'string'
98
+ ? Number(value)
99
+ : Number.NaN
100
+ return parsed in PLATE_CONFIGS ? (parsed as WellPlateFormat) : fallback
42
101
  }
43
102
 
44
103
  export function createPlateColumnLabels(config: WellPlateConfig): number[] {
@@ -11,6 +11,7 @@ import {
11
11
  type WellPlateCoordinate,
12
12
  } from './WellPlate.geometry'
13
13
  import { parseDroppedSampleTransfer } from './WellPlate.sampleDrop'
14
+ import { useReorderAnnouncer } from '../composables/useListReorder'
14
15
 
15
16
  export interface WellPlateInteractionOptions {
16
17
  modelValue: () => string[]
@@ -64,6 +65,7 @@ export function useWellPlateInteraction(options: WellPlateInteractionOptions) {
64
65
  const hoveredWell = ref<string | null>(null)
65
66
  const editingWellId = ref<string | null>(null)
66
67
  const editPopupPosition = ref({ x: 0, y: 0 })
68
+ const { announcement, announce, announcerStyle } = useReorderAnnouncer()
67
69
 
68
70
  const selectedWellSet = computed(() => new Set(options.modelValue()))
69
71
 
@@ -215,6 +217,45 @@ export function useWellPlateInteraction(options: WellPlateInteractionOptions) {
215
217
  dragTargetWell.value = null
216
218
  }
217
219
 
220
+ // Keyboard alternative to the well-to-well drag. The plate is a 2D grid, not a
221
+ // list, so it cannot use `useListReorder`'s index maths: instead Alt+Enter (or
222
+ // Alt+Space) picks a filled well up, the same chord on another well drops it
223
+ // there, and Escape cancels. Every step is announced politely.
224
+ function handleWellMoveKeydown(well: Well, event: KeyboardEvent) {
225
+ if (options.disabled() || options.readonly() || options.selectionMode() !== 'drag') return
226
+
227
+ if (event.key === 'Escape' && dragSourceWell.value) {
228
+ event.preventDefault()
229
+ announce(`Move cancelled. ${dragSourceWell.value} stays in place.`)
230
+ dragSourceWell.value = null
231
+ dragTargetWell.value = null
232
+ return
233
+ }
234
+
235
+ if (!event.altKey || (event.key !== 'Enter' && event.key !== ' ')) return
236
+ event.preventDefault()
237
+
238
+ const source = dragSourceWell.value
239
+ if (!source) {
240
+ if (!well.sampleType) {
241
+ announce(`Well ${well.id} is empty and cannot be moved.`)
242
+ return
243
+ }
244
+ dragSourceWell.value = well.id
245
+ announce(`Well ${well.id} picked up. Move to another well and press Alt and Enter to drop it.`)
246
+ return
247
+ }
248
+
249
+ if (source !== well.id) {
250
+ options.emitWellMove(source, well.id)
251
+ announce(`Well ${source} moved to ${well.id}.`)
252
+ } else {
253
+ announce(`Move cancelled. ${source} stays in place.`)
254
+ }
255
+ dragSourceWell.value = null
256
+ dragTargetWell.value = null
257
+ }
258
+
218
259
  function parseDroppedSample(event: DragEvent, wellId: string): WellSampleDropData | null {
219
260
  const customParser = options.sampleDropParser()
220
261
  if (customParser) return customParser(event, { wellId, event }) ?? null
@@ -267,6 +308,9 @@ export function useWellPlateInteraction(options: WellPlateInteractionOptions) {
267
308
  handleDragLeave,
268
309
  handleDrop,
269
310
  handleDragEnd,
311
+ handleWellMoveKeydown,
270
312
  handleKeyDown,
313
+ moveAnnouncement: announcement,
314
+ moveAnnouncerStyle: announcerStyle,
271
315
  }
272
316
  }
@@ -121,6 +121,8 @@ const doseWells = generateDoseWells()
121
121
 
122
122
  function initState() {
123
123
  return {
124
+ loading: false,
125
+ error: '',
124
126
  format: 96 as WellPlateFormat,
125
127
  selectionMode: 'multiple' as WellPlateSelectionMode,
126
128
  size: 'md' as WellPlateSize,
@@ -141,6 +143,8 @@ function initState() {
141
143
  <template #default="{ state }">
142
144
  <div style="padding: 2rem;">
143
145
  <WellPlate
146
+ :loading="state.loading"
147
+ :error="state.error || null"
144
148
  v-model="selectedWells"
145
149
  :format="state.format"
146
150
  :wells="generateMockWells(state.format)"
@@ -161,6 +165,10 @@ function initState() {
161
165
  </template>
162
166
 
163
167
  <template #controls="{ state }">
168
+
169
+ <HstCheckbox v-model="state.loading" title="Loading" />
170
+
171
+ <HstText v-model="state.error" title="Error Message" />
164
172
  <HstSelect
165
173
  v-model="state.format"
166
174
  title="Format"
@@ -32,6 +32,7 @@ import {
32
32
  wellStyle,
33
33
  } from './WellPlate.rendering'
34
34
  import { DEFAULT_WELL_LEGEND_ITEMS } from './WellPlate.legend'
35
+ import DataStateInternal from './internal/DataStateInternal.vue'
35
36
 
36
37
  interface Props {
37
38
  modelValue?: string[]
@@ -59,6 +60,19 @@ interface Props {
59
60
  rowConditions?: RowCondition[]
60
61
  allowSampleDrop?: boolean
61
62
  sampleDropParser?: WellSampleDropParser
63
+ /** Replace the plate grid with a loading placeholder. */
64
+ loading?: boolean
65
+ /**
66
+ * Error message. When set, the plate grid is replaced by an error state.
67
+ * `null`/`undefined` renders normally.
68
+ */
69
+ error?: string | null
70
+ /**
71
+ * Opt-in empty-state headline. A blank plate is meaningful, so the empty
72
+ * state only replaces the grid when this message is supplied and no wells
73
+ * carry data.
74
+ */
75
+ emptyMessage?: string
62
76
  }
63
77
 
64
78
  const props = withDefaults(defineProps<Props>(), {
@@ -114,6 +128,12 @@ interface WellEditorSlotProps {
114
128
 
115
129
  defineSlots<{
116
130
  'well-editor'?: (props: WellEditorSlotProps) => unknown
131
+ /** Replaces the default loading placeholder. */
132
+ loading?: () => unknown
133
+ /** Replaces the default error placeholder. */
134
+ error?: (props: { error: string }) => unknown
135
+ /** Replaces the default empty placeholder. */
136
+ empty?: () => unknown
117
137
  }>()
118
138
 
119
139
  const plateRef = ref<HTMLElement | null>(null)
@@ -166,7 +186,10 @@ const {
166
186
  handleDragLeave,
167
187
  handleDrop,
168
188
  handleDragEnd,
189
+ handleWellMoveKeydown,
169
190
  handleKeyDown,
191
+ moveAnnouncement,
192
+ moveAnnouncerStyle,
170
193
  } = useWellPlateInteraction({
171
194
  modelValue: () => props.modelValue,
172
195
  selectionMode: () => props.selectionMode,
@@ -233,6 +256,11 @@ const containerStyle = computed(() =>
233
256
  }
234
257
  )
235
258
 
259
+ /** Empty state is opt-in: it needs an `emptyMessage` and a plate with no well data. */
260
+ const showEmptyState = computed(() =>
261
+ Boolean(props.emptyMessage) && Object.keys(props.wells).length === 0,
262
+ )
263
+
236
264
  const tableStyle = computed(() => ({
237
265
  borderCollapse: 'separate' as const,
238
266
  borderSpacing: sizeConfig.value.gap,
@@ -246,7 +274,25 @@ const tableStyle = computed(() => ({
246
274
  :class="['mint-well-plate', isFillMode ? 'mint-well-plate--fill' : 'mint-well-plate--inline']"
247
275
  :style="containerStyle"
248
276
  >
249
- <div class="mint-well-plate__scroll">
277
+ <div v-if="error" class="mint-well-plate__state">
278
+ <slot name="error" :error="error">
279
+ <DataStateInternal state="error" :title="error" />
280
+ </slot>
281
+ </div>
282
+
283
+ <div v-else-if="loading" class="mint-well-plate__state">
284
+ <slot name="loading">
285
+ <DataStateInternal state="loading" loading-label="Loading plate" />
286
+ </slot>
287
+ </div>
288
+
289
+ <div v-else-if="showEmptyState" class="mint-well-plate__state">
290
+ <slot name="empty">
291
+ <DataStateInternal state="empty" :title="emptyMessage" />
292
+ </slot>
293
+ </div>
294
+
295
+ <div v-else class="mint-well-plate__scroll">
250
296
  <div class="mint-well-plate__content">
251
297
  <table
252
298
  ref="tableRef"
@@ -390,8 +436,9 @@ const tableStyle = computed(() => ({
390
436
  @dragleave="handleDragLeave"
391
437
  @drop="handleDrop(well, $event)"
392
438
  @dragend="handleDragEnd"
393
- @keydown.enter="handleWellClick(well, $event as unknown as MouseEvent)"
394
- @keydown.space.prevent="handleWellClick(well, $event as unknown as MouseEvent)"
439
+ @keydown="handleWellMoveKeydown(well, $event)"
440
+ @keydown.enter.exact="handleWellClick(well, $event as unknown as MouseEvent)"
441
+ @keydown.space.exact.prevent="handleWellClick(well, $event as unknown as MouseEvent)"
395
442
  >
396
443
  <!-- Well label text (from metadata.label) -->
397
444
  <span
@@ -489,9 +536,8 @@ const tableStyle = computed(() => ({
489
536
  />
490
537
  </slot>
491
538
  </template>
539
+
540
+ <!-- Keyboard well-move announcements for screen readers -->
541
+ <div role="status" aria-live="polite" :style="moveAnnouncerStyle">{{ moveAnnouncement }}</div>
492
542
  </div>
493
543
  </template>
494
-
495
- <style>
496
- @import '../styles/components/well-plate.css';
497
- </style>
@@ -7,12 +7,14 @@ export { default as BaseCheckbox } from './BaseCheckbox.vue'
7
7
  export { default as BaseToggle } from './BaseToggle.vue'
8
8
  export { default as BaseRadioGroup } from './BaseRadioGroup.vue'
9
9
  export { default as BaseSlider } from './BaseSlider.vue'
10
+ /** Range slider with a gradient color track and color-coded value badge for threshold visualization. @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `BaseSlider` instead. */
10
11
  export { default as ColorSlider } from './ColorSlider.vue'
11
12
  export { default as BaseTabs } from './BaseTabs.vue'
12
13
  export { default as BaseModal } from './BaseModal.vue'
13
14
  export { default as SegmentedControl } from './SegmentedControl.vue'
14
15
  export { default as MultiSelect } from './MultiSelect.vue'
15
16
  export { default as BasePill } from './BasePill.vue'
17
+ /** Button that opens a dropdown menu for selecting one option from a list. @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `ActionMenu` instead. */
16
18
  export { default as DropdownButton } from './DropdownButton.vue'
17
19
  export { default as Calendar } from './Calendar.vue'
18
20
  export { default as DataFrame } from './DataFrame.vue'
@@ -22,6 +24,7 @@ export { default as FormField } from './FormField.vue'
22
24
  export { default as DatePicker } from './DatePicker.vue'
23
25
  export { default as TimePicker } from './TimePicker.vue'
24
26
  export { default as TagsInput } from './TagsInput.vue'
27
+ export { default as SecretInput } from './SecretInput.vue'
25
28
  export { default as NumberInput } from './NumberInput.vue'
26
29
  export { default as FileUploader } from './FileUploader.vue'
27
30
 
@@ -97,11 +100,15 @@ export { default as ProtocolStepEditor } from './ProtocolStepEditor.vue'
97
100
 
98
101
  // Scientific display components
99
102
  export { default as ScientificNumber } from './ScientificNumber.vue'
103
+ /** Renders a chemical formula string (H₂O, C₆H₁₂O₆, Ca(OH)₂) with typographically correct subscripts and superscripts for charges. @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; no platform replacement is planned. */
100
104
  export { default as ChemicalFormula } from './ChemicalFormula.vue'
101
105
  export { default as SequenceProgressBar } from './SequenceProgressBar.vue'
106
+ /** Filterable instrument alert/event list keyed by each alert's required stable event_key. @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; instrument UI moves to the mld-ms plugins. */
102
107
  export { default as InstrumentAlertLog } from './InstrumentAlertLog.vue'
103
108
  export { default as InstrumentStateBadge } from './InstrumentStateBadge.vue'
109
+ /** Compact card for live instrument monitor status, sample, method, sequence progress, and ETA. @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; instrument UI moves to the mld-ms plugins. */
104
110
  export { default as InstrumentStatusCard } from './InstrumentStatusCard.vue'
111
+ /** Table for Xcalibur-compatible LCMS sequence rows with optional reorder/remove/duplicate controls. @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; instrument UI moves to the mld-ms plugins. */
105
112
  export { default as LcmsSequenceTable } from './LcmsSequenceTable.vue'
106
113
 
107
114
  // Scientific input components
@@ -125,8 +132,10 @@ export { default as ExperimentCodeBadge } from './ExperimentCodeBadge.vue'
125
132
 
126
133
  // Scheduling / booking components
127
134
  export { default as DateTimePicker } from './DateTimePicker.vue'
135
+ /** Paired start/end time pickers that validate range order and display computed duration. @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; use `TimePicker` instead. */
128
136
  export { default as TimeRangeInput } from './TimeRangeInput.vue'
129
137
  export { default as ScheduleCalendar } from './ScheduleCalendar.vue'
138
+ /** Card displaying a lab resource with availability status, specs, tags, and a book action. @deprecated Unused by the MINT platform and scheduled for removal in MINT 1.3; no platform replacement is planned. */
130
139
  export { default as ResourceCard } from './ResourceCard.vue'
131
140
  export { default as SectionCard } from './SectionCard.vue'
132
141
 
@@ -24,7 +24,7 @@ const emit = defineEmits<{
24
24
  select: [page: PageSelectorItem]
25
25
  }>()
26
26
 
27
- const { isOpen, rootRef, close, toggle } = useDropdownState()
27
+ const { isOpen, rootRef, triggerRef, close, toggle } = useDropdownState()
28
28
  const normalizedPages = computed<PageSelectorItem[]>(() => props.pages.map(normalizeItemInput))
29
29
 
30
30
  const current = computed<PageSelectorItem | undefined>(() =>
@@ -45,6 +45,7 @@ function handleSelect(page: PageSelectorItem) {
45
45
  <template>
46
46
  <div ref="rootRef" class="mint-page-selector" :style="{ minWidth }">
47
47
  <button
48
+ ref="triggerRef"
48
49
  type="button"
49
50
  class="mint-page-selector__trigger"
50
51
  :class="{ 'mint-page-selector__trigger--open': isOpen }"
@@ -121,7 +122,3 @@ function handleSelect(page: PageSelectorItem) {
121
122
  </div>
122
123
  </div>
123
124
  </template>
124
-
125
- <style>
126
- @import '../../styles/components/app-page-selector.css';
127
- </style>
@@ -188,7 +188,3 @@ useEventListener(() => document, 'click', handleClickOutside)
188
188
  </div>
189
189
  </nav>
190
190
  </template>
191
-
192
- <style>
193
- @import '../../styles/components/app-pill-nav.css';
194
- </style>
@@ -0,0 +1,74 @@
1
+ <script setup lang="ts">
2
+ /**
3
+ * Shared loading / error / empty presentation for the SDK data components.
4
+ *
5
+ * Internal: not exported from the package entrypoints. Data components render
6
+ * this instead of hand-rolling their own placeholder markup so that the
7
+ * loading, error and empty states look the same everywhere.
8
+ */
9
+ import { computed } from 'vue'
10
+ import EmptyState from '../EmptyState.vue'
11
+ import LoadingSpinner from '../LoadingSpinner.vue'
12
+
13
+ /** Single-path warning triangle used for the error state. */
14
+ const ERROR_ICON_PATH
15
+ = 'M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'
16
+ + 'M12 9v4M12 17h.01'
17
+
18
+ interface Props {
19
+ /** Which of the three placeholder states to render. */
20
+ state: 'loading' | 'error' | 'empty'
21
+ /** Headline for the empty/error state. */
22
+ title?: string
23
+ /** Supporting copy for the empty/error state. */
24
+ description?: string
25
+ /** Custom `<path d>` for the empty state icon (the error state has its own). */
26
+ iconPath?: string
27
+ /** Placeholder scale; also drives the loading spinner size. */
28
+ size?: 'sm' | 'md' | 'lg'
29
+ /** `EmptyState` layout variant. */
30
+ variant?: 'illustrated' | 'inline'
31
+ /** Accessible label (and visible caption) for the loading state. */
32
+ loadingLabel?: string
33
+ /** Optional call-to-action rendered under the empty/error copy. */
34
+ actionLabel?: string
35
+ }
36
+
37
+ const props = withDefaults(defineProps<Props>(), {
38
+ size: 'md',
39
+ variant: 'illustrated',
40
+ loadingLabel: 'Loading',
41
+ })
42
+
43
+ const emit = defineEmits<{
44
+ action: []
45
+ }>()
46
+
47
+ const spinnerSize = computed(() => (props.size === 'sm' ? 'sm' : props.size === 'lg' ? 'lg' : 'md'))
48
+ </script>
49
+
50
+ <template>
51
+ <div
52
+ :class="['mint-data-state', `mint-data-state--${state}`, `mint-data-state--${size}`]"
53
+ :data-state="state"
54
+ >
55
+ <template v-if="state === 'loading'">
56
+ <LoadingSpinner :size="spinnerSize" :label="loadingLabel" />
57
+ <p class="mint-data-state__loading-text" aria-hidden="true">{{ loadingLabel }}</p>
58
+ </template>
59
+ <EmptyState
60
+ v-else
61
+ :title="title"
62
+ :description="description"
63
+ :icon-path="state === 'error' ? ERROR_ICON_PATH : iconPath"
64
+ :color="state === 'error' ? 'error' : 'muted'"
65
+ :size="size"
66
+ :variant="variant"
67
+ :action-label="actionLabel"
68
+ @action="emit('action')"
69
+ >
70
+ <slot />
71
+ </EmptyState>
72
+ </div>
73
+ </template>
74
+
@@ -72,7 +72,3 @@ const gridStyle = computed(() => ({
72
72
  <slot :name="`section:${section.id}:after`" :form="builder.form" />
73
73
  </div>
74
74
  </template>
75
-
76
- <style>
77
- @import '../../styles/components/form-builder.css';
78
- </style>
@@ -1,7 +1,8 @@
1
1
  <script setup lang="ts">
2
- import { ref, watch, computed } from 'vue'
2
+ import { onBeforeUnmount, onMounted, ref, watch, computed } from 'vue'
3
3
  import type { Well, WellEditData, WellEditField } from '../../types'
4
4
  import { useEventListener } from '../../composables/useEventListener'
5
+ import { useFocusTrap } from '../../composables/useFocusTrap'
5
6
 
6
7
  interface Props {
7
8
  wellId: string
@@ -86,6 +87,22 @@ function handleKeydown(e: KeyboardEvent) {
86
87
 
87
88
  useEventListener(() => document, 'keydown', handleKeydown)
88
89
 
90
+ // The popup has no open/close prop of its own — the parent mounts and unmounts it —
91
+ // so the trap activates on mount and releases (restoring focus) just before unmount,
92
+ // the same lifecycle BaseModal drives off `modelValue`.
93
+ const containerRef = ref<HTMLElement | null>(null)
94
+ const trapActive = ref(false)
95
+
96
+ useFocusTrap({ containerRef, active: trapActive })
97
+
98
+ onMounted(() => {
99
+ trapActive.value = true
100
+ })
101
+
102
+ onBeforeUnmount(() => {
103
+ trapActive.value = false
104
+ })
105
+
89
106
  const sampleTypeButtons = [
90
107
  { type: 'sample', label: 'S', tooltip: 'Sample' },
91
108
  { type: 'blank', label: 'B', tooltip: 'Blank' },
@@ -101,8 +118,10 @@ const sampleTypeButtons = [
101
118
 
102
119
  <!-- Popup -->
103
120
  <div
121
+ ref="containerRef"
104
122
  class="mint-well-edit-popup"
105
123
  :style="popupStyle"
124
+ tabindex="-1"
106
125
  @click.stop
107
126
  >
108
127
  <!-- Header -->
@@ -224,7 +243,3 @@ const sampleTypeButtons = [
224
243
  </div>
225
244
  </Teleport>
226
245
  </template>
227
-
228
- <style>
229
- @import '../../styles/components/well-edit-popup.css';
230
- </style>
@@ -0,0 +1,20 @@
1
+ <script setup lang="ts">
2
+ /**
3
+ * Internal: renders PluginWorkspaceView's default (main content) slot bound to the
4
+ * control-schema-derived scoped-slot payload (active view, values, component bindings/props).
5
+ * Not part of the public SDK surface — see PluginWorkspaceView.vue for the public component.
6
+ */
7
+ import type { PluginWorkspaceControlsModel } from '../../composables/pluginWorkspaceModel'
8
+
9
+ defineProps<{
10
+ controls: PluginWorkspaceControlsModel
11
+ }>()
12
+
13
+ defineSlots<{
14
+ default?: (props: PluginWorkspaceControlsModel) => unknown
15
+ }>()
16
+ </script>
17
+
18
+ <template>
19
+ <slot v-bind="controls" />
20
+ </template>
@@ -0,0 +1,125 @@
1
+ <script setup lang="ts">
2
+ /**
3
+ * Internal: AppLayout + AppTopBar for PluginWorkspaceView, driven by a single `shell` model.
4
+ * Owns the responsive/collapse layout props and the top bar's default rendering; the caller
5
+ * decides whether to override the `topbar`/`sidebar` slots and supplies the sidebar content.
6
+ * Not part of the public SDK surface — see PluginWorkspaceView.vue for the public component.
7
+ */
8
+ import type {
9
+ AccountMenuItem,
10
+ PageSelectorItem,
11
+ PillNavItem,
12
+ PillNavOption,
13
+ PluginSwitcherPlugin,
14
+ } from '../../types'
15
+ import AppLayout from '../AppLayout.vue'
16
+ import AppTopBar from '../AppTopBar.vue'
17
+ import type { PluginWorkspaceShellModel } from '../../composables/pluginWorkspaceModel'
18
+
19
+ defineProps<{
20
+ shell: PluginWorkspaceShellModel
21
+ }>()
22
+
23
+ const emit = defineEmits<{
24
+ 'page-selector-select': [page: PageSelectorItem]
25
+ 'pill-select': [item: PillNavItem]
26
+ 'pill-option-select': [option: PillNavOption, item: PillNavItem]
27
+ 'plugin-switcher-select': [plugin: PluginSwitcherPlugin]
28
+ 'plugin-switcher-install': []
29
+ 'account-menu-select': [item: AccountMenuItem]
30
+ 'sign-out': []
31
+ 'notifications-click': []
32
+ 'settings-values-change': [data: Record<string, unknown>]
33
+ 'admin-click': []
34
+ }>()
35
+
36
+ function handlePillOptionSelect(option: PillNavOption, item: PillNavItem) {
37
+ emit('pill-option-select', option, item)
38
+ }
39
+
40
+ defineSlots<{
41
+ topbar?: (props: PluginWorkspaceShellModel['controls']) => unknown
42
+ sidebar?: (props: PluginWorkspaceShellModel['controls']) => unknown
43
+ default?: (props: PluginWorkspaceShellModel['controls']) => unknown
44
+ icon?: (props: Record<string, unknown>) => unknown
45
+ logo?: (props: Record<string, unknown>) => unknown
46
+ 'page-selector-icon'?: (props: Record<string, unknown>) => unknown
47
+ 'page-selector-item-icon'?: (props: Record<string, unknown>) => unknown
48
+ nav?: (props: Record<string, unknown>) => unknown
49
+ center?: (props: Record<string, unknown>) => unknown
50
+ actions?: (props: Record<string, unknown>) => unknown
51
+ 'account-menu-items'?: (props: Record<string, unknown>) => unknown
52
+ 'account-menu-item-icon'?: (props: Record<string, unknown>) => unknown
53
+ 'settings-appearance'?: (props: Record<string, unknown>) => unknown
54
+ }>()
55
+ </script>
56
+
57
+ <template>
58
+ <AppLayout
59
+ class="mint-plugin-workspace-view"
60
+ :sidebar-position="shell.sidebarPosition"
61
+ :sidebar-width="shell.sidebarWidth"
62
+ :floating="shell.floating"
63
+ :responsive-sidebar="shell.responsiveSidebar"
64
+ :sidebar-toggle-label="shell.sidebarToggleLabel"
65
+ :sidebar-close-label="shell.sidebarCloseLabel"
66
+ >
67
+ <template #topbar>
68
+ <slot name="topbar" v-bind="shell.controls">
69
+ <AppTopBar
70
+ :title="shell.title"
71
+ :subtitle="shell.subtitle"
72
+ :variant="shell.topBarVariant"
73
+ :home-path="shell.homePath"
74
+ :show-logo="shell.showLogo"
75
+ :page-selector="shell.pageSelector"
76
+ :current-page-selector-id="shell.currentPageSelectorId"
77
+ :plugin-switcher="shell.pluginSwitcher"
78
+ :pill-nav="shell.pillNav"
79
+ :current-pill-id="shell.currentPillId"
80
+ :show-theme-toggle="shell.showThemeToggle"
81
+ :show-settings="shell.showSettings"
82
+ :settings-config="shell.settingsConfig"
83
+ :show-standalone-label="shell.showStandaloneLabel"
84
+ :standalone-label="shell.standaloneLabel"
85
+ :account-menu="shell.accountMenu"
86
+ :show-notifications="shell.showNotifications"
87
+ :has-notification-dot="shell.hasNotificationDot"
88
+ :show-admin="shell.showAdmin"
89
+ :admin-path="shell.adminPath"
90
+ :user-name="shell.userName"
91
+ :user-initial="shell.userInitial"
92
+ :user-email="shell.userEmail"
93
+ @page-selector-select="emit('page-selector-select', $event)"
94
+ @pill-select="emit('pill-select', $event)"
95
+ @pill-option-select="handlePillOptionSelect"
96
+ @plugin-switcher-select="emit('plugin-switcher-select', $event)"
97
+ @plugin-switcher-install="emit('plugin-switcher-install')"
98
+ @account-menu-select="emit('account-menu-select', $event)"
99
+ @sign-out="emit('sign-out')"
100
+ @notifications-click="emit('notifications-click')"
101
+ @settings-values-change="emit('settings-values-change', $event)"
102
+ @admin-click="emit('admin-click')"
103
+ >
104
+ <template
105
+ v-for="slotName in shell.topBarSlotNames"
106
+ :key="slotName"
107
+ #[slotName]="slotProps"
108
+ >
109
+ <!-- @vue-ignore dynamic SDK slot forwarding for AppTopBar passthrough slots -->
110
+ <slot
111
+ :name="slotName"
112
+ v-bind="slotProps ?? {}"
113
+ />
114
+ </template>
115
+ </AppTopBar>
116
+ </slot>
117
+ </template>
118
+
119
+ <template v-if="shell.hasSidebarSurface" #sidebar>
120
+ <slot name="sidebar" v-bind="shell.controls" />
121
+ </template>
122
+
123
+ <slot v-bind="shell.controls" />
124
+ </AppLayout>
125
+ </template>