@morscherlab/mint-sdk 1.4.0-beta.9 → 1.4.1

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 (198) hide show
  1. package/README.md +14 -3
  2. package/dist/{AlertBox-B2Bgr3ei.js → AlertBox-DwgNTEqf.js} +3 -3
  3. package/dist/{AlertBox-B2Bgr3ei.js.map → AlertBox-DwgNTEqf.js.map} +1 -1
  4. package/dist/{AppSidebar-Dq9W1jE2.js → AppSidebar-CZZaxni0.js} +1103 -144
  5. package/dist/AppSidebar-CZZaxni0.js.map +1 -0
  6. package/dist/{ConfirmDialog-nbJj51is.js → ConfirmDialog-CjWoxAD1.js} +2 -2
  7. package/dist/{ConfirmDialog-nbJj51is.js.map → ConfirmDialog-CjWoxAD1.js.map} +1 -1
  8. package/dist/{ExperimentPopover-5T1fAq2L.js → ExperimentPopover-DujiuQIO.js} +5 -5
  9. package/dist/{ExperimentPopover-5T1fAq2L.js.map → ExperimentPopover-DujiuQIO.js.map} +1 -1
  10. package/dist/{ExperimentSelectorModal-65peG4Up.js → ExperimentSelectorModal-B4j4eUOJ.js} +114 -98
  11. package/dist/ExperimentSelectorModal-B4j4eUOJ.js.map +1 -0
  12. package/dist/{SegmentedControl-BtnnjWzs.js → SegmentedControl-DyUPH3I5.js} +2 -2
  13. package/dist/{SegmentedControl-BtnnjWzs.js.map → SegmentedControl-DyUPH3I5.js.map} +1 -1
  14. package/dist/{SettingsModal-483nyI6b.js → SettingsModal-D2MOOtuO.js} +26 -25
  15. package/dist/SettingsModal-D2MOOtuO.js.map +1 -0
  16. package/dist/__stories__/experiment-helpers.d.ts +10 -0
  17. package/dist/__tests__/components/AppTopBarOnboarding.test.d.ts +1 -0
  18. package/dist/__tests__/components/FloatingPanelsInModal.test.d.ts +1 -0
  19. package/dist/__tests__/composables/useFloatingPanel.test.d.ts +1 -0
  20. package/dist/__tests__/composables/useOnboarding.test.d.ts +1 -0
  21. package/dist/__tests__/styles/paletteTokens.test.d.ts +1 -0
  22. package/dist/__tests__/styles/v2AuditRules.test.d.ts +1 -0
  23. package/dist/components/AppTopBar.vue.d.ts +20 -5
  24. package/dist/components/BaseButton.vue.d.ts +4 -2
  25. package/dist/components/ExperimentSelectorModal.vue.d.ts +15 -1
  26. package/dist/components/JobsStatusTray.vue.d.ts +15 -4
  27. package/dist/components/PluginWorkspaceView.props.d.ts +3 -0
  28. package/dist/components/PluginWorkspaceView.vue.d.ts +3 -0
  29. package/dist/components/SmartGroupFieldRecipe.vue.d.ts +3 -3
  30. package/dist/components/internal/AppTopBarOnboardingInternal.vue.d.ts +7 -0
  31. package/dist/components/internal/AppTopBarPageSelectorInternal.vue.d.ts +2 -1
  32. package/dist/components/internal/AutoGroupModalInternal.vue.d.ts +2 -2
  33. package/dist/components/internal/OnboardingLayerInternal.vue.d.ts +7 -0
  34. package/dist/components/internal/WorkspaceShellInternal.vue.d.ts +8 -0
  35. package/dist/composables/pluginWorkspaceModel.d.ts +2 -2
  36. package/dist/composables/useFileImport.d.ts +7 -0
  37. package/dist/composables/useFloatingPanel.d.ts +29 -0
  38. package/dist/composables/useJobCenter.d.ts +41 -3
  39. package/dist/composables/useOnboarding.d.ts +119 -0
  40. package/dist/{controlSchemaModel-B8CTXagP.js → controlSchemaModel-Bsg0t5Ab.js} +2 -2
  41. package/dist/{controlSchemaModel-B8CTXagP.js.map → controlSchemaModel-Bsg0t5Ab.js.map} +1 -1
  42. package/dist/{data-CgILxDLW.js → data-Boeh4uPI.js} +13 -12
  43. package/dist/{data-CgILxDLW.js.map → data-Boeh4uPI.js.map} +1 -1
  44. package/dist/data.d.ts +1 -1
  45. package/dist/data.js +9 -9
  46. package/dist/{experiment-43OJtH7R.js → experiment-DyO54FQB.js} +25 -61
  47. package/dist/experiment-DyO54FQB.js.map +1 -0
  48. package/dist/{experimentStatus-Cqp6qNrR.js → experimentStatus-DCn2QKG7.js} +2 -2
  49. package/dist/{experimentStatus-Cqp6qNrR.js.map → experimentStatus-DCn2QKG7.js.map} +1 -1
  50. package/dist/index.js +20 -20
  51. package/dist/{install-BtLWTk6H.js → install-BEHp7Mo-.js} +15 -15
  52. package/dist/{install-BtLWTk6H.js.map → install-BEHp7Mo-.js.map} +1 -1
  53. package/dist/install.js +1 -1
  54. package/dist/{lab-MHzp-_J8.js → lab-D61eaX6f.js} +68 -61
  55. package/dist/{lab-MHzp-_J8.js.map → lab-D61eaX6f.js.map} +1 -1
  56. package/dist/lab.js +4 -4
  57. package/dist/{records-B6gpM_3e.js → records-D4aQXyZu.js} +193 -133
  58. package/dist/records-D4aQXyZu.js.map +1 -0
  59. package/dist/{runtime-7vfl_bI3.js → runtime-q-R0CNLh.js} +400 -33
  60. package/dist/runtime-q-R0CNLh.js.map +1 -0
  61. package/dist/runtime.d.ts +1 -1
  62. package/dist/runtime.js +7 -7
  63. package/dist/{shell-Cs9OJMnm.js → shell-6CGFvUUw.js} +10 -5
  64. package/dist/{shell-Cs9OJMnm.js.map → shell-6CGFvUUw.js.map} +1 -1
  65. package/dist/shell.d.ts +1 -0
  66. package/dist/shell.js +6 -6
  67. package/dist/stores/index.d.ts +1 -1
  68. package/dist/stores/index.js +2 -2
  69. package/dist/stores/settings.d.ts +4 -12
  70. package/dist/styles.css +1191 -479
  71. package/dist/types/components.d.ts +2 -0
  72. package/dist/types/index.d.ts +1 -1
  73. package/dist/types/jobs.d.ts +9 -0
  74. package/dist/types/platform.d.ts +1 -1
  75. package/dist/{useDropdownState-8yWMu-7_.js → useDropdownState-uFIz6Yv8.js} +16 -4
  76. package/dist/useDropdownState-uFIz6Yv8.js.map +1 -0
  77. package/dist/{useExperimentSamples-DHnxKFAF.js → useExperimentSamples-QEFoq4tf.js} +48 -6
  78. package/dist/useExperimentSamples-QEFoq4tf.js.map +1 -0
  79. package/dist/{useListReorder-BitdUhxn.js → useListReorder-DsuzwWGS.js} +122 -172
  80. package/dist/useListReorder-DsuzwWGS.js.map +1 -0
  81. package/dist/{useRackEditor-DiwCt77M.js → useRackEditor-KpZ4iJ6o.js} +22 -32
  82. package/dist/useRackEditor-KpZ4iJ6o.js.map +1 -0
  83. package/dist/useRealtime-B58Lo-Tm.js +508 -0
  84. package/dist/useRealtime-B58Lo-Tm.js.map +1 -0
  85. package/dist/{useRequest-D506eHi8.js → useRequest-BuDmW8Jc.js} +8 -37
  86. package/dist/useRequest-BuDmW8Jc.js.map +1 -0
  87. package/package.json +3 -2
  88. package/src/__stories__/experiment-helpers.ts +3 -3
  89. package/src/__tests__/components/ActionMenu.test.ts +2 -2
  90. package/src/__tests__/components/AppTopBar.test.ts +206 -1
  91. package/src/__tests__/components/AppTopBarOnboarding.test.ts +160 -0
  92. package/src/__tests__/components/AppTopBarPageSelector.test.ts +125 -9
  93. package/src/__tests__/components/BaseButton.test.ts +19 -0
  94. package/src/__tests__/components/BaseModal.test.ts +13 -0
  95. package/src/__tests__/components/ExperimentSelectorModal.test.ts +34 -1
  96. package/src/__tests__/components/FloatingPanelsInModal.test.ts +94 -0
  97. package/src/__tests__/components/GeneratedPluginView.test.ts +1 -1
  98. package/src/__tests__/components/JobsStatusTray.test.ts +373 -71
  99. package/src/__tests__/components/PluginWorkspaceView.test.ts +63 -1
  100. package/src/__tests__/components/SampleSelector.test.ts +20 -0
  101. package/src/__tests__/components/SettingsModal.test.ts +9 -2
  102. package/src/__tests__/composables/useFileImport.test.ts +36 -0
  103. package/src/__tests__/composables/useFloatingPanel.test.ts +68 -0
  104. package/src/__tests__/composables/useJobCenter.test.ts +262 -3
  105. package/src/__tests__/composables/useOnboarding.test.ts +317 -0
  106. package/src/__tests__/docs/frontendDocsCatalog.test.ts +4 -3
  107. package/src/__tests__/fixtures/table-import/cells.xlsx +0 -0
  108. package/src/__tests__/fixtures/table-import/samples.xlsx +0 -0
  109. package/src/__tests__/stores/settings.test.ts +21 -21
  110. package/src/__tests__/styles/cssTokens.test.ts +4 -1
  111. package/src/__tests__/styles/menusShellRefresh.test.ts +8 -2
  112. package/src/__tests__/styles/paletteTokens.test.ts +44 -0
  113. package/src/__tests__/styles/v2AuditRules.test.ts +104 -0
  114. package/src/components/ActionMenu.vue +6 -37
  115. package/src/components/AppTopBar.onboarding.story.vue +69 -0
  116. package/src/components/AppTopBar.story.vue +59 -4
  117. package/src/components/AppTopBar.vue +132 -10
  118. package/src/components/BaseButton.vue +16 -2
  119. package/src/components/BaseModal.vue +2 -1
  120. package/src/components/ExperimentSelectorModal.story.vue +38 -0
  121. package/src/components/ExperimentSelectorModal.vue +20 -1
  122. package/src/components/GeneratedPluginView.vue +4 -9
  123. package/src/components/GeneratedResultRenderer.vue +3 -4
  124. package/src/components/JobsStatusTray.story.vue +97 -43
  125. package/src/components/JobsStatusTray.vue +287 -290
  126. package/src/components/LayoutResizeHandle.story.vue +65 -4
  127. package/src/components/PluginWorkspaceView.props.ts +3 -0
  128. package/src/components/PluginWorkspaceView.vue +17 -0
  129. package/src/components/SampleSelector.story.vue +21 -6
  130. package/src/components/SampleSelector.vue +10 -3
  131. package/src/components/SectionCard.story.vue +33 -0
  132. package/src/components/SettingsModal.vue +7 -12
  133. package/src/components/Tooltip.vue +9 -32
  134. package/src/components/internal/AppTopBarOnboardingInternal.vue +172 -0
  135. package/src/components/internal/AppTopBarPageSelectorInternal.vue +140 -72
  136. package/src/components/internal/DatePickerDateInternal.vue +7 -45
  137. package/src/components/internal/DatePickerDateTimeInternal.vue +7 -1
  138. package/src/components/internal/DatePickerTimeInternal.vue +8 -1
  139. package/src/components/internal/NumberUnitInputInternal.vue +4 -18
  140. package/src/components/internal/OnboardingLayerInternal.vue +173 -0
  141. package/src/components/internal/SelectMultipleInternal.vue +6 -1
  142. package/src/components/internal/SelectSearchableInternal.vue +6 -1
  143. package/src/components/internal/WellEditPopupInternal.vue +11 -22
  144. package/src/components/internal/WorkspaceShellInternal.vue +12 -0
  145. package/src/composables/pluginWorkspaceModel.ts +2 -2
  146. package/src/composables/useFileImport.ts +51 -1
  147. package/src/composables/useFloatingPanel.ts +107 -0
  148. package/src/composables/useJobCenter.ts +188 -6
  149. package/src/composables/useOnboarding.ts +465 -0
  150. package/src/composables/usePluginWorkspace.ts +1 -1
  151. package/src/data.ts +1 -0
  152. package/src/runtime.ts +2 -1
  153. package/src/shell.ts +17 -0
  154. package/src/stores/index.ts +0 -2
  155. package/src/stores/settings.ts +20 -50
  156. package/src/styles/components/action-menu.css +1 -1
  157. package/src/styles/components/app-layout.css +6 -3
  158. package/src/styles/components/app-page-selector.css +120 -45
  159. package/src/styles/components/app-top-bar.css +165 -3
  160. package/src/styles/components/button.css +8 -0
  161. package/src/styles/components/dataframe.css +1 -1
  162. package/src/styles/components/date-picker.css +4 -2
  163. package/src/styles/components/datetime-picker.css +4 -4
  164. package/src/styles/components/experiment-selector-modal.css +13 -0
  165. package/src/styles/components/jobs-status-tray.css +134 -296
  166. package/src/styles/components/layout-resize-handle.css +59 -16
  167. package/src/styles/components/modal.css +3 -3
  168. package/src/styles/components/number-input.css +1 -1
  169. package/src/styles/components/onboarding.css +368 -0
  170. package/src/styles/components/progress-bar.css +3 -3
  171. package/src/styles/components/sample-selector.css +43 -0
  172. package/src/styles/components/searchable-select.css +3 -7
  173. package/src/styles/components/section-card.css +30 -6
  174. package/src/styles/components/settings-modal.css +7 -2
  175. package/src/styles/components/time-picker.css +3 -6
  176. package/src/styles/components/toast.css +1 -1
  177. package/src/styles/components/tooltip.css +2 -2
  178. package/src/styles/components/unit-input.css +1 -1
  179. package/src/styles/components/well-edit-popup.css +2 -2
  180. package/src/styles/index.css +1 -0
  181. package/src/styles/variables.css +153 -15
  182. package/src/types/components.ts +2 -0
  183. package/src/types/index.ts +1 -0
  184. package/src/types/jobs.ts +10 -0
  185. package/src/types/platform.ts +1 -1
  186. package/dist/AppSidebar-Dq9W1jE2.js.map +0 -1
  187. package/dist/ExperimentSelectorModal-65peG4Up.js.map +0 -1
  188. package/dist/SettingsModal-483nyI6b.js.map +0 -1
  189. package/dist/experiment-43OJtH7R.js.map +0 -1
  190. package/dist/records-B6gpM_3e.js.map +0 -1
  191. package/dist/runtime-7vfl_bI3.js.map +0 -1
  192. package/dist/useDropdownState-8yWMu-7_.js.map +0 -1
  193. package/dist/useExperimentSamples-DHnxKFAF.js.map +0 -1
  194. package/dist/useListReorder-BitdUhxn.js.map +0 -1
  195. package/dist/useRackEditor-DiwCt77M.js.map +0 -1
  196. package/dist/useRealtime-C3iy9QkU.js +0 -699
  197. package/dist/useRealtime-C3iy9QkU.js.map +0 -1
  198. package/dist/useRequest-D506eHi8.js.map +0 -1
@@ -6,8 +6,8 @@ declare const __VLS_export: import('vue').DefineComponent<SmartGroupFieldRecipeP
6
6
  toggle: (index: number) => any;
7
7
  cancel: () => any;
8
8
  close: () => any;
9
- move: (index: number, direction: "up" | "down") => any;
10
9
  apply: (payload: FieldRecipeApplyPayload) => any;
10
+ move: (index: number, direction: "up" | "down") => any;
11
11
  manual: () => any;
12
12
  rename: (index: number, name: string) => any;
13
13
  "update:route": (route: QcRoute) => any;
@@ -18,8 +18,8 @@ declare const __VLS_export: import('vue').DefineComponent<SmartGroupFieldRecipeP
18
18
  onToggle?: ((index: number) => any) | undefined;
19
19
  onCancel?: (() => any) | undefined;
20
20
  onClose?: (() => any) | undefined;
21
- onMove?: ((index: number, direction: "up" | "down") => any) | undefined;
22
21
  onApply?: ((payload: FieldRecipeApplyPayload) => any) | undefined;
22
+ onMove?: ((index: number, direction: "up" | "down") => any) | undefined;
23
23
  onManual?: (() => any) | undefined;
24
24
  onRename?: ((index: number, name: string) => any) | undefined;
25
25
  "onUpdate:route"?: ((route: QcRoute) => any) | undefined;
@@ -28,8 +28,8 @@ declare const __VLS_export: import('vue').DefineComponent<SmartGroupFieldRecipeP
28
28
  "onDownload-prefilled"?: (() => any) | undefined;
29
29
  }>, {
30
30
  loading: boolean;
31
- fields: SmartGroupField[];
32
31
  palette: string[];
32
+ fields: SmartGroupField[];
33
33
  samples: SmartGroupSampleRecord[];
34
34
  experimentLabel: string;
35
35
  headerCount: number;
@@ -0,0 +1,7 @@
1
+ import { OnboardingState } from '../../composables/useOnboarding';
2
+ type __VLS_Props = {
3
+ state: OnboardingState;
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -4,6 +4,8 @@ interface Props {
4
4
  currentPageId?: string;
5
5
  placeholder?: string;
6
6
  minWidth?: string;
7
+ /** Plugin name shown before the trigger and in the menu title. */
8
+ pluginName?: string;
7
9
  }
8
10
  declare var __VLS_1: {
9
11
  page: PageSelectorItem;
@@ -21,7 +23,6 @@ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, i
21
23
  onSelect?: ((page: PageSelectorItem) => any) | undefined;
22
24
  }>, {
23
25
  placeholder: string;
24
- minWidth: string;
25
26
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
26
27
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
27
28
  declare const _default: typeof __VLS_export;
@@ -11,11 +11,11 @@ export interface Props {
11
11
  designData?: Record<string, unknown>;
12
12
  }
13
13
  declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
- "update:open": (value: boolean) => any;
15
14
  apply: (result: AutoGroupResult) => any;
15
+ "update:open": (value: boolean) => any;
16
16
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
17
- "onUpdate:open"?: ((value: boolean) => any) | undefined;
18
17
  onApply?: ((result: AutoGroupResult) => any) | undefined;
18
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
19
19
  }>, {
20
20
  experimentId: number;
21
21
  designData: Record<string, unknown>;
@@ -0,0 +1,7 @@
1
+ import { OnboardingState } from '../../composables/useOnboarding';
2
+ type __VLS_Props = {
3
+ state: OnboardingState;
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -1,7 +1,13 @@
1
1
  import { PillNavItem, PillNavOption } from '../../types';
2
2
  import { PluginWorkspaceShellModel } from '../../composables/pluginWorkspaceModel';
3
+ import { TopBarJob } from '../../types/jobs';
3
4
  type __VLS_Props = {
4
5
  shell: PluginWorkspaceShellModel;
6
+ /** Passed to AppTopBar; undefined means no jobs control. */
7
+ job?: TopBarJob | null;
8
+ jobsDone?: number;
9
+ jobsOpen?: boolean;
10
+ jobsPanelId?: string;
5
11
  };
6
12
  type __VLS_Slots = {
7
13
  topbar?: (props: PluginWorkspaceShellModel['controls']) => unknown;
@@ -18,10 +24,12 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
18
24
  "pill-select": (item: PillNavItem) => any;
19
25
  "pill-option-select": (option: PillNavOption, item: PillNavItem) => any;
20
26
  "settings-values-change": (data: Record<string, unknown>) => any;
27
+ "job-click": () => any;
21
28
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
22
29
  "onPill-select"?: ((item: PillNavItem) => any) | undefined;
23
30
  "onPill-option-select"?: ((option: PillNavOption, item: PillNavItem) => any) | undefined;
24
31
  "onSettings-values-change"?: ((data: Record<string, unknown>) => any) | undefined;
32
+ "onJob-click"?: (() => any) | undefined;
25
33
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
26
34
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
27
35
  declare const _default: typeof __VLS_export;
@@ -42,8 +42,8 @@ export interface PluginWorkspaceShellModel {
42
42
  sidebarCloseLabel: string;
43
43
  /** Whether AppLayout should render a `#sidebar` template at all. */
44
44
  hasSidebarSurface: boolean;
45
- /** App or plugin title shown in the top bar. */
46
- title: string;
45
+ /** Top bar title. Unset, the top bar shows the plugin identity (`providePluginIdentity` or the platform). */
46
+ title?: string;
47
47
  /** Secondary copy shown under the title. */
48
48
  subtitle?: string;
49
49
  /** AppTopBar spec with the workspace defaults applied and the generated pills filled in; `false` removes the top bar. */
@@ -31,5 +31,12 @@ export interface UseFileImportReturn<TResult> {
31
31
  export declare function useFileImport<TResult = string>(options?: FileImportOptions<TResult>): UseFileImportReturn<TResult>;
32
32
  export declare function validateImportFile(file: File, options?: FileImportValidationOptions): void;
33
33
  export declare function readFileAsText(file: File, encoding?: string): Promise<string>;
34
+ /**
35
+ * Read a `.csv`, `.tsv` or `.xlsx` upload as comma-delimited CSV text.
36
+ * A `.csv` file (or any other extension) comes back unchanged. An `.xlsx`
37
+ * file gives its first sheet; each cell is its stored value, so number
38
+ * formats such as leading zeros are not applied. Dates become ISO text.
39
+ */
40
+ export declare function readTableFileAsCsv(file: File): Promise<string>;
34
41
  export declare function parseDelimitedText(text: string, options?: ParseDelimitedTextOptions): DelimitedTable;
35
42
  export declare function detectDelimiter(text: string): string;
@@ -0,0 +1,29 @@
1
+ import { Placement, ReferenceElement } from '@floating-ui/dom';
2
+ import { MaybeRefOrGetter, Ref } from 'vue';
3
+ export interface UseFloatingPanelOptions {
4
+ /** Default `'bottom-start'`. */
5
+ placement?: MaybeRefOrGetter<Placement>;
6
+ /** Gap to the reference in px. Default 4. */
7
+ offset?: number;
8
+ /** At least the reference width, at most 28rem (selects). */
9
+ matchWidth?: boolean;
10
+ /** Re-place on scroll, resize and layout shift while open. Default `true`. */
11
+ follow?: boolean;
12
+ }
13
+ export interface UseFloatingPanelReturn {
14
+ /** Bind to the panel: `position: fixed`, `left`, `top`, and `visibility: hidden` while the reference is scrolled out of view. */
15
+ style: Ref<Record<string, string>>;
16
+ /** The placement after flip, for arrows and transitions. */
17
+ placement: Ref<Placement>;
18
+ update: () => Promise<void>;
19
+ }
20
+ /**
21
+ * Places `floating` next to `reference` with fixed positioning (offset, flip,
22
+ * shift, size, hide). A fixed panel escapes the `overflow` of its ancestors (a
23
+ * modal body) unless one of them has a transform, so it can stay in the DOM right
24
+ * after its trigger: Tab order, focus traps and outside-click checks are those of
25
+ * an in-place panel. The size middleware publishes the free height as
26
+ * `--mint-floating-available-height`; a panel whose list scrolls caps its
27
+ * `max-height` with it.
28
+ */
29
+ export declare function useFloatingPanel(reference: MaybeRefOrGetter<ReferenceElement | null>, floating: Ref<HTMLElement | null>, open: Ref<boolean>, options?: UseFloatingPanelOptions): UseFloatingPanelReturn;
@@ -1,6 +1,5 @@
1
1
  import { ComputedRef, MaybeRefOrGetter, Ref, ShallowRef } from 'vue';
2
- import { JobListPayload, JobState, JobStateInput } from '../types/jobs';
3
- export type JobsStatusTrayTab = 'active' | 'history';
2
+ import { JobListPayload, JobState, JobStateInput, JobStatus, TopBarJob } from '../types/jobs';
4
3
  /**
5
4
  * The canonical owner of a collection of plugin jobs.
6
5
  *
@@ -29,8 +28,38 @@ export declare function combinePluginJobSources(sources: readonly PluginJobCente
29
28
  export interface UseJobCenterOptions {
30
29
  source?: MaybeRefOrGetter<PluginJobCenterSource | undefined>;
31
30
  loadOnMount?: boolean;
31
+ /**
32
+ * Maps the job that the top-bar chip shows. It is called for the chosen own
33
+ * active job AND for the held just-completed job, so check `job.status`.
34
+ * `null` keeps the default mapping.
35
+ */
36
+ topBarJob?: (job: JobState) => TopBarJob | null;
37
+ /**
38
+ * Overrides how a tray row looks: `status` (icon, awaiting-input tint and
39
+ * pinning), `percent` (progress bar and value) and `message` (detail line).
40
+ * A missing or `undefined` field, or a `null` status or message, keeps the
41
+ * job's own; `percent: null` hides the bar and shows the time, and a status
42
+ * alone keeps the job's own percent. The job's section, actions and counts
43
+ * do not change.
44
+ */
45
+ rowJob?: (job: JobState) => JobRowOverride | null;
46
+ }
47
+ /** A `rowJob` result; see `UseJobCenterOptions.rowJob`. */
48
+ export interface JobRowOverride {
49
+ status?: JobStatus | null;
50
+ percent?: number | null;
51
+ message?: string | null;
52
+ }
53
+ /** How a tray row shows a job; see `UseJobCenterReturn.rowView`. */
54
+ export interface JobRowView {
55
+ status: JobStatus;
56
+ /** 0-100, rounded; `null` hides the progress bar and shows the time instead. */
57
+ percent: number | null;
58
+ message: string;
32
59
  }
33
60
  export interface UseJobCenterReturn {
61
+ /** The current source; a new identity is a new job list. */
62
+ source: ComputedRef<PluginJobCenterSource | undefined>;
34
63
  jobs: ComputedRef<JobState[]>;
35
64
  activeJobs: ComputedRef<JobState[]>;
36
65
  historyJobs: ComputedRef<JobState[]>;
@@ -40,14 +69,23 @@ export interface UseJobCenterReturn {
40
69
  canCancel: ComputedRef<boolean>;
41
70
  canDelete: ComputedRef<boolean>;
42
71
  canClearFinished: ComputedRef<boolean>;
72
+ /** DOM id of the JobsStatusTray panel, for `AppTopBar`'s `jobsPanelId` prop. */
73
+ panelId: string;
74
+ /** The row view of a job, with the `rowJob` option applied. */
75
+ rowView: (job: JobState) => JobRowView;
76
+ /** The viewer's own job for `AppTopBar`'s `job` prop. */
77
+ topBarJob: ComputedRef<TopBarJob | null>;
78
+ /** Jobs in the list with status `completed`, for `AppTopBar`'s `jobsDone` prop. */
79
+ completedCount: ComputedRef<number>;
43
80
  isOpen: Ref<boolean>;
44
- activeTab: Ref<JobsStatusTrayTab>;
45
81
  isLoading: Ref<boolean>;
46
82
  error: ShallowRef<string | null>;
47
83
  pendingJobIds: Ref<Set<string>>;
48
84
  open: () => void;
49
85
  close: () => void;
50
86
  toggle: () => void;
87
+ /** The top-bar chip: with the tray closed and none of the viewer's jobs active, selects the held just-completed job; else toggles. */
88
+ handleTopBarClick: (onSelect: (job: JobState) => void) => void;
51
89
  refresh: () => Promise<boolean>;
52
90
  cancelJob: (job: JobState) => Promise<boolean>;
53
91
  deleteJob: (job: JobState) => Promise<boolean>;
@@ -0,0 +1,119 @@
1
+ import { ComputedRef, InjectionKey, MaybeRefOrGetter, ShallowRef } from 'vue';
2
+ import { Placement } from '@floating-ui/dom';
3
+ /** One card of a tour. It points at the element with `data-onboarding="<anchor>"`. */
4
+ export interface OnboardingStep {
5
+ /** Stable id. A returning user sees only steps whose id is new. */
6
+ id: string;
7
+ /** `data-onboarding` value of the element the step points at. */
8
+ anchor: string;
9
+ title: string;
10
+ body: string;
11
+ /** Side of the anchor for the card. Default `bottom`. */
12
+ placement?: Placement;
13
+ /** `'click'`: the highlighted element takes clicks, and a click moves the tour to the next step. */
14
+ advanceOn?: 'click';
15
+ /** Leave the step out while this returns false, e.g. without the permission its control needs. */
16
+ available?: () => boolean;
17
+ }
18
+ export interface OnboardingTour {
19
+ id: string;
20
+ /** Name in the Help menu. */
21
+ title: string;
22
+ /** Start only while the app's route is this value. Omit it for elements on every page, such as the top bar. */
23
+ route?: string;
24
+ steps: OnboardingStep[];
25
+ }
26
+ export interface OnboardingTask {
27
+ id: string;
28
+ title: string;
29
+ /** Leave the task out while this returns false, e.g. without the permission it needs. */
30
+ available?: () => boolean;
31
+ /** The task is done when this returns true. The coordinator checks it at start, on a route change and when the Help menu opens. */
32
+ done?: () => boolean;
33
+ /** The link at the end of the task row. */
34
+ action?: {
35
+ label: string;
36
+ run: () => void;
37
+ };
38
+ }
39
+ /** A new feature. A dot marks its element until the user opens it. */
40
+ export interface OnboardingNews {
41
+ id: string;
42
+ anchor: string;
43
+ title: string;
44
+ body: string;
45
+ placement?: Placement;
46
+ }
47
+ export interface OnboardingDefinition {
48
+ tours?: OnboardingTour[];
49
+ /** The "Getting started" checklist. */
50
+ checklist?: OnboardingTask[];
51
+ whatsNew?: OnboardingNews[];
52
+ }
53
+ export interface ProvideOnboardingOptions {
54
+ /** Storage namespace, e.g. `platform` or the plugin name. */
55
+ appId: string;
56
+ /** The signed-in user. `null` turns onboarding off (no user yet). Default: the platform user; `local` standalone or with auth off. */
57
+ userId?: MaybeRefOrGetter<string | number | null | undefined>;
58
+ /** The current route, matched against `OnboardingTour.route`. */
59
+ route?: MaybeRefOrGetter<string | null | undefined>;
60
+ /** Start unseen tours on their own. Default `true`. */
61
+ autoStart?: boolean;
62
+ }
63
+ /** The step on screen and the element it points at. */
64
+ export interface OnboardingActiveStep {
65
+ step: OnboardingStep;
66
+ element: HTMLElement;
67
+ /** Position among the steps of this run, and their count. */
68
+ index: number;
69
+ count: number;
70
+ /** A what's-new card, not a tour step. */
71
+ news: boolean;
72
+ }
73
+ export interface OnboardingState {
74
+ definition: OnboardingDefinition;
75
+ /** False until a user is known. */
76
+ enabled: ComputedRef<boolean>;
77
+ active: ShallowRef<OnboardingActiveStep | null>;
78
+ /** Tours that can run on the current route. */
79
+ tours: ComputedRef<OnboardingTour[]>;
80
+ /** The available tasks. */
81
+ tasks: ComputedRef<Array<Omit<OnboardingTask, 'done'> & {
82
+ done: boolean;
83
+ }>>;
84
+ tasksDone: ComputedRef<number>;
85
+ /** The checklist chip shows while a task is open and the user did not hide it. */
86
+ checklistVisible: ComputedRef<boolean>;
87
+ checklistHidden: ComputedRef<boolean>;
88
+ news: ComputedRef<Array<OnboardingNews & {
89
+ unseen: boolean;
90
+ }>>;
91
+ unseenNews: ComputedRef<number>;
92
+ startTour: (id: string) => void;
93
+ showNews: (id: string) => void;
94
+ next: () => void;
95
+ back: () => void;
96
+ /** End the run (× or Esc). Every step of the tour counts as seen. */
97
+ dismiss: () => void;
98
+ complete: (taskId: string) => void;
99
+ setChecklistHidden: (hidden: boolean) => void;
100
+ /** Run the task predicates again. */
101
+ refresh: () => void;
102
+ }
103
+ export declare const ONBOARDING_KEY: InjectionKey<OnboardingState>;
104
+ /** Wait this long for the missing anchor of a run's first step, or of the step after a click step; then skip it. */
105
+ export declare const ANCHOR_WAIT_MS = 2000;
106
+ /** Types a definition, so it can live in its own file. */
107
+ export declare function defineOnboarding(definition: OnboardingDefinition): OnboardingDefinition;
108
+ /**
109
+ * Creates the app's onboarding coordinator and provides it to `AppTopBar`, which then
110
+ * shows the Help button, the checklist chip and the tour layer. Call it once, in the
111
+ * root component. It shows one item at a time and waits for open modals.
112
+ *
113
+ * ```ts
114
+ * provideOnboarding(onboarding, { appId: 'leaf' })
115
+ * ```
116
+ */
117
+ export declare function provideOnboarding(definition: OnboardingDefinition, options: ProvideOnboardingOptions): OnboardingState;
118
+ /** The app's onboarding coordinator, e.g. to call `complete(taskId)`. Null when the app provides none. */
119
+ export declare function useOnboarding(): OnboardingState | null;
@@ -1,4 +1,4 @@
1
- import { c as normalizeControlDefinition, p as omitUndefined } from "./useListReorder-BitdUhxn.js";
1
+ import { f as omitUndefined, s as normalizeControlDefinition } from "./useListReorder-DsuzwWGS.js";
2
2
  //#region src/composables/controlSchemaModel.ts
3
3
  function isControlModelBinding(model) {
4
4
  return typeof model === "object" && model !== null && "controls" in model && "controlOptions" in model;
@@ -92,4 +92,4 @@ function registerSectionOptions(target, sectionId, options) {
92
92
  //#endregion
93
93
  export { isControlModelBinding as n, defineControlModel as t };
94
94
 
95
- //# sourceMappingURL=controlSchemaModel-B8CTXagP.js.map
95
+ //# sourceMappingURL=controlSchemaModel-Bsg0t5Ab.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"controlSchemaModel-B8CTXagP.js","names":[],"sources":["../src/composables/controlSchemaModel.ts"],"sourcesContent":["import type {\n ControlModel,\n ControlModelBinding,\n ControlModelSectionConfig,\n ControlSchema,\n ControlSectionConfig,\n ControlSidebarConfig,\n ControlViewConfig,\n ControlWorkspaceOptions,\n} from './controlSchemaTypes'\nimport {\n normalizeControlDefinition,\n} from './controlSchemaNormalize'\nimport {\n omitUndefined,\n} from './controlSchemaUtils'\n\nexport function isControlModelBinding<TBinding extends ControlModelBinding = ControlModelBinding>(\n model: unknown,\n): model is TBinding {\n return (\n typeof model === 'object'\n && model !== null\n && 'controls' in model\n && 'controlOptions' in model\n )\n}\n\nexport function resolveControlModel(\n model: ControlModel | ControlModelBinding | undefined,\n): ControlModelBinding | undefined {\n if (model === undefined) return undefined\n return isControlModelBinding(model) ? model : defineControlModel(model)\n}\n\n/**\n * Create a complete control model binding for FormBuilder, SettingsModal and the PluginWorkspaceView sidebar from a simple controls data model.\n *\n * @example Recommended\n * ```ts\n * const workspaceModel = defineControlModel({\n * controls: { threshold: { type: 'number', default: 0.05 } },\n * })\n * ```\n */\nexport function defineControlModel(model: ControlModel): ControlModelBinding {\n const {\n controls: rootControls,\n sections: rootSections,\n views: modelViews,\n components,\n componentBindings,\n componentProps,\n componentPropsById,\n ...baseOptions\n } = model\n const resolvedComponentBindings = componentBindings ?? components\n const controls: ControlSchema = {}\n const views: Record<string, ControlViewConfig> = {}\n const sections: Record<string, ControlSectionConfig> = {}\n\n const defaultViewId = model.view ?? 'default'\n const defaultSectionId = model.section ?? 'controls'\n\n if (rootControls) {\n registerSectionOptions(sections, defaultSectionId, {\n id: defaultSectionId,\n label: model.sectionLabel,\n title: model.sectionLabel,\n columns: model.columns,\n })\n appendModelControls(controls, rootControls, defaultViewId, defaultSectionId)\n }\n\n for (const [sectionId, section] of Object.entries(rootSections ?? {})) {\n registerSectionOptions(sections, sectionId, controlModelSectionOptions(section))\n appendModelControls(controls, section.controls, defaultViewId, sectionId, section.sidebar)\n }\n\n for (const [viewId, view] of Object.entries(modelViews ?? {})) {\n const {\n controls: viewControls,\n sections: viewSections,\n section,\n sectionLabel,\n sectionDescription,\n ...viewConfig\n } = view\n\n views[viewId] = omitUndefined(viewConfig)\n\n if (viewControls) {\n const sectionId = section ?? `${viewId}-controls`\n const label = sectionLabel ?? view.label\n registerSectionOptions(sections, sectionId, {\n id: sectionId,\n label,\n title: label,\n description: sectionDescription,\n columns: model.columns,\n })\n appendModelControls(controls, viewControls, viewId, sectionId)\n }\n\n for (const [sectionKey, sectionConfig] of Object.entries(viewSections ?? {})) {\n const sectionId = sectionConfig.id ?? `${viewId}-${sectionKey}`\n registerSectionOptions(sections, sectionId, controlModelSectionOptions(sectionConfig))\n appendModelControls(controls, sectionConfig.controls, viewId, sectionId, sectionConfig.sidebar)\n }\n }\n\n const controlOptions: ControlWorkspaceOptions = {\n ...baseOptions,\n }\n\n if (Object.keys(views).length > 0) {\n controlOptions.views = views\n }\n\n if (Object.keys(sections).length > 0) {\n controlOptions.sections = sections\n }\n\n return {\n controls,\n controlOptions,\n ...(resolvedComponentBindings === undefined ? {} : { componentBindings: resolvedComponentBindings }),\n ...(componentProps === undefined ? {} : { componentProps }),\n ...(componentPropsById === undefined ? {} : { componentPropsById }),\n }\n}\n\nfunction appendModelControls(\n target: ControlSchema,\n source: ControlSchema,\n viewId: string,\n sectionId: string,\n sidebar?: boolean | ControlSidebarConfig,\n): void {\n for (const [name, input] of Object.entries(source)) {\n if (Object.prototype.hasOwnProperty.call(target, name)) {\n throw new Error(\n `Duplicate control \"${name}\" in defineControlModel(). Control names must be unique across views and sections.`,\n )\n }\n\n const definition = normalizeControlDefinition(input)\n target[name] = omitUndefined({\n ...definition,\n view: definition.view ?? viewId,\n section: definition.section ?? sectionId,\n sidebar: definition.sidebar ?? sidebar,\n })\n }\n}\n\nfunction controlModelSectionOptions(section: ControlModelSectionConfig): ControlSectionConfig {\n const { controls: _controls, sidebar: _sidebar, ...options } = section\n return omitUndefined(options)\n}\n\nfunction registerSectionOptions(\n target: Record<string, ControlSectionConfig>,\n sectionId: string,\n options: ControlSectionConfig,\n): void {\n target[sectionId] = omitUndefined({\n ...(target[sectionId] ?? {}),\n ...options,\n id: sectionId,\n })\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"controlSchemaModel-Bsg0t5Ab.js","names":[],"sources":["../src/composables/controlSchemaModel.ts"],"sourcesContent":["import type {\n ControlModel,\n ControlModelBinding,\n ControlModelSectionConfig,\n ControlSchema,\n ControlSectionConfig,\n ControlSidebarConfig,\n ControlViewConfig,\n ControlWorkspaceOptions,\n} from './controlSchemaTypes'\nimport {\n normalizeControlDefinition,\n} from './controlSchemaNormalize'\nimport {\n omitUndefined,\n} from './controlSchemaUtils'\n\nexport function isControlModelBinding<TBinding extends ControlModelBinding = ControlModelBinding>(\n model: unknown,\n): model is TBinding {\n return (\n typeof model === 'object'\n && model !== null\n && 'controls' in model\n && 'controlOptions' in model\n )\n}\n\nexport function resolveControlModel(\n model: ControlModel | ControlModelBinding | undefined,\n): ControlModelBinding | undefined {\n if (model === undefined) return undefined\n return isControlModelBinding(model) ? model : defineControlModel(model)\n}\n\n/**\n * Create a complete control model binding for FormBuilder, SettingsModal and the PluginWorkspaceView sidebar from a simple controls data model.\n *\n * @example Recommended\n * ```ts\n * const workspaceModel = defineControlModel({\n * controls: { threshold: { type: 'number', default: 0.05 } },\n * })\n * ```\n */\nexport function defineControlModel(model: ControlModel): ControlModelBinding {\n const {\n controls: rootControls,\n sections: rootSections,\n views: modelViews,\n components,\n componentBindings,\n componentProps,\n componentPropsById,\n ...baseOptions\n } = model\n const resolvedComponentBindings = componentBindings ?? components\n const controls: ControlSchema = {}\n const views: Record<string, ControlViewConfig> = {}\n const sections: Record<string, ControlSectionConfig> = {}\n\n const defaultViewId = model.view ?? 'default'\n const defaultSectionId = model.section ?? 'controls'\n\n if (rootControls) {\n registerSectionOptions(sections, defaultSectionId, {\n id: defaultSectionId,\n label: model.sectionLabel,\n title: model.sectionLabel,\n columns: model.columns,\n })\n appendModelControls(controls, rootControls, defaultViewId, defaultSectionId)\n }\n\n for (const [sectionId, section] of Object.entries(rootSections ?? {})) {\n registerSectionOptions(sections, sectionId, controlModelSectionOptions(section))\n appendModelControls(controls, section.controls, defaultViewId, sectionId, section.sidebar)\n }\n\n for (const [viewId, view] of Object.entries(modelViews ?? {})) {\n const {\n controls: viewControls,\n sections: viewSections,\n section,\n sectionLabel,\n sectionDescription,\n ...viewConfig\n } = view\n\n views[viewId] = omitUndefined(viewConfig)\n\n if (viewControls) {\n const sectionId = section ?? `${viewId}-controls`\n const label = sectionLabel ?? view.label\n registerSectionOptions(sections, sectionId, {\n id: sectionId,\n label,\n title: label,\n description: sectionDescription,\n columns: model.columns,\n })\n appendModelControls(controls, viewControls, viewId, sectionId)\n }\n\n for (const [sectionKey, sectionConfig] of Object.entries(viewSections ?? {})) {\n const sectionId = sectionConfig.id ?? `${viewId}-${sectionKey}`\n registerSectionOptions(sections, sectionId, controlModelSectionOptions(sectionConfig))\n appendModelControls(controls, sectionConfig.controls, viewId, sectionId, sectionConfig.sidebar)\n }\n }\n\n const controlOptions: ControlWorkspaceOptions = {\n ...baseOptions,\n }\n\n if (Object.keys(views).length > 0) {\n controlOptions.views = views\n }\n\n if (Object.keys(sections).length > 0) {\n controlOptions.sections = sections\n }\n\n return {\n controls,\n controlOptions,\n ...(resolvedComponentBindings === undefined ? {} : { componentBindings: resolvedComponentBindings }),\n ...(componentProps === undefined ? {} : { componentProps }),\n ...(componentPropsById === undefined ? {} : { componentPropsById }),\n }\n}\n\nfunction appendModelControls(\n target: ControlSchema,\n source: ControlSchema,\n viewId: string,\n sectionId: string,\n sidebar?: boolean | ControlSidebarConfig,\n): void {\n for (const [name, input] of Object.entries(source)) {\n if (Object.prototype.hasOwnProperty.call(target, name)) {\n throw new Error(\n `Duplicate control \"${name}\" in defineControlModel(). Control names must be unique across views and sections.`,\n )\n }\n\n const definition = normalizeControlDefinition(input)\n target[name] = omitUndefined({\n ...definition,\n view: definition.view ?? viewId,\n section: definition.section ?? sectionId,\n sidebar: definition.sidebar ?? sidebar,\n })\n }\n}\n\nfunction controlModelSectionOptions(section: ControlModelSectionConfig): ControlSectionConfig {\n const { controls: _controls, sidebar: _sidebar, ...options } = section\n return omitUndefined(options)\n}\n\nfunction registerSectionOptions(\n target: Record<string, ControlSectionConfig>,\n sectionId: string,\n options: ControlSectionConfig,\n): void {\n target[sectionId] = omitUndefined({\n ...(target[sectionId] ?? {}),\n ...options,\n id: sectionId,\n })\n}\n"],"mappings":";;AAiBA,SAAgB,sBACd,OACmB;CACnB,OACE,OAAO,UAAU,YACd,UAAU,QACV,cAAc,SACd,oBAAoB;AAE3B;;;;;;;;;;;AAmBA,SAAgB,mBAAmB,OAA0C;CAC3E,MAAM,EACJ,UAAU,cACV,UAAU,cACV,OAAO,YACP,YACA,mBACA,gBACA,oBACA,GAAG,gBACD;CACJ,MAAM,4BAA4B,qBAAqB;CACvD,MAAM,WAA0B,CAAC;CACjC,MAAM,QAA2C,CAAC;CAClD,MAAM,WAAiD,CAAC;CAExD,MAAM,gBAAgB,MAAM,QAAQ;CACpC,MAAM,mBAAmB,MAAM,WAAW;CAE1C,IAAI,cAAc;EAChB,uBAAuB,UAAU,kBAAkB;GACjD,IAAI;GACJ,OAAO,MAAM;GACb,OAAO,MAAM;GACb,SAAS,MAAM;EACjB,CAAC;EACD,oBAAoB,UAAU,cAAc,eAAe,gBAAgB;CAC7E;CAEA,KAAK,MAAM,CAAC,WAAW,YAAY,OAAO,QAAQ,gBAAgB,CAAC,CAAC,GAAG;EACrE,uBAAuB,UAAU,WAAW,2BAA2B,OAAO,CAAC;EAC/E,oBAAoB,UAAU,QAAQ,UAAU,eAAe,WAAW,QAAQ,OAAO;CAC3F;CAEA,KAAK,MAAM,CAAC,QAAQ,SAAS,OAAO,QAAQ,cAAc,CAAC,CAAC,GAAG;EAC7D,MAAM,EACJ,UAAU,cACV,UAAU,cACV,SACA,cACA,oBACA,GAAG,eACD;EAEJ,MAAM,UAAU,cAAc,UAAU;EAExC,IAAI,cAAc;GAChB,MAAM,YAAY,WAAW,GAAG,OAAO;GACvC,MAAM,QAAQ,gBAAgB,KAAK;GACnC,uBAAuB,UAAU,WAAW;IAC1C,IAAI;IACJ;IACA,OAAO;IACP,aAAa;IACb,SAAS,MAAM;GACjB,CAAC;GACD,oBAAoB,UAAU,cAAc,QAAQ,SAAS;EAC/D;EAEA,KAAK,MAAM,CAAC,YAAY,kBAAkB,OAAO,QAAQ,gBAAgB,CAAC,CAAC,GAAG;GAC5E,MAAM,YAAY,cAAc,MAAM,GAAG,OAAO,GAAG;GACnD,uBAAuB,UAAU,WAAW,2BAA2B,aAAa,CAAC;GACrF,oBAAoB,UAAU,cAAc,UAAU,QAAQ,WAAW,cAAc,OAAO;EAChG;CACF;CAEA,MAAM,iBAA0C,EAC9C,GAAG,YACL;CAEA,IAAI,OAAO,KAAK,KAAK,CAAC,CAAC,SAAS,GAC9B,eAAe,QAAQ;CAGzB,IAAI,OAAO,KAAK,QAAQ,CAAC,CAAC,SAAS,GACjC,eAAe,WAAW;CAG5B,OAAO;EACL;EACA;EACA,GAAI,8BAA8B,KAAA,IAAY,CAAC,IAAI,EAAE,mBAAmB,0BAA0B;EAClG,GAAI,mBAAmB,KAAA,IAAY,CAAC,IAAI,EAAE,eAAe;EACzD,GAAI,uBAAuB,KAAA,IAAY,CAAC,IAAI,EAAE,mBAAmB;CACnE;AACF;AAEA,SAAS,oBACP,QACA,QACA,QACA,WACA,SACM;CACN,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,MAAM,GAAG;EAClD,IAAI,OAAO,UAAU,eAAe,KAAK,QAAQ,IAAI,GACnD,MAAM,IAAI,MACR,sBAAsB,KAAK,mFAC7B;EAGF,MAAM,aAAa,2BAA2B,KAAK;EACnD,OAAO,QAAQ,cAAc;GAC3B,GAAG;GACH,MAAM,WAAW,QAAQ;GACzB,SAAS,WAAW,WAAW;GAC/B,SAAS,WAAW,WAAW;EACjC,CAAC;CACH;AACF;AAEA,SAAS,2BAA2B,SAA0D;CAC5F,MAAM,EAAE,UAAU,WAAW,SAAS,UAAU,GAAG,YAAY;CAC/D,OAAO,cAAc,OAAO;AAC9B;AAEA,SAAS,uBACP,QACA,WACA,SACM;CACN,OAAO,aAAa,cAAc;EAChC,GAAI,OAAO,cAAc,CAAC;EAC1B,GAAG;EACH,IAAI;CACN,CAAC;AACH"}
@@ -1,16 +1,16 @@
1
- import { a as BaseButton_default, n as BaseModal_default, o as __exportAll } from "./useDropdownState-8yWMu-7_.js";
2
- import { o as useApi, p as MintApiError, t as useExperimentStore } from "./experiment-43OJtH7R.js";
3
- import { A as formatRelativeTime, C as formatExperimentDate, G as BaseInput_default, I as FormField_default, S as experimentIdFromRoute, T as FileUploader_default, V as BaseSelect_default, _ as APP_EXPERIMENT_KEY, b as SORT_OPTIONS, g as pluginSecrets_exports, i as getInjectedPlatformContext, m as SecretInput_default, n as ResourcePickerListInternal_default, p as TagsInput_default, r as Skeleton_default, v as useAppExperiment, w as resolveExperimentCode, x as datePresetToISO, y as DATE_PRESET_OPTIONS, z as BaseCheckbox_default } from "./records-B6gpM_3e.js";
4
- import { t as SegmentedControl_default } from "./SegmentedControl-BtnnjWzs.js";
5
- import { a as normalizeSearchQuery, i as candidateMatchesSearch, n as DataStateInternal_default, o as useTextSearch, t as AlertBox_default } from "./AlertBox-B2Bgr3ei.js";
6
- import { n as ActionMenu_default, t as useRequest } from "./useRequest-D506eHi8.js";
1
+ import { a as BaseButton_default, n as BaseModal_default, o as __exportAll } from "./useDropdownState-uFIz6Yv8.js";
2
+ import { d as MintApiError, o as useApi, t as useExperimentStore } from "./experiment-DyO54FQB.js";
3
+ import { A as formatRelativeTime, C as formatExperimentDate, I as FormField_default, K as BaseInput_default, S as experimentIdFromRoute, T as FileUploader_default, V as BaseSelect_default, _ as APP_EXPERIMENT_KEY, b as SORT_OPTIONS, c as SecretInput_default, i as getInjectedPlatformContext, n as ResourcePickerListInternal_default, r as Skeleton_default, s as TagsInput_default, u as pluginSecrets_exports, v as useAppExperiment, w as resolveExperimentCode, x as datePresetToISO, y as DATE_PRESET_OPTIONS, z as BaseCheckbox_default } from "./records-D4aQXyZu.js";
4
+ import { t as SegmentedControl_default } from "./SegmentedControl-DyUPH3I5.js";
5
+ import { a as normalizeSearchQuery, i as candidateMatchesSearch, n as DataStateInternal_default, o as useTextSearch, t as AlertBox_default } from "./AlertBox-DwgNTEqf.js";
6
+ import { n as ActionMenu_default, t as useRequest } from "./useRequest-BuDmW8Jc.js";
7
7
  import { hasAllPermissions } from "./permissions.js";
8
- import { r as useExperimentSelector, t as ExperimentSelectorModal_default } from "./ExperimentSelectorModal-65peG4Up.js";
9
- import { t as experimentStatus_exports } from "./experimentStatus-Cqp6qNrR.js";
8
+ import { i as JobsStatusTray_default, r as useRealtime } from "./useRealtime-B58Lo-Tm.js";
9
+ import { r as useExperimentSelector, t as ExperimentSelectorModal_default } from "./ExperimentSelectorModal-B4j4eUOJ.js";
10
+ import { t as experimentStatus_exports } from "./experimentStatus-DCn2QKG7.js";
10
11
  import { t as ANALYSIS_FILE_ARTIFACT_SCHEMA } from "./analysisArtifactTypes-Cy3D0Ipg.js";
11
- import { t as ExperimentPopover_default } from "./ExperimentPopover-5T1fAq2L.js";
12
- import { i as JobsStatusTray_default, r as useRealtime } from "./useRealtime-C3iy9QkU.js";
13
- import { a as useFileImport, c as extractSampleNamesFromDesignData, i as readFileAsText, l as extractSampleOptionsFromDesignData, n as detectDelimiter, o as validateImportFile, r as parseDelimitedText, s as useExperimentData, t as useExperimentSamples, u as unwrapExperimentDesignData } from "./useExperimentSamples-DHnxKFAF.js";
12
+ import { t as ExperimentPopover_default } from "./ExperimentPopover-DujiuQIO.js";
13
+ import { a as readTableFileAsCsv, c as useExperimentData, d as unwrapExperimentDesignData, i as readFileAsText, l as extractSampleNamesFromDesignData, n as detectDelimiter, o as useFileImport, r as parseDelimitedText, s as validateImportFile, t as useExperimentSamples, u as extractSampleOptionsFromDesignData } from "./useExperimentSamples-QEFoq4tf.js";
14
14
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, getCurrentInstance, getCurrentScope, h, isRef, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onScopeDispose, openBlock, readonly, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toRaw, toValue, unref, useTemplateRef, watch, withCtx, withModifiers } from "vue";
15
15
  import { CircleCheck, CircleDashed, CircleMinus, CircleX, CloudUpload, File, Loader, RefreshCw, TriangleAlert, X } from "lucide-vue-next";
16
16
  //#region src/composables/useArtifacts.ts
@@ -3845,6 +3845,7 @@ var data_exports = /* @__PURE__ */ __exportAll({
3845
3845
  parseDelimitedText: () => parseDelimitedText,
3846
3846
  pluginSecret: () => pluginSecrets_exports,
3847
3847
  readFileAsText: () => readFileAsText,
3848
+ readTableFileAsCsv: () => readTableFileAsCsv,
3848
3849
  resolveExperimentCode: () => resolveExperimentCode,
3849
3850
  unwrapExperimentDesignData: () => unwrapExperimentDesignData,
3850
3851
  useAppExperiment: () => useAppExperiment,
@@ -3862,4 +3863,4 @@ var data_exports = /* @__PURE__ */ __exportAll({
3862
3863
  //#endregion
3863
3864
  export { ArtifactSaveDialog_default as _, usePlatformFilePickerAdapter as a, encodePlatformPickerPath as c, StaleFormBanner_default as d, VersionConflictDialog_default as f, ExperimentCodeBadge_default as g, FilePicker_default as h, useFileBrowser as i, fieldNameLabel as l, AuditTrail_default as m, buildAnalysisArtifactTargetQuery as n, createFilePickerAdapter as o, BatchProgressList_default as p, parseAnalysisArtifactTarget as r, decodePlatformPickerPath as s, data_exports as t, useVersionedSave as u, ArtifactSelectorModal_default as v, useArtifacts as y };
3864
3865
 
3865
- //# sourceMappingURL=data-CgILxDLW.js.map
3866
+ //# sourceMappingURL=data-Boeh4uPI.js.map