@nswds/app 2.0.2 → 3.0.0
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 +13 -6
- package/dist/index.cjs +8 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/package.json +14 -8
package/README.md
CHANGED
|
@@ -15,18 +15,25 @@ npm install @nswds/app
|
|
|
15
15
|
`@nswds/app` does not bundle React or Next.js — it expects your application to
|
|
16
16
|
provide them, so that only one copy of React is ever loaded:
|
|
17
17
|
|
|
18
|
-
| Package
|
|
19
|
-
|
|
|
20
|
-
| `react`
|
|
21
|
-
| `react-dom`
|
|
22
|
-
| `next`
|
|
23
|
-
| `next-themes`
|
|
18
|
+
| Package | Required version |
|
|
19
|
+
| ----------------- | ---------------- |
|
|
20
|
+
| `react` | `^19.2.6` |
|
|
21
|
+
| `react-dom` | `^19.2.6` |
|
|
22
|
+
| `next` | `^16.2.6` |
|
|
23
|
+
| `next-themes` | `^0.4.6` |
|
|
24
|
+
| `react-hook-form` | `^7.75.0` |
|
|
24
25
|
|
|
25
26
|
npm 7 and later install missing peer dependencies automatically. If your project
|
|
26
27
|
is on an older version of React or Next.js, `npm install` will report an
|
|
27
28
|
`ERESOLVE` conflict — upgrade rather than using `--legacy-peer-deps`, since two
|
|
28
29
|
copies of React break hooks at runtime.
|
|
29
30
|
|
|
31
|
+
`react-hook-form` is a peer for the same reason as `next-themes`: `Form` is
|
|
32
|
+
`FormProvider`, and `useFormField` calls `useFormContext()`, so the `useForm()`
|
|
33
|
+
control object you create must resolve to the same copy of the library that the
|
|
34
|
+
components read. Two copies mean two React contexts, and the fields silently see
|
|
35
|
+
a form you never populated.
|
|
36
|
+
|
|
30
37
|
Everything else the components need is a regular dependency and is installed for
|
|
31
38
|
you.
|
|
32
39
|
|
package/dist/index.cjs
CHANGED
|
@@ -14470,7 +14470,7 @@ function FormatToggle({ format, setFormat }) {
|
|
|
14470
14470
|
|
|
14471
14471
|
// package.json
|
|
14472
14472
|
var package_default = {
|
|
14473
|
-
version: "
|
|
14473
|
+
version: "3.0.0"};
|
|
14474
14474
|
var SluggerContext = React5__namespace.default.createContext(null);
|
|
14475
14475
|
function flattenText(nodes) {
|
|
14476
14476
|
if (nodes == null || typeof nodes === "boolean") return "";
|
|
@@ -18998,10 +18998,8 @@ var acceleratedValues = /* @__PURE__ */ new Set([
|
|
|
18998
18998
|
"opacity",
|
|
18999
18999
|
"clipPath",
|
|
19000
19000
|
"filter",
|
|
19001
|
-
"transform"
|
|
19002
|
-
|
|
19003
|
-
// or until we implement support for linear() easing.
|
|
19004
|
-
// "background-color"
|
|
19001
|
+
"transform",
|
|
19002
|
+
"backgroundColor"
|
|
19005
19003
|
]);
|
|
19006
19004
|
|
|
19007
19005
|
// node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.mjs
|
|
@@ -19032,7 +19030,7 @@ var supportsWaapi = /* @__PURE__ */ memo(() => Object.hasOwnProperty.call(Elemen
|
|
|
19032
19030
|
function supportsBrowserAnimation(options) {
|
|
19033
19031
|
const { motionValue: motionValue2, name, repeatDelay, repeatType, damping, type, keyframes: keyframes2 } = options;
|
|
19034
19032
|
const subject = motionValue2?.owner?.current;
|
|
19035
|
-
if (!(subject instanceof HTMLElement)) {
|
|
19033
|
+
if (!(subject instanceof HTMLElement) && !(subject instanceof SVGElement)) {
|
|
19036
19034
|
return false;
|
|
19037
19035
|
}
|
|
19038
19036
|
const { onUpdate, transformTemplate } = motionValue2.owner.getProps();
|
|
@@ -21389,6 +21387,10 @@ var HTMLVisualElement = class extends DOMVisualElement {
|
|
|
21389
21387
|
this.type = "html";
|
|
21390
21388
|
this.renderInstance = renderHTML;
|
|
21391
21389
|
}
|
|
21390
|
+
mount(instance) {
|
|
21391
|
+
invariant(Boolean(instance.style), "motion.create() components must forward their ref to a HTML or SVG element", "custom-component-ref");
|
|
21392
|
+
super.mount(instance);
|
|
21393
|
+
}
|
|
21392
21394
|
readValueFromInstance(instance, key) {
|
|
21393
21395
|
if (transformProps.has(key)) {
|
|
21394
21396
|
return this.projection?.isProjecting ? defaultTransformValue(key) : readTransformValue(instance, key);
|