@useupup/core 3.3.0

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 (118) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +8 -0
  3. package/README.md +75 -0
  4. package/dist/browser-SXR426OQ.cjs +10 -0
  5. package/dist/browser-WD6T5ABJ.js +1 -0
  6. package/dist/chunk-2H5ICKFT.cjs +122 -0
  7. package/dist/chunk-6HF3I2JS.cjs +39 -0
  8. package/dist/chunk-6S5DQDQH.js +212 -0
  9. package/dist/chunk-BMQC27OE.cjs +92 -0
  10. package/dist/chunk-BSGQGINR.cjs +219 -0
  11. package/dist/chunk-CPKZ2CXD.cjs +179 -0
  12. package/dist/chunk-DTKDIMKT.cjs +573 -0
  13. package/dist/chunk-DYE5XJ6Z.cjs +2134 -0
  14. package/dist/chunk-E3ZCNOXG.cjs +74 -0
  15. package/dist/chunk-FEQY2WYY.cjs +2377 -0
  16. package/dist/chunk-FMURBCZ7.js +120 -0
  17. package/dist/chunk-FYQQRULL.js +37 -0
  18. package/dist/chunk-GE4LIVXP.js +133 -0
  19. package/dist/chunk-HFR5HZJZ.js +56 -0
  20. package/dist/chunk-I7ULPCA2.js +72 -0
  21. package/dist/chunk-MHYXDLZR.js +569 -0
  22. package/dist/chunk-N2SLHVAW.cjs +61 -0
  23. package/dist/chunk-OOPDEOTM.js +169 -0
  24. package/dist/chunk-PMBR3OUW.js +2359 -0
  25. package/dist/chunk-QK7HZIVY.cjs +144 -0
  26. package/dist/chunk-T2AQHY7V.cjs +59 -0
  27. package/dist/chunk-TRCP5FUR.js +90 -0
  28. package/dist/chunk-U7KL5M2H.cjs +374 -0
  29. package/dist/chunk-UXNPM54W.js +2108 -0
  30. package/dist/chunk-VV6QCQLL.js +365 -0
  31. package/dist/chunk-ZMS2HXLB.js +56 -0
  32. package/dist/context-shapes-123dd3b6.d.cts +207 -0
  33. package/dist/context-shapes-27b24c8f.d.ts +207 -0
  34. package/dist/contracts-pipeline-cf177270.d.cts +78 -0
  35. package/dist/contracts-pipeline-cf177270.d.ts +78 -0
  36. package/dist/contracts-strategies-378a16b7.d.cts +168 -0
  37. package/dist/contracts-strategies-378a16b7.d.ts +168 -0
  38. package/dist/contracts.cjs +181 -0
  39. package/dist/contracts.d.cts +11 -0
  40. package/dist/contracts.d.ts +11 -0
  41. package/dist/contracts.js +4 -0
  42. package/dist/core-141335ac.d.ts +651 -0
  43. package/dist/core-bea2ceca.d.cts +651 -0
  44. package/dist/create-worker-provider-AA5SRII6.js +58 -0
  45. package/dist/create-worker-provider-KJNUSSTW.cjs +60 -0
  46. package/dist/eligibility-ONLNJ6FB.cjs +10 -0
  47. package/dist/eligibility-ULFC3E4G.js +8 -0
  48. package/dist/error-code-map-9c44a425.d.ts +62 -0
  49. package/dist/error-code-map-dd5becfa.d.cts +62 -0
  50. package/dist/i18n/index.cjs +90 -0
  51. package/dist/i18n/index.d.cts +3 -0
  52. package/dist/i18n/index.d.ts +3 -0
  53. package/dist/i18n/index.js +1 -0
  54. package/dist/index.cjs +1770 -0
  55. package/dist/index.d.cts +280 -0
  56. package/dist/index.d.ts +280 -0
  57. package/dist/index.js +1589 -0
  58. package/dist/internal.cjs +2407 -0
  59. package/dist/internal.d.cts +595 -0
  60. package/dist/internal.d.ts +595 -0
  61. package/dist/internal.js +2275 -0
  62. package/dist/pipeline/index.cjs +10 -0
  63. package/dist/pipeline/index.d.cts +11 -0
  64. package/dist/pipeline/index.d.ts +11 -0
  65. package/dist/pipeline/index.js +1 -0
  66. package/dist/pipeline-worker.cjs +199 -0
  67. package/dist/pipeline-worker.d.cts +2 -0
  68. package/dist/pipeline-worker.d.ts +2 -0
  69. package/dist/pipeline-worker.js +197 -0
  70. package/dist/resolve-locale-81feef21.d.ts +20 -0
  71. package/dist/resolve-locale-9cb63600.d.cts +20 -0
  72. package/dist/resolve-theme-01758105.d.ts +53 -0
  73. package/dist/resolve-theme-66cf8d98.d.cts +53 -0
  74. package/dist/server-mode-drive-controller-b5f8ee12.d.cts +180 -0
  75. package/dist/server-mode-drive-controller-b5f8ee12.d.ts +180 -0
  76. package/dist/steps/compress.cjs +66 -0
  77. package/dist/steps/compress.d.cts +10 -0
  78. package/dist/steps/compress.d.ts +10 -0
  79. package/dist/steps/compress.js +64 -0
  80. package/dist/steps/exif.cjs +44 -0
  81. package/dist/steps/exif.d.cts +5 -0
  82. package/dist/steps/exif.d.ts +5 -0
  83. package/dist/steps/exif.js +42 -0
  84. package/dist/steps/hash.cjs +44 -0
  85. package/dist/steps/hash.d.cts +5 -0
  86. package/dist/steps/hash.d.ts +5 -0
  87. package/dist/steps/hash.js +42 -0
  88. package/dist/steps/heic.cjs +59 -0
  89. package/dist/steps/heic.d.cts +5 -0
  90. package/dist/steps/heic.d.ts +5 -0
  91. package/dist/steps/heic.js +57 -0
  92. package/dist/steps/thumbnail.cjs +54 -0
  93. package/dist/steps/thumbnail.d.cts +10 -0
  94. package/dist/steps/thumbnail.d.ts +10 -0
  95. package/dist/steps/thumbnail.js +52 -0
  96. package/dist/strategies/index.cjs +82 -0
  97. package/dist/strategies/index.d.cts +187 -0
  98. package/dist/strategies/index.d.ts +187 -0
  99. package/dist/strategies/index.js +60 -0
  100. package/dist/strategies/tus-upload.cjs +14 -0
  101. package/dist/strategies/tus-upload.d.cts +15 -0
  102. package/dist/strategies/tus-upload.d.ts +15 -0
  103. package/dist/strategies/tus-upload.js +5 -0
  104. package/dist/theme/index.cjs +38 -0
  105. package/dist/theme/index.d.cts +3 -0
  106. package/dist/theme/index.d.ts +3 -0
  107. package/dist/theme/index.js +1 -0
  108. package/dist/theme-store-2e56a674.d.cts +39 -0
  109. package/dist/theme-store-f13e0315.d.ts +39 -0
  110. package/dist/token-endpoint-5fdb4a35.d.ts +20 -0
  111. package/dist/token-endpoint-a7d15ab6.d.cts +20 -0
  112. package/dist/ui-translations-c5d00392.d.cts +455 -0
  113. package/dist/ui-translations-c5d00392.d.ts +455 -0
  114. package/dist/uploader-props-72242002.d.ts +340 -0
  115. package/dist/uploader-props-7f956e60.d.cts +340 -0
  116. package/dist/vars-d3421f6c.d.cts +240 -0
  117. package/dist/vars-d3421f6c.d.ts +240 -0
  118. package/package.json +182 -0
@@ -0,0 +1,240 @@
1
+ /**
2
+ * Component-scoped slot definitions.
3
+ * Each component key maps to a record of slot names -> optional className override.
4
+ *
5
+ * Users can pass `theme.slots` to override specific slots without
6
+ * touching the global token system.
7
+ */
8
+ interface UpupThemeSlots {
9
+ uploader: {
10
+ root?: string;
11
+ container?: string;
12
+ };
13
+ dropZone: {
14
+ root?: string;
15
+ };
16
+ sourceSelector: {
17
+ root?: string;
18
+ sourceList?: string;
19
+ sourceButton?: string;
20
+ sourceButtonIcon?: string;
21
+ sourceButtonText?: string;
22
+ browseText?: string;
23
+ dragText?: string;
24
+ };
25
+ sourceView: {
26
+ root?: string;
27
+ header?: string;
28
+ cancelButton?: string;
29
+ };
30
+ fileList: {
31
+ root?: string;
32
+ header?: string;
33
+ cancelButton?: string;
34
+ addMoreButton?: string;
35
+ fileCount?: string;
36
+ body?: string;
37
+ footer?: string;
38
+ uploadButton?: string;
39
+ doneButton?: string;
40
+ };
41
+ filePreview: {
42
+ root?: string;
43
+ thumbnail?: string;
44
+ icon?: string;
45
+ info?: string;
46
+ name?: string;
47
+ size?: string;
48
+ previewButton?: string;
49
+ deleteButton?: string;
50
+ };
51
+ progressBar: {
52
+ root?: string;
53
+ track?: string;
54
+ fill?: string;
55
+ text?: string;
56
+ };
57
+ notifier: {
58
+ root?: string;
59
+ message?: string;
60
+ };
61
+ urlUploader: {
62
+ input?: string;
63
+ fetchButton?: string;
64
+ };
65
+ cameraUploader: {
66
+ previewContainer?: string;
67
+ deleteButton?: string;
68
+ captureButton?: string;
69
+ rotateButton?: string;
70
+ mirrorButton?: string;
71
+ addButton?: string;
72
+ modeToggle?: string;
73
+ videoRecordButton?: string;
74
+ videoStopButton?: string;
75
+ videoPreview?: string;
76
+ videoAddButton?: string;
77
+ videoDeleteButton?: string;
78
+ };
79
+ audioUploader: {
80
+ root?: string;
81
+ playbackContainer?: string;
82
+ deleteButton?: string;
83
+ addButton?: string;
84
+ };
85
+ screenCaptureUploader: {
86
+ root?: string;
87
+ preview?: string;
88
+ addButton?: string;
89
+ deleteButton?: string;
90
+ };
91
+ driveBrowser: {
92
+ root?: string;
93
+ header?: string;
94
+ searchContainer?: string;
95
+ searchInput?: string;
96
+ body?: string;
97
+ footer?: string;
98
+ itemDefault?: string;
99
+ itemSelected?: string;
100
+ itemInner?: string;
101
+ itemInnerText?: string;
102
+ addFilesButton?: string;
103
+ cancelFilesButton?: string;
104
+ logoutButton?: string;
105
+ loading?: string;
106
+ };
107
+ driveAuthFallback: {
108
+ root?: string;
109
+ };
110
+ filePreviewPortal: {
111
+ root?: string;
112
+ };
113
+ imageEditor: {
114
+ root?: string;
115
+ modal?: string;
116
+ };
117
+ }
118
+ /**
119
+ * All valid slot path strings, e.g. "uploader.root", "fileList.uploadButton".
120
+ * Useful for data-upup-slot attribute values.
121
+ */
122
+ type UpupSlotPath = {
123
+ [C in keyof UpupThemeSlots]: {
124
+ [S in keyof UpupThemeSlots[C]]: `${C & string}.${S & string}`;
125
+ }[keyof UpupThemeSlots[C]];
126
+ }[keyof UpupThemeSlots];
127
+ type DeepPartialSlots = {
128
+ [C in keyof UpupThemeSlots]?: Partial<UpupThemeSlots[C]>;
129
+ };
130
+ /**
131
+ * Flat shape the internal React runtime reads from. Produced by
132
+ * `flattenSlotsToClassNames()` and kept as an implementation detail — do not
133
+ * consume directly. Consumers override slots via `theme.slots` in v2.
134
+ */
135
+ type InternalFlatClassNames = Partial<Record<string, string>>;
136
+ /**
137
+ * Project a `theme.slots` override map into the flat className shape the
138
+ * internal React tree currently consumes. Later v2 iterations may migrate
139
+ * components to read slot paths directly; until then, this flattener keeps
140
+ * the public slot API wired without requiring per-component rewrites.
141
+ *
142
+ * Precedence inside a single call: later slot writes to the same flat key
143
+ * win, which matches the intuitive "deepest override wins" rule.
144
+ */
145
+ declare function flattenSlotsToClassNames(slots: DeepPartialSlots | undefined): InternalFlatClassNames;
146
+
147
+ /** Individual color tokens for the upup theme */
148
+ interface UpupColorTokens {
149
+ /** Main surface background (e.g. uploader container) */
150
+ surface: string;
151
+ /** Alternate surface (e.g. file list header/footer) */
152
+ surfaceAlt: string;
153
+ /** Primary action color (buttons, links) */
154
+ primary: string;
155
+ /** Primary hover state */
156
+ primaryHover: string;
157
+ /** Main text color */
158
+ text: string;
159
+ /** Muted/secondary text */
160
+ textMuted: string;
161
+ /** Default border color */
162
+ border: string;
163
+ /** Active/focused border color */
164
+ borderActive: string;
165
+ /** Error/danger color */
166
+ danger: string;
167
+ /** Success color */
168
+ success: string;
169
+ /** Drag-over background */
170
+ dragBg: string;
171
+ /** Overlay/backdrop color */
172
+ overlay: string;
173
+ }
174
+ interface UpupRadiusTokens {
175
+ sm: string;
176
+ md: string;
177
+ lg: string;
178
+ full: string;
179
+ }
180
+ interface UpupShadowTokens {
181
+ sm: string;
182
+ md: string;
183
+ lg: string;
184
+ }
185
+ interface UpupSpacingTokens {
186
+ xs: string;
187
+ sm: string;
188
+ md: string;
189
+ lg: string;
190
+ }
191
+ interface UpupThemeTokens {
192
+ color: UpupColorTokens;
193
+ radius: UpupRadiusTokens;
194
+ shadow: UpupShadowTokens;
195
+ spacing: UpupSpacingTokens;
196
+ }
197
+ type UpupThemeMode = 'light' | 'dark' | 'system';
198
+ /**
199
+ * Full theme configuration object.
200
+ * Users can pass partial overrides; resolveTheme() fills in defaults.
201
+ */
202
+ interface UpupThemeConfig {
203
+ /** 'light' | 'dark' | 'system' — controls which preset to use as base */
204
+ mode?: UpupThemeMode;
205
+ /** Partial token overrides applied on top of the mode preset */
206
+ tokens?: DeepPartial<UpupThemeTokens>;
207
+ /** Per-component slot class overrides */
208
+ slots?: DeepPartial<UpupThemeSlots>;
209
+ }
210
+ /** Resolved theme — all tokens are guaranteed present */
211
+ interface UpupResolvedTheme {
212
+ mode: UpupThemeMode;
213
+ tokens: UpupThemeTokens;
214
+ slots: DeepPartial<UpupThemeSlots>;
215
+ }
216
+ type DeepPartial<T> = {
217
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
218
+ };
219
+
220
+ declare const UPUP_VAR_PREFIX = "--upup-";
221
+ /**
222
+ * Convert a full UpupThemeTokens object to a flat Record of CSS variable
223
+ * assignments: { '--upup-color-surface': '#FFFFFF', ... }
224
+ *
225
+ * Suitable for passing to `style` attribute on root element.
226
+ */
227
+ declare function tokensToVars(tokens: UpupThemeTokens): Record<string, string>;
228
+ /**
229
+ * Generate a UpupThemeTokens-shaped object where each leaf is a
230
+ * `var(--upup-<group>-<key>)` reference string.
231
+ *
232
+ * NOTE (2026-07): currently unconsumed. No component or theme slot reads
233
+ * these var-ref strings today — components apply tokens via inline cn()
234
+ * class strings (see UploaderPanel.tsx). Retained as part of the public
235
+ * theme surface for future slot-level styling; do not assume the spacing
236
+ * group is wired until a component actually references it.
237
+ */
238
+ declare function tokensToVarRefs(): UpupThemeTokens;
239
+
240
+ export { type DeepPartial as D, type InternalFlatClassNames as I, type UpupColorTokens as U, type UpupRadiusTokens as a, type UpupShadowTokens as b, type UpupSpacingTokens as c, type UpupThemeTokens as d, type UpupThemeMode as e, type UpupThemeConfig as f, type UpupResolvedTheme as g, UPUP_VAR_PREFIX as h, tokensToVarRefs as i, type UpupThemeSlots as j, type UpupSlotPath as k, type DeepPartialSlots as l, flattenSlotsToClassNames as m, tokensToVars as t };
@@ -0,0 +1,240 @@
1
+ /**
2
+ * Component-scoped slot definitions.
3
+ * Each component key maps to a record of slot names -> optional className override.
4
+ *
5
+ * Users can pass `theme.slots` to override specific slots without
6
+ * touching the global token system.
7
+ */
8
+ interface UpupThemeSlots {
9
+ uploader: {
10
+ root?: string;
11
+ container?: string;
12
+ };
13
+ dropZone: {
14
+ root?: string;
15
+ };
16
+ sourceSelector: {
17
+ root?: string;
18
+ sourceList?: string;
19
+ sourceButton?: string;
20
+ sourceButtonIcon?: string;
21
+ sourceButtonText?: string;
22
+ browseText?: string;
23
+ dragText?: string;
24
+ };
25
+ sourceView: {
26
+ root?: string;
27
+ header?: string;
28
+ cancelButton?: string;
29
+ };
30
+ fileList: {
31
+ root?: string;
32
+ header?: string;
33
+ cancelButton?: string;
34
+ addMoreButton?: string;
35
+ fileCount?: string;
36
+ body?: string;
37
+ footer?: string;
38
+ uploadButton?: string;
39
+ doneButton?: string;
40
+ };
41
+ filePreview: {
42
+ root?: string;
43
+ thumbnail?: string;
44
+ icon?: string;
45
+ info?: string;
46
+ name?: string;
47
+ size?: string;
48
+ previewButton?: string;
49
+ deleteButton?: string;
50
+ };
51
+ progressBar: {
52
+ root?: string;
53
+ track?: string;
54
+ fill?: string;
55
+ text?: string;
56
+ };
57
+ notifier: {
58
+ root?: string;
59
+ message?: string;
60
+ };
61
+ urlUploader: {
62
+ input?: string;
63
+ fetchButton?: string;
64
+ };
65
+ cameraUploader: {
66
+ previewContainer?: string;
67
+ deleteButton?: string;
68
+ captureButton?: string;
69
+ rotateButton?: string;
70
+ mirrorButton?: string;
71
+ addButton?: string;
72
+ modeToggle?: string;
73
+ videoRecordButton?: string;
74
+ videoStopButton?: string;
75
+ videoPreview?: string;
76
+ videoAddButton?: string;
77
+ videoDeleteButton?: string;
78
+ };
79
+ audioUploader: {
80
+ root?: string;
81
+ playbackContainer?: string;
82
+ deleteButton?: string;
83
+ addButton?: string;
84
+ };
85
+ screenCaptureUploader: {
86
+ root?: string;
87
+ preview?: string;
88
+ addButton?: string;
89
+ deleteButton?: string;
90
+ };
91
+ driveBrowser: {
92
+ root?: string;
93
+ header?: string;
94
+ searchContainer?: string;
95
+ searchInput?: string;
96
+ body?: string;
97
+ footer?: string;
98
+ itemDefault?: string;
99
+ itemSelected?: string;
100
+ itemInner?: string;
101
+ itemInnerText?: string;
102
+ addFilesButton?: string;
103
+ cancelFilesButton?: string;
104
+ logoutButton?: string;
105
+ loading?: string;
106
+ };
107
+ driveAuthFallback: {
108
+ root?: string;
109
+ };
110
+ filePreviewPortal: {
111
+ root?: string;
112
+ };
113
+ imageEditor: {
114
+ root?: string;
115
+ modal?: string;
116
+ };
117
+ }
118
+ /**
119
+ * All valid slot path strings, e.g. "uploader.root", "fileList.uploadButton".
120
+ * Useful for data-upup-slot attribute values.
121
+ */
122
+ type UpupSlotPath = {
123
+ [C in keyof UpupThemeSlots]: {
124
+ [S in keyof UpupThemeSlots[C]]: `${C & string}.${S & string}`;
125
+ }[keyof UpupThemeSlots[C]];
126
+ }[keyof UpupThemeSlots];
127
+ type DeepPartialSlots = {
128
+ [C in keyof UpupThemeSlots]?: Partial<UpupThemeSlots[C]>;
129
+ };
130
+ /**
131
+ * Flat shape the internal React runtime reads from. Produced by
132
+ * `flattenSlotsToClassNames()` and kept as an implementation detail — do not
133
+ * consume directly. Consumers override slots via `theme.slots` in v2.
134
+ */
135
+ type InternalFlatClassNames = Partial<Record<string, string>>;
136
+ /**
137
+ * Project a `theme.slots` override map into the flat className shape the
138
+ * internal React tree currently consumes. Later v2 iterations may migrate
139
+ * components to read slot paths directly; until then, this flattener keeps
140
+ * the public slot API wired without requiring per-component rewrites.
141
+ *
142
+ * Precedence inside a single call: later slot writes to the same flat key
143
+ * win, which matches the intuitive "deepest override wins" rule.
144
+ */
145
+ declare function flattenSlotsToClassNames(slots: DeepPartialSlots | undefined): InternalFlatClassNames;
146
+
147
+ /** Individual color tokens for the upup theme */
148
+ interface UpupColorTokens {
149
+ /** Main surface background (e.g. uploader container) */
150
+ surface: string;
151
+ /** Alternate surface (e.g. file list header/footer) */
152
+ surfaceAlt: string;
153
+ /** Primary action color (buttons, links) */
154
+ primary: string;
155
+ /** Primary hover state */
156
+ primaryHover: string;
157
+ /** Main text color */
158
+ text: string;
159
+ /** Muted/secondary text */
160
+ textMuted: string;
161
+ /** Default border color */
162
+ border: string;
163
+ /** Active/focused border color */
164
+ borderActive: string;
165
+ /** Error/danger color */
166
+ danger: string;
167
+ /** Success color */
168
+ success: string;
169
+ /** Drag-over background */
170
+ dragBg: string;
171
+ /** Overlay/backdrop color */
172
+ overlay: string;
173
+ }
174
+ interface UpupRadiusTokens {
175
+ sm: string;
176
+ md: string;
177
+ lg: string;
178
+ full: string;
179
+ }
180
+ interface UpupShadowTokens {
181
+ sm: string;
182
+ md: string;
183
+ lg: string;
184
+ }
185
+ interface UpupSpacingTokens {
186
+ xs: string;
187
+ sm: string;
188
+ md: string;
189
+ lg: string;
190
+ }
191
+ interface UpupThemeTokens {
192
+ color: UpupColorTokens;
193
+ radius: UpupRadiusTokens;
194
+ shadow: UpupShadowTokens;
195
+ spacing: UpupSpacingTokens;
196
+ }
197
+ type UpupThemeMode = 'light' | 'dark' | 'system';
198
+ /**
199
+ * Full theme configuration object.
200
+ * Users can pass partial overrides; resolveTheme() fills in defaults.
201
+ */
202
+ interface UpupThemeConfig {
203
+ /** 'light' | 'dark' | 'system' — controls which preset to use as base */
204
+ mode?: UpupThemeMode;
205
+ /** Partial token overrides applied on top of the mode preset */
206
+ tokens?: DeepPartial<UpupThemeTokens>;
207
+ /** Per-component slot class overrides */
208
+ slots?: DeepPartial<UpupThemeSlots>;
209
+ }
210
+ /** Resolved theme — all tokens are guaranteed present */
211
+ interface UpupResolvedTheme {
212
+ mode: UpupThemeMode;
213
+ tokens: UpupThemeTokens;
214
+ slots: DeepPartial<UpupThemeSlots>;
215
+ }
216
+ type DeepPartial<T> = {
217
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
218
+ };
219
+
220
+ declare const UPUP_VAR_PREFIX = "--upup-";
221
+ /**
222
+ * Convert a full UpupThemeTokens object to a flat Record of CSS variable
223
+ * assignments: { '--upup-color-surface': '#FFFFFF', ... }
224
+ *
225
+ * Suitable for passing to `style` attribute on root element.
226
+ */
227
+ declare function tokensToVars(tokens: UpupThemeTokens): Record<string, string>;
228
+ /**
229
+ * Generate a UpupThemeTokens-shaped object where each leaf is a
230
+ * `var(--upup-<group>-<key>)` reference string.
231
+ *
232
+ * NOTE (2026-07): currently unconsumed. No component or theme slot reads
233
+ * these var-ref strings today — components apply tokens via inline cn()
234
+ * class strings (see UploaderPanel.tsx). Retained as part of the public
235
+ * theme surface for future slot-level styling; do not assume the spacing
236
+ * group is wired until a component actually references it.
237
+ */
238
+ declare function tokensToVarRefs(): UpupThemeTokens;
239
+
240
+ export { type DeepPartial as D, type InternalFlatClassNames as I, type UpupColorTokens as U, type UpupRadiusTokens as a, type UpupShadowTokens as b, type UpupSpacingTokens as c, type UpupThemeTokens as d, type UpupThemeMode as e, type UpupThemeConfig as f, type UpupResolvedTheme as g, UPUP_VAR_PREFIX as h, tokensToVarRefs as i, type UpupThemeSlots as j, type UpupSlotPath as k, type DeepPartialSlots as l, flattenSlotsToClassNames as m, tokensToVars as t };
package/package.json ADDED
@@ -0,0 +1,182 @@
1
+ {
2
+ "name": "@useupup/core",
3
+ "version": "3.3.0",
4
+ "description": "Headless, framework-agnostic file-upload engine powering the upup uploader — file state, upload pipeline (compression, HEIC, web-worker offload), cloud-drive sources, i18n, and theming.",
5
+ "keywords": [
6
+ "file-upload",
7
+ "file-uploader",
8
+ "uploader",
9
+ "headless",
10
+ "drag-and-drop",
11
+ "dropzone",
12
+ "file-picker",
13
+ "image-upload",
14
+ "s3",
15
+ "presigned-url",
16
+ "google-drive",
17
+ "one-drive",
18
+ "dropbox",
19
+ "camera",
20
+ "cloud-storage",
21
+ "typescript"
22
+ ],
23
+ "homepage": "https://useupup.com",
24
+ "bugs": {
25
+ "url": "https://github.com/DevinoSolutions/upup/issues"
26
+ },
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/DevinoSolutions/upup.git",
30
+ "directory": "packages/core"
31
+ },
32
+ "license": "MIT",
33
+ "publishConfig": {
34
+ "access": "public"
35
+ },
36
+ "type": "module",
37
+ "sideEffects": false,
38
+ "engines": {
39
+ "node": ">=20"
40
+ },
41
+ "exports": {
42
+ ".": {
43
+ "types": "./dist/index.d.ts",
44
+ "import": "./dist/index.js",
45
+ "require": "./dist/index.cjs"
46
+ },
47
+ "./contracts": {
48
+ "types": "./dist/contracts.d.ts",
49
+ "import": "./dist/contracts.js",
50
+ "require": "./dist/contracts.cjs"
51
+ },
52
+ "./internal": {
53
+ "types": "./dist/internal.d.ts",
54
+ "import": "./dist/internal.js",
55
+ "require": "./dist/internal.cjs"
56
+ },
57
+ "./i18n": {
58
+ "types": "./dist/i18n/index.d.ts",
59
+ "import": "./dist/i18n/index.js",
60
+ "require": "./dist/i18n/index.cjs"
61
+ },
62
+ "./theme": {
63
+ "types": "./dist/theme/index.d.ts",
64
+ "import": "./dist/theme/index.js",
65
+ "require": "./dist/theme/index.cjs"
66
+ },
67
+ "./strategies": {
68
+ "types": "./dist/strategies/index.d.ts",
69
+ "import": "./dist/strategies/index.js",
70
+ "require": "./dist/strategies/index.cjs"
71
+ },
72
+ "./strategies/tus-upload": {
73
+ "types": "./dist/strategies/tus-upload.d.ts",
74
+ "import": "./dist/strategies/tus-upload.js",
75
+ "require": "./dist/strategies/tus-upload.cjs"
76
+ },
77
+ "./pipeline": {
78
+ "types": "./dist/pipeline/index.d.ts",
79
+ "import": "./dist/pipeline/index.js",
80
+ "require": "./dist/pipeline/index.cjs"
81
+ },
82
+ "./steps/hash": {
83
+ "types": "./dist/steps/hash.d.ts",
84
+ "import": "./dist/steps/hash.js",
85
+ "require": "./dist/steps/hash.cjs"
86
+ },
87
+ "./steps/heic": {
88
+ "types": "./dist/steps/heic.d.ts",
89
+ "import": "./dist/steps/heic.js",
90
+ "require": "./dist/steps/heic.cjs"
91
+ },
92
+ "./steps/exif": {
93
+ "types": "./dist/steps/exif.d.ts",
94
+ "import": "./dist/steps/exif.js",
95
+ "require": "./dist/steps/exif.cjs"
96
+ },
97
+ "./steps/compress": {
98
+ "types": "./dist/steps/compress.d.ts",
99
+ "import": "./dist/steps/compress.js",
100
+ "require": "./dist/steps/compress.cjs"
101
+ },
102
+ "./steps/thumbnail": {
103
+ "types": "./dist/steps/thumbnail.d.ts",
104
+ "import": "./dist/steps/thumbnail.js",
105
+ "require": "./dist/steps/thumbnail.cjs"
106
+ }
107
+ },
108
+ "main": "./dist/index.cjs",
109
+ "module": "./dist/index.js",
110
+ "types": "./dist/index.d.ts",
111
+ "typesVersions": {
112
+ "*": {
113
+ "contracts": [
114
+ "dist/contracts.d.ts"
115
+ ],
116
+ "internal": [
117
+ "dist/internal.d.ts"
118
+ ],
119
+ "i18n": [
120
+ "dist/i18n/index.d.ts"
121
+ ],
122
+ "theme": [
123
+ "dist/theme/index.d.ts"
124
+ ],
125
+ "strategies": [
126
+ "dist/strategies/index.d.ts"
127
+ ],
128
+ "strategies/tus-upload": [
129
+ "dist/strategies/tus-upload.d.ts"
130
+ ],
131
+ "pipeline": [
132
+ "dist/pipeline/index.d.ts"
133
+ ],
134
+ "steps/hash": [
135
+ "dist/steps/hash.d.ts"
136
+ ],
137
+ "steps/heic": [
138
+ "dist/steps/heic.d.ts"
139
+ ],
140
+ "steps/exif": [
141
+ "dist/steps/exif.d.ts"
142
+ ],
143
+ "steps/compress": [
144
+ "dist/steps/compress.d.ts"
145
+ ],
146
+ "steps/thumbnail": [
147
+ "dist/steps/thumbnail.d.ts"
148
+ ]
149
+ }
150
+ },
151
+ "files": [
152
+ "dist",
153
+ "NOTICE"
154
+ ],
155
+ "dependencies": {
156
+ "clsx": "^2.1.1",
157
+ "intl-messageformat": "^11.2.0",
158
+ "tailwind-merge": "^3.6.0"
159
+ },
160
+ "optionalDependencies": {
161
+ "libheif-js": "^1.19.8",
162
+ "tus-js-client": "^4.3.1"
163
+ },
164
+ "devDependencies": {
165
+ "@types/node": "^22",
166
+ "@vitest/coverage-v8": "^4.1.2",
167
+ "eslint": "^10.6.0",
168
+ "tsup": "^8.4.0",
169
+ "typescript": "^5.3.2",
170
+ "vitest": "^4.1.2",
171
+ "@useupup/eslint-config": "0.1.0"
172
+ },
173
+ "scripts": {
174
+ "build": "tsup",
175
+ "dev": "tsup --watch",
176
+ "lint": "eslint . --max-warnings 0",
177
+ "test": "vitest run",
178
+ "test:coverage": "vitest run --coverage",
179
+ "test:watch": "vitest",
180
+ "typecheck": "tsc --noEmit && tsc -p tsconfig.test.json --noEmit"
181
+ }
182
+ }