@ttt-productions/ttt-core 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/media/index.d.ts +1 -0
  2. package/dist/media/index.d.ts.map +1 -1
  3. package/dist/media/index.js +1 -0
  4. package/dist/media/index.js.map +1 -1
  5. package/dist/media/pending-media.d.ts +96 -0
  6. package/dist/media/pending-media.d.ts.map +1 -1
  7. package/dist/media/upload-tray-display.d.ts +15 -0
  8. package/dist/media/upload-tray-display.d.ts.map +1 -0
  9. package/dist/media/upload-tray-display.js +102 -0
  10. package/dist/media/upload-tray-display.js.map +1 -0
  11. package/dist/upload-variables/apply-to-job-variables.d.ts +3 -0
  12. package/dist/upload-variables/apply-to-job-variables.d.ts.map +1 -1
  13. package/dist/upload-variables/apply-to-job-variables.js +1 -0
  14. package/dist/upload-variables/apply-to-job-variables.js.map +1 -1
  15. package/dist/upload-variables/create-admin-opportunity-variables.d.ts +3 -0
  16. package/dist/upload-variables/create-admin-opportunity-variables.d.ts.map +1 -1
  17. package/dist/upload-variables/create-admin-opportunity-variables.js +1 -0
  18. package/dist/upload-variables/create-admin-opportunity-variables.js.map +1 -1
  19. package/dist/upload-variables/create-job-variables.d.ts +3 -0
  20. package/dist/upload-variables/create-job-variables.d.ts.map +1 -1
  21. package/dist/upload-variables/create-job-variables.js +1 -0
  22. package/dist/upload-variables/create-job-variables.js.map +1 -1
  23. package/dist/upload-variables/create-opportunity-reply-variables.d.ts +3 -0
  24. package/dist/upload-variables/create-opportunity-reply-variables.d.ts.map +1 -1
  25. package/dist/upload-variables/create-opportunity-reply-variables.js +1 -0
  26. package/dist/upload-variables/create-opportunity-reply-variables.js.map +1 -1
  27. package/dist/upload-variables/create-project-opportunity-variables.d.ts +3 -0
  28. package/dist/upload-variables/create-project-opportunity-variables.d.ts.map +1 -1
  29. package/dist/upload-variables/create-project-opportunity-variables.js +1 -0
  30. package/dist/upload-variables/create-project-opportunity-variables.js.map +1 -1
  31. package/dist/upload-variables/streetz-post-variables.d.ts +3 -0
  32. package/dist/upload-variables/streetz-post-variables.d.ts.map +1 -1
  33. package/dist/upload-variables/streetz-post-variables.js +1 -0
  34. package/dist/upload-variables/streetz-post-variables.js.map +1 -1
  35. package/dist/upload-variables/update-chapter-media-variables.d.ts +3 -0
  36. package/dist/upload-variables/update-chapter-media-variables.d.ts.map +1 -1
  37. package/dist/upload-variables/update-chapter-media-variables.js +1 -0
  38. package/dist/upload-variables/update-chapter-media-variables.js.map +1 -1
  39. package/dist/upload-variables/update-show-media-variables.d.ts +3 -0
  40. package/dist/upload-variables/update-show-media-variables.d.ts.map +1 -1
  41. package/dist/upload-variables/update-show-media-variables.js +1 -0
  42. package/dist/upload-variables/update-show-media-variables.js.map +1 -1
  43. package/dist/upload-variables/update-song-media-variables.d.ts +3 -0
  44. package/dist/upload-variables/update-song-media-variables.d.ts.map +1 -1
  45. package/dist/upload-variables/update-song-media-variables.js +1 -0
  46. package/dist/upload-variables/update-song-media-variables.js.map +1 -1
  47. package/dist/upload-variables/update-tale-cover-photo-variables.d.ts +3 -0
  48. package/dist/upload-variables/update-tale-cover-photo-variables.d.ts.map +1 -1
  49. package/dist/upload-variables/update-tale-cover-photo-variables.js +1 -0
  50. package/dist/upload-variables/update-tale-cover-photo-variables.js.map +1 -1
  51. package/dist/upload-variables/update-television-cover-photo-variables.d.ts +3 -0
  52. package/dist/upload-variables/update-television-cover-photo-variables.d.ts.map +1 -1
  53. package/dist/upload-variables/update-television-cover-photo-variables.js +1 -0
  54. package/dist/upload-variables/update-television-cover-photo-variables.js.map +1 -1
  55. package/dist/upload-variables/update-tune-cover-photo-variables.d.ts +3 -0
  56. package/dist/upload-variables/update-tune-cover-photo-variables.d.ts.map +1 -1
  57. package/dist/upload-variables/update-tune-cover-photo-variables.js +1 -0
  58. package/dist/upload-variables/update-tune-cover-photo-variables.js.map +1 -1
  59. package/dist/upload-variables/upload-profile-picture-variables.d.ts +3 -0
  60. package/dist/upload-variables/upload-profile-picture-variables.d.ts.map +1 -1
  61. package/dist/upload-variables/upload-profile-picture-variables.js +1 -0
  62. package/dist/upload-variables/upload-profile-picture-variables.js.map +1 -1
  63. package/dist/upload-variables/upload-project-file-variables.d.ts +3 -0
  64. package/dist/upload-variables/upload-project-file-variables.d.ts.map +1 -1
  65. package/dist/upload-variables/upload-project-file-variables.js +1 -0
  66. package/dist/upload-variables/upload-project-file-variables.js.map +1 -1
  67. package/dist/upload-variables/upload-skill-variables.d.ts +3 -0
  68. package/dist/upload-variables/upload-skill-variables.d.ts.map +1 -1
  69. package/dist/upload-variables/upload-skill-variables.js +1 -0
  70. package/dist/upload-variables/upload-skill-variables.js.map +1 -1
  71. package/dist/utils/format.d.ts +3 -3
  72. package/dist/utils/format.d.ts.map +1 -1
  73. package/dist/utils/format.js +14 -8
  74. package/dist/utils/format.js.map +1 -1
  75. package/package.json +1 -1
@@ -6,18 +6,21 @@ export declare const UpdateTuneCoverPhotoVariablesSchema: z.ZodObject<{
6
6
  file: z.ZodUnion<[z.ZodType<File, z.ZodTypeDef, File>, z.ZodType<Blob, z.ZodTypeDef, Blob>]>;
7
7
  coverType: z.ZodEnum<["square", "poster", "cinematic"]>;
8
8
  onProgress: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodType<UploadState | null, z.ZodTypeDef, UploadState | null>], z.ZodUnknown>, z.ZodVoid>>;
9
+ signal: z.ZodOptional<z.ZodType<AbortSignal, z.ZodTypeDef, AbortSignal>>;
9
10
  }, "strict", z.ZodTypeAny, {
10
11
  projectId: string;
11
12
  file: Blob | File;
12
13
  tuneId: string;
13
14
  coverType: "square" | "poster" | "cinematic";
14
15
  onProgress?: ((args_0: UploadState | null, ...args: unknown[]) => void) | undefined;
16
+ signal?: AbortSignal | undefined;
15
17
  }, {
16
18
  projectId: string;
17
19
  file: Blob | File;
18
20
  tuneId: string;
19
21
  coverType: "square" | "poster" | "cinematic";
20
22
  onProgress?: ((args_0: UploadState | null, ...args: unknown[]) => void) | undefined;
23
+ signal?: AbortSignal | undefined;
21
24
  }>;
22
25
  export type UpdateTuneCoverPhotoVariables = z.infer<typeof UpdateTuneCoverPhotoVariablesSchema>;
23
26
  //# sourceMappingURL=update-tune-cover-photo-variables.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"update-tune-cover-photo-variables.d.ts","sourceRoot":"","sources":["../../src/upload-variables/update-tune-cover-photo-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAQlE,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;EAMrC,CAAC;AACZ,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC"}
1
+ {"version":3,"file":"update-tune-cover-photo-variables.d.ts","sourceRoot":"","sources":["../../src/upload-variables/update-tune-cover-photo-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAQlE,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;EAOrC,CAAC;AACZ,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC"}
@@ -10,5 +10,6 @@ export const UpdateTuneCoverPhotoVariablesSchema = z.object({
10
10
  file: z.instanceof(File).or(z.instanceof(Blob)),
11
11
  coverType: z.enum(['square', 'poster', 'cinematic']),
12
12
  onProgress: onProgressSchema,
13
+ signal: z.instanceof(AbortSignal).optional(),
13
14
  }).strict();
14
15
  //# sourceMappingURL=update-tune-cover-photo-variables.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"update-tune-cover-photo-variables.js","sourceRoot":"","sources":["../../src/upload-variables/update-tune-cover-photo-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,gBAAgB,GAAG,CAAC;KACvB,QAAQ,EAAE;KACV,IAAI,CAAC,CAAC,CAAC,MAAM,EAAsB,CAAC;KACpC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;KACjB,QAAQ,EAAE,CAAC;AAEd,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC/C,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IACpD,UAAU,EAAE,gBAAgB;CAC7B,CAAC,CAAC,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"update-tune-cover-photo-variables.js","sourceRoot":"","sources":["../../src/upload-variables/update-tune-cover-photo-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,gBAAgB,GAAG,CAAC;KACvB,QAAQ,EAAE;KACV,IAAI,CAAC,CAAC,CAAC,MAAM,EAAsB,CAAC;KACpC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;KACjB,QAAQ,EAAE,CAAC;AAEd,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC/C,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IACpD,UAAU,EAAE,gBAAgB;IAC5B,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC,MAAM,EAAE,CAAC"}
@@ -3,12 +3,15 @@ import type { UploadState } from '@ttt-productions/media-schemas';
3
3
  export declare const UploadProfilePictureVariablesSchema: z.ZodObject<{
4
4
  file: z.ZodUnion<[z.ZodType<File, z.ZodTypeDef, File>, z.ZodType<Blob, z.ZodTypeDef, Blob>]>;
5
5
  onProgress: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodType<UploadState | null, z.ZodTypeDef, UploadState | null>], z.ZodUnknown>, z.ZodVoid>>;
6
+ signal: z.ZodOptional<z.ZodType<AbortSignal, z.ZodTypeDef, AbortSignal>>;
6
7
  }, "strict", z.ZodTypeAny, {
7
8
  file: Blob | File;
8
9
  onProgress?: ((args_0: UploadState | null, ...args: unknown[]) => void) | undefined;
10
+ signal?: AbortSignal | undefined;
9
11
  }, {
10
12
  file: Blob | File;
11
13
  onProgress?: ((args_0: UploadState | null, ...args: unknown[]) => void) | undefined;
14
+ signal?: AbortSignal | undefined;
12
15
  }>;
13
16
  export type UploadProfilePictureVariables = z.infer<typeof UploadProfilePictureVariablesSchema>;
14
17
  //# sourceMappingURL=upload-profile-picture-variables.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"upload-profile-picture-variables.d.ts","sourceRoot":"","sources":["../../src/upload-variables/upload-profile-picture-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAQlE,eAAO,MAAM,mCAAmC;;;;;;;;;EAGrC,CAAC;AACZ,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC"}
1
+ {"version":3,"file":"upload-profile-picture-variables.d.ts","sourceRoot":"","sources":["../../src/upload-variables/upload-profile-picture-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAQlE,eAAO,MAAM,mCAAmC;;;;;;;;;;;;EAIrC,CAAC;AACZ,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC"}
@@ -7,5 +7,6 @@ const onProgressSchema = z
7
7
  export const UploadProfilePictureVariablesSchema = z.object({
8
8
  file: z.instanceof(File).or(z.instanceof(Blob)),
9
9
  onProgress: onProgressSchema,
10
+ signal: z.instanceof(AbortSignal).optional(),
10
11
  }).strict();
11
12
  //# sourceMappingURL=upload-profile-picture-variables.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"upload-profile-picture-variables.js","sourceRoot":"","sources":["../../src/upload-variables/upload-profile-picture-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,gBAAgB,GAAG,CAAC;KACvB,QAAQ,EAAE;KACV,IAAI,CAAC,CAAC,CAAC,MAAM,EAAsB,CAAC;KACpC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;KACjB,QAAQ,EAAE,CAAC;AAEd,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC/C,UAAU,EAAE,gBAAgB;CAC7B,CAAC,CAAC,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"upload-profile-picture-variables.js","sourceRoot":"","sources":["../../src/upload-variables/upload-profile-picture-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,gBAAgB,GAAG,CAAC;KACvB,QAAQ,EAAE;KACV,IAAI,CAAC,CAAC,CAAC,MAAM,EAAsB,CAAC;KACpC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;KACjB,QAAQ,EAAE,CAAC;AAEd,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC/C,UAAU,EAAE,gBAAgB;IAC5B,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC,MAAM,EAAE,CAAC"}
@@ -6,16 +6,19 @@ export declare const UploadProjectFileVariablesSchema: z.ZodObject<{
6
6
  file: z.ZodType<File, z.ZodTypeDef, File>;
7
7
  projectFiles: z.ZodArray<z.ZodType<ProjectFile, z.ZodTypeDef, ProjectFile>, "many">;
8
8
  onProgress: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodType<UploadState | null, z.ZodTypeDef, UploadState | null>], z.ZodUnknown>, z.ZodVoid>>;
9
+ signal: z.ZodOptional<z.ZodType<AbortSignal, z.ZodTypeDef, AbortSignal>>;
9
10
  }, "strict", z.ZodTypeAny, {
10
11
  projectId: string;
11
12
  file: File;
12
13
  projectFiles: ProjectFile[];
13
14
  onProgress?: ((args_0: UploadState | null, ...args: unknown[]) => void) | undefined;
15
+ signal?: AbortSignal | undefined;
14
16
  }, {
15
17
  projectId: string;
16
18
  file: File;
17
19
  projectFiles: ProjectFile[];
18
20
  onProgress?: ((args_0: UploadState | null, ...args: unknown[]) => void) | undefined;
21
+ signal?: AbortSignal | undefined;
19
22
  }>;
20
23
  export type UploadProjectFileVariables = z.infer<typeof UploadProjectFileVariablesSchema>;
21
24
  //# sourceMappingURL=upload-project-file-variables.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"upload-project-file-variables.d.ts","sourceRoot":"","sources":["../../src/upload-variables/upload-project-file-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAQvD,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;EAKlC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
1
+ {"version":3,"file":"upload-project-file-variables.d.ts","sourceRoot":"","sources":["../../src/upload-variables/upload-project-file-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAQvD,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;EAMlC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
@@ -9,5 +9,6 @@ export const UploadProjectFileVariablesSchema = z.object({
9
9
  file: z.instanceof(File),
10
10
  projectFiles: z.array(z.custom()),
11
11
  onProgress: onProgressSchema,
12
+ signal: z.instanceof(AbortSignal).optional(),
12
13
  }).strict();
13
14
  //# sourceMappingURL=upload-project-file-variables.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"upload-project-file-variables.js","sourceRoot":"","sources":["../../src/upload-variables/upload-project-file-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,gBAAgB,GAAG,CAAC;KACvB,QAAQ,EAAE;KACV,IAAI,CAAC,CAAC,CAAC,MAAM,EAAsB,CAAC;KACpC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;KACjB,QAAQ,EAAE,CAAC;AAEd,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,MAAM,CAAC;IACvD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC;IACxB,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAe,CAAC;IAC9C,UAAU,EAAE,gBAAgB;CAC7B,CAAC,CAAC,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"upload-project-file-variables.js","sourceRoot":"","sources":["../../src/upload-variables/upload-project-file-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,gBAAgB,GAAG,CAAC;KACvB,QAAQ,EAAE;KACV,IAAI,CAAC,CAAC,CAAC,MAAM,EAAsB,CAAC;KACpC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;KACjB,QAAQ,EAAE,CAAC;AAEd,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,MAAM,CAAC;IACvD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC;IACxB,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAe,CAAC;IAC9C,UAAU,EAAE,gBAAgB;IAC5B,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC,MAAM,EAAE,CAAC"}
@@ -3,12 +3,15 @@ import type { UploadState } from '@ttt-productions/media-schemas';
3
3
  export declare const UploadSkillVariablesSchema: z.ZodObject<{
4
4
  file: z.ZodUnion<[z.ZodType<File, z.ZodTypeDef, File>, z.ZodType<Blob, z.ZodTypeDef, Blob>]>;
5
5
  onProgress: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodType<UploadState | null, z.ZodTypeDef, UploadState | null>], z.ZodUnknown>, z.ZodVoid>>;
6
+ signal: z.ZodOptional<z.ZodType<AbortSignal, z.ZodTypeDef, AbortSignal>>;
6
7
  }, "strict", z.ZodTypeAny, {
7
8
  file: Blob | File;
8
9
  onProgress?: ((args_0: UploadState | null, ...args: unknown[]) => void) | undefined;
10
+ signal?: AbortSignal | undefined;
9
11
  }, {
10
12
  file: Blob | File;
11
13
  onProgress?: ((args_0: UploadState | null, ...args: unknown[]) => void) | undefined;
14
+ signal?: AbortSignal | undefined;
12
15
  }>;
13
16
  export type UploadSkillVariables = z.infer<typeof UploadSkillVariablesSchema>;
14
17
  //# sourceMappingURL=upload-skill-variables.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"upload-skill-variables.d.ts","sourceRoot":"","sources":["../../src/upload-variables/upload-skill-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAQlE,eAAO,MAAM,0BAA0B;;;;;;;;;EAG5B,CAAC;AACZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
1
+ {"version":3,"file":"upload-skill-variables.d.ts","sourceRoot":"","sources":["../../src/upload-variables/upload-skill-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAQlE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;EAI5B,CAAC;AACZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
@@ -7,5 +7,6 @@ const onProgressSchema = z
7
7
  export const UploadSkillVariablesSchema = z.object({
8
8
  file: z.instanceof(File).or(z.instanceof(Blob)),
9
9
  onProgress: onProgressSchema,
10
+ signal: z.instanceof(AbortSignal).optional(),
10
11
  }).strict();
11
12
  //# sourceMappingURL=upload-skill-variables.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"upload-skill-variables.js","sourceRoot":"","sources":["../../src/upload-variables/upload-skill-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,gBAAgB,GAAG,CAAC;KACvB,QAAQ,EAAE;KACV,IAAI,CAAC,CAAC,CAAC,MAAM,EAAsB,CAAC;KACpC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;KACjB,QAAQ,EAAE,CAAC;AAEd,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC/C,UAAU,EAAE,gBAAgB;CAC7B,CAAC,CAAC,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"upload-skill-variables.js","sourceRoot":"","sources":["../../src/upload-variables/upload-skill-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,gBAAgB,GAAG,CAAC;KACvB,QAAQ,EAAE;KACV,IAAI,CAAC,CAAC,CAAC,MAAM,EAAsB,CAAC;KACpC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;KACjB,QAAQ,EAAE,CAAC;AAEd,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC/C,UAAU,EAAE,gBAAgB;IAC5B,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC,MAAM,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /**
2
- * Format a byte count into a short human-readable string (e.g. "1.5 KB", "5 MB").
3
- * Returns "0 Bytes" for input of 0.
2
+ * Format a byte count as a human-readable string: "24 KB", "1.2 MB", "850 B".
3
+ * Returns null when bytes is undefined / non-finite / negative.
4
4
  */
5
- export declare function formatFileSize(bytes: number): string;
5
+ export declare function formatFileSize(bytes: number | undefined): string | null;
6
6
  //# sourceMappingURL=format.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/utils/format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMpD"}
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/utils/format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAUvE"}
@@ -1,13 +1,19 @@
1
1
  /**
2
- * Format a byte count into a short human-readable string (e.g. "1.5 KB", "5 MB").
3
- * Returns "0 Bytes" for input of 0.
2
+ * Format a byte count as a human-readable string: "24 KB", "1.2 MB", "850 B".
3
+ * Returns null when bytes is undefined / non-finite / negative.
4
4
  */
5
5
  export function formatFileSize(bytes) {
6
- if (bytes === 0)
7
- return '0 Bytes';
8
- const k = 1024;
9
- const sizes = ['Bytes', 'KB', 'MB', 'GB'];
10
- const i = Math.floor(Math.log(bytes) / Math.log(k));
11
- return Math.round((bytes / Math.pow(k, i)) * 100) / 100 + ' ' + sizes[i];
6
+ if (bytes === undefined || !Number.isFinite(bytes) || bytes < 0)
7
+ return null;
8
+ if (bytes < 1024)
9
+ return `${bytes} B`;
10
+ if (bytes < 1024 * 1024)
11
+ return `${Math.round(bytes / 1024)} KB`;
12
+ if (bytes < 1024 * 1024 * 1024) {
13
+ const mb = bytes / (1024 * 1024);
14
+ return `${mb < 10 ? mb.toFixed(1) : Math.round(mb)} MB`;
15
+ }
16
+ const gb = bytes / (1024 * 1024 * 1024);
17
+ return `${gb < 10 ? gb.toFixed(1) : Math.round(gb)} GB`;
12
18
  }
13
19
  //# sourceMappingURL=format.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"format.js","sourceRoot":"","sources":["../../src/utils/format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAClC,MAAM,CAAC,GAAG,IAAI,CAAC;IACf,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC1C,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;AAC3E,CAAC"}
1
+ {"version":3,"file":"format.js","sourceRoot":"","sources":["../../src/utils/format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,KAAyB;IACtD,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAC7E,IAAI,KAAK,GAAG,IAAI;QAAE,OAAO,GAAG,KAAK,IAAI,CAAC;IACtC,IAAI,KAAK,GAAG,IAAI,GAAG,IAAI;QAAE,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;IACjE,IAAI,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,EAAE,CAAC;QAC/B,MAAM,EAAE,GAAG,KAAK,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;QACjC,OAAO,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC;IAC1D,CAAC;IACD,MAAM,EAAE,GAAG,KAAK,GAAG,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;IACxC,OAAO,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC;AAC1D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttt-productions/ttt-core",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "Core types, Firestore path constants, and shared constants for TTT Productions",
5
5
  "repository": {
6
6
  "type": "git",