@morscherlab/mint-sdk 1.4.13 → 1.5.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.
- package/dist/{AlertBox-CexONPhA.js → AlertBox-Cai0w7gF.js} +3 -3
- package/dist/{AlertBox-CexONPhA.js.map → AlertBox-Cai0w7gF.js.map} +1 -1
- package/dist/{AppSidebar-CIBehlYL.js → AppSidebar-C-Vq5x4I.js} +354 -93
- package/dist/AppSidebar-C-Vq5x4I.js.map +1 -0
- package/dist/{ConfirmDialog-CjWoxAD1.js → ConfirmDialog-BjFsOpBe.js} +3 -3
- package/dist/ConfirmDialog-BjFsOpBe.js.map +1 -0
- package/dist/{ExperimentPopover-CzV1--OY.js → ExperimentPopover-DYy_s0kI.js} +25 -37
- package/dist/ExperimentPopover-DYy_s0kI.js.map +1 -0
- package/dist/{ExperimentSelectorModal-CUkKmgfr.js → ExperimentSelectorModal-Bfh5bdkv.js} +5 -5
- package/dist/{ExperimentSelectorModal-CUkKmgfr.js.map → ExperimentSelectorModal-Bfh5bdkv.js.map} +1 -1
- package/dist/{SegmentedControl-C-sckoJZ.js → SegmentedControl-B8KgyOjd.js} +2 -2
- package/dist/{SegmentedControl-C-sckoJZ.js.map → SegmentedControl-B8KgyOjd.js.map} +1 -1
- package/dist/{SettingsModal-jW7Z4i_1.js → SettingsModal-DwfrD1ER.js} +7 -7
- package/dist/{SettingsModal-jW7Z4i_1.js.map → SettingsModal-DwfrD1ER.js.map} +1 -1
- package/dist/__tests__/components/AppTopBarCompact.test.d.ts +1 -0
- package/dist/__tests__/components/AppTopBarCompactReset.test.d.ts +1 -0
- package/dist/__tests__/components/AutoGroupModal.experimentLoad.test.d.ts +1 -0
- package/dist/components/AppTopBar.compact.d.ts +5 -0
- package/dist/components/AppTopBar.vue.d.ts +17 -17
- package/dist/components/FormBuilder.vue.d.ts +1 -1
- package/dist/components/PluginIcon.vue.d.ts +2 -2
- package/dist/components/PluginWorkspaceView.vue.d.ts +4 -0
- package/dist/components/SettingsModal.vue.d.ts +1 -1
- package/dist/components/internal/AppTopBarPageSelectorInternal.vue.d.ts +2 -2
- package/dist/components/internal/FormSchemaInternal.vue.d.ts +9 -9
- package/dist/components/internal/FormSectionRenderer.vue.d.ts +4 -4
- package/dist/components/internal/LucideIconInternal.vue.d.ts +17 -0
- package/dist/composables/appLayoutSidebar.d.ts +9 -0
- package/dist/composables/useVersionedSave.d.ts +5 -2
- package/dist/{controlSchemaModel-C_XqpkgE.js → controlSchemaModel-BtFNZj8t.js} +2 -2
- package/dist/{controlSchemaModel-C_XqpkgE.js.map → controlSchemaModel-BtFNZj8t.js.map} +1 -1
- package/dist/{data-8G-U6Pb0.js → data-CJztFns8.js} +31 -15
- package/dist/{data-8G-U6Pb0.js.map → data-CJztFns8.js.map} +1 -1
- package/dist/data.js +8 -8
- package/dist/{experimentStatus-DCn2QKG7.js → experimentStatus-Deokk7Br.js} +2 -2
- package/dist/{experimentStatus-DCn2QKG7.js.map → experimentStatus-Deokk7Br.js.map} +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +15 -20
- package/dist/index.js.map +1 -1
- package/dist/{install-CM33AZhf.js → install-Bk02tJ5M.js} +14 -15
- package/dist/{install-CM33AZhf.js.map → install-Bk02tJ5M.js.map} +1 -1
- package/dist/install.js +1 -1
- package/dist/{lab-CPJ7n7e5.js → lab-BYhb_cJI.js} +22 -14
- package/dist/lab-BYhb_cJI.js.map +1 -0
- package/dist/lab.js +4 -4
- package/dist/{records-BAymyHAn.js → records-GtiVMlTQ.js} +198 -62
- package/dist/records-GtiVMlTQ.js.map +1 -0
- package/dist/{runtime-PntKXQ7K.js → runtime-aZPUPxoB.js} +29 -12
- package/dist/runtime-aZPUPxoB.js.map +1 -0
- package/dist/runtime.js +6 -6
- package/dist/{shell-B-woqThX.js → shell-Bk9mD4Lc.js} +5 -5
- package/dist/{shell-B-woqThX.js.map → shell-Bk9mD4Lc.js.map} +1 -1
- package/dist/shell.js +5 -5
- package/dist/styles.css +139 -15
- package/dist/types/components.d.ts +22 -2
- package/dist/types/generated-ui.d.ts +2 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/instrument.d.ts +0 -17
- package/dist/{useDropdownState-uFIz6Yv8.js → useDropdownState-CcBzUYZ6.js} +14 -5
- package/dist/useDropdownState-CcBzUYZ6.js.map +1 -0
- package/dist/{useExperimentSamples-DEDAKa2E.js → useExperimentSamples-CpNXvpUn.js} +3 -3
- package/dist/{useExperimentSamples-DEDAKa2E.js.map → useExperimentSamples-CpNXvpUn.js.map} +1 -1
- package/dist/{useListReorder-W1bzK_bo.js → useListReorder-Bp4EAI2w.js} +3 -3
- package/dist/{useListReorder-W1bzK_bo.js.map → useListReorder-Bp4EAI2w.js.map} +1 -1
- package/dist/{useRackEditor-BWOnob3i.js → useRackEditor-i2bdPUFf.js} +8 -8
- package/dist/{useRackEditor-BWOnob3i.js.map → useRackEditor-i2bdPUFf.js.map} +1 -1
- package/dist/{useRealtime-B0u_FvEH.js → useRealtime-BLQEjbuq.js} +3 -3
- package/dist/{useRealtime-B0u_FvEH.js.map → useRealtime-BLQEjbuq.js.map} +1 -1
- package/dist/useRequest-CXyPw3eh.js +76 -0
- package/dist/useRequest-CXyPw3eh.js.map +1 -0
- package/dist/utils/deprecation.d.ts +2 -0
- package/dist/utils/lucideIcon.d.ts +4 -0
- package/package.json +1 -1
- package/src/__tests__/components/AppTopBar.test.ts +102 -20
- package/src/__tests__/components/AppTopBarCompact.test.ts +65 -0
- package/src/__tests__/components/AppTopBarCompactReset.test.ts +24 -0
- package/src/__tests__/components/AutoGroupModal.experimentLoad.test.ts +58 -0
- package/src/__tests__/components/BaseModal.test.ts +33 -2
- package/src/__tests__/components/ConfirmDialog.test.ts +2 -2
- package/src/__tests__/components/ExperimentPopover.test.ts +32 -0
- package/src/__tests__/components/PluginWorkspaceView.test.ts +1 -1
- package/src/__tests__/components/deprecationTags.test.ts +4 -18
- package/src/__tests__/composables/useJobCenter.test.ts +35 -0
- package/src/__tests__/composables/useVersionedSave.test.ts +71 -6
- package/src/__tests__/docs/frontendDocsCatalog.test.ts +3 -3
- package/src/__tests__/styles/menusShellRefresh.test.ts +5 -0
- package/src/components/AppLayout.story.vue +5 -5
- package/src/components/AppLayout.vue +13 -1
- package/src/components/AppSidebar.vue +2 -2
- package/src/components/AppTopBar.compact.ts +60 -0
- package/src/components/AppTopBar.story.vue +39 -14
- package/src/components/AppTopBar.vue +222 -89
- package/src/components/BaseModal.vue +16 -5
- package/src/components/CollapsibleCard.vue +1 -1
- package/src/components/ConfirmDialog.vue +1 -1
- package/src/components/ExperimentPopover.story.vue +2 -2
- package/src/components/ExperimentPopover.vue +6 -22
- package/src/components/GeneratedPluginView.vue +0 -1
- package/src/components/PluginIcon.story.vue +2 -2
- package/src/components/PluginIcon.vue +2 -2
- package/src/components/PluginWorkspaceView.vue +8 -0
- package/src/components/internal/AppTopBarPageSelectorInternal.vue +12 -0
- package/src/components/internal/AutoGroupModalInternal.vue +14 -3
- package/src/components/internal/LucideIconInternal.vue +23 -0
- package/src/composables/appLayoutSidebar.ts +11 -0
- package/src/composables/index.ts +1 -2
- package/src/composables/useJobCenter.ts +21 -1
- package/src/composables/usePluginWorkspace.ts +1 -1
- package/src/composables/useVersionedSave.ts +32 -7
- package/src/index.ts +0 -3
- package/src/styles/components/app-layout.css +5 -0
- package/src/styles/components/app-top-bar.css +128 -8
- package/src/styles/components/plugin-icon.css +1 -1
- package/src/styles/variables.css +2 -2
- package/src/types/components.ts +23 -2
- package/src/types/generated-ui.ts +2 -0
- package/src/types/index.ts +1 -1
- package/src/types/instrument.ts +0 -18
- package/src/utils/deprecation.ts +8 -0
- package/src/utils/lucideIcon.ts +25 -0
- package/src/utils/lucideIconIndex.d.ts +2 -0
- package/dist/AppSidebar-CIBehlYL.js.map +0 -1
- package/dist/ConfirmDialog-CjWoxAD1.js.map +0 -1
- package/dist/ExperimentPopover-CzV1--OY.js.map +0 -1
- package/dist/deprecatedRootExports.d.ts +0 -191
- package/dist/lab-CPJ7n7e5.js.map +0 -1
- package/dist/records-BAymyHAn.js.map +0 -1
- package/dist/runtime-PntKXQ7K.js.map +0 -1
- package/dist/useDropdownState-uFIz6Yv8.js.map +0 -1
- package/dist/useRequest-D9-3BS-3.js +0 -215
- package/dist/useRequest-D9-3BS-3.js.map +0 -1
- package/src/deprecatedRootExports.ts +0 -226
package/src/types/components.ts
CHANGED
|
@@ -220,6 +220,7 @@ export type PillNavItemInput = (Omit<PillNavItem, 'children'> & {
|
|
|
220
220
|
export interface PageSelectorItem {
|
|
221
221
|
id: string
|
|
222
222
|
label: string
|
|
223
|
+
/** A Lucide icon name (`'activity'`, `'flask-conical'`) or a plugin icon (path, data URL, `mint-icon` JSON). Without one the page shows its first letter. */
|
|
223
224
|
icon?: string
|
|
224
225
|
hint?: string
|
|
225
226
|
to?: string
|
|
@@ -239,12 +240,32 @@ export interface PluginWorkspaceTopBarSpec {
|
|
|
239
240
|
logo?: boolean
|
|
240
241
|
/** Centered pill navigation for the local modes of the current route (bind `v-model:pill`). */
|
|
241
242
|
pills?: PillNavItemInput[]
|
|
242
|
-
/**
|
|
243
|
+
/** @deprecated Ignored: the theme toggle always shows. Removed in 2.0. */
|
|
243
244
|
themeToggle?: boolean
|
|
244
|
-
/**
|
|
245
|
+
/**
|
|
246
|
+
* Settings modal of the always-present settings button. `false` (or a getter that returns it)
|
|
247
|
+
* gives the modal only its Appearance tab; it no longer hides the button.
|
|
248
|
+
*/
|
|
245
249
|
settings?: import('vue').MaybeRefOrGetter<false | TopBarSettingsConfig>
|
|
246
250
|
/** Standalone badge text when the plugin runs outside the platform; `false` hides it. */
|
|
247
251
|
standaloneLabel?: false | string
|
|
252
|
+
/** Plugin buttons, before the theme and settings buttons. The first two show; the rest go into a More menu. */
|
|
253
|
+
actions?: TopBarAction[]
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/** One plugin button of the top bar. With `icon` it is an icon button and `label` is its accessible name and tooltip. */
|
|
257
|
+
export interface TopBarAction {
|
|
258
|
+
id: string
|
|
259
|
+
label: string
|
|
260
|
+
/** A Lucide icon name, such as `'database'`. */
|
|
261
|
+
icon?: string
|
|
262
|
+
/** A small status dot on the button. */
|
|
263
|
+
dot?: Tone
|
|
264
|
+
/** Tooltip; defaults to `label`. */
|
|
265
|
+
title?: string
|
|
266
|
+
loading?: boolean
|
|
267
|
+
disabled?: boolean
|
|
268
|
+
onSelect: () => void
|
|
248
269
|
}
|
|
249
270
|
|
|
250
271
|
/** Sidebar part of a PluginWorkspaceView spec; also the `:spec` of AppSidebar. */
|
|
@@ -132,6 +132,8 @@ export interface GeneratedJobDefinition {
|
|
|
132
132
|
cpu: number
|
|
133
133
|
/** Who may submit the job when integrated: `use`, `configure` (`plugins.configure`) or `admin`. */
|
|
134
134
|
access?: 'use' | 'configure' | 'admin'
|
|
135
|
+
/** The plugins that may start the job through the platform: `'readers'` or plugin names. Absent before SDK 1.5. */
|
|
136
|
+
callers?: 'readers' | string[]
|
|
135
137
|
/** Defaults to process for manifests generated before lifecycle profiles. */
|
|
136
138
|
lifecycle?: GeneratedJobLifecycle
|
|
137
139
|
/** Defaults to `{ kind: 'process' }` for older manifests. */
|
package/src/types/index.ts
CHANGED
|
@@ -31,6 +31,7 @@ export type {
|
|
|
31
31
|
PageSelectorItem,
|
|
32
32
|
PageSelectorItemInput,
|
|
33
33
|
PluginWorkspaceTopBarSpec,
|
|
34
|
+
TopBarAction,
|
|
34
35
|
PluginWorkspaceSidebarSpec,
|
|
35
36
|
PluginWorkspaceViewSpec,
|
|
36
37
|
// Well Plate types
|
|
@@ -219,7 +220,6 @@ export type {
|
|
|
219
220
|
InstrumentLiveProgress,
|
|
220
221
|
InstrumentLiveStatus,
|
|
221
222
|
InstrumentState,
|
|
222
|
-
InstrumentStatus,
|
|
223
223
|
InstrumentStatusReporter,
|
|
224
224
|
SampleInfo,
|
|
225
225
|
SampleInfo as InstrumentSampleInfo,
|
package/src/types/instrument.ts
CHANGED
|
@@ -24,24 +24,6 @@ export interface SequenceProgress {
|
|
|
24
24
|
sample_durations?: readonly number[]
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/** @deprecated Scheduled for removal in MINT 1.4; instrument monitor types move to the mld-ms plugins. */
|
|
28
|
-
export interface InstrumentStatus {
|
|
29
|
-
instrument_id: string
|
|
30
|
-
instrument_name?: string | null
|
|
31
|
-
monitor_id?: string | null
|
|
32
|
-
state: InstrumentState
|
|
33
|
-
active_method?: string | null
|
|
34
|
-
current_sample?: SampleInfo | null
|
|
35
|
-
sequence_progress?: SequenceProgress | null
|
|
36
|
-
timestamp?: string | Date
|
|
37
|
-
last_seen?: string | Date | null
|
|
38
|
-
connected?: boolean
|
|
39
|
-
sequence_file?: string | null
|
|
40
|
-
sequence_row_index?: number | null
|
|
41
|
-
current_raw_file?: string | null
|
|
42
|
-
method_elapsed_pct?: number | null
|
|
43
|
-
}
|
|
44
|
-
|
|
45
27
|
/** A state the platform derives for an instrument: its reported state, `never` (no report yet) or `inactive`. */
|
|
46
28
|
export type InstrumentBadgeState = InstrumentState | 'never' | 'inactive'
|
|
47
29
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const warned = new Set<string>()
|
|
2
|
+
|
|
3
|
+
/** Warn once per page load that a deprecated SDK option or slot is in use. */
|
|
4
|
+
export function warnDeprecatedOnce(key: string, message: string): void {
|
|
5
|
+
if (warned.has(key)) return
|
|
6
|
+
warned.add(key)
|
|
7
|
+
console.warn(`[mint-sdk] ${message}`)
|
|
8
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference path="./lucideIconIndex.d.ts" />
|
|
2
|
+
import type { Component } from 'vue'
|
|
3
|
+
|
|
4
|
+
/** A Lucide icon name in kebab case, such as `activity` or `flask-conical`. */
|
|
5
|
+
const LUCIDE_NAME = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/
|
|
6
|
+
|
|
7
|
+
export function isLucideIconName(value?: string): value is string {
|
|
8
|
+
return !!value && LUCIDE_NAME.test(value)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function pascalCase(name: string): string {
|
|
12
|
+
return name.replace(/(^|-)([a-z0-9])/g, (_, __, char: string) => char.toUpperCase())
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// ponytail: loads the whole Lucide set (~150 KB gzip) as one lazy chunk on first use;
|
|
16
|
+
// switch to a per-icon import map if page icons become common on first paint.
|
|
17
|
+
// The icon index, not the package root: the root is statically imported elsewhere,
|
|
18
|
+
// so a dynamic import of it would put the whole set in the startup bundle.
|
|
19
|
+
let iconSet: Promise<Record<string, Component>> | undefined
|
|
20
|
+
|
|
21
|
+
/** The Lucide component for `name`, or undefined when Lucide has no such icon. */
|
|
22
|
+
export async function loadLucideIcon(name: string): Promise<Component | undefined> {
|
|
23
|
+
iconSet ??= import('lucide-vue-next/dist/esm/icons/index.js') as Promise<Record<string, Component>>
|
|
24
|
+
return (await iconSet)[pascalCase(name)]
|
|
25
|
+
}
|