@ttt-productions/ttt-core 0.2.12 → 0.2.14

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 (55) hide show
  1. package/dist/constants/business.d.ts +85 -0
  2. package/dist/constants/business.d.ts.map +1 -1
  3. package/dist/constants/business.js +98 -0
  4. package/dist/constants/business.js.map +1 -1
  5. package/dist/constants/index.d.ts +5 -0
  6. package/dist/constants/index.d.ts.map +1 -1
  7. package/dist/constants/index.js +5 -0
  8. package/dist/constants/index.js.map +1 -1
  9. package/dist/constants/options.d.ts +103 -0
  10. package/dist/constants/options.d.ts.map +1 -0
  11. package/dist/constants/options.js +161 -0
  12. package/dist/constants/options.js.map +1 -0
  13. package/dist/constants/pagination.d.ts +37 -0
  14. package/dist/constants/pagination.d.ts.map +1 -0
  15. package/dist/constants/pagination.js +40 -0
  16. package/dist/constants/pagination.js.map +1 -0
  17. package/dist/constants/retention.d.ts +25 -0
  18. package/dist/constants/retention.d.ts.map +1 -0
  19. package/dist/constants/retention.js +32 -0
  20. package/dist/constants/retention.js.map +1 -0
  21. package/dist/constants/scheduled-jobs.d.ts +9 -0
  22. package/dist/constants/scheduled-jobs.d.ts.map +1 -0
  23. package/dist/constants/scheduled-jobs.js +15 -0
  24. package/dist/constants/scheduled-jobs.js.map +1 -0
  25. package/dist/constants/storage-keys.d.ts +7 -0
  26. package/dist/constants/storage-keys.d.ts.map +1 -0
  27. package/dist/constants/storage-keys.js +8 -0
  28. package/dist/constants/storage-keys.js.map +1 -0
  29. package/dist/index.d.ts +1 -0
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +1 -0
  32. package/dist/index.js.map +1 -1
  33. package/dist/schemas/atoms.d.ts +24 -0
  34. package/dist/schemas/atoms.d.ts.map +1 -0
  35. package/dist/schemas/atoms.js +29 -0
  36. package/dist/schemas/atoms.js.map +1 -0
  37. package/dist/schemas/index.d.ts +3 -0
  38. package/dist/schemas/index.d.ts.map +1 -0
  39. package/dist/schemas/index.js +3 -0
  40. package/dist/schemas/index.js.map +1 -0
  41. package/dist/schemas/share-operation.d.ts +376 -0
  42. package/dist/schemas/share-operation.d.ts.map +1 -0
  43. package/dist/schemas/share-operation.js +61 -0
  44. package/dist/schemas/share-operation.js.map +1 -0
  45. package/dist/types/project.d.ts +1 -11
  46. package/dist/types/project.d.ts.map +1 -1
  47. package/dist/utils/format.d.ts +6 -0
  48. package/dist/utils/format.d.ts.map +1 -0
  49. package/dist/utils/format.js +13 -0
  50. package/dist/utils/format.js.map +1 -0
  51. package/dist/utils/index.d.ts +2 -0
  52. package/dist/utils/index.d.ts.map +1 -0
  53. package/dist/utils/index.js +2 -0
  54. package/dist/utils/index.js.map +1 -0
  55. package/package.json +39 -2
@@ -107,15 +107,5 @@ export type ProjectInvite = {
107
107
  status: 'pending' | 'accepted' | 'declined';
108
108
  lastUpdatedAt: number;
109
109
  };
110
- export type ShareOperationType = 'add-pending' | 'remove-pending' | 'add-active' | 'create-project' | 'convert-invite';
111
- export type ShareOperation = {
112
- type: ShareOperationType;
113
- amount?: number;
114
- user?: {
115
- uid: string;
116
- };
117
- sourceId?: string;
118
- sourceType?: 'invite' | 'job';
119
- projectData?: FullProject;
120
- };
110
+ export type { ShareOperation, ShareOperationType } from '../schemas/share-operation.js';
121
111
  //# sourceMappingURL=project.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/types/project.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,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AS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;IAC5C,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAKF,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,6 @@
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.
4
+ */
5
+ export declare function formatFileSize(bytes: number): string;
6
+ //# sourceMappingURL=format.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,13 @@
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.
4
+ */
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];
12
+ }
13
+ //# sourceMappingURL=format.js.map
@@ -0,0 +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"}
@@ -0,0 +1,2 @@
1
+ export * from './format.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './format.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttt-productions/ttt-core",
3
- "version": "0.2.12",
3
+ "version": "0.2.14",
4
4
  "description": "Core types, Firestore path constants, and shared constants for TTT Productions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,6 +31,42 @@
31
31
  "./constants": {
32
32
  "types": "./dist/constants/index.d.ts",
33
33
  "default": "./dist/constants/index.js"
34
+ },
35
+ "./constants/business": {
36
+ "types": "./dist/constants/business.d.ts",
37
+ "default": "./dist/constants/business.js"
38
+ },
39
+ "./constants/moderation": {
40
+ "types": "./dist/constants/moderation.d.ts",
41
+ "default": "./dist/constants/moderation.js"
42
+ },
43
+ "./constants/options": {
44
+ "types": "./dist/constants/options.d.ts",
45
+ "default": "./dist/constants/options.js"
46
+ },
47
+ "./constants/pagination": {
48
+ "types": "./dist/constants/pagination.d.ts",
49
+ "default": "./dist/constants/pagination.js"
50
+ },
51
+ "./constants/retention": {
52
+ "types": "./dist/constants/retention.d.ts",
53
+ "default": "./dist/constants/retention.js"
54
+ },
55
+ "./constants/scheduled-jobs": {
56
+ "types": "./dist/constants/scheduled-jobs.d.ts",
57
+ "default": "./dist/constants/scheduled-jobs.js"
58
+ },
59
+ "./constants/storage-keys": {
60
+ "types": "./dist/constants/storage-keys.d.ts",
61
+ "default": "./dist/constants/storage-keys.js"
62
+ },
63
+ "./utils": {
64
+ "types": "./dist/utils/index.d.ts",
65
+ "default": "./dist/utils/index.js"
66
+ },
67
+ "./schemas": {
68
+ "types": "./dist/schemas/index.d.ts",
69
+ "default": "./dist/schemas/index.js"
34
70
  }
35
71
  },
36
72
  "scripts": {
@@ -41,7 +77,8 @@
41
77
  "test": "vitest run"
42
78
  },
43
79
  "dependencies": {
44
- "@ttt-productions/media-contracts": "*"
80
+ "@ttt-productions/media-contracts": "*",
81
+ "zod": "^3.23.8"
45
82
  },
46
83
  "devDependencies": {
47
84
  "typescript": "^5.8.3"