diff --git a/package-lock.json b/package-lock.json index aa88a755..513d563c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,30 +13,71 @@ "@playwright/browser-chromium": "^1.49.0", "@stylable/cli": "^6.1.1", "@stylable/esbuild": "^6.1.1", + "@testing-library/react": "^16.1.0", "@types/chai": "^4.3.20", "@types/mocha": "^10.0.10", "@types/node": "20", - "@types/react": "^18.3.12", - "@types/react-dom": "^18.3.1", - "@wixc3/board-core": "^4.6.0", - "@wixc3/react-board": "^4.6.0", + "@types/react": "^19.0.1", + "@types/react-dom": "^19.0.1", + "@wixc3/board-core": "^4.6.2", + "@wixc3/react-board": "^4.6.2", "chai": "^4.5.0", "esbuild": "^0.24.0", "eslint": "^9.16.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-no-only-tests": "^3.3.0", "eslint-plugin-react": "^7.37.2", - "eslint-plugin-react-hooks": "^5.0.0", + "eslint-plugin-react-hooks": "^5.1.0", "glob": "^11.0.0", "mocha": "^11.0.1", "mocha-web": "^2.0.0", "prettier": "^3.4.2", "promise-assist": "^2.0.1", - "react": "^18.3.1", - "react-dom": "^18.3.1", + "react": "^19.0.0", + "react-dom": "^19.0.0", "rimraf": "^6.0.1", "typescript": "~5.7.2", - "typescript-eslint": "^8.17.0" + "typescript-eslint": "^8.18.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@esbuild/aix-ppc64": { @@ -490,13 +531,13 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.0.tgz", - "integrity": "sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ==", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.1.tgz", + "integrity": "sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/object-schema": "^2.1.4", + "@eslint/object-schema": "^2.1.5", "debug": "^4.3.1", "minimatch": "^3.1.2" }, @@ -529,11 +570,14 @@ } }, "node_modules/@eslint/core": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.0.tgz", - "integrity": "sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.1.tgz", + "integrity": "sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q==", "dev": true, "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } @@ -597,9 +641,9 @@ } }, "node_modules/@eslint/object-schema": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", - "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.5.tgz", + "integrity": "sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==", "dev": true, "license": "Apache-2.0", "engines": { @@ -607,9 +651,9 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz", - "integrity": "sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==", + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz", + "integrity": "sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -984,6 +1028,55 @@ "node": ">=18.12.0" } }, + "node_modules/@testing-library/dom": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz", + "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.3.0", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "pretty-format": "^27.0.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@testing-library/react": { + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-16.1.0.tgz", + "integrity": "sha512-Q2ToPvg0KsVL0ohND9A3zLJWcOXXcO8IDu3fj11KhNt0UlCWyFyvnCIBkd12tidB2lkiVRG8VFqdhcqhqnAQtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.12.5" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@testing-library/dom": "^10.0.0", + "@types/react": "^18.0.0 || ^19.0.0", + "@types/react-dom": "^18.0.0 || ^19.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, "node_modules/@tokey/core": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@tokey/core/-/core-1.4.0.tgz", @@ -1021,6 +1114,14 @@ "@tokey/core": "^1.3.0" } }, + "node_modules/@types/aria-query": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", + "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", + "dev": true, + "license": "MIT", + "peer": true + }, "node_modules/@types/chai": { "version": "4.3.20", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", @@ -1059,28 +1160,20 @@ "undici-types": "~6.19.2" } }, - "node_modules/@types/prop-types": { - "version": "15.7.13", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.13.tgz", - "integrity": "sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/react": { - "version": "18.3.12", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.12.tgz", - "integrity": "sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==", + "version": "19.0.1", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.0.1.tgz", + "integrity": "sha512-YW6614BDhqbpR5KtUYzTA+zlA7nayzJRA9ljz9CQoxthR0sDisYZLuvSMsil36t4EH/uAt8T52Xb4sVw17G+SQ==", "dev": true, "license": "MIT", "dependencies": { - "@types/prop-types": "*", "csstype": "^3.0.2" } }, "node_modules/@types/react-dom": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.1.tgz", - "integrity": "sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==", + "version": "19.0.1", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.0.1.tgz", + "integrity": "sha512-hljHij7MpWPKF6u5vojuyfV0YA4YURsQG7KT6SzV0Zs2BXAtgdTxG6A229Ub/xiWV4w/7JL8fi6aAyjshH4meA==", "dev": true, "license": "MIT", "dependencies": { @@ -1088,17 +1181,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.17.0.tgz", - "integrity": "sha512-HU1KAdW3Tt8zQkdvNoIijfWDMvdSweFYm4hWh+KwhPstv+sCmWb89hCIP8msFm9N1R/ooh9honpSuvqKWlYy3w==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.0.tgz", + "integrity": "sha512-NR2yS7qUqCL7AIxdJUQf2MKKNDVNaig/dEB0GBLU7D+ZdHgK1NoH/3wsgO3OnPVipn51tG3MAwaODEGil70WEw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.17.0", - "@typescript-eslint/type-utils": "8.17.0", - "@typescript-eslint/utils": "8.17.0", - "@typescript-eslint/visitor-keys": "8.17.0", + "@typescript-eslint/scope-manager": "8.18.0", + "@typescript-eslint/type-utils": "8.18.0", + "@typescript-eslint/utils": "8.18.0", + "@typescript-eslint/visitor-keys": "8.18.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -1113,25 +1206,21 @@ }, "peerDependencies": { "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", - "eslint": "^8.57.0 || ^9.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.17.0.tgz", - "integrity": "sha512-Drp39TXuUlD49F7ilHHCG7TTg8IkA+hxCuULdmzWYICxGXvDXmDmWEjJYZQYgf6l/TFfYNE167m7isnc3xlIEg==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.0.tgz", + "integrity": "sha512-hgUZ3kTEpVzKaK3uNibExUYm6SKKOmTU2BOxBSvOYwtJEPdVQ70kZJpPjstlnhCHcuc2WGfSbpKlb/69ttyN5Q==", "dev": true, - "license": "BSD-2-Clause", + "license": "MITClause", "dependencies": { - "@typescript-eslint/scope-manager": "8.17.0", - "@typescript-eslint/types": "8.17.0", - "@typescript-eslint/typescript-estree": "8.17.0", - "@typescript-eslint/visitor-keys": "8.17.0", + "@typescript-eslint/scope-manager": "8.18.0", + "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/typescript-estree": "8.18.0", + "@typescript-eslint/visitor-keys": "8.18.0", "debug": "^4.3.4" }, "engines": { @@ -1142,23 +1231,19 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.17.0.tgz", - "integrity": "sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.0.tgz", + "integrity": "sha512-PNGcHop0jkK2WVYGotk/hxj+UFLhXtGPiGtiaWgVBVP1jhMoMCHlTyJA+hEj4rszoSdLTK3fN4oOatrL0Cp+Xw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.17.0", - "@typescript-eslint/visitor-keys": "8.17.0" + "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/visitor-keys": "8.18.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1169,14 +1254,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.17.0.tgz", - "integrity": "sha512-q38llWJYPd63rRnJ6wY/ZQqIzPrBCkPdpIsaCfkR3Q4t3p6sb422zougfad4TFW9+ElIFLVDzWGiGAfbb/v2qw==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.18.0.tgz", + "integrity": "sha512-er224jRepVAVLnMF2Q7MZJCq5CsdH2oqjP4dT7K6ij09Kyd+R21r7UVJrF0buMVdZS5QRhDzpvzAxHxabQadow==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.17.0", - "@typescript-eslint/utils": "8.17.0", + "@typescript-eslint/typescript-estree": "8.18.0", + "@typescript-eslint/utils": "8.18.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -1188,18 +1273,14 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" } }, "node_modules/@typescript-eslint/types": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.17.0.tgz", - "integrity": "sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.0.tgz", + "integrity": "sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA==", "dev": true, "license": "MIT", "engines": { @@ -1211,14 +1292,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.17.0.tgz", - "integrity": "sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.0.tgz", + "integrity": "sha512-rqQgFRu6yPkauz+ms3nQpohwejS8bvgbPyIDq13cgEDbkXt4LH4OkDMT0/fN1RUtzG8e8AKJyDBoocuQh8qNeg==", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.17.0", - "@typescript-eslint/visitor-keys": "8.17.0", + "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/visitor-keys": "8.18.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1233,10 +1314,8 @@ "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "peerDependencies": { + "typescript": ">=4.8.4 <5.8.0" } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { @@ -1253,16 +1332,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.17.0.tgz", - "integrity": "sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.0.tgz", + "integrity": "sha512-p6GLdY383i7h5b0Qrfbix3Vc3+J2k6QWw6UMUeY5JGfm3C5LbZ4QIZzJNoNOfgyRe0uuYKjvVOsO/jD4SJO+xg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.17.0", - "@typescript-eslint/types": "8.17.0", - "@typescript-eslint/typescript-estree": "8.17.0" + "@typescript-eslint/scope-manager": "8.18.0", + "@typescript-eslint/types": "8.18.0", + "@typescript-eslint/typescript-estree": "8.18.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1272,22 +1351,18 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.17.0.tgz", - "integrity": "sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.0.tgz", + "integrity": "sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/types": "8.18.0", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -1299,24 +1374,24 @@ } }, "node_modules/@wixc3/board-core": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@wixc3/board-core/-/board-core-4.6.0.tgz", - "integrity": "sha512-uS5Td4qC+acMqNVS+hSlkI18kX1lJpCXcWVx78UO7JxQby0WKY51FEMNMhx3AQi8hE37mUwbFYM7LQwCuszCUQ==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@wixc3/board-core/-/board-core-4.6.2.tgz", + "integrity": "sha512-cNh2FSVam9DPwXCdi6k6bTBueJK6XvVaXUGSUnrXtCaw1FjOdiY0ts301wRf6ejVq5MYvBEoQ/WO/lPfDGsE6g==", "dev": true, "license": "MIT" }, "node_modules/@wixc3/react-board": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@wixc3/react-board/-/react-board-4.6.0.tgz", - "integrity": "sha512-g+i2xYt1BZnPE6EEzR8I51KeMVm2MfcwmkNn9tby8Vvb4XRNiwH1HGukN8fUmZpXJnQXVygYqne3GUvag2cURQ==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@wixc3/react-board/-/react-board-4.6.2.tgz", + "integrity": "sha512-7PyqEQE+sdyNNMDy7ZJdsP3nyhNtKMIgVAQbi1Rd1tBW+45hl1bq930qpiVwHDVwrEEbyq9vNN9ZsSuvAZAqqw==", "dev": true, "license": "MIT", "dependencies": { - "@wixc3/board-core": "^4.6.0" + "@wixc3/board-core": "^4.6.2" }, "peerDependencies": { - "react": ">=18.0.0 || ^19.0.0-rc.0", - "react-dom": ">=18.0.0 || ^19.0.0-rc.0" + "react": ">=18.0.0", + "react-dom": ">=18.0.0" } }, "node_modules/@wixc3/resolve-directory-context": { @@ -1333,45 +1408,6 @@ "node": ">=16" } }, - "node_modules/@zeejs/browser": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@zeejs/browser/-/browser-0.3.1.tgz", - "integrity": "sha512-mAW+6MM6desg45GEIFcTySxzUDdtvbkSI1KSHAoqsLMIH5b42xqzz8NNXyRleR9CsDxd+YAUUyKEhY6HTf2u6A==", - "license": "MIT", - "dependencies": { - "@zeejs/core": "^0.3.1", - "tabbable": "^5.2.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@zeejs/core": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@zeejs/core/-/core-0.3.1.tgz", - "integrity": "sha512-Yeeqyhe+g8ISbxxW80eUMDeX2NyRlrhissjALaLU9OD86iVnwXN3kbWvBq2B1L56tUUQLESMDC878Y/1euhQVQ==", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/@zeejs/react": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@zeejs/react/-/react-0.3.1.tgz", - "integrity": "sha512-1Jv/FsUOa0n6dBjZRodwPYZBx/X9KVozrdgRP0hgnmmIjasKxqdIwN2wKyzEKGJiiXorXKGtDkWStWKkHoSzaw==", - "license": "MIT", - "dependencies": { - "@zeejs/browser": "^0.3.1", - "@zeejs/core": "^0.3.1" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "react": ">=16", - "react-dom": ">=16" - } - }, "node_modules/abbrev": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", @@ -1447,16 +1483,13 @@ } }, "node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "node": ">=8" } }, "node_modules/ansi-styles": { @@ -1496,6 +1529,17 @@ "dev": true, "license": "Python-2.0" }, + "node_modules/aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "dequal": "^2.0.3" + } + }, "node_modules/array-buffer-byte-length": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", @@ -1769,17 +1813,16 @@ } }, "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", "dev": true, "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "set-function-length": "^1.2.2" }, "engines": { "node": ">= 0.4" @@ -1788,6 +1831,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/callsite": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", @@ -1932,16 +1989,6 @@ "node": ">=12" } }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/cliui/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -2200,9 +2247,9 @@ } }, "node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { @@ -2306,6 +2353,17 @@ "node": ">= 0.8" } }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/destroy": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", @@ -2353,6 +2411,29 @@ "node": ">=0.10.0" } }, + "node_modules/dom-accessibility-api": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", + "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/dunder-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.0.tgz", + "integrity": "sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -2494,14 +2575,11 @@ } }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "dev": true, "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, "engines": { "node": ">= 0.4" } @@ -2786,9 +2864,9 @@ } }, "node_modules/eslint-plugin-react-hooks": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.0.0.tgz", - "integrity": "sha512-hIOwI+5hYGpJEc4uPRmz2ulCjAGD/N13Lukkh8cLV0i2IRk/bdZDYjgLVHj+U9Z704kLIdIO6iueGvxNur0sgw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.1.0.tgz", + "integrity": "sha512-mpJRtPgHN2tNAvZ35AMfqeB3Xqeo273QxrHJsbBEPWODRM4r0yB6jfoROqKEYrOn27UtRPpcpHc2UqyBSuUNTw==", "dev": true, "license": "MIT", "engines": { @@ -2951,9 +3029,9 @@ } }, "node_modules/express": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", - "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "dev": true, "license": "MIT", "dependencies": { @@ -2976,7 +3054,7 @@ "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.10", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", "qs": "6.13.0", "range-parser": "~1.2.1", @@ -2991,6 +3069,10 @@ }, "engines": { "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/express/node_modules/debug": { @@ -3323,17 +3405,20 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.5.tgz", + "integrity": "sha512-Y4+pKa7XeRUPWFNvOOYHkRYrfzW07oraURSvjDmRVOJ748OrVmeXtpE4+GCEHncjCjkTxPNRt8kEbxDhsn6VTg==", "dev": true, "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "dunder-proto": "^1.0.0", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -3444,14 +3529,11 @@ } }, "node_modules/gopd": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.1.0.tgz", - "integrity": "sha512-FQoVQnqcdk4hVM4JN1eromaun4iuS34oStkdlLENLdpULsuQcTyXj8w7ayhuUfPwEYZ1ZOooOTT6fdA9Vmx/RA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", "dev": true, "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, "engines": { "node": ">= 0.4" }, @@ -3500,13 +3582,13 @@ } }, "node_modules/has-proto": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.1.0.tgz", - "integrity": "sha512-QLdzI9IIO1Jg7f9GT1gXpPpXArAn6cS31R1eEZqz08Gc+uQ8/XiqHWt17Fiw+2p6oTTIq5GXEpQkAlA88YRl/Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7" + "dunder-proto": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -4257,6 +4339,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, "license": "MIT" }, "node_modules/js-yaml": { @@ -4644,6 +4727,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, "license": "MIT", "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" @@ -4672,6 +4756,17 @@ "node": "20 || >=22" } }, + "node_modules/lz-string": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", + "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "lz-string": "bin/bin.js" + } + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -4965,16 +5060,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mocha/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/mocha/node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -5486,9 +5571,9 @@ } }, "node_modules/path-to-regexp": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", "dev": true, "license": "MIT" }, @@ -5694,6 +5779,36 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/promise-assist": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/promise-assist/-/promise-assist-2.0.1.tgz", @@ -5716,6 +5831,13 @@ "react-is": "^16.13.1" } }, + "node_modules/prop-types/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true, + "license": "MIT" + }, "node_modules/proto-list": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", @@ -5821,36 +5943,34 @@ } }, "node_modules/react": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", - "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz", + "integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==", "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - }, "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", - "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0.tgz", + "integrity": "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==", + "dev": true, "license": "MIT", "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.2" + "scheduler": "^0.25.0" }, "peerDependencies": { - "react": "^18.3.1" + "react": "^19.0.0" } }, "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/readdirp": { "version": "3.6.0", @@ -5866,19 +5986,20 @@ } }, "node_modules/reflect.getprototypeof": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.7.tgz", - "integrity": "sha512-bMvFGIUKlc/eSfXNX+aZ+EL95/EgZzuwA0OBPTbZZDEJw/0AkentjMuM1oiRfwHrshqk4RzdgiTg5CcDalXN5g==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.8.tgz", + "integrity": "sha512-B5dj6usc5dkk8uFliwjwDHM8To5/QwdKz9JcBZ8Ic4G1f0YmeeJTtE/ZTdgRFPAfxZFiUaPhZ1Jcs4qeagItGQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", + "dunder-proto": "^1.0.0", "es-abstract": "^1.23.5", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "which-builtin-type": "^1.1.4" + "gopd": "^1.2.0", + "which-builtin-type": "^1.2.0" }, "engines": { "node": ">= 0.4" @@ -5887,6 +6008,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true, + "license": "MIT" + }, "node_modules/regexp.prototype.flags": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz", @@ -6065,13 +6193,11 @@ "license": "MIT" }, "node_modules/scheduler": { - "version": "0.23.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", - "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - } + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0.tgz", + "integrity": "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==", + "dev": true, + "license": "MIT" }, "node_modules/scroll-into-view-if-needed": { "version": "3.1.0", @@ -6333,16 +6459,6 @@ "node": ">=8" } }, - "node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/string-width-cjs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -6483,14 +6599,17 @@ "node": ">=8" } }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "node_modules/strip-ansi/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, "node_modules/strip-json-comments": { @@ -6536,12 +6655,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/tabbable": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-5.3.3.tgz", - "integrity": "sha512-QD9qKY3StfbZqWOPLp0++pOrAVb/HbUi5xCc8cUo4XjP19808oaMiDzn0leBY5mCespIBM0CIZePzZjgzR83kA==", - "license": "MIT" - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -6721,15 +6834,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.17.0.tgz", - "integrity": "sha512-409VXvFd/f1br1DCbuKNFqQpXICoTB+V51afcwG1pn1a3Cp92MqAUges3YjwEdQ0cMUoCIodjVDAYzyD8h3SYA==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.18.0.tgz", + "integrity": "sha512-Xq2rRjn6tzVpAyHr3+nmSg1/9k9aIHnJ2iZeOH7cfGOWqTkXTm3kwpQglEuLGdNrYvPF+2gtAs+/KF5rjVo+WQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.17.0", - "@typescript-eslint/parser": "8.17.0", - "@typescript-eslint/utils": "8.17.0" + "@typescript-eslint/eslint-plugin": "8.18.0", + "@typescript-eslint/parser": "8.18.0", + "@typescript-eslint/utils": "8.18.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -6739,12 +6852,8 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" } }, "node_modules/unbox-primitive": { @@ -7014,16 +7123,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -7127,16 +7226,6 @@ "node": ">=10" } }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/yargs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -7200,7 +7289,6 @@ "version": "1.3.8", "license": "MIT", "dependencies": { - "@zeejs/react": "^0.3.1", "scroll-into-view-if-needed": "^3.1.0" }, "peerDependencies": { diff --git a/package.json b/package.json index 173f0d53..e9a9dc88 100644 --- a/package.json +++ b/package.json @@ -19,30 +19,31 @@ "@playwright/browser-chromium": "^1.49.0", "@stylable/cli": "^6.1.1", "@stylable/esbuild": "^6.1.1", + "@testing-library/react": "^16.1.0", "@types/chai": "^4.3.20", "@types/mocha": "^10.0.10", "@types/node": "20", - "@types/react": "^18.3.12", - "@types/react-dom": "^18.3.1", - "@wixc3/board-core": "^4.6.0", - "@wixc3/react-board": "^4.6.0", + "@types/react": "^19.0.1", + "@types/react-dom": "^19.0.1", + "@wixc3/board-core": "^4.6.2", + "@wixc3/react-board": "^4.6.2", "chai": "^4.5.0", "esbuild": "^0.24.0", "eslint": "^9.16.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-no-only-tests": "^3.3.0", "eslint-plugin-react": "^7.37.2", - "eslint-plugin-react-hooks": "^5.0.0", + "eslint-plugin-react-hooks": "^5.1.0", "glob": "^11.0.0", "mocha": "^11.0.1", "mocha-web": "^2.0.0", "prettier": "^3.4.2", "promise-assist": "^2.0.1", - "react": "^18.3.1", - "react-dom": "^18.3.1", + "react": "^19.0.0", + "react-dom": "^19.0.0", "rimraf": "^6.0.1", "typescript": "~5.7.2", - "typescript-eslint": "^8.17.0" + "typescript-eslint": "^8.18.0" }, "license": "MIT", "private": true diff --git a/packages/components/package.json b/packages/components/package.json index be01abbf..d099ec33 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -10,7 +10,6 @@ "react": ">=17" }, "dependencies": { - "@zeejs/react": "^0.3.1", "scroll-into-view-if-needed": "^3.1.0" }, "files": [ diff --git a/packages/components/src/auto-complete/auto-complete.board.tsx b/packages/components/src/auto-complete/auto-complete.board.tsx deleted file mode 100644 index f6a57c72..00000000 --- a/packages/components/src/auto-complete/auto-complete.board.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { createBoard } from '@wixc3/react-board'; -import React from 'react'; -import type { ItemData } from '../board-assets'; -import { createItems, ItemRenderer } from '../board-assets'; -import { projectThemesPlugin, zeeRootPlugin } from '../board-plugins'; -import { AutoComplete } from './auto-complete'; - -const items = createItems(30000); - -export default createBoard({ - name: 'auto-complete', - Board: () => ( - item.id} - getTextContent={(item: ItemData) => item.title} - /> - ), - plugins: [projectThemesPlugin, zeeRootPlugin], - environmentProps: { - canvasHeight: 24, - windowHeight: 576, - windowWidth: 786, - }, -}); diff --git a/packages/components/src/auto-complete/auto-complete.st.css b/packages/components/src/auto-complete/auto-complete.st.css deleted file mode 100644 index f0ee17c8..00000000 --- a/packages/components/src/auto-complete/auto-complete.st.css +++ /dev/null @@ -1,22 +0,0 @@ -@st-import Area from "../area/area.st.css"; -@st-import [floating] from "../area/variants.st.css"; -@st-import ScrollList from "../scroll-list/scroll-list.st.css"; - -.root { - -} - -.input { - -} - -.popover { - overflow: hidden; -} - -.scrollListRoot { - -st-extends: floating, ScrollList; - - overflow-x: hidden; - overflow-y: auto; -} diff --git a/packages/components/src/auto-complete/auto-complete.tsx b/packages/components/src/auto-complete/auto-complete.tsx deleted file mode 100644 index e05abdc9..00000000 --- a/packages/components/src/auto-complete/auto-complete.tsx +++ /dev/null @@ -1,118 +0,0 @@ -import { Popover } from '@zeejs/react'; -import React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react'; -import { Area } from '../area/area'; -import { KeyCodes, preventDefault } from '../common'; -import { StateControls, useStateControls } from '../hooks/use-state-controls'; -import { useTransmittedCB } from '../hooks/use-transmitted-events'; -import { InputWithClear } from '../input-with-clear/input-with-clear'; -import { createListRoot } from '../list/list'; -import { ScrollList, ScrollListProps } from '../scroll-list/scroll-list'; -import { searchMethodContext, searchStringContext } from '../searchable-text/searchable-text'; -import { classes, st } from './auto-complete.st.css'; - -export interface AutoCompleteProps extends ScrollListProps { - getTextContent: (item: T) => string; - searchControl?: StateControls; -} - -export type AutoComplete = (props: AutoCompleteProps) => JSX.Element; - -export function AutoComplete(props: AutoCompleteProps): JSX.Element { - const { searchControl, getTextContent, items, focusControl, selectionControl, getId, ...listProps } = props; - const [focused, setFocused] = useStateControls(focusControl, undefined); - const [selected, setSelected] = useStateControls(selectionControl, []); - const inputRef = useRef(null); - const scrollListRef = useRef(null); - const [searchText, updateSearchText] = useStateControls(searchControl, undefined); - const { match } = useContext(searchMethodContext); - - const { cb: onKeyPress, useTransmit } = useTransmittedCB(); - const [isOpen, setIsOpen] = useState(false); - const open = useCallback(() => { - setIsOpen(true); - }, []); - const close = useCallback(() => { - setIsOpen(false); - }, []); - const filteredData = useMemo(() => { - if (!searchText) { - return items; - } - return items.reduce((acc, item) => { - const content = getTextContent(item); - if (match(content, searchText)) { - acc.push(item); - } - return acc; - }, [] as T[]); - }, [getTextContent, items, match, searchText]); - - const onListSelect = useCallback( - (selectedIds: string[]) => { - const item = items.find((item) => getId(item) === selectedIds[0]); - updateSearchText(item ? getTextContent(item) : ''); - setSelected(selectedIds); - close(); - }, - [close, getId, getTextContent, items, setSelected, updateSearchText], - ); - const scrollListRoot = createListRoot(Area, { - className: classes.scrollListRoot, - ref: scrollListRef, - style: { - height: '100%', - }, - onMouseDown: preventDefault, - }); - - const onKeyDown = useCallback( - (ev: React.KeyboardEvent) => { - if ((ev.code as KeyCodes) === KeyCodes.Escape) { - close(); - } else if ((ev.code as KeyCodes) !== KeyCodes.Tab) { - open(); - onKeyPress(ev); - } - }, - [close, onKeyPress, open], - ); - useEffect(() => { - if (filteredData[0]) { - setFocused(getId(filteredData[0])); - } - }, [filteredData, getId, setFocused]); - return ( -
- - - - - - - -
- ); -} diff --git a/packages/components/src/auto-complete/index.ts b/packages/components/src/auto-complete/index.ts deleted file mode 100644 index 4f791b74..00000000 --- a/packages/components/src/auto-complete/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './auto-complete'; diff --git a/packages/components/src/board-index.ts b/packages/components/src/board-index.ts index 26bcfc6f..e185c956 100644 --- a/packages/components/src/board-index.ts +++ b/packages/components/src/board-index.ts @@ -5,7 +5,6 @@ * do no edit manually */ import area from './area/boards/area.board'; -import auto_complete from './auto-complete/auto-complete.board'; import button from './button/boards/button.board'; import button_with_icon from './button/boards/button-with-icon.board'; import button_with_icons from './button/boards/button-with-icons.board'; @@ -41,7 +40,6 @@ import with_header from './scroll-list/boards/with-header.board'; export default [ area, - auto_complete, button, button_with_icon, button_with_icons, diff --git a/packages/components/src/board-plugins/index.ts b/packages/components/src/board-plugins/index.ts index 2a2ad482..caac8fd1 100644 --- a/packages/components/src/board-plugins/index.ts +++ b/packages/components/src/board-plugins/index.ts @@ -1,3 +1,2 @@ export * from './scenario-plugin/scenario-plugin'; export * from './project-themes-plugin'; -export * from './zee-root-plugin'; diff --git a/packages/components/src/board-plugins/plugin-controls/plugin-controls.tsx b/packages/components/src/board-plugins/plugin-controls/plugin-controls.tsx index 124882ed..942661fd 100644 --- a/packages/components/src/board-plugins/plugin-controls/plugin-controls.tsx +++ b/packages/components/src/board-plugins/plugin-controls/plugin-controls.tsx @@ -18,7 +18,7 @@ export const getPluginControls = () => { return existing; }; -export const renderInPluginControls = (board: JSX.Element, pluginControls: JSX.Element, key: string) => { +export const renderInPluginControls = (board: React.ReactElement, pluginControls: React.ReactElement, key: string) => { const el = getPluginControls(); return ( diff --git a/packages/components/src/board-plugins/scenario-plugin/actions/select-item-by-index.ts b/packages/components/src/board-plugins/scenario-plugin/actions/select-item-by-index.ts index 4ff31d71..e5639ba0 100644 --- a/packages/components/src/board-plugins/scenario-plugin/actions/select-item-by-index.ts +++ b/packages/components/src/board-plugins/scenario-plugin/actions/select-item-by-index.ts @@ -1,4 +1,4 @@ -import ReactTestUtils from 'react-dom/test-utils'; +import { fireEvent } from '@testing-library/react'; import { Action, waitForElement } from '../scenario-plugin'; export const selectItemInput = 'input'; @@ -12,10 +12,7 @@ export const selectItemByIndex = (index: string): Action => { execute: async () => { const input = await waitForElement(`#${selectItemInput}`, title); if (input && input instanceof HTMLInputElement) { - input.value = index; - ReactTestUtils.Simulate.change(input, { - target: input, - }); + fireEvent.change(input, { target: { value: index } }); } const button = await waitForElement(`#${selectItemButton}`, title); diff --git a/packages/components/src/board-plugins/scenario-plugin/scenario-plugin.tsx b/packages/components/src/board-plugins/scenario-plugin/scenario-plugin.tsx index c556ab46..df2e9bb2 100644 --- a/packages/components/src/board-plugins/scenario-plugin/scenario-plugin.tsx +++ b/packages/components/src/board-plugins/scenario-plugin/scenario-plugin.tsx @@ -1,9 +1,9 @@ import { createPlugin } from '@wixc3/board-core'; import type { IReactBoard } from '@wixc3/react-board'; +import { fireEvent } from '@testing-library/react'; import { expect } from 'chai'; import { sleep, waitFor } from 'promise-assist'; import React, { useCallback, useEffect, useMemo, useReducer, useState } from 'react'; -import ReactTestUtils from 'react-dom/test-utils'; import { renderInPluginControls } from '../plugin-controls/plugin-controls'; import { classes, st } from './scenario-plugin.st.css'; @@ -161,7 +161,7 @@ export const ScenarioRenderer = (props: ScenarioProps) => { ); }; -export const RenderWrapper = (props: ScenarioParams & { board: JSX.Element }) => { +export const RenderWrapper = (props: ScenarioParams & { board: React.ReactElement }) => { const [boardKey, rerenderBoard] = useReducer((n: number) => n + 1, 0); const resetBoard = () => { @@ -338,10 +338,7 @@ export const writeAction = (selector: string, text: string, timeout = 2_000): Ac execute: async () => { const el = await waitForElement(selector, title, timeout); if (el && el instanceof HTMLInputElement) { - el.value = text; - ReactTestUtils.Simulate.change(el, { - target: el, - }); + fireEvent.change(el, { target: { value: text } }); } }, highlightSelector: selector, diff --git a/packages/components/src/board-plugins/zee-root-plugin.tsx b/packages/components/src/board-plugins/zee-root-plugin.tsx deleted file mode 100644 index 24c24c89..00000000 --- a/packages/components/src/board-plugins/zee-root-plugin.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { createPlugin } from '@wixc3/board-core'; -import type { IReactBoard } from '@wixc3/react-board'; -import { Root } from '@zeejs/react'; -import React from 'react'; - -export const zeeRootPlugin = createPlugin()( - 'zeeRoot', - {}, - { - wrapRender: (_1, _2, el) => { - return {el}; - }, - } -).use({}); diff --git a/packages/components/src/common/slot.ts b/packages/components/src/common/slot.ts index dc217ab6..d6549e3c 100644 --- a/packages/components/src/common/slot.ts +++ b/packages/components/src/common/slot.ts @@ -6,8 +6,10 @@ import type { OptionalFields } from './types'; */ export interface ElementSlot< MinimalProps, - El extends React.ComponentType | keyof React.ReactHTML = React.ComponentType | keyof React.ReactHTML, - Props extends MinimalProps = any + El extends React.ComponentType | keyof React.JSX.IntrinsicElements = + | React.ComponentType + | keyof React.JSX.IntrinsicElements, + Props extends MinimalProps = any, > { el: El; props: OptionalFields; diff --git a/packages/components/src/data-grid/data-grid.tsx b/packages/components/src/data-grid/data-grid.tsx index 5e626adf..111c1caf 100644 --- a/packages/components/src/data-grid/data-grid.tsx +++ b/packages/components/src/data-grid/data-grid.tsx @@ -7,7 +7,7 @@ import { ScrollList, ScrollListProps, forwardScrollListRoot } from '../scroll-li import { classes, vars } from './data-grid.st.css'; export interface Column { id: string; - header: JSX.Element; + header: React.ReactElement; cellRenderer: React.ComponentType>; } @@ -54,7 +54,7 @@ export function DataGrid({ columns, sizes: columnSizes, }), - [columnSizes, columns] + [columnSizes, columns], ); const resizers = useMemo( @@ -76,7 +76,7 @@ export function DataGrid({ window.addEventListener('mousemove', listener); window.addEventListener('mouseup', endListener); }), - [columns, columnSizes, updateColumnSizes] + [columns, columnSizes, updateColumnSizes], ); useEffect(() => { return () => { diff --git a/packages/components/src/hooks/use-element-dimensions.ts b/packages/components/src/hooks/use-element-dimensions.ts index 97d53b46..7401a52a 100644 --- a/packages/components/src/hooks/use-element-dimensions.ts +++ b/packages/components/src/hooks/use-element-dimensions.ts @@ -1,4 +1,4 @@ -import React, { MutableRefObject, useCallback, useLayoutEffect, useMemo, useRef } from 'react'; +import React, { useCallback, useLayoutEffect, useMemo, useRef } from 'react'; import { childrenById, DimensionsById, @@ -15,14 +15,14 @@ const getElementDimensions = (element?: Element): ElementDimensions => { }; const calculateDimensions = ( - ref: React.RefObject, + ref: React.RefObject, items: T[], size: ElementDimensions | ((t: T) => ElementDimensions) | undefined, getId: (t: T) => string, measure: boolean, sizeCache: Map, oldRes: Record, - setObserveTargets?: (targets: Element[]) => void + setObserveTargets?: (targets: Element[]) => void, ): { changed: boolean; res: Record } => { const getDimensions = (item: T) => { if (size !== undefined) { @@ -87,7 +87,7 @@ const calculateDimensions = ( export const useSetableObserver = (shouldMeasure: boolean) => { const listener = useRef(() => undefined); - const observerRef = useRef(); + const observerRef = useRef(undefined); const observed = useRef(new Set()); useLayoutEffect(() => { @@ -135,18 +135,18 @@ export const createSetableMutationObserver = () => { }; export const useElementDimensions = ( - ref: React.RefObject, + ref: React.RefObject, items: T[], getId: (item: T) => string, getItemDimensions: false | ElementDimensions | ((item: T) => ElementDimensions), - observeSubtree = false -): MutableRefObject => { + observeSubtree = false, +): React.RefObject => { const shouldMeasure = getItemDimensions === false; const preMeasured = typeof getItemDimensions === 'boolean' ? undefined : getItemDimensions; const cache = useRef(new Map()); const calculatedSize = useMemo( () => calculateDimensions(ref, items, preMeasured, getId, false, cache.current, {}).res, - [getId, items, preMeasured, ref] + [getId, items, preMeasured, ref], ); const unMeasuredDimensions = useRef(calculatedSize); const dimensions = useRef(calculatedSize); @@ -170,7 +170,7 @@ export const useElementDimensions = ( true, cache.current, dimensions.current, - setTargets + setTargets, ); if (!changed) { @@ -179,7 +179,7 @@ export const useElementDimensions = ( return res; }), - [ref, getId, items, delayedUpdateSizes, preMeasured, setTargets, dimensions] + [ref, getId, items, delayedUpdateSizes, preMeasured, setTargets, dimensions], ); mutationListener(() => { @@ -228,7 +228,7 @@ export const useElementDimensions = ( true, cache.current, dimensions.current, - setTargets + setTargets, ); if (changed) { diff --git a/packages/components/src/hooks/use-element-size.ts b/packages/components/src/hooks/use-element-size.ts index 0e6b02b6..b0a7d96a 100644 --- a/packages/components/src/hooks/use-element-size.ts +++ b/packages/components/src/hooks/use-element-size.ts @@ -2,13 +2,16 @@ import type React from 'react'; import { useEffect, useState } from 'react'; import { getElementSize, getSizeFromDimensions, observeElementDimensions, observeWindowDimensions } from '../common'; -export const useElementSize = (element: React.RefObject | undefined, sizeAsHeight: boolean): number => { +export const useElementSize = ( + element: React.RefObject | undefined, + sizeAsHeight: boolean, +): number => { const [size, updateSize] = useState(getElementSize(element?.current, sizeAsHeight)); useEffect(() => { const cleanup = element?.current ? observeElementDimensions(element.current, (dimensions) => - updateSize(getSizeFromDimensions(dimensions, sizeAsHeight)) + updateSize(getSizeFromDimensions(dimensions, sizeAsHeight)), ) : observeWindowDimensions((dimensions) => updateSize(getSizeFromDimensions(dimensions, sizeAsHeight))); diff --git a/packages/components/src/hooks/use-element-slot.tsx b/packages/components/src/hooks/use-element-slot.tsx index c647157a..420e6dd3 100644 --- a/packages/components/src/hooks/use-element-slot.tsx +++ b/packages/components/src/hooks/use-element-slot.tsx @@ -5,7 +5,7 @@ import React, { useMemo } from 'react'; import type { ElementSlot, PropMapping } from '../common'; // here because in issue with ts transformers in WCS -export const a = (): JSX.Element =>
; +export const a = (): React.ReactElement =>
; export const defaultRoot: ElementSlot, 'div'> = { el: 'div', @@ -68,9 +68,9 @@ export const defineElementSlot = < ); }, create: function ( - el: React.ComponentType | keyof React.ReactHTML, + el: React.ComponentType | keyof React.JSX.IntrinsicElements, props: Partial, - ): ElementSlot | keyof React.ReactHTML, Props> { + ): ElementSlot | keyof React.JSX.IntrinsicElements, Props> { return { el, props: props as any, diff --git a/packages/components/src/hooks/use-keyboard-nav.ts b/packages/components/src/hooks/use-keyboard-nav.ts index 368becb3..261c7e26 100644 --- a/packages/components/src/hooks/use-keyboard-nav.ts +++ b/packages/components/src/hooks/use-keyboard-nav.ts @@ -2,7 +2,7 @@ import React from 'react'; import { childrenById, KeyCodes } from '../common'; export const getHandleKeyboardNav = ( - elementsParent: React.RefObject, + elementsParent: React.RefObject, focusedId: string | undefined, setFocusedId: (id: string) => void, setSelectedIds: (ids: string[]) => void, diff --git a/packages/components/src/hooks/use-position.ts b/packages/components/src/hooks/use-position.ts index 3b354a87..db2dc94c 100644 --- a/packages/components/src/hooks/use-position.ts +++ b/packages/components/src/hooks/use-position.ts @@ -17,10 +17,10 @@ const getItemPositionInParent = (el: HTMLElement) => { const isSamePosition = (p1: Position, p2: Position) => p1.x === p2.x && p1.y === p2.y; const useAfterRenderEffect = ( - element: React.RefObject, + element: React.RefObject, onElementUpdate: (el: HTMLElement) => T | typeof unchanged, watch?: Watch, - def: T | U = null as unknown as U + def: T | U = null as unknown as U, ): T | U => { const [state, update] = useState(def); const delayedUpdate = useDelayedUpdateState(update); @@ -39,11 +39,11 @@ const useAfterRenderEffect = ( }; export const usePositionInParent = ( - element: React.RefObject, - watchPosition: Position | boolean = false + element: React.RefObject, + watchPosition: Position | boolean = false, ): Position => { const watch: Watch = typeof watchPosition === 'object' ? 'ignore' : watchPosition ? 'timer' : 'measure-once'; - const lastValRef = useRef(); + const lastValRef = useRef(undefined); const onTimer = useCallback((el: HTMLElement) => { if (!el || !el.parentElement) { return unchanged; diff --git a/packages/components/src/hooks/use-scroll.ts b/packages/components/src/hooks/use-scroll.ts index 15408a4e..7415a98d 100644 --- a/packages/components/src/hooks/use-scroll.ts +++ b/packages/components/src/hooks/use-scroll.ts @@ -9,7 +9,7 @@ export const useScroll = ({ }: { isHorizontal?: boolean; disabled?: boolean; - ref?: React.RefObject; + ref?: React.RefObject; }): number => { const trigger = useDelayedUpdate(); diff --git a/packages/components/src/hooks/use-tree-view-keyboard-interaction.ts b/packages/components/src/hooks/use-tree-view-keyboard-interaction.ts index beacb6bd..8b672c9f 100644 --- a/packages/components/src/hooks/use-tree-view-keyboard-interaction.ts +++ b/packages/components/src/hooks/use-tree-view-keyboard-interaction.ts @@ -4,7 +4,7 @@ import { ProcessedControlledState } from './use-state-controls'; export type KeyboardSelectMeta = 'keyboard'; export interface TreeViewKeyboardInteractionsParams { - eventRoots?: React.RefObject[]; + eventRoots?: React.RefObject[]; focusedItemId: string | undefined; open: (itemId: string) => void; close: (itemId: string) => void; diff --git a/packages/components/src/icons/icon.tsx b/packages/components/src/icons/icon.tsx index 9cc991e1..5e8e8de7 100644 --- a/packages/components/src/icons/icon.tsx +++ b/packages/components/src/icons/icon.tsx @@ -2,7 +2,7 @@ import React, { memo } from 'react'; import type { IconProps } from './types'; import { classes, st } from './icon.st.css'; -export const IconFactory = (icon: JSX.Element, displayName: string, width = 18, height = 18) => { +export const IconFactory = (icon: React.ReactElement, displayName: string, width = 18, height = 18) => { const Comp = memo((props) => ( {icon} diff --git a/packages/components/src/index.ts b/packages/components/src/index.ts index 67bfc813..c2a39a79 100644 --- a/packages/components/src/index.ts +++ b/packages/components/src/index.ts @@ -1,5 +1,4 @@ export * from './area'; -export * from './auto-complete'; export * from './button'; export * from './common'; export * from './data-grid'; diff --git a/packages/components/src/list/list.tsx b/packages/components/src/list/list.tsx index 4199b773..b8885718 100644 --- a/packages/components/src/list/list.tsx +++ b/packages/components/src/list/list.tsx @@ -59,7 +59,7 @@ export interface ListProps { enableMultiselect?: boolean; } -export type List = (props: ListProps) => JSX.Element; +export type List = (props: ListProps) => React.ReactElement; export function List({ listRoot, @@ -73,10 +73,10 @@ export function List({ onItemUnmount, disableKeyboard, enableMultiselect = true, -}: ListProps): JSX.Element { +}: ListProps): React.ReactElement { const [selectedIds, setSelectedIds] = useStateControls(selectionControl, []); const [focusedId, setFocusedId] = useStateControls(focusControl, undefined); - const defaultRef = useRef(); + const defaultRef = useRef(null); // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const actualRef = listRoot?.props?.ref || defaultRef; @@ -120,7 +120,12 @@ export function List({ const onKeyPress = disableKeyboard ? () => {} - : getHandleKeyboardNav(actualRef as React.RefObject, focusedId, setFocusedId, setSelectedIds); + : getHandleKeyboardNav( + actualRef as React.RefObject, + focusedId, + setFocusedId, + setSelectedIds, + ); if (transmitKeyPress) { transmitKeyPress(callInternalFirst(onKeyPress, listRoot?.props?.onKeyPress)); } @@ -128,7 +133,7 @@ export function List({ , + ref: actualRef as React.RefObject, onClick, onKeyPress, onKeyDown: onKeyPress, diff --git a/packages/components/src/scroll-list/boards/items-change-size.board.tsx b/packages/components/src/scroll-list/boards/items-change-size.board.tsx index 05a64e3a..4b2d5f36 100644 --- a/packages/components/src/scroll-list/boards/items-change-size.board.tsx +++ b/packages/components/src/scroll-list/boards/items-change-size.board.tsx @@ -6,7 +6,7 @@ import { ScrollList } from '../scroll-list'; const items = createItems(); -const elementRef: React.RefObject = { +const elementRef: React.RefObject = { current: null, }; diff --git a/packages/components/src/scroll-list/boards/scroll-ref.board.tsx b/packages/components/src/scroll-list/boards/scroll-ref.board.tsx index e90f2dc9..c00322be 100644 --- a/packages/components/src/scroll-list/boards/scroll-ref.board.tsx +++ b/packages/components/src/scroll-list/boards/scroll-ref.board.tsx @@ -13,7 +13,7 @@ import { ScrollList } from '../scroll-list'; const items = createItems(); -const elementRef: React.RefObject = { +const elementRef: React.RefObject = { current: null, }; diff --git a/packages/components/src/scroll-list/boards/scroll-to-selection.board.tsx b/packages/components/src/scroll-list/boards/scroll-to-selection.board.tsx index 5ee7bb6e..4a4b6cbc 100644 --- a/packages/components/src/scroll-list/boards/scroll-to-selection.board.tsx +++ b/packages/components/src/scroll-list/boards/scroll-to-selection.board.tsx @@ -12,7 +12,7 @@ import type { ListItemProps } from '../../list/list'; import { ScrollList } from '../scroll-list'; const items = createItems(); -const elementRef: React.RefObject = { +const elementRef: React.RefObject = { current: null, }; diff --git a/packages/components/src/scroll-list/hooks/use-scroll-list-position.ts b/packages/components/src/scroll-list/hooks/use-scroll-list-position.ts index aff83ccd..d4d4f7fb 100644 --- a/packages/components/src/scroll-list/hooks/use-scroll-list-position.ts +++ b/packages/components/src/scroll-list/hooks/use-scroll-list-position.ts @@ -66,7 +66,7 @@ export const useScrollListPosition = ({ itemsDimensions: MutableRefObject; maxScrollSize: number; scrollPosition: number; - scrollListRef: RefObject; + scrollListRef: RefObject; }) => { const lastRenderedItem = useRef(0); const shouldMeasureOffset = typeof scrollOffset === 'number' ? unknownPosition : scrollOffset; @@ -115,7 +115,7 @@ export const useScrollListPosition = ({ // it can't be more than scrollWindow 2 times (as extra is between 0 and 1); const firstWantedPixel = useMemo( () => (unmountItems ? lastWantedPixel - 2 * scrollWindowSize : 0), - [unmountItems, scrollWindowSize, lastWantedPixel] + [unmountItems, scrollWindowSize, lastWantedPixel], ); return useMemo(() => { @@ -171,7 +171,7 @@ export const useScrollListPosition = ({ if (!unmountItems) { lastShownItemIndex = lastRenderedItem.current = Math.max( lastShownItemIndex, - lastRenderedItem.current + lastRenderedItem.current, ); } diff --git a/packages/components/src/scroll-list/hooks/use-scroll-list-scroll-to-selected.ts b/packages/components/src/scroll-list/hooks/use-scroll-list-scroll-to-selected.ts index d919ebe4..f7103114 100644 --- a/packages/components/src/scroll-list/hooks/use-scroll-list-scroll-to-selected.ts +++ b/packages/components/src/scroll-list/hooks/use-scroll-list-scroll-to-selected.ts @@ -20,7 +20,7 @@ export const useScrollListScrollToFocused = ({ }: { scrollToFocused: ScrollListProps['scrollToFocused']; scrollWindow?: ScrollListProps['scrollWindow']; - scrollListRef: RefObject; + scrollListRef: RefObject; items: ListProps['items']; getId: ListProps['getId']; focused?: string; diff --git a/packages/components/src/scroll-list/scroll-list.tsx b/packages/components/src/scroll-list/scroll-list.tsx index 1ba482f7..1bad6f71 100644 --- a/packages/components/src/scroll-list/scroll-list.tsx +++ b/packages/components/src/scroll-list/scroll-list.tsx @@ -111,7 +111,7 @@ export interface ScrollListProps; + scrollWindow?: React.RefObject; /** * allows replacing the root element of the scroll list */ @@ -158,11 +158,11 @@ export function ScrollList({ transmitKeyPress, overlay, disableKeyboard, -}: ScrollListProps): JSX.Element { - const defaultScrollListRef = useRef(); - const scrollListRef = (scrollListRoot?.props?.ref as React.RefObject) || defaultScrollListRef; +}: ScrollListProps): React.ReactElement { + const defaultScrollListRef = useRef(null); + const scrollListRef = (scrollListRoot?.props?.ref as React.RefObject) || defaultScrollListRef; const defaultListRef = useRef(null); - const listRef = (listRoot?.props?.ref as React.RefObject) || defaultListRef; + const listRef = (listRoot?.props?.ref as React.RefObject) || defaultListRef; const scrollPosition = useScroll({ isHorizontal, ref: scrollWindow, diff --git a/packages/components/src/searchable-text/searchable-text.tsx b/packages/components/src/searchable-text/searchable-text.tsx index 59460856..7c7eb407 100644 --- a/packages/components/src/searchable-text/searchable-text.tsx +++ b/packages/components/src/searchable-text/searchable-text.tsx @@ -52,7 +52,7 @@ export const searchMethodContext = createContext({ split: splitFuzzySearchText, }); -export const SearchableText = (props: { text: string; className?: string }): JSX.Element => { +export const SearchableText = (props: { text: string; className?: string }): React.ReactElement => { const searchString = useContext(searchStringContext); const { split } = useContext(searchMethodContext); const sections = useMemo(() => split(props.text, searchString), [props.text, searchString, split]); diff --git a/packages/components/src/themes/white.st.css b/packages/components/src/themes/white.st.css index 01358967..dbf40f52 100644 --- a/packages/components/src/themes/white.st.css +++ b/packages/components/src/themes/white.st.css @@ -5,7 +5,6 @@ @st-import [cancel, emphasis] from "../button/variants.st.css"; @st-import Area from "../area/area.st.css"; @st-import [floating] from "../area/variants.st.css"; -@st-import [popover, scrollListRoot] from "../auto-complete/auto-complete.st.css"; @st-import ScrollList from "../scroll-list/scroll-list.st.css"; @st-import InputWithClear from "../input-with-clear/input-with-clear.st.css"; @st-import [primary-2, primary-3, primary-4, primary-7, reference-1, notification-warning-1, primary-6, primary-0, primary-5] from "./colors.st.css"; @@ -84,19 +83,8 @@ border-radius: 3px; } - .popover { - padding-left: 4px; - padding-right: 4px; - padding-bottom: 4px; - - } - .InputWithClear::clear { -st-mixin: small; } - .scrollListRoot { - max-height: 30vh; - - } } diff --git a/packages/components/src/tree/boards/tree.board.tsx b/packages/components/src/tree/boards/tree.board.tsx index 012cf67f..a2b9958f 100644 --- a/packages/components/src/tree/boards/tree.board.tsx +++ b/packages/components/src/tree/boards/tree.board.tsx @@ -22,7 +22,7 @@ const createTreeData = (maxChildren: number, maxDepth: number, currentDepth = 0, }; const ids: string[] = []; const treeData = createTreeData(6, 3); -const elementRef: React.RefObject = { +const elementRef: React.RefObject = { current: null, }; diff --git a/packages/components/src/tree/tree.tsx b/packages/components/src/tree/tree.tsx index e51fa2b0..3f382a2a 100644 --- a/packages/components/src/tree/tree.tsx +++ b/packages/components/src/tree/tree.tsx @@ -16,7 +16,7 @@ const treeWrapperContext = createContext({ export const TreeItemWrapper = ( UserRenderer: React.ComponentType>, -): ((props: ListItemProps) => JSX.Element) => { +): ((props: ListItemProps) => React.ReactElement) => { const Wrapper = (props: ListItemProps) => { const { openItemIds, close, open, getChildren, getDepth } = useContext(treeWrapperContext); const boundClose = useCallback(() => close(props.id), [close, props.id]); @@ -40,7 +40,7 @@ export const TreeItemWrapper = ( return Wrapper; }; -export function Tree(props: TreeProps): JSX.Element { +export function Tree(props: TreeProps): React.ReactElement { const { eventRoots, listRoot, diff --git a/tsconfig.base.json b/tsconfig.base.json index 7f328546..568a297f 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -11,8 +11,8 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es2019", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - "lib": ["es2019", "dom"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + "target": "es2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "lib": ["es2022", "dom"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ "jsx": "react", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */