@netlify/spark-ui 1.25.0 → 1.26.0-alpha.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 (32) hide show
  1. package/dist/assets/DropZone.css +1 -0
  2. package/dist/chunks/{AskNetlify.jaxhKBOK.js → AskNetlify.B3RnU2w-.js} +124 -126
  3. package/dist/chunks/_commonjsHelpers.DaMA6jEr.js +8 -0
  4. package/dist/chunks/jszip.min.DGG1sjYa.js +2327 -0
  5. package/dist/components/index.d.ts +3 -0
  6. package/dist/components/preact/AskNetlify/AskNetlify.js +1 -1
  7. package/dist/components/preact/DropZone/DropZone.d.ts +19 -0
  8. package/dist/components/preact/DropZone/DropZone.js +207 -0
  9. package/dist/components/preact/DropZone/drop-core/client.d.ts +19 -0
  10. package/dist/components/preact/DropZone/drop-core/client.js +41 -0
  11. package/dist/components/preact/DropZone/drop-core/deploy.d.ts +6 -0
  12. package/dist/components/preact/DropZone/drop-core/deploy.js +30 -0
  13. package/dist/components/preact/DropZone/drop-core/digest.d.ts +3 -0
  14. package/dist/components/preact/DropZone/drop-core/digest.js +12 -0
  15. package/dist/components/preact/DropZone/drop-core/index.d.ts +5 -0
  16. package/dist/components/preact/DropZone/drop-core/index.js +16 -0
  17. package/dist/components/preact/DropZone/drop-core/readFiles.d.ts +15 -0
  18. package/dist/components/preact/DropZone/drop-core/readFiles.js +615 -0
  19. package/dist/components/preact/DropZone/drop-core/types.d.ts +30 -0
  20. package/dist/components/preact/DropZone/drop-core/types.js +1 -0
  21. package/dist/components/preact/SearchModal/components/SearchModal/SearchModal.js +1 -1
  22. package/dist/components/preact/index.js +1 -1
  23. package/package.json +4 -2
  24. package/packages/components/index.ts +16 -0
  25. package/packages/components/preact/DropZone/DropZone.css +340 -0
  26. package/packages/components/preact/DropZone/DropZone.tsx +295 -0
  27. package/packages/components/preact/DropZone/drop-core/client.ts +61 -0
  28. package/packages/components/preact/DropZone/drop-core/deploy.ts +55 -0
  29. package/packages/components/preact/DropZone/drop-core/digest.ts +11 -0
  30. package/packages/components/preact/DropZone/drop-core/index.ts +5 -0
  31. package/packages/components/preact/DropZone/drop-core/readFiles.ts +133 -0
  32. package/packages/components/preact/DropZone/drop-core/types.ts +35 -0
@@ -0,0 +1,615 @@
1
+ import { g as U } from "../../../../chunks/_commonjsHelpers.DaMA6jEr.js";
2
+ var L = { exports: {} }, W = L.exports, E;
3
+ function F() {
4
+ return E || (E = 1, function(x, S) {
5
+ (function(_, h) {
6
+ x.exports = h();
7
+ })(typeof self < "u" ? self : W, function() {
8
+ return (
9
+ /******/
10
+ function(y) {
11
+ var _ = {};
12
+ function h(d) {
13
+ if (_[d])
14
+ return _[d].exports;
15
+ var f = _[d] = {
16
+ /******/
17
+ i: d,
18
+ /******/
19
+ l: !1,
20
+ /******/
21
+ exports: {}
22
+ /******/
23
+ };
24
+ return y[d].call(f.exports, f, f.exports, h), f.l = !0, f.exports;
25
+ }
26
+ return h.m = y, h.c = _, h.d = function(d, f, g) {
27
+ h.o(d, f) || Object.defineProperty(d, f, {
28
+ /******/
29
+ configurable: !1,
30
+ /******/
31
+ enumerable: !0,
32
+ /******/
33
+ get: g
34
+ /******/
35
+ });
36
+ }, h.n = function(d) {
37
+ var f = d && d.__esModule ? (
38
+ /******/
39
+ function() {
40
+ return d.default;
41
+ }
42
+ ) : (
43
+ /******/
44
+ function() {
45
+ return d;
46
+ }
47
+ );
48
+ return h.d(f, "a", f), f;
49
+ }, h.o = function(d, f) {
50
+ return Object.prototype.hasOwnProperty.call(d, f);
51
+ }, h.p = "", h(h.s = 3);
52
+ }([
53
+ /* 0 */
54
+ /***/
55
+ function(y, _, h) {
56
+ function d(e, o) {
57
+ if (!(e instanceof o))
58
+ throw new TypeError("Cannot call a class as a function");
59
+ }
60
+ var f = h(5), g = h(1), u = g.toHex, c = g.ceilHeapSize, l = h(6), v = function(e) {
61
+ for (e += 9; e % 64 > 0; e += 1)
62
+ ;
63
+ return e;
64
+ }, a = function(e, o) {
65
+ var n = new Uint8Array(e.buffer), p = o % 4, i = o - p;
66
+ switch (p) {
67
+ case 0:
68
+ n[i + 3] = 0;
69
+ case 1:
70
+ n[i + 2] = 0;
71
+ case 2:
72
+ n[i + 1] = 0;
73
+ case 3:
74
+ n[i + 0] = 0;
75
+ }
76
+ for (var w = (o >> 2) + 1; w < e.length; w++)
77
+ e[w] = 0;
78
+ }, r = function(e, o, n) {
79
+ e[o >> 2] |= 128 << 24 - (o % 4 << 3), e[((o >> 2) + 2 & -16) + 14] = n / (1 << 29) | 0, e[((o >> 2) + 2 & -16) + 15] = n << 3;
80
+ }, t = function(e, o) {
81
+ var n = new Int32Array(e, o + 320, 5), p = new Int32Array(5), i = new DataView(p.buffer);
82
+ return i.setInt32(0, n[0], !1), i.setInt32(4, n[1], !1), i.setInt32(8, n[2], !1), i.setInt32(12, n[3], !1), i.setInt32(16, n[4], !1), p;
83
+ }, s = function() {
84
+ function e(o) {
85
+ if (d(this, e), o = o || 64 * 1024, o % 64 > 0)
86
+ throw new Error("Chunk size must be a multiple of 128 bit");
87
+ this._offset = 0, this._maxChunkLen = o, this._padMaxChunkLen = v(o), this._heap = new ArrayBuffer(c(this._padMaxChunkLen + 320 + 20)), this._h32 = new Int32Array(this._heap), this._h8 = new Int8Array(this._heap), this._core = new f({ Int32Array }, {}, this._heap);
88
+ }
89
+ return e.prototype._initState = function(n, p) {
90
+ this._offset = 0;
91
+ var i = new Int32Array(n, p + 320, 5);
92
+ i[0] = 1732584193, i[1] = -271733879, i[2] = -1732584194, i[3] = 271733878, i[4] = -1009589776;
93
+ }, e.prototype._padChunk = function(n, p) {
94
+ var i = v(n), w = new Int32Array(this._heap, 0, i >> 2);
95
+ return a(w, n), r(w, n, p), i;
96
+ }, e.prototype._write = function(n, p, i, w) {
97
+ l(n, this._h8, this._h32, p, i, w || 0);
98
+ }, e.prototype._coreCall = function(n, p, i, w, m) {
99
+ var C = i;
100
+ this._write(n, p, i), m && (C = this._padChunk(i, w)), this._core.hash(C, this._padMaxChunkLen);
101
+ }, e.prototype.rawDigest = function(n) {
102
+ var p = n.byteLength || n.length || n.size || 0;
103
+ this._initState(this._heap, this._padMaxChunkLen);
104
+ var i = 0, w = this._maxChunkLen;
105
+ for (i = 0; p > i + w; i += w)
106
+ this._coreCall(n, i, w, p, !1);
107
+ return this._coreCall(n, i, p - i, p, !0), t(this._heap, this._padMaxChunkLen);
108
+ }, e.prototype.digest = function(n) {
109
+ return u(this.rawDigest(n).buffer);
110
+ }, e.prototype.digestFromString = function(n) {
111
+ return this.digest(n);
112
+ }, e.prototype.digestFromBuffer = function(n) {
113
+ return this.digest(n);
114
+ }, e.prototype.digestFromArrayBuffer = function(n) {
115
+ return this.digest(n);
116
+ }, e.prototype.resetState = function() {
117
+ return this._initState(this._heap, this._padMaxChunkLen), this;
118
+ }, e.prototype.append = function(n) {
119
+ var p = 0, i = n.byteLength || n.length || n.size || 0, w = this._offset % this._maxChunkLen, m = void 0;
120
+ for (this._offset += i; p < i; )
121
+ m = Math.min(i - p, this._maxChunkLen - w), this._write(n, p, m, w), w += m, p += m, w === this._maxChunkLen && (this._core.hash(this._maxChunkLen, this._padMaxChunkLen), w = 0);
122
+ return this;
123
+ }, e.prototype.getState = function() {
124
+ var n = this._offset % this._maxChunkLen, p = void 0;
125
+ if (n)
126
+ p = this._heap.slice(0);
127
+ else {
128
+ var i = new Int32Array(this._heap, this._padMaxChunkLen + 320, 5);
129
+ p = i.buffer.slice(i.byteOffset, i.byteOffset + i.byteLength);
130
+ }
131
+ return {
132
+ offset: this._offset,
133
+ heap: p
134
+ };
135
+ }, e.prototype.setState = function(n) {
136
+ if (this._offset = n.offset, n.heap.byteLength === 20) {
137
+ var p = new Int32Array(this._heap, this._padMaxChunkLen + 320, 5);
138
+ p.set(new Int32Array(n.heap));
139
+ } else
140
+ this._h32.set(new Int32Array(n.heap));
141
+ return this;
142
+ }, e.prototype.rawEnd = function() {
143
+ var n = this._offset, p = n % this._maxChunkLen, i = this._padChunk(p, n);
144
+ this._core.hash(i, this._padMaxChunkLen);
145
+ var w = t(this._heap, this._padMaxChunkLen);
146
+ return this._initState(this._heap, this._padMaxChunkLen), w;
147
+ }, e.prototype.end = function() {
148
+ return u(this.rawEnd().buffer);
149
+ }, e;
150
+ }();
151
+ y.exports = s, y.exports._core = f;
152
+ },
153
+ /* 1 */
154
+ /***/
155
+ function(y, _) {
156
+ for (var h = new Array(256), d = 0; d < 256; d++)
157
+ h[d] = (d < 16 ? "0" : "") + d.toString(16);
158
+ y.exports.toHex = function(f) {
159
+ for (var g = new Uint8Array(f), u = new Array(f.byteLength), c = 0; c < u.length; c++)
160
+ u[c] = h[g[c]];
161
+ return u.join("");
162
+ }, y.exports.ceilHeapSize = function(f) {
163
+ var g = 0;
164
+ if (f <= 65536) return 65536;
165
+ if (f < 16777216)
166
+ for (g = 1; g < f; g = g << 1)
167
+ ;
168
+ else
169
+ for (g = 16777216; g < f; g += 16777216)
170
+ ;
171
+ return g;
172
+ }, y.exports.isDedicatedWorkerScope = function(f) {
173
+ var g = "WorkerGlobalScope" in f && f instanceof f.WorkerGlobalScope, u = "SharedWorkerGlobalScope" in f && f instanceof f.SharedWorkerGlobalScope, c = "ServiceWorkerGlobalScope" in f && f instanceof f.ServiceWorkerGlobalScope;
174
+ return g && !u && !c;
175
+ };
176
+ },
177
+ /* 2 */
178
+ /***/
179
+ function(y, _, h) {
180
+ y.exports = function() {
181
+ var d = h(0), f = function(c, l, v) {
182
+ try {
183
+ return v(null, c.digest(l));
184
+ } catch (a) {
185
+ return v(a);
186
+ }
187
+ }, g = function(c, l, v, a, r) {
188
+ var t = new self.FileReader();
189
+ t.onloadend = function() {
190
+ if (t.error)
191
+ return r(t.error);
192
+ var e = t.result;
193
+ l += t.result.byteLength;
194
+ try {
195
+ c.append(e);
196
+ } catch (o) {
197
+ r(o);
198
+ return;
199
+ }
200
+ l < a.size ? g(c, l, v, a, r) : r(null, c.end());
201
+ }, t.readAsArrayBuffer(a.slice(l, l + v));
202
+ }, u = !0;
203
+ return self.onmessage = function(c) {
204
+ if (u) {
205
+ var l = c.data.data, v = c.data.file, a = c.data.id;
206
+ if (!(typeof a > "u") && !(!v && !l)) {
207
+ var r = c.data.blockSize || 4 * 1024 * 1024, t = new d(r);
208
+ t.resetState();
209
+ var s = function(e, o) {
210
+ e ? self.postMessage({ id: a, error: e.name }) : self.postMessage({ id: a, hash: o });
211
+ };
212
+ l && f(t, l, s), v && g(t, 0, r, v, s);
213
+ }
214
+ }
215
+ }, function() {
216
+ u = !1;
217
+ };
218
+ };
219
+ },
220
+ /* 3 */
221
+ /***/
222
+ function(y, _, h) {
223
+ var d = h(4), f = h(0), g = h(7), u = h(2), c = h(1), l = c.isDedicatedWorkerScope, v = typeof self < "u" && l(self);
224
+ f.disableWorkerBehaviour = v ? u() : function() {
225
+ }, f.createWorker = function() {
226
+ var a = d(
227
+ /*require.resolve*/
228
+ 2
229
+ ), r = a.terminate;
230
+ return a.terminate = function() {
231
+ URL.revokeObjectURL(a.objectURL), r.call(a);
232
+ }, a;
233
+ }, f.createHash = g, y.exports = f;
234
+ },
235
+ /* 4 */
236
+ /***/
237
+ function(y, _, h) {
238
+ function d(a) {
239
+ var r = {};
240
+ function t(e) {
241
+ if (r[e])
242
+ return r[e].exports;
243
+ var o = r[e] = {
244
+ /******/
245
+ i: e,
246
+ /******/
247
+ l: !1,
248
+ /******/
249
+ exports: {}
250
+ /******/
251
+ };
252
+ return a[e].call(o.exports, o, o.exports, t), o.l = !0, o.exports;
253
+ }
254
+ t.m = a, t.c = r, t.i = function(e) {
255
+ return e;
256
+ }, t.d = function(e, o, n) {
257
+ t.o(e, o) || Object.defineProperty(e, o, {
258
+ /******/
259
+ configurable: !1,
260
+ /******/
261
+ enumerable: !0,
262
+ /******/
263
+ get: n
264
+ /******/
265
+ });
266
+ }, t.r = function(e) {
267
+ Object.defineProperty(e, "__esModule", { value: !0 });
268
+ }, t.n = function(e) {
269
+ var o = e && e.__esModule ? (
270
+ /******/
271
+ function() {
272
+ return e.default;
273
+ }
274
+ ) : (
275
+ /******/
276
+ function() {
277
+ return e;
278
+ }
279
+ );
280
+ return t.d(o, "a", o), o;
281
+ }, t.o = function(e, o) {
282
+ return Object.prototype.hasOwnProperty.call(e, o);
283
+ }, t.p = "/", t.oe = function(e) {
284
+ throw console.error(e), e;
285
+ };
286
+ var s = t(t.s = ENTRY_MODULE);
287
+ return s.default || s;
288
+ }
289
+ var f = "[\\.|\\-|\\+|\\w|/|@]+", g = "\\((/\\*.*?\\*/)?s?.*?(" + f + ").*?\\)";
290
+ function u(a) {
291
+ return (a + "").replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
292
+ }
293
+ function c(a, r, t) {
294
+ var s = {};
295
+ s[t] = [];
296
+ var e = r.toString(), o = e.match(/^function\s?\(\w+,\s*\w+,\s*(\w+)\)/);
297
+ if (!o) return s;
298
+ for (var n = o[1], p = new RegExp("(\\\\n|\\W)" + u(n) + g, "g"), i; i = p.exec(e); )
299
+ i[3] !== "dll-reference" && s[t].push(i[3]);
300
+ for (p = new RegExp("\\(" + u(n) + '\\("(dll-reference\\s(' + f + '))"\\)\\)' + g, "g"); i = p.exec(e); )
301
+ a[i[2]] || (s[t].push(i[1]), a[i[2]] = h(i[1]).m), s[i[2]] = s[i[2]] || [], s[i[2]].push(i[4]);
302
+ return s;
303
+ }
304
+ function l(a) {
305
+ var r = Object.keys(a);
306
+ return r.reduce(function(t, s) {
307
+ return t || a[s].length > 0;
308
+ }, !1);
309
+ }
310
+ function v(a, r) {
311
+ for (var t = {
312
+ main: [r]
313
+ }, s = {
314
+ main: []
315
+ }, e = {
316
+ main: {}
317
+ }; l(t); )
318
+ for (var o = Object.keys(t), n = 0; n < o.length; n++) {
319
+ var p = o[n], i = t[p], w = i.pop();
320
+ if (e[p] = e[p] || {}, !(e[p][w] || !a[p][w])) {
321
+ e[p][w] = !0, s[p] = s[p] || [], s[p].push(w);
322
+ for (var m = c(a, a[p][w], p), C = Object.keys(m), b = 0; b < C.length; b++)
323
+ t[C[b]] = t[C[b]] || [], t[C[b]] = t[C[b]].concat(m[C[b]]);
324
+ }
325
+ }
326
+ return s;
327
+ }
328
+ y.exports = function(a, r) {
329
+ r = r || {};
330
+ var t = {
331
+ main: h.m
332
+ }, s = r.all ? { main: Object.keys(t) } : v(t, a), e = "";
333
+ Object.keys(s).filter(function(w) {
334
+ return w !== "main";
335
+ }).forEach(function(w) {
336
+ for (var m = 0; s[w][m]; )
337
+ m++;
338
+ s[w].push(m), t[w][m] = "(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })", e = e + "var " + w + " = (" + d.toString().replace("ENTRY_MODULE", JSON.stringify(m)) + ")({" + s[w].map(function(C) {
339
+ return "" + JSON.stringify(C) + ": " + t[w][C].toString();
340
+ }).join(",") + `});
341
+ `;
342
+ }), e = e + "(" + d.toString().replace("ENTRY_MODULE", JSON.stringify(a)) + ")({" + s.main.map(function(w) {
343
+ return "" + JSON.stringify(w) + ": " + t.main[w].toString();
344
+ }).join(",") + "})(self);";
345
+ var o = new window.Blob([e], { type: "text/javascript" });
346
+ if (r.bare)
347
+ return o;
348
+ var n = window.URL || window.webkitURL || window.mozURL || window.msURL, p = n.createObjectURL(o), i = new window.Worker(p);
349
+ return i.objectURL = p, i;
350
+ };
351
+ },
352
+ /* 5 */
353
+ /***/
354
+ function(y, _) {
355
+ y.exports = function(d, f, g) {
356
+ var u = new d.Int32Array(g);
357
+ function c(l, v) {
358
+ l = l | 0, v = v | 0;
359
+ var a = 0, r = 0, t = 0, s = 0, e = 0, o = 0, n = 0, p = 0, i = 0, w = 0, m = 0, C = 0, b = 0, A = 0;
360
+ for (t = u[v + 320 >> 2] | 0, e = u[v + 324 >> 2] | 0, n = u[v + 328 >> 2] | 0, i = u[v + 332 >> 2] | 0, m = u[v + 336 >> 2] | 0, a = 0; (a | 0) < (l | 0); a = a + 64 | 0) {
361
+ for (s = t, o = e, p = n, w = i, C = m, r = 0; (r | 0) < 64; r = r + 4 | 0)
362
+ A = u[a + r >> 2] | 0, b = ((t << 5 | t >>> 27) + (e & n | ~e & i) | 0) + ((A + m | 0) + 1518500249 | 0) | 0, m = i, i = n, n = e << 30 | e >>> 2, e = t, t = b, u[l + r >> 2] = A;
363
+ for (r = l + 64 | 0; (r | 0) < (l + 80 | 0); r = r + 4 | 0)
364
+ A = (u[r - 12 >> 2] ^ u[r - 32 >> 2] ^ u[r - 56 >> 2] ^ u[r - 64 >> 2]) << 1 | (u[r - 12 >> 2] ^ u[r - 32 >> 2] ^ u[r - 56 >> 2] ^ u[r - 64 >> 2]) >>> 31, b = ((t << 5 | t >>> 27) + (e & n | ~e & i) | 0) + ((A + m | 0) + 1518500249 | 0) | 0, m = i, i = n, n = e << 30 | e >>> 2, e = t, t = b, u[r >> 2] = A;
365
+ for (r = l + 80 | 0; (r | 0) < (l + 160 | 0); r = r + 4 | 0)
366
+ A = (u[r - 12 >> 2] ^ u[r - 32 >> 2] ^ u[r - 56 >> 2] ^ u[r - 64 >> 2]) << 1 | (u[r - 12 >> 2] ^ u[r - 32 >> 2] ^ u[r - 56 >> 2] ^ u[r - 64 >> 2]) >>> 31, b = ((t << 5 | t >>> 27) + (e ^ n ^ i) | 0) + ((A + m | 0) + 1859775393 | 0) | 0, m = i, i = n, n = e << 30 | e >>> 2, e = t, t = b, u[r >> 2] = A;
367
+ for (r = l + 160 | 0; (r | 0) < (l + 240 | 0); r = r + 4 | 0)
368
+ A = (u[r - 12 >> 2] ^ u[r - 32 >> 2] ^ u[r - 56 >> 2] ^ u[r - 64 >> 2]) << 1 | (u[r - 12 >> 2] ^ u[r - 32 >> 2] ^ u[r - 56 >> 2] ^ u[r - 64 >> 2]) >>> 31, b = ((t << 5 | t >>> 27) + (e & n | e & i | n & i) | 0) + ((A + m | 0) - 1894007588 | 0) | 0, m = i, i = n, n = e << 30 | e >>> 2, e = t, t = b, u[r >> 2] = A;
369
+ for (r = l + 240 | 0; (r | 0) < (l + 320 | 0); r = r + 4 | 0)
370
+ A = (u[r - 12 >> 2] ^ u[r - 32 >> 2] ^ u[r - 56 >> 2] ^ u[r - 64 >> 2]) << 1 | (u[r - 12 >> 2] ^ u[r - 32 >> 2] ^ u[r - 56 >> 2] ^ u[r - 64 >> 2]) >>> 31, b = ((t << 5 | t >>> 27) + (e ^ n ^ i) | 0) + ((A + m | 0) - 899497514 | 0) | 0, m = i, i = n, n = e << 30 | e >>> 2, e = t, t = b, u[r >> 2] = A;
371
+ t = t + s | 0, e = e + o | 0, n = n + p | 0, i = i + w | 0, m = m + C | 0;
372
+ }
373
+ u[v + 320 >> 2] = t, u[v + 324 >> 2] = e, u[v + 328 >> 2] = n, u[v + 332 >> 2] = i, u[v + 336 >> 2] = m;
374
+ }
375
+ return { hash: c };
376
+ };
377
+ },
378
+ /* 6 */
379
+ /***/
380
+ function(y, _) {
381
+ var h = this, d = void 0;
382
+ typeof self < "u" && typeof self.FileReaderSync < "u" && (d = new self.FileReaderSync());
383
+ var f = function(c, l, v, a, r, t) {
384
+ var s = void 0, e = t % 4, o = (r + e) % 4, n = r - o;
385
+ switch (e) {
386
+ case 0:
387
+ l[t] = c.charCodeAt(a + 3);
388
+ case 1:
389
+ l[t + 1 - (e << 1) | 0] = c.charCodeAt(a + 2);
390
+ case 2:
391
+ l[t + 2 - (e << 1) | 0] = c.charCodeAt(a + 1);
392
+ case 3:
393
+ l[t + 3 - (e << 1) | 0] = c.charCodeAt(a);
394
+ }
395
+ if (!(r < o + (4 - e))) {
396
+ for (s = 4 - e; s < n; s = s + 4 | 0)
397
+ v[t + s >> 2] = c.charCodeAt(a + s) << 24 | c.charCodeAt(a + s + 1) << 16 | c.charCodeAt(a + s + 2) << 8 | c.charCodeAt(a + s + 3);
398
+ switch (o) {
399
+ case 3:
400
+ l[t + n + 1 | 0] = c.charCodeAt(a + n + 2);
401
+ case 2:
402
+ l[t + n + 2 | 0] = c.charCodeAt(a + n + 1);
403
+ case 1:
404
+ l[t + n + 3 | 0] = c.charCodeAt(a + n);
405
+ }
406
+ }
407
+ }, g = function(c, l, v, a, r, t) {
408
+ var s = void 0, e = t % 4, o = (r + e) % 4, n = r - o;
409
+ switch (e) {
410
+ case 0:
411
+ l[t] = c[a + 3];
412
+ case 1:
413
+ l[t + 1 - (e << 1) | 0] = c[a + 2];
414
+ case 2:
415
+ l[t + 2 - (e << 1) | 0] = c[a + 1];
416
+ case 3:
417
+ l[t + 3 - (e << 1) | 0] = c[a];
418
+ }
419
+ if (!(r < o + (4 - e))) {
420
+ for (s = 4 - e; s < n; s = s + 4 | 0)
421
+ v[t + s >> 2 | 0] = c[a + s] << 24 | c[a + s + 1] << 16 | c[a + s + 2] << 8 | c[a + s + 3];
422
+ switch (o) {
423
+ case 3:
424
+ l[t + n + 1 | 0] = c[a + n + 2];
425
+ case 2:
426
+ l[t + n + 2 | 0] = c[a + n + 1];
427
+ case 1:
428
+ l[t + n + 3 | 0] = c[a + n];
429
+ }
430
+ }
431
+ }, u = function(c, l, v, a, r, t) {
432
+ var s = void 0, e = t % 4, o = (r + e) % 4, n = r - o, p = new Uint8Array(d.readAsArrayBuffer(c.slice(a, a + r)));
433
+ switch (e) {
434
+ case 0:
435
+ l[t] = p[3];
436
+ case 1:
437
+ l[t + 1 - (e << 1) | 0] = p[2];
438
+ case 2:
439
+ l[t + 2 - (e << 1) | 0] = p[1];
440
+ case 3:
441
+ l[t + 3 - (e << 1) | 0] = p[0];
442
+ }
443
+ if (!(r < o + (4 - e))) {
444
+ for (s = 4 - e; s < n; s = s + 4 | 0)
445
+ v[t + s >> 2 | 0] = p[s] << 24 | p[s + 1] << 16 | p[s + 2] << 8 | p[s + 3];
446
+ switch (o) {
447
+ case 3:
448
+ l[t + n + 1 | 0] = p[n + 2];
449
+ case 2:
450
+ l[t + n + 2 | 0] = p[n + 1];
451
+ case 1:
452
+ l[t + n + 3 | 0] = p[n];
453
+ }
454
+ }
455
+ };
456
+ y.exports = function(c, l, v, a, r, t) {
457
+ if (typeof c == "string")
458
+ return f(c, l, v, a, r, t);
459
+ if (c instanceof Array || h && h.Buffer && h.Buffer.isBuffer(c))
460
+ return g(c, l, v, a, r, t);
461
+ if (c instanceof ArrayBuffer)
462
+ return g(new Uint8Array(c), l, v, a, r, t);
463
+ if (c.buffer instanceof ArrayBuffer)
464
+ return g(new Uint8Array(c.buffer, c.byteOffset, c.byteLength), l, v, a, r, t);
465
+ if (c instanceof Blob)
466
+ return u(c, l, v, a, r, t);
467
+ throw new Error("Unsupported data type.");
468
+ };
469
+ },
470
+ /* 7 */
471
+ /***/
472
+ function(y, _, h) {
473
+ var d = /* @__PURE__ */ function() {
474
+ function v(a, r) {
475
+ for (var t = 0; t < r.length; t++) {
476
+ var s = r[t];
477
+ s.enumerable = s.enumerable || !1, s.configurable = !0, "value" in s && (s.writable = !0), Object.defineProperty(a, s.key, s);
478
+ }
479
+ }
480
+ return function(a, r, t) {
481
+ return r && v(a.prototype, r), t && v(a, t), a;
482
+ };
483
+ }();
484
+ function f(v, a) {
485
+ if (!(v instanceof a))
486
+ throw new TypeError("Cannot call a class as a function");
487
+ }
488
+ var g = h(0), u = h(1), c = u.toHex, l = function() {
489
+ function v() {
490
+ f(this, v), this._rusha = new g(), this._rusha.resetState();
491
+ }
492
+ return v.prototype.update = function(r) {
493
+ return this._rusha.append(r), this;
494
+ }, v.prototype.digest = function(r) {
495
+ var t = this._rusha.rawEnd().buffer;
496
+ if (!r)
497
+ return t;
498
+ if (r === "hex")
499
+ return c(t);
500
+ throw new Error("unsupported digest encoding");
501
+ }, d(v, [{
502
+ key: "state",
503
+ get: function() {
504
+ return this._rusha.getState();
505
+ },
506
+ set: function(a) {
507
+ this._rusha.setState(a);
508
+ }
509
+ }]), v;
510
+ }();
511
+ y.exports = function() {
512
+ return new l();
513
+ };
514
+ }
515
+ /******/
516
+ ])
517
+ );
518
+ });
519
+ }(L)), L.exports;
520
+ }
521
+ var I = F();
522
+ const z = /* @__PURE__ */ U(I), P = new z(), M = (x) => x.startsWith(".") || x === "__MACOSX" || x === "node_modules", R = (x) => x.startsWith("/") ? x : `/${x}`;
523
+ function k(x, S, y) {
524
+ return {
525
+ path: R(x),
526
+ size: S.byteLength,
527
+ sha: P.digest(S),
528
+ content: S,
529
+ name: y
530
+ };
531
+ }
532
+ async function D(x) {
533
+ const S = await new Promise((_, h) => x.file(_, h)), y = await S.arrayBuffer();
534
+ return k(x.fullPath, y, S.name);
535
+ }
536
+ async function B(x) {
537
+ const S = x.createReader(), y = [];
538
+ for (; ; ) {
539
+ const _ = await new Promise((h, d) => S.readEntries(h, d));
540
+ if (!_.length) break;
541
+ for (const h of _)
542
+ M(h.name) || y.push(...h.isDirectory ? await B(h) : [await D(h)]);
543
+ }
544
+ return y;
545
+ }
546
+ async function J(x) {
547
+ var h;
548
+ const S = (h = x.files) == null ? void 0 : h[0];
549
+ if (x.files.length === 1 && S && /\.zip$/i.test(S.name))
550
+ return j(S);
551
+ const _ = Array.from(x.items ?? []).map((d) => {
552
+ var f;
553
+ return (f = d.webkitGetAsEntry) == null ? void 0 : f.call(d);
554
+ }).filter(Boolean);
555
+ if (_.length) {
556
+ const d = await Promise.all(
557
+ _.map(
558
+ (f) => M(f.name) ? [] : f.isDirectory ? B(f) : D(f).then((g) => [g])
559
+ )
560
+ );
561
+ return O(d.flat());
562
+ }
563
+ return G(x.files);
564
+ }
565
+ async function G(x) {
566
+ const S = Array.from(x);
567
+ if (S.length === 1 && /\.zip$/i.test(S[0].name))
568
+ return j(S[0]);
569
+ const y = [];
570
+ for (const _ of S) {
571
+ const h = _.webkitRelativePath || _.name;
572
+ y.push(k(h, await _.arrayBuffer(), _.name));
573
+ }
574
+ return O(y);
575
+ }
576
+ async function j(x) {
577
+ const { default: S } = await import("../../../../chunks/jszip.min.DGG1sjYa.js").then((h) => h.j), y = await S.loadAsync(await x.arrayBuffer()), _ = [];
578
+ return await Promise.all(
579
+ Object.entries(y.files).map(async ([h, d]) => {
580
+ if (d.dir || /(^|\/)(__MACOSX\/|\.)/.test(h)) return;
581
+ const f = await d.async("arraybuffer");
582
+ _.push(k(h, f, h.split("/").pop()));
583
+ })
584
+ ), O(_);
585
+ }
586
+ function O(x) {
587
+ if (!x.length) return x;
588
+ const S = (h) => R(h).split("/").slice(1);
589
+ let y = S(x[0].path).slice(0, -1);
590
+ for (const h of x) {
591
+ const d = S(h.path);
592
+ let f = 0;
593
+ for (; f < y.length && f < d.length - 1 && y[f] === d[f]; ) f++;
594
+ y = y.slice(0, f);
595
+ }
596
+ if (!y.length) return x;
597
+ const _ = "/" + y.join("/");
598
+ return x.map((h) => ({ ...h, path: R(h.path.slice(_.length)) }));
599
+ }
600
+ function Y(x) {
601
+ const S = x.filter((y) => /\.html?$/i.test(y.name));
602
+ return S.some((y) => /^index\.html?$/i.test(y.name)) ? null : S.length === 1 ? S[0].name : null;
603
+ }
604
+ function Z(x) {
605
+ const S = x.filter((y) => /\.html?$/i.test(y.name));
606
+ return S.length > 1 && !S.some((y) => /^index\.html?$/i.test(y.name));
607
+ }
608
+ export {
609
+ Y as getSingleNonIndexHtmlFileName,
610
+ Z as hasMultipleHtmlFilesWithoutIndex,
611
+ O as normalizeFiles,
612
+ J as readDataTransfer,
613
+ G as readFileList,
614
+ j as readZip
615
+ };
@@ -0,0 +1,30 @@
1
+ export interface ProcessedFile {
2
+ /** POSIX path relative to the deploy root, leading slash, e.g. "/index.html" */
3
+ path: string;
4
+ size: number;
5
+ /** lowercase hex SHA-1 of the file content */
6
+ sha: string;
7
+ content: ArrayBuffer;
8
+ name: string;
9
+ }
10
+ export type Digest = Record<string, string>;
11
+ export interface Deploy {
12
+ id: string;
13
+ /** the *.netlify.app subdomain assigned to the anonymous site */
14
+ subdomain: string;
15
+ /** SHAs the backend does NOT yet have — only these get uploaded */
16
+ required: string[];
17
+ state?: string;
18
+ }
19
+ export interface DeployResult {
20
+ deploy: Deploy;
21
+ /** drop token — persist this to later claim the site into an account */
22
+ token: string;
23
+ url: string;
24
+ }
25
+ export type DeployPhase = 'creating' | 'uploading' | 'processing' | 'ready';
26
+ export interface DeployProgress {
27
+ phase: DeployPhase;
28
+ uploaded?: number;
29
+ total?: number;
30
+ }
@@ -1,6 +1,6 @@
1
1
  import { u as e } from "../../../../../chunks/jsxRuntime.module.Bzuv3cXw.js";
2
2
  import { A as g, y as f, d } from "../../../../../chunks/hooks.module.DRcxknIz.js";
3
- import { A as L, K as P } from "../../../../../chunks/AskNetlify.jaxhKBOK.js";
3
+ import { A as L, K as P } from "../../../../../chunks/AskNetlify.B3RnU2w-.js";
4
4
  import M from "../../../Modal/Modal.js";
5
5
  import h from "../../../KeyboardKey/KeyboardKey.js";
6
6
  import O from "../SearchWindow.js";
@@ -4,7 +4,7 @@ import { default as m } from "./Icon/index.js";
4
4
  import { default as s } from "./SearchModal/components/SearchLink/SearchLink.js";
5
5
  import { default as u } from "./SearchModal/components/SearchHeading/SearchHeading.js";
6
6
  import { default as i } from "./SearchModal/components/SearchToggle/SearchToggle.js";
7
- import { A as S } from "../../chunks/AskNetlify.jaxhKBOK.js";
7
+ import { A as S } from "../../chunks/AskNetlify.B3RnU2w-.js";
8
8
  import "preact";
9
9
  import "../../chunks/hooks.module.DRcxknIz.js";
10
10
  import { default as n } from "./SearchModal/components/SearchModal/SearchModal.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@netlify/spark-ui",
3
3
  "description": "Assets, design tokens, components, and utilities",
4
- "version": "1.25.0",
4
+ "version": "1.26.0-alpha.1",
5
5
  "type": "module",
6
6
  "main": "dist/components/preact/index.js",
7
7
  "types": "dist/components/preact/index.d.ts",
@@ -39,7 +39,9 @@
39
39
  "@astro-community/astro-embed-youtube": "^0.5.10",
40
40
  "@kapaai/react-sdk": "^0.9.0",
41
41
  "@shikijs/transformers": "^3.3.0",
42
- "marked": "^15.0.11"
42
+ "jszip": "^3.10.1",
43
+ "marked": "^15.0.11",
44
+ "rusha": "^0.8.14"
43
45
  },
44
46
  "devDependencies": {
45
47
  "@preact/preset-vite": "^2.10.1",