@morscherlab/mint-sdk 1.2.0-beta.9 → 1.2.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.
- package/README.md +30 -0
- package/dist/{ExperimentPopover-oL0fg_A0.js → ExperimentPopover-CJdNlCZb.js} +21 -14
- package/dist/ExperimentPopover-CJdNlCZb.js.map +1 -0
- package/dist/{ExperimentSelectorModal-BeEOomw_.js → ExperimentSelectorModal-DHE9k8TP.js} +5 -5
- package/dist/{ExperimentSelectorModal-BeEOomw_.js.map → ExperimentSelectorModal-DHE9k8TP.js.map} +1 -1
- package/dist/{SettingsModal-Dphh3RrI.js → SettingsModal-DOcCf0Vo.js} +41 -18
- package/dist/SettingsModal-DOcCf0Vo.js.map +1 -0
- package/dist/{Skeleton-DxtwJ5gt.js → Skeleton-jhF9wUkU.js} +19 -9
- package/dist/Skeleton-jhF9wUkU.js.map +1 -0
- package/dist/__tests__/apiErrors.test.d.ts +1 -0
- package/dist/__tests__/components/FileBrowserModal.test.d.ts +1 -0
- package/dist/__tests__/components/FilePicker.state.test.d.ts +1 -0
- package/dist/__tests__/components/FilePicker.test.d.ts +1 -0
- package/dist/__tests__/components/FormField.test.d.ts +1 -0
- package/dist/__tests__/components/NumberInput.test.d.ts +1 -0
- package/dist/__tests__/components/PlotlyChart.test.d.ts +1 -0
- package/dist/__tests__/components/iconButtonIconSizing.test.d.ts +1 -0
- package/dist/__tests__/composables/localFiles.test.d.ts +1 -0
- package/dist/__tests__/composables/useFileBrowser.test.d.ts +1 -0
- package/dist/__tests__/composables/usePickerSelection.test.d.ts +1 -0
- package/dist/__tests__/composables/usePlatformFilePickerAdapter.test.d.ts +1 -0
- package/dist/__tests__/styles/tokenOnlyColors.test.d.ts +1 -0
- package/dist/apiErrors.d.ts +26 -0
- package/dist/components/AppSidebar.vue.d.ts +7 -7
- package/dist/components/BaseInput.vue.d.ts +1 -1
- package/dist/components/BasePill.vue.d.ts +3 -0
- package/dist/components/BaseSelect.vue.d.ts +1 -1
- package/dist/components/BaseTabs.vue.d.ts +1 -4
- package/dist/components/BaseTextarea.vue.d.ts +1 -1
- package/dist/components/BioTemplateExperimentWorkspaceView.vue.d.ts +2 -2
- package/dist/components/BioTemplatePackWorkspaceView.vue.d.ts +2 -2
- package/dist/components/ConcentrationInput.vue.d.ts +1 -1
- package/dist/components/DatePicker.vue.d.ts +1 -1
- package/dist/components/DateTimePicker.vue.d.ts +1 -1
- package/dist/components/FileBrowserModal.vue.d.ts +99 -0
- package/dist/components/FilePicker.vue.d.ts +32 -0
- package/dist/components/FileUploader.vue.d.ts +8 -2
- package/dist/components/FormField.vue.d.ts +8 -1
- package/dist/components/FormulaInput.vue.d.ts +1 -1
- package/dist/components/GeneratedPlotlyResult.vue.d.ts +1 -3
- package/dist/components/MobileSupportGate.vue.d.ts +1 -1
- package/dist/components/MoleculeInput.vue.d.ts +1 -1
- package/dist/components/NumberInput.vue.d.ts +1 -1
- package/dist/components/PlotlyChart.vue.d.ts +59 -0
- package/dist/components/PluginWorkspaceView.props.d.ts +3 -3
- package/dist/components/ResourceCard.vue.d.ts +1 -1
- package/dist/components/SecretInput.vue.d.ts +1 -1
- package/dist/components/SequenceInput.vue.d.ts +1 -1
- package/dist/components/StatusIndicator.vue.d.ts +1 -1
- package/dist/components/TagsInput.vue.d.ts +1 -1
- package/dist/components/TimePicker.vue.d.ts +1 -1
- package/dist/components/TimeRangeInput.vue.d.ts +1 -1
- package/dist/components/UnitInput.vue.d.ts +1 -1
- package/dist/components/WellPlate.vue.d.ts +1 -1
- package/dist/components/fileBrowserPresentation.d.ts +10 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +8 -8
- package/dist/components/internal/FileBrowserDialogInternal.vue.d.ts +34 -0
- package/dist/components/internal/FileBrowserListingInternal.vue.d.ts +25 -0
- package/dist/components/internal/FileBrowserToolbarInternal.vue.d.ts +26 -0
- package/dist/components/internal/FilePickerPreviewInternal.vue.d.ts +18 -0
- package/dist/components/internal/FilePickerTreeInternal.vue.d.ts +31 -0
- package/dist/{components-CgAUzF8F.js → components-Cp8DcNrU.js} +4363 -1730
- package/dist/components-Cp8DcNrU.js.map +1 -0
- package/dist/composables/filePicker/localFiles.d.ts +3 -0
- package/dist/composables/filePicker/usePickerNavigation.d.ts +96 -0
- package/dist/composables/filePicker/usePickerSelection.d.ts +31 -0
- package/dist/composables/filePicker/validation.d.ts +5 -0
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/index.js +10 -10
- package/dist/composables/pluginWorkspaceModel.d.ts +0 -3
- package/dist/composables/useApi.d.ts +14 -7
- package/dist/composables/useFileBrowser.d.ts +55 -0
- package/dist/composables/useFilePicker.d.ts +189 -0
- package/dist/composables/usePlatformFilePickerAdapter.d.ts +11 -0
- package/dist/composables/useToast.d.ts +22 -1
- package/dist/{composables-B_pia3hO.js → composables-D_4qqOlp.js} +300 -11
- package/dist/composables-D_4qqOlp.js.map +1 -0
- package/dist/{errors-_W0-LbA6.js → errors-BLuqMee5.js} +78 -15
- package/dist/errors-BLuqMee5.js.map +1 -0
- package/dist/{experiment-Cwl9AYxw.js → experiment-CVDRAnqp.js} +2 -2
- package/dist/{experiment-Cwl9AYxw.js.map → experiment-CVDRAnqp.js.map} +1 -1
- package/dist/{experiment-utils-DV3DrvE_.js → experiment-utils-CV2Wza3z.js} +1 -1
- package/dist/{experiment-utils-DV3DrvE_.js.map → experiment-utils-CV2Wza3z.js.map} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -15
- package/dist/install.js +2 -2
- package/dist/stores/index.js +2 -2
- package/dist/styles.css +2957 -1708
- package/dist/templates/index.js +2 -2
- package/dist/{templates-Qq113pyZ.js → templates-Dd9bBSs6.js} +2 -2
- package/dist/{templates-Qq113pyZ.js.map → templates-Dd9bBSs6.js.map} +1 -1
- package/dist/types/components.d.ts +21 -0
- package/dist/types/fileBrowserTypes.d.ts +77 -0
- package/dist/types/filePicker.d.ts +77 -0
- package/dist/types/form-builder.d.ts +2 -0
- package/dist/types/generated-ui.d.ts +2 -0
- package/dist/types/index.d.ts +3 -1
- package/dist/{useControlSchema-aMZlb4Sc.js → useControlSchema-BB2GRPhW.js} +190 -105
- package/dist/useControlSchema-BB2GRPhW.js.map +1 -0
- package/dist/{useDropdownState-DitCtrTT.js → useDropdownState-C7hRiVQf.js} +2 -2
- package/dist/{useDropdownState-DitCtrTT.js.map → useDropdownState-C7hRiVQf.js.map} +1 -1
- package/dist/{useExperimentSelector-I8HC8hUu.js → useExperimentSelector-G_CAOFTX.js} +4 -4
- package/dist/{useExperimentSelector-I8HC8hUu.js.map → useExperimentSelector-G_CAOFTX.js.map} +1 -1
- package/dist/{useFormBuilder-TCxNnqeb.js → useFormBuilder-BnGSdSRG.js} +2 -2
- package/dist/{useFormBuilder-TCxNnqeb.js.map → useFormBuilder-BnGSdSRG.js.map} +1 -1
- package/dist/{useProtocolTemplates-BmX_iVBR.js → validation-CTxuzLIX.js} +70 -13
- package/dist/validation-CTxuzLIX.js.map +1 -0
- package/package.json +1 -1
- package/src/__tests__/apiErrors.test.ts +81 -0
- package/src/__tests__/components/AppSidebar.test.ts +84 -94
- package/src/__tests__/components/AppToastContainer.test.ts +55 -1
- package/src/__tests__/components/BioTemplatePresetWorkspaceView.test.ts +0 -21
- package/src/__tests__/components/ControlWorkspaceView.test.ts +0 -2
- package/src/__tests__/components/DoseDesignWorkspaceView.test.ts +0 -2
- package/src/__tests__/components/ExperimentPopover.test.ts +30 -0
- package/src/__tests__/components/FileBrowserModal.test.ts +460 -0
- package/src/__tests__/components/FilePicker.state.test.ts +287 -0
- package/src/__tests__/components/FilePicker.test.ts +487 -0
- package/src/__tests__/components/FormBuilder.test.ts +26 -0
- package/src/__tests__/components/FormField.test.ts +26 -0
- package/src/__tests__/components/GeneratedPathInput.test.ts +18 -0
- package/src/__tests__/components/GeneratedPlotlyResult.test.ts +52 -5
- package/src/__tests__/components/NumberInput.test.ts +105 -0
- package/src/__tests__/components/PlotlyChart.test.ts +305 -0
- package/src/__tests__/components/PluginWorkspaceView.internal.test.ts +1 -2
- package/src/__tests__/components/PluginWorkspaceView.test.ts +1 -2
- package/src/__tests__/components/SegmentedControl.test.ts +19 -0
- package/src/__tests__/components/iconButtonIconSizing.test.ts +18 -0
- package/src/__tests__/composables/localFiles.test.ts +57 -0
- package/src/__tests__/composables/useApi.test.ts +92 -9
- package/src/__tests__/composables/useFileBrowser.test.ts +305 -0
- package/src/__tests__/composables/useGeneratedAnalysis.test.ts +7 -2
- package/src/__tests__/composables/usePickerSelection.test.ts +98 -0
- package/src/__tests__/composables/usePlatformFilePickerAdapter.test.ts +67 -0
- package/src/__tests__/composables/usePluginClient.test.ts +3 -0
- package/src/__tests__/generatedUi.test.ts +111 -0
- package/src/__tests__/styles/tokenOnlyColors.test.ts +16 -0
- package/src/apiErrors.ts +85 -0
- package/src/components/AppLayout.story.vue +1 -1
- package/src/components/AppSidebar.story.vue +7 -10
- package/src/components/AppSidebar.vue +178 -58
- package/src/components/AppToastContainer.vue +65 -23
- package/src/components/BasePill.story.vue +2 -0
- package/src/components/BasePill.vue +4 -0
- package/src/components/BaseTabs.story.vue +0 -42
- package/src/components/BaseTabs.vue +3 -6
- package/src/components/ExperimentPopover.vue +10 -2
- package/src/components/FileBrowserModal.story.vue +203 -0
- package/src/components/FileBrowserModal.vue +384 -0
- package/src/components/FilePicker.story.vue +44 -0
- package/src/components/FilePicker.vue +284 -0
- package/src/components/FileUploader.vue +42 -15
- package/src/components/FormField.vue +10 -3
- package/src/components/GeneratedPathInput.vue +11 -7
- package/src/components/GeneratedPlotlyResult.vue +34 -69
- package/src/components/GeneratedResultRenderer.vue +0 -5
- package/src/components/NumberInput.story.vue +32 -13
- package/src/components/NumberInput.vue +116 -55
- package/src/components/PlotlyChart.story.vue +61 -0
- package/src/components/PlotlyChart.vue +233 -0
- package/src/components/PluginWorkspaceView.props.ts +3 -3
- package/src/components/SegmentedControl.vue +2 -2
- package/src/components/fileBrowserPresentation.ts +39 -0
- package/src/components/index.ts +5 -0
- package/src/components/internal/FileBrowserDialogInternal.vue +75 -0
- package/src/components/internal/FileBrowserListingInternal.vue +197 -0
- package/src/components/internal/FileBrowserToolbarInternal.vue +136 -0
- package/src/components/internal/FilePickerPreviewInternal.vue +100 -0
- package/src/components/internal/FilePickerTreeInternal.vue +238 -0
- package/src/components/internal/FormFieldRendererInternal.vue +17 -0
- package/src/components/internal/WorkspaceSidebarInternal.vue +1 -2
- package/src/composables/filePicker/localFiles.ts +65 -0
- package/src/composables/filePicker/usePickerNavigation.ts +220 -0
- package/src/composables/filePicker/usePickerSelection.ts +270 -0
- package/src/composables/filePicker/validation.ts +41 -0
- package/src/composables/index.ts +7 -0
- package/src/composables/pluginWorkspaceModel.ts +0 -3
- package/src/composables/useApi.ts +57 -13
- package/src/composables/useFileBrowser.ts +314 -0
- package/src/composables/useFilePicker.ts +366 -0
- package/src/composables/useGeneratedAnalysis.ts +10 -17
- package/src/composables/usePlatformFilePickerAdapter.ts +104 -0
- package/src/composables/usePluginClient.ts +3 -0
- package/src/composables/usePluginWorkspace.ts +1 -2
- package/src/composables/useToast.ts +21 -5
- package/src/generated/schema.ts +58 -18
- package/src/index.ts +3 -0
- package/src/styles/components/app-sidebar.css +282 -121
- package/src/styles/components/file-browser-modal.css +489 -0
- package/src/styles/components/file-picker.css +502 -0
- package/src/styles/components/form-builder.css +1 -1
- package/src/styles/components/form-field.css +28 -0
- package/src/styles/components/icon-button.css +9 -0
- package/src/styles/components/number-input.css +73 -91
- package/src/styles/components/pill.css +49 -51
- package/src/styles/components/segmented-control.css +16 -11
- package/src/styles/components/tabs.css +18 -34
- package/src/styles/components/toast.css +136 -27
- package/src/styles/index.css +3 -0
- package/src/styles/variables.css +25 -5
- package/src/types/components.ts +23 -0
- package/src/types/fileBrowserTypes.ts +85 -0
- package/src/types/filePicker.ts +72 -0
- package/src/types/form-builder.ts +2 -0
- package/src/types/generated-ui.ts +2 -0
- package/src/types/index.ts +16 -0
- package/dist/ExperimentPopover-oL0fg_A0.js.map +0 -1
- package/dist/SettingsModal-Dphh3RrI.js.map +0 -1
- package/dist/Skeleton-DxtwJ5gt.js.map +0 -1
- package/dist/components-CgAUzF8F.js.map +0 -1
- package/dist/composables-B_pia3hO.js.map +0 -1
- package/dist/errors-_W0-LbA6.js.map +0 -1
- package/dist/useControlSchema-aMZlb4Sc.js.map +0 -1
- package/dist/useProtocolTemplates-BmX_iVBR.js.map +0 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { PickerAdapter, PickerNode, PickerRequest, PickerTreeRow } from '../../types/filePicker';
|
|
2
|
+
export declare function usePickerNavigation(adapter: () => PickerAdapter, request: () => PickerRequest, systemFilter?: (node: PickerNode) => boolean): {
|
|
3
|
+
path: import('vue').ShallowRef<string, string>;
|
|
4
|
+
trail: import('vue').Ref<{
|
|
5
|
+
path: string;
|
|
6
|
+
label: string;
|
|
7
|
+
}[], {
|
|
8
|
+
path: string;
|
|
9
|
+
label: string;
|
|
10
|
+
}[] | {
|
|
11
|
+
path: string;
|
|
12
|
+
label: string;
|
|
13
|
+
}[]>;
|
|
14
|
+
entries: import('vue').ShallowRef<PickerNode[], PickerNode[]>;
|
|
15
|
+
nodes: import('vue').Ref<Map<string, {
|
|
16
|
+
kind: "folder";
|
|
17
|
+
fileCount?: number | null | undefined;
|
|
18
|
+
formats?: Record<string, number> | undefined;
|
|
19
|
+
hasChildren?: boolean | undefined;
|
|
20
|
+
path: string;
|
|
21
|
+
name: string;
|
|
22
|
+
parentPath?: string | null | undefined;
|
|
23
|
+
parentName?: string | undefined;
|
|
24
|
+
bytes?: number | null | undefined;
|
|
25
|
+
unavailableReason?: string | undefined;
|
|
26
|
+
} | {
|
|
27
|
+
kind: "file";
|
|
28
|
+
format: string;
|
|
29
|
+
file?: {
|
|
30
|
+
readonly lastModified: number;
|
|
31
|
+
readonly name: string;
|
|
32
|
+
readonly webkitRelativePath: string;
|
|
33
|
+
readonly size: number;
|
|
34
|
+
readonly type: string;
|
|
35
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
36
|
+
bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
37
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
38
|
+
stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
39
|
+
text: () => Promise<string>;
|
|
40
|
+
} | undefined;
|
|
41
|
+
path: string;
|
|
42
|
+
name: string;
|
|
43
|
+
parentPath?: string | null | undefined;
|
|
44
|
+
parentName?: string | undefined;
|
|
45
|
+
bytes?: number | null | undefined;
|
|
46
|
+
unavailableReason?: string | undefined;
|
|
47
|
+
}> & Omit<Map<string, PickerNode>, keyof Map<any, any>>, Map<string, PickerNode> | (Map<string, {
|
|
48
|
+
kind: "folder";
|
|
49
|
+
fileCount?: number | null | undefined;
|
|
50
|
+
formats?: Record<string, number> | undefined;
|
|
51
|
+
hasChildren?: boolean | undefined;
|
|
52
|
+
path: string;
|
|
53
|
+
name: string;
|
|
54
|
+
parentPath?: string | null | undefined;
|
|
55
|
+
parentName?: string | undefined;
|
|
56
|
+
bytes?: number | null | undefined;
|
|
57
|
+
unavailableReason?: string | undefined;
|
|
58
|
+
} | {
|
|
59
|
+
kind: "file";
|
|
60
|
+
format: string;
|
|
61
|
+
file?: {
|
|
62
|
+
readonly lastModified: number;
|
|
63
|
+
readonly name: string;
|
|
64
|
+
readonly webkitRelativePath: string;
|
|
65
|
+
readonly size: number;
|
|
66
|
+
readonly type: string;
|
|
67
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
68
|
+
bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
69
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
70
|
+
stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
71
|
+
text: () => Promise<string>;
|
|
72
|
+
} | undefined;
|
|
73
|
+
path: string;
|
|
74
|
+
name: string;
|
|
75
|
+
parentPath?: string | null | undefined;
|
|
76
|
+
parentName?: string | undefined;
|
|
77
|
+
bytes?: number | null | undefined;
|
|
78
|
+
unavailableReason?: string | undefined;
|
|
79
|
+
}> & Omit<Map<string, PickerNode>, keyof Map<any, any>>)>;
|
|
80
|
+
children: import('vue').ShallowRef<Map<string, PickerNode[]>, Map<string, PickerNode[]>>;
|
|
81
|
+
expanded: import('vue').Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
82
|
+
expanding: import('vue').Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
83
|
+
expansionErrors: import('vue').Ref<Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>, Map<string, string> | (Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>)>;
|
|
84
|
+
loading: import('vue').ShallowRef<boolean, boolean>;
|
|
85
|
+
error: import('vue').ShallowRef<string, string>;
|
|
86
|
+
rows: import('vue').ComputedRef<PickerTreeRow[]>;
|
|
87
|
+
isAllowed: (node: PickerNode) => boolean;
|
|
88
|
+
clear: () => void;
|
|
89
|
+
invalidate: () => void;
|
|
90
|
+
register: (items: PickerNode[], parent?: string) => void;
|
|
91
|
+
loadChildren: (folder: string, ancestors?: string[], refresh?: boolean) => Promise<PickerNode[]>;
|
|
92
|
+
load: (query?: string, recursive?: boolean, refresh?: boolean) => Promise<void>;
|
|
93
|
+
expand: (node: PickerNode) => Promise<void>;
|
|
94
|
+
enter: (node: PickerNode) => void;
|
|
95
|
+
up: (target?: string) => void;
|
|
96
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { PickerCapability, PickerExcluded, PickerFile, PickerNode, PickerSelection, PickerSelectionMode } from '../../types/filePicker';
|
|
2
|
+
import { usePickerNavigation } from './usePickerNavigation';
|
|
3
|
+
type Navigation = ReturnType<typeof usePickerNavigation>;
|
|
4
|
+
export declare function usePickerSelection(nav: Navigation, mode: () => PickerSelectionMode, capability: () => PickerCapability | undefined, skipBlanks: () => boolean): {
|
|
5
|
+
keys: import('vue').Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
6
|
+
dropped: import('vue').Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
7
|
+
focusPath: import('vue').ShallowRef<string, string>;
|
|
8
|
+
resolving: import('vue').ShallowRef<boolean, boolean>;
|
|
9
|
+
resolutionError: import('vue').ShallowRef<string, string>;
|
|
10
|
+
roots: import('vue').ComputedRef<PickerNode[]>;
|
|
11
|
+
chosen: import('vue').ComputedRef<{
|
|
12
|
+
files: PickerFile[];
|
|
13
|
+
excluded: PickerExcluded[];
|
|
14
|
+
bytes: number;
|
|
15
|
+
}>;
|
|
16
|
+
focused: import('vue').ComputedRef<PickerNode>;
|
|
17
|
+
select: (node: PickerNode, modifiers?: {
|
|
18
|
+
metaKey?: boolean;
|
|
19
|
+
ctrlKey?: boolean;
|
|
20
|
+
shiftKey?: boolean;
|
|
21
|
+
toggle?: boolean;
|
|
22
|
+
}) => void;
|
|
23
|
+
selected: (node: PickerNode) => boolean;
|
|
24
|
+
selectable: (node: PickerNode) => boolean;
|
|
25
|
+
exclusion: (node: PickerNode) => PickerExcluded | null;
|
|
26
|
+
reset: (selection?: PickerSelection | null) => void;
|
|
27
|
+
resolve: () => Promise<void>;
|
|
28
|
+
folderProgress: (node: PickerNode) => string;
|
|
29
|
+
ancestorSelected: (node: PickerNode, candidates?: Set<string> & Omit<Set<string>, keyof Set<any>>) => boolean;
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PickerCapability, PickerExcluded, PickerNode } from '../../types/filePicker';
|
|
2
|
+
export declare function normalizePickerFormat(format: string): string;
|
|
3
|
+
export declare function pickerExclusion(node: PickerNode, capability?: PickerCapability, skipBlanks?: boolean): PickerExcluded | null;
|
|
4
|
+
export declare function pickerReason(excluded: PickerExcluded | null, node?: PickerNode): string;
|
|
5
|
+
export declare function pickerFormat(name: string): string;
|
|
@@ -28,6 +28,7 @@ export { usePluginConfig, type UsePluginConfigReturn } from './usePluginConfig';
|
|
|
28
28
|
export { useReagentSeries, generateDilutionSeries, DEFAULT_PRESETS, DEFAULT_UNITS, type LevelEntry, type DilutionPreset, type UseReagentSeriesReturn, } from './useReagentSeries';
|
|
29
29
|
export { useExperimentSelector, type UseExperimentSelectorOptions, type UseExperimentSelectorReturn, } from './useExperimentSelector';
|
|
30
30
|
export { useAnalysisArtifacts, ANALYSIS_FILE_ARTIFACT_SCHEMA, type UseAnalysisArtifactsOptions, type UseAnalysisArtifactsReturn, } from './useAnalysisArtifacts';
|
|
31
|
+
export { useFileBrowser, type UseFileBrowserOptions, type UseFileBrowserReturn, } from './useFileBrowser';
|
|
31
32
|
export { buildAnalysisArtifactTargetQuery, parseAnalysisArtifactTarget, } from './analysisArtifactTarget';
|
|
32
33
|
export { resolveCurrentPluginId } from './platformContextHelpers';
|
|
33
34
|
export { formatExperimentDate, formatExperimentStatus, getExperimentStatusVariant, resolveExperimentCode, experimentIdFromRoute, datePresetToISO, EXPERIMENT_STATUS_OPTIONS, EXPERIMENT_STATUS_VARIANT_MAP, EXPERIMENT_STATUS_LABELS, DATE_PRESET_OPTIONS, SORT_OPTIONS, } from './experiment-utils';
|
|
@@ -67,3 +68,4 @@ export { useFocusTrap, type UseFocusTrapOptions, type UseFocusTrapReturn, } from
|
|
|
67
68
|
export { useRovingFocus, type UseRovingFocusOptions, type UseRovingFocusReturn, } from './useRovingFocus';
|
|
68
69
|
export { reorderList, useListReorder, useReorderAnnouncer, REORDER_ANNOUNCER_STYLE, type ListReorderMove, type UseListReorderOptions, type UseListReorderReturn, type UseReorderAnnouncerReturn, } from './useListReorder';
|
|
69
70
|
export { useMenuKeyboard, type UseMenuKeyboardOptions, type UseMenuKeyboardReturn, } from './useMenuKeyboard';
|
|
71
|
+
export { usePlatformFilePickerAdapter, encodePlatformPickerPath, decodePlatformPickerPath } from './usePlatformFilePickerAdapter';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { i as
|
|
6
|
-
import { i as usePlatformContext, n as evaluateCondition, r as useForm, t as useFormBuilder } from "../useFormBuilder-
|
|
1
|
+
import { i as useApi, n as AuthenticationRequiredError } from "../errors-BLuqMee5.js";
|
|
2
|
+
import { a as SORT_OPTIONS, c as formatExperimentDate, d as resolveExperimentCode, i as EXPERIMENT_STATUS_VARIANT_MAP, l as formatExperimentStatus, m as useEventListener, n as EXPERIMENT_STATUS_LABELS, o as datePresetToISO, p as useFocusTrap, r as EXPERIMENT_STATUS_OPTIONS, s as experimentIdFromRoute, t as DATE_PRESET_OPTIONS, u as getExperimentStatusVariant } from "../experiment-utils-CV2Wza3z.js";
|
|
3
|
+
import { n as useRequestSyncState } from "../Skeleton-jhF9wUkU.js";
|
|
4
|
+
import { A as useConcentrationUnits, At as formatTimeSlot, C as controlsToViewIds, Ct as addMinutes, D as getTypeDefault, Dt as findNearestTimeSlotIndex, E as getFieldRegistryEntry, Et as findAvailableSlots, F as ATOMIC_WEIGHTS, Ft as rangesOverlap, G as createGeneratedAnalysisTransport, Ht as useSelectionLimit, I as useChemicalFormula, It as snapToSlot, K as useGeneratedAnalysis, Lt as toMinutes, Mt as generateTimeSlots, N as useSequenceUtils, Nt as isTimeInRange, Ot as formatDuration, Pt as parseTime, Rt as useTimeUtils, S as controlsToTopBarSettingsConfig, T as getDefaultControlView, Tt as durationMinutes, Vt as useListSelection, W as resolveCurrentPluginId, _ as controlsToFormSchema, a as defineDoseCalculatorControlProps, b as controlsToSettingsSchema, c as defineWellPlateDoseComponentBindings, d as defineControlModel, h as controlValuesToComponentProps, i as useControlSchema, jt as fromMinutes, kt as formatTime, l as defineWellPlateDoseControlProps, m as controlValuesToComponentBindingsById, n as defineControls, o as defineDoseDesignControlModel, p as controlValuesToComponentBindings, q as usePluginJobs, r as getControlDefaults, s as defineWellPlateControlProps, t as defineControlComponentBindings, u as useControlWorkspace, v as controlsToSectionFormSchema, w as controlsToViewItems, wt as compareTime, x as controlsToSidebarPanels, y as controlsToSectionFormSchemas, z as useAnalysisArtifacts } from "../useControlSchema-BB2GRPhW.js";
|
|
5
|
+
import { $ as getInjectedFrontendRevision, A as useFileImport, B as REORDER_ANNOUNCER_STYLE, C as useExpansionSet, D as detectDelimiter, F as extractSampleNamesFromDesignData, G as combinePluginJobSources, H as useListReorder, I as extractSampleOptionsFromDesignData, J as usePluginWorkspace, K as useJobsStatusTray, L as unwrapExperimentDesignData, M as extractSamplesFromDesignData, N as useAutoGroup, O as parseDelimitedText, Q as useAppExperiment, R as DEFAULT_COLORS, S as useExperimentData, U as useReorderAnnouncer, V as reorderList, W as useDoseCalculator, X as useMobileSupportGate, Y as DEFAULT_MOBILE_VIEWPORT_QUERY, Z as APP_EXPERIMENT_KEY, _ as useBioTemplateControls, a as DEFAULT_PRESETS, at as candidateMatchesSearch, b as useScheduleDrag, c as useReagentSeries, ct as compareSortValues, d as useBioTemplatePresetWorkspace, dt as useRovingFocus, et as useRuntimeAlignment, f as useBioTemplatePackWorkspace, g as useBioTemplateComponents, h as toBioTemplateComponentPropsByComponent, i as useProtocolTemplates, it as useToast, j as validateImportFile, k as readFileAsText, l as useGroupAssignment, lt as useSortedItems, m as getBioTemplateComponentProps, nt as usePresenceHeartbeat, o as DEFAULT_UNITS, ot as normalizeSearchQuery, p as useBioTemplateWorkspace, q as usePluginJobCenter, rt as useTheme, s as generateDilutionSeries, st as useTextSearch, tt as getPresenceClientId, u as useRackEditor, ut as useMenuKeyboard, v as useTemplateCollection, w as useSampleGroups, x as useExperimentSamples, y as useExperimentSave, z as useWellPlateEditor } from "../validation-CTxuzLIX.js";
|
|
6
|
+
import { i as usePlatformContext, n as evaluateCondition, r as useForm, t as useFormBuilder } from "../useFormBuilder-BnGSdSRG.js";
|
|
7
7
|
import { t as ANALYSIS_FILE_ARTIFACT_SCHEMA } from "../analysisArtifactTypes-DQ0MjwHZ.js";
|
|
8
|
-
import { B as toBioTemplateComponentProps, H as toBioTemplateComponentPropsById, L as toBioTemplateComponentBindings, P as getBioTemplateComponentBindings, R as toBioTemplateComponentBindingsById, l as requireBioTemplateControlSchema, o as getBioTemplateControlSchema } from "../templates-
|
|
9
|
-
import { n as useDebouncedWatch, t as useExperimentSelector } from "../useExperimentSelector-
|
|
10
|
-
import { A as
|
|
11
|
-
export { ANALYSIS_FILE_ARTIFACT_SCHEMA, APP_EXPERIMENT_KEY, ATOMIC_WEIGHTS, AuthenticationRequiredError, DATE_PRESET_OPTIONS, DEFAULT_COLORS, DEFAULT_MOBILE_VIEWPORT_QUERY, DEFAULT_PRESETS, DEFAULT_UNITS, EXPERIMENT_STATUS_LABELS, EXPERIMENT_STATUS_OPTIONS, EXPERIMENT_STATUS_VARIANT_MAP, REORDER_ANNOUNCER_STYLE, SORT_OPTIONS, addMinutes, buildAnalysisArtifactTargetQuery, buildPluginEndpointUrl, candidateMatchesSearch, combinePluginJobSources, compareSortValues, compareTime, controlValuesToComponentBindings, controlValuesToComponentBindingsById, controlValuesToComponentProps, controlsToFormSchema, controlsToSectionFormSchema, controlsToSectionFormSchemas, controlsToSettingsSchema, controlsToSidebarPanels, controlsToTopBarSettingsConfig, controlsToViewIds, controlsToViewItems, coordinateToWellId, createColumnConditions, createGeneratedAnalysisTransport, createPluginClient, createPluginResourceClient, createRowConditions, createWellPlateWells, datePresetToISO, defineControlComponentBindings, defineControlModel, defineControls, defineDoseCalculatorControlProps, defineDoseDesignControlModel, defineWellPlateControlProps, defineWellPlateDoseComponentBindings, defineWellPlateDoseControlProps, detectDelimiter, downloadBlob, downloadPluginEndpoint, durationMinutes, evaluateCondition, experimentIdFromRoute, extractSampleNamesFromDesignData, extractSampleOptionsFromDesignData, extractSamplesFromDesignData, findAvailableSlots, findNearestTimeSlotIndex, formatDuration, formatExperimentDate, formatExperimentStatus, formatTime, formatTimeSlot, fromMinutes, generateDilutionSeries, generateTimeSlots, getBioTemplateComponentBindings, getBioTemplateComponentProps, getBioTemplateControlSchema, getControlDefaults, getDefaultControlView, getExperimentStatusVariant, getFieldRegistryEntry, getInjectedFrontendRevision, getPluginPageSelectorItems, getPresenceClientId, getTypeDefault, isTimeInRange, normalizeSearchQuery, parseAnalysisArtifactTarget, parseDelimitedText, parseTime, pluginFormDataFromPayload, rangesOverlap, readFileAsText, reorderList, requireBioTemplateControlSchema, resolveCurrentPluginId, resolveExperimentCode, resolvePluginBaseUrl, resolvePluginFrontendBase, runWellPlateValidation, snapToSlot, toBioTemplateComponentBindings, toBioTemplateComponentBindingsById, toBioTemplateComponentProps, toBioTemplateComponentPropsByComponent, toBioTemplateComponentPropsById, toMinutes, unwrapExperimentDesignData, uploadPluginEndpoint, useAnalysisArtifacts, useApi, useAppExperiment, useAsync, useAsyncBatch, useAuth, useAutoGroup, useBioTemplateComponents, useBioTemplateControls, useBioTemplatePackWorkspace, useBioTemplatePresetWorkspace, useBioTemplateWorkspace, useChemicalFormula, useCommandHistory, useConcentrationUnits, useControlSchema, useControlWorkspace, useCurrentExperiment, useDebouncedWatch, useDoseCalculator, useEventListener, useExpansionSet, useExperimentData, useExperimentSamples, useExperimentSave, useExperimentSelector, useFileImport, useFocusTrap, useForm, useFormBuilder, useGeneratedAnalysis, useGroupAssignment, useJobsStatusTray, useListReorder, useListSelection, useMenuKeyboard, useMobileSupportGate, useOptimisticMutation, usePasskey, usePlatformContext, usePluginClient, usePluginConfig, usePluginEventStream, usePluginJobCenter, usePluginJobs, usePluginSettings, usePluginWorkspace, usePresenceHeartbeat, useProtocolTemplates, useRackEditor, useReagentSeries, useReorderAnnouncer, useRequestSyncState, useResourceCrud, useRovingFocus, useRuntimeAlignment, useSampleGroups, useScheduleDrag, useSelectionLimit, useSequenceUtils, useSortedItems, useTemplateCollection, useTextSearch, useTheme, useTimeUtils, useToast, useWellPainting, useWellPlateAdapter, useWellPlateEditor, useWellPlateValidation, validateImportFile, wellIdToCoordinate, wellIdsInRectangle };
|
|
8
|
+
import { B as toBioTemplateComponentProps, H as toBioTemplateComponentPropsById, L as toBioTemplateComponentBindings, P as getBioTemplateComponentBindings, R as toBioTemplateComponentBindingsById, l as requireBioTemplateControlSchema, o as getBioTemplateControlSchema } from "../templates-Dd9bBSs6.js";
|
|
9
|
+
import { n as useDebouncedWatch, t as useExperimentSelector } from "../useExperimentSelector-G_CAOFTX.js";
|
|
10
|
+
import { A as buildAnalysisArtifactTargetQuery, C as useWellPainting, D as useResourceCrud, E as createPluginResourceClient, F as useAsyncBatch, I as resolvePluginFrontendBase, L as usePasskey, M as useFileBrowser, N as usePluginConfig, O as useOptimisticMutation, P as useAsync, R as useAuth, S as coordinateToWellId, T as wellIdsInRectangle, _ as useWellPlateValidation, a as downloadBlob, b as createWellPlateWells, c as pluginFormDataFromPayload, d as usePluginClient, f as usePluginEventStream, g as runWellPlateValidation, h as resolvePluginBaseUrl, i as createPluginClient, j as parseAnalysisArtifactTarget, k as useCommandHistory, l as uploadPluginEndpoint, m as buildPluginEndpointUrl, n as encodePlatformPickerPath, o as downloadPluginEndpoint, p as usePluginSettings, r as usePlatformFilePickerAdapter, s as getPluginPageSelectorItems, t as decodePlatformPickerPath, u as useCurrentExperiment, v as createColumnConditions, w as wellIdToCoordinate, x as useWellPlateAdapter, y as createRowConditions } from "../composables-D_4qqOlp.js";
|
|
11
|
+
export { ANALYSIS_FILE_ARTIFACT_SCHEMA, APP_EXPERIMENT_KEY, ATOMIC_WEIGHTS, AuthenticationRequiredError, DATE_PRESET_OPTIONS, DEFAULT_COLORS, DEFAULT_MOBILE_VIEWPORT_QUERY, DEFAULT_PRESETS, DEFAULT_UNITS, EXPERIMENT_STATUS_LABELS, EXPERIMENT_STATUS_OPTIONS, EXPERIMENT_STATUS_VARIANT_MAP, REORDER_ANNOUNCER_STYLE, SORT_OPTIONS, addMinutes, buildAnalysisArtifactTargetQuery, buildPluginEndpointUrl, candidateMatchesSearch, combinePluginJobSources, compareSortValues, compareTime, controlValuesToComponentBindings, controlValuesToComponentBindingsById, controlValuesToComponentProps, controlsToFormSchema, controlsToSectionFormSchema, controlsToSectionFormSchemas, controlsToSettingsSchema, controlsToSidebarPanels, controlsToTopBarSettingsConfig, controlsToViewIds, controlsToViewItems, coordinateToWellId, createColumnConditions, createGeneratedAnalysisTransport, createPluginClient, createPluginResourceClient, createRowConditions, createWellPlateWells, datePresetToISO, decodePlatformPickerPath, defineControlComponentBindings, defineControlModel, defineControls, defineDoseCalculatorControlProps, defineDoseDesignControlModel, defineWellPlateControlProps, defineWellPlateDoseComponentBindings, defineWellPlateDoseControlProps, detectDelimiter, downloadBlob, downloadPluginEndpoint, durationMinutes, encodePlatformPickerPath, evaluateCondition, experimentIdFromRoute, extractSampleNamesFromDesignData, extractSampleOptionsFromDesignData, extractSamplesFromDesignData, findAvailableSlots, findNearestTimeSlotIndex, formatDuration, formatExperimentDate, formatExperimentStatus, formatTime, formatTimeSlot, fromMinutes, generateDilutionSeries, generateTimeSlots, getBioTemplateComponentBindings, getBioTemplateComponentProps, getBioTemplateControlSchema, getControlDefaults, getDefaultControlView, getExperimentStatusVariant, getFieldRegistryEntry, getInjectedFrontendRevision, getPluginPageSelectorItems, getPresenceClientId, getTypeDefault, isTimeInRange, normalizeSearchQuery, parseAnalysisArtifactTarget, parseDelimitedText, parseTime, pluginFormDataFromPayload, rangesOverlap, readFileAsText, reorderList, requireBioTemplateControlSchema, resolveCurrentPluginId, resolveExperimentCode, resolvePluginBaseUrl, resolvePluginFrontendBase, runWellPlateValidation, snapToSlot, toBioTemplateComponentBindings, toBioTemplateComponentBindingsById, toBioTemplateComponentProps, toBioTemplateComponentPropsByComponent, toBioTemplateComponentPropsById, toMinutes, unwrapExperimentDesignData, uploadPluginEndpoint, useAnalysisArtifacts, useApi, useAppExperiment, useAsync, useAsyncBatch, useAuth, useAutoGroup, useBioTemplateComponents, useBioTemplateControls, useBioTemplatePackWorkspace, useBioTemplatePresetWorkspace, useBioTemplateWorkspace, useChemicalFormula, useCommandHistory, useConcentrationUnits, useControlSchema, useControlWorkspace, useCurrentExperiment, useDebouncedWatch, useDoseCalculator, useEventListener, useExpansionSet, useExperimentData, useExperimentSamples, useExperimentSave, useExperimentSelector, useFileBrowser, useFileImport, useFocusTrap, useForm, useFormBuilder, useGeneratedAnalysis, useGroupAssignment, useJobsStatusTray, useListReorder, useListSelection, useMenuKeyboard, useMobileSupportGate, useOptimisticMutation, usePasskey, usePlatformContext, usePlatformFilePickerAdapter, usePluginClient, usePluginConfig, usePluginEventStream, usePluginJobCenter, usePluginJobs, usePluginSettings, usePluginWorkspace, usePresenceHeartbeat, useProtocolTemplates, useRackEditor, useReagentSeries, useReorderAnnouncer, useRequestSyncState, useResourceCrud, useRovingFocus, useRuntimeAlignment, useSampleGroups, useScheduleDrag, useSelectionLimit, useSequenceUtils, useSortedItems, useTemplateCollection, useTextSearch, useTheme, useTimeUtils, useToast, useWellPainting, useWellPlateAdapter, useWellPlateEditor, useWellPlateValidation, validateImportFile, wellIdToCoordinate, wellIdsInRectangle };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AccountMenuItem, PageSelectorItemInput, PillNavItemInput, PluginSwitcherInfo, SidebarToolSection, TopBarSettingsConfig, TopBarVariant } from '../types';
|
|
2
2
|
import { FormEnhancements, FormSchema } from '../types/form-builder';
|
|
3
3
|
import { ControlComponentBinding, ControlComponentBindingsById, ControlModel, ControlModelBinding, ControlSchema, ControlWorkspaceOptions } from './useControlSchema';
|
|
4
|
-
import { PluginWorkspaceSidebarVariant } from '../components/PluginWorkspaceView.props';
|
|
5
4
|
/**
|
|
6
5
|
* Scoped-slot payload shared by PluginWorkspaceView's `default`, `topbar`, and `sidebar`
|
|
7
6
|
* slots: the resolved active view plus the values and component bindings/props derived
|
|
@@ -107,8 +106,6 @@ export interface PluginWorkspaceSidebarModel {
|
|
|
107
106
|
subtitle?: string;
|
|
108
107
|
/** Optional compact badge/count rendered in the sidebar header. */
|
|
109
108
|
badge?: string | number;
|
|
110
|
-
/** AppSidebar visual preset. */
|
|
111
|
-
variant: PluginWorkspaceSidebarVariant;
|
|
112
109
|
/** Map of view IDs to sidebar tool sections. */
|
|
113
110
|
panels: Record<string, SidebarToolSection[]>;
|
|
114
111
|
/** Resolved active view, used to pick which panels/forms render. */
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { MintApiError } from '../apiErrors';
|
|
3
|
+
/**
|
|
4
|
+
* Raised when an authenticated SDK request is rejected because the login is no
|
|
5
|
+
* longer valid. It is also a `MintApiError` (status 401), so typed-error callers
|
|
6
|
+
* and `instanceof AuthenticationRequiredError` callers both recognise it.
|
|
7
|
+
*/
|
|
8
|
+
export declare class AuthenticationRequiredError extends MintApiError {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly code: 'AUTHENTICATION_REQUIRED';
|
|
11
|
+
readonly status: 401;
|
|
12
|
+
constructor(cause?: unknown, envelope?: MintApiError);
|
|
8
13
|
}
|
|
9
14
|
/** @internal Convert a rejected authenticated request into the SDK's public auth error. */
|
|
10
|
-
export declare function authenticationRequiredError(cause: unknown, rejectedToken?: string): AuthenticationRequiredError;
|
|
15
|
+
export declare function authenticationRequiredError(cause: unknown, rejectedToken?: string, envelope?: MintApiError): AuthenticationRequiredError;
|
|
11
16
|
export interface ApiClientOptions {
|
|
12
17
|
baseUrl?: string;
|
|
13
18
|
timeout?: number;
|
|
14
19
|
withAuth?: boolean;
|
|
20
|
+
/** Normalize failed responses into MintApiError. Generated clients enable this by default. */
|
|
21
|
+
typedErrors?: boolean;
|
|
15
22
|
}
|
|
16
23
|
export interface UseApiReturn {
|
|
17
24
|
client: AxiosInstance;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ComputedRef, MaybeRefOrGetter, Ref } from 'vue';
|
|
2
|
+
import { FileBrowserSortKey, FileEntry, FilePathCrumb, FileSelection, ServerMount } from '../types/fileBrowserTypes';
|
|
3
|
+
export interface UseFileBrowserOptions {
|
|
4
|
+
/** Extensions the caller cares about; entries are flagged, never removed. */
|
|
5
|
+
typeRules?: MaybeRefOrGetter<string[] | undefined>;
|
|
6
|
+
/** Mount to open first; defaults to the first available one. */
|
|
7
|
+
initialMountId?: MaybeRefOrGetter<string | undefined>;
|
|
8
|
+
/** Override the platform API base URL (standalone plugin dev). */
|
|
9
|
+
apiBaseUrl?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface UseFileBrowserReturn {
|
|
12
|
+
/** Every configured mount, offline ones included. */
|
|
13
|
+
mounts: Ref<ServerMount[]>;
|
|
14
|
+
/** Mount the current listing belongs to. */
|
|
15
|
+
mountId: Ref<string>;
|
|
16
|
+
/** Mount-relative path of the current listing. */
|
|
17
|
+
path: Ref<string>;
|
|
18
|
+
/** Parent path, or null at a mount root. */
|
|
19
|
+
parent: Ref<string | null>;
|
|
20
|
+
entries: Ref<FileEntry[]>;
|
|
21
|
+
breadcrumbs: Ref<FilePathCrumb[]>;
|
|
22
|
+
/** Directory size before any search filter. */
|
|
23
|
+
totalCount: Ref<number | null>;
|
|
24
|
+
/** How many entries satisfy the type rules. */
|
|
25
|
+
matchCount: Ref<number | null>;
|
|
26
|
+
/** How many rows this listing carries, after search and any cap. */
|
|
27
|
+
shownCount: Ref<number | null>;
|
|
28
|
+
/** True when the server capped the listing. */
|
|
29
|
+
truncated: Ref<boolean>;
|
|
30
|
+
search: Ref<string>;
|
|
31
|
+
sort: Ref<FileBrowserSortKey>;
|
|
32
|
+
/** Controlled selection, ready to bind to FileBrowserModal. */
|
|
33
|
+
selected: Ref<FileSelection[]>;
|
|
34
|
+
isLoading: ComputedRef<boolean>;
|
|
35
|
+
error: Ref<string | null>;
|
|
36
|
+
/** Load the mount list and open the first available mount. */
|
|
37
|
+
init: () => Promise<void>;
|
|
38
|
+
/** Open a directory, or a mount root when path is empty. */
|
|
39
|
+
navigate: (location: {
|
|
40
|
+
mount_id: string;
|
|
41
|
+
path: string;
|
|
42
|
+
}) => Promise<void>;
|
|
43
|
+
/** Re-read the current directory. */
|
|
44
|
+
refresh: () => Promise<void>;
|
|
45
|
+
/** Take the directory currently being viewed as the input. */
|
|
46
|
+
selectCurrentFolder: () => void;
|
|
47
|
+
clear: () => void;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Drives FileBrowserModal against the platform's `/api/filesystem` routes.
|
|
51
|
+
*
|
|
52
|
+
* Requires the `filesystem.browse` permission and a deployment that declares
|
|
53
|
+
* mounts; with none configured the routes are absent and `mounts` stays empty.
|
|
54
|
+
*/
|
|
55
|
+
export declare function useFileBrowser(options?: UseFileBrowserOptions): UseFileBrowserReturn;
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { PickerAdapter, PickerCapabilities, PickerNode, PickerSelection, PickerSelectionMode, PickerSource } from '../types/filePicker';
|
|
2
|
+
interface PickerStateProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
adapter: PickerAdapter;
|
|
5
|
+
selectionMode: PickerSelectionMode;
|
|
6
|
+
sources: PickerSource[];
|
|
7
|
+
capabilities: PickerCapabilities;
|
|
8
|
+
initialPath: string;
|
|
9
|
+
initialSelection: PickerSelection | null;
|
|
10
|
+
systemFilter?: (node: PickerNode, source: PickerSource) => boolean;
|
|
11
|
+
}
|
|
12
|
+
type PickerEmit = {
|
|
13
|
+
(event: 'update:open', value: boolean): void;
|
|
14
|
+
(event: 'select', value: PickerSelection): void;
|
|
15
|
+
(event: 'cancel'): void;
|
|
16
|
+
};
|
|
17
|
+
/** Internal orchestration; public consumers use FilePicker's props and events. */
|
|
18
|
+
export declare function useFilePicker(props: PickerStateProps, emit: PickerEmit): {
|
|
19
|
+
previewNode: import('vue').ComputedRef<PickerNode>;
|
|
20
|
+
sourceNames: Record<PickerSource, string>;
|
|
21
|
+
sourceIcons: Record<PickerSource, string>;
|
|
22
|
+
allowedSources: import('vue').ComputedRef<PickerSource[]>;
|
|
23
|
+
source: import('vue').ShallowRef<PickerSource, PickerSource>;
|
|
24
|
+
query: import('vue').ShallowRef<string, string>;
|
|
25
|
+
recursive: import('vue').ShallowRef<boolean, boolean>;
|
|
26
|
+
skipBlanks: import('vue').ShallowRef<boolean, boolean>;
|
|
27
|
+
reviewing: import('vue').ShallowRef<boolean, boolean>;
|
|
28
|
+
nav: {
|
|
29
|
+
path: import('vue').ShallowRef<string, string>;
|
|
30
|
+
trail: import('vue').Ref<{
|
|
31
|
+
path: string;
|
|
32
|
+
label: string;
|
|
33
|
+
}[], {
|
|
34
|
+
path: string;
|
|
35
|
+
label: string;
|
|
36
|
+
}[] | {
|
|
37
|
+
path: string;
|
|
38
|
+
label: string;
|
|
39
|
+
}[]>;
|
|
40
|
+
entries: import('vue').ShallowRef<PickerNode[], PickerNode[]>;
|
|
41
|
+
nodes: import('vue').Ref<Map<string, {
|
|
42
|
+
kind: "folder";
|
|
43
|
+
fileCount?: number | null | undefined;
|
|
44
|
+
formats?: Record<string, number> | undefined;
|
|
45
|
+
hasChildren?: boolean | undefined;
|
|
46
|
+
path: string;
|
|
47
|
+
name: string;
|
|
48
|
+
parentPath?: string | null | undefined;
|
|
49
|
+
parentName?: string | undefined;
|
|
50
|
+
bytes?: number | null | undefined;
|
|
51
|
+
unavailableReason?: string | undefined;
|
|
52
|
+
} | {
|
|
53
|
+
kind: "file";
|
|
54
|
+
format: string;
|
|
55
|
+
file?: {
|
|
56
|
+
readonly lastModified: number;
|
|
57
|
+
readonly name: string;
|
|
58
|
+
readonly webkitRelativePath: string;
|
|
59
|
+
readonly size: number;
|
|
60
|
+
readonly type: string;
|
|
61
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
62
|
+
bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
63
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
64
|
+
stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
65
|
+
text: () => Promise<string>;
|
|
66
|
+
} | undefined;
|
|
67
|
+
path: string;
|
|
68
|
+
name: string;
|
|
69
|
+
parentPath?: string | null | undefined;
|
|
70
|
+
parentName?: string | undefined;
|
|
71
|
+
bytes?: number | null | undefined;
|
|
72
|
+
unavailableReason?: string | undefined;
|
|
73
|
+
}> & Omit<Map<string, PickerNode>, keyof Map<any, any>>, Map<string, PickerNode> | (Map<string, {
|
|
74
|
+
kind: "folder";
|
|
75
|
+
fileCount?: number | null | undefined;
|
|
76
|
+
formats?: Record<string, number> | undefined;
|
|
77
|
+
hasChildren?: boolean | undefined;
|
|
78
|
+
path: string;
|
|
79
|
+
name: string;
|
|
80
|
+
parentPath?: string | null | undefined;
|
|
81
|
+
parentName?: string | undefined;
|
|
82
|
+
bytes?: number | null | undefined;
|
|
83
|
+
unavailableReason?: string | undefined;
|
|
84
|
+
} | {
|
|
85
|
+
kind: "file";
|
|
86
|
+
format: string;
|
|
87
|
+
file?: {
|
|
88
|
+
readonly lastModified: number;
|
|
89
|
+
readonly name: string;
|
|
90
|
+
readonly webkitRelativePath: string;
|
|
91
|
+
readonly size: number;
|
|
92
|
+
readonly type: string;
|
|
93
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
94
|
+
bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
95
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
96
|
+
stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
97
|
+
text: () => Promise<string>;
|
|
98
|
+
} | undefined;
|
|
99
|
+
path: string;
|
|
100
|
+
name: string;
|
|
101
|
+
parentPath?: string | null | undefined;
|
|
102
|
+
parentName?: string | undefined;
|
|
103
|
+
bytes?: number | null | undefined;
|
|
104
|
+
unavailableReason?: string | undefined;
|
|
105
|
+
}> & Omit<Map<string, PickerNode>, keyof Map<any, any>>)>;
|
|
106
|
+
children: import('vue').ShallowRef<Map<string, PickerNode[]>, Map<string, PickerNode[]>>;
|
|
107
|
+
expanded: import('vue').Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
108
|
+
expanding: import('vue').Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
109
|
+
expansionErrors: import('vue').Ref<Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>, Map<string, string> | (Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>)>;
|
|
110
|
+
loading: import('vue').ShallowRef<boolean, boolean>;
|
|
111
|
+
error: import('vue').ShallowRef<string, string>;
|
|
112
|
+
rows: import('vue').ComputedRef<import('..').PickerTreeRow[]>;
|
|
113
|
+
isAllowed: (node: PickerNode) => boolean;
|
|
114
|
+
clear: () => void;
|
|
115
|
+
invalidate: () => void;
|
|
116
|
+
register: (items: PickerNode[], parent?: string) => void;
|
|
117
|
+
loadChildren: (folder: string, ancestors?: string[], refresh?: boolean) => Promise<PickerNode[]>;
|
|
118
|
+
load: (query?: string, recursive?: boolean, refresh?: boolean) => Promise<void>;
|
|
119
|
+
expand: (node: PickerNode) => Promise<void>;
|
|
120
|
+
enter: (node: PickerNode) => void;
|
|
121
|
+
up: (target?: string) => void;
|
|
122
|
+
};
|
|
123
|
+
selection: {
|
|
124
|
+
keys: import('vue').Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
125
|
+
dropped: import('vue').Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
126
|
+
focusPath: import('vue').ShallowRef<string, string>;
|
|
127
|
+
resolving: import('vue').ShallowRef<boolean, boolean>;
|
|
128
|
+
resolutionError: import('vue').ShallowRef<string, string>;
|
|
129
|
+
roots: import('vue').ComputedRef<PickerNode[]>;
|
|
130
|
+
chosen: import('vue').ComputedRef<{
|
|
131
|
+
files: import('..').PickerFile[];
|
|
132
|
+
excluded: import('..').PickerExcluded[];
|
|
133
|
+
bytes: number;
|
|
134
|
+
}>;
|
|
135
|
+
focused: import('vue').ComputedRef<PickerNode>;
|
|
136
|
+
select: (node: PickerNode, modifiers?: {
|
|
137
|
+
metaKey?: boolean;
|
|
138
|
+
ctrlKey?: boolean;
|
|
139
|
+
shiftKey?: boolean;
|
|
140
|
+
toggle?: boolean;
|
|
141
|
+
}) => void;
|
|
142
|
+
selected: (node: PickerNode) => boolean;
|
|
143
|
+
selectable: (node: PickerNode) => boolean;
|
|
144
|
+
exclusion: (node: PickerNode) => import('..').PickerExcluded | null;
|
|
145
|
+
reset: (selection?: PickerSelection | null) => void;
|
|
146
|
+
resolve: () => Promise<void>;
|
|
147
|
+
folderProgress: (node: PickerNode) => string;
|
|
148
|
+
ancestorSelected: (node: PickerNode, candidates?: Set<string> & Omit<Set<string>, keyof Set<any>>) => boolean;
|
|
149
|
+
};
|
|
150
|
+
capability: import('vue').ComputedRef<import('..').PickerCapability | undefined>;
|
|
151
|
+
path: import('vue').ShallowRef<string, string>;
|
|
152
|
+
trail: import('vue').Ref<{
|
|
153
|
+
path: string;
|
|
154
|
+
label: string;
|
|
155
|
+
}[], {
|
|
156
|
+
path: string;
|
|
157
|
+
label: string;
|
|
158
|
+
}[] | {
|
|
159
|
+
path: string;
|
|
160
|
+
label: string;
|
|
161
|
+
}[]>;
|
|
162
|
+
loading: import('vue').ShallowRef<boolean, boolean>;
|
|
163
|
+
error: import('vue').ShallowRef<string, string>;
|
|
164
|
+
rows: import('vue').ComputedRef<import('..').PickerTreeRow[]>;
|
|
165
|
+
roots: import('vue').ComputedRef<PickerNode[]>;
|
|
166
|
+
chosen: import('vue').ComputedRef<{
|
|
167
|
+
files: import('..').PickerFile[];
|
|
168
|
+
excluded: import('..').PickerExcluded[];
|
|
169
|
+
bytes: number;
|
|
170
|
+
}>;
|
|
171
|
+
focused: import('vue').ComputedRef<PickerNode>;
|
|
172
|
+
resolving: import('vue').ShallowRef<boolean, boolean>;
|
|
173
|
+
resolutionError: import('vue').ShallowRef<string, string>;
|
|
174
|
+
searchArea: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
175
|
+
confirmLabel: import('vue').ComputedRef<string>;
|
|
176
|
+
folderCount: import('vue').ComputedRef<number>;
|
|
177
|
+
canConfirm: import('vue').ComputedRef<boolean>;
|
|
178
|
+
switchSource: (next: PickerSource) => Promise<void>;
|
|
179
|
+
selectNode: (node: PickerNode, event: MouseEvent | KeyboardEvent) => void;
|
|
180
|
+
enter: (node: PickerNode) => Promise<void>;
|
|
181
|
+
up: (target?: string) => Promise<void>;
|
|
182
|
+
refresh: () => Promise<void>;
|
|
183
|
+
selectParent: (node: PickerNode) => void;
|
|
184
|
+
chooseLocal: (files: File[], _rootName?: string, relativePaths?: string[]) => Promise<void>;
|
|
185
|
+
cancel: () => void;
|
|
186
|
+
confirm: () => void;
|
|
187
|
+
keyboard: (event: KeyboardEvent) => void;
|
|
188
|
+
};
|
|
189
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PickerAdapter } from '../types/filePicker';
|
|
2
|
+
/** Opaque picker identity; decode before passing a selection to a mount-scoped API. */
|
|
3
|
+
export declare function encodePlatformPickerPath(mountId: string, path?: string): string;
|
|
4
|
+
export declare function decodePlatformPickerPath(path: string): {
|
|
5
|
+
mountId: string;
|
|
6
|
+
path: string;
|
|
7
|
+
};
|
|
8
|
+
/** Adapt the authenticated MINT mount API without exposing absolute host paths. */
|
|
9
|
+
export declare function usePlatformFilePickerAdapter(options?: {
|
|
10
|
+
apiBaseUrl?: string;
|
|
11
|
+
}): PickerAdapter;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Toast } from '../types';
|
|
1
|
+
import { Toast, ToastOptions } from '../types';
|
|
2
2
|
/** Reactive global toast queue with success/error/warning/info variants and auto-dismiss timers. */
|
|
3
3
|
export declare function useToast(): {
|
|
4
4
|
toasts: import('vue').Ref<{
|
|
@@ -6,12 +6,33 @@ export declare function useToast(): {
|
|
|
6
6
|
message: string;
|
|
7
7
|
type: "success" | "error" | "warning" | "info";
|
|
8
8
|
duration?: number | undefined;
|
|
9
|
+
title?: string | undefined;
|
|
10
|
+
detail?: string | undefined;
|
|
11
|
+
actions?: {
|
|
12
|
+
label: string;
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
primary?: boolean | undefined;
|
|
15
|
+
}[] | undefined;
|
|
16
|
+
dismissible?: boolean | undefined;
|
|
17
|
+
progress?: "ttl" | "indeterminate" | "none" | undefined;
|
|
18
|
+
count?: number | undefined;
|
|
9
19
|
}[], Toast[] | {
|
|
10
20
|
id: number;
|
|
11
21
|
message: string;
|
|
12
22
|
type: "success" | "error" | "warning" | "info";
|
|
13
23
|
duration?: number | undefined;
|
|
24
|
+
title?: string | undefined;
|
|
25
|
+
detail?: string | undefined;
|
|
26
|
+
actions?: {
|
|
27
|
+
label: string;
|
|
28
|
+
onClick: () => void;
|
|
29
|
+
primary?: boolean | undefined;
|
|
30
|
+
}[] | undefined;
|
|
31
|
+
dismissible?: boolean | undefined;
|
|
32
|
+
progress?: "ttl" | "indeterminate" | "none" | undefined;
|
|
33
|
+
count?: number | undefined;
|
|
14
34
|
}[]>;
|
|
35
|
+
push: (options: ToastOptions) => number;
|
|
15
36
|
show: (message: string, type?: Toast["type"], duration?: number) => void;
|
|
16
37
|
success: (message: string, duration?: number) => void;
|
|
17
38
|
error: (message: string, duration?: number) => void;
|