diff --git a/package-lock.json b/package-lock.json index 838e44cd..03900c98 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@next2d/player", - "version": "2.9.0", + "version": "2.10.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@next2d/player", - "version": "2.9.0", + "version": "2.10.0", "license": "MIT", "workspaces": [ "packages/*" @@ -23,9 +23,9 @@ "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "^12.3.0", "@types/node": "^24.10.1", - "@typescript-eslint/eslint-plugin": "^8.46.4", - "@typescript-eslint/parser": "^8.46.4", - "@vitest/web-worker": "^4.0.9", + "@typescript-eslint/eslint-plugin": "^8.47.0", + "@typescript-eslint/parser": "^8.47.0", + "@vitest/web-worker": "^4.0.10", "eslint": "^9.39.1", "eslint-plugin-unused-imports": "^4.3.0", "globals": "^16.5.0", @@ -34,7 +34,7 @@ "tslib": "^2.8.1", "typescript": "^5.9.3", "vite": "^7.2.2", - "vitest": "^4.0.9", + "vitest": "^4.0.10", "vitest-webgl-canvas-mock": "^1.1.0", "xml2js": "^0.6.2" }, @@ -1511,17 +1511,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.4.tgz", - "integrity": "sha512-R48VhmTJqplNyDxCyqqVkFSZIx1qX6PzwqgcXn1olLrzxcSBDlOsbtcnQuQhNtnNiJ4Xe5gREI1foajYaYU2Vg==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.47.0.tgz", + "integrity": "sha512-fe0rz9WJQ5t2iaLfdbDc9T80GJy0AeO453q8C3YCilnGozvOyCG5t+EZtg7j7D88+c3FipfP/x+wzGnh1xp8ZA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.46.4", - "@typescript-eslint/type-utils": "8.46.4", - "@typescript-eslint/utils": "8.46.4", - "@typescript-eslint/visitor-keys": "8.46.4", + "@typescript-eslint/scope-manager": "8.47.0", + "@typescript-eslint/type-utils": "8.47.0", + "@typescript-eslint/utils": "8.47.0", + "@typescript-eslint/visitor-keys": "8.47.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -1535,7 +1535,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.46.4", + "@typescript-eslint/parser": "^8.47.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } @@ -1551,17 +1551,17 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.4.tgz", - "integrity": "sha512-tK3GPFWbirvNgsNKto+UmB/cRtn6TZfyw0D6IKrW55n6Vbs7KJoZtI//kpTKzE/DUmmnAFD8/Ca46s7Obs92/w==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.47.0.tgz", + "integrity": "sha512-lJi3PfxVmo0AkEY93ecfN+r8SofEqZNGByvHAI3GBLrvt1Cw6H5k1IM02nSzu0RfUafr2EvFSw0wAsZgubNplQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.46.4", - "@typescript-eslint/types": "8.46.4", - "@typescript-eslint/typescript-estree": "8.46.4", - "@typescript-eslint/visitor-keys": "8.46.4", + "@typescript-eslint/scope-manager": "8.47.0", + "@typescript-eslint/types": "8.47.0", + "@typescript-eslint/typescript-estree": "8.47.0", + "@typescript-eslint/visitor-keys": "8.47.0", "debug": "^4.3.4" }, "engines": { @@ -1577,14 +1577,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.4.tgz", - "integrity": "sha512-nPiRSKuvtTN+no/2N1kt2tUh/HoFzeEgOm9fQ6XQk4/ApGqjx0zFIIaLJ6wooR1HIoozvj2j6vTi/1fgAz7UYQ==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.47.0.tgz", + "integrity": "sha512-2X4BX8hUeB5JcA1TQJ7GjcgulXQ+5UkNb0DL8gHsHUHdFoiCTJoYLTpib3LtSDPZsRET5ygN4qqIWrHyYIKERA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.46.4", - "@typescript-eslint/types": "^8.46.4", + "@typescript-eslint/tsconfig-utils": "^8.47.0", + "@typescript-eslint/types": "^8.47.0", "debug": "^4.3.4" }, "engines": { @@ -1599,14 +1599,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.4.tgz", - "integrity": "sha512-tMDbLGXb1wC+McN1M6QeDx7P7c0UWO5z9CXqp7J8E+xGcJuUuevWKxuG8j41FoweS3+L41SkyKKkia16jpX7CA==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.47.0.tgz", + "integrity": "sha512-a0TTJk4HXMkfpFkL9/WaGTNuv7JWfFTQFJd6zS9dVAjKsojmv9HT55xzbEpnZoY+VUb+YXLMp+ihMLz/UlZfDg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.46.4", - "@typescript-eslint/visitor-keys": "8.46.4" + "@typescript-eslint/types": "8.47.0", + "@typescript-eslint/visitor-keys": "8.47.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1617,9 +1617,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.4.tgz", - "integrity": "sha512-+/XqaZPIAk6Cjg7NWgSGe27X4zMGqrFqZ8atJsX3CWxH/jACqWnrWI68h7nHQld0y+k9eTTjb9r+KU4twLoo9A==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.47.0.tgz", + "integrity": "sha512-ybUAvjy4ZCL11uryalkKxuT3w3sXJAuWhOoGS3T/Wu+iUu1tGJmk5ytSY8gbdACNARmcYEB0COksD2j6hfGK2g==", "dev": true, "license": "MIT", "engines": { @@ -1634,15 +1634,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.4.tgz", - "integrity": "sha512-V4QC8h3fdT5Wro6vANk6eojqfbv5bpwHuMsBcJUJkqs2z5XnYhJzyz9Y02eUmF9u3PgXEUiOt4w4KHR3P+z0PQ==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.47.0.tgz", + "integrity": "sha512-QC9RiCmZ2HmIdCEvhd1aJELBlD93ErziOXXlHEZyuBo3tBiAZieya0HLIxp+DoDWlsQqDawyKuNEhORyku+P8A==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.46.4", - "@typescript-eslint/typescript-estree": "8.46.4", - "@typescript-eslint/utils": "8.46.4", + "@typescript-eslint/types": "8.47.0", + "@typescript-eslint/typescript-estree": "8.47.0", + "@typescript-eslint/utils": "8.47.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -1659,9 +1659,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.4.tgz", - "integrity": "sha512-USjyxm3gQEePdUwJBFjjGNG18xY9A2grDVGuk7/9AkjIF1L+ZrVnwR5VAU5JXtUnBL/Nwt3H31KlRDaksnM7/w==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.47.0.tgz", + "integrity": "sha512-nHAE6bMKsizhA2uuYZbEbmp5z2UpffNrPEqiKIeN7VsV6UY/roxanWfoRrf6x/k9+Obf+GQdkm0nPU+vnMXo9A==", "dev": true, "license": "MIT", "engines": { @@ -1673,16 +1673,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.4.tgz", - "integrity": "sha512-7oV2qEOr1d4NWNmpXLR35LvCfOkTNymY9oyW+lUHkmCno7aOmIf/hMaydnJBUTBMRCOGZh8YjkFOc8dadEoNGA==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.47.0.tgz", + "integrity": "sha512-k6ti9UepJf5NpzCjH31hQNLHQWupTRPhZ+KFF8WtTuTpy7uHPfeg2NM7cP27aCGajoEplxJDFVCEm9TGPYyiVg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.46.4", - "@typescript-eslint/tsconfig-utils": "8.46.4", - "@typescript-eslint/types": "8.46.4", - "@typescript-eslint/visitor-keys": "8.46.4", + "@typescript-eslint/project-service": "8.47.0", + "@typescript-eslint/tsconfig-utils": "8.47.0", + "@typescript-eslint/types": "8.47.0", + "@typescript-eslint/visitor-keys": "8.47.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1728,16 +1728,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.4.tgz", - "integrity": "sha512-AbSv11fklGXV6T28dp2Me04Uw90R2iJ30g2bgLz529Koehrmkbs1r7paFqr1vPCZi7hHwYxYtxfyQMRC8QaVSg==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.47.0.tgz", + "integrity": "sha512-g7XrNf25iL4TJOiPqatNuaChyqt49a/onq5YsJ9+hXeugK+41LVg7AxikMfM02PC6jbNtZLCJj6AUcQXJS/jGQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.46.4", - "@typescript-eslint/types": "8.46.4", - "@typescript-eslint/typescript-estree": "8.46.4" + "@typescript-eslint/scope-manager": "8.47.0", + "@typescript-eslint/types": "8.47.0", + "@typescript-eslint/typescript-estree": "8.47.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1752,13 +1752,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.4.tgz", - "integrity": "sha512-/++5CYLQqsO9HFGLI7APrxBJYo+5OCMpViuhV8q5/Qa3o5mMrF//eQHks+PXcsAVaLdn817fMuS7zqoXNNZGaw==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.47.0.tgz", + "integrity": "sha512-SIV3/6eftCy1bNzCQoPmbWsRLujS8t5iDIZ4spZOBHqrM+yfX2ogg8Tt3PDTAVKw3sSCiUgg30uOAvK2r9zGjQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/types": "8.47.0", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -1783,17 +1783,17 @@ } }, "node_modules/@vitest/expect": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.0.9.tgz", - "integrity": "sha512-C2vyXf5/Jfj1vl4DQYxjib3jzyuswMi/KHHVN2z+H4v16hdJ7jMZ0OGe3uOVIt6LyJsAofDdaJNIFEpQcrSTFw==", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.0.10.tgz", + "integrity": "sha512-3QkTX/lK39FBNwARCQRSQr0TP9+ywSdxSX+LgbJ2M1WmveXP72anTbnp2yl5fH+dU6SUmBzNMrDHs80G8G2DZg==", "dev": true, "license": "MIT", "dependencies": { "@standard-schema/spec": "^1.0.0", "@types/chai": "^5.2.2", - "@vitest/spy": "4.0.9", - "@vitest/utils": "4.0.9", - "chai": "^6.2.0", + "@vitest/spy": "4.0.10", + "@vitest/utils": "4.0.10", + "chai": "^6.2.1", "tinyrainbow": "^3.0.3" }, "funding": { @@ -1801,13 +1801,13 @@ } }, "node_modules/@vitest/mocker": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.0.9.tgz", - "integrity": "sha512-PUyaowQFHW+9FKb4dsvvBM4o025rWMlEDXdWRxIOilGaHREYTi5Q2Rt9VCgXgPy/hHZu1LeuXtrA/GdzOatP2g==", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.0.10.tgz", + "integrity": "sha512-e2OfdexYkjkg8Hh3L9NVEfbwGXq5IZbDovkf30qW2tOh7Rh9sVtmSr2ztEXOFbymNxS4qjzLXUQIvATvN4B+lg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "4.0.9", + "@vitest/spy": "4.0.10", "estree-walker": "^3.0.3", "magic-string": "^0.30.21" }, @@ -1838,9 +1838,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.0.9.tgz", - "integrity": "sha512-Hor0IBTwEi/uZqB7pvGepyElaM8J75pYjrrqbC8ZYMB9/4n5QA63KC15xhT+sqHpdGWfdnPo96E8lQUxs2YzSQ==", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.0.10.tgz", + "integrity": "sha512-99EQbpa/zuDnvVjthwz5bH9o8iPefoQZ63WV8+bsRJZNw3qQSvSltfut8yu1Jc9mqOYi7pEbsKxYTi/rjaq6PA==", "dev": true, "license": "MIT", "dependencies": { @@ -1851,13 +1851,13 @@ } }, "node_modules/@vitest/runner": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.0.9.tgz", - "integrity": "sha512-aF77tsXdEvIJRkj9uJZnHtovsVIx22Ambft9HudC+XuG/on1NY/bf5dlDti1N35eJT+QZLb4RF/5dTIG18s98w==", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.0.10.tgz", + "integrity": "sha512-EXU2iSkKvNwtlL8L8doCpkyclw0mc/t4t9SeOnfOFPyqLmQwuceMPA4zJBa6jw0MKsZYbw7kAn+gl7HxrlB8UQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "4.0.9", + "@vitest/utils": "4.0.10", "pathe": "^2.0.3" }, "funding": { @@ -1865,13 +1865,13 @@ } }, "node_modules/@vitest/snapshot": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.0.9.tgz", - "integrity": "sha512-r1qR4oYstPbnOjg0Vgd3E8ADJbi4ditCzqr+Z9foUrRhIy778BleNyZMeAJ2EjV+r4ASAaDsdciC9ryMy8xMMg==", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.0.10.tgz", + "integrity": "sha512-2N4X2ZZl7kZw0qeGdQ41H0KND96L3qX1RgwuCfy6oUsF2ISGD/HpSbmms+CkIOsQmg2kulwfhJ4CI0asnZlvkg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.0.9", + "@vitest/pretty-format": "4.0.10", "magic-string": "^0.30.21", "pathe": "^2.0.3" }, @@ -1880,9 +1880,9 @@ } }, "node_modules/@vitest/spy": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.0.9.tgz", - "integrity": "sha512-J9Ttsq0hDXmxmT8CUOWUr1cqqAj2FJRGTdyEjSR+NjoOGKEqkEWj+09yC0HhI8t1W6t4Ctqawl1onHgipJve1A==", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.0.10.tgz", + "integrity": "sha512-AsY6sVS8OLb96GV5RoG8B6I35GAbNrC49AO+jNRF9YVGb/g9t+hzNm1H6kD0NDp8tt7VJLs6hb7YMkDXqu03iw==", "dev": true, "license": "MIT", "funding": { @@ -1890,13 +1890,13 @@ } }, "node_modules/@vitest/utils": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.0.9.tgz", - "integrity": "sha512-cEol6ygTzY4rUPvNZM19sDf7zGa35IYTm9wfzkHoT/f5jX10IOY7QleWSOh5T0e3I3WVozwK5Asom79qW8DiuQ==", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.0.10.tgz", + "integrity": "sha512-kOuqWnEwZNtQxMKg3WmPK1vmhZu9WcoX69iwWjVz+jvKTsF1emzsv3eoPcDr6ykA3qP2bsCQE7CwqfNtAVzsmg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.0.9", + "@vitest/pretty-format": "4.0.10", "tinyrainbow": "^3.0.3" }, "funding": { @@ -1904,9 +1904,9 @@ } }, "node_modules/@vitest/web-worker": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@vitest/web-worker/-/web-worker-4.0.9.tgz", - "integrity": "sha512-rAX5p1S1ZE9ZAzTDkk7N0l1L0y5V5QLc/xKXwhS2X/GuIdDxrJQHXsmY65HR51x9p3LU0OgaeZu+x1rh1dLP+Q==", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/@vitest/web-worker/-/web-worker-4.0.10.tgz", + "integrity": "sha512-LHkEcF+976pMym0JEuXQ92vbFKEfcz67sXI3/KXE5d/BxXDe3eAmGmdoQkU/imrewtmrsg4+82PFxdGw7R1nrw==", "dev": true, "license": "MIT", "dependencies": { @@ -1916,7 +1916,7 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "vitest": "4.0.9" + "vitest": "4.0.10" } }, "node_modules/acorn": { @@ -3848,22 +3848,22 @@ } }, "node_modules/tldts": { - "version": "7.0.17", - "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.0.17.tgz", - "integrity": "sha512-Y1KQBgDd/NUc+LfOtKS6mNsC9CCaH+m2P1RoIZy7RAPo3C3/t8X45+zgut31cRZtZ3xKPjfn3TkGTrctC2TQIQ==", + "version": "7.0.18", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.0.18.tgz", + "integrity": "sha512-lCcgTAgMxQ1JKOWrVGo6E69Ukbnx4Gc1wiYLRf6J5NN4HRYJtCby1rPF8rkQ4a6qqoFBK5dvjJ1zJ0F7VfDSvw==", "dev": true, "license": "MIT", "dependencies": { - "tldts-core": "^7.0.17" + "tldts-core": "^7.0.18" }, "bin": { "tldts": "bin/cli.js" } }, "node_modules/tldts-core": { - "version": "7.0.17", - "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.0.17.tgz", - "integrity": "sha512-DieYoGrP78PWKsrXr8MZwtQ7GLCUeLxihtjC1jZsW1DnvSMdKPitJSe8OSYDM2u5H6g3kWJZpePqkp43TfLh0g==", + "version": "7.0.18", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.0.18.tgz", + "integrity": "sha512-jqJC13oP4FFAahv4JT/0WTDrCF9Okv7lpKtOZUGPLiAnNbACcSg8Y8T+Z9xthOmRBqi/Sob4yi0TE0miRCvF7Q==", "dev": true, "license": "MIT" }, @@ -4049,20 +4049,20 @@ } }, "node_modules/vitest": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.0.9.tgz", - "integrity": "sha512-E0Ja2AX4th+CG33yAFRC+d1wFx2pzU5r6HtG6LiPSE04flaE0qB6YyjSw9ZcpJAtVPfsvZGtJlKWZpuW7EHRxg==", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.0.10.tgz", + "integrity": "sha512-2Fqty3MM9CDwOVet/jaQalYlbcjATZwPYGcqpiYQqgQ/dLC7GuHdISKgTYIVF/kaishKxLzleKWWfbSDklyIKg==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@vitest/expect": "4.0.9", - "@vitest/mocker": "4.0.9", - "@vitest/pretty-format": "4.0.9", - "@vitest/runner": "4.0.9", - "@vitest/snapshot": "4.0.9", - "@vitest/spy": "4.0.9", - "@vitest/utils": "4.0.9", + "@vitest/expect": "4.0.10", + "@vitest/mocker": "4.0.10", + "@vitest/pretty-format": "4.0.10", + "@vitest/runner": "4.0.10", + "@vitest/snapshot": "4.0.10", + "@vitest/spy": "4.0.10", + "@vitest/utils": "4.0.10", "debug": "^4.4.3", "es-module-lexer": "^1.7.0", "expect-type": "^1.2.2", @@ -4090,10 +4090,10 @@ "@edge-runtime/vm": "*", "@types/debug": "^4.1.12", "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "4.0.9", - "@vitest/browser-preview": "4.0.9", - "@vitest/browser-webdriverio": "4.0.9", - "@vitest/ui": "4.0.9", + "@vitest/browser-playwright": "4.0.10", + "@vitest/browser-preview": "4.0.10", + "@vitest/browser-webdriverio": "4.0.10", + "@vitest/ui": "4.0.10", "happy-dom": "*", "jsdom": "*" }, diff --git a/package.json b/package.json index fa830c84..3d65c6cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@next2d/player", - "version": "2.9.0", + "version": "2.10.0", "description": "Experience the fast and beautiful anti-aliased rendering of WebGL. You can create rich, interactive graphics, cross-platform applications and games without worrying about browser or device compatibility.", "author": "Toshiyuki Ienaga (https://github.com/ienaga/)", "license": "MIT", @@ -52,9 +52,9 @@ "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "^12.3.0", "@types/node": "^24.10.1", - "@typescript-eslint/eslint-plugin": "^8.46.4", - "@typescript-eslint/parser": "^8.46.4", - "@vitest/web-worker": "^4.0.9", + "@typescript-eslint/eslint-plugin": "^8.47.0", + "@typescript-eslint/parser": "^8.47.0", + "@vitest/web-worker": "^4.0.10", "eslint": "^9.39.1", "eslint-plugin-unused-imports": "^4.3.0", "globals": "^16.5.0", @@ -63,7 +63,7 @@ "tslib": "^2.8.1", "typescript": "^5.9.3", "vite": "^7.2.2", - "vitest": "^4.0.9", + "vitest": "^4.0.10", "vitest-webgl-canvas-mock": "^1.1.0", "xml2js": "^0.6.2" }, diff --git a/packages/display/src/GraphicsGradientFill.test.ts b/packages/display/src/GraphicsGradientFill.test.ts new file mode 100644 index 00000000..683e3fee --- /dev/null +++ b/packages/display/src/GraphicsGradientFill.test.ts @@ -0,0 +1,490 @@ +import { GraphicsGradientFill } from "./GraphicsGradientFill"; +import { Matrix } from "@next2d/geom"; +import { describe, expect, it } from "vitest"; + +describe("GraphicsGradientFill class test", () => +{ + describe("constructor test", () => + { + it("should create instance with linear gradient", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255] + ); + expect(fill).toBeInstanceOf(GraphicsGradientFill); + }); + + it("should create instance with radial gradient", () => + { + const fill = new GraphicsGradientFill( + "radial", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255] + ); + expect(fill).toBeInstanceOf(GraphicsGradientFill); + }); + + it("should create instance with string colors", () => + { + const fill = new GraphicsGradientFill( + "linear", + ["#FF0000", "#00FF00"], + [1, 1], + [0, 255] + ); + expect(fill).toBeInstanceOf(GraphicsGradientFill); + }); + + it("should create instance with matrix", () => + { + const matrix = new Matrix(1, 0, 0, 1, 10, 20); + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255], + matrix + ); + expect(fill).toBeInstanceOf(GraphicsGradientFill); + }); + + it("should create instance with spread method", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255], + null, + "reflect" + ); + expect(fill).toBeInstanceOf(GraphicsGradientFill); + }); + + it("should create instance with interpolation method", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255], + null, + "pad", + "linearRGB" + ); + expect(fill).toBeInstanceOf(GraphicsGradientFill); + }); + + it("should create instance with focal point ratio", () => + { + const fill = new GraphicsGradientFill( + "radial", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255], + null, + "pad", + "rgb", + 0.5 + ); + expect(fill).toBeInstanceOf(GraphicsGradientFill); + }); + }); + + describe("colorStops getter test", () => + { + it("should return color stops array", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 0.5], + [0, 255] + ); + const colorStops = fill.colorStops; + expect(colorStops).toHaveLength(2); + }); + + it("should convert number colors to RGBA", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000], + [1], + [0] + ); + const colorStops = fill.colorStops; + expect(colorStops[0]).toEqual({ + ratio: 0, + R: 255, + G: 0, + B: 0, + A: 255 + }); + }); + + it("should convert string colors to RGBA", () => + { + const fill = new GraphicsGradientFill( + "linear", + ["#00FF00"], + [1], + [128] + ); + const colorStops = fill.colorStops; + expect(colorStops[0].ratio).toBe(128 / 255); + expect(colorStops[0].A).toBe(255); + }); + + it("should handle multiple color stops", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00, 0x0000FF], + [1, 0.5, 0.25], + [0, 127, 255] + ); + const colorStops = fill.colorStops; + expect(colorStops).toHaveLength(3); + expect(colorStops[0].R).toBe(255); + expect(colorStops[1].G).toBe(255); + expect(colorStops[2].B).toBe(255); + }); + + it("should normalize ratios", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255] + ); + const colorStops = fill.colorStops; + expect(colorStops[0].ratio).toBe(0); + expect(colorStops[1].ratio).toBe(1); + }); + + it("should handle alpha values", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 0.5], + [0, 255] + ); + const colorStops = fill.colorStops; + expect(colorStops[0].A).toBe(255); + expect(colorStops[1].A).toBe(127); + }); + + it("should use minimum length of arrays", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00, 0x0000FF], + [1, 0.5], + [0, 255] + ); + const colorStops = fill.colorStops; + expect(colorStops).toHaveLength(2); + }); + + it("should cache color stops", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255] + ); + const colorStops1 = fill.colorStops; + const colorStops2 = fill.colorStops; + expect(colorStops1).toBe(colorStops2); + }); + }); + + describe("toArray method test", () => + { + it("should return array with type", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255] + ); + const array = fill.toArray(); + expect(array[0]).toBe("linear"); + }); + + it("should return array with color stops", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255] + ); + const array = fill.toArray(); + expect(Array.isArray(array[1])).toBe(true); + }); + + it("should return array with matrix identity when matrix is null", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255] + ); + const array = fill.toArray(); + const matrix = array[2] as Float32Array | number[]; + expect(Array.from(matrix)).toEqual([1, 0, 0, 1, 0, 0]); + }); + + it("should return array with matrix rawData when matrix is provided", () => + { + const matrix = new Matrix(2, 0, 0, 2, 10, 20); + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255], + matrix + ); + const array = fill.toArray(); + expect(array[2]).toEqual(matrix.rawData); + }); + + it("should return array with spread method", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255], + null, + "reflect" + ); + const array = fill.toArray(); + expect(array[3]).toBe("reflect"); + }); + + it("should return array with interpolation method", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255], + null, + "pad", + "linearRGB" + ); + const array = fill.toArray(); + expect(array[4]).toBe("linearRGB"); + }); + + it("should return array with focal point ratio", () => + { + const fill = new GraphicsGradientFill( + "radial", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255], + null, + "pad", + "rgb", + 0.5 + ); + const array = fill.toArray(); + expect(array[5]).toBe(0.5); + }); + }); + + describe("clone method test", () => + { + it("should return new instance", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255] + ); + const cloned = fill.clone(); + expect(cloned).toBeInstanceOf(GraphicsGradientFill); + expect(cloned).not.toBe(fill); + }); + + it("should clone all properties", () => + { + const matrix = new Matrix(2, 0, 0, 2, 10, 20); + const fill = new GraphicsGradientFill( + "radial", + [0xFF0000, 0x00FF00, 0x0000FF], + [1, 0.5, 0.25], + [0, 127, 255], + matrix, + "reflect", + "linearRGB", + 0.5 + ); + const cloned = fill.clone(); + const fillArray = fill.toArray(); + const clonedArray = cloned.toArray(); + expect(clonedArray[0]).toBe(fillArray[0]); + expect(clonedArray[3]).toBe(fillArray[3]); + expect(clonedArray[4]).toBe(fillArray[4]); + expect(clonedArray[5]).toBe(fillArray[5]); + }); + + it("should clone color stops independently", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255] + ); + const cloned = fill.clone(); + const fillStops = fill.colorStops; + const clonedStops = cloned.colorStops; + expect(fillStops).toEqual(clonedStops); + expect(fillStops).not.toBe(clonedStops); + }); + + it("should clone matrix independently", () => + { + const matrix = new Matrix(2, 0, 0, 2, 10, 20); + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255], + matrix + ); + const cloned = fill.clone(); + const fillArray = fill.toArray(); + const clonedArray = cloned.toArray(); + expect(fillArray[2]).toEqual(clonedArray[2]); + expect(fillArray[2]).not.toBe(clonedArray[2]); + }); + + it("should handle null matrix in clone", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255], + null + ); + const cloned = fill.clone(); + const matrix = cloned.toArray()[2] as Float32Array | number[]; + expect(Array.from(matrix)).toEqual([1, 0, 0, 1, 0, 0]); + }); + }); + + describe("gradient types test", () => + { + it("should support linear gradient", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255] + ); + expect(fill.toArray()[0]).toBe("linear"); + }); + + it("should support radial gradient", () => + { + const fill = new GraphicsGradientFill( + "radial", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255] + ); + expect(fill.toArray()[0]).toBe("radial"); + }); + }); + + describe("spread methods test", () => + { + it("should support pad spread method", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255], + null, + "pad" + ); + expect(fill.toArray()[3]).toBe("pad"); + }); + + it("should support reflect spread method", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255], + null, + "reflect" + ); + expect(fill.toArray()[3]).toBe("reflect"); + }); + + it("should support repeat spread method", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255], + null, + "repeat" + ); + expect(fill.toArray()[3]).toBe("repeat"); + }); + }); + + describe("interpolation methods test", () => + { + it("should support rgb interpolation", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255], + null, + "pad", + "rgb" + ); + expect(fill.toArray()[4]).toBe("rgb"); + }); + + it("should support linearRGB interpolation", () => + { + const fill = new GraphicsGradientFill( + "linear", + [0xFF0000, 0x00FF00], + [1, 1], + [0, 255], + null, + "pad", + "linearRGB" + ); + expect(fill.toArray()[4]).toBe("linearRGB"); + }); + }); +}); diff --git a/packages/display/src/GraphicsGradientFill.ts b/packages/display/src/GraphicsGradientFill.ts index ab5db408..4f62a742 100644 --- a/packages/display/src/GraphicsGradientFill.ts +++ b/packages/display/src/GraphicsGradientFill.ts @@ -168,7 +168,7 @@ export class GraphicsGradientFill "R": color >>> 16 & 0xff, "G": color >>> 8 & 0xff, "B": color & 0xff, - "A": this._$alphas[idx] * 255 + "A": this._$alphas[idx] * 255 & 0xff }; } diff --git a/src/index.ts b/src/index.ts index 1ddb4ead..2d1c3697 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,7 +3,7 @@ import { Next2D } from "@next2d/core"; if (!("next2d" in window)) { - console.log("%c Next2D Player %c 2.9.0 %c https://next2d.app", + console.log("%c Next2D Player %c 2.10.0 %c https://next2d.app", "color: #fff; background: #5f5f5f", "color: #fff; background: #4bc729", "");