@netlify/spark-ui 1.26.0-alpha.1 → 1.26.0-alpha.2
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.
- package/dist/chunks/{AskNetlify.B3RnU2w-.js → AskNetlify.bx0blyGV.js} +1 -1
- package/dist/chunks/_commonjsHelpers.C6fGbg64.js +6 -0
- package/dist/chunks/browser.D58rdxmc.js +444 -0
- package/dist/components/preact/AskNetlify/AskNetlify.js +1 -1
- package/dist/components/preact/DropZone/drop-core/readFiles.js +276 -275
- package/dist/components/preact/SearchModal/components/SearchModal/SearchModal.js +1 -1
- package/dist/components/preact/index.js +1 -1
- package/package.json +2 -2
- package/packages/components/preact/DropZone/drop-core/readFiles.ts +12 -9
- package/dist/chunks/_commonjsHelpers.DaMA6jEr.js +0 -8
- package/dist/chunks/jszip.min.DGG1sjYa.js +0 -2327
|
@@ -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.
|
|
3
|
+
import { A as L, K as P } from "../../../../../chunks/AskNetlify.bx0blyGV.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.
|
|
7
|
+
import { A as S } from "../../chunks/AskNetlify.bx0blyGV.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.26.0-alpha.
|
|
4
|
+
"version": "1.26.0-alpha.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/components/preact/index.js",
|
|
7
7
|
"types": "dist/components/preact/index.d.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
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
|
-
"
|
|
42
|
+
"fflate": "^0.8.2",
|
|
43
43
|
"marked": "^15.0.11",
|
|
44
44
|
"rusha": "^0.8.14"
|
|
45
45
|
},
|
|
@@ -89,16 +89,19 @@ export async function readFileList(files: FileList): Promise<ProcessedFile[]> {
|
|
|
89
89
|
// --- zip --------------------------------------------------------------------
|
|
90
90
|
|
|
91
91
|
export async function readZip(zip: File): Promise<ProcessedFile[]> {
|
|
92
|
-
const {
|
|
93
|
-
const
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
Object.entries(archive.files).map(async ([path, entry]) => {
|
|
97
|
-
if (entry.dir || /(^|\/)(__MACOSX\/|\.)/.test(path)) return;
|
|
98
|
-
const content = await entry.async('arraybuffer');
|
|
99
|
-
out.push(toProcessedFile(path, content, path.split('/').pop()!));
|
|
100
|
-
})
|
|
92
|
+
const { unzip } = await import('fflate');
|
|
93
|
+
const buf = new Uint8Array(await zip.arrayBuffer());
|
|
94
|
+
const entries = await new Promise<Record<string, Uint8Array>>((resolve, reject) =>
|
|
95
|
+
unzip(buf, (err, data) => (err ? reject(err) : resolve(data)))
|
|
101
96
|
);
|
|
97
|
+
const out: ProcessedFile[] = [];
|
|
98
|
+
for (const [path, bytes] of Object.entries(entries)) {
|
|
99
|
+
// fflate uses a trailing slash to signal directory entries; also skip the
|
|
100
|
+
// usual junk (macOS metadata, dotfiles at any depth).
|
|
101
|
+
if (path.endsWith('/') || /(^|\/)(__MACOSX\/|\.)/.test(path)) continue;
|
|
102
|
+
const content = bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength);
|
|
103
|
+
out.push(toProcessedFile(path, content, path.split('/').pop()!));
|
|
104
|
+
}
|
|
102
105
|
return normalizeFiles(out);
|
|
103
106
|
}
|
|
104
107
|
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
-
function l(e) {
|
|
3
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
-
}
|
|
5
|
-
export {
|
|
6
|
-
o as c,
|
|
7
|
-
l as g
|
|
8
|
-
};
|