react-swarm-rebuild 0.3.0 → 0.3.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.
- package/README.md +4 -37
- package/package.json +9 -1
package/README.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
A swarm of colorful cursors reconstructs your React UI. React 18 / 19, TypeScript, ESM and CommonJS. MIT, Nguyễn Quốc Cường.
|
|
4
4
|
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
[Source code](https://github.com/nqcuongcnq/react-swarm-rebuild) · [npm](https://www.npmjs.com/package/react-swarm-rebuild) · [Report an issue](https://github.com/nqcuongcnq/react-swarm-rebuild/issues)
|
|
8
|
+
|
|
5
9
|
## Quick start
|
|
6
10
|
|
|
7
11
|
```tsx
|
|
@@ -228,43 +232,6 @@ State fields: `phase`, `progress`, `completed`, `total`, `agents`, `speed`, `sou
|
|
|
228
232
|
|
|
229
233
|
Watch `phase === 'live'` to know that the automatic exit has finished and the overlay is gone. A skipped run does not call `onComplete()`. `pause()` freezes the animation, including a handoff or exit; `resume()` continues it.
|
|
230
234
|
|
|
231
|
-
## Install and develop
|
|
232
|
-
|
|
233
|
-
```sh
|
|
234
|
-
npm install react-swarm-rebuild
|
|
235
|
-
# Or install the local release:
|
|
236
|
-
npm install /path/to/react-swarm-rebuild-0.3.0.tgz
|
|
237
|
-
|
|
238
|
-
npm install
|
|
239
|
-
npm run typecheck
|
|
240
|
-
npm run build
|
|
241
|
-
npm run test:browser # Chrome required; set CHROME_PATH if needed.
|
|
242
|
-
npm pack
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
Use Node 20+ for development with current Playwright versions. The bundled library supports Node 18+ for server imports and needs no CSS import or runtime dependency beyond its React peers. It is safe to import/render on the server. Browsers need Shadow DOM, DOM Range, requestAnimationFrame and CSS clip-path.
|
|
246
|
-
|
|
247
|
-
Snapshots preserve measured text, common boxes, gradients, controls, images, SVGs and readable 2D canvases. They are visual reconstructions rather than screenshots: complex transforms, pseudo-elements, custom elements, protected canvases, cross-origin iframes and unavailable media may differ. Lazy content must already be loaded. Geometry is measured across frames while the real application continues running; settle dynamic data/fonts before releasing `ready`. Add `data-swarm-ignore` to exclude a subtree.
|
|
248
|
-
|
|
249
|
-
## Publish to npm
|
|
250
|
-
|
|
251
|
-
Use the Node version selected by `.nvmrc` when publishing. Run these commands from this repository:
|
|
252
|
-
|
|
253
|
-
```sh
|
|
254
|
-
nvm use
|
|
255
|
-
node --version
|
|
256
|
-
npm --version
|
|
257
|
-
npm login --auth-type=web --registry=https://registry.npmjs.org/
|
|
258
|
-
npm whoami --registry=https://registry.npmjs.org/
|
|
259
|
-
npm publish --access public --registry=https://registry.npmjs.org/
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
Complete the browser login and any two-factor authentication prompts. Continue to publish only after `npm whoami` returns your npm username. If Node 24 is not installed, run `nvm install` first.
|
|
263
|
-
|
|
264
|
-
If publication reports `E404` even though packaging succeeded, check authentication with `npm whoami`. An `E401` response means the current credentials are not accepted; log in again with the current CLI. Update an outdated CLI and renew the login before retrying. A failed upload alone does not require a new package version or name.
|
|
265
|
-
|
|
266
|
-
Publishing requires account 2FA or a granular token with the appropriate publishing permissions and bypass-2FA setting. See the [npm publishing authentication requirements](https://docs.npmjs.com/requiring-2fa-for-package-publishing-and-settings-modification/). Never put tokens in this repository or paste them into chat.
|
|
267
|
-
|
|
268
235
|
## 0.3.0
|
|
269
236
|
|
|
270
237
|
- Fix SVG/media descendants escaping hidden snapshot layers before their own drawing starts.
|
package/package.json
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-swarm-rebuild",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "A swarm of multiplayer-style cursors rebuilds your React UI with drawing, typing, guides and flocking animations.",
|
|
5
5
|
"author": "Nguyễn Quốc Cường",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/nqcuongcnq/react-swarm-rebuild.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/nqcuongcnq/react-swarm-rebuild#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/nqcuongcnq/react-swarm-rebuild/issues"
|
|
14
|
+
},
|
|
7
15
|
"type": "module",
|
|
8
16
|
"main": "./dist/index.cjs",
|
|
9
17
|
"module": "./dist/index.js",
|