img-upload-kit 1.1.1 → 2.0.1

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 (111) hide show
  1. package/CHANGELOG.md +89 -74
  2. package/MIGRATION.md +192 -0
  3. package/README.md +243 -259
  4. package/dist/bin.js +1186 -0
  5. package/dist/bin.js.map +1 -0
  6. package/dist/blur.cjs +40 -412
  7. package/dist/blur.cjs.map +1 -1
  8. package/dist/blur.d.cts +5 -5
  9. package/dist/blur.d.ts +5 -5
  10. package/dist/blur.js +39 -393
  11. package/dist/blur.js.map +1 -1
  12. package/dist/blurDataUtils-DveBRtqE.d.cts +43 -0
  13. package/dist/blurDataUtils-yx9Q6HlU.d.ts +43 -0
  14. package/dist/blurService-D5TpMNji.d.ts +83 -0
  15. package/dist/blurService-DacwylJx.d.cts +83 -0
  16. package/dist/chunk-25GYKQ6J.js +158 -0
  17. package/dist/chunk-25GYKQ6J.js.map +1 -0
  18. package/dist/chunk-34L4TEE3.cjs +226 -0
  19. package/dist/chunk-34L4TEE3.cjs.map +1 -0
  20. package/dist/chunk-DFCSN3X7.cjs +158 -0
  21. package/dist/chunk-DFCSN3X7.cjs.map +1 -0
  22. package/dist/chunk-EWVIL57J.js +294 -0
  23. package/dist/chunk-EWVIL57J.js.map +1 -0
  24. package/dist/chunk-FP5YIWG5.cjs +135 -0
  25. package/dist/chunk-FP5YIWG5.cjs.map +1 -0
  26. package/dist/chunk-HILELQGS.js +226 -0
  27. package/dist/chunk-HILELQGS.js.map +1 -0
  28. package/dist/chunk-IDLLCVGB.js +2370 -0
  29. package/dist/chunk-IDLLCVGB.js.map +1 -0
  30. package/dist/chunk-J6A44Y3W.js +514 -0
  31. package/dist/chunk-J6A44Y3W.js.map +1 -0
  32. package/dist/chunk-LOSVFO56.cjs +145 -0
  33. package/dist/chunk-LOSVFO56.cjs.map +1 -0
  34. package/dist/chunk-MBQJ6NVJ.cjs +294 -0
  35. package/dist/chunk-MBQJ6NVJ.cjs.map +1 -0
  36. package/dist/chunk-MHGQEBPW.js +145 -0
  37. package/dist/chunk-MHGQEBPW.js.map +1 -0
  38. package/dist/chunk-QHU7FUO4.cjs +37 -0
  39. package/dist/chunk-QHU7FUO4.cjs.map +1 -0
  40. package/dist/chunk-S2IFAWJK.js +37 -0
  41. package/dist/chunk-S2IFAWJK.js.map +1 -0
  42. package/dist/chunk-TA5Y64JM.cjs +2370 -0
  43. package/dist/chunk-TA5Y64JM.cjs.map +1 -0
  44. package/dist/chunk-VYVZVUNI.js +135 -0
  45. package/dist/chunk-VYVZVUNI.js.map +1 -0
  46. package/dist/chunk-XKQMCY5Z.cjs +514 -0
  47. package/dist/chunk-XKQMCY5Z.cjs.map +1 -0
  48. package/dist/cli.cjs +273 -76
  49. package/dist/cli.cjs.map +1 -1
  50. package/dist/cli.js +269 -73
  51. package/dist/cli.js.map +1 -1
  52. package/dist/headless.cjs +8 -1880
  53. package/dist/headless.cjs.map +1 -1
  54. package/dist/headless.d.cts +3 -1
  55. package/dist/headless.d.ts +3 -1
  56. package/dist/headless.js +25 -1886
  57. package/dist/headless.js.map +1 -1
  58. package/dist/index-BIdnqtW8.d.ts +234 -0
  59. package/dist/index-Brk_uHs6.d.cts +234 -0
  60. package/dist/{index-FVXXKf2v.d.ts → index-CPMlaQsC.d.ts} +76 -153
  61. package/dist/{index-FVXXKf2v.d.cts → index-DHINe-rA.d.cts} +76 -153
  62. package/dist/index.cjs +64 -532
  63. package/dist/index.cjs.map +1 -1
  64. package/dist/index.d.cts +7 -4
  65. package/dist/index.d.ts +7 -4
  66. package/dist/index.js +63 -504
  67. package/dist/index.js.map +1 -1
  68. package/dist/{memoryAdapter-CBu7_3Pp.d.ts → memoryAdapter-Ck0ccZbF.d.cts} +3 -2
  69. package/dist/{memoryAdapter-BJjyLR-1.d.cts → memoryAdapter-DxEKaG0b.d.ts} +3 -2
  70. package/dist/placeholders-C4ftwaII.d.ts +5 -0
  71. package/dist/placeholders-x_3rt65M.d.cts +5 -0
  72. package/dist/react.cjs +1952 -3257
  73. package/dist/react.cjs.map +1 -1
  74. package/dist/react.d.cts +188 -50
  75. package/dist/react.d.ts +188 -50
  76. package/dist/react.js +1763 -3013
  77. package/dist/react.js.map +1 -1
  78. package/dist/server-handler.cjs +14 -0
  79. package/dist/server-handler.cjs.map +1 -0
  80. package/dist/server-handler.d.cts +3 -0
  81. package/dist/server-handler.d.ts +3 -0
  82. package/dist/server-handler.js +14 -0
  83. package/dist/server-handler.js.map +1 -0
  84. package/dist/server.cjs +1096 -532
  85. package/dist/server.cjs.map +1 -1
  86. package/dist/server.d.cts +77 -154
  87. package/dist/server.d.ts +77 -154
  88. package/dist/server.js +1050 -448
  89. package/dist/server.js.map +1 -1
  90. package/dist/storage.cjs +239 -232
  91. package/dist/storage.cjs.map +1 -1
  92. package/dist/storage.d.cts +21 -5
  93. package/dist/storage.d.ts +21 -5
  94. package/dist/storage.js +227 -207
  95. package/dist/storage.js.map +1 -1
  96. package/dist/styles/animated-image.css +112 -0
  97. package/dist/styles/dropzone-and-tiles.css +247 -0
  98. package/dist/styles/modals-and-dock.css +248 -0
  99. package/dist/styles/primitives.css +197 -0
  100. package/dist/styles/quality-and-inputs.css +184 -0
  101. package/dist/styles/tokens.css +123 -0
  102. package/dist/styles.css +235 -220
  103. package/dist/types-BrP-o9nd.d.cts +85 -0
  104. package/dist/types-sZ3KoFQY.d.ts +85 -0
  105. package/dist/types-yShGNQnW.d.cts +61 -0
  106. package/dist/types-yShGNQnW.d.ts +61 -0
  107. package/dist/{types-CiLY0DwB.d.cts → upload-C5Trd6Dh.d.cts} +27 -53
  108. package/dist/{types-CiLY0DwB.d.ts → upload-C5Trd6Dh.d.ts} +27 -53
  109. package/package.json +92 -32
  110. package/dist/blurService-DqsnfPTd.d.cts +0 -172
  111. package/dist/blurService-DqsnfPTd.d.ts +0 -172
@@ -0,0 +1,123 @@
1
+ /* image-upload-kit — Layer 1: Design Tokens & Base Reset */
2
+
3
+ :root,
4
+ .iuk-root {
5
+ --iuk-bg: #ffffff;
6
+ --iuk-surface: #f8fafc;
7
+ --iuk-surface-hover: #f1f5f9;
8
+ --iuk-border: #e2e8f0;
9
+ --iuk-border-strong: #cbd5e1;
10
+ --iuk-text: #0f172a;
11
+ --iuk-text-muted: #64748b;
12
+ --iuk-primary: #2563eb;
13
+ --iuk-primary-hover: #1d4ed8;
14
+ --iuk-primary-soft: rgba(37, 99, 235, 0.1);
15
+ --iuk-danger: #dc2626;
16
+ --iuk-danger-soft: rgba(220, 38, 38, 0.1);
17
+ --iuk-success: #16a34a;
18
+ --iuk-success-soft: rgba(22, 163, 74, 0.1);
19
+ --iuk-warning: #d97706;
20
+ --iuk-warning-soft: rgba(217, 119, 6, 0.12);
21
+ --iuk-info: #0284c7;
22
+ --iuk-info-soft: rgba(2, 132, 199, 0.1);
23
+ --iuk-placeholder-bg: #f1f5f9;
24
+ --iuk-radius-sm: 6px;
25
+ --iuk-radius-md: 10px;
26
+ --iuk-radius-lg: 14px;
27
+ --iuk-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
28
+ --iuk-shadow-lg: 0 20px 40px -12px rgba(15, 23, 42, 0.22), 0 8px 16px -8px rgba(15, 23, 42, 0.12);
29
+ --iuk-font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
30
+ }
31
+
32
+ @media (prefers-color-scheme: dark) {
33
+ :root:not([data-theme="light"]):not(.light),
34
+ :root:not([data-theme="light"]):not(.light) .iuk-root {
35
+ --iuk-bg: #0f172a;
36
+ --iuk-surface: #1e293b;
37
+ --iuk-surface-hover: #283548;
38
+ --iuk-border: #334155;
39
+ --iuk-border-strong: #475569;
40
+ --iuk-text: #f8fafc;
41
+ --iuk-text-muted: #94a3b8;
42
+ --iuk-primary: #3b82f6;
43
+ --iuk-primary-hover: #60a5fa;
44
+ --iuk-primary-soft: rgba(59, 130, 246, 0.18);
45
+ --iuk-danger: #ef4444;
46
+ --iuk-danger-soft: rgba(239, 68, 68, 0.18);
47
+ --iuk-success: #22c55e;
48
+ --iuk-success-soft: rgba(34, 197, 94, 0.18);
49
+ --iuk-warning: #f59e0b;
50
+ --iuk-warning-soft: rgba(245, 158, 11, 0.18);
51
+ --iuk-info: #38bdf8;
52
+ --iuk-info-soft: rgba(56, 189, 248, 0.18);
53
+ --iuk-placeholder-bg: #1e293b;
54
+ --iuk-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
55
+ --iuk-shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
56
+ }
57
+ }
58
+
59
+ [data-theme="dark"],
60
+ [data-theme="dark"] .iuk-root,
61
+ .dark,
62
+ .dark .iuk-root {
63
+ --iuk-bg: #0f172a;
64
+ --iuk-surface: #1e293b;
65
+ --iuk-surface-hover: #283548;
66
+ --iuk-border: #334155;
67
+ --iuk-border-strong: #475569;
68
+ --iuk-text: #f8fafc;
69
+ --iuk-text-muted: #94a3b8;
70
+ --iuk-primary: #3b82f6;
71
+ --iuk-primary-hover: #60a5fa;
72
+ --iuk-primary-soft: rgba(59, 130, 246, 0.18);
73
+ --iuk-danger: #ef4444;
74
+ --iuk-danger-soft: rgba(239, 68, 68, 0.18);
75
+ --iuk-success: #22c55e;
76
+ --iuk-success-soft: rgba(34, 197, 94, 0.18);
77
+ --iuk-warning: #f59e0b;
78
+ --iuk-warning-soft: rgba(245, 158, 11, 0.18);
79
+ --iuk-info: #38bdf8;
80
+ --iuk-info-soft: rgba(56, 189, 248, 0.18);
81
+ --iuk-placeholder-bg: #1e293b;
82
+ --iuk-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
83
+ --iuk-shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
84
+ }
85
+
86
+ .iuk-root, .iuk-single, .iuk-multi, .iuk-modal-backdrop, .iuk-progress-dock, .iuk-minimized-dock {
87
+ box-sizing: border-box;
88
+ font-family: var(--iuk-font);
89
+ color: var(--iuk-text);
90
+ }
91
+
92
+ .iuk-root *, .iuk-root *::before, .iuk-root *::after, .iuk-modal-backdrop *, .iuk-progress-dock * {
93
+ box-sizing: border-box;
94
+ }
95
+
96
+ .iuk-hidden-input { display: none !important; }
97
+
98
+ @keyframes iuk-spin { to { transform: rotate(360deg); } }
99
+
100
+ .iuk-spin { animation: iuk-spin 0.85s linear infinite; flex-shrink: 0; }
101
+
102
+ .iuk-spinner {
103
+ width: 30px;
104
+ height: 30px;
105
+ border-radius: 9999px;
106
+ border: 2.5px solid var(--iuk-border);
107
+ border-top-color: var(--iuk-primary);
108
+ animation: iuk-spin 0.8s linear infinite;
109
+ }
110
+
111
+ @media (prefers-reduced-motion: reduce) {
112
+ .iuk-spin,
113
+ .iuk-spinner,
114
+ .iuk-root *,
115
+ .iuk-single *,
116
+ .iuk-multi *,
117
+ .iuk-modal-backdrop *,
118
+ .iuk-progress-dock * {
119
+ animation-duration: 0.01ms !important;
120
+ animation-iteration-count: 1 !important;
121
+ transition-duration: 0.01ms !important;
122
+ }
123
+ }
package/dist/styles.css CHANGED
@@ -1,113 +1,127 @@
1
1
  /* image-upload-kit — bundled modular styles */
2
- /* image-upload-kit — Layer 1: Design Tokens & Base Reset */
3
-
4
- :root,
5
- .iuk-root {
6
- --iuk-bg: #ffffff;
7
- --iuk-surface: #f8fafc;
8
- --iuk-surface-hover: #f1f5f9;
9
- --iuk-border: #e2e8f0;
10
- --iuk-border-strong: #cbd5e1;
11
- --iuk-text: #0f172a;
12
- --iuk-text-muted: #64748b;
13
- --iuk-primary: #2563eb;
14
- --iuk-primary-hover: #1d4ed8;
15
- --iuk-primary-soft: rgba(37, 99, 235, 0.1);
16
- --iuk-danger: #dc2626;
17
- --iuk-danger-soft: rgba(220, 38, 38, 0.1);
18
- --iuk-success: #16a34a;
19
- --iuk-success-soft: rgba(22, 163, 74, 0.1);
20
- --iuk-warning: #d97706;
21
- --iuk-warning-soft: rgba(217, 119, 6, 0.12);
22
- --iuk-info: #0284c7;
23
- --iuk-info-soft: rgba(2, 132, 199, 0.1);
24
- --iuk-placeholder-bg: #f1f5f9;
25
- --iuk-radius-sm: 6px;
26
- --iuk-radius-md: 10px;
27
- --iuk-radius-lg: 14px;
28
- --iuk-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
29
- --iuk-shadow-lg: 0 20px 40px -12px rgba(15, 23, 42, 0.22), 0 8px 16px -8px rgba(15, 23, 42, 0.12);
30
- --iuk-font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
31
- }
32
-
33
- @media (prefers-color-scheme: dark) {
34
- :root:not([data-theme="light"]):not(.light),
35
- :root:not([data-theme="light"]):not(.light) .iuk-root {
36
- --iuk-bg: #0f172a;
37
- --iuk-surface: #1e293b;
38
- --iuk-surface-hover: #283548;
39
- --iuk-border: #334155;
40
- --iuk-border-strong: #475569;
41
- --iuk-text: #f8fafc;
42
- --iuk-text-muted: #94a3b8;
43
- --iuk-primary: #3b82f6;
44
- --iuk-primary-hover: #60a5fa;
45
- --iuk-primary-soft: rgba(59, 130, 246, 0.18);
46
- --iuk-danger: #ef4444;
47
- --iuk-danger-soft: rgba(239, 68, 68, 0.18);
48
- --iuk-success: #22c55e;
49
- --iuk-success-soft: rgba(34, 197, 94, 0.18);
50
- --iuk-warning: #f59e0b;
51
- --iuk-warning-soft: rgba(245, 158, 11, 0.18);
52
- --iuk-info: #38bdf8;
53
- --iuk-info-soft: rgba(56, 189, 248, 0.18);
54
- --iuk-placeholder-bg: #1e293b;
55
- --iuk-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
56
- --iuk-shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
57
- }
58
- }
59
-
60
- [data-theme="dark"],
61
- [data-theme="dark"] .iuk-root,
62
- .dark,
63
- .dark .iuk-root {
64
- --iuk-bg: #0f172a;
65
- --iuk-surface: #1e293b;
66
- --iuk-surface-hover: #283548;
67
- --iuk-border: #334155;
68
- --iuk-border-strong: #475569;
69
- --iuk-text: #f8fafc;
70
- --iuk-text-muted: #94a3b8;
71
- --iuk-primary: #3b82f6;
72
- --iuk-primary-hover: #60a5fa;
73
- --iuk-primary-soft: rgba(59, 130, 246, 0.18);
74
- --iuk-danger: #ef4444;
75
- --iuk-danger-soft: rgba(239, 68, 68, 0.18);
76
- --iuk-success: #22c55e;
77
- --iuk-success-soft: rgba(34, 197, 94, 0.18);
78
- --iuk-warning: #f59e0b;
79
- --iuk-warning-soft: rgba(245, 158, 11, 0.18);
80
- --iuk-info: #38bdf8;
81
- --iuk-info-soft: rgba(56, 189, 248, 0.18);
82
- --iuk-placeholder-bg: #1e293b;
83
- --iuk-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
84
- --iuk-shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
85
- }
86
-
87
- .iuk-root, .iuk-single, .iuk-multi, .iuk-modal-backdrop, .iuk-progress-dock, .iuk-minimized-dock {
88
- box-sizing: border-box;
89
- font-family: var(--iuk-font);
90
- color: var(--iuk-text);
91
- }
92
-
93
- .iuk-root *, .iuk-root *::before, .iuk-root *::after, .iuk-modal-backdrop *, .iuk-progress-dock * {
94
- box-sizing: border-box;
95
- }
96
-
97
- .iuk-hidden-input { display: none !important; }
98
-
99
- @keyframes iuk-spin { to { transform: rotate(360deg); } }
100
-
101
- .iuk-spin { animation: iuk-spin 0.85s linear infinite; flex-shrink: 0; }
102
-
103
- .iuk-spinner {
104
- width: 30px;
105
- height: 30px;
106
- border-radius: 9999px;
107
- border: 2.5px solid var(--iuk-border);
108
- border-top-color: var(--iuk-primary);
109
- animation: iuk-spin 0.8s linear infinite;
110
- }
2
+ /* image-upload-kit — Layer 1: Design Tokens & Base Reset */
3
+
4
+ :root,
5
+ .iuk-root {
6
+ --iuk-bg: #ffffff;
7
+ --iuk-surface: #f8fafc;
8
+ --iuk-surface-hover: #f1f5f9;
9
+ --iuk-border: #e2e8f0;
10
+ --iuk-border-strong: #cbd5e1;
11
+ --iuk-text: #0f172a;
12
+ --iuk-text-muted: #64748b;
13
+ --iuk-primary: #2563eb;
14
+ --iuk-primary-hover: #1d4ed8;
15
+ --iuk-primary-soft: rgba(37, 99, 235, 0.1);
16
+ --iuk-danger: #dc2626;
17
+ --iuk-danger-soft: rgba(220, 38, 38, 0.1);
18
+ --iuk-success: #16a34a;
19
+ --iuk-success-soft: rgba(22, 163, 74, 0.1);
20
+ --iuk-warning: #d97706;
21
+ --iuk-warning-soft: rgba(217, 119, 6, 0.12);
22
+ --iuk-info: #0284c7;
23
+ --iuk-info-soft: rgba(2, 132, 199, 0.1);
24
+ --iuk-placeholder-bg: #f1f5f9;
25
+ --iuk-radius-sm: 6px;
26
+ --iuk-radius-md: 10px;
27
+ --iuk-radius-lg: 14px;
28
+ --iuk-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
29
+ --iuk-shadow-lg: 0 20px 40px -12px rgba(15, 23, 42, 0.22), 0 8px 16px -8px rgba(15, 23, 42, 0.12);
30
+ --iuk-font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
31
+ }
32
+
33
+ @media (prefers-color-scheme: dark) {
34
+ :root:not([data-theme="light"]):not(.light),
35
+ :root:not([data-theme="light"]):not(.light) .iuk-root {
36
+ --iuk-bg: #0f172a;
37
+ --iuk-surface: #1e293b;
38
+ --iuk-surface-hover: #283548;
39
+ --iuk-border: #334155;
40
+ --iuk-border-strong: #475569;
41
+ --iuk-text: #f8fafc;
42
+ --iuk-text-muted: #94a3b8;
43
+ --iuk-primary: #3b82f6;
44
+ --iuk-primary-hover: #60a5fa;
45
+ --iuk-primary-soft: rgba(59, 130, 246, 0.18);
46
+ --iuk-danger: #ef4444;
47
+ --iuk-danger-soft: rgba(239, 68, 68, 0.18);
48
+ --iuk-success: #22c55e;
49
+ --iuk-success-soft: rgba(34, 197, 94, 0.18);
50
+ --iuk-warning: #f59e0b;
51
+ --iuk-warning-soft: rgba(245, 158, 11, 0.18);
52
+ --iuk-info: #38bdf8;
53
+ --iuk-info-soft: rgba(56, 189, 248, 0.18);
54
+ --iuk-placeholder-bg: #1e293b;
55
+ --iuk-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
56
+ --iuk-shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
57
+ }
58
+ }
59
+
60
+ [data-theme="dark"],
61
+ [data-theme="dark"] .iuk-root,
62
+ .dark,
63
+ .dark .iuk-root {
64
+ --iuk-bg: #0f172a;
65
+ --iuk-surface: #1e293b;
66
+ --iuk-surface-hover: #283548;
67
+ --iuk-border: #334155;
68
+ --iuk-border-strong: #475569;
69
+ --iuk-text: #f8fafc;
70
+ --iuk-text-muted: #94a3b8;
71
+ --iuk-primary: #3b82f6;
72
+ --iuk-primary-hover: #60a5fa;
73
+ --iuk-primary-soft: rgba(59, 130, 246, 0.18);
74
+ --iuk-danger: #ef4444;
75
+ --iuk-danger-soft: rgba(239, 68, 68, 0.18);
76
+ --iuk-success: #22c55e;
77
+ --iuk-success-soft: rgba(34, 197, 94, 0.18);
78
+ --iuk-warning: #f59e0b;
79
+ --iuk-warning-soft: rgba(245, 158, 11, 0.18);
80
+ --iuk-info: #38bdf8;
81
+ --iuk-info-soft: rgba(56, 189, 248, 0.18);
82
+ --iuk-placeholder-bg: #1e293b;
83
+ --iuk-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
84
+ --iuk-shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
85
+ }
86
+
87
+ .iuk-root, .iuk-single, .iuk-multi, .iuk-modal-backdrop, .iuk-progress-dock, .iuk-minimized-dock {
88
+ box-sizing: border-box;
89
+ font-family: var(--iuk-font);
90
+ color: var(--iuk-text);
91
+ }
92
+
93
+ .iuk-root *, .iuk-root *::before, .iuk-root *::after, .iuk-modal-backdrop *, .iuk-progress-dock * {
94
+ box-sizing: border-box;
95
+ }
96
+
97
+ .iuk-hidden-input { display: none !important; }
98
+
99
+ @keyframes iuk-spin { to { transform: rotate(360deg); } }
100
+
101
+ .iuk-spin { animation: iuk-spin 0.85s linear infinite; flex-shrink: 0; }
102
+
103
+ .iuk-spinner {
104
+ width: 30px;
105
+ height: 30px;
106
+ border-radius: 9999px;
107
+ border: 2.5px solid var(--iuk-border);
108
+ border-top-color: var(--iuk-primary);
109
+ animation: iuk-spin 0.8s linear infinite;
110
+ }
111
+
112
+ @media (prefers-reduced-motion: reduce) {
113
+ .iuk-spin,
114
+ .iuk-spinner,
115
+ .iuk-root *,
116
+ .iuk-single *,
117
+ .iuk-multi *,
118
+ .iuk-modal-backdrop *,
119
+ .iuk-progress-dock * {
120
+ animation-duration: 0.01ms !important;
121
+ animation-iteration-count: 1 !important;
122
+ transition-duration: 0.01ms !important;
123
+ }
124
+ }
111
125
 
112
126
 
113
127
  /* image-upload-kit — Layer 2: UI Primitives */
@@ -994,114 +1008,115 @@
994
1008
  }
995
1009
 
996
1010
 
997
- /* ── AnimatedImage: blur-up crossfade image ─────────────────────────────── */
998
- .iuk-animated-image {
999
- position: relative;
1000
- width: 100%;
1001
- height: 100%;
1002
- overflow: hidden;
1003
- overflow: clip;
1004
- border-radius: inherit;
1005
- clip-path: inset(0 round inherit);
1006
- contain: paint;
1007
- }
1008
-
1009
- .iuk-animated-image--fill {
1010
- position: absolute;
1011
- inset: 0;
1012
- }
1013
-
1014
- .iuk-animated-image__placeholder {
1015
- position: absolute;
1016
- inset: -16px;
1017
- width: calc(100% + 32px);
1018
- height: calc(100% + 32px);
1019
- object-position: center;
1020
- /* Tiny placeholder stretched to full size must be blurred to avoid pixelation.
1021
- The layer unmounts after the crossfade, so the filter only runs while loading. */
1022
- filter: blur(var(--iuk-animated-image-blur, 20px));
1023
- transform: scale(1.06);
1024
- transform-origin: center;
1025
- z-index: 1;
1026
- opacity: 1;
1027
- transition-property: opacity;
1028
- transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
1029
- pointer-events: none;
1030
- }
1031
-
1032
- .iuk-animated-image__placeholder--hidden {
1033
- opacity: 0;
1034
- }
1035
-
1036
- .iuk-animated-image__img {
1037
- position: relative;
1038
- display: block;
1039
- z-index: 2;
1040
- width: 100%;
1041
- height: auto;
1042
- opacity: 0;
1043
- border-radius: inherit;
1044
- user-select: none;
1045
- -webkit-user-select: none;
1046
- -webkit-user-drag: none;
1047
- transition-property: opacity, transform;
1048
- transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1), cubic-bezier(0.4, 0, 0.2, 1);
1049
- }
1050
-
1051
- .iuk-animated-image__img[data-state='loaded'],
1052
- .iuk-animated-image__img[data-state='error'] {
1053
- opacity: 1;
1054
- }
1055
-
1056
- .iuk-animated-image--fill .iuk-animated-image__img {
1057
- position: absolute;
1058
- inset: 0;
1059
- height: 100%;
1060
- }
1061
-
1062
- /* Pixel-perfect containment: no overscan or scaling offset */
1063
- .iuk-animated-image--contain .iuk-animated-image__placeholder {
1064
- inset: 0;
1065
- width: 100%;
1066
- height: 100%;
1067
- transform: none;
1068
- }
1069
-
1070
- .iuk-animated-image--contain .iuk-animated-image__img {
1071
- transform: none;
1072
- }
1073
-
1074
- .iuk-animated-image__shimmer {
1075
- position: absolute;
1076
- inset: 0;
1077
- z-index: 3;
1078
- background: linear-gradient(
1079
- 90deg,
1080
- transparent 0%,
1081
- var(--iuk-animated-image-shimmer, rgba(255, 255, 255, 0.12)) 50%,
1082
- transparent 100%
1083
- );
1084
- animation: iuk-animated-image-shimmer 1.8s infinite;
1085
- pointer-events: none;
1086
- transition: opacity 0.35s ease-out;
1087
- }
1088
-
1089
- .iuk-animated-image__shimmer--hidden {
1090
- opacity: 0;
1091
- }
1092
-
1093
- @keyframes iuk-animated-image-shimmer {
1094
- from { transform: translateX(-100%); }
1095
- to { transform: translateX(100%); }
1096
- }
1097
-
1098
- @media (prefers-reduced-motion: reduce) {
1099
- .iuk-animated-image__img,
1100
- .iuk-animated-image__placeholder {
1101
- transition-duration: 0ms !important;
1102
- transition-delay: 0ms !important;
1103
- }
1104
- .iuk-animated-image__shimmer {
1105
- animation: none;
1106
- }
1107
- }
1011
+ /* ── AnimatedImage: blur-up crossfade image (Imagine-Global parity) ─────── */
1012
+ .iuk-animated-image {
1013
+ position: relative;
1014
+ width: 100%;
1015
+ height: 100%;
1016
+ overflow: hidden;
1017
+ overflow: clip;
1018
+ border-radius: inherit;
1019
+ clip-path: inset(0 round inherit);
1020
+ contain: paint;
1021
+ transition: background-color var(--iuk-animated-image-color-transition, 300ms ease);
1022
+ }
1023
+
1024
+ .iuk-animated-image--fill {
1025
+ position: absolute;
1026
+ inset: 0;
1027
+ }
1028
+
1029
+ .iuk-animated-image__placeholder {
1030
+ position: absolute;
1031
+ inset: 0;
1032
+ width: 100%;
1033
+ height: 100%;
1034
+ object-position: center;
1035
+ /* Tiny placeholder stretched to full size is blurred and scaled slightly so
1036
+ blurred edges stay clipped inside the overflow: hidden wrapper. */
1037
+ filter: blur(var(--iuk-animated-image-blur, 20px));
1038
+ transform: scale(var(--iuk-animated-image-placeholder-scale, 1.1));
1039
+ transform-origin: center;
1040
+ z-index: 1;
1041
+ opacity: 1;
1042
+ transition: opacity var(--iuk-ai-ph-dur, 500ms) ease-in-out;
1043
+ pointer-events: none;
1044
+ }
1045
+
1046
+ .iuk-animated-image__placeholder--hidden {
1047
+ opacity: 0;
1048
+ }
1049
+
1050
+ .iuk-animated-image__img {
1051
+ position: relative;
1052
+ display: block;
1053
+ z-index: 2;
1054
+ width: 100%;
1055
+ height: auto;
1056
+ opacity: 0;
1057
+ transform: scale(var(--iuk-animated-image-reveal-scale, 1.02));
1058
+ border-radius: inherit;
1059
+ user-select: none;
1060
+ -webkit-user-select: none;
1061
+ -webkit-user-drag: none;
1062
+ transition:
1063
+ opacity var(--iuk-animated-image-duration, 600ms) ease-in-out,
1064
+ transform var(--iuk-animated-image-duration, 600ms) ease-in-out;
1065
+ }
1066
+
1067
+ .iuk-animated-image__img[data-state='loaded'] {
1068
+ opacity: 1;
1069
+ transform: scale(1);
1070
+ }
1071
+
1072
+ .iuk-animated-image__img[data-state='error'] {
1073
+ opacity: 0;
1074
+ visibility: hidden;
1075
+ }
1076
+
1077
+ .iuk-animated-image--fill .iuk-animated-image__img {
1078
+ position: absolute;
1079
+ inset: 0;
1080
+ height: 100%;
1081
+ }
1082
+
1083
+ /* In contain mode, the generated blur placeholder stays visible with object-fit: cover
1084
+ and scale(1.1) behind the contained image so letterbox/pillarbox bars show the blur. */
1085
+ .iuk-animated-image--contain .iuk-animated-image__img {
1086
+ transform: none;
1087
+ }
1088
+
1089
+ .iuk-animated-image__shimmer {
1090
+ position: absolute;
1091
+ inset: 0;
1092
+ z-index: 3;
1093
+ background: linear-gradient(
1094
+ 90deg,
1095
+ transparent 0%,
1096
+ var(--iuk-animated-image-shimmer, rgba(255, 255, 255, 0.1)) 50%,
1097
+ transparent 100%
1098
+ );
1099
+ animation: iuk-animated-image-shimmer 2s infinite;
1100
+ pointer-events: none;
1101
+ }
1102
+
1103
+ .iuk-animated-image__shimmer--hidden {
1104
+ opacity: 0;
1105
+ }
1106
+
1107
+ @keyframes iuk-animated-image-shimmer {
1108
+ from { transform: translateX(-100%); }
1109
+ to { transform: translateX(100%); }
1110
+ }
1111
+
1112
+ @media (prefers-reduced-motion: reduce) {
1113
+ .iuk-animated-image__img,
1114
+ .iuk-animated-image__placeholder {
1115
+ transform: none !important;
1116
+ transition-duration: 0ms !important;
1117
+ transition-delay: 0ms !important;
1118
+ }
1119
+ .iuk-animated-image__shimmer {
1120
+ animation: none;
1121
+ }
1122
+ }
@@ -0,0 +1,85 @@
1
+ import { I as ImageUploadRecord } from './upload-C5Trd6Dh.cjs';
2
+
3
+ interface StorageUploadParams {
4
+ bucket: string;
5
+ path: string;
6
+ data: Buffer | Uint8Array;
7
+ contentType: string;
8
+ upsert?: boolean;
9
+ cacheControl?: string;
10
+ contentHash?: string;
11
+ metadata?: Record<string, string>;
12
+ }
13
+ interface StorageUploadResult {
14
+ bucket: string;
15
+ path: string;
16
+ url: string;
17
+ }
18
+ interface StorageFileEntry {
19
+ name: string;
20
+ id?: string;
21
+ createdAt?: string;
22
+ size?: number;
23
+ }
24
+ interface StorageListOptions {
25
+ cursor?: string;
26
+ limit?: number;
27
+ }
28
+ type StoragePaginatedListResult = StorageFileEntry[] & {
29
+ items: StorageFileEntry[];
30
+ nextCursor?: string;
31
+ };
32
+ type StorageUploadOptions = StorageUploadParams;
33
+ type StorageFileMetadata = StorageFileEntry;
34
+ type StorageListResult = StoragePaginatedListResult;
35
+ interface StorageAdapter {
36
+ /**
37
+ * Upload optimized image bytes to your storage backend and return its public URL.
38
+ */
39
+ upload(params: StorageUploadParams): Promise<StorageUploadResult>;
40
+ /**
41
+ * Delete an image from your storage backend by bucket and relative path.
42
+ */
43
+ delete(bucket: string, path: string): Promise<void>;
44
+ /**
45
+ * Optional: Check whether an object exists at the given bucket and relative path.
46
+ */
47
+ exists?(bucket: string, path: string): Promise<boolean>;
48
+ /**
49
+ * Optional: Resolve a public URL for a bucket and path.
50
+ */
51
+ getPublicUrl?(bucket: string, path: string): string | Promise<string>;
52
+ /**
53
+ * Optional: List files inside a bucket/folder (supports optional cursor/limit pagination).
54
+ */
55
+ list?(bucket: string, folder?: string, options?: StorageListOptions): Promise<StoragePaginatedListResult>;
56
+ /**
57
+ * Optional: Delete an asset directly from its public URL.
58
+ */
59
+ deleteByUrl?(url: string): Promise<boolean>;
60
+ /**
61
+ * Optional: Parse a public storage URL into its bucket and relative path.
62
+ */
63
+ parseUrl?(url: string): {
64
+ bucket?: string;
65
+ path: string;
66
+ } | null;
67
+ }
68
+ type UploadRecordHook = (record: ImageUploadRecord) => void | Promise<void>;
69
+ /**
70
+ * Attaches non-enumerable `.items` and `.nextCursor` properties to a `StorageFileEntry[]`
71
+ * array so both array callers (`entries.map(...)`) and paginated destructuring callers
72
+ * (`const { items, nextCursor } = await adapter.list(...)`) work seamlessly.
73
+ */
74
+ declare function toPaginatedListResult(entries: StorageFileEntry[], nextCursor?: string): StoragePaginatedListResult;
75
+ /**
76
+ * Validates that storage metadata keys and values contain only printable ASCII
77
+ * characters (preventing HTTP header/CRLF injection) and do not exceed 2 KB total.
78
+ */
79
+ declare function validateStorageMetadata(metadata?: Record<string, string>): void;
80
+ /**
81
+ * Type-safe helper for authoring a custom StorageAdapter (S3, R2, Vercel Blob, Firebase, etc.).
82
+ */
83
+ declare function createStorageAdapter(adapter: StorageAdapter): StorageAdapter;
84
+
85
+ export { type StorageAdapter as S, type UploadRecordHook as U, type StorageListOptions as a, type StoragePaginatedListResult as b, type StorageFileEntry as c, type StorageFileMetadata as d, type StorageListResult as e, type StorageUploadOptions as f, type StorageUploadParams as g, type StorageUploadResult as h, createStorageAdapter as i, toPaginatedListResult as t, validateStorageMetadata as v };