diff --git a/package-lock.json b/package-lock.json index b1531947..17fb8110 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,7 +31,8 @@ "lint-staged": "^15.1.0", "prettier": "^3.1.0", "prettier-plugin-organize-imports": "^3.2.4", - "typescript": "^5.2.2" + "typescript": "^5.2.2", + "vitest": "^0.34.6" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -7367,7 +7368,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "devOptional": true, + "dev": true, "engines": { "node": ">= 10" } @@ -7437,14 +7438,16 @@ } }, "node_modules/@types/chai": { - "version": "4.3.14", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.14.tgz", - "integrity": "sha512-Wj71sXE4Q4AkGdG9Tvq1u/fquNz9EdG4LIJMwVVII7ashjD/8cf8fyIfJAjRr6YcsXnSE8cOGQPq1gqeR8z+3w==" + "version": "4.3.19", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.19.tgz", + "integrity": "sha512-2hHHvQBVE2FiSK4eN0Br6snX9MtolHaTo/batnLjlGRhoQzlCL61iVpxoqO7SfFyOw+P/pwv+0zNHzKoGWz9Cw==", + "dev": true }, "node_modules/@types/chai-subset": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.5.tgz", "integrity": "sha512-c2mPnw+xHtXDoHmdtcCXGwyLMiauiAyxWMzhGpqHC4nqI/Y5G2XhTampslK2rb59kpcuHon03UH8W6iYUzw88A==", + "dev": true, "dependencies": { "@types/chai": "*" } @@ -8143,6 +8146,7 @@ "version": "0.34.6", "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.34.6.tgz", "integrity": "sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw==", + "dev": true, "dependencies": { "@vitest/spy": "0.34.6", "@vitest/utils": "0.34.6", @@ -8156,6 +8160,7 @@ "version": "0.34.6", "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.34.6.tgz", "integrity": "sha512-1CUQgtJSLF47NnhN+F9X2ycxUP0kLHQ/JWvNHbeBfwW8CzEGgeskzNnHDyv1ieKTltuR6sdIHV+nmR6kPxQqzQ==", + "dev": true, "dependencies": { "@vitest/utils": "0.34.6", "p-limit": "^4.0.0", @@ -8169,6 +8174,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "dev": true, "dependencies": { "yocto-queue": "^1.0.0" }, @@ -8180,9 +8186,10 @@ } }, "node_modules/@vitest/runner/node_modules/yocto-queue": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", - "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", + "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", + "dev": true, "engines": { "node": ">=12.20" }, @@ -8194,6 +8201,7 @@ "version": "0.34.6", "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-0.34.6.tgz", "integrity": "sha512-B3OZqYn6k4VaN011D+ve+AA4whM4QkcwcrwaKwAbyyvS/NB1hCWjFIBQxAQQSQir9/RtyAAGuq+4RJmbn2dH4w==", + "dev": true, "dependencies": { "magic-string": "^0.30.1", "pathe": "^1.1.1", @@ -8207,6 +8215,7 @@ "version": "0.34.6", "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.34.6.tgz", "integrity": "sha512-xaCvneSaeBw/cz8ySmF7ZwGvL0lBjfvqc1LpQ/vcdHEvpLn3Ff1vAvjw+CoGn0802l++5L/pxb7whwcWAw+DUQ==", + "dev": true, "dependencies": { "tinyspy": "^2.1.1" }, @@ -8218,6 +8227,7 @@ "version": "0.34.6", "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.34.6.tgz", "integrity": "sha512-IG5aDD8S6zlvloDsnzHw0Ut5xczlF+kv2BOTo+iXfPr54Yhi5qbVOgGB1hZaVq4iJ4C/MZ2J0y15IlsV/ZcI0A==", + "dev": true, "dependencies": { "diff-sequences": "^29.4.3", "loupe": "^2.3.6", @@ -8536,7 +8546,7 @@ "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", "deprecated": "Use your platform's native atob() and btoa() methods instead", - "devOptional": true + "dev": true }, "node_modules/abbrev": { "version": "1.1.1", @@ -8610,7 +8620,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "devOptional": true, + "dev": true, "dependencies": { "debug": "4" }, @@ -8885,6 +8895,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, "engines": { "node": "*" } @@ -9611,6 +9622,7 @@ "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, "engines": { "node": ">=8" } @@ -9853,9 +9865,10 @@ } }, "node_modules/chai": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", - "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", + "dev": true, "dependencies": { "assertion-error": "^1.1.0", "check-error": "^1.0.3", @@ -9863,7 +9876,7 @@ "get-func-name": "^2.0.2", "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.8" + "type-detect": "^4.1.0" }, "engines": { "node": ">=4" @@ -9919,6 +9932,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, "dependencies": { "get-func-name": "^2.0.2" }, @@ -12017,7 +12031,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz", "integrity": "sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==", - "devOptional": true, + "dev": true, "dependencies": { "rrweb-cssom": "^0.6.0" }, @@ -12496,7 +12510,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz", "integrity": "sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==", - "devOptional": true, + "dev": true, "dependencies": { "abab": "^2.0.6", "whatwg-mimetype": "^3.0.0", @@ -12510,7 +12524,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", - "devOptional": true, + "dev": true, "dependencies": { "punycode": "^2.3.0" }, @@ -12522,7 +12536,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "devOptional": true, + "dev": true, "engines": { "node": ">=12" } @@ -12531,7 +12545,7 @@ "version": "12.0.1", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz", "integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==", - "devOptional": true, + "dev": true, "dependencies": { "tr46": "^4.1.1", "webidl-conversions": "^7.0.0" @@ -12619,7 +12633,7 @@ "version": "10.4.3", "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", - "devOptional": true + "dev": true }, "node_modules/decompress-response": { "version": "3.3.0", @@ -12639,9 +12653,10 @@ "dev": true }, "node_modules/deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", + "dev": true, "dependencies": { "type-detect": "^4.0.0" }, @@ -12919,6 +12934,7 @@ "version": "29.6.3", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -13000,7 +13016,7 @@ "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", "deprecated": "Use your platform's native DOMException instead", - "devOptional": true, + "dev": true, "dependencies": { "webidl-conversions": "^7.0.0" }, @@ -13012,7 +13028,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "devOptional": true, + "dev": true, "engines": { "node": ">=12" } @@ -14829,6 +14845,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, "engines": { "node": "*" } @@ -16119,7 +16136,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", - "devOptional": true, + "dev": true, "dependencies": { "whatwg-encoding": "^2.0.0" }, @@ -16291,7 +16308,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "devOptional": true, + "dev": true, "dependencies": { "@tootallnate/once": "2", "agent-base": "6", @@ -16344,7 +16361,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "devOptional": true, + "dev": true, "dependencies": { "agent-base": "6", "debug": "4" @@ -17148,7 +17165,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "devOptional": true + "dev": true }, "node_modules/is-reference": { "version": "1.2.1", @@ -17766,7 +17783,7 @@ "version": "22.1.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-22.1.0.tgz", "integrity": "sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw==", - "devOptional": true, + "dev": true, "dependencies": { "abab": "^2.0.6", "cssstyle": "^3.0.0", @@ -17808,7 +17825,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", - "devOptional": true, + "dev": true, "dependencies": { "punycode": "^2.3.0" }, @@ -17820,7 +17837,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "devOptional": true, + "dev": true, "engines": { "node": ">=12" } @@ -17829,7 +17846,7 @@ "version": "12.0.1", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz", "integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==", - "devOptional": true, + "dev": true, "dependencies": { "tr46": "^4.1.1", "webidl-conversions": "^7.0.0" @@ -17897,7 +17914,8 @@ "node_modules/jsonc-parser": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==" + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true }, "node_modules/jsonfile": { "version": "6.1.0", @@ -18943,6 +18961,7 @@ "version": "0.4.3", "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.3.tgz", "integrity": "sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==", + "dev": true, "engines": { "node": ">=14" }, @@ -19332,6 +19351,7 @@ "version": "2.3.7", "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, "dependencies": { "get-func-name": "^2.0.1" } @@ -19369,6 +19389,7 @@ "version": "0.30.5", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", + "dev": true, "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" }, @@ -19959,6 +19980,7 @@ "version": "1.6.1", "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.6.1.tgz", "integrity": "sha512-vLgaHvaeunuOXHSmEbZ9izxPx3USsk8KCQ8iC+aTlp5sKRSoZvwhHh5L9VbKSaVC6sJDqbyohIS76E2VmHIPAA==", + "dev": true, "dependencies": { "acorn": "^8.11.3", "pathe": "^1.1.2", @@ -20247,16 +20269,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/node-html-parser": { - "version": "6.1.12", - "resolved": "https://registry.npmjs.org/node-html-parser/-/node-html-parser-6.1.12.tgz", - "integrity": "sha512-/bT/Ncmv+fbMGX96XG9g05vFt43m/+SYKIs9oAemQVYyVcZmDAI2Xq/SbNcpOA35eF0Zk2av3Ksf+Xk8Vt8abA==", - "dev": true, - "dependencies": { - "css-select": "^5.1.0", - "he": "1.2.0" - } - }, "node_modules/node-machine-id": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/node-machine-id/-/node-machine-id-1.1.12.tgz", @@ -20965,7 +20977,7 @@ "version": "2.2.7", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", - "devOptional": true + "dev": true }, "node_modules/nx": { "version": "16.10.0", @@ -22178,12 +22190,14 @@ "node_modules/pathe": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", - "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==" + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true }, "node_modules/pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, "engines": { "node": "*" } @@ -22324,6 +22338,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==", + "dev": true, "dependencies": { "jsonc-parser": "^3.2.0", "mlly": "^1.2.0", @@ -23382,6 +23397,7 @@ "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -23395,6 +23411,7 @@ "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, "engines": { "node": ">=10" }, @@ -23653,7 +23670,7 @@ "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "devOptional": true + "dev": true }, "node_modules/pump": { "version": "3.0.0", @@ -23764,7 +23781,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "devOptional": true + "dev": true }, "node_modules/queue": { "version": "6.0.2", @@ -24113,7 +24130,8 @@ "node_modules/react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true }, "node_modules/react-json-view": { "version": "1.21.3", @@ -25349,7 +25367,7 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz", "integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==", - "devOptional": true + "dev": true }, "node_modules/rtl-detect": { "version": "1.1.2", @@ -25475,7 +25493,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", - "devOptional": true, + "dev": true, "dependencies": { "xmlchars": "^2.2.0" }, @@ -25910,7 +25928,8 @@ "node_modules/siginfo": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==" + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true }, "node_modules/signal-exit": { "version": "3.0.7", @@ -26328,15 +26347,6 @@ "node": ">=4" } }, - "node_modules/source-map": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", - "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -26501,19 +26511,11 @@ "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", "deprecated": "Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility" }, - "node_modules/stack-trace": { - "version": "1.0.0-pre2", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-1.0.0-pre2.tgz", - "integrity": "sha512-2ztBJRek8IVofG9DBJqdy2N5kulaacX30Nz7xmkYF6ale9WBVmIy6mFBchvGX7Vx/MyjBhx+Rcxqrj+dbOnQ6A==", - "dev": true, - "engines": { - "node": ">=16" - } - }, "node_modules/stackback": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==" + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true }, "node_modules/state-toggle": { "version": "1.0.3", @@ -26714,6 +26716,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.3.0.tgz", "integrity": "sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==", + "dev": true, "dependencies": { "acorn": "^8.10.0" }, @@ -26967,7 +26970,7 @@ "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "devOptional": true + "dev": true }, "node_modules/tailwindcss": { "version": "3.4.3", @@ -27347,14 +27350,16 @@ "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" }, "node_modules/tinybench": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.6.0.tgz", - "integrity": "sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==" + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true }, "node_modules/tinypool": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.7.0.tgz", "integrity": "sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==", + "dev": true, "engines": { "node": ">=14.0.0" } @@ -27363,6 +27368,7 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz", "integrity": "sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==", + "dev": true, "engines": { "node": ">=14.0.0" } @@ -27423,7 +27429,7 @@ "version": "4.1.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", - "devOptional": true, + "dev": true, "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", @@ -27438,7 +27444,7 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "devOptional": true, + "dev": true, "engines": { "node": ">= 4.0.0" } @@ -27918,9 +27924,10 @@ } }, "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "dev": true, "engines": { "node": ">=4" } @@ -28000,7 +28007,8 @@ "node_modules/ufo": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.3.tgz", - "integrity": "sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==" + "integrity": "sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==", + "dev": true }, "node_modules/uglify-js": { "version": "3.17.4", @@ -28621,7 +28629,7 @@ "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "devOptional": true, + "dev": true, "dependencies": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" @@ -28872,6 +28880,7 @@ "version": "0.34.6", "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.34.6.tgz", "integrity": "sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==", + "dev": true, "dependencies": { "cac": "^6.7.14", "debug": "^4.3.4", @@ -28993,6 +29002,7 @@ "version": "0.34.6", "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.34.6.tgz", "integrity": "sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==", + "dev": true, "dependencies": { "@types/chai": "^4.3.5", "@types/chai-subset": "^1.3.3", @@ -29101,7 +29111,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", - "devOptional": true, + "dev": true, "dependencies": { "xml-name-validator": "^4.0.0" }, @@ -29610,7 +29620,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", - "devOptional": true, + "dev": true, "dependencies": { "iconv-lite": "0.6.3" }, @@ -29622,7 +29632,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "devOptional": true, + "dev": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -29634,7 +29644,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", - "devOptional": true, + "dev": true, "engines": { "node": ">=12" } @@ -29663,9 +29673,10 @@ } }, "node_modules/why-is-node-running": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", - "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, "dependencies": { "siginfo": "^2.0.0", "stackback": "0.0.2" @@ -30015,7 +30026,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", - "devOptional": true, + "dev": true, "engines": { "node": ">=12" } @@ -30024,7 +30035,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "devOptional": true + "dev": true }, "node_modules/xmldom-sre": { "version": "0.1.31", @@ -30157,8 +30168,7 @@ "@revideo/ui": "0.5.9", "clsx": "^2.0.0", "jsdom": "^22.1.0", - "preact": "^10.19.2", - "vitest": "^0.34.6" + "preact": "^10.19.2" } }, "packages/cli": { @@ -30202,8 +30212,7 @@ "devDependencies": { "@revideo/internal": "0.0.0", "@types/chroma-js": "2.4.4", - "jsdom": "^22.1.0", - "vitest": "^0.34.6" + "jsdom": "^22.1.0" } }, "packages/core/node_modules/chroma-js": { @@ -30356,8 +30365,7 @@ "@revideo/core": "*", "@revideo/ffmpeg": "*", "jest-image-snapshot": "^6.2.0", - "puppeteer": "^21.5.2", - "vitest": "^0.34.6" + "puppeteer": "^21.5.2" }, "devDependencies": { "@revideo/ui": "*", @@ -30515,7 +30523,8 @@ "license": "MIT", "dependencies": { "@revideo/ffmpeg": "0.5.9", - "puppeteer": "^22.6.0" + "puppeteer": "^22.6.0", + "vite": "4.5.2" }, "devDependencies": { "@revideo/core": "0.5.9", @@ -30810,30 +30819,6 @@ "vite-plugin-dts": "^4.2.1" } }, - "packages/ui/node_modules/@preact/preset-vite": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/@preact/preset-vite/-/preset-vite-2.8.2.tgz", - "integrity": "sha512-m3tl+M8IO8jgiHnk+7LSTFl8axdPXloewi7iGVLdmCwf34XOzEUur0bZVewW4DUbUipFjTS2CXu27+5f/oexBA==", - "dev": true, - "dependencies": { - "@babel/plugin-transform-react-jsx": "^7.22.15", - "@babel/plugin-transform-react-jsx-development": "^7.22.5", - "@prefresh/vite": "^2.4.1", - "@rollup/pluginutils": "^4.1.1", - "babel-plugin-transform-hook-names": "^1.0.2", - "debug": "^4.3.4", - "kolorist": "^1.8.0", - "magic-string": "0.30.5", - "node-html-parser": "^6.1.10", - "resolve": "^1.22.8", - "source-map": "^0.7.4", - "stack-trace": "^1.0.0-pre2" - }, - "peerDependencies": { - "@babel/core": "7.x", - "vite": "2.x || 3.x || 4.x || 5.x" - } - }, "packages/vite-plugin": { "name": "@revideo/vite-plugin", "version": "0.5.9", @@ -30853,8 +30838,7 @@ "@types/mime-types": "^2.1.1" }, "peerDependencies": { - "@types/node": "18.14.0", - "vite": "^4.5" + "@types/node": "18.14.0" } }, "packages/vite-plugin/node_modules/source-map": { diff --git a/package.json b/package.json index 8308e327..f07cd252 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,8 @@ "lint-staged": "^15.1.0", "prettier": "^3.1.0", "prettier-plugin-organize-imports": "^3.2.4", - "typescript": "^5.2.2" + "typescript": "^5.2.2", + "vitest": "^0.34.6" }, "lint-staged": { "*.{ts,tsx}": "eslint --fix", diff --git a/packages/2d/package.json b/packages/2d/package.json index 91581f4c..f6af9f8a 100644 --- a/packages/2d/package.json +++ b/packages/2d/package.json @@ -33,8 +33,7 @@ "@revideo/ui": "0.5.9", "clsx": "^2.0.0", "jsdom": "^22.1.0", - "preact": "^10.19.2", - "vitest": "^0.34.6" + "preact": "^10.19.2" }, "dependencies": { "@codemirror/language": "^6.10.1", diff --git a/packages/2d/src/lib/components/Layout.ts b/packages/2d/src/lib/components/Layout.ts index 8925fd0c..a5351a5e 100644 --- a/packages/2d/src/lib/components/Layout.ts +++ b/packages/2d/src/lib/components/Layout.ts @@ -962,9 +962,9 @@ export class Layout extends Node { @computed() protected applyFont() { - const loadingFonts = Array.from(document.fonts).filter( - font => font.status === 'loading', - ); + const loadingFonts = document.fonts + ? Array.from(document.fonts).filter(font => font.status === 'loading') + : []; if (loadingFonts.length > 0) { DependencyContext.collectPromise( (async () => { diff --git a/packages/2d/src/lib/components/__tests__/mockScene2D.ts b/packages/2d/src/lib/components/__tests__/mockScene2D.ts index 789f0ae8..d85ff518 100644 --- a/packages/2d/src/lib/components/__tests__/mockScene2D.ts +++ b/packages/2d/src/lib/components/__tests__/mockScene2D.ts @@ -24,9 +24,9 @@ export function mockScene2D() { const playback = new PlaybackManager(); const status = new PlaybackStatus(playback); const description = { - ...makeScene2D(function* () { + ...makeScene2D('scene 1', function* () { // do nothing - }, 'scene'), + }), name: 'test', size: new Vector2(1920, 1080), resolutionScale: 1, diff --git a/packages/2d/src/lib/tsconfig.json b/packages/2d/src/lib/tsconfig.json index 94d74faa..91434e1e 100644 --- a/packages/2d/src/lib/tsconfig.json +++ b/packages/2d/src/lib/tsconfig.json @@ -10,5 +10,6 @@ } ] }, - "include": ["**/*"] + "include": ["**/*"], + "exclude": [] } diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 8bc59ce2..fcd906a8 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -244,9 +244,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -532,9 +532,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -819,9 +819,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -1106,9 +1106,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -1393,9 +1393,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -1680,9 +1680,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -1967,9 +1967,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -2253,9 +2253,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -2539,9 +2539,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -2823,9 +2823,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -3104,9 +3104,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -3383,9 +3383,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -3662,9 +3662,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -3941,9 +3941,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -4219,9 +4219,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -4497,9 +4497,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -4774,9 +4774,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -5050,9 +5050,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -5325,9 +5325,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -5600,9 +5600,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -5875,9 +5875,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -6150,9 +6150,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -6424,9 +6424,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -6698,9 +6698,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -6972,9 +6972,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -7250,9 +7250,9 @@ See [the migration guide](https://motion-canvas.github.io/guides/migration/12.0. * change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. -When importing scenes in the project file, a dedicated `?scene` query param should be used: +When importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', @@ -7847,11 +7847,11 @@ for more info. - change the way scenes are imported Scene files no longer need to follow the pattern: `[name].scene.tsx`. When -importing scenes in the project file, a dedicated `?scene` query param should be +importing scenes in the project file, a dedicated `` query param should be used: ```ts -import example from './scenes/example?scene'; +import example from './scenes/example'; export default new Project({ name: 'project', diff --git a/packages/core/package.json b/packages/core/package.json index 80035f0d..39f98904 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -31,7 +31,6 @@ "devDependencies": { "@types/chroma-js": "2.4.4", "@revideo/internal": "0.0.0", - "jsdom": "^22.1.0", - "vitest": "^0.34.6" + "jsdom": "^22.1.0" } } diff --git a/packages/core/project.d.ts b/packages/core/project.d.ts index dabb635e..ec961d88 100644 --- a/packages/core/project.d.ts +++ b/packages/core/project.d.ts @@ -21,9 +21,4 @@ declare module '*.glsl' { export = value; } -declare module '*?scene' { - const value: import('./lib/scenes/Scene').FullSceneDescription; - export = value; -} - declare type Callback = (...args: any[]) => void; diff --git a/packages/core/src/app/Project.ts b/packages/core/src/app/Project.ts index db55cc06..dbe52689 100644 --- a/packages/core/src/app/Project.ts +++ b/packages/core/src/app/Project.ts @@ -51,6 +51,12 @@ export interface ProjectSettings { }; } +export type PartialProjectSettings = { + shared?: Partial; + rendering?: Partial; + preview?: Partial; +}; + export interface UserProject { /** * The name of the project. @@ -58,20 +64,7 @@ export interface UserProject { name?: string; /** - * a list of scene descriptions that make up the project. - * - * @remarks - * a full scene description can be obtained by loading a scene module with a - * `?scene` query parameter. - * - * @example - * ```ts - * import examplescene from './example?scene'; - * - * export default makeproject({ - * scenes: [examplescene], - * }); - * ``` + * A list of scene descriptions that make up the project. */ scenes: SceneDescription[]; @@ -98,11 +91,12 @@ export interface UserProject { * Includes things like the background color, the resolution, the frame rate, * and the exporter to use. */ - settings: ProjectSettings; + settings?: PartialProjectSettings; } export interface Project extends UserProject { name: string; + settings: ProjectSettings; /** * @deprecated Not exposed in the public API. We set the exporters as plugins diff --git a/packages/core/src/app/makeProject.ts b/packages/core/src/app/makeProject.ts index 5187161c..50f5411e 100644 --- a/packages/core/src/app/makeProject.ts +++ b/packages/core/src/app/makeProject.ts @@ -1,15 +1,59 @@ import DefaultPlugin from '../plugin/DefaultPlugin'; +import {Color, Vector2} from '../types'; import {Logger} from './Logger'; -import {Project, UserProject, createVersionObject} from './Project'; +import { + Project, + ProjectSettings, + UserProject, + createVersionObject, +} from './Project'; export function makeProject(project: UserProject): Project { // Don't delete, has side effects // TODO(konsti): Figure out how to get rid of this void DefaultPlugin; + const defaultSettings: ProjectSettings = { + shared: { + background: new Color('#FFFFFF'), + range: [0, Infinity], + size: new Vector2(1920, 1080), + }, + rendering: { + exporter: { + name: '@revideo/core/wasm', + }, + fps: 30, + resolutionScale: 1, + colorSpace: 'srgb', + }, + preview: { + fps: 60, + resolutionScale: 1, + }, + }; + + const settings: ProjectSettings = { + ...defaultSettings, + ...project.settings, + shared: { + ...defaultSettings.shared, + ...project.settings?.shared, + }, + rendering: { + ...defaultSettings.rendering, + ...project.settings?.rendering, + }, + preview: { + ...defaultSettings.preview, + ...project.settings?.preview, + }, + }; + return { ...project, name: project.name ?? 'project', + settings, plugins: [], logger: new Logger(), versions: createVersionObject('0.5.9'), diff --git a/packages/core/src/exporter/ImageExporter.ts b/packages/core/src/exporter/ImageExporter.ts index 4dad4010..9ffbe952 100644 --- a/packages/core/src/exporter/ImageExporter.ts +++ b/packages/core/src/exporter/ImageExporter.ts @@ -11,7 +11,6 @@ const EXPORT_FRAME_LIMIT = 256; const EXPORT_RETRY_DELAY = 1000; export interface ImageExporterOptions { - name: string; quality: number; fileType: CanvasOutputMimeType; groupByScene: boolean; diff --git a/packages/docs/docs/guide/designing-animations/emojis.mdx b/packages/docs/docs/guide/designing-animations/emojis.mdx index 4b9df711..7aaaea15 100644 --- a/packages/docs/docs/guide/designing-animations/emojis.mdx +++ b/packages/docs/docs/guide/designing-animations/emojis.mdx @@ -25,7 +25,7 @@ your `` nodes: ```tsx import {makeProject} from '@revideo/core'; -import example from './scenes/example?scene'; +import example from './scenes/example'; import './global.css'; export default makeProject({ diff --git a/packages/docs/docs/guide/installation-and-setup.mdx b/packages/docs/docs/guide/installation-and-setup.mdx index c50fe650..9ca4fec7 100644 --- a/packages/docs/docs/guide/installation-and-setup.mdx +++ b/packages/docs/docs/guide/installation-and-setup.mdx @@ -274,7 +274,7 @@ our example, this configuration is declared in `src/project.ts`: ```ts title="src/project.ts" import {makeProject} from '@revideo/core'; -import example from './scenes/example?scene'; +import example from './scenes/example'; export default makeProject({ scenes: [example], diff --git a/packages/docs/docs/guide/parameterized-video.mdx b/packages/docs/docs/guide/parameterized-video.mdx index b87b12da..afbb802c 100644 --- a/packages/docs/docs/guide/parameterized-video.mdx +++ b/packages/docs/docs/guide/parameterized-video.mdx @@ -73,7 +73,7 @@ To use variables in the visual editor, you can pass them to `makeProject` in ```ts import {makeProject} from '@revideo/core'; -import example from './scenes/example?scene'; +import example from './scenes/example'; export default makeProject({ scenes: [example], diff --git a/packages/docs/docs/guide/project-structure.mdx b/packages/docs/docs/guide/project-structure.mdx index 9a42eee8..fe88d8fd 100644 --- a/packages/docs/docs/guide/project-structure.mdx +++ b/packages/docs/docs/guide/project-structure.mdx @@ -62,8 +62,8 @@ Your project file does two things: ``` import {makeProject} from '@revideo/core'; -import example from './scenes/example?scene'; -import example2 from './scenes/example2?scene'; +import example from './scenes/example'; +import example2 from './scenes/example2'; export default makeProject({ diff --git a/packages/docs/docs/motion-canvas/code-animations.mdx b/packages/docs/docs/motion-canvas/code-animations.mdx index e11fac04..01a642d6 100644 --- a/packages/docs/docs/motion-canvas/code-animations.mdx +++ b/packages/docs/docs/motion-canvas/code-animations.mdx @@ -64,7 +64,7 @@ the imported grammar, and set it as the default highlighter: ```ts title="src/project.ts" import {makeProject} from '@revideo/core'; -import example from './scenes/example?scene'; +import example from './scenes/example'; // highlight-start import {Code, LezerHighlighter} from '@revideo/2d'; diff --git a/packages/docs/docs/motion-canvas/custom-font.mdx b/packages/docs/docs/motion-canvas/custom-font.mdx index c212c1fd..c3ba7a21 100644 --- a/packages/docs/docs/motion-canvas/custom-font.mdx +++ b/packages/docs/docs/motion-canvas/custom-font.mdx @@ -33,7 +33,7 @@ Then, in `project.ts`, import the css file. ```ts import {makeProject} from '@revideo/core'; -import example from './scenes/example?scene'; +import example from './scenes/example'; import './global.css'; // <- import the css diff --git a/packages/e2e/package.json b/packages/e2e/package.json index 96885ddc..4faee6b3 100644 --- a/packages/e2e/package.json +++ b/packages/e2e/package.json @@ -12,8 +12,7 @@ "@revideo/core": "*", "@revideo/ffmpeg": "*", "jest-image-snapshot": "^6.2.0", - "puppeteer": "^21.5.2", - "vitest": "^0.34.6" + "puppeteer": "^21.5.2" }, "devDependencies": { "@revideo/ui": "*", diff --git a/packages/e2e/tests/project.meta b/packages/e2e/tests/project.meta deleted file mode 100644 index 0d1d303f..00000000 --- a/packages/e2e/tests/project.meta +++ /dev/null @@ -1,32 +0,0 @@ -{ - "version": 0, - "shared": { - "background": "rgb(255,255,255)", - "range": [ - 0, - null - ], - "size": { - "x": 320, - "y": 320 - }, - "audioOffset": 0 - }, - "preview": { - "fps": 30, - "resolutionScale": 1 - }, - "rendering": { - "fps": 30, - "resolutionScale": 1, - "colorSpace": "srgb", - "exporter": { - "name": "@revideo/core/image-sequence", - "options": { - "fileType": "image/png", - "quality": 100, - "groupByScene": true - } - } - } -} \ No newline at end of file diff --git a/packages/e2e/tests/project.ts b/packages/e2e/tests/project.ts index 71dc669b..74df38ea 100644 --- a/packages/e2e/tests/project.ts +++ b/packages/e2e/tests/project.ts @@ -1,8 +1,33 @@ -import {makeProject} from '@revideo/core'; +import {Color, makeProject, Vector2} from '@revideo/core'; -import circle from './scenes/circle?scene'; -import rect from './scenes/rect?scene'; +import circle from './scenes/circle'; +import rect from './scenes/rect'; export default makeProject({ + name: 'project', scenes: [circle, rect], + settings: { + shared: { + background: new Color('#FFFFFF'), + range: [0, Infinity], + size: new Vector2(320, 320), + }, + preview: { + fps: 30, + resolutionScale: 1, + }, + rendering: { + fps: 30, + resolutionScale: 1, + colorSpace: 'srgb', + exporter: { + name: '@revideo/core/image-sequence', + options: { + fileType: 'image/png', + quality: 100, + groupByScene: true, + }, + }, + }, + }, }); diff --git a/packages/e2e/tests/scenes/circle.meta b/packages/e2e/tests/scenes/circle.meta deleted file mode 100644 index 04009bec..00000000 --- a/packages/e2e/tests/scenes/circle.meta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "timeEvents": [], - "seed": 4241314046 -} \ No newline at end of file diff --git a/packages/e2e/tests/scenes/circle.tsx b/packages/e2e/tests/scenes/circle.tsx index 7f755a8d..55b02ddf 100644 --- a/packages/e2e/tests/scenes/circle.tsx +++ b/packages/e2e/tests/scenes/circle.tsx @@ -1,6 +1,6 @@ import {Circle, makeScene2D} from '@revideo/2d'; -export default makeScene2D(function* (view) { +export default makeScene2D('circle', function* (view) { view.add( (); yield view.add(); diff --git a/packages/examples/src/scenes/components.meta b/packages/examples/src/scenes/components.meta deleted file mode 100644 index fa9bf279..00000000 --- a/packages/examples/src/scenes/components.meta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "timeEvents": [], - "seed": 1216764715 -} \ No newline at end of file diff --git a/packages/examples/src/scenes/components.tsx b/packages/examples/src/scenes/components.tsx index d775e15d..c7e1f5d3 100644 --- a/packages/examples/src/scenes/components.tsx +++ b/packages/examples/src/scenes/components.tsx @@ -4,7 +4,7 @@ import {Switch} from '@revideo/examples/src/components/Switch'; // see this import for the component ^ // usage of the component: -export default makeScene2D(function* (view) { +export default makeScene2D('components', function* (view) { const switchRef = createRef(); view.add(); diff --git a/packages/examples/src/scenes/layout-group.meta b/packages/examples/src/scenes/layout-group.meta deleted file mode 100644 index 3cd16b9d..00000000 --- a/packages/examples/src/scenes/layout-group.meta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 1, - "timeEvents": [], - "seed": 2413678884 -} \ No newline at end of file diff --git a/packages/examples/src/scenes/layout-group.tsx b/packages/examples/src/scenes/layout-group.tsx index 73bb66a6..089909ae 100644 --- a/packages/examples/src/scenes/layout-group.tsx +++ b/packages/examples/src/scenes/layout-group.tsx @@ -1,7 +1,7 @@ import {Layout, Node, Rect, makeScene2D} from '@revideo/2d'; import {createRef} from '@revideo/core'; -export default makeScene2D(function* (view) { +export default makeScene2D('layout-group', function* (view) { const group = createRef(); view.add( diff --git a/packages/examples/src/scenes/layout.meta b/packages/examples/src/scenes/layout.meta deleted file mode 100644 index 822e230f..00000000 --- a/packages/examples/src/scenes/layout.meta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 1, - "timeEvents": [], - "seed": 2835047788 -} \ No newline at end of file diff --git a/packages/examples/src/scenes/layout.tsx b/packages/examples/src/scenes/layout.tsx index 926e064b..d44b600d 100644 --- a/packages/examples/src/scenes/layout.tsx +++ b/packages/examples/src/scenes/layout.tsx @@ -3,7 +3,7 @@ import {all, createRef} from '@revideo/core'; const RED = '#ff6470'; -export default makeScene2D(function* (view) { +export default makeScene2D('layout', function* (view) { const colA = createRef(); const colB = createRef(); const rowA = createRef(); diff --git a/packages/examples/src/scenes/logging.meta b/packages/examples/src/scenes/logging.meta deleted file mode 100644 index c4d94cd8..00000000 --- a/packages/examples/src/scenes/logging.meta +++ /dev/null @@ -1,18 +0,0 @@ -{ - "version": 1, - "timeEvents": [ - { - "name": "basic logging", - "targetTime": 0.9814062499999999 - }, - { - "name": "logging payloads", - "targetTime": 1.9671614583333334 - }, - { - "name": "profiling", - "targetTime": 2.985234375 - } - ], - "seed": 1707918003 -} \ No newline at end of file diff --git a/packages/examples/src/scenes/logging.tsx b/packages/examples/src/scenes/logging.tsx index 9b25ebbe..d1024b40 100644 --- a/packages/examples/src/scenes/logging.tsx +++ b/packages/examples/src/scenes/logging.tsx @@ -1,21 +1,16 @@ import {Circle, makeScene2D} from '@revideo/2d'; -import {useLogger, waitFor, waitUntil} from '@revideo/core'; +import {useLogger, waitFor} from '@revideo/core'; -export default makeScene2D(function* (view) { +export default makeScene2D('logging', function* (view) { const logger = useLogger(); view.add(); - // Basic Logging - yield* waitUntil('basic logging'); logger.debug('Just here to debug some code.'); logger.info('All fine, just a little info.'); logger.warn('Be careful, something has gone wrong.'); logger.error('Oops. An error occured.'); - // Logging Payloads - yield* waitUntil('logging payloads'); - logger.debug({ message: 'Some more advanced logging', inspect: 'circle', @@ -27,9 +22,6 @@ export default makeScene2D(function* (view) { stack: new Error('').stack, }); - // Profiling - yield* waitUntil('profiling'); - logger.profile('id'); yield* waitFor(2); logger.profile('id', { diff --git a/packages/examples/src/scenes/media-image.meta b/packages/examples/src/scenes/media-image.meta deleted file mode 100644 index 61408465..00000000 --- a/packages/examples/src/scenes/media-image.meta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 1, - "timeEvents": [], - "seed": 3374664546 -} \ No newline at end of file diff --git a/packages/examples/src/scenes/media-image.tsx b/packages/examples/src/scenes/media-image.tsx index 5fd3b8b4..cf613784 100644 --- a/packages/examples/src/scenes/media-image.tsx +++ b/packages/examples/src/scenes/media-image.tsx @@ -3,7 +3,7 @@ import {all, createRef} from '@revideo/core'; import logoSvg from '@revideo/examples/assets/logo.svg'; -export default makeScene2D(function* (view) { +export default makeScene2D('media-image', function* (view) { const imageRef = createRef(); yield view.add(); diff --git a/packages/examples/src/scenes/media-video.meta b/packages/examples/src/scenes/media-video.meta deleted file mode 100644 index 61408465..00000000 --- a/packages/examples/src/scenes/media-video.meta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 1, - "timeEvents": [], - "seed": 3374664546 -} \ No newline at end of file diff --git a/packages/examples/src/scenes/media-video.tsx b/packages/examples/src/scenes/media-video.tsx index 56884f50..f78e9dc0 100644 --- a/packages/examples/src/scenes/media-video.tsx +++ b/packages/examples/src/scenes/media-video.tsx @@ -3,7 +3,7 @@ import {createRef} from '@revideo/core'; import exampleMp4 from '@revideo/examples/assets/example.mp4'; -export default makeScene2D(function* (view) { +export default makeScene2D('media-video', function* (view) { const videoRef = createRef