@morscherlab/mint-sdk 1.0.63 → 1.1.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 (181) hide show
  1. package/README.md +119 -6
  2. package/dist/EmptyState-DgBRoYAy.js +647 -0
  3. package/dist/EmptyState-DgBRoYAy.js.map +1 -0
  4. package/dist/{ExperimentPopover-BbPkIFsI.js → ExperimentPopover-BFw3QX8L.js} +10 -9
  5. package/dist/{ExperimentPopover-BbPkIFsI.js.map → ExperimentPopover-BFw3QX8L.js.map} +1 -1
  6. package/dist/{ExperimentSelectorModal-DZeSd-yr.js → ExperimentSelectorModal-BBWXC7KW.js} +12 -216
  7. package/dist/ExperimentSelectorModal-BBWXC7KW.js.map +1 -0
  8. package/dist/{SettingsModal-CJgLadsN.js → SettingsModal-Dpg-X1OM.js} +12 -9
  9. package/dist/{SettingsModal-CJgLadsN.js.map → SettingsModal-Dpg-X1OM.js.map} +1 -1
  10. package/dist/__tests__/components/BaseToggle.test.d.ts +1 -0
  11. package/dist/__tests__/components/GeneratedPathInput.test.d.ts +1 -0
  12. package/dist/__tests__/components/GeneratedPlotlyResult.test.d.ts +1 -0
  13. package/dist/__tests__/components/GeneratedPluginView.test.d.ts +1 -0
  14. package/dist/__tests__/components/GeneratedResultRenderer.test.d.ts +1 -0
  15. package/dist/__tests__/components/InstrumentAlertLog.test.d.ts +1 -0
  16. package/dist/__tests__/components/SectionCard.test.d.ts +1 -0
  17. package/dist/__tests__/composables/useGeneratedAnalysis.test.d.ts +1 -0
  18. package/dist/__tests__/generatedUi.test.d.ts +1 -0
  19. package/dist/__tests__/types/GeneratedJsonSchema.test.d.ts +1 -0
  20. package/dist/{analysisArtifactTypes-Cu40dzSG.js → analysisArtifactTypes-ejqR8MX3.js} +1 -1
  21. package/dist/{analysisArtifactTypes-Cu40dzSG.js.map → analysisArtifactTypes-ejqR8MX3.js.map} +1 -1
  22. package/dist/{auth-DZAwEeis.js → auth-B87xM--s.js} +1 -1
  23. package/dist/{auth-DZAwEeis.js.map → auth-B87xM--s.js.map} +1 -1
  24. package/dist/chunk-BoAXSpZd.js +33 -0
  25. package/dist/components/AppSidebar.vue.d.ts +1 -1
  26. package/dist/components/AutoGroupModal.vue.d.ts +2 -2
  27. package/dist/components/BaseSelect.vue.d.ts +1 -1
  28. package/dist/components/BaseToggle.vue.d.ts +2 -0
  29. package/dist/components/BioTemplateExperimentWorkspaceView.vue.d.ts +2 -2
  30. package/dist/components/CollapsibleCard.vue.d.ts +1 -1
  31. package/dist/components/ComponentBindingRenderer.vue.d.ts +1 -1
  32. package/dist/components/ConfirmDialog.vue.d.ts +1 -1
  33. package/dist/components/ExperimentDataViewer.vue.d.ts +1 -1
  34. package/dist/components/ExperimentTimeline.vue.d.ts +1 -1
  35. package/dist/components/FileUploader.vue.d.ts +4 -2
  36. package/dist/components/FitPanel.vue.d.ts +2 -2
  37. package/dist/components/FormActions.vue.d.ts +1 -1
  38. package/dist/components/FormBuilder.vue.d.ts +1 -1
  39. package/dist/components/GeneratedPathInput.vue.d.ts +12 -0
  40. package/dist/components/GeneratedPlotlyResult.vue.d.ts +11 -0
  41. package/dist/components/GeneratedPluginView.vue.d.ts +10 -0
  42. package/dist/components/GeneratedResultRenderer.vue.d.ts +6 -0
  43. package/dist/components/JobsStatusTray.vue.d.ts +5 -1
  44. package/dist/components/LcmsSequenceTable.vue.d.ts +1 -1
  45. package/dist/components/PluginWorkspaceView.props.d.ts +1 -1
  46. package/dist/components/SampleLegend.vue.d.ts +1 -1
  47. package/dist/components/SampleSelector.vue.d.ts +2 -2
  48. package/dist/components/SectionCard.vue.d.ts +47 -0
  49. package/dist/components/SettingsModal.vue.d.ts +1 -1
  50. package/dist/components/SmartGroupFieldRecipe.vue.d.ts +2 -2
  51. package/dist/components/index.d.ts +5 -0
  52. package/dist/components/index.js +8 -9
  53. package/dist/components/internal/PlateMapEditorToolbarInternal.vue.d.ts +2 -2
  54. package/dist/{components-DdzHh3a_.js → components-Ci_BTx00.js} +2322 -2292
  55. package/dist/components-Ci_BTx00.js.map +1 -0
  56. package/dist/composables/index.d.ts +3 -2
  57. package/dist/composables/index.js +10 -11
  58. package/dist/composables/useGeneratedAnalysis.d.ts +62 -0
  59. package/dist/composables/useJobsStatusTray.d.ts +48 -4
  60. package/dist/composables/usePlatformContext.d.ts +3 -0
  61. package/dist/composables/usePluginClient.d.ts +17 -8
  62. package/dist/{composables-BUUphBqg.js → composables-C0VEJ73O.js} +154 -38
  63. package/dist/composables-C0VEJ73O.js.map +1 -0
  64. package/dist/experiment-utils-CxkruZ3G.js +392 -0
  65. package/dist/experiment-utils-CxkruZ3G.js.map +1 -0
  66. package/dist/generated/schema.d.ts +7 -0
  67. package/dist/generated-ui/main.d.ts +0 -0
  68. package/dist/index.d.ts +1 -0
  69. package/dist/index.js +15 -18
  70. package/dist/index.js.map +1 -1
  71. package/dist/install.js +7 -8
  72. package/dist/install.js.map +1 -1
  73. package/dist/plotly.min-BR53hja4.js +180634 -0
  74. package/dist/plotly.min-BR53hja4.js.map +1 -0
  75. package/dist/stores/auth.d.ts +2 -2
  76. package/dist/stores/index.js +1 -1
  77. package/dist/styles.css +8657 -8217
  78. package/dist/tailwind.preset.d.ts +5 -0
  79. package/dist/tailwind.preset.js +7 -2
  80. package/dist/tailwind.preset.js.map +1 -1
  81. package/dist/templates/index.js +4 -3
  82. package/dist/templates/packs.d.ts +0 -1
  83. package/dist/{templates-CNbPQNID.js → templates-Cdj93S9C.js} +2 -4
  84. package/dist/templates-Cdj93S9C.js.map +1 -0
  85. package/dist/types/components.d.ts +2 -0
  86. package/dist/types/form-builder.d.ts +1 -1
  87. package/dist/types/generated-ui.d.ts +183 -0
  88. package/dist/types/index.d.ts +2 -1
  89. package/dist/types/index.js +1 -1
  90. package/dist/types/instrument.d.ts +1 -0
  91. package/dist/types/jobs.d.ts +7 -1
  92. package/dist/types/platform.d.ts +2 -0
  93. package/dist/{useControlSchema-BZNdalmL.js → useControlSchema-B_qgU4rW.js} +1882 -172
  94. package/dist/useControlSchema-B_qgU4rW.js.map +1 -0
  95. package/dist/{useDropdownState-Bb-c_PeE.js → useDropdownState-gVaMXtwW.js} +2 -2
  96. package/dist/{useDropdownState-Bb-c_PeE.js.map → useDropdownState-gVaMXtwW.js.map} +1 -1
  97. package/dist/{useExperimentSelector-DRbj6vse.js → useExperimentSelector-BuQZRgMt.js} +4 -255
  98. package/dist/useExperimentSelector-BuQZRgMt.js.map +1 -0
  99. package/dist/{useFormBuilder-DKekvXRs.js → useFormBuilder-D1G5J5Z5.js} +2 -2
  100. package/dist/{useFormBuilder-DKekvXRs.js.map → useFormBuilder-D1G5J5Z5.js.map} +1 -1
  101. package/dist/{useAnalysisArtifacts-C3l0a0vu.js → useProtocolTemplates-DeaOmMaw.js} +307 -475
  102. package/dist/useProtocolTemplates-DeaOmMaw.js.map +1 -0
  103. package/package.json +7 -3
  104. package/src/__tests__/components/BaseSelect.test.ts +52 -0
  105. package/src/__tests__/components/BaseToggle.test.ts +40 -0
  106. package/src/__tests__/components/GeneratedPathInput.test.ts +132 -0
  107. package/src/__tests__/components/GeneratedPlotlyResult.test.ts +117 -0
  108. package/src/__tests__/components/GeneratedPluginView.test.ts +240 -0
  109. package/src/__tests__/components/GeneratedResultRenderer.test.ts +93 -0
  110. package/src/__tests__/components/InstrumentAlertLog.test.ts +59 -0
  111. package/src/__tests__/components/PluginWorkspaceView.test.ts +68 -14
  112. package/src/__tests__/components/SectionCard.test.ts +181 -0
  113. package/src/__tests__/composables/formBuilderRegistry.test.ts +5 -1
  114. package/src/__tests__/composables/useApi.test.ts +8 -0
  115. package/src/__tests__/composables/useGeneratedAnalysis.test.ts +1742 -0
  116. package/src/__tests__/composables/useJobsStatusTray.test.ts +179 -1
  117. package/src/__tests__/composables/usePlatformContext.test.ts +28 -0
  118. package/src/__tests__/composables/usePluginClient.test.ts +402 -21
  119. package/src/__tests__/composables/usePluginConfig.test.ts +323 -7
  120. package/src/__tests__/docs/extractDocsTemplates.test.ts +0 -1
  121. package/src/__tests__/generatedUi.test.ts +119 -0
  122. package/src/__tests__/templates/templates.test.ts +1 -1
  123. package/src/__tests__/types/GeneratedJsonSchema.test.ts +62 -0
  124. package/src/components/BaseSelect.vue +16 -2
  125. package/src/components/BaseToggle.vue +3 -1
  126. package/src/components/FileUploader.vue +49 -11
  127. package/src/components/GeneratedPathInput.vue +218 -0
  128. package/src/components/GeneratedPlotlyResult.vue +87 -0
  129. package/src/components/GeneratedPluginView.vue +279 -0
  130. package/src/components/GeneratedResultRenderer.vue +137 -0
  131. package/src/components/InstrumentAlertLog.vue +2 -2
  132. package/src/components/JobsStatusTray.vue +14 -8
  133. package/src/components/PluginWorkspaceView.props.ts +1 -1
  134. package/src/components/PluginWorkspaceView.vue +1 -5
  135. package/src/components/SectionCard.story.vue +163 -0
  136. package/src/components/SectionCard.vue +98 -0
  137. package/src/components/index.ts +5 -0
  138. package/src/composables/formBuilderRegistry.ts +2 -0
  139. package/src/composables/index.ts +19 -0
  140. package/src/composables/useApi.ts +1 -0
  141. package/src/composables/useGeneratedAnalysis.ts +1270 -0
  142. package/src/composables/useJobsStatusTray.ts +234 -45
  143. package/src/composables/usePluginClient.ts +164 -30
  144. package/src/composables/usePluginConfig.ts +156 -20
  145. package/src/generated/schema.ts +130 -0
  146. package/src/generated-ui/main.ts +21 -0
  147. package/src/index.ts +3 -0
  148. package/src/jobs.ts +5 -0
  149. package/src/plotly-dist.d.ts +3 -0
  150. package/src/styles/components/section-card.css +161 -0
  151. package/src/styles/index.css +1 -0
  152. package/src/styles/variables.css +25 -0
  153. package/src/tailwind.preset.ts +5 -0
  154. package/src/templates/packs.ts +0 -3
  155. package/src/types/components.ts +12 -0
  156. package/src/types/form-builder.ts +1 -0
  157. package/src/types/generated-ui.ts +189 -0
  158. package/src/types/index.ts +4 -0
  159. package/src/types/instrument.ts +1 -0
  160. package/src/types/jobs.ts +10 -1
  161. package/src/types/platform.ts +2 -0
  162. package/dist/BaseButton-Dgqrze41.js +0 -74
  163. package/dist/BaseButton-Dgqrze41.js.map +0 -1
  164. package/dist/BaseModal-B9UA8Y_I.js +0 -165
  165. package/dist/BaseModal-B9UA8Y_I.js.map +0 -1
  166. package/dist/BaseSelect-ekgr9fDo.js +0 -179
  167. package/dist/BaseSelect-ekgr9fDo.js.map +0 -1
  168. package/dist/ExperimentPopover-Ryusjrhv.js +0 -4
  169. package/dist/ExperimentSelectorModal-Cg4-LXBD.js +0 -5
  170. package/dist/ExperimentSelectorModal-DZeSd-yr.js.map +0 -1
  171. package/dist/SettingsModal-Bl_9w2Y3.js +0 -5
  172. package/dist/components-DdzHh3a_.js.map +0 -1
  173. package/dist/composables-BUUphBqg.js.map +0 -1
  174. package/dist/experiment-utils-Bfa7CwPU.js +0 -108
  175. package/dist/experiment-utils-Bfa7CwPU.js.map +0 -1
  176. package/dist/templates-CNbPQNID.js.map +0 -1
  177. package/dist/useAnalysisArtifacts-C3l0a0vu.js.map +0 -1
  178. package/dist/useControlSchema-BZNdalmL.js.map +0 -1
  179. package/dist/useEventListener-CfVkP9Xz.js +0 -57
  180. package/dist/useEventListener-CfVkP9Xz.js.map +0 -1
  181. package/dist/useExperimentSelector-DRbj6vse.js.map +0 -1
@@ -0,0 +1,21 @@
1
+ import { createPinia } from 'pinia'
2
+ import { createApp, h } from 'vue'
3
+
4
+ import GeneratedPluginView from '../components/GeneratedPluginView.vue'
5
+ import '../styles/index.css'
6
+
7
+ function generatedApiBase(location: Location): string {
8
+ const pluginPath = new URL('.', location.href).pathname.replace(/\/$/, '')
9
+ return `/api${pluginPath}`
10
+ }
11
+
12
+ const app = createApp({
13
+ name: 'MintGeneratedUiApp',
14
+ render: () => h(GeneratedPluginView, {
15
+ baseUrl: generatedApiBase(window.location),
16
+ showStandaloneLabel: true,
17
+ }),
18
+ })
19
+
20
+ app.use(createPinia())
21
+ app.mount('#app')
package/src/index.ts CHANGED
@@ -28,6 +28,9 @@ export * from './instrument'
28
28
  // Job state helpers
29
29
  export * from './jobs'
30
30
 
31
+ // Experimental generated analysis workspace
32
+ export * from './generated/schema'
33
+
31
34
  // LCMS sequence helpers
32
35
  export * from './lcms'
33
36
 
package/src/jobs.ts CHANGED
@@ -43,6 +43,11 @@ export function normalizeJobState(job: JobStateInput): JobState {
43
43
  const capabilities = resolveJobCapabilities(job)
44
44
  return {
45
45
  ...job,
46
+ definition_id: job.definition_id
47
+ ?? (typeof job.metadata.definition_id === 'string' ? job.metadata.definition_id : null),
48
+ result_status: job.result_status
49
+ ?? (job.status === 'completed' && job.metadata.has_result === true ? 'available' : 'none'),
50
+ result_expires_at: job.result_expires_at ?? null,
46
51
  progress: {
47
52
  ...job.progress,
48
53
  percent: normalizeJobPercent(job.progress.percent),
@@ -0,0 +1,3 @@
1
+ declare module 'plotly.js-dist-min' {
2
+ export * from 'plotly.js'
3
+ }
@@ -0,0 +1,161 @@
1
+ /* SectionCard — the MINT 1.1 one-card system.
2
+ *
3
+ * One card per page region: 12px radius, one shadow token (--card-shadow),
4
+ * a single header strip, and hairline-separated regions inside — never a
5
+ * card nested in a card.
6
+ */
7
+
8
+ .mint-section-card {
9
+ display: flex;
10
+ flex-direction: column;
11
+ border-radius: 12px;
12
+ border: 1px solid var(--border-color);
13
+ background: var(--bg-secondary);
14
+ box-shadow: var(--card-shadow);
15
+ overflow: hidden;
16
+ transition: background-color var(--mint-transition), border-color var(--mint-transition);
17
+ }
18
+
19
+ /* Fill the height the parent offers: the body takes the slack and scrolls,
20
+ * so the header and footer stay pinned to the card's edges. */
21
+ .mint-section-card--fill {
22
+ flex: 1;
23
+ min-height: 0;
24
+ }
25
+
26
+ .mint-section-card--fill .mint-section-card__body {
27
+ flex: 1;
28
+ min-height: 0;
29
+ overflow: auto;
30
+ }
31
+
32
+ .mint-section-card__header {
33
+ display: flex;
34
+ align-items: center;
35
+ gap: 0.625rem;
36
+ padding: 0.6875rem 1rem;
37
+ border-bottom: 1px solid var(--border-color);
38
+ flex-shrink: 0;
39
+ }
40
+
41
+ .mint-section-card__header--divider-light {
42
+ border-bottom-color: var(--border-light);
43
+ }
44
+
45
+ .mint-section-card__icon-chip {
46
+ display: inline-flex;
47
+ align-items: center;
48
+ justify-content: center;
49
+ flex-shrink: 0;
50
+ width: 1.375rem;
51
+ height: 1.375rem;
52
+ border-radius: 6px;
53
+ }
54
+
55
+ .mint-section-card__icon {
56
+ width: 0.8125rem;
57
+ height: 0.8125rem;
58
+ }
59
+
60
+ .mint-section-card__icon-chip--primary {
61
+ background: var(--color-primary-soft);
62
+ color: var(--color-primary);
63
+ }
64
+
65
+ .mint-section-card__icon-chip--experiment {
66
+ background: var(--color-experiment-soft);
67
+ color: var(--color-experiment);
68
+ }
69
+
70
+ .mint-section-card__icon-chip--project {
71
+ background: var(--color-project-soft);
72
+ color: var(--color-project);
73
+ }
74
+
75
+ .mint-section-card__icon-chip--success {
76
+ background: var(--mint-success-bg);
77
+ color: var(--mint-success);
78
+ }
79
+
80
+ .mint-section-card__icon-chip--error {
81
+ background: var(--mint-error-bg);
82
+ color: var(--mint-error);
83
+ }
84
+
85
+ .mint-section-card__icon-chip--warning {
86
+ background: var(--mint-warning-bg);
87
+ color: var(--mint-warning);
88
+ }
89
+
90
+ .mint-section-card__icon-chip--info {
91
+ background: var(--mint-info-bg);
92
+ color: var(--mint-info);
93
+ }
94
+
95
+ .mint-section-card__title {
96
+ margin: 0;
97
+ font-size: 0.8125rem;
98
+ font-weight: 600;
99
+ color: var(--text-primary);
100
+ }
101
+
102
+ .mint-section-card__title--uppercase {
103
+ font-size: 0.75rem;
104
+ letter-spacing: 0.08em;
105
+ text-transform: uppercase;
106
+ color: var(--text-secondary);
107
+ }
108
+
109
+ .mint-section-card__count {
110
+ font-family: 'Fira Code', monospace;
111
+ font-size: 0.6875rem;
112
+ color: var(--text-muted);
113
+ }
114
+
115
+ .mint-section-card__spacer {
116
+ flex: 1;
117
+ }
118
+
119
+ .mint-section-card__toolbar {
120
+ flex-shrink: 0;
121
+ }
122
+
123
+ .mint-section-card__footer {
124
+ display: flex;
125
+ align-items: center;
126
+ justify-content: space-between;
127
+ padding: 0.5rem 1rem;
128
+ border-top: 1px solid var(--border-color);
129
+ background: var(--bg-primary);
130
+ flex-shrink: 0;
131
+ }
132
+
133
+ /* Hairline row helpers — regions inside a card separate with 1px lines,
134
+ * rendered by a 1px gap over a hairline-colored track. */
135
+ .mint-section-card__rows {
136
+ display: flex;
137
+ flex-direction: column;
138
+ gap: 1px;
139
+ background: var(--border-light);
140
+ }
141
+
142
+ .mint-section-card__row {
143
+ display: flex;
144
+ align-items: center;
145
+ gap: 0.625rem;
146
+ padding: 0.5625rem 1rem;
147
+ background: var(--bg-secondary);
148
+ transition: background-color var(--mint-transition);
149
+ }
150
+
151
+ a.mint-section-card__row,
152
+ button.mint-section-card__row {
153
+ cursor: pointer;
154
+ color: inherit;
155
+ text-decoration: none;
156
+ }
157
+
158
+ a.mint-section-card__row:hover,
159
+ button.mint-section-card__row:hover {
160
+ background: var(--bg-primary);
161
+ }
@@ -28,6 +28,7 @@
28
28
  @import './components/plate-map-editor.css';
29
29
  @import './components/radio-group.css';
30
30
  @import './components/sample-legend.css';
31
+ @import './components/section-card.css';
31
32
  @import './components/select.css';
32
33
  @import './components/skeleton.css';
33
34
  @import './components/slider.css';
@@ -36,6 +36,18 @@
36
36
  --color-cta-hover: #EA580C;
37
37
  --color-purple: #8B5CF6;
38
38
 
39
+ /* Entity accent colors — experiments (cyan) and projects (sky), from the
40
+ MINT 1.1 card system. -soft backs icon chips and pills, -border outlines
41
+ pills that sit on a card surface. */
42
+ --color-experiment: #06B6D4;
43
+ --color-experiment-hover: #0891B2;
44
+ --color-experiment-soft: rgba(6, 182, 212, 0.12);
45
+ --color-experiment-border: rgba(6, 182, 212, 0.3);
46
+ --color-project: #0EA5E9;
47
+ --color-project-hover: #0284C7;
48
+ --color-project-soft: rgba(14, 165, 233, 0.12);
49
+ --color-project-border: rgba(14, 165, 233, 0.32);
50
+
39
51
  /* MINT brand mark — used for browser theme-color, marketing chrome, app icon background */
40
52
  --mint-brand: #7BD0B5;
41
53
  --mint-brand-hover: #5FB89A;
@@ -51,6 +63,8 @@
51
63
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
52
64
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
53
65
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
66
+ /* The MINT 1.1 card system uses exactly one shadow for every card. */
67
+ --card-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.04), 0 1px 3px 0 rgb(0 0 0 / 0.06);
54
68
 
55
69
  /* Border radius */
56
70
  --radius-sm: 0.25rem;
@@ -148,6 +162,17 @@ html.dark {
148
162
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.2);
149
163
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.2);
150
164
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.2);
165
+ --card-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.24), 0 1px 3px 0 rgb(0 0 0 / 0.32);
166
+
167
+ /* Entity accent colors - Dark mode */
168
+ --color-experiment: #22D3EE;
169
+ --color-experiment-hover: #67E8F9;
170
+ --color-experiment-soft: rgba(34, 211, 238, 0.16);
171
+ --color-experiment-border: rgba(34, 211, 238, 0.36);
172
+ --color-project: #38BDF8;
173
+ --color-project-hover: #7DD3FC;
174
+ --color-project-soft: rgba(56, 189, 248, 0.16);
175
+ --color-project-border: rgba(56, 189, 248, 0.38);
151
176
 
152
177
  /* Semantic colors - Dark mode */
153
178
  --mint-success-bg: rgba(16, 185, 129, 0.15);
@@ -18,6 +18,10 @@ const mintPreset = {
18
18
  'warning-hover': 'var(--mint-warning-hover)',
19
19
  brand: 'var(--mint-brand)',
20
20
  'brand-hover': 'var(--mint-brand-hover)',
21
+ experiment: 'var(--color-experiment)',
22
+ 'experiment-hover': 'var(--color-experiment-hover)',
23
+ project: 'var(--color-project)',
24
+ 'project-hover': 'var(--color-project-hover)',
21
25
  },
22
26
  bg: {
23
27
  primary: 'var(--mint-bg-primary)',
@@ -50,6 +54,7 @@ const mintPreset = {
50
54
  mint: '0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)',
51
55
  'mint-md': '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)',
52
56
  'mint-lg': '0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)',
57
+ 'mint-card': 'var(--card-shadow)',
53
58
  },
54
59
  transitionDuration: {
55
60
  mint: '150ms',
@@ -13,7 +13,6 @@ export interface BioTemplatePackEntry {
13
13
  frontend_adapters: readonly string[]
14
14
  components: readonly string[]
15
15
  add_command: string
16
- init_command: string
17
16
  docs_command: string
18
17
  }
19
18
 
@@ -55,7 +54,6 @@ function createPack(definition: BioTemplatePackDefinition): BioTemplatePackEntry
55
54
  frontend_adapters: collectTemplateField(definition.templates, 'frontend_adapters'),
56
55
  components: collectTemplateField(definition.templates, 'components'),
57
56
  add_command: `mint add data-template-pack ${definition.name} --page`,
58
- init_command: `mint init --template ${definition.name}`,
59
57
  docs_command: `mint docs template-pack ${definition.name}`,
60
58
  }
61
59
  }
@@ -155,7 +153,6 @@ export function searchBioTemplatePacks(query: string): readonly BioTemplatePackE
155
153
  entry.label,
156
154
  entry.purpose,
157
155
  entry.add_command,
158
- entry.init_command,
159
156
  entry.docs_command,
160
157
  ...entry.templates,
161
158
  ...entry.aliases,
@@ -66,6 +66,18 @@ export interface FormFieldProps {
66
66
  required?: boolean
67
67
  }
68
68
 
69
+ // Section card types
70
+ export type SectionCardAccent =
71
+ | 'primary'
72
+ | 'experiment'
73
+ | 'project'
74
+ | 'success'
75
+ | 'error'
76
+ | 'warning'
77
+ | 'info'
78
+
79
+ export type SectionCardDivider = 'strong' | 'light'
80
+
69
81
  // Sidebar types
70
82
  export type SidebarBadgeTone =
71
83
  | 'primary'
@@ -27,6 +27,7 @@ export type FormFieldType =
27
27
  | 'time'
28
28
  | 'datetime'
29
29
  | 'file'
30
+ | 'path'
30
31
  | 'formula'
31
32
  | 'sequence'
32
33
  | 'molecule'
@@ -0,0 +1,189 @@
1
+ import type { JobState, JobStateInput } from './jobs'
2
+
3
+ export interface GeneratedJsonSchema {
4
+ type?: string | string[]
5
+ format?: string
6
+ title?: string
7
+ description?: string
8
+ default?: unknown
9
+ const?: unknown
10
+ enum?: unknown[]
11
+ minimum?: number
12
+ maximum?: number
13
+ exclusiveMinimum?: number
14
+ minLength?: number
15
+ maxLength?: number
16
+ pattern?: string
17
+ minItems?: number
18
+ maxItems?: number
19
+ writeOnly?: boolean
20
+ properties?: Record<string, GeneratedJsonSchema>
21
+ additionalProperties?: boolean | GeneratedJsonSchema
22
+ required?: string[]
23
+ anyOf?: GeneratedJsonSchema[]
24
+ allOf?: GeneratedJsonSchema[]
25
+ oneOf?: GeneratedJsonSchema[]
26
+ prefixItems?: GeneratedJsonSchema[]
27
+ items?: GeneratedJsonSchema
28
+ discriminator?: {
29
+ propertyName: string
30
+ mapping?: Record<string, string>
31
+ }
32
+ $ref?: string
33
+ $defs?: Record<string, GeneratedJsonSchema>
34
+ 'x-mint-component'?: 'path'
35
+ }
36
+
37
+ export interface PluginJobPathInput {
38
+ kind: 'path'
39
+ files: File[]
40
+ relativePaths: string[]
41
+ rootName?: string
42
+ signal?: AbortSignal
43
+ }
44
+
45
+ export interface PluginJobPathUpload {
46
+ token: string
47
+ kind: 'file' | 'directory'
48
+ name: string
49
+ size: number
50
+ }
51
+
52
+ export interface PluginJobStagedPartInput<Metadata = Record<string, unknown>> {
53
+ job: GeneratedAnalysisJob | string
54
+ key: string
55
+ file: Blob
56
+ metadata: Metadata
57
+ expectedSize?: number
58
+ expectedSha256?: string
59
+ signal?: AbortSignal
60
+ }
61
+
62
+ export interface PluginJobStagedPart<Metadata = unknown> {
63
+ key: string
64
+ size: number
65
+ sha256: string
66
+ metadata: Metadata
67
+ }
68
+
69
+ export interface PluginJobStagingSummary {
70
+ job_id: string
71
+ sealed: boolean
72
+ part_count: number
73
+ total_bytes: number
74
+ }
75
+
76
+ export interface PluginJobStagedPartUploadResult<Metadata = unknown> {
77
+ part: PluginJobStagedPart<Metadata>
78
+ staging: PluginJobStagingSummary
79
+ }
80
+
81
+ export interface PluginJobStagingPagination {
82
+ offset?: number
83
+ limit?: number
84
+ }
85
+
86
+ export interface PluginJobStaging<Metadata = unknown> extends PluginJobStagingSummary {
87
+ parts: PluginJobStagedPart<Metadata>[]
88
+ offset: number
89
+ limit: number
90
+ next_offset: number | null
91
+ has_more: boolean
92
+ }
93
+
94
+ export type GeneratedJobLifecycle = 'process' | 'staged' | 'service'
95
+
96
+ export type GeneratedJobProfile =
97
+ | { kind: 'process' }
98
+ | {
99
+ kind: 'staged'
100
+ partSchema: GeneratedJsonSchema
101
+ minParts: number
102
+ maxParts: number
103
+ maxBytes: number
104
+ }
105
+ | {
106
+ kind: 'service'
107
+ timeoutSeconds: number
108
+ maxConcurrency: number
109
+ }
110
+
111
+ export interface GeneratedJobDefinition {
112
+ id: string
113
+ title: string
114
+ description: string
115
+ cpu: number
116
+ /** Whether integrated submission requires a platform or current-plugin administrator. */
117
+ requires_admin?: boolean
118
+ /** Defaults to process for manifests generated before lifecycle profiles. */
119
+ lifecycle?: GeneratedJobLifecycle
120
+ /** Defaults to `{ kind: 'process' }` for older manifests. */
121
+ profile?: GeneratedJobProfile
122
+ input_schema: GeneratedJsonSchema
123
+ output_schema: GeneratedJsonSchema
124
+ result_schema?: GeneratedJsonSchema
125
+ }
126
+
127
+ export interface GeneratedAnalysisManifest {
128
+ schema_version: '1'
129
+ plugin: {
130
+ name: string
131
+ version: string
132
+ description: string
133
+ routes_prefix: string
134
+ }
135
+ ui: {
136
+ title: string
137
+ description: string
138
+ }
139
+ jobs: GeneratedJobDefinition[]
140
+ }
141
+
142
+ export interface GeneratedSession {
143
+ id: string
144
+ tab_id: string
145
+ created_at: string
146
+ last_seen_at: string
147
+ active_job_ids: string[]
148
+ }
149
+
150
+ export type GeneratedAnalysisResult =
151
+ | { kind: 'text'; text: string }
152
+ | { kind: 'json'; value: unknown }
153
+ | { kind: 'table'; columns: string[]; rows: Record<string, unknown>[] }
154
+ | { kind: 'image'; media_type: string; data: string; alt: string }
155
+ | {
156
+ kind: 'plotly'
157
+ spec: Record<string, unknown>
158
+ fallback?: { media_type: 'image/png'; data: string }
159
+ }
160
+ | {
161
+ kind: 'artifact'
162
+ id: string
163
+ name: string
164
+ media_type: string
165
+ size: number | null
166
+ data?: string
167
+ download_url?: string
168
+ download_expires_at?: string
169
+ sha256?: string
170
+ managed?: boolean
171
+ }
172
+
173
+ export interface GeneratedAnalysisJobInput extends JobStateInput {
174
+ definition_id?: string | null
175
+ metadata: JobStateInput['metadata'] & {
176
+ definition_id?: string
177
+ client_request_id?: string
178
+ has_result?: boolean
179
+ }
180
+ }
181
+
182
+ /** Canonical job state exposed after transport payloads cross the SDK boundary. */
183
+ export interface GeneratedAnalysisJob extends JobState {
184
+ metadata: JobState['metadata'] & {
185
+ definition_id?: string
186
+ client_request_id?: string
187
+ has_result?: boolean
188
+ }
189
+ }
@@ -16,6 +16,8 @@ export type {
16
16
  RadioOption,
17
17
  RadioOptionInput,
18
18
  FormFieldProps,
19
+ SectionCardAccent,
20
+ SectionCardDivider,
19
21
  SidebarBadgeTone,
20
22
  SidebarToolSection,
21
23
  SidebarToolSectionAction,
@@ -176,6 +178,8 @@ export type {
176
178
  TreeNode,
177
179
  } from './components'
178
180
 
181
+ export type * from './generated-ui'
182
+
179
183
  export type {
180
184
  AnalysisArtifactStatus,
181
185
  AnalysisArtifactStatusFilter,
@@ -49,6 +49,7 @@ export interface InstrumentAlertBody {
49
49
 
50
50
  export interface InstrumentAlert {
51
51
  id?: string
52
+ event_key: string
52
53
  instrument_id: string
53
54
  instrument_name?: string | null
54
55
  level: InstrumentAlertLevel
package/src/types/jobs.ts CHANGED
@@ -22,6 +22,7 @@ export interface JobState {
22
22
  job_id: string
23
23
  kind: string
24
24
  name: string
25
+ definition_id: string | null
25
26
  status: JobStatus
26
27
  progress: JobProgress
27
28
  queue_position: number
@@ -42,12 +43,20 @@ export interface JobState {
42
43
  completed_at: string | null
43
44
  can_cancel: boolean
44
45
  can_delete: boolean
46
+ result_status: 'none' | 'available' | 'expired'
47
+ result_expires_at: string | null
45
48
  }
46
49
 
47
50
  /** Backward-compatible transport shape accepted from pre-capability backends. */
48
- export type JobStateInput = Omit<JobState, 'can_cancel' | 'can_delete'> & {
51
+ export type JobStateInput = Omit<
52
+ JobState,
53
+ 'can_cancel' | 'can_delete' | 'definition_id' | 'result_status' | 'result_expires_at'
54
+ > & {
49
55
  can_cancel?: boolean | null
50
56
  can_delete?: boolean | null
57
+ definition_id?: string | null
58
+ result_status?: 'none' | 'available' | 'expired'
59
+ result_expires_at?: string | null
51
60
  }
52
61
 
53
62
  export interface JobListPayload {
@@ -10,6 +10,8 @@ export interface PluginInfo {
10
10
  color?: string
11
11
  route_prefix: string
12
12
  api_prefix: string
13
+ /** Settings route selected by the platform for this plugin runtime. */
14
+ settings_api?: 'plugin' | 'platform'
13
15
  nav_items?: PluginNavItem[]
14
16
  settings?: PluginSettings
15
17
  }
@@ -1,74 +0,0 @@
1
- import { createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, renderSlot } from "vue";
2
- //#region src/components/BaseButton.vue?vue&type=script&setup=true&lang.ts
3
- var _hoisted_1 = ["type", "disabled"];
4
- var _hoisted_2 = {
5
- key: 0,
6
- class: "mint-button__spinner",
7
- fill: "none",
8
- viewBox: "0 0 24 24"
9
- };
10
- //#endregion
11
- //#region src/components/BaseButton.vue
12
- var BaseButton_default = /* @__PURE__ */ defineComponent({
13
- __name: "BaseButton",
14
- props: {
15
- variant: { default: "primary" },
16
- size: { default: "md" },
17
- disabled: {
18
- type: Boolean,
19
- default: false
20
- },
21
- loading: {
22
- type: Boolean,
23
- default: false
24
- },
25
- type: { default: "button" },
26
- fullWidth: {
27
- type: Boolean,
28
- default: false
29
- }
30
- },
31
- emits: ["click"],
32
- setup(__props, { emit: __emit }) {
33
- /** Renders a styled `<button>` with variant, size, loading spinner, and full-width options. */
34
- const props = __props;
35
- const emit = __emit;
36
- function handleClick(event) {
37
- if (!props.disabled && !props.loading) emit("click", event);
38
- }
39
- return (_ctx, _cache) => {
40
- return openBlock(), createElementBlock("button", {
41
- type: __props.type,
42
- disabled: __props.disabled || __props.loading,
43
- class: normalizeClass([
44
- "mint-button",
45
- `mint-button--${__props.variant}`,
46
- `mint-button--${__props.size}`,
47
- __props.fullWidth ? "mint-button--full-width" : "",
48
- __props.disabled || __props.loading ? "mint-button--disabled" : ""
49
- ]),
50
- onClick: handleClick
51
- }, [
52
- __props.loading ? (openBlock(), createElementBlock("svg", _hoisted_2, [..._cache[0] || (_cache[0] = [createElementVNode("circle", {
53
- style: { "opacity": "0.25" },
54
- cx: "12",
55
- cy: "12",
56
- r: "10",
57
- stroke: "currentColor",
58
- "stroke-width": "4"
59
- }, null, -1), createElementVNode("path", {
60
- style: { "opacity": "0.75" },
61
- fill: "currentColor",
62
- d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
63
- }, null, -1)])])) : createCommentVNode("", true),
64
- renderSlot(_ctx.$slots, "icon-left"),
65
- renderSlot(_ctx.$slots, "default"),
66
- renderSlot(_ctx.$slots, "icon-right")
67
- ], 10, _hoisted_1);
68
- };
69
- }
70
- });
71
- //#endregion
72
- export { BaseButton_default as t };
73
-
74
- //# sourceMappingURL=BaseButton-Dgqrze41.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseButton-Dgqrze41.js","names":[],"sources":["../src/components/BaseButton.vue","../src/components/BaseButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/** Renders a styled `<button>` with variant, size, loading spinner, and full-width options. */\nimport type { ButtonVariant, ButtonSize } from '../types'\n\ninterface Props {\n variant?: ButtonVariant\n size?: ButtonSize\n disabled?: boolean\n loading?: boolean\n type?: 'button' | 'submit' | 'reset'\n fullWidth?: boolean\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n variant: 'primary',\n size: 'md',\n disabled: false,\n loading: false,\n type: 'button',\n fullWidth: false,\n})\n\nconst emit = defineEmits<{\n click: [event: MouseEvent]\n}>()\n\nfunction handleClick(event: MouseEvent) {\n if (!props.disabled && !props.loading) {\n emit('click', event)\n }\n}\n</script>\n\n<template>\n <button\n :type=\"type\"\n :disabled=\"disabled || loading\"\n :class=\"[\n 'mint-button',\n `mint-button--${variant}`,\n `mint-button--${size}`,\n fullWidth ? 'mint-button--full-width' : '',\n (disabled || loading) ? 'mint-button--disabled' : '',\n ]\"\n @click=\"handleClick\"\n >\n <svg\n v-if=\"loading\"\n class=\"mint-button__spinner\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n style=\"opacity: 0.25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n />\n <path\n style=\"opacity: 0.75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n />\n </svg>\n <slot name=\"icon-left\" />\n <slot />\n <slot name=\"icon-right\" />\n </button>\n</template>\n\n<style>\n@import '../styles/components/button.css';\n</style>\n","<script setup lang=\"ts\">\n/** Renders a styled `<button>` with variant, size, loading spinner, and full-width options. */\nimport type { ButtonVariant, ButtonSize } from '../types'\n\ninterface Props {\n variant?: ButtonVariant\n size?: ButtonSize\n disabled?: boolean\n loading?: boolean\n type?: 'button' | 'submit' | 'reset'\n fullWidth?: boolean\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n variant: 'primary',\n size: 'md',\n disabled: false,\n loading: false,\n type: 'button',\n fullWidth: false,\n})\n\nconst emit = defineEmits<{\n click: [event: MouseEvent]\n}>()\n\nfunction handleClick(event: MouseEvent) {\n if (!props.disabled && !props.loading) {\n emit('click', event)\n }\n}\n</script>\n\n<template>\n <button\n :type=\"type\"\n :disabled=\"disabled || loading\"\n :class=\"[\n 'mint-button',\n `mint-button--${variant}`,\n `mint-button--${size}`,\n fullWidth ? 'mint-button--full-width' : '',\n (disabled || loading) ? 'mint-button--disabled' : '',\n ]\"\n @click=\"handleClick\"\n >\n <svg\n v-if=\"loading\"\n class=\"mint-button__spinner\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n style=\"opacity: 0.25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n />\n <path\n style=\"opacity: 0.75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n />\n </svg>\n <slot name=\"icon-left\" />\n <slot />\n <slot name=\"icon-right\" />\n </button>\n</template>\n\n<style>\n@import '../styles/components/button.css';\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECaA,MAAM,QAAQ;EASd,MAAM,OAAO;EAIb,SAAS,YAAY,OAAmB;AACtC,OAAI,CAAC,MAAM,YAAY,CAAC,MAAM,QAC5B,MAAK,SAAS,MAAK;;;uBAMrB,mBAmCS,UAAA;IAlCN,MAAM,QAAA;IACN,UAAU,QAAA,YAAY,QAAA;IACtB,OAAK,eAAA;;qBAA+C,QAAA;qBAAiC,QAAA;KAAc,QAAA,YAAS,4BAAA;KAA0C,QAAA,YAAY,QAAA,UAAO,0BAAA;;IAOzK,SAAO;;IAGA,QAAA,WAAA,WAAA,EADR,mBAmBM,OAnBN,YAmBM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAbJ,mBAOE,UAAA;KANA,OAAA,EAAA,WAAA,QAAqB;KACrB,IAAG;KACH,IAAG;KACH,GAAE;KACF,QAAO;KACP,gBAAa;kBAEf,mBAIE,QAAA;KAHA,OAAA,EAAA,WAAA,QAAqB;KACrB,MAAK;KACL,GAAE;;IAGN,WAAyB,KAAA,QAAA,YAAA;IACzB,WAAQ,KAAA,QAAA,UAAA;IACR,WAA0B,KAAA,QAAA,aAAA"}