🎥 Make videos programmatically with React
feat: upgrade to docusaurus-twoslash plugin v1.1.5
Frenco6ffc08e156c1
diff --git a/packages/docs/docs/getting-started.md b/packages/docs/docs/getting-started.mdindex 2e80c8cba5..5eac99aa8d 100644--- a/packages/docs/docs/getting-started.md+++ b/packages/docs/docs/getting-started.md@@ -53,7 +53,7 @@ Linux users need to install some additional packages to get Chrome/Puppeteer wor**Ubuntu**-```console+```bashapt install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libgbm-dev```diff --git a/packages/docs/docs/using-audio.md b/packages/docs/docs/using-audio.mdindex c1b6a47bb5..c765098caa 100644--- a/packages/docs/docs/using-audio.md+++ b/packages/docs/docs/using-audio.md@@ -7,7 +7,9 @@ id: using-audioYou can import an audio file using an `import` statement:-```tsx+```ts twoslash+import {Audio} from 'remotion' // needed to import audio files+// ---cut---import audio from './audio.mp3'```diff --git a/packages/docs/docusaurus.config.js b/packages/docs/docusaurus.config.jsindex ec4db1e05d..678b9459a9 100644--- a/packages/docs/docusaurus.config.js+++ b/packages/docs/docusaurus.config.js@@ -117,17 +117,6 @@ module.exports = {"@docusaurus/preset-classic",{docs: {- remarkPlugins: [- [- require("remark-shiki-twoslash").default,- {- themes: ["min-light", "min-dark"],- defaultCompilerOptions: {- types: ["node"],- },- },- ],- ],sidebarPath: require.resolve("./sidebars.js"),// Please change this to your repo.editUrl:@@ -140,13 +129,18 @@ module.exports = {"https://github.com/remotion-dev/remotion/edit/main/packages/docs/blog/",},theme: {- customCss: [- require.resolve("./src/css/custom.css"),- require.resolve("./src/css/twoslash.css"),- ],+ customCss: [require.resolve("./src/css/custom.css")],+ },+ },+ ],+ [+ "docusaurus-preset-shiki-twoslash",+ {+ themes: ["min-light", "min-dark"],+ defaultCompilerOptions: {+ types: ["node"],},},],],- plugins: [require.resolve("./src/plugins/copy-to-clipboard")],};diff --git a/packages/docs/package-lock.json b/packages/docs/package-lock.jsonindex 1368afa5dd..7813496ed4 100644--- a/packages/docs/package-lock.json+++ b/packages/docs/package-lock.json@@ -19,12 +19,11 @@"clipboard": "^2.0.8","clsx": "^1.1.1","color-namer": "1.4.0",- "cross-env": "^7.0.3",+ "docusaurus-preset-shiki-twoslash": "^1.1.5","hls.js": "^0.14.17","jest": "^27.0.4","polished": "4.1.2","react-player": "^2.9.0",- "remark-shiki-twoslash": "^1.5.0","ts-jest": "^27.0.3"}},@@ -3335,9 +3334,9 @@"integrity": "sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA=="},"node_modules/@types/node": {- "version": "15.12.5",- "resolved": "https://registry.npmjs.org/@types/node/-/node-15.12.5.tgz",- "integrity": "sha512-se3yX7UHv5Bscf8f1ERKvQOD6sTyycH3hdaoozvaLxgUiY5lIGEeH37AD0G0Qi9kPqihPn0HOfd2yaIEN9VwEg=="+ "version": "16.0.0",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.0.0.tgz",+ "integrity": "sha512-TmCW5HoZ2o2/z2EYi109jLqIaPIi9y/lc2LmDCWzuCi35bcaQ+OtUh6nwBiFK7SOu25FAU5+YKdqFZUwtqGSdg=="},"node_modules/@types/parse-json": {"version": "4.0.0",@@ -3350,9 +3349,9 @@"integrity": "sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw=="},"node_modules/@types/prettier": {- "version": "2.3.0",- "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.3.0.tgz",- "integrity": "sha512-hkc1DATxFLQo4VxPDpMH1gCkPpBbpOoJ/4nhuXw4n63/0R6bCpQECj4+K226UJ4JO/eJQz+1mC2I7JsWanAdQw=="+ "version": "2.3.1",+ "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.3.1.tgz",+ "integrity": "sha512-NVkb4p4YjI8E3O6+1m8I+8JlMpFZwfSbPGdaw0wXuyPRTEz0SLKwBUWNSO7Maoi8tQMPC8JLZNWkrcKPI7/sLA=="},"node_modules/@types/q": {"version": "1.5.4",@@ -3368,27 +3367,27 @@}},"node_modules/@types/stack-utils": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.0.tgz",- "integrity": "sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw=="+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz",+ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw=="},"node_modules/@types/unist": {- "version": "2.0.3",- "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz",- "integrity": "sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ=="+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.4.tgz",+ "integrity": "sha512-zfyYsDTK1HTGYXU3fTiM76+om93HcFtsZd2M0bO/CL4DiETV7mSa/pIVN/6+G3esOqEMdg2An5cHHbK5t+9w+A=="},"node_modules/@types/yargs": {- "version": "16.0.3",- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.3.tgz",- "integrity": "sha512-YlFfTGS+zqCgXuXNV26rOIeETOkXnGQXP/pjjL9P0gO/EP9jTmc7pUBhx+jVEIxpq41RX33GQ7N3DzOSfZoglQ==",+ "version": "16.0.4",+ "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz",+ "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==","dependencies": {"@types/yargs-parser": "*"}},"node_modules/@types/yargs-parser": {- "version": "20.2.0",- "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.0.tgz",- "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA=="+ "version": "20.2.1",+ "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz",+ "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw=="},"node_modules/@typescript/twoslash": {"version": "2.0.1",@@ -5001,9 +5000,9 @@}},"node_modules/colord": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/colord/-/colord-2.0.1.tgz",- "integrity": "sha512-vm5YpaWamD0Ov6TSG0GGmUIwstrWcfKQV/h2CmbR7PbNu41+qdB5PW9lpzhjedrpm08uuYvcXi0Oel1RLZIJuA=="+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/colord/-/colord-2.1.0.tgz",+ "integrity": "sha512-H5sDP9XDk2uP+x/xSGkgB9SEFc1bojdI5DMKU0jmSXQtml2GIe48dj1DcSS0e53QQAHn+JKqUXbGeGX24xWD7w=="},"node_modules/colorette": {"version": "1.2.2",@@ -5283,23 +5282,6 @@"node": ">=10"}},- "node_modules/cross-env": {- "version": "7.0.3",- "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz",- "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==",- "dependencies": {- "cross-spawn": "^7.0.1"- },- "bin": {- "cross-env": "src/bin/cross-env.js",- "cross-env-shell": "src/bin/cross-env-shell.js"- },- "engines": {- "node": ">=10.14",- "npm": ">=6",- "yarn": ">=1"- }- },"node_modules/cross-fetch": {"version": "3.1.4","resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.4.tgz",@@ -5645,9 +5627,9 @@}},"node_modules/debug": {- "version": "4.3.1",- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",- "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",+ "version": "4.3.2",+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",+ "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==","dependencies": {"ms": "2.1.2"},@@ -6037,6 +6019,16 @@"buffer-indexof": "^1.0.0"}},+ "node_modules/docusaurus-preset-shiki-twoslash": {+ "version": "1.1.5",+ "resolved": "https://registry.npmjs.org/docusaurus-preset-shiki-twoslash/-/docusaurus-preset-shiki-twoslash-1.1.5.tgz",+ "integrity": "sha512-HUf514cEJFOlUOoL9DBkA0D+kIKjQERG6DZ+1yGWw1c4vICkbkLCaN6d/AD1KTXPpQPXtM+zh2n9uuQ1RqxhnQ==",+ "dependencies": {+ "copy-text-to-clipboard": "^3.0.1",+ "remark-shiki-twoslash": "1.5.1",+ "typescript": ">3"+ }+ },"node_modules/dom-converter": {"version": "0.2.0","resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz",@@ -6139,9 +6131,9 @@"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="},"node_modules/electron-to-chromium": {- "version": "1.3.762",- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.762.tgz",- "integrity": "sha512-LehWjRpfPcK8F1Lf/NZoAwWLWnjJVo0SZeQ9j/tvnBWYcT99qDqgo4raAfS2oTKZjPrR/jxruh85DGgDUmywEA=="+ "version": "1.3.766",+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.766.tgz",+ "integrity": "sha512-u2quJ862q9reRKh/je3GXis3w38+RoXH1J9N3XjtsS6NzmUAosNsyZgUVFZPN/ZlJ3v6T0rTyZR3q/J5c6Sy5w=="},"node_modules/emittery": {"version": "0.8.1",@@ -12268,9 +12260,9 @@}},"node_modules/prismjs": {- "version": "1.24.0",- "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.24.0.tgz",- "integrity": "sha512-SqV5GRsNqnzCL8k5dfAjCNhUrF3pR0A9lTDSCUZeh/LIshheXJEaP0hwLz2t4XHivd2J/v2HR+gRnigzeKe3cQ=="+ "version": "1.24.1",+ "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.24.1.tgz",+ "integrity": "sha512-mNPsedLuk90RVJioIky8ANZEwYm5w9LcvCXrxHlwf4fNVSn8jEipMybMkWUyyF0JhnC+C4VcOVSBuHRKs1L5Ow=="},"node_modules/process-nextick-args": {"version": "2.0.1",@@ -13237,15 +13229,15 @@}},"node_modules/remark-shiki-twoslash": {- "version": "1.5.0",- "resolved": "https://registry.npmjs.org/remark-shiki-twoslash/-/remark-shiki-twoslash-1.5.0.tgz",- "integrity": "sha512-ggDnszgZ4P+IgfMhqiPSeT+N6pdbhgnByIQSp4SBnTvqeLSuSoJgFVjNz1pZfVUIax12MeU9t475oJt7kBSOQw==",+ "version": "1.5.1",+ "resolved": "https://registry.npmjs.org/remark-shiki-twoslash/-/remark-shiki-twoslash-1.5.1.tgz",+ "integrity": "sha512-J4OiPxGiti2+wB30yfOqJJ4dEkR+j02CspH8/ifFb3fVKx190NUhBdaAgGQbepDAuEP8jZCU50mZrIOaY8JHyw==","dependencies": {"@typescript/twoslash": "2.0.1","@typescript/vfs": "1.3.4","regenerator-runtime": "^0.13.7","shiki": "0.9.3",- "shiki-twoslash": "1.5.0",+ "shiki-twoslash": "1.6.0","tslib": "2.1.0","typescript": ">3","unist-util-visit": "^2.0.0"@@ -14058,9 +14050,9 @@}},"node_modules/shiki-twoslash": {- "version": "1.5.0",- "resolved": "https://registry.npmjs.org/shiki-twoslash/-/shiki-twoslash-1.5.0.tgz",- "integrity": "sha512-TCXLEreIeo6x3oUdkva41lv57wv/GjpgbofrFkh26iEcYQZvUva9decmH4PD7U13zRIuEYnQCOY/8mLZZlb8OA==",+ "version": "1.6.0",+ "resolved": "https://registry.npmjs.org/shiki-twoslash/-/shiki-twoslash-1.6.0.tgz",+ "integrity": "sha512-kM/5YbMg3gWK8T/uUtveS4MA91Ag0/T0NjxwkDpLpEPBzV5VDkVwX5qNYx5amYNkwvrtGRFmyca2uCmcHygSrQ==","dependencies": {"@typescript/twoslash": "2.0.1","@typescript/vfs": "1.3.4",@@ -15432,9 +15424,9 @@}},"node_modules/typescript": {- "version": "4.3.4",- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.4.tgz",- "integrity": "sha512-uauPG7XZn9F/mo+7MrsRjyvbxFpzemRjKEZXS4AK83oP2KKOJPvb+9cO/gmnv8arWZvhnjVOXz7B49m1l0e9Ew==",+ "version": "4.3.5",+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz",+ "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==","bin": {"tsc": "bin/tsc","tsserver": "bin/tsserver"@@ -16139,16 +16131,16 @@}},"node_modules/webpack": {- "version": "5.41.1",- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.41.1.tgz",- "integrity": "sha512-AJZIIsqJ/MVTmegEq9Tlw5mk5EHdGiJbDdz9qP15vmUH+oxI1FdWcL0E9EO8K/zKaRPWqEs7G/OPxq1P61u5Ug==",+ "version": "5.42.0",+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.42.0.tgz",+ "integrity": "sha512-Ln8HL0F831t1x/yPB/qZEUVmZM4w9BnHZ1EQD/sAUHv8m22hthoPniWTXEzFMh/Sf84mhrahut22TX5KxWGuyQ==","dependencies": {"@types/eslint-scope": "^3.7.0","@types/estree": "^0.0.48","@webassemblyjs/ast": "1.11.0","@webassemblyjs/wasm-edit": "1.11.0","@webassemblyjs/wasm-parser": "1.11.0",- "acorn": "^8.2.1",+ "acorn": "^8.4.1","browserslist": "^4.14.5","chrome-trace-event": "^1.0.2","enhanced-resolve": "^5.8.0",@@ -17225,9 +17217,9 @@}},"node_modules/ws": {- "version": "7.5.1",- "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.1.tgz",- "integrity": "sha512-2c6faOUH/nhoQN6abwMloF7Iyl0ZS2E9HGtsiLrWn0zOOMWlhtDmdf/uihDt6jnuCxgtwGBNy6Onsoy2s2O2Ow==",+ "version": "7.5.2",+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.2.tgz",+ "integrity": "sha512-lkF7AWRicoB9mAgjeKbGqVUekLnSNO4VjKVnuPHpQeOxZOErX6BPXwJk70nFslRCEEA8EVW7ZjKwXaP9N+1sKQ==","engines": {"node": ">=8.3.0"},@@ -19769,9 +19761,9 @@"integrity": "sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA=="},"@types/node": {- "version": "15.12.5",- "resolved": "https://registry.npmjs.org/@types/node/-/node-15.12.5.tgz",- "integrity": "sha512-se3yX7UHv5Bscf8f1ERKvQOD6sTyycH3hdaoozvaLxgUiY5lIGEeH37AD0G0Qi9kPqihPn0HOfd2yaIEN9VwEg=="+ "version": "16.0.0",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.0.0.tgz",+ "integrity": "sha512-TmCW5HoZ2o2/z2EYi109jLqIaPIi9y/lc2LmDCWzuCi35bcaQ+OtUh6nwBiFK7SOu25FAU5+YKdqFZUwtqGSdg=="},"@types/parse-json": {"version": "4.0.0",@@ -19784,9 +19776,9 @@"integrity": "sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw=="},"@types/prettier": {- "version": "2.3.0",- "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.3.0.tgz",- "integrity": "sha512-hkc1DATxFLQo4VxPDpMH1gCkPpBbpOoJ/4nhuXw4n63/0R6bCpQECj4+K226UJ4JO/eJQz+1mC2I7JsWanAdQw=="+ "version": "2.3.1",+ "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.3.1.tgz",+ "integrity": "sha512-NVkb4p4YjI8E3O6+1m8I+8JlMpFZwfSbPGdaw0wXuyPRTEz0SLKwBUWNSO7Maoi8tQMPC8JLZNWkrcKPI7/sLA=="},"@types/q": {"version": "1.5.4",@@ -19802,27 +19794,27 @@}},"@types/stack-utils": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.0.tgz",- "integrity": "sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw=="+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz",+ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw=="},"@types/unist": {- "version": "2.0.3",- "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz",- "integrity": "sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ=="+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.4.tgz",+ "integrity": "sha512-zfyYsDTK1HTGYXU3fTiM76+om93HcFtsZd2M0bO/CL4DiETV7mSa/pIVN/6+G3esOqEMdg2An5cHHbK5t+9w+A=="},"@types/yargs": {- "version": "16.0.3",- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.3.tgz",- "integrity": "sha512-YlFfTGS+zqCgXuXNV26rOIeETOkXnGQXP/pjjL9P0gO/EP9jTmc7pUBhx+jVEIxpq41RX33GQ7N3DzOSfZoglQ==",+ "version": "16.0.4",+ "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz",+ "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==","requires": {"@types/yargs-parser": "*"}},"@types/yargs-parser": {- "version": "20.2.0",- "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.0.tgz",- "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA=="+ "version": "20.2.1",+ "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz",+ "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw=="},"@typescript/twoslash": {"version": "2.0.1",@@ -21094,9 +21086,9 @@}},"colord": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/colord/-/colord-2.0.1.tgz",- "integrity": "sha512-vm5YpaWamD0Ov6TSG0GGmUIwstrWcfKQV/h2CmbR7PbNu41+qdB5PW9lpzhjedrpm08uuYvcXi0Oel1RLZIJuA=="+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/colord/-/colord-2.1.0.tgz",+ "integrity": "sha512-H5sDP9XDk2uP+x/xSGkgB9SEFc1bojdI5DMKU0jmSXQtml2GIe48dj1DcSS0e53QQAHn+JKqUXbGeGX24xWD7w=="},"colorette": {"version": "1.2.2",@@ -21304,14 +21296,6 @@"yaml": "^1.10.0"}},- "cross-env": {- "version": "7.0.3",- "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz",- "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==",- "requires": {- "cross-spawn": "^7.0.1"- }- },"cross-fetch": {"version": "3.1.4","resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.4.tgz",@@ -21561,9 +21545,9 @@}},"debug": {- "version": "4.3.1",- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",- "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",+ "version": "4.3.2",+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",+ "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==","requires": {"ms": "2.1.2"}@@ -21858,6 +21842,16 @@"buffer-indexof": "^1.0.0"}},+ "docusaurus-preset-shiki-twoslash": {+ "version": "1.1.5",+ "resolved": "https://registry.npmjs.org/docusaurus-preset-shiki-twoslash/-/docusaurus-preset-shiki-twoslash-1.1.5.tgz",+ "integrity": "sha512-HUf514cEJFOlUOoL9DBkA0D+kIKjQERG6DZ+1yGWw1c4vICkbkLCaN6d/AD1KTXPpQPXtM+zh2n9uuQ1RqxhnQ==",+ "requires": {+ "copy-text-to-clipboard": "^3.0.1",+ "remark-shiki-twoslash": "1.5.1",+ "typescript": ">3"+ }+ },"dom-converter": {"version": "0.2.0","resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz",@@ -21952,9 +21946,9 @@"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="},"electron-to-chromium": {- "version": "1.3.762",- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.762.tgz",- "integrity": "sha512-LehWjRpfPcK8F1Lf/NZoAwWLWnjJVo0SZeQ9j/tvnBWYcT99qDqgo4raAfS2oTKZjPrR/jxruh85DGgDUmywEA=="+ "version": "1.3.766",+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.766.tgz",+ "integrity": "sha512-u2quJ862q9reRKh/je3GXis3w38+RoXH1J9N3XjtsS6NzmUAosNsyZgUVFZPN/ZlJ3v6T0rTyZR3q/J5c6Sy5w=="},"emittery": {"version": "0.8.1",@@ -26495,9 +26489,9 @@"integrity": "sha512-w23ch4f75V1Tnz8DajsYKvY5lF7H1+WvzvLUcF0paFxkTHSp42RS0H5CttdN2Q8RR3DRGZ9v5xD/h3n8C8kGmg=="},"prismjs": {- "version": "1.24.0",- "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.24.0.tgz",- "integrity": "sha512-SqV5GRsNqnzCL8k5dfAjCNhUrF3pR0A9lTDSCUZeh/LIshheXJEaP0hwLz2t4XHivd2J/v2HR+gRnigzeKe3cQ=="+ "version": "1.24.1",+ "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.24.1.tgz",+ "integrity": "sha512-mNPsedLuk90RVJioIky8ANZEwYm5w9LcvCXrxHlwf4fNVSn8jEipMybMkWUyyF0JhnC+C4VcOVSBuHRKs1L5Ow=="},"process-nextick-args": {"version": "2.0.1",@@ -27264,15 +27258,15 @@}},"remark-shiki-twoslash": {- "version": "1.5.0",- "resolved": "https://registry.npmjs.org/remark-shiki-twoslash/-/remark-shiki-twoslash-1.5.0.tgz",- "integrity": "sha512-ggDnszgZ4P+IgfMhqiPSeT+N6pdbhgnByIQSp4SBnTvqeLSuSoJgFVjNz1pZfVUIax12MeU9t475oJt7kBSOQw==",+ "version": "1.5.1",+ "resolved": "https://registry.npmjs.org/remark-shiki-twoslash/-/remark-shiki-twoslash-1.5.1.tgz",+ "integrity": "sha512-J4OiPxGiti2+wB30yfOqJJ4dEkR+j02CspH8/ifFb3fVKx190NUhBdaAgGQbepDAuEP8jZCU50mZrIOaY8JHyw==","requires": {"@typescript/twoslash": "2.0.1","@typescript/vfs": "1.3.4","regenerator-runtime": "^0.13.7","shiki": "0.9.3",- "shiki-twoslash": "1.5.0",+ "shiki-twoslash": "1.6.0","tslib": "2.1.0","typescript": ">3","unist-util-visit": "^2.0.0"@@ -27897,9 +27891,9 @@}},"shiki-twoslash": {- "version": "1.5.0",- "resolved": "https://registry.npmjs.org/shiki-twoslash/-/shiki-twoslash-1.5.0.tgz",- "integrity": "sha512-TCXLEreIeo6x3oUdkva41lv57wv/GjpgbofrFkh26iEcYQZvUva9decmH4PD7U13zRIuEYnQCOY/8mLZZlb8OA==",+ "version": "1.6.0",+ "resolved": "https://registry.npmjs.org/shiki-twoslash/-/shiki-twoslash-1.6.0.tgz",+ "integrity": "sha512-kM/5YbMg3gWK8T/uUtveS4MA91Ag0/T0NjxwkDpLpEPBzV5VDkVwX5qNYx5amYNkwvrtGRFmyca2uCmcHygSrQ==","requires": {"@typescript/twoslash": "2.0.1","@typescript/vfs": "1.3.4",@@ -28977,9 +28971,9 @@}},"typescript": {- "version": "4.3.4",- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.4.tgz",- "integrity": "sha512-uauPG7XZn9F/mo+7MrsRjyvbxFpzemRjKEZXS4AK83oP2KKOJPvb+9cO/gmnv8arWZvhnjVOXz7B49m1l0e9Ew=="+ "version": "4.3.5",+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz",+ "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA=="},"ua-parser-js": {"version": "0.7.28",@@ -29478,16 +29472,16 @@"integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w=="},"webpack": {- "version": "5.41.1",- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.41.1.tgz",- "integrity": "sha512-AJZIIsqJ/MVTmegEq9Tlw5mk5EHdGiJbDdz9qP15vmUH+oxI1FdWcL0E9EO8K/zKaRPWqEs7G/OPxq1P61u5Ug==",+ "version": "5.42.0",+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.42.0.tgz",+ "integrity": "sha512-Ln8HL0F831t1x/yPB/qZEUVmZM4w9BnHZ1EQD/sAUHv8m22hthoPniWTXEzFMh/Sf84mhrahut22TX5KxWGuyQ==","requires": {"@types/eslint-scope": "^3.7.0","@types/estree": "^0.0.48","@webassemblyjs/ast": "1.11.0","@webassemblyjs/wasm-edit": "1.11.0","@webassemblyjs/wasm-parser": "1.11.0",- "acorn": "^8.2.1",+ "acorn": "^8.4.1","browserslist": "^4.14.5","chrome-trace-event": "^1.0.2","enhanced-resolve": "^5.8.0",@@ -30322,9 +30316,9 @@}},"ws": {- "version": "7.5.1",- "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.1.tgz",- "integrity": "sha512-2c6faOUH/nhoQN6abwMloF7Iyl0ZS2E9HGtsiLrWn0zOOMWlhtDmdf/uihDt6jnuCxgtwGBNy6Onsoy2s2O2Ow=="+ "version": "7.5.2",+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.2.tgz",+ "integrity": "sha512-lkF7AWRicoB9mAgjeKbGqVUekLnSNO4VjKVnuPHpQeOxZOErX6BPXwJk70nFslRCEEA8EVW7ZjKwXaP9N+1sKQ=="},"xdg-basedir": {"version": "4.0.0",diff --git a/packages/docs/package.json b/packages/docs/package.jsonindex 07b0bb4afb..44d758a5f9 100644--- a/packages/docs/package.json+++ b/packages/docs/package.json@@ -28,12 +28,11 @@"clipboard": "^2.0.8","clsx": "^1.1.1","color-namer": "1.4.0",- "cross-env": "^7.0.3",+ "docusaurus-preset-shiki-twoslash": "^1.1.5","hls.js": "^0.14.17","jest": "^27.0.4","polished": "4.1.2","react-player": "^2.9.0",- "remark-shiki-twoslash": "^1.5.0","remotion": "^2.1.12","ts-jest": "^27.0.3"},diff --git a/packages/docs/src/css/custom.css b/packages/docs/src/css/custom.cssindex 12f8c3dee0..2cab3af1f6 100644--- a/packages/docs/src/css/custom.css+++ b/packages/docs/src/css/custom.css@@ -49,3 +49,12 @@margin: 0 calc(-1 * var(--ifm-pre-padding));padding: 0 var(--ifm-pre-padding);}++/* Hide code blocks according to theme */+[data-theme="light"] .shiki.min-dark {+ display: none;+}++[data-theme="dark"] .shiki.min-light {+ display: none;+}diff --git a/packages/docs/src/css/twoslash.css b/packages/docs/src/css/twoslash.cssdeleted file mode 100644index 065b3c28ab..0000000000--- a/packages/docs/src/css/twoslash.css+++ /dev/null@@ -1,243 +0,0 @@-/* Copy to clipboard button */-.copy-button {- font-family: inherit;- background: rgba(0, 0, 0, 0.3);- border: none;- border-radius: var(--ifm-global-radius);- color: var(--ifm-color-white);- cursor: pointer;- opacity: 0;- padding: 0.4rem 0.5rem;- position: absolute;- right: calc(var(--ifm-pre-padding) / 2);- top: calc(var(--ifm-pre-padding) / 2);- transition: opacity 0.2s ease-in-out;- user-select: none;-}--pre.shiki:hover .copy-button {- opacity: 1;-}--/* Hide code blocks according to theme */-[data-theme="light"] .shiki.min-dark {- display: none;-}--[data-theme="dark"] .shiki.min-light {- display: none;-}--/* Theme specific stuffs */-pre.shiki.min-light {- background: rgb(246, 248, 250) !important;-}--/* None theme specific styles */-pre {- padding: 0;- margin: 0;- margin-bottom: 3rem;- overflow-x: auto;- position: relative;-}-pre.shiki {- overflow: visible;-}-pre.shiki div.line {- min-height: 1rem;-}--/** Line highlighting **/-pre.shiki div.dim,-pre.shiki div.highlight {- margin: 0;- padding: 0;-}-pre.shiki:hover .dim {- opacity: 1;- filter: none;-}-pre.shiki div.dim {- opacity: 0.5;- filter: grayscale(1);-}-pre.shiki div.highlight::before {- content: "";- opacity: 0;- position: absolute;- z-index: 0;- height: 24.55px;- width: calc(100% - 3px);- left: 0;- background-color: var(--blue-underlay);- border-left: 3px solid var(--ifm-color-primary);- pointer-events: none;-}-pre.shiki:hover div.highlight::before {- opacity: 1;-}--/** Hide language identifiers */-pre.shiki .language-id {- display: none;-}--/** When you mouse over the pre, show the underlines */-pre.twoslash:hover data-lsp {- border-color: #747474;- border-color: rgba(116, 116, 116, 0.9);-}--/** The tooltip-like which provides the LSP response */-pre.twoslash data-lsp:hover::before {- content: attr(lsp);- position: absolute;- transform: translate(0, 1.2rem);-- background-color: #3f3f3f;- color: #fff;- text-align: left;- padding: 5px 8px;- border-radius: 2px;- font-family: inherit;- font-size: 14px;- white-space: pre-wrap;- z-index: 100;-}--pre .code-container {- padding: 1rem;- overflow: auto;-}--pre code {- font-family: inherit;- white-space: pre;- -webkit-overflow-scrolling: touch;-}-pre code a {- text-decoration: none;-}-pre data-err {- /* Extracted from VS Code */- background: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%206%203'%20enable-background%3D'new%200%200%206%203'%20height%3D'3'%20width%3D'6'%3E%3Cg%20fill%3D'%23c94824'%3E%3Cpolygon%20points%3D'5.5%2C0%202.5%2C3%201.1%2C3%204.1%2C0'%2F%3E%3Cpolygon%20points%3D'4%2C0%206%2C2%206%2C0.6%205.4%2C0'%2F%3E%3Cpolygon%20points%3D'0%2C2%201%2C3%202.4%2C3%200%2C0.6'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")- repeat-x bottom left;- padding-bottom: 3px;-}-pre .query {- margin-bottom: 10px;- color: #137998;- display: inline-block;-}--/* In order to have the 'popped out' style design and to not break the layout- we need to place a fake and un-selectable copy of the error which _isn't_ broken out- behind the actual error message.- This sections keeps both of those two in in sync */--pre .error,-pre .error-behind {- margin: 0.5rem 0;- padding: 0.5rem;- padding-left: 1.5rem;- width: 100%;- left: 0;- white-space: pre-wrap;- display: block;-}-pre .error {- position: absolute;- background-color: #fee;- border-left: 3px solid #bf1818;- /* Give the space to the error code */- display: flex;- align-items: center;- color: black;-}-pre .error .code {- display: none;-}-pre .error-behind {- user-select: none;- color: #fee;-}-/* Queries */-pre .arrow {- /* Transparent background */- background-color: #eee;- position: relative;- top: -7px;- margin-left: 0.1rem;- /* Edges */- border-left: 1px solid #eee;- border-top: 1px solid #eee;- transform: translateY(25%) rotate(45deg);- /* Size */- height: 8px;- width: 8px;-}-pre .popover {- margin-bottom: 10px;- background-color: #eee;- display: inline-block;- padding: 0 0.5rem 0.3rem;- margin-top: 10px;- border-radius: 3px;-}-/* Completion */-pre .inline-completions ul.dropdown {- display: inline-block;- position: absolute;- width: 240px;- background-color: gainsboro;- color: grey;- padding-top: 4px;- font-family: inherit;- font-size: 0.8rem;- margin: 0;- padding: 0;- border-left: 4px solid #4b9edd;-}-pre .inline-completions ul.dropdown::before {- background-color: #4b9edd;- width: 2px;- position: absolute;- top: -1.2rem;- left: -3px;- content: " ";-}-pre .inline-completions ul.dropdown li {- overflow-x: hidden;- padding-left: 4px;- margin-bottom: 4px;-}-pre .inline-completions ul.dropdown li.deprecated {- text-decoration: line-through;-}-pre .inline-completions ul.dropdown li span.result-found {- color: #4b9edd;-}-pre .inline-completions ul.dropdown li span.result {- width: 100px;- color: black;- display: inline-block;-}-.dark-theme .markdown pre {- background-color: #d8d8d8;- border-color: #ddd;- filter: invert(98%) hue-rotate(180deg);-}-data-lsp {- /* Ensures there's no 1px jump when the hover happens */- border-bottom: 1px dotted transparent;- /* Fades in unobtrusively */- transition-timing-function: ease;- transition: border-color 0.3s;-}-/* Respect people's wishes to not have animations */-@media (prefers-reduced-motion: reduce) {- data-lsp {- transition: none;- }-}diff --git a/packages/docs/src/plugins/copy-to-clipboard/client.js b/packages/docs/src/plugins/copy-to-clipboard/client.jsdeleted file mode 100644index fa05773399..0000000000--- a/packages/docs/src/plugins/copy-to-clipboard/client.js+++ /dev/null@@ -1,37 +0,0 @@-import ClipboardJS from "clipboard";--module.exports = (function () {- return {- onRouteUpdate() {- window.setTimeout(() => {- const button = () => {- const btn = document.createElement("button");- btn.classList.add("copy-button");- btn.setAttribute("type", "button");- btn.setAttribute("aria-label", "Copy code to clipboard");- btn.innerText = "Copy";- return btn;- };-- document.querySelectorAll("pre.shiki").forEach((pre) => {- pre.appendChild(button());- });-- const clipboard = new ClipboardJS(".copy-button", {- target(trigger) {- return trigger.parentNode.querySelector("code");- },- });-- clipboard.on("success", (event) => {- event.clearSelection();- const el = event.trigger;- el.textContent = "Copied";- setTimeout(() => {- el.textContent = "Copy";- }, 2000);- });- }, 0);- },- };-})();diff --git a/packages/docs/src/plugins/copy-to-clipboard/index.js b/packages/docs/src/plugins/copy-to-clipboard/index.jsdeleted file mode 100644index ce3c1411d4..0000000000--- a/packages/docs/src/plugins/copy-to-clipboard/index.js+++ /dev/null@@ -1,10 +0,0 @@-const path = require("path");--module.exports = function () {- return {- name: "copy-to-clipbard-plugin",- getClientModules() {- return [path.resolve(__dirname, "./client")];- },- };-};diff --git a/packages/docs/src/theme/MDXComponents.tsx b/packages/docs/src/theme/MDXComponents.tsxdeleted file mode 100644index 18eed60e24..0000000000--- a/packages/docs/src/theme/MDXComponents.tsx+++ /dev/null@@ -1,9 +0,0 @@-import InitialComponents from "@theme-init/MDXComponents";--const newExport = {};-// Remove `pre` and `code` from the MDX parser because Shiki Twoslash will handle them-Object.entries(InitialComponents).forEach(([key]) => {- if (key !== "pre" && key !== "code") newExport[key] = InitialComponents[key];-});--export default newExport;diff --git a/packages/docs/src/types/@theme-init.d.ts b/packages/docs/src/types/@theme-init.d.tsdeleted file mode 100644index ae9da50b0d..0000000000--- a/packages/docs/src/types/@theme-init.d.ts+++ /dev/null@@ -1,4 +0,0 @@-declare module "@theme-init/MDXComponents" {- const Components: Array<unknown>;- export default Components;-}