@elaraai/e3-ui-components 0.0.1-beta.1 → 0.0.1-beta.11
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 +132 -0
- package/dist/components/ErrorBoundary.d.ts +19 -0
- package/dist/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/components/InputPreview.d.ts +3 -1
- package/dist/components/InputPreview.d.ts.map +1 -1
- package/dist/components/StatusDisplay.d.ts.map +1 -1
- package/dist/components/TaskPreview.d.ts +3 -1
- package/dist/components/TaskPreview.d.ts.map +1 -1
- package/dist/errors.d.ts +17 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/hooks/datasets.d.ts +5 -2
- package/dist/hooks/datasets.d.ts.map +1 -1
- package/dist/hooks/types.d.ts +12 -2
- package/dist/hooks/types.d.ts.map +1 -1
- package/dist/hooks/useInputData.d.ts +3 -2
- package/dist/hooks/useInputData.d.ts.map +1 -1
- package/dist/hooks/useInputDataPreview.d.ts +8 -0
- package/dist/hooks/useInputDataPreview.d.ts.map +1 -0
- package/dist/hooks/useTaskLogsHook.d.ts +3 -2
- package/dist/hooks/useTaskLogsHook.d.ts.map +1 -1
- package/dist/hooks/useTaskOutput.d.ts +3 -2
- package/dist/hooks/useTaskOutput.d.ts.map +1 -1
- package/dist/hooks/useTaskOutputPreview.d.ts +8 -0
- package/dist/hooks/useTaskOutputPreview.d.ts.map +1 -0
- package/dist/hooks/workspaces.d.ts +2 -8
- package/dist/hooks/workspaces.d.ts.map +1 -1
- package/dist/index.cjs +1334 -1150
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1336 -1152
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/README.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# E3 UI Components
|
|
2
|
+
|
|
3
|
+
> React Query hooks and preview components for the e3 API
|
|
4
|
+
|
|
5
|
+
[](LICENSE.md)
|
|
6
|
+
[](https://nodejs.org)
|
|
7
|
+
|
|
8
|
+
**E3 UI Components** provides React Query hooks for all [e3-api-client](https://www.npmjs.com/package/@elaraai/e3-api-client) functions and reusable preview components for tasks, inputs, and logs.
|
|
9
|
+
|
|
10
|
+
## Features
|
|
11
|
+
|
|
12
|
+
- **React Query Hooks** - `useQuery` and `useMutation` wrappers for all e3 API client functions
|
|
13
|
+
- **Task Preview** - Component for viewing task execution output and logs
|
|
14
|
+
- **Input Preview** - Component for viewing dataset input values
|
|
15
|
+
- **Virtualized Log Viewer** - Performant log display with search and auto-scroll
|
|
16
|
+
- **Type-Safe** - Full TypeScript support with proper return type inference
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install @elaraai/e3-ui-components @elaraai/e3-api-client @tanstack/react-query
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Hooks
|
|
25
|
+
|
|
26
|
+
React Query hooks are provided for every e3 API domain:
|
|
27
|
+
|
|
28
|
+
| Domain | Hooks |
|
|
29
|
+
|--------|-------|
|
|
30
|
+
| **Repos** | `useRepoList`, `useRepoStatus`, `useRepoGc`, `useRepoGcStart`, `useRepoGcStatus`, `useRepoCreate`, `useRepoRemove` |
|
|
31
|
+
| **Packages** | `usePackageList`, `usePackageGet`, `usePackageImport`, `usePackageExport`, `usePackageRemove` |
|
|
32
|
+
| **Workspaces** | `useWorkspaceList`, `useWorkspaceCreate`, `useWorkspaceGet`, `useWorkspaceStatus`, `useWorkspaceRemove`, `useWorkspaceDeploy`, `useWorkspaceExport` |
|
|
33
|
+
| **Datasets** | `useDatasetList`, `useDatasetListAt`, `useDatasetListRecursive`, `useDatasetGet`, `useDatasetSet` |
|
|
34
|
+
| **Tasks** | `useTaskList`, `useTaskGet`, `useTaskExecutionList` |
|
|
35
|
+
| **Executions** | `useDataflowExecute`, `useDataflowStart`, `useDataflowGraph`, `useDataflowExecution`, `useDataflowCancel`, `useTaskLogs` |
|
|
36
|
+
|
|
37
|
+
### Quick Start
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
import { useWorkspaceList, useTaskList } from '@elaraai/e3-ui-components';
|
|
41
|
+
|
|
42
|
+
function WorkspaceView({ apiUrl, repo }: { apiUrl: string; repo: string }) {
|
|
43
|
+
const { data: workspaces, isLoading } = useWorkspaceList(apiUrl, repo);
|
|
44
|
+
|
|
45
|
+
if (isLoading) return <div>Loading...</div>;
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<ul>
|
|
49
|
+
{workspaces?.map(ws => <li key={ws.name}>{ws.name}</li>)}
|
|
50
|
+
</ul>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Query Overrides
|
|
56
|
+
|
|
57
|
+
All query hooks accept an optional `QueryOverrides` parameter for controlling query behavior:
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
const { data } = useTaskList(apiUrl, repo, workspace, requestOptions, {
|
|
61
|
+
refetchInterval: 5000,
|
|
62
|
+
staleTime: 10000,
|
|
63
|
+
enabled: isReady,
|
|
64
|
+
});
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Components
|
|
68
|
+
|
|
69
|
+
### TaskPreview
|
|
70
|
+
|
|
71
|
+
Displays task execution output and logs with a virtualized log viewer.
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
import { TaskPreview } from '@elaraai/e3-ui-components';
|
|
75
|
+
|
|
76
|
+
<TaskPreview apiUrl={url} workspace={ws} task={taskName} taskInfo={info} outputHash={hash} />
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### InputPreview
|
|
80
|
+
|
|
81
|
+
Displays dataset input values with type-aware rendering.
|
|
82
|
+
|
|
83
|
+
```tsx
|
|
84
|
+
import { InputPreview } from '@elaraai/e3-ui-components';
|
|
85
|
+
|
|
86
|
+
<InputPreview apiUrl={url} workspace={ws} path={datasetPath} inputInfo={info} />
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### VirtualizedLogViewer
|
|
90
|
+
|
|
91
|
+
Performant log viewer with search, copy, and auto-scroll.
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
import { VirtualizedLogViewer } from '@elaraai/e3-ui-components';
|
|
95
|
+
|
|
96
|
+
<VirtualizedLogViewer lines={logLines} isLive={isRunning} />
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### StatusDisplay
|
|
100
|
+
|
|
101
|
+
Status feedback component with error, warning, info, and loading variants.
|
|
102
|
+
|
|
103
|
+
```tsx
|
|
104
|
+
import { StatusDisplay } from '@elaraai/e3-ui-components';
|
|
105
|
+
|
|
106
|
+
<StatusDisplay variant="error" title="Failed" message={error.message} />
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Development
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
npm run build # Build library
|
|
113
|
+
npm run lint # Check code quality
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## License
|
|
117
|
+
|
|
118
|
+
Dual-licensed:
|
|
119
|
+
- **Open Source**: [AGPL-3.0](LICENSE.md) - Free for open source use
|
|
120
|
+
- **Commercial**: Available for proprietary use - contact support@elara.ai
|
|
121
|
+
|
|
122
|
+
## Links
|
|
123
|
+
|
|
124
|
+
- **Website**: [https://elaraai.com/](https://elaraai.com/)
|
|
125
|
+
- **e3 API Client**: [https://www.npmjs.com/package/@elaraai/e3-api-client](https://www.npmjs.com/package/@elaraai/e3-api-client)
|
|
126
|
+
- **East UI**: [https://www.npmjs.com/package/@elaraai/east-ui](https://www.npmjs.com/package/@elaraai/east-ui)
|
|
127
|
+
- **Issues**: [https://github.com/elaraai/east-ui/issues](https://github.com/elaraai/east-ui/issues)
|
|
128
|
+
- **Email**: support@elara.ai
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
*Developed by [Elara AI Pty Ltd](https://elaraai.com/) - Powering the computational layer of AI-driven business optimization.*
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Component, ReactNode } from 'react';
|
|
2
|
+
export interface ErrorBoundaryProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
interface ErrorBoundaryState {
|
|
6
|
+
error: Error | null;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* React Error Boundary that catches rendering errors in East UI components.
|
|
10
|
+
* Displays EastError details (including source locations) using StatusDisplay.
|
|
11
|
+
*/
|
|
12
|
+
export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
13
|
+
constructor(props: ErrorBoundaryProps);
|
|
14
|
+
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
|
15
|
+
componentDidUpdate(prevProps: ErrorBoundaryProps): void;
|
|
16
|
+
render(): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=ErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/components/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlD,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED,UAAU,kBAAkB;IACxB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACvB;AAED;;;GAGG;AACH,qBAAa,aAAc,SAAQ,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;gBACpE,KAAK,EAAE,kBAAkB;IAKrC,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,kBAAkB;IAIxD,kBAAkB,CAAC,SAAS,EAAE,kBAAkB;IAOhD,MAAM;CAYlB"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { DatasetStatusInfo } from '@elaraai/e3-api-client';
|
|
1
|
+
import { DatasetStatusInfo, RequestOptions } from '@elaraai/e3-api-client';
|
|
2
2
|
export interface InputPreviewProps {
|
|
3
3
|
apiUrl: string;
|
|
4
|
+
repo: string;
|
|
4
5
|
workspace: string;
|
|
5
6
|
path: string;
|
|
6
7
|
inputInfo: DatasetStatusInfo | null;
|
|
8
|
+
requestOptions?: RequestOptions;
|
|
7
9
|
}
|
|
8
10
|
/**
|
|
9
11
|
* Renders a preview of an input dataset value.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputPreview.d.ts","sourceRoot":"","sources":["../../src/components/InputPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AA2BH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"InputPreview.d.ts","sourceRoot":"","sources":["../../src/components/InputPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AA2BH,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAOhF,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACpC,cAAc,CAAC,EAAE,cAAc,CAAC;CACnC;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,yDAiLvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusDisplay.d.ts","sourceRoot":"","sources":["../../src/components/StatusDisplay.tsx"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"StatusDisplay.d.ts","sourceRoot":"","sources":["../../src/components/StatusDisplay.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,KAAK,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAE9D,MAAM,WAAW,kBAAkB;IAC/B,OAAO,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAuCD;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,kBAAkB,2CAgGrF"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { TaskStatusInfo } from '@elaraai/e3-api-client';
|
|
1
|
+
import { TaskStatusInfo, RequestOptions } from '@elaraai/e3-api-client';
|
|
2
2
|
export interface TaskPreviewProps {
|
|
3
3
|
apiUrl: string;
|
|
4
|
+
repo: string;
|
|
4
5
|
workspace: string;
|
|
5
6
|
task: string;
|
|
6
7
|
taskInfo: TaskStatusInfo | null;
|
|
7
8
|
outputHash: string | null;
|
|
9
|
+
requestOptions?: RequestOptions;
|
|
8
10
|
}
|
|
9
11
|
/**
|
|
10
12
|
* Renders a preview of a task's output and logs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskPreview.d.ts","sourceRoot":"","sources":["../../src/components/TaskPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAiCH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"TaskPreview.d.ts","sourceRoot":"","sources":["../../src/components/TaskPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAiCH,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAO7E,MAAM,WAAW,gBAAgB;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,cAAc,CAAC,EAAE,cAAc,CAAC;CACnC;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW,wDA+OuL,CAAC"}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Extract a human-readable message and optional details from an error.
|
|
7
|
+
* For ApiError, separates the error code from the actual error details.
|
|
8
|
+
*/
|
|
9
|
+
export declare function formatApiError(error: unknown): {
|
|
10
|
+
message: string;
|
|
11
|
+
details?: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Format an error for display. For EastError, includes location stack trace.
|
|
15
|
+
*/
|
|
16
|
+
export declare function formatError(error: Error): string;
|
|
17
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAQpF;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAGhD"}
|
package/dist/hooks/datasets.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import { QueryOverrides } from './types.js';
|
|
3
|
-
import { RequestOptions,
|
|
3
|
+
import { RequestOptions, ListEntry, DatasetStatusDetail } from '@elaraai/e3-api-client';
|
|
4
4
|
import { TreePath } from '@elaraai/e3-types';
|
|
5
5
|
export declare function useDatasetList(url: string, repo: string, workspace: string | null, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): UseQueryResult<string[], Error>;
|
|
6
6
|
export declare function useDatasetListAt(url: string, repo: string, workspace: string | null, path: TreePath, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): UseQueryResult<string[], Error>;
|
|
7
|
-
export declare function useDatasetListRecursive(url: string, repo: string, workspace: string | null, path: TreePath, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): UseQueryResult<
|
|
7
|
+
export declare function useDatasetListRecursive(url: string, repo: string, workspace: string | null, path: TreePath, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): UseQueryResult<ListEntry[], Error>;
|
|
8
|
+
export declare function useDatasetListRecursivePaths(url: string, repo: string, workspace: string | null, path: TreePath, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): UseQueryResult<string[], Error>;
|
|
9
|
+
export declare function useDatasetListWithStatus(url: string, repo: string, workspace: string | null, path: TreePath, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): UseQueryResult<ListEntry[], Error>;
|
|
10
|
+
export declare function useDatasetGetStatus(url: string, repo: string, workspace: string | null, path: TreePath, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): UseQueryResult<DatasetStatusDetail, Error>;
|
|
8
11
|
export declare function useDatasetGet(url: string, repo: string, workspace: string | null, path: TreePath, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): UseQueryResult<Uint8Array<ArrayBufferLike>, Error>;
|
|
9
12
|
export declare function useDatasetSet(url: string, repo: string, workspace: string | null, requestOptions?: RequestOptions): import('@tanstack/react-query').UseMutationResult<void, Error, {
|
|
10
13
|
path: TreePath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datasets.d.ts","sourceRoot":"","sources":["../../src/hooks/datasets.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"datasets.d.ts","sourceRoot":"","sources":["../../src/hooks/datasets.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,cAAc,CAAC,EAAE,cAAc,EAAE,YAAY,CAAC,EAAE,cAAc,mCAOjJ;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,CAAC,EAAE,cAAc,EAAE,YAAY,CAAC,EAAE,cAAc,mCAOnK;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,CAAC,EAAE,cAAc,EAAE,YAAY,CAAC,EAAE,cAAc,GAAG,cAAc,CAAC,SAAS,EAAE,EAAE,KAAK,CAAC,CAO/M;AAED,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,CAAC,EAAE,cAAc,EAAE,YAAY,CAAC,EAAE,cAAc,mCAO/K;AAED,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,CAAC,EAAE,cAAc,EAAE,YAAY,CAAC,EAAE,cAAc,GAAG,cAAc,CAAC,SAAS,EAAE,EAAE,KAAK,CAAC,CAOhN;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,CAAC,EAAE,cAAc,EAAE,YAAY,CAAC,EAAE,cAAc,GAAG,cAAc,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAOnN;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,CAAC,EAAE,cAAc,EAAE,YAAY,CAAC,EAAE,cAAc,sDAOhK;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,cAAc,CAAC,EAAE,cAAc;UACtE,QAAQ;UAAQ,UAAU;YAGrE"}
|
package/dist/hooks/types.d.ts
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
import { DatasetStatusDetail } from '@elaraai/e3-api-client';
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
3
|
+
* Dataset preview combining status metadata with optional data.
|
|
4
|
+
* When the dataset is oversized, `value` is `{ type: 'none' }`.
|
|
5
|
+
* When loaded, `value` is `{ type: 'some', value: Uint8Array }`.
|
|
4
6
|
*/
|
|
7
|
+
export type DatasetPreview = DatasetStatusDetail & {
|
|
8
|
+
value: {
|
|
9
|
+
type: 'some';
|
|
10
|
+
value: Uint8Array;
|
|
11
|
+
} | {
|
|
12
|
+
type: 'none';
|
|
13
|
+
};
|
|
14
|
+
};
|
|
5
15
|
/**
|
|
6
16
|
* Subset of UseQueryOptions that can be overridden by callers.
|
|
7
17
|
* Excludes queryKey, queryFn, and generic data type fields to preserve type inference.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/hooks/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1C,cAAc,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IACpC,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;CACvD"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/hooks/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,mBAAmB,GAAG;IAC/C,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,UAAU,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CACjE,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1C,cAAc,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IACpC,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;CACvD"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { QueryOverrides } from './types.js';
|
|
2
|
+
import { DatasetStatusInfo, RequestOptions } from '@elaraai/e3-api-client';
|
|
3
|
+
export declare function useInputData(apiUrl: string, repo: string, workspace: string | null, inputInfo: DatasetStatusInfo | null, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): import('@tanstack/react-query').UseQueryResult<Uint8Array<ArrayBufferLike>, Error>;
|
|
3
4
|
//# sourceMappingURL=useInputData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInputData.d.ts","sourceRoot":"","sources":["../../src/hooks/useInputData.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"useInputData.d.ts","sourceRoot":"","sources":["../../src/hooks/useInputData.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGhF,wBAAgB,YAAY,CACxB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,SAAS,EAAE,iBAAiB,GAAG,IAAI,EACnC,cAAc,CAAC,EAAE,cAAc,EAC/B,YAAY,CAAC,EAAE,cAAc,sFAmBhC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { QueryOverrides, DatasetPreview } from './types.js';
|
|
2
|
+
import { DatasetStatusInfo, RequestOptions } from '@elaraai/e3-api-client';
|
|
3
|
+
export declare function useInputDataPreview(apiUrl: string, repo: string, workspace: string | null, inputInfo: DatasetStatusInfo | null, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): {
|
|
4
|
+
data: DatasetPreview | undefined;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
error: Error | null;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=useInputDataPreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInputDataPreview.d.ts","sourceRoot":"","sources":["../../src/hooks/useInputDataPreview.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAKhF,wBAAgB,mBAAmB,CAC/B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,SAAS,EAAE,iBAAiB,GAAG,IAAI,EACnC,cAAc,CAAC,EAAE,cAAc,EAC/B,YAAY,CAAC,EAAE,cAAc;;;;EA8ChC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { QueryOverrides } from './types.js';
|
|
2
|
+
import { TaskStatusInfo, RequestOptions } from '@elaraai/e3-api-client';
|
|
3
|
+
export declare function useTaskLogs(apiUrl: string, repo: string, workspace: string | null, task: TaskStatusInfo | null, stream?: 'stdout' | 'stderr', requestOptions?: RequestOptions, queryOptions?: QueryOverrides): import('@tanstack/react-query').UseQueryResult<{
|
|
3
4
|
data: string;
|
|
4
5
|
offset: bigint;
|
|
5
6
|
size: bigint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTaskLogsHook.d.ts","sourceRoot":"","sources":["../../src/hooks/useTaskLogsHook.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"useTaskLogsHook.d.ts","sourceRoot":"","sources":["../../src/hooks/useTaskLogsHook.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAwD7E,wBAAgB,WAAW,CACvB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,IAAI,EAAE,cAAc,GAAG,IAAI,EAC3B,MAAM,GAAE,QAAQ,GAAG,QAAmB,EACtC,cAAc,CAAC,EAAE,cAAc,EAC/B,YAAY,CAAC,EAAE,cAAc;UAlDd,MAAM;YAAU,MAAM;UAAQ,MAAM;eAAa,MAAM;cAAY,OAAO;UAgE5F"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { QueryOverrides } from './types.js';
|
|
2
|
+
import { TaskStatusInfo, RequestOptions } from '@elaraai/e3-api-client';
|
|
3
|
+
export declare function useTaskOutput(apiUrl: string, repo: string, workspace: string | null, task: TaskStatusInfo | null, outputHash?: string | null, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): import('@tanstack/react-query').UseQueryResult<Uint8Array<ArrayBufferLike>, Error>;
|
|
3
4
|
//# sourceMappingURL=useTaskOutput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTaskOutput.d.ts","sourceRoot":"","sources":["../../src/hooks/useTaskOutput.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"useTaskOutput.d.ts","sourceRoot":"","sources":["../../src/hooks/useTaskOutput.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7E,wBAAgB,aAAa,CACzB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,IAAI,EAAE,cAAc,GAAG,IAAI,EAC3B,UAAU,GAAE,MAAM,GAAG,IAAW,EAChC,cAAc,CAAC,EAAE,cAAc,EAC/B,YAAY,CAAC,EAAE,cAAc,sFAchC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { QueryOverrides, DatasetPreview } from './types.js';
|
|
2
|
+
import { TaskStatusInfo, RequestOptions } from '@elaraai/e3-api-client';
|
|
3
|
+
export declare function useTaskOutputPreview(apiUrl: string, repo: string, workspace: string | null, task: TaskStatusInfo | null, outputHash?: string | null, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): {
|
|
4
|
+
data: DatasetPreview | undefined;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
error: Error | null;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=useTaskOutputPreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTaskOutputPreview.d.ts","sourceRoot":"","sources":["../../src/hooks/useTaskOutputPreview.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjE,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAK7E,wBAAgB,oBAAoB,CAChC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,IAAI,EAAE,cAAc,GAAG,IAAI,EAC3B,UAAU,GAAE,MAAM,GAAG,IAAW,EAChC,cAAc,CAAC,EAAE,cAAc,EAC/B,YAAY,CAAC,EAAE,cAAc;;;;EA6ChC"}
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { UseMutationResult, UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import { QueryOverrides } from './types.js';
|
|
3
3
|
import { RequestOptions, WorkspaceInfo, WorkspaceStatusResult } from '@elaraai/e3-api-client';
|
|
4
|
+
import { WorkspaceState } from '@elaraai/e3-types';
|
|
4
5
|
export declare function useWorkspaceList(url: string, repo: string, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): UseQueryResult<WorkspaceInfo[], Error>;
|
|
5
6
|
export declare function useWorkspaceCreate(url: string, repo: string, requestOptions?: RequestOptions): UseMutationResult<WorkspaceInfo, Error, string>;
|
|
6
|
-
export declare function useWorkspaceGet(url: string, repo: string, name: string | null, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): UseQueryResult<
|
|
7
|
-
readonly packageName: string;
|
|
8
|
-
readonly packageVersion: string;
|
|
9
|
-
readonly packageHash: string;
|
|
10
|
-
readonly deployedAt: Date;
|
|
11
|
-
readonly rootHash: string;
|
|
12
|
-
readonly rootUpdatedAt: Date;
|
|
13
|
-
}, Error>;
|
|
7
|
+
export declare function useWorkspaceGet(url: string, repo: string, name: string | null, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): UseQueryResult<WorkspaceState, Error>;
|
|
14
8
|
export declare function useWorkspaceStatus(url: string, repo: string, name: string | null, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): UseQueryResult<WorkspaceStatusResult, Error>;
|
|
15
9
|
export declare function useWorkspaceRemove(url: string, repo: string, requestOptions?: RequestOptions): UseMutationResult<void, Error, string, unknown>;
|
|
16
10
|
export declare function useWorkspaceDeploy(url: string, repo: string, requestOptions?: RequestOptions): UseMutationResult<void, Error, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../../src/hooks/workspaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAyB,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC3G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../../src/hooks/workspaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAyB,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC3G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACnG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,EAAE,YAAY,CAAC,EAAE,cAAc,GAAG,cAAc,CAAC,aAAa,EAAE,EAAE,KAAK,CAAC,CAOlK;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,iBAAiB,CAAC,aAAa,EAAE,KAAK,EAAE,MAAM,CAAC,CAI9I;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,cAAc,CAAC,EAAE,cAAc,EAAE,YAAY,CAAC,EAAE,cAAc,GAAG,cAAc,CAAC,cAAc,EAAE,KAAK,CAAC,CAOrL;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,cAAc,CAAC,EAAE,cAAc,EAAE,YAAY,CAAC,EAAE,cAAc,GAAG,cAAc,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAO/L;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,mDAI5F;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc;UACjD,MAAM;gBAAc,MAAM;YAGrE;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,cAAc,CAAC,EAAE,cAAc,EAAE,YAAY,CAAC,EAAE,cAAc,sDAOhJ"}
|