diff --git a/package-lock.json b/package-lock.json index af1054760..0417df472 100644 --- a/package-lock.json +++ b/package-lock.json @@ -57,6 +57,7 @@ "examples/example-cli/node_modules/react": { "version": "18.3.1", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -100,6 +101,7 @@ "examples/example-esbuild/node_modules/react": { "version": "18.3.1", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -377,6 +379,7 @@ "examples/example-nextjs/node_modules/react": { "version": "18.3.1", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -387,6 +390,7 @@ "examples/example-nextjs/node_modules/react-dom": { "version": "18.3.1", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" @@ -452,6 +456,7 @@ "examples/example-rollup/node_modules/react": { "version": "19.1.0", "license": "MIT", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -675,6 +680,7 @@ "integrity": "sha512-VGMpFQGUQWYT9LfnPcX8ouFojyrZ/2w3K5BucvxL/spdNehccKhB4jUyB1yBCXpr2XFm0jkECxgrpXBW2ipoAw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.44.0", "@typescript-eslint/types": "8.44.0", @@ -826,6 +832,7 @@ "integrity": "sha512-hB4FIzXovouYzwzECDcUkJ4OcfOEkXTv2zRY6B9bkwjx/cprAq0uvm1nl7zvQ0/TsUk0zQiN4uPfJpB9m+rPMQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -946,7 +953,6 @@ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12.0.0" }, @@ -1275,21 +1281,6 @@ } } }, - "examples/example-storybook/node_modules/yaml": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz", - "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==", - "dev": true, - "license": "ISC", - "optional": true, - "peer": true, - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14.6" - } - }, "examples/example-storybook/node_modules/yocto-queue": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz", @@ -1357,6 +1348,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -1596,6 +1588,7 @@ "version": "19.1.1", "resolved": "https://registry.npmjs.org/react/-/react-19.1.1.tgz", "integrity": "sha512-w8nqGImo45dmMIfljjMwOGtbmC/mk4CMYhWIicdSflH91J9TyCyczcPFXJzrZ/ZXcgGRFeP6BU0BEJTw6tZdfQ==", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -1954,6 +1947,7 @@ "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.34.0.tgz", "integrity": "sha512-m9tK4IqJmn+flEPRtuxuHgiHmrKV0su5fuVwVpq8/es4DMjWMgX1a7Lg1PktvO8AbKaTp9kTtBAPnwXpuCwmEg==", "license": "MIT", + "peer": true, "dependencies": { "@algolia/client-common": "5.34.0", "@algolia/requester-browser-xhr": "5.34.0", @@ -2283,6 +2277,7 @@ "version": "7.28.4", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.4.tgz", "integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==", + "peer": true, "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.3", @@ -4478,6 +4473,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" }, @@ -4500,6 +4496,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" } @@ -5327,7 +5324,6 @@ "os": [ "aix" ], - "peer": true, "engines": { "node": ">=18" } @@ -5345,7 +5341,6 @@ "os": [ "android" ], - "peer": true, "engines": { "node": ">=18" } @@ -5363,7 +5358,6 @@ "os": [ "android" ], - "peer": true, "engines": { "node": ">=18" } @@ -5381,7 +5375,6 @@ "os": [ "android" ], - "peer": true, "engines": { "node": ">=18" } @@ -5399,7 +5392,6 @@ "os": [ "darwin" ], - "peer": true, "engines": { "node": ">=18" } @@ -5417,7 +5409,6 @@ "os": [ "darwin" ], - "peer": true, "engines": { "node": ">=18" } @@ -5435,7 +5426,6 @@ "os": [ "freebsd" ], - "peer": true, "engines": { "node": ">=18" } @@ -5453,7 +5443,6 @@ "os": [ "freebsd" ], - "peer": true, "engines": { "node": ">=18" } @@ -5471,7 +5460,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -5489,7 +5477,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -5507,7 +5494,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -5525,7 +5511,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -5543,7 +5528,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -5561,7 +5545,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -5579,7 +5562,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -5597,7 +5579,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -5615,7 +5596,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -5633,7 +5613,6 @@ "os": [ "netbsd" ], - "peer": true, "engines": { "node": ">=18" } @@ -5651,7 +5630,6 @@ "os": [ "netbsd" ], - "peer": true, "engines": { "node": ">=18" } @@ -5669,7 +5647,6 @@ "os": [ "openbsd" ], - "peer": true, "engines": { "node": ">=18" } @@ -5687,7 +5664,6 @@ "os": [ "openbsd" ], - "peer": true, "engines": { "node": ">=18" } @@ -5705,7 +5681,6 @@ "os": [ "openharmony" ], - "peer": true, "engines": { "node": ">=18" } @@ -5723,7 +5698,6 @@ "os": [ "sunos" ], - "peer": true, "engines": { "node": ">=18" } @@ -5741,7 +5715,6 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=18" } @@ -5759,7 +5732,6 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=18" } @@ -5777,7 +5749,6 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=18" } @@ -5926,6 +5897,7 @@ "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.7.2.tgz", "integrity": "sha512-yxtOBWDrdi5DD5o1pmVdq3WMCvnobT0LU6R8RyyVXPvFRd2o79/0NCuQoCjNTeZz9EzA9xS3JxNWfv54RIHFEA==", "license": "MIT", + "peer": true, "dependencies": { "@fortawesome/fontawesome-common-types": "6.7.2" }, @@ -7337,6 +7309,7 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz", "integrity": "sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ==", "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/generator": "^7.12.5", @@ -7879,6 +7852,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -8115,6 +8089,7 @@ "integrity": "sha512-qWJ2ZTbmumwiLFomfzTyt5Kng4hwPi9rwCYN4SHb6eaRU1KNO4ccxINHr/VhH4GgPlt1XfSTLX2LBTme8ne4Zw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/estree": "^1.0.0", "estree-walker": "^2.0.2", @@ -8450,6 +8425,7 @@ "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", @@ -9639,6 +9615,7 @@ "resolved": "https://registry.npmjs.org/@svgr/core/-/core-6.5.1.tgz", "integrity": "sha512-/xdLSWxK5QkqG524ONSjvg3V/FkNyCv538OIBdQqPNaAta3AsXj/Bd2FbvR87yMbXO2hFSWiAe/Q6IkVPDw+mw==", "license": "MIT", + "peer": true, "dependencies": { "@babel/core": "^7.19.6", "@svgr/babel-preset": "^6.5.1", @@ -10273,6 +10250,7 @@ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.23.tgz", "integrity": "sha512-/LDXMQh55EzZQ0uVAZmKKhfENivEvWz6E+EYzh+/MCjMhNsotd+ZHhBGIjFDTi6+fz0OhQQQLbTgdQIxxCsC0w==", "license": "MIT", + "peer": true, "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" @@ -11225,6 +11203,7 @@ "integrity": "sha512-tJxiPrWmzH8a+w9nLKlQMzAKX/7VjFs50MWgcAj7p9XQ7AQ9/35fByFYptgPELyLw+0aixTnC4pUWV+APcZ/kw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@testing-library/dom": "^10.4.0", "@testing-library/user-event": "^14.6.1", @@ -11428,6 +11407,7 @@ "integrity": "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@vitest/utils": "3.2.4", "pathe": "^2.0.3", @@ -11852,6 +11832,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -11929,6 +11910,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -11993,6 +11975,7 @@ "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.25.2.tgz", "integrity": "sha512-lYx98L6kb1VvXypbPI7Z54C4BJB2VT5QvOYthvPq6/POufZj+YdyeZSKjoLBKHJgGmYWQTHOKtcCTdKf98WOCA==", "license": "MIT", + "peer": true, "dependencies": { "@algolia/cache-browser-local-storage": "4.25.2", "@algolia/cache-common": "4.25.2", @@ -13137,6 +13120,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001726", "electron-to-chromium": "^1.5.173", @@ -13905,7 +13889,8 @@ "version": "5.65.19", "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.19.tgz", "integrity": "sha512-+aFkvqhaAVr1gferNMuN8vkTSrWIFvzlMV9I2KBLCWS2WpZ2+UAkZjlMZmEuT+gcXTi6RrGQCkWq1/bDtGqhIA==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/collapse-white-space": { "version": "1.0.6", @@ -14221,6 +14206,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -14549,6 +14535,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -15937,6 +15924,7 @@ "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -16209,6 +16197,7 @@ "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.9", @@ -16266,6 +16255,7 @@ "integrity": "sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "aria-query": "^5.3.2", "array-includes": "^3.1.8", @@ -16296,6 +16286,7 @@ "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "array-includes": "^3.1.8", "array.prototype.findlast": "^1.2.5", @@ -16329,6 +16320,7 @@ "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=10" }, @@ -18383,6 +18375,7 @@ "resolved": "https://registry.npmjs.org/hermes-eslint/-/hermes-eslint-0.26.0.tgz", "integrity": "sha512-SLMolASQQThPQ372LkA1z0GOSUtJ8LOsLolQnvskRiVfnoU+pVlR69cD75q3aEAncVGoAw+ZX+fFpMsBmVj0Gg==", "license": "MIT", + "peer": true, "dependencies": { "esrecurse": "^4.3.0", "hermes-estree": "0.26.0", @@ -21638,6 +21631,7 @@ "integrity": "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "cssstyle": "^4.2.1", "data-urls": "^5.0.0", @@ -22959,6 +22953,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -24291,6 +24286,7 @@ "url": "https://github.com/sponsors/ai" } ], + "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -24756,6 +24752,7 @@ "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -24989,6 +24986,7 @@ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", "license": "MIT", + "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -25084,6 +25082,7 @@ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "license": "MIT", + "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -25099,6 +25098,7 @@ "resolved": "https://registry.npmjs.org/prettier-plugin-hermes-parser/-/prettier-plugin-hermes-parser-0.26.0.tgz", "integrity": "sha512-ajjlx/0OQ+lcZQEnKEUDU7Srr9vw1OoMO6qZDIYmck1u7j9STiCStqb3RG1vE7FripXYAhquuI+oYG8BCTNC4g==", "license": "MIT", + "peer": true, "dependencies": { "hermes-estree": "0.26.0", "hermes-parser": "0.26.0", @@ -25481,6 +25481,7 @@ "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -25626,6 +25627,7 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", @@ -25699,6 +25701,7 @@ "resolved": "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz", "integrity": "sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ==", "license": "MIT", + "peer": true, "dependencies": { "@types/react": "*", "prop-types": "^15.6.2" @@ -25728,6 +25731,7 @@ "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", "dev": true, + "peer": true, "engines": { "node": ">=0.10.0" } @@ -25737,6 +25741,7 @@ "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.3.4.tgz", "integrity": "sha512-Ys9K+ppnJah3QuaRiLxk+jDWOR1MekYQrlytiXxC1RyfbdsZkS5pvKAzCCr031xHixZwpnsYNT5xysdFHQaYsA==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.12.13", "history": "^4.9.0", @@ -26309,6 +26314,7 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz", "integrity": "sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ==", "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/generator": "^7.12.5", @@ -26773,6 +26779,7 @@ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.45.1.tgz", "integrity": "sha512-4iya7Jb76fVpQyLoiVpzUrsjQ12r3dM7fIVz+4NwoYvZOShknRmiv+iu9CClZml5ZLGb0XMcYLutK6w9tgxHDw==", "license": "MIT", + "peer": true, "dependencies": { "@types/estree": "1.0.8" }, @@ -27957,6 +27964,7 @@ "integrity": "sha512-X8YSQMNuqV9DklQLZH6mLKpDn15Z5tuUUTAIYsiGqx5BwsjtXnv5K04fXgl3jqTZyUauzV/ii8KdT04NVLtMwQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@storybook/global": "^5.0.0", "@testing-library/jest-dom": "^6.6.3", @@ -28895,6 +28903,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -29120,6 +29129,7 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -29363,7 +29373,8 @@ "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" + "license": "0BSD", + "peer": true }, "node_modules/type-check": { "version": "0.4.0", @@ -29504,6 +29515,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -29572,6 +29584,7 @@ "integrity": "sha512-VGMpFQGUQWYT9LfnPcX8ouFojyrZ/2w3K5BucvxL/spdNehccKhB4jUyB1yBCXpr2XFm0jkECxgrpXBW2ipoAw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.44.0", "@typescript-eslint/types": "8.44.0", @@ -30598,6 +30611,7 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -30680,27 +30694,13 @@ } } }, - "node_modules/vite-node/node_modules/yaml": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz", - "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==", - "dev": true, - "license": "ISC", - "optional": true, - "peer": true, - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14.6" - } - }, "node_modules/vitest": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz", "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/chai": "^5.2.2", "@vitest/expect": "3.2.4", @@ -30829,6 +30829,7 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -30842,6 +30843,7 @@ "integrity": "sha512-SRYIB8t/isTwNn8vMB3MR6E+EQZM/WG1aKmmIUCfDXfVvKfc20ZpamngWHKzAmmu9ppsgxsg4b2I7c90JZudIQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", @@ -30911,21 +30913,6 @@ } } }, - "node_modules/vitest/node_modules/yaml": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz", - "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==", - "dev": true, - "license": "ISC", - "optional": true, - "peer": true, - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14.6" - } - }, "node_modules/vscode-uri": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.1.0.tgz", @@ -31021,6 +31008,7 @@ "version": "5.101.3", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.101.3.tgz", "integrity": "sha512-7b0dTKR3Ed//AD/6kkx/o7duS8H3f1a4w3BYpIriX4BzIhjkn4teo05cptsxvLesHFKK5KObnadmCHBwGc+51A==", + "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.8", @@ -31125,6 +31113,7 @@ "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", "dev": true, + "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^2.1.1", @@ -31247,6 +31236,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -31368,6 +31358,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -31488,6 +31479,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -32199,6 +32191,7 @@ "version": "4.0.3", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -32263,7 +32256,8 @@ "dependencies": { "css-shorthand-expand": "^1.2.0", "micromatch": "^4.0.5", - "postcss-value-parser": "^4.2.0" + "postcss-value-parser": "^4.2.0", + "style-value-parser": "*" } }, "packages/@stylexjs/postcss-plugin": { @@ -32338,6 +32332,7 @@ "version": "4.0.3", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -32438,6 +32433,7 @@ "version": "4.0.3", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, diff --git a/packages/@stylexjs/babel-plugin/__tests__/validation-stylex-create-test.js b/packages/@stylexjs/babel-plugin/__tests__/validation-stylex-create-test.js index e7357bf36..af5bdfa24 100644 --- a/packages/@stylexjs/babel-plugin/__tests__/validation-stylex-create-test.js +++ b/packages/@stylexjs/babel-plugin/__tests__/validation-stylex-create-test.js @@ -591,6 +591,78 @@ describe('@stylexjs/babel-plugin', () => { }).toThrow(messages.INVALID_PSEUDO_OR_AT_RULE); }); + test('soft validation: invalid media query does not throw with softMediaQueryValidation enabled', () => { + const consoleWarnSpy = jest + .spyOn(console, 'warn') + .mockImplementation(() => {}); + + expect(() => { + transform( + ` + import * as stylex from '@stylexjs/stylex'; + const styles = stylex.create({ + root: { + 'color': { + '@media not ((not (min-width: 400px))': 'blue' + }, + }, + }); + `, + { enableMediaQueryOrder: true, softMediaQueryValidation: true }, + ); + }).not.toThrow(); + + expect(consoleWarnSpy).toHaveBeenCalledWith( + expect.stringContaining('Invalid media query syntax'), + ); + + consoleWarnSpy.mockRestore(); + }); + + test('soft validation: invalid media query still throws without softMediaQueryValidation', () => { + expect(() => { + transform( + ` + import * as stylex from '@stylexjs/stylex'; + const styles = stylex.create({ + root: { + 'color': { + '@media not ((not (min-width: 400px))': 'blue' + }, + }, + }); + `, + { enableMediaQueryOrder: true, softMediaQueryValidation: false }, + ); + }).toThrow(messages.INVALID_MEDIA_QUERY_SYNTAX); + }); + + test('soft validation: valid media query does not warn', () => { + const consoleWarnSpy = jest + .spyOn(console, 'warn') + .mockImplementation(() => {}); + + expect(() => { + transform( + ` + import * as stylex from '@stylexjs/stylex'; + const styles = stylex.create({ + root: { + 'color': { + '@media (min-width: 768px)': 'blue' + }, + }, + }); + `, + { enableMediaQueryOrder: true, softMediaQueryValidation: true }, + ); + }).not.toThrow(); + + expect(consoleWarnSpy).not.toHaveBeenCalled(); + + consoleWarnSpy.mockRestore(); + }); + test('valid object value: key is "default"', () => { expect(() => { transform(` diff --git a/packages/@stylexjs/babel-plugin/src/shared/common-types.js b/packages/@stylexjs/babel-plugin/src/shared/common-types.js index f6ba91c18..1d4291718 100644 --- a/packages/@stylexjs/babel-plugin/src/shared/common-types.js +++ b/packages/@stylexjs/babel-plugin/src/shared/common-types.js @@ -53,6 +53,7 @@ export type StyleXOptions = $ReadOnly<{ enableDevClassNames?: ?boolean, enableFontSizePxToRem?: ?boolean, enableMediaQueryOrder?: ?boolean, + softMediaQueryValidation?: ?boolean, enableLegacyValueFlipping?: ?boolean, enableLogicalStylesPolyfill?: ?boolean, enableLTRRTLComments?: ?boolean, diff --git a/packages/@stylexjs/babel-plugin/src/shared/preprocess-rules/flatten-raw-style-obj.js b/packages/@stylexjs/babel-plugin/src/shared/preprocess-rules/flatten-raw-style-obj.js index 22f1637b9..5d9ec5487 100644 --- a/packages/@stylexjs/babel-plugin/src/shared/preprocess-rules/flatten-raw-style-obj.js +++ b/packages/@stylexjs/babel-plugin/src/shared/preprocess-rules/flatten-raw-style-obj.js @@ -31,7 +31,17 @@ export function flattenRawStyleObject( ? lastMediaQueryWinsTransform(style) : style; } catch (error) { - throw new Error(messages.INVALID_MEDIA_QUERY_SYNTAX); + if (options.softMediaQueryValidation) { + console.warn( + `StyleX: ${messages.INVALID_MEDIA_QUERY_SYNTAX}\n` + + 'Media query order will not be respected. ' + + 'This could be due to invalid media query syntax or unsupported edge cases in style-value-parser.\n' + + `Error: ${error.message || error}`, + ); + processedStyle = style; + } else { + throw new Error(messages.INVALID_MEDIA_QUERY_SYNTAX); + } } return _flattenRawStyleObject(processedStyle, [], options); } diff --git a/packages/@stylexjs/babel-plugin/src/shared/utils/default-options.js b/packages/@stylexjs/babel-plugin/src/shared/utils/default-options.js index 49af17ada..14baffce5 100644 --- a/packages/@stylexjs/babel-plugin/src/shared/utils/default-options.js +++ b/packages/@stylexjs/babel-plugin/src/shared/utils/default-options.js @@ -18,6 +18,7 @@ export const defaultOptions: StyleXOptions = { enableDebugDataProp: true, enableFontSizePxToRem: false, enableMediaQueryOrder: false, + softMediaQueryValidation: false, enableLegacyValueFlipping: false, enableLogicalStylesPolyfill: false, enableLTRRTLComments: false, diff --git a/packages/@stylexjs/babel-plugin/src/utils/state-manager.js b/packages/@stylexjs/babel-plugin/src/utils/state-manager.js index c11f8c089..d2ad30b33 100644 --- a/packages/@stylexjs/babel-plugin/src/utils/state-manager.js +++ b/packages/@stylexjs/babel-plugin/src/utils/state-manager.js @@ -97,6 +97,7 @@ export type StyleXOptions = $ReadOnly<{ enableDevClassNames?: boolean, enableInlinedConditionalMerge?: boolean, enableMediaQueryOrder?: boolean, + softMediaQueryValidation?: boolean, enableLegacyValueFlipping?: boolean, enableLogicalStylesPolyfill?: boolean, enableLTRRTLComments?: boolean, @@ -254,6 +255,14 @@ export default class StateManager { 'options.enableMediaQueryOrder', ); + const softMediaQueryValidation: StyleXStateOptions['softMediaQueryValidation'] = + z.logAndDefault( + z.boolean(), + options.softMediaQueryValidation ?? false, + false, + 'options.softMediaQueryValidation', + ); + const enableLegacyValueFlipping: StyleXStateOptions['enableLegacyValueFlipping'] = z.logAndDefault( z.boolean(), @@ -388,6 +397,7 @@ export default class StateManager { enableInlinedConditionalMerge, enableMinifiedKeys, enableMediaQueryOrder, + softMediaQueryValidation, enableLegacyValueFlipping, enableLogicalStylesPolyfill, enableLTRRTLComments, diff --git a/packages/@stylexjs/eslint-plugin/__tests__/stylex-transform-media-queries-test.js b/packages/@stylexjs/eslint-plugin/__tests__/stylex-transform-media-queries-test.js new file mode 100644 index 000000000..5c8f68b65 --- /dev/null +++ b/packages/@stylexjs/eslint-plugin/__tests__/stylex-transform-media-queries-test.js @@ -0,0 +1,83 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +'use strict'; + +jest.disableAutomock(); + +const { RuleTester: ESLintTester } = require('eslint'); +const rule = require('../src/stylex-transform-media-queries'); + +const eslintTester = new ESLintTester({ + parser: require.resolve('hermes-eslint'), + parserOptions: { + ecmaVersion: 6, + sourceType: 'module', + }, +}); + +eslintTester.run('stylex-transform-media-queries', rule.default, { + valid: [ + { + code: ` + import * as stylex from '@stylexjs/stylex'; + const styles = stylex.create({ + main: { + color: 'red', + }, + }) + `, + }, + { + code: ` + import * as stylex from '@stylexjs/stylex'; + const styles = stylex.create({ + main: { + color: { + default: 'yellow', + '@media (min-width: 768px)': 'blue', + '@media (min-width: 1024px)': 'green', + }, + }, + }) + `, + }, + { + code: ` + import * as stylex from '@stylexjs/stylex'; + const styles = stylex.create({ + main: { + color: { + '@media (max-width: 768px)': 'red', + default: 'blue', + }, + }, + }) + `, + }, + ], + invalid: [ + { + code: ` + import * as stylex from '@stylexjs/stylex'; + const styles = stylex.create({ + main: { + color: { + '@media not ((not (min-width: 400px))': 'blue', + }, + }, + }) + `, + errors: [ + { + message: + /Media query order may not be respected\. Invalid media query syntax or unsupported edge cases in style-value-parser\. Error:/, + }, + ], + }, + ], +}); diff --git a/packages/@stylexjs/eslint-plugin/package.json b/packages/@stylexjs/eslint-plugin/package.json index f9d58a9f0..c2c266d33 100644 --- a/packages/@stylexjs/eslint-plugin/package.json +++ b/packages/@stylexjs/eslint-plugin/package.json @@ -18,7 +18,8 @@ "dependencies": { "css-shorthand-expand": "^1.2.0", "micromatch": "^4.0.5", - "postcss-value-parser": "^4.2.0" + "postcss-value-parser": "^4.2.0", + "style-value-parser": "*" }, "files": [ "flow_modules/*", diff --git a/packages/@stylexjs/eslint-plugin/src/index.js b/packages/@stylexjs/eslint-plugin/src/index.js index 0d418c4ea..e147b2be4 100644 --- a/packages/@stylexjs/eslint-plugin/src/index.js +++ b/packages/@stylexjs/eslint-plugin/src/index.js @@ -15,6 +15,7 @@ import noUnused from './stylex-no-unused'; import sortKeys from './stylex-sort-keys'; import validShorthands from './stylex-valid-shorthands'; import validStyles from './stylex-valid-styles'; +import transformMediaQueries from './stylex-transform-media-queries'; const rules: { 'enforce-extension': typeof enforceExtension, @@ -25,6 +26,7 @@ const rules: { 'sort-keys': typeof sortKeys, 'valid-shorthands': typeof validShorthands, 'valid-styles': typeof validStyles, + 'transform-media-queries': typeof transformMediaQueries, } = { 'enforce-extension': enforceExtension, 'no-legacy-contextual-styles': noLegacyContextualStyles, @@ -34,6 +36,7 @@ const rules: { 'sort-keys': sortKeys, 'valid-shorthands': validShorthands, 'valid-styles': validStyles, + 'transform-media-queries': transformMediaQueries, }; export { rules }; diff --git a/packages/@stylexjs/eslint-plugin/src/stylex-transform-media-queries.js b/packages/@stylexjs/eslint-plugin/src/stylex-transform-media-queries.js new file mode 100644 index 000000000..f8d61dbcb --- /dev/null +++ b/packages/@stylexjs/eslint-plugin/src/stylex-transform-media-queries.js @@ -0,0 +1,227 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow strict + */ + +'use strict'; + +import type { CallExpression, Node, Property, ObjectExpression } from 'estree'; +import createImportTracker from './utils/createImportTracker'; +import { lastMediaQueryWinsTransform } from 'style-value-parser'; +/*:: import { Rule } from 'eslint'; */ + +const stylexTransformMediaQueries = { + meta: { + type: 'problem', + docs: { + description: + 'Warn when media query syntax order is not properly enforced due to invalid media query syntax or parser limitations', + recommended: false, + url: 'https://github.com/facebook/stylex/tree/main/packages/@stylexjs/eslint-plugin', + }, + schema: [ + { + type: 'object', + properties: { + validImports: { + type: 'array', + items: { + oneOf: [ + { type: 'string' }, + { + type: 'object', + properties: { + from: { type: 'string' }, + as: { type: 'string' }, + }, + }, + ], + }, + default: ['stylex', '@stylexjs/stylex'], + }, + }, + additionalProperties: false, + }, + ], + }, + create(context: Rule.RuleContext): { ... } { + const options = context.options[0] || {}; + const { validImports: importsToLookFor = ['stylex', '@stylexjs/stylex'] } = + options; + + const importTracker = createImportTracker(importsToLookFor); + + function isStylexCreateCallee(node: Node) { + return ( + (node.type === 'MemberExpression' && + node.object.type === 'Identifier' && + importTracker.isStylexDefaultImport(node.object.name) && + node.property.type === 'Identifier' && + node.property.name === 'create') || + (node.type === 'Identifier' && + importTracker.isStylexNamedImport('create', node.name)) + ); + } + + function findMediaQueries( + obj: ObjectExpression, + path: string[] = [], + ): Property[] { + const mediaQueryProps: Property[] = []; + + for (const prop of obj.properties) { + if (prop.type === 'SpreadElement') { + continue; + } + + if (prop.computed) { + continue; + } + + let key; + if (prop.key.type === 'Identifier') { + key = prop.key.name; + } else if (prop.key.type === 'Literal') { + key = String(prop.key.value); + } else { + continue; + } + + if (key.startsWith('@media')) { + mediaQueryProps.push(prop); + } + + if (prop.value.type === 'ObjectExpression') { + mediaQueryProps.push(...findMediaQueries(prop.value, [...path, key])); + } + } + + return mediaQueryProps; + } + + function validateStyleObject(obj: ObjectExpression) { + const styleObj: { [string]: mixed } = {}; + + for (const prop of obj.properties) { + if (prop.type === 'SpreadElement') { + continue; + } + + if (prop.computed) { + continue; + } + + let key; + if (prop.key.type === 'Identifier') { + key = prop.key.name; + } else if (prop.key.type === 'Literal') { + key = String(prop.key.value); + } else { + continue; + } + + if (prop.value.type === 'ObjectExpression') { + const nestedObj = extractObjectForValidation(prop.value); + if (nestedObj) { + styleObj[key] = nestedObj; + } + } else if (prop.value.type === 'Literal') { + styleObj[key] = prop.value.value; + } + } + + try { + lastMediaQueryWinsTransform(styleObj); + } catch (error) { + const mediaQueryProps = findMediaQueries(obj); + + for (const prop of mediaQueryProps) { + context.report({ + node: prop, + message: + 'Media query order may not be respected. ' + + 'Invalid media query syntax or unsupported edge cases in style-value-parser. ' + + `Error: ${error.message || error}`, + }); + } + } + } + + function extractObjectForValidation(obj: ObjectExpression): mixed { + const result: { [string]: mixed } = {}; + + for (const prop of obj.properties) { + if (prop.type === 'SpreadElement') { + continue; + } + + if (prop.computed) { + continue; + } + + let key; + if (prop.key.type === 'Identifier') { + key = prop.key.name; + } else if (prop.key.type === 'Literal') { + key = String(prop.key.value); + } else { + continue; + } + + if (prop.value.type === 'ObjectExpression') { + result[key] = extractObjectForValidation(prop.value); + } else if (prop.value.type === 'Literal') { + result[key] = prop.value.value; + } else if (prop.value.type === 'ArrayExpression') { + const arr: Array = []; + for (const elem of prop.value.elements) { + if (elem && elem.type === 'Literal') { + arr.push(elem.value); + } + } + result[key] = arr; + } + } + + return result; + } + + function validateCallExpression(node: CallExpression) { + if (node.arguments.length === 0) { + return; + } + + const firstArg = node.arguments[0]; + if (firstArg.type !== 'ObjectExpression') { + return; + } + + for (const prop of firstArg.properties) { + if (prop.type === 'SpreadElement') { + continue; + } + + if (prop.value.type === 'ObjectExpression') { + validateStyleObject(prop.value); + } + } + } + + return { + ImportDeclaration: importTracker.ImportDeclaration, + CallExpression(node: CallExpression) { + if (!isStylexCreateCallee(node.callee)) { + return; + } + + validateCallExpression(node); + }, + }; + }, +}; + +export default stylexTransformMediaQueries; diff --git a/packages/style-value-parser/package.json b/packages/style-value-parser/package.json index f6cc6b819..f40de1eb9 100644 --- a/packages/style-value-parser/package.json +++ b/packages/style-value-parser/package.json @@ -2,7 +2,6 @@ "private": true, "name": "style-value-parser", "version": "0.16.2", - "type": "module", "main": "lib/index.js", "license": "MIT", "scripts": {