img-upload-kit 0.0.0-stage → 2.0.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 (112) hide show
  1. package/CHANGELOG.md +89 -0
  2. package/LICENSE +21 -0
  3. package/MIGRATION.md +192 -0
  4. package/README.md +242 -2
  5. package/dist/bin.js +1186 -0
  6. package/dist/bin.js.map +1 -0
  7. package/dist/blur.cjs +41 -0
  8. package/dist/blur.cjs.map +1 -0
  9. package/dist/blur.d.cts +17 -0
  10. package/dist/blur.d.ts +17 -0
  11. package/dist/blur.js +41 -0
  12. package/dist/blur.js.map +1 -0
  13. package/dist/blurDataUtils-DveBRtqE.d.cts +43 -0
  14. package/dist/blurDataUtils-yx9Q6HlU.d.ts +43 -0
  15. package/dist/blurService-D5TpMNji.d.ts +83 -0
  16. package/dist/blurService-DacwylJx.d.cts +83 -0
  17. package/dist/chunk-2OVNXHTN.cjs +514 -0
  18. package/dist/chunk-2OVNXHTN.cjs.map +1 -0
  19. package/dist/chunk-3ICG2SLL.cjs +135 -0
  20. package/dist/chunk-3ICG2SLL.cjs.map +1 -0
  21. package/dist/chunk-4ASFG3KB.js +514 -0
  22. package/dist/chunk-4ASFG3KB.js.map +1 -0
  23. package/dist/chunk-AI3JJLSA.js +2370 -0
  24. package/dist/chunk-AI3JJLSA.js.map +1 -0
  25. package/dist/chunk-CV23O4YU.js +145 -0
  26. package/dist/chunk-CV23O4YU.js.map +1 -0
  27. package/dist/chunk-G7LLSKBV.js +158 -0
  28. package/dist/chunk-G7LLSKBV.js.map +1 -0
  29. package/dist/chunk-IB3TEDLR.js +294 -0
  30. package/dist/chunk-IB3TEDLR.js.map +1 -0
  31. package/dist/chunk-KJVYWKIG.cjs +158 -0
  32. package/dist/chunk-KJVYWKIG.cjs.map +1 -0
  33. package/dist/chunk-NEDBIIE3.cjs +226 -0
  34. package/dist/chunk-NEDBIIE3.cjs.map +1 -0
  35. package/dist/chunk-QHU7FUO4.cjs +37 -0
  36. package/dist/chunk-QHU7FUO4.cjs.map +1 -0
  37. package/dist/chunk-QQHZJKNA.js +135 -0
  38. package/dist/chunk-QQHZJKNA.js.map +1 -0
  39. package/dist/chunk-S2IFAWJK.js +37 -0
  40. package/dist/chunk-S2IFAWJK.js.map +1 -0
  41. package/dist/chunk-TT5C7K3Q.js +226 -0
  42. package/dist/chunk-TT5C7K3Q.js.map +1 -0
  43. package/dist/chunk-U2TWTEBY.cjs +2370 -0
  44. package/dist/chunk-U2TWTEBY.cjs.map +1 -0
  45. package/dist/chunk-WISG74VL.cjs +294 -0
  46. package/dist/chunk-WISG74VL.cjs.map +1 -0
  47. package/dist/chunk-YRXXQUDE.cjs +145 -0
  48. package/dist/chunk-YRXXQUDE.cjs.map +1 -0
  49. package/dist/cli.cjs +1241 -0
  50. package/dist/cli.cjs.map +1 -0
  51. package/dist/cli.d.cts +99 -0
  52. package/dist/cli.d.ts +99 -0
  53. package/dist/cli.js +1194 -0
  54. package/dist/cli.js.map +1 -0
  55. package/dist/headless.cjs +27 -0
  56. package/dist/headless.cjs.map +1 -0
  57. package/dist/headless.d.cts +4 -0
  58. package/dist/headless.d.ts +4 -0
  59. package/dist/headless.js +27 -0
  60. package/dist/headless.js.map +1 -0
  61. package/dist/index-BIdnqtW8.d.ts +234 -0
  62. package/dist/index-Brk_uHs6.d.cts +234 -0
  63. package/dist/index-CPMlaQsC.d.ts +635 -0
  64. package/dist/index-DHINe-rA.d.cts +635 -0
  65. package/dist/index.cjs +65 -0
  66. package/dist/index.cjs.map +1 -0
  67. package/dist/index.d.cts +43 -0
  68. package/dist/index.d.ts +43 -0
  69. package/dist/index.js +65 -0
  70. package/dist/index.js.map +1 -0
  71. package/dist/memoryAdapter-Ck0ccZbF.d.cts +25 -0
  72. package/dist/memoryAdapter-DxEKaG0b.d.ts +25 -0
  73. package/dist/placeholders-C4ftwaII.d.ts +5 -0
  74. package/dist/placeholders-x_3rt65M.d.cts +5 -0
  75. package/dist/react.cjs +3779 -0
  76. package/dist/react.cjs.map +1 -0
  77. package/dist/react.d.cts +476 -0
  78. package/dist/react.d.ts +476 -0
  79. package/dist/react.js +3779 -0
  80. package/dist/react.js.map +1 -0
  81. package/dist/server-handler.cjs +14 -0
  82. package/dist/server-handler.cjs.map +1 -0
  83. package/dist/server-handler.d.cts +3 -0
  84. package/dist/server-handler.d.ts +3 -0
  85. package/dist/server-handler.js +14 -0
  86. package/dist/server-handler.js.map +1 -0
  87. package/dist/server.cjs +1801 -0
  88. package/dist/server.cjs.map +1 -0
  89. package/dist/server.d.cts +142 -0
  90. package/dist/server.d.ts +142 -0
  91. package/dist/server.js +1801 -0
  92. package/dist/server.js.map +1 -0
  93. package/dist/storage.cjs +447 -0
  94. package/dist/storage.cjs.map +1 -0
  95. package/dist/storage.d.cts +163 -0
  96. package/dist/storage.d.ts +163 -0
  97. package/dist/storage.js +447 -0
  98. package/dist/storage.js.map +1 -0
  99. package/dist/styles/animated-image.css +112 -0
  100. package/dist/styles/dropzone-and-tiles.css +247 -0
  101. package/dist/styles/modals-and-dock.css +248 -0
  102. package/dist/styles/primitives.css +197 -0
  103. package/dist/styles/quality-and-inputs.css +184 -0
  104. package/dist/styles/tokens.css +123 -0
  105. package/dist/styles.css +1122 -0
  106. package/dist/types-BrP-o9nd.d.cts +85 -0
  107. package/dist/types-sZ3KoFQY.d.ts +85 -0
  108. package/dist/types-yShGNQnW.d.cts +61 -0
  109. package/dist/types-yShGNQnW.d.ts +61 -0
  110. package/dist/upload-C5Trd6Dh.d.cts +154 -0
  111. package/dist/upload-C5Trd6Dh.d.ts +154 -0
  112. package/package.json +198 -4
@@ -0,0 +1,184 @@
1
+ /* image-upload-kit — Layer 3: BlurImage, QualitySelector & AltTextInput */
2
+
3
+ /* BlurImage */
4
+ .iuk-blur-image-wrap {
5
+ position: relative;
6
+ display: block;
7
+ width: 100%;
8
+ height: 100%;
9
+ overflow: hidden;
10
+ }
11
+
12
+ .iuk-blur-image-backdrop {
13
+ position: absolute;
14
+ inset: 0;
15
+ z-index: 1;
16
+ background-position: center;
17
+ background-repeat: no-repeat;
18
+ filter: blur(14px);
19
+ transform: scale(1.08);
20
+ opacity: 1;
21
+ pointer-events: none;
22
+ transition: opacity 0.32s ease-out;
23
+ }
24
+
25
+ .iuk-blur-image-backdrop--hidden { opacity: 0; }
26
+ .iuk-blur-image-el { position: relative; z-index: 2; display: block; width: 100%; height: 100%; }
27
+
28
+ /* QualitySelector */
29
+ .iuk-quality {
30
+ display: flex;
31
+ flex-direction: column;
32
+ gap: 8px;
33
+ padding: 12px;
34
+ border-radius: var(--iuk-radius-md);
35
+ border: 1px solid var(--iuk-border);
36
+ background: var(--iuk-surface);
37
+ font-family: var(--iuk-font);
38
+ }
39
+
40
+ .iuk-quality__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
41
+ .iuk-quality__title { font-size: 0.8125rem; font-weight: 600; color: var(--iuk-text); }
42
+
43
+ .iuk-quality__pill {
44
+ display: inline-flex;
45
+ align-items: center;
46
+ padding: 2px 8px;
47
+ border-radius: 9999px;
48
+ font-size: 0.75rem;
49
+ font-weight: 600;
50
+ line-height: 1.35;
51
+ }
52
+
53
+ .iuk-quality__pill--low { background: var(--iuk-warning-soft); color: var(--iuk-warning); }
54
+ .iuk-quality__pill--medium { background: var(--iuk-info-soft); color: var(--iuk-info); }
55
+ .iuk-quality__pill--high { background: var(--iuk-success-soft); color: var(--iuk-success); }
56
+ .iuk-quality__pill--maximum { background: var(--iuk-primary-soft); color: var(--iuk-primary); }
57
+
58
+ .iuk-quality__tabs {
59
+ display: grid;
60
+ grid-template-columns: repeat(4, minmax(0, 1fr));
61
+ gap: 4px;
62
+ padding: 3px;
63
+ border-radius: var(--iuk-radius-sm);
64
+ border: 1px solid var(--iuk-border);
65
+ background: var(--iuk-bg);
66
+ }
67
+
68
+ @media (max-width: 420px) {
69
+ .iuk-quality__tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
70
+ }
71
+
72
+ .iuk-quality__tab {
73
+ display: inline-flex;
74
+ align-items: center;
75
+ justify-content: center;
76
+ gap: 4px;
77
+ padding: 6px 8px;
78
+ border-radius: calc(var(--iuk-radius-sm) - 2px);
79
+ border: 1px solid transparent;
80
+ background: transparent;
81
+ color: var(--iuk-text-muted);
82
+ font-family: inherit;
83
+ font-size: 0.75rem;
84
+ font-weight: 500;
85
+ cursor: pointer;
86
+ transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
87
+ }
88
+
89
+ .iuk-quality__tab:hover:not(:disabled):not(.iuk-quality__tab--selected) {
90
+ background: var(--iuk-surface-hover);
91
+ color: var(--iuk-text);
92
+ }
93
+
94
+ .iuk-quality__tab:focus-visible { outline: 2px solid var(--iuk-primary); outline-offset: 1px; }
95
+
96
+ .iuk-quality__tab--selected {
97
+ background: var(--iuk-primary);
98
+ color: #ffffff;
99
+ font-weight: 600;
100
+ box-shadow: var(--iuk-shadow-sm);
101
+ }
102
+
103
+ .iuk-quality__tab--recommended {
104
+ border-color: color-mix(in srgb, var(--iuk-primary) 35%, transparent);
105
+ color: var(--iuk-text);
106
+ }
107
+
108
+ .iuk-quality__tab--disabled { opacity: 0.55; cursor: not-allowed; }
109
+ .iuk-quality__star { color: var(--iuk-warning); font-size: 0.6875rem; line-height: 1; }
110
+
111
+ .iuk-quality__detail {
112
+ display: flex;
113
+ flex-direction: column;
114
+ gap: 6px;
115
+ padding: 8px 10px;
116
+ border-radius: var(--iuk-radius-sm);
117
+ border: 1px solid var(--iuk-border);
118
+ border-inline-start-width: 3px;
119
+ background: var(--iuk-bg);
120
+ }
121
+
122
+ .iuk-quality__detail--low { border-inline-start-color: var(--iuk-warning); }
123
+ .iuk-quality__detail--medium { border-inline-start-color: var(--iuk-info); }
124
+ .iuk-quality__detail--high { border-inline-start-color: var(--iuk-success); }
125
+ .iuk-quality__detail--maximum { border-inline-start-color: var(--iuk-primary); }
126
+
127
+ .iuk-quality__desc { margin: 0; font-size: 0.75rem; line-height: 1.45; color: var(--iuk-text-muted); }
128
+
129
+ .iuk-quality__meta {
130
+ display: flex;
131
+ align-items: center;
132
+ flex-wrap: wrap;
133
+ gap: 6px;
134
+ font-size: 0.75rem;
135
+ color: var(--iuk-text-muted);
136
+ }
137
+
138
+ .iuk-quality__tag {
139
+ padding: 1px 6px;
140
+ border-radius: 4px;
141
+ border: 1px solid var(--iuk-border);
142
+ background: var(--iuk-surface);
143
+ font-size: 0.6875rem;
144
+ font-weight: 600;
145
+ color: var(--iuk-text);
146
+ }
147
+
148
+ .iuk-quality__dot { width: 3px; height: 3px; border-radius: 9999px; background: var(--iuk-border-strong); }
149
+ .iuk-quality__saving { font-weight: 600; color: var(--iuk-success); }
150
+ .iuk-quality__rec-badge { margin-inline-start: auto; font-size: 0.6875rem; font-weight: 600; color: var(--iuk-primary); }
151
+
152
+ .iuk-quality__note {
153
+ display: flex;
154
+ align-items: flex-start;
155
+ gap: 6px;
156
+ font-size: 0.75rem;
157
+ line-height: 1.4;
158
+ color: var(--iuk-text-muted);
159
+ }
160
+
161
+ .iuk-quality__note-icon { flex-shrink: 0; margin-top: 2px; color: var(--iuk-info); }
162
+
163
+ /* AltTextInput */
164
+ .iuk-alt-input { display: flex; flex-direction: column; gap: 6px; width: 100%; font-family: var(--iuk-font); }
165
+ .iuk-alt-input__header { display: flex; align-items: center; gap: 6px; color: var(--iuk-text); }
166
+ .iuk-alt-input__label { font-size: 0.8125rem; font-weight: 600; color: var(--iuk-text); cursor: pointer; }
167
+
168
+ .iuk-alt-input__field {
169
+ width: 100%;
170
+ padding: 9px 12px;
171
+ border-radius: var(--iuk-radius-sm);
172
+ border: 1px solid var(--iuk-border);
173
+ background: var(--iuk-bg);
174
+ color: var(--iuk-text);
175
+ font-family: inherit;
176
+ font-size: 0.875rem;
177
+ line-height: 1.4;
178
+ transition: border-color 0.15s ease, box-shadow 0.15s ease;
179
+ }
180
+
181
+ .iuk-alt-input__field::placeholder { color: var(--iuk-text-muted); opacity: 0.75; }
182
+ .iuk-alt-input__field:focus { outline: none; border-color: var(--iuk-primary); box-shadow: 0 0 0 3px var(--iuk-primary-soft); }
183
+ .iuk-alt-input__field:disabled { opacity: 0.6; cursor: not-allowed; background: var(--iuk-surface); }
184
+ .iuk-alt-input__hint { margin: 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 0.75rem; color: var(--iuk-text-muted); }
@@ -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
+ }