From 1eed9fdbd31da85c7a77ff88fec35091fcaa5cca Mon Sep 17 00:00:00 2001 From: Tharki-God Date: Wed, 28 Feb 2024 18:36:55 +0530 Subject: [PATCH] some fixes --- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- README.md | 4 +- manifest.json | 14 +-- package.json | 2 +- pnpm-lock.yaml | 212 ++++++++++++++++------------------ src/Components/Icons.tsx | 76 ++++++------ src/lib/utils.tsx | 170 ++++++++++++++++----------- src/patches/ContextMenu.ts | 12 +- src/patches/Popover.tsx | 10 +- src/types.ts | 125 +++++++++++--------- 11 files changed, 326 insertions(+), 303 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0dce4be..eaec267 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,7 +20,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 - uses: pnpm/action-setup@v2 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b669bc2..4542987 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 - uses: pnpm/action-setup@v2 with: diff --git a/README.md b/README.md index 6388583..e9c4c8d 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,12 @@ Make your experience better with spotify links. Like Playing directly or adding in queue. (Also opening directly in app) -Direct Download Link: [dev.tharki.Distify.asar](https://github.com/TharkiDev/Distify/releases/latest/download/dev.tharki.Distify.asar) +Direct Download Link: [dev.tharki.Distify.asar](https://github.com/Yofukashi-No/Distify/releases/latest/download/dev.tharki.Distify.asar) Install Link: -[![Install in Replugged](https://img.shields.io/badge/-Install%20in%20Replugged-blue?style=for-the-badge&logo=none)](https://replugged.dev/install?identifier=TharkiDev/Distify&source=github) +[![Install in Replugged](https://img.shields.io/badge/-Install%20in%20Replugged-blue?style=for-the-badge&logo=none)](https://replugged.dev/install?identifier=Yofukashi-No/Distify&source=github) ![image](https://i.imgur.com/i7r0j9L.png) diff --git a/manifest.json b/manifest.json index edc18ea..84cc5f9 100644 --- a/manifest.json +++ b/manifest.json @@ -2,13 +2,11 @@ "id": "dev.tharki.Distify", "name": "Distify", "description": "Make your experience better with spotify links.", - "author": [ - { - "name": "Ahlawat", - "discordID": "1121961711080050780", - "github": "TharkiDev" - } - ], + "author": { + "name": "Ahlawat", + "discordID": "1121961711080050780", + "github": "YofukashiNo" + }, "version": "1.0.2", "updater": { "type": "store", @@ -17,6 +15,6 @@ "license": "MIT", "type": "replugged-plugin", "renderer": "src/index.ts", - "source": "https://github.com/TharkiDev/Distify", + "source": "https://github.com/YofukashiNo/Distify", "image": "https://i.imgur.com/i7r0j9L.png" } diff --git a/package.json b/package.json index 07a54d9..fe6a0c1 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-react": "^7.32.2", "prettier": "^2.8.8", - "replugged": "^4.7.4", + "replugged": "^4.7.8", "type-fest": "^3.10.0", "typescript": "^5.0.4" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5a09881..777df2e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,8 +36,8 @@ devDependencies: specifier: ^2.8.8 version: 2.8.8 replugged: - specifier: ^4.7.4 - version: 4.7.4(@codemirror/view@6.14.1)(@lezer/common@1.0.3) + specifier: ^4.7.8 + version: 4.7.9(@codemirror/view@6.14.1)(@lezer/common@1.1.0) type-fest: specifier: ^3.10.0 version: 3.10.0(typescript@5.0.4) @@ -47,7 +47,7 @@ devDependencies: packages: - /@codemirror/autocomplete@6.6.1(@codemirror/language@6.9.1)(@codemirror/state@6.3.1)(@codemirror/view@6.14.1)(@lezer/common@1.0.3): + /@codemirror/autocomplete@6.6.1(@codemirror/language@6.9.1)(@codemirror/state@6.3.1)(@codemirror/view@6.14.1)(@lezer/common@1.1.0): resolution: {integrity: sha512-RpsvnYOopnyNbZg487qoRD5bKg63KMMUVP5d8MQ4Luc7Mb6JBWTORovLi6cTvWaKlbmLW8Zd2dAJkIdrhBsXug==} peerDependencies: '@codemirror/language': ^6.0.0 @@ -58,7 +58,7 @@ packages: '@codemirror/language': 6.9.1 '@codemirror/state': 6.3.1 '@codemirror/view': 6.14.1 - '@lezer/common': 1.0.3 + '@lezer/common': 1.1.0 dev: true /@codemirror/commands@6.2.4: @@ -67,16 +67,16 @@ packages: '@codemirror/language': 6.9.1 '@codemirror/state': 6.3.1 '@codemirror/view': 6.14.1 - '@lezer/common': 1.0.3 + '@lezer/common': 1.1.0 dev: true /@codemirror/lang-css@6.2.1(@codemirror/view@6.14.1): resolution: {integrity: sha512-/UNWDNV5Viwi/1lpr/dIXJNWiwDxpw13I4pTUAsNxZdg6E0mI2kTQb0P2iHczg1Tu+H4EBgJR+hYhKiHKko7qg==} dependencies: - '@codemirror/autocomplete': 6.6.1(@codemirror/language@6.9.1)(@codemirror/state@6.3.1)(@codemirror/view@6.14.1)(@lezer/common@1.0.3) + '@codemirror/autocomplete': 6.6.1(@codemirror/language@6.9.1)(@codemirror/state@6.3.1)(@codemirror/view@6.14.1)(@lezer/common@1.1.0) '@codemirror/language': 6.9.1 '@codemirror/state': 6.3.1 - '@lezer/common': 1.0.3 + '@lezer/common': 1.1.0 '@lezer/css': 1.1.1 transitivePeerDependencies: - '@codemirror/view' @@ -140,8 +140,17 @@ packages: minimatch: 3.1.2 dev: true - /@esbuild/android-arm64@0.18.20: - resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + /@esbuild/aix-ppc64@0.19.12: + resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64@0.19.12: + resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -158,8 +167,8 @@ packages: dev: true optional: true - /@esbuild/android-arm@0.18.20: - resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + /@esbuild/android-arm@0.19.12: + resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -176,8 +185,8 @@ packages: dev: true optional: true - /@esbuild/android-x64@0.18.20: - resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + /@esbuild/android-x64@0.19.12: + resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -194,8 +203,8 @@ packages: dev: true optional: true - /@esbuild/darwin-arm64@0.18.20: - resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + /@esbuild/darwin-arm64@0.19.12: + resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -212,8 +221,8 @@ packages: dev: true optional: true - /@esbuild/darwin-x64@0.18.20: - resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + /@esbuild/darwin-x64@0.19.12: + resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -230,8 +239,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-arm64@0.18.20: - resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + /@esbuild/freebsd-arm64@0.19.12: + resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -248,8 +257,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-x64@0.18.20: - resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + /@esbuild/freebsd-x64@0.19.12: + resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -266,8 +275,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm64@0.18.20: - resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + /@esbuild/linux-arm64@0.19.12: + resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -284,8 +293,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm@0.18.20: - resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + /@esbuild/linux-arm@0.19.12: + resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -302,8 +311,8 @@ packages: dev: true optional: true - /@esbuild/linux-ia32@0.18.20: - resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + /@esbuild/linux-ia32@0.19.12: + resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -320,8 +329,8 @@ packages: dev: true optional: true - /@esbuild/linux-loong64@0.18.20: - resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + /@esbuild/linux-loong64@0.19.12: + resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -338,8 +347,8 @@ packages: dev: true optional: true - /@esbuild/linux-mips64el@0.18.20: - resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + /@esbuild/linux-mips64el@0.19.12: + resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -356,8 +365,8 @@ packages: dev: true optional: true - /@esbuild/linux-ppc64@0.18.20: - resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + /@esbuild/linux-ppc64@0.19.12: + resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -374,8 +383,8 @@ packages: dev: true optional: true - /@esbuild/linux-riscv64@0.18.20: - resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + /@esbuild/linux-riscv64@0.19.12: + resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -392,8 +401,8 @@ packages: dev: true optional: true - /@esbuild/linux-s390x@0.18.20: - resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + /@esbuild/linux-s390x@0.19.12: + resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -410,8 +419,8 @@ packages: dev: true optional: true - /@esbuild/linux-x64@0.18.20: - resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + /@esbuild/linux-x64@0.19.12: + resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -428,8 +437,8 @@ packages: dev: true optional: true - /@esbuild/netbsd-x64@0.18.20: - resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + /@esbuild/netbsd-x64@0.19.12: + resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -446,8 +455,8 @@ packages: dev: true optional: true - /@esbuild/openbsd-x64@0.18.20: - resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + /@esbuild/openbsd-x64@0.19.12: + resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -464,8 +473,8 @@ packages: dev: true optional: true - /@esbuild/sunos-x64@0.18.20: - resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + /@esbuild/sunos-x64@0.19.12: + resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -482,8 +491,8 @@ packages: dev: true optional: true - /@esbuild/win32-arm64@0.18.20: - resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + /@esbuild/win32-arm64@0.19.12: + resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -500,8 +509,8 @@ packages: dev: true optional: true - /@esbuild/win32-ia32@0.18.20: - resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + /@esbuild/win32-ia32@0.19.12: + resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -518,8 +527,8 @@ packages: dev: true optional: true - /@esbuild/win32-x64@0.18.20: - resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + /@esbuild/win32-x64@0.19.12: + resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -593,10 +602,6 @@ packages: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} dev: true - /@lezer/common@1.0.3: - resolution: {integrity: sha512-JH4wAXCgUOcCGNekQPLhVeUtIqjH0yPBs7vvUdSjyQama9618IOKFJwkv2kcqdhF0my8hQEgCTEJU0GIgnahvA==} - dev: true - /@lezer/common@1.1.0: resolution: {integrity: sha512-XPIN3cYDXsoJI/oDWoR2tD++juVrhgIago9xyKhZ7IhGlzdDM9QgC8D8saKNCz5pindGcznFr2HBSsEQSWnSjw==} dev: true @@ -611,7 +616,7 @@ packages: /@lezer/highlight@1.1.6: resolution: {integrity: sha512-cmSJYa2us+r3SePpRCjN5ymCqCPv+zyXmDl0ciWtVaNiORT/MxM7ZgOMQZADD0o51qOaOg24qc/zBViOIwAjJg==} dependencies: - '@lezer/common': 1.0.3 + '@lezer/common': 1.1.0 dev: true /@lezer/lr@1.3.9: @@ -1106,10 +1111,6 @@ packages: fill-range: 7.0.1 dev: true - /buffer-from@1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - dev: true - /cacheable-lookup@7.0.0: resolution: {integrity: sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==} engines: {node: '>=14.16'} @@ -1170,7 +1171,7 @@ packages: normalize-path: 3.0.0 readdirp: 3.6.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /ci-info@3.8.0: @@ -1192,10 +1193,10 @@ packages: wrap-ansi: 7.0.0 dev: true - /codemirror@6.0.1(@lezer/common@1.0.3): + /codemirror@6.0.1(@lezer/common@1.1.0): resolution: {integrity: sha512-J8j+nZ+CdWmIeFIGXEFbFPtpiYacFMDR8GlHK3IyHQJMCaVRfGx9NT+Hxivv1ckLWPvNdZqndbr/7lVhrf/Svg==} dependencies: - '@codemirror/autocomplete': 6.6.1(@codemirror/language@6.9.1)(@codemirror/state@6.3.1)(@codemirror/view@6.14.1)(@lezer/common@1.0.3) + '@codemirror/autocomplete': 6.6.1(@codemirror/language@6.9.1)(@codemirror/state@6.3.1)(@codemirror/view@6.14.1)(@lezer/common@1.1.0) '@codemirror/commands': 6.2.4 '@codemirror/language': 6.9.1 '@codemirror/lint': 6.2.1 @@ -1439,34 +1440,35 @@ packages: sass: 1.63.6 dev: true - /esbuild@0.18.20: - resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + /esbuild@0.19.12: + resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.18.20 - '@esbuild/android-arm64': 0.18.20 - '@esbuild/android-x64': 0.18.20 - '@esbuild/darwin-arm64': 0.18.20 - '@esbuild/darwin-x64': 0.18.20 - '@esbuild/freebsd-arm64': 0.18.20 - '@esbuild/freebsd-x64': 0.18.20 - '@esbuild/linux-arm': 0.18.20 - '@esbuild/linux-arm64': 0.18.20 - '@esbuild/linux-ia32': 0.18.20 - '@esbuild/linux-loong64': 0.18.20 - '@esbuild/linux-mips64el': 0.18.20 - '@esbuild/linux-ppc64': 0.18.20 - '@esbuild/linux-riscv64': 0.18.20 - '@esbuild/linux-s390x': 0.18.20 - '@esbuild/linux-x64': 0.18.20 - '@esbuild/netbsd-x64': 0.18.20 - '@esbuild/openbsd-x64': 0.18.20 - '@esbuild/sunos-x64': 0.18.20 - '@esbuild/win32-arm64': 0.18.20 - '@esbuild/win32-ia32': 0.18.20 - '@esbuild/win32-x64': 0.18.20 + '@esbuild/aix-ppc64': 0.19.12 + '@esbuild/android-arm': 0.19.12 + '@esbuild/android-arm64': 0.19.12 + '@esbuild/android-x64': 0.19.12 + '@esbuild/darwin-arm64': 0.19.12 + '@esbuild/darwin-x64': 0.19.12 + '@esbuild/freebsd-arm64': 0.19.12 + '@esbuild/freebsd-x64': 0.19.12 + '@esbuild/linux-arm': 0.19.12 + '@esbuild/linux-arm64': 0.19.12 + '@esbuild/linux-ia32': 0.19.12 + '@esbuild/linux-loong64': 0.19.12 + '@esbuild/linux-mips64el': 0.19.12 + '@esbuild/linux-ppc64': 0.19.12 + '@esbuild/linux-riscv64': 0.19.12 + '@esbuild/linux-s390x': 0.19.12 + '@esbuild/linux-x64': 0.19.12 + '@esbuild/netbsd-x64': 0.19.12 + '@esbuild/openbsd-x64': 0.19.12 + '@esbuild/sunos-x64': 0.19.12 + '@esbuild/win32-arm64': 0.19.12 + '@esbuild/win32-ia32': 0.19.12 + '@esbuild/win32-x64': 0.19.12 dev: true /esbuild@0.19.5: @@ -1769,14 +1771,6 @@ packages: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} dev: true - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - dev: true - optional: true - /fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -2637,8 +2631,8 @@ packages: rc: 1.2.8 dev: true - /replugged@4.7.4(@codemirror/view@6.14.1)(@lezer/common@1.0.3): - resolution: {integrity: sha512-jTbMtTuwt7NSguVx6JgaHiqy1vhiA74VJUFfxzdbhnICr2h4AUkvNkLGwapDpu8oECVPmTNCNO+MNjml+8jmOA==} + /replugged@4.7.9(@codemirror/view@6.14.1)(@lezer/common@1.1.0): + resolution: {integrity: sha512-Eh44KEzXVLRO7UtrZm5mvYXr12KJV4zpifYUEFlNoGaT9mzO598f8WgiMdCQdaUf27bZl+nk6qUngMR4YfkXoA==} engines: {node: '>=18.0.0', pnpm: '>=8.0.0'} hasBin: true requiresBuild: true @@ -2652,7 +2646,7 @@ packages: '@octokit/rest': 20.0.2 adm-zip: 0.5.10 chalk: 5.3.0 - codemirror: 6.0.1(@lezer/common@1.0.3) + codemirror: 6.0.1(@lezer/common@1.1.0) esbuild: 0.19.5 esbuild-sass-plugin: 2.16.0(esbuild@0.19.5) esm: 3.2.25 @@ -2660,7 +2654,7 @@ packages: prompts: 2.4.2 semver: 7.5.4 standalone-electron-types: 1.0.0 - tsx: 3.14.0 + tsx: 4.7.1 update-notifier: 6.0.2 ws: 8.14.2 yargs: 17.7.2 @@ -2818,18 +2812,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /source-map-support@0.5.21: - resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} - dependencies: - buffer-from: 1.1.2 - source-map: 0.6.1 - dev: true - - /source-map@0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - dev: true - /standalone-electron-types@1.0.0: resolution: {integrity: sha512-0HOi/tlTz3mjWhsAz4uRbpQcHMZ+ifj1JzWW9nugykOHClBBG77ps8QinrzX1eow4Iw2pnC+RFaSYRgufF4BOg==} dependencies: @@ -2952,13 +2934,13 @@ packages: typescript: 5.0.4 dev: true - /tsx@3.14.0: - resolution: {integrity: sha512-xHtFaKtHxM9LOklMmJdI3BEnQq/D5F73Of2E1GDrITi9sgoVkvIsrQUTY1G8FlmGtA+awCI4EBlTRRYxkL2sRg==} + /tsx@4.7.1: + resolution: {integrity: sha512-8d6VuibXHtlN5E3zFkgY8u4DX7Y3Z27zvvPKVmLon/D4AjuKzarkUBTLDBgj9iTQ0hg5xM7c/mYiRVM+HETf0g==} + engines: {node: '>=18.0.0'} hasBin: true dependencies: - esbuild: 0.18.20 + esbuild: 0.19.12 get-tsconfig: 4.7.2 - source-map-support: 0.5.21 optionalDependencies: fsevents: 2.3.3 dev: true diff --git a/src/Components/Icons.tsx b/src/Components/Icons.tsx index 833429a..6d57043 100644 --- a/src/Components/Icons.tsx +++ b/src/Components/Icons.tsx @@ -1,44 +1,40 @@ import { React } from "replugged/common"; -export const play = React.memo( - (dimensions?: { width?: string; height?: string }): React.ReactElement => { - return ( - - - - ); - }, -); +export const play = React.memo((props: React.ComponentProps<"svg">): React.ReactElement => { + return ( + + + + ); +}); + +export const queue = React.memo((props: React.ComponentProps<"svg">): React.ReactElement => { + return ( + + + + ); +}); + +export const noLive = React.memo((props: React.ComponentProps<"svg">): React.ReactElement => { + return ( + + + + + ); +}); -export const queue = React.memo( - (dimensions?: { width?: string; height?: string }): React.ReactElement => { - return ( - - - - ); - }, -); -export const noLive = React.memo( - (dimensions?: { width?: string; height?: string }): React.ReactElement => { - return ( - - - - - ); - }, -); export default { play, queue, noLive }; diff --git a/src/lib/utils.tsx b/src/lib/utils.tsx index 5db4be1..c0a915a 100644 --- a/src/lib/utils.tsx +++ b/src/lib/utils.tsx @@ -1,11 +1,11 @@ -import { contextMenu as ContextMenuUtils } from "replugged/common"; +import { contextMenu as ContextMenuUtils, React } from "replugged/common"; import { ContextMenu } from "replugged/components"; import { PluginLogger } from "../index"; import { BASE_URL, BASE_URL_PLAYER } from "./consts"; import { ConnectedAccountsStore } from "./requiredModules"; import MenuItems from "../Components/MenuItems"; import Types from "../types"; -import { util } from "replugged"; +export const customCacheSpotifyMeta = new Map(); export const error = async (res): Promise => { switch (res.status) { case 401: @@ -67,37 +67,70 @@ export const queue = async (type: string, id: string, accessToken: string): Prom throw await error(SpotifyResponse); }; -export const mapMenuItems = async ( +export const mapMenuItems = ( SpotifyLinks: string[][], SpotifyAccounts: Types.SpotifyAccounts[], - type: { - queue: boolean; - play: boolean; - }, -): Promise => { + type: + | { data: boolean; queue?: never; play?: never } + | { + data?: never; + queue: boolean; + play: boolean; + }, +): React.ReactElement[] | string[][] => { + const [SpotifyMeta, setSpotifyMeta] = React.useState( + SpotifyLinks.map(([_, type, id]) => { + if (customCacheSpotifyMeta.has(id)) { + return customCacheSpotifyMeta.get(id); + } + return [_, type, id, ""]; + }), + ); + React.useEffect(() => { + const abortController = new AbortController(); + const getAndSetSpotifyMeta = async () => { + const meta = await Promise.all( + SpotifyLinks.map>(async ([_, type, id]) => { + try { + if (customCacheSpotifyMeta.has(id)) { + return customCacheSpotifyMeta.get(id); + } + const SpotifyResponse = await fetch(`${BASE_URL}/${type}s/${id}`, { + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${SpotifyAccounts[0].accessToken}`, + }, + signal: abortController.signal, + }) + .then((res) => res.json()) + .catch(() => ({ name: "Error Fetching Name" })); + console.log(SpotifyResponse); + if (SpotifyResponse?.name) + customCacheSpotifyMeta.set(id, [_, type, id, SpotifyResponse?.name]); + return [_, type, id, SpotifyResponse?.name ?? "Error Fetching Name"]; + } catch { + return [_, type, id, "Error Fetching Name"]; + } + }), + ); + setSpotifyMeta(meta); + }; + if (SpotifyAccounts.length > 0) { + getAndSetSpotifyMeta(); + } + + return () => { + abortController.abort(); + }; + }, []); try { if (SpotifyAccounts.length <= 0) { return [MenuItems.noAccounts()]; } - const SpotifyMeta = await Promise.all( - SpotifyLinks.map>(async ([_, type, id]) => { - try { - const SpotifyResponse = await fetch(`${BASE_URL}/${type}s/${id}`, { - headers: { - "Content-Type": "application/json", - Authorization: `Bearer ${SpotifyAccounts[0].accessToken}`, - }, - }) - .then((res) => res.json()) - .catch(() => ({ name: "Error Fetching Name" })); - return [_, type, id, SpotifyResponse?.name ?? "Error Fetching Name"]; - } catch { - return [_, type, id, "Error Fetching Name"]; - } - }), - ); - + if ((type as { data: boolean }).data) { + return SpotifyMeta; + } if (SpotifyAccounts.length === 1) { return [ type.play && MenuItems.play(SpotifyMeta, SpotifyAccounts[0]), @@ -121,7 +154,7 @@ export const mapMenuItems = async ( } }; -export const openContextMenu = async ( +export const openContextMenu = ( event: React.MouseEvent, SpotifyLinks: string[][], SpotifyAccounts: Types.SpotifyAccounts[], @@ -129,59 +162,58 @@ export const openContextMenu = async ( queue: boolean; play: boolean; }, -): Promise => { - const MappedItems = await mapMenuItems(SpotifyLinks, SpotifyAccounts, type); +): void => { event.currentTarget = document.querySelector(`#distify-${type.play ? "play" : "queue"}`); - const MyContextMenu = (props) => ( - - {...MappedItems} - - ); + const MyContextMenu = (props) => { + const MappedItems = mapMenuItems(SpotifyLinks, SpotifyAccounts, type); + return ( + + {...MappedItems as React.ReactElement[]} + + ); + }; ContextMenuUtils.open(event, (e) => ); }; -export const manipulateMenu = async ( +export const manipulateMenu = ( message: Types.Message, menu: { children: React.ReactElement[] }, -): Promise => { - if (menu?.children?.some?.((c) => c?.props?.id === "distify")) return; +): React.ReactElement | void => { + console.log(menu); + const MenuGroup = menu?.children?.find?.((c) => c?.props?.id === "distify") ?? ( + + ); + MenuGroup.props.id = "distify"; + if (!menu?.children?.some?.((c) => c?.props?.id === "distify")) + menu?.children.splice(1, 0, MenuGroup); const SpotifyLinks = Array.from( message.content.matchAll(/open.spotify.com\/(album|track|playlist)\/([^?]+)/g) as string[][] & IterableIterator, ); - if (SpotifyLinks.length <= 0) return; const SpotifyAccounts = ConnectedAccountsStore.getAccounts().filter((a) => a.type === "spotify"); - const Index = menu.children.findIndex( - (c) => c?.props?.id === "replugged" || c?.props?.id?.includes?.("devmode-copy-id"), - ); - const MappedItems = await mapMenuItems(SpotifyLinks, SpotifyAccounts, { - play: true, - queue: true, - }); - const MenuGroup = {...MappedItems}; - MenuGroup.props.id = "distify"; - if (!menu?.children?.some?.((c) => c?.props?.id === "distify")) - menu?.children?.splice?.(Index, 0, MenuGroup); - - const MenuElement = document.querySelector( - `#${Types.DefaultTypes.ContextMenuTypes.Message}`, - )?.parentElement; - if (!MenuElement) return; - const MouseOver = new MouseEvent("mouseover", { - bubbles: true, - }); - const MouseOut = new MouseEvent("mouseout", { - bubbles: true, - }); - const RandomMenuItem = MenuElement.querySelector(`[class*="item"]`); - RandomMenuItem.dispatchEvent(MouseOver); - RandomMenuItem.dispatchEvent(MouseOut); - await util.waitFor("#message-play-on-spotify"); - const mHeight = MenuElement.offsetHeight + 10; - const wHeight = window.innerHeight; - if (mHeight + MenuElement.offsetTop > wHeight) { - const ypos = wHeight - mHeight; - MenuElement.style.top = ypos < 0 ? "0px" : `${ypos}px`; + if (!SpotifyAccounts.length) { + MenuGroup.props.children = [MenuItems.noAccounts()]; + } + const SpotifyMeta = mapMenuItems(SpotifyLinks, SpotifyAccounts, { + data: true, + }) as string[][]; + if (SpotifyLinks.length <= 0) return; + if (SpotifyMeta && SpotifyAccounts.length === 1) { + MenuGroup.props.children = [ + MenuItems.play(SpotifyMeta, SpotifyAccounts[0]), + MenuItems.addToQueue(SpotifyMeta, SpotifyAccounts[0]), + ]; + } else if (SpotifyMeta) { + MenuGroup.props.children = SpotifyAccounts.map((SpotifyAccount) => ( + + {...[ + MenuItems.play(SpotifyMeta, SpotifyAccount), + MenuItems.addToQueue(SpotifyMeta, SpotifyAccount), + ]} + + )); } }; diff --git a/src/patches/ContextMenu.ts b/src/patches/ContextMenu.ts index f3b48eb..6456122 100644 --- a/src/patches/ContextMenu.ts +++ b/src/patches/ContextMenu.ts @@ -3,10 +3,10 @@ import Utils from "../lib/utils"; import Types from "../types"; export default (): void => { - PluginInjectorUtils.addMenuItem(Types.DefaultTypes.ContextMenuTypes.Message, (data, menu) => { - void Utils.manipulateMenu( - data.message as Types.Message, - menu as { children: React.ReactElement[] }, - ); - }); + PluginInjectorUtils.addMenuItem( + Types.DefaultTypes.ContextMenuTypes.Message, + (data, menu: Types.MenuProps) => { + Utils.manipulateMenu(data.message as Types.Message, menu); + }, + ); }; diff --git a/src/patches/Popover.tsx b/src/patches/Popover.tsx index 2b6acd4..76f188f 100644 --- a/src/patches/Popover.tsx +++ b/src/patches/Popover.tsx @@ -41,8 +41,9 @@ export default (): void => { } } }, - onContextMenu: async (e) => { - await Utils.openContextMenu(e, SpotifyLinks, SpotifyAccounts, { play: true, queue: false }); + onContextMenu: (e) => { + if (SpotifyAccounts.length > 1) + Utils.openContextMenu(e, SpotifyLinks, SpotifyAccounts, { play: true, queue: false }); }, }; }); @@ -80,8 +81,9 @@ export default (): void => { } } }, - onContextMenu: async (e) => { - await Utils.openContextMenu(e, SpotifyLinks, SpotifyAccounts, { play: false, queue: true }); + onContextMenu: (e) => { + if (SpotifyAccounts.length > 1) + Utils.openContextMenu(e, SpotifyLinks, SpotifyAccounts, { play: false, queue: true }); }, }; }); diff --git a/src/types.ts b/src/types.ts index 2bcf879..380fae5 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,59 +1,72 @@ -export { types as DefaultTypes } from "replugged"; -import { types as DefaultTypes } from "replugged"; -export type { Channel, Message } from "discord-types/general"; +import { types } from "replugged"; +import util from "replugged/util"; +import GeneralDiscordTypes from "discord-types/general"; +import { ChannelMessages as ChannelMessagesType } from "replugged/dist/renderer/modules/common/messages"; +import { ContextMenuProps } from "replugged/dist/renderer/modules/components/ContextMenu"; import { Store } from "replugged/dist/renderer/modules/common/flux"; -export interface SpotifyAccounts { - accessToken?: string; - friendSync: boolean; - id: string; - integrations: []; - metadata?: unknown; - metadataVisibility: number; - name: string; - revoked: boolean; - showActivity: boolean; - twoWayLink: boolean; - type: string; - verified: string; - visibility: number; -} -export interface ConnectedAccountsStore extends Store { - getAccount: DefaultTypes.AnyFunction; - getAccounts: () => SpotifyAccounts[]; - getLocalAccount: DefaultTypes.AnyFunction; - getLocalAccounts: DefaultTypes.AnyFunction; - isFetching: DefaultTypes.AnyFunction; - isJoining: DefaultTypes.AnyFunction; - isSuggestedAccountType: DefaultTypes.AnyFunction; -} +export namespace Types { + export import DefaultTypes = types; + export type Guild = GeneralDiscordTypes.Guild; + export type Channel = GeneralDiscordTypes.Channel; + export type User = GeneralDiscordTypes.User; + export type Message = GeneralDiscordTypes.Message; + export type UtilTree = util.Tree; + export type ReactTree = util.Tree & React.ReactElement; + export type ChannelMessages = typeof ChannelMessagesType; + export type MenuProps = ContextMenuProps["ContextMenu"] & { children: React.ReactElement[] }; + export interface SpotifyAccounts { + accessToken?: string; + friendSync: boolean; + id: string; + integrations: []; + metadata?: unknown; + metadataVisibility: number; + name: string; + revoked: boolean; + showActivity: boolean; + twoWayLink: boolean; + type: string; + verified: string; + visibility: number; + } + export interface ConnectedAccountsStore extends Store { + getAccount: DefaultTypes.AnyFunction; + getAccounts: () => SpotifyAccounts[]; + getLocalAccount: DefaultTypes.AnyFunction; + getLocalAccounts: DefaultTypes.AnyFunction; + isFetching: DefaultTypes.AnyFunction; + isJoining: DefaultTypes.AnyFunction; + isSuggestedAccountType: DefaultTypes.AnyFunction; + } -export interface ElementParser { - ReactMarkdown: DefaultTypes.AnyFunction; - anyScopeRegex: DefaultTypes.AnyFunction; - blockRegex: DefaultTypes.AnyFunction; - defaultBlockParse: DefaultTypes.AnyFunction; - defaultHtmlOutput: DefaultTypes.AnyFunction; - defaultImplicitParse: DefaultTypes.AnyFunction; - defaultInlineParse: DefaultTypes.AnyFunction; - defaultOutput: DefaultTypes.AnyFunction; - defaultParse: DefaultTypes.AnyFunction; - defaultRawParse: DefaultTypes.AnyFunction; - defaultReactOutput: DefaultTypes.AnyFunction; - htmlFor: DefaultTypes.AnyFunction; - htmlTag: DefaultTypes.AnyFunction; - inlineRegex: DefaultTypes.AnyFunction; - markdownToHtml: DefaultTypes.AnyFunction; - markdownToReact: DefaultTypes.AnyFunction; - outputFor: DefaultTypes.AnyFunction; - parseBlock: DefaultTypes.AnyFunction; - parseInline: DefaultTypes.AnyFunction; - parserFor: DefaultTypes.AnyFunction; - preprocess: DefaultTypes.AnyFunction; - reactElement: DefaultTypes.AnyFunction; - reactFor: DefaultTypes.AnyFunction; - ruleOutput: DefaultTypes.AnyFunction; - sanitizeText: DefaultTypes.AnyFunction; - sanitizeUrl: DefaultTypes.AnyFunction; - unescapeUrl: DefaultTypes.AnyFunction; + export interface ElementParser { + ReactMarkdown: DefaultTypes.AnyFunction; + anyScopeRegex: DefaultTypes.AnyFunction; + blockRegex: DefaultTypes.AnyFunction; + defaultBlockParse: DefaultTypes.AnyFunction; + defaultHtmlOutput: DefaultTypes.AnyFunction; + defaultImplicitParse: DefaultTypes.AnyFunction; + defaultInlineParse: DefaultTypes.AnyFunction; + defaultOutput: DefaultTypes.AnyFunction; + defaultParse: DefaultTypes.AnyFunction; + defaultRawParse: DefaultTypes.AnyFunction; + defaultReactOutput: DefaultTypes.AnyFunction; + htmlFor: DefaultTypes.AnyFunction; + htmlTag: DefaultTypes.AnyFunction; + inlineRegex: DefaultTypes.AnyFunction; + markdownToHtml: DefaultTypes.AnyFunction; + markdownToReact: DefaultTypes.AnyFunction; + outputFor: DefaultTypes.AnyFunction; + parseBlock: DefaultTypes.AnyFunction; + parseInline: DefaultTypes.AnyFunction; + parserFor: DefaultTypes.AnyFunction; + preprocess: DefaultTypes.AnyFunction; + reactElement: DefaultTypes.AnyFunction; + reactFor: DefaultTypes.AnyFunction; + ruleOutput: DefaultTypes.AnyFunction; + sanitizeText: DefaultTypes.AnyFunction; + sanitizeUrl: DefaultTypes.AnyFunction; + unescapeUrl: DefaultTypes.AnyFunction; + } } -export * as default from "./types"; +export default Types;