@shipstatic/drop 2.7.0 → 2.7.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/LICENSE +1 -1
- package/README.md +9 -3
- package/package.json +11 -7
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @shipstatic/drop
|
|
2
2
|
|
|
3
|
-
Headless file processing for
|
|
3
|
+
Headless file processing for ShipStatic deployments.
|
|
4
4
|
|
|
5
5
|
A React hook that prepares files for deployment with [@shipstatic/ship](https://www.npmjs.com/package/@shipstatic/ship): drag & drop with folder support, ZIP extraction, path normalization, and validation against your account's real platform limits. No UI, full styling control.
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ npm install @shipstatic/drop @shipstatic/ship
|
|
|
12
12
|
|
|
13
13
|
React 18 or 19 is a peer dependency.
|
|
14
14
|
|
|
15
|
-
## Quick
|
|
15
|
+
## Quick start
|
|
16
16
|
|
|
17
17
|
```tsx
|
|
18
18
|
import { useDrop } from '@shipstatic/drop';
|
|
@@ -273,12 +273,18 @@ vi.mock('@shipstatic/drop', () => ({ useDrop: mockUseDrop({ phase: 'ready' }) })
|
|
|
273
273
|
|
|
274
274
|
## Gotchas
|
|
275
275
|
|
|
276
|
-
- **`webkitRelativePath` is the handoff.** Drop writes each file's deploy path there, and the
|
|
276
|
+
- **`webkitRelativePath` is the handoff.** Drop writes each file's deploy path there, and the ShipStatic SDK reads it. Don't modify it in between.
|
|
277
277
|
- **`stripCommonPrefix` mutates File objects.** It returns new `ProcessedFile`s but rewrites `webkitRelativePath` on the underlying `File` — deliberately, because that's what the SDK reads.
|
|
278
278
|
- **Unreadable entries are skipped silently.** A folder with permission-denied files still deploys; the failures are logged to the console with no programmatic signal.
|
|
279
279
|
- **No MD5 here.** Ship computes checksums during upload.
|
|
280
280
|
- **`type` is the browser's report.** The platform derives `Content-Type` server-side from the path, so drop bundles no MIME database.
|
|
281
281
|
|
|
282
|
+
## Also available
|
|
283
|
+
|
|
284
|
+
Part of [ShipStatic](https://shipstatic.com). This package is a building
|
|
285
|
+
block; the ways to actually deploy something are listed at
|
|
286
|
+
[shipstatic.com](https://shipstatic.com).
|
|
287
|
+
|
|
282
288
|
## License
|
|
283
289
|
|
|
284
290
|
MIT
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipstatic/drop",
|
|
3
|
-
"version": "2.7.
|
|
4
|
-
"description": "Headless React hook for
|
|
3
|
+
"version": "2.7.2",
|
|
4
|
+
"description": "Headless React hook that prepares files for ShipStatic deployments: drag and drop with folder support, ZIP extraction, path normalization, and validation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -56,20 +56,24 @@
|
|
|
56
56
|
"format": "biome format --write ."
|
|
57
57
|
},
|
|
58
58
|
"keywords": [
|
|
59
|
+
"shipstatic",
|
|
60
|
+
"deploy",
|
|
61
|
+
"hosting",
|
|
62
|
+
"static-site",
|
|
63
|
+
"static-hosting",
|
|
64
|
+
"web-hosting",
|
|
65
|
+
"website",
|
|
59
66
|
"react",
|
|
60
67
|
"react-hook",
|
|
61
68
|
"dropzone",
|
|
62
69
|
"file-drop",
|
|
63
|
-
"file-processing",
|
|
64
|
-
"headless",
|
|
65
70
|
"zip-extraction",
|
|
66
71
|
"file-validation",
|
|
67
|
-
"
|
|
68
|
-
"deployment"
|
|
72
|
+
"headless"
|
|
69
73
|
],
|
|
70
74
|
"author": "ShipStatic",
|
|
71
75
|
"license": "MIT",
|
|
72
|
-
"homepage": "https://
|
|
76
|
+
"homepage": "https://shipstatic.com",
|
|
73
77
|
"repository": {
|
|
74
78
|
"type": "git",
|
|
75
79
|
"url": "git+https://github.com/shipstatic/drop.git"
|