@elaraai/e3-ui-components 0.0.1-beta.14 → 0.0.1-beta.15

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.
@@ -8,7 +8,11 @@ export declare function useDatasetListRecursive(url: string, repo: string, works
8
8
  export declare function useDatasetListRecursivePaths(url: string, repo: string, workspace: string | null, path: TreePath, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): UseQueryResult<string[], Error>;
9
9
  export declare function useDatasetListWithStatus(url: string, repo: string, workspace: string | null, path: TreePath, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): UseQueryResult<ListEntry[], Error>;
10
10
  export declare function useDatasetGetStatus(url: string, repo: string, workspace: string | null, path: TreePath, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): UseQueryResult<DatasetStatusDetail, Error>;
11
- export declare function useDatasetGet(url: string, repo: string, workspace: string | null, path: TreePath, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): UseQueryResult<Uint8Array<ArrayBufferLike>, Error>;
11
+ export declare function useDatasetGet(url: string, repo: string, workspace: string | null, path: TreePath, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): UseQueryResult<{
12
+ data: Uint8Array;
13
+ hash: string;
14
+ size: number;
15
+ }, Error>;
12
16
  export declare function useDatasetSet(url: string, repo: string, workspace: string | null, requestOptions?: RequestOptions): import('@tanstack/react-query').UseMutationResult<void, Error, {
13
17
  path: TreePath;
14
18
  data: Uint8Array;
@@ -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,SAAS,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7F,OAAO,KAAK,EA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,cAAc;UACtE,QAAQ;UAAQ,UAAU;YAGrE"}
@@ -1,16 +1,12 @@
1
1
  import { DatasetStatusDetail } from '@elaraai/e3-api-client';
2
+ import { option } from '@elaraai/east';
2
3
  /**
3
4
  * Dataset preview combining status metadata with optional data.
4
5
  * When the dataset is oversized, `value` is `{ type: 'none' }`.
5
6
  * When loaded, `value` is `{ type: 'some', value: Uint8Array }`.
6
7
  */
7
8
  export type DatasetPreview = DatasetStatusDetail & {
8
- value: {
9
- type: 'some';
10
- value: Uint8Array;
11
- } | {
12
- type: 'none';
13
- };
9
+ value: option<Uint8Array>;
14
10
  };
15
11
  /**
16
12
  * Subset of UseQueryOptions that can be overridden by callers.
@@ -1 +1 @@
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
+ {"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;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,mBAAmB,GAAG;IAC/C,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;CAC7B,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,4 +1,8 @@
1
1
  import { QueryOverrides } from './types.js';
2
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
+ export declare function useInputData(apiUrl: string, repo: string, workspace: string | null, inputInfo: DatasetStatusInfo | null, requestOptions?: RequestOptions, queryOptions?: QueryOverrides): import('@tanstack/react-query').UseQueryResult<{
4
+ data: Uint8Array;
5
+ hash: string;
6
+ size: number;
7
+ }, Error>;
4
8
  //# sourceMappingURL=useInputData.d.ts.map
@@ -1 +1 @@
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"}
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;;;;UAmBhC"}
@@ -1,4 +1,8 @@
1
1
  import { QueryOverrides } from './types.js';
2
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
+ 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<{
4
+ data: Uint8Array;
5
+ hash: string;
6
+ size: number;
7
+ }, Error>;
4
8
  //# sourceMappingURL=useTaskOutput.d.ts.map
@@ -1 +1 @@
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"}
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;;;;UAchC"}
package/dist/index.cjs CHANGED
@@ -4520,7 +4520,7 @@ function useInputDataPreview(apiUrl, repo, workspace, inputInfo, requestOptions,
4520
4520
  refType: status.data.refType,
4521
4521
  hash: status.data.hash,
4522
4522
  size: status.data.size,
4523
- value: data.data ? { type: "some", value: data.data } : { type: "none" }
4523
+ value: data.data ? east.some(data.data.data) : east.none
4524
4524
  };
4525
4525
  }, [status.data, data.data]);
4526
4526
  return {
@@ -5393,7 +5393,7 @@ function useTaskOutputPreview(apiUrl, repo, workspace, task, outputHash = null,
5393
5393
  refType: status.data.refType,
5394
5394
  hash: status.data.hash,
5395
5395
  size: status.data.size,
5396
- value: data.data ? { type: "some", value: data.data } : { type: "none" }
5396
+ value: data.data ? east.some(data.data.data) : east.none
5397
5397
  };
5398
5398
  }, [status.data, data.data]);
5399
5399
  return {