diff --git a/.changeset/fix-random-size-hydration.md b/.changeset/fix-random-size-hydration.md deleted file mode 100644 index 1872ee30..00000000 --- a/.changeset/fix-random-size-hydration.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@lglab/react-qr-code': patch ---- - -Fix `randomSize` breaking server-side rendering. `getScaleFactor` called `Math.random()` during render, so the server and the client produced different module sizes, causing a hydration mismatch, and static prerenders froze one arbitrary result into the HTML. Scale factors are now derived deterministically from the module's position and a seed hashed from the code's pre-excavation module grid: the same `value` always renders the same layout, different values still get different layouts, resizing an excavating image no longer reshuffles the rest of the code, and SSR output matches hydration. diff --git a/apps/docs/CHANGELOG.md b/apps/docs/CHANGELOG.md index 0357724e..8adc258f 100644 --- a/apps/docs/CHANGELOG.md +++ b/apps/docs/CHANGELOG.md @@ -1,5 +1,12 @@ # reactqrcode.com +## 1.4.14 + +### Patch Changes + +- Updated dependencies [[`a23a08f`](https://github.com/LGLabGreg/react-qr-code/commit/a23a08f942ef8875bfc160a4becf4e41d7e1df74)]: + - @lglab/react-qr-code@1.7.1 + ## 1.4.13 ### Patch Changes diff --git a/apps/docs/package.json b/apps/docs/package.json index 6f33049e..aaad35b3 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -1,6 +1,6 @@ { "name": "reactqrcode.com", - "version": "1.4.13", + "version": "1.4.14", "private": true, "scripts": { "dev": "next dev --turbopack", diff --git a/packages/react-qr-code/CHANGELOG.md b/packages/react-qr-code/CHANGELOG.md index 81c68f6e..4631a54c 100644 --- a/packages/react-qr-code/CHANGELOG.md +++ b/packages/react-qr-code/CHANGELOG.md @@ -1,5 +1,11 @@ # @lglab/react-qr-code +## 1.7.1 + +### Patch Changes + +- [#601](https://github.com/LGLabGreg/react-qr-code/pull/601) [`a23a08f`](https://github.com/LGLabGreg/react-qr-code/commit/a23a08f942ef8875bfc160a4becf4e41d7e1df74) Thanks [@LGLabGreg](https://github.com/LGLabGreg)! - Fix `randomSize` breaking server-side rendering. `getScaleFactor` called `Math.random()` during render, so the server and the client produced different module sizes, causing a hydration mismatch, and static prerenders froze one arbitrary result into the HTML. Scale factors are now derived deterministically from the module's position and a seed hashed from the code's pre-excavation module grid: the same `value` always renders the same layout, different values still get different layouts, resizing an excavating image no longer reshuffles the rest of the code, and SSR output matches hydration. + ## 1.7.0 ### Minor Changes diff --git a/packages/react-qr-code/package.json b/packages/react-qr-code/package.json index 70c25590..d802372a 100644 --- a/packages/react-qr-code/package.json +++ b/packages/react-qr-code/package.json @@ -1,6 +1,6 @@ { "name": "@lglab/react-qr-code", - "version": "1.7.0", + "version": "1.7.1", "description": "React library to generate QR codes", "author": "LGLab", "license": "MIT",