nucleus-core-ts 0.9.975 → 0.9.976

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/dist/.build-ok CHANGED
@@ -1 +1 @@
1
- 0.9.975
1
+ 0.9.976
@@ -1,3 +1,11 @@
1
+ export function useUpload(options: any): {
2
+ progress: null;
3
+ uploading: boolean;
4
+ outcome: null;
5
+ start: (body: any, overrides: any) => Promise<any>;
6
+ cancel: () => void;
7
+ reset: () => void;
8
+ };
1
9
  export var usePubSubStore: () => import("h-state").StoreType<{
2
10
  connection: {
3
11
  status: string;
@@ -25,7 +33,14 @@ export function usePubSub(config: any): {
25
33
  clearEvents: unknown;
26
34
  getEventsByTopic: (topic: any) => never[];
27
35
  };
36
+ export function uploadWithProgress(body: any, options: any): {
37
+ done: Promise<any>;
38
+ abort: () => void;
39
+ };
40
+ export function uploadPercent(sentBytes: any, totalBytes: any): number | null;
41
+ export function uploadFraction(sentBytes: any, totalBytes: any): number | null;
28
42
  export var serverFetch: ServerFetch;
43
+ export function secondsRemaining(sentBytes: any, totalBytes: any, bytesPerSecond: any): number | null;
29
44
  export function requiredBodyCeiling(input: any): number | null;
30
45
  declare function parseCron2(expression: any): {
31
46
  ok: boolean;
@@ -282,7 +297,22 @@ export function createServerFactory(endpoints: any, config: any, getCookies: any
282
297
  requestId: any;
283
298
  message: any;
284
299
  }>;
300
+ export function createRateWindow(windowMs?: number): {
301
+ push(at: any, bytes: any): void;
302
+ ratePerSecond(): number | null;
303
+ reset(): void;
304
+ };
285
305
  export function createApiHook(endpoints: any, factory: any): () => {};
306
+ export function buildProgress(params: any): {
307
+ sentBytes: any;
308
+ totalBytes: any;
309
+ fraction: number | null;
310
+ percent: number | null;
311
+ bytesPerSecond: any;
312
+ secondsRemaining: number | null;
313
+ elapsedMs: number;
314
+ retrying: any;
315
+ };
286
316
  export namespace VERIFICATION_ENDPOINTS {
287
317
  namespace VERIFICATION_STATUS {
288
318
  let method: string;
@@ -0,0 +1,2 @@
1
+ export type { UploadHandle, UploadOptions, UploadOutcome, UploadProgress, UseUploadResult, } from '../../src/Client/Upload';
2
+ export { buildProgress, createRateWindow, secondsRemaining, uploadFraction, uploadPercent, uploadWithProgress, useUpload, } from '../../src/Client/Upload';
@@ -0,0 +1 @@
1
+ export { buildProgress, createRateWindow, secondsRemaining, uploadFraction, uploadPercent, uploadWithProgress, useUpload } from '../../src/Client/Upload';
@@ -58,8 +58,10 @@ export { useVerifyEmailStore, VerifyEmailPage, } from './components/VerifyEmailP
58
58
  export { useNucleusEntity } from './hooks/useNucleusEntity';
59
59
  export type { PubSubConfig, PubSubConnectionState, PubSubEvent } from './hooks/usePubSub';
60
60
  export { usePubSub, usePubSubStore } from './hooks/usePubSub';
61
+ export type { UploadHandle, UploadOptions, UploadOutcome, UploadProgress, UseUploadResult, } from './hooks/useUpload';
62
+ export { buildProgress, createRateWindow, secondsRemaining, uploadFraction, uploadPercent, uploadWithProgress, useUpload, } from './hooks/useUpload';
61
63
  export type { BulkDeleteResponse, ColumnConfig, ColumnEnum, ColumnReference, ColumnType, ColumnValidation, DeleteResponse, FieldConfig, FilterCondition, ListResponse, MutationResponse, NucleusColumn, NucleusEntity, NucleusEntityShowcaseProps, PaginationMeta, QueryParams, SingleResponse, SortCondition, SortDirection, UseNucleusEntityOptions, UseNucleusEntityReturn, } from './types';
62
64
  export { cn } from './utils/cn';
63
- export { foldForSearch, matchesQuery } from './utils/searchFold';
64
65
  export { formatLabel, getColumnType, getDefaultValue, isArrayColumn, isJsonColumn, isReferenceColumn, shouldExcludeColumn, shouldExcludeFromForm, } from './utils/columnUtils';
65
66
  export { generateBulkEndpointKey, generateDistinctEndpointKey, generateEntityEndpointKey, generateGetByIdEndpointKey, singularize, toUpperSnakeCase, } from './utils/endpointKeys';
67
+ export { foldForSearch, matchesQuery } from './utils/searchFold';
package/dist/fe/index.js CHANGED
@@ -35,10 +35,11 @@ export { extendVerificationPanelTheme, PendingVerifications, usePendingVerificat
35
35
  export { useVerifyEmailStore, VerifyEmailPage } from './components/VerifyEmailPage';
36
36
  export { useNucleusEntity } from './hooks/useNucleusEntity';
37
37
  export { usePubSub, usePubSubStore } from './hooks/usePubSub';
38
+ export { buildProgress, createRateWindow, secondsRemaining, uploadFraction, uploadPercent, uploadWithProgress, useUpload } from './hooks/useUpload';
38
39
  export { cn } from './utils/cn';
40
+ export { formatLabel, getColumnType, getDefaultValue, isArrayColumn, isJsonColumn, isReferenceColumn, shouldExcludeColumn, shouldExcludeFromForm } from './utils/columnUtils';
41
+ export { generateBulkEndpointKey, generateDistinctEndpointKey, generateEntityEndpointKey, generateGetByIdEndpointKey, singularize, toUpperSnakeCase } from './utils/endpointKeys';
39
42
  // Exported because every portal that lists people needs it and none of them
40
43
  // should write it twice: matching a typed query to a name is not a lower-case
41
44
  // comparison in any alphabet with marks in it.
42
45
  export { foldForSearch, matchesQuery } from './utils/searchFold';
43
- export { formatLabel, getColumnType, getDefaultValue, isArrayColumn, isJsonColumn, isReferenceColumn, shouldExcludeColumn, shouldExcludeFromForm } from './utils/columnUtils';
44
- export { generateBulkEndpointKey, generateDistinctEndpointKey, generateEntityEndpointKey, generateGetByIdEndpointKey, singularize, toUpperSnakeCase } from './utils/endpointKeys';