diff --git a/.agents/react-doctor/AGENTS.md b/.agents/react-doctor/AGENTS.md new file mode 100644 index 0000000..3db6436 --- /dev/null +++ b/.agents/react-doctor/AGENTS.md @@ -0,0 +1,15 @@ +# React Doctor + +Run after making React changes to catch issues early. Use when reviewing code, finishing a feature, or fixing bugs in a React project. + +Scans your React codebase for security, performance, correctness, and architecture issues. Outputs a 0-100 score with actionable diagnostics. + +## Usage + +```bash +npx -y react-doctor@latest . --verbose --diff +``` + +## Workflow + +Run after making changes to catch issues early. Fix errors first, then re-run to verify the score improved. diff --git a/.agents/react-doctor/SKILL.md b/.agents/react-doctor/SKILL.md new file mode 100644 index 0000000..8cc27cf --- /dev/null +++ b/.agents/react-doctor/SKILL.md @@ -0,0 +1,19 @@ +--- +name: react-doctor +description: Run after making React changes to catch issues early. Use when reviewing code, finishing a feature, or fixing bugs in a React project. +version: 1.0.0 +--- + +# React Doctor + +Scans your React codebase for security, performance, correctness, and architecture issues. Outputs a 0-100 score with actionable diagnostics. + +## Usage + +```bash +npx -y react-doctor@latest . --verbose --diff +``` + +## Workflow + +Run after making changes to catch issues early. Fix errors first, then re-run to verify the score improved. diff --git a/apps/website/package.json b/apps/website/package.json index 4c43fd7..2017455 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -39,14 +39,14 @@ "@content-collections/core": "0.14.1", "@content-collections/mdx": "0.2.2", "@content-collections/next": "0.2.11", - "@shikijs/langs": "3.23.0", - "@shikijs/rehype": "3.23.0", - "@shikijs/themes": "3.23.0", - "@shikijs/transformers": "3.23.0", + "@shikijs/langs": "4.0.0", + "@shikijs/rehype": "4.0.0", + "@shikijs/themes": "4.0.0", + "@shikijs/transformers": "4.0.0", "@tailwindcss/postcss": "4.2.1", "@tailwindcss/typography": "0.5.19", "@types/mdx": "2.0.13", - "@types/node": "22.19.11", + "@types/node": "22.19.13", "@types/react": "19.2.14", "@types/react-dom": "19.2.3", "chalk": "5.6.2", @@ -56,7 +56,7 @@ "rehype-autolink-headings": "7.1.0", "rehype-slug": "6.0.0", "remark-gfm": "4.0.1", - "shiki": "3.23.0", + "shiki": "4.0.0", "sugar-high": "0.9.5", "tailwindcss": "4.2.1", "tsx": "4.21.0", diff --git a/apps/website/src/docs/getting-started/prerequisites.mdx b/apps/website/src/docs/getting-started/prerequisites.mdx index 56ea70d..b00eb57 100644 --- a/apps/website/src/docs/getting-started/prerequisites.mdx +++ b/apps/website/src/docs/getting-started/prerequisites.mdx @@ -4,7 +4,11 @@ description: Libraries required to create custom Code Block component. category: [Getting-Started] --- -> [**Code-Blocks**](https://code-blocks.pheralb.dev) separates components and utilities. You can use them independently. +To create your own custom Code Block component, make sure you have the following prerequisites: + +- [Node.js v20](https://nodejs.org/en/download/current) or higher. +- [Typescript v5](https://www.typescriptlang.org/) or higher. +- If you plan to use the [shadcn/ui CLI](https://ui.shadcn.com/docs/cli), make sure you configure the [`components.json`](https://ui.shadcn.com/docs/components-json) file first. ## Styling @@ -16,8 +20,6 @@ For some colors, we use [**neutral** theme](https://tailwindcss.com/docs/colors) ## Components -> If you're using [shadcn/ui](https://ui.shadcn.com), you can skip this section as the required dependencies are already included. - 1. Create a new React app: @@ -60,11 +62,7 @@ You'll need to install [@base-ui/react](https://base-ui.com/) to use the Blocks 1. Install the package: - + 2. Add `root` class to global `` tag: diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8ade995..6df06b1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -61,7 +61,7 @@ importers: version: 5.2.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4) shadcn: specifier: 3.8.5 - version: 3.8.5(@types/node@22.19.11)(typescript@5.9.3) + version: 3.8.5(@types/node@22.19.13)(typescript@5.9.3) swr: specifier: 2.4.0 version: 2.4.0(react@19.2.4) @@ -91,17 +91,17 @@ importers: specifier: 0.2.11 version: 0.2.11(@content-collections/core@0.14.1(typescript@5.9.3))(next@16.1.6(@babel/core@7.29.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)) '@shikijs/langs': - specifier: 3.23.0 - version: 3.23.0 + specifier: 4.0.0 + version: 4.0.0 '@shikijs/rehype': - specifier: 3.23.0 - version: 3.23.0 + specifier: 4.0.0 + version: 4.0.0 '@shikijs/themes': - specifier: 3.23.0 - version: 3.23.0 + specifier: 4.0.0 + version: 4.0.0 '@shikijs/transformers': - specifier: 3.23.0 - version: 3.23.0 + specifier: 4.0.0 + version: 4.0.0 '@tailwindcss/postcss': specifier: 4.2.1 version: 4.2.1 @@ -112,8 +112,8 @@ importers: specifier: 2.0.13 version: 2.0.13 '@types/node': - specifier: 22.19.11 - version: 22.19.11 + specifier: 22.19.13 + version: 22.19.13 '@types/react': specifier: 19.2.14 version: 19.2.14 @@ -142,8 +142,8 @@ importers: specifier: 4.0.1 version: 4.0.1 shiki: - specifier: 3.23.0 - version: 3.23.0 + specifier: 4.0.0 + version: 4.0.0 sugar-high: specifier: 0.9.5 version: 0.9.5 @@ -1386,29 +1386,41 @@ packages: '@sec-ant/readable-stream@0.4.1': resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} - '@shikijs/core@3.23.0': - resolution: {integrity: sha512-NSWQz0riNb67xthdm5br6lAkvpDJRTgB36fxlo37ZzM2yq0PQFFzbd8psqC2XMPgCzo1fW6cVi18+ArJ44wqgA==} + '@shikijs/core@4.0.0': + resolution: {integrity: sha512-tvV94Dwyz4qFZ8R0MUaFx5Yptgy8yrloa4dwynEJDGjKz+8vqO8Q6FmPZL9W1gSzFHOUMOGQzIHK62aGourFxA==} + engines: {node: '>=20'} - '@shikijs/engine-javascript@3.23.0': - resolution: {integrity: sha512-aHt9eiGFobmWR5uqJUViySI1bHMqrAgamWE1TYSUoftkAeCCAiGawPMwM+VCadylQtF4V3VNOZ5LmfItH5f3yA==} + '@shikijs/engine-javascript@4.0.0': + resolution: {integrity: sha512-+PEyTS+JTz2lLy2C1Dwwx6hzoehIzqxQYh5MEjv9V4JtSabx+bIkRHfQT+6DnBmPAplGH0exBknWeiJSXC7w1w==} + engines: {node: '>=20'} - '@shikijs/engine-oniguruma@3.23.0': - resolution: {integrity: sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==} + '@shikijs/engine-oniguruma@4.0.0': + resolution: {integrity: sha512-KXmq4b6Xw16+4+rz5M4NZMoe/tzs5kTOMSJz8+LCyxSrwmxwTBAM/ab85iSO2Gw79E47HkW4B9HPHUXhrNOivw==} + engines: {node: '>=20'} - '@shikijs/langs@3.23.0': - resolution: {integrity: sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==} + '@shikijs/langs@4.0.0': + resolution: {integrity: sha512-dSAT6fBcnOcYZQMWZO8+OmzUKKm+OO0As/qZ3TXLiSy0JsCTEYz1TaX7TDupnYLz7dr0oF2DOTEgPocx1D3aFw==} + engines: {node: '>=20'} + + '@shikijs/primitive@4.0.0': + resolution: {integrity: sha512-6K2zD7JTgsyFc2vM1rqy8eRGC8D5Hius3qzVONjq2lHMrqfTSn1HcGeJZiFPYSV9m3DQuBHncBbA5xe0hKSOkQ==} + engines: {node: '>=20'} - '@shikijs/rehype@3.23.0': - resolution: {integrity: sha512-GepKJxXHbXFfAkiZZZ+4V7x71Lw3s0ALYmydUxJRdvpKjSx9FOMSaunv6WRLFBXR6qjYerUq1YZQno+2gLEPwA==} + '@shikijs/rehype@4.0.0': + resolution: {integrity: sha512-zvvK1H763oSOH7jh2eVMYwM2zDEVVqboSn4ChIC1W8SnB5kQwanZYdIWJrWJPlzCjyd8loHlp0a9mOTds8QtGA==} + engines: {node: '>=20'} - '@shikijs/themes@3.23.0': - resolution: {integrity: sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==} + '@shikijs/themes@4.0.0': + resolution: {integrity: sha512-xe42kvxOXan5ouXxULez6qwDNUJkoP6kicfg0wKuJBkeIaHLxZBZa2gEGYutL1q27DQZ5+XoR6caVX+E/aNR5A==} + engines: {node: '>=20'} - '@shikijs/transformers@3.23.0': - resolution: {integrity: sha512-F9msZVxdF+krQNSdQ4V+Ja5QemeAoTQ2jxt7nJCwhDsdF1JWS3KxIQXA3lQbyKwS3J61oHRUSv4jYWv3CkaKTQ==} + '@shikijs/transformers@4.0.0': + resolution: {integrity: sha512-EreHG7BVel+oY2e6yzoH3Yqk3OkS71cZnjJ35eSWhYcHSDqCajBQaWYyjmPRK5QG8VgzuMBhTW8UW4/Js+/8eQ==} + engines: {node: '>=20'} - '@shikijs/types@3.23.0': - resolution: {integrity: sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==} + '@shikijs/types@4.0.0': + resolution: {integrity: sha512-LCnfBTtQKNtJyc1qMShZr2dJt1uxNI6pI0/YTc2DSNET91aUvnMGHUHsucVCC5AJVcv5XyBqk2NgYRwd20EjbA==} + engines: {node: '>=20'} '@shikijs/vscode-textmate@10.0.2': resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} @@ -1553,8 +1565,8 @@ packages: '@types/ms@2.1.0': resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} - '@types/node@22.19.11': - resolution: {integrity: sha512-BH7YwL6rA93ReqeQS1c4bsPpcfOmJasG+Fkr6Y59q83f9M1WcBRHR2vM+P9eOisYRcN3ujQoiZY8uk5W+1WL8w==} + '@types/node@22.19.13': + resolution: {integrity: sha512-akNQMv0wW5uyRpD2v2IEyRSZiR+BeGuoB6L310EgGObO44HSMNT8z1xzio28V8qOrgYaopIDNA18YgdXd+qTiw==} '@types/node@22.19.3': resolution: {integrity: sha512-1N9SBnWYOJTrNZCdh/yJE+t910Y128BoyY+zBLWhL3r0TYzlTmFdXrPwHL9DyFZmlEXNQQolTZh3KHV31QDhyA==} @@ -4074,8 +4086,9 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - shiki@3.23.0: - resolution: {integrity: sha512-55Dj73uq9ZXL5zyeRPzHQsK7Nbyt6Y10k5s7OjuFZGMhpp4r/rsLBH0o/0fstIzX1Lep9VxefWljK/SKCzygIA==} + shiki@4.0.0: + resolution: {integrity: sha512-rjKoiw30ZaFsM0xnPPwxco/Jftz/XXqZkcQZBTX4LGheDw8gCDEH87jdgaKDEG3FZO2bFOK27+sR/sDHhbBXfg==} + engines: {node: '>=20'} side-channel-list@1.0.0: resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} @@ -5318,31 +5331,31 @@ snapshots: '@inquirer/ansi@1.0.2': {} - '@inquirer/confirm@5.1.21(@types/node@22.19.11)': + '@inquirer/confirm@5.1.21(@types/node@22.19.13)': dependencies: - '@inquirer/core': 10.3.2(@types/node@22.19.11) - '@inquirer/type': 3.0.10(@types/node@22.19.11) + '@inquirer/core': 10.3.2(@types/node@22.19.13) + '@inquirer/type': 3.0.10(@types/node@22.19.13) optionalDependencies: - '@types/node': 22.19.11 + '@types/node': 22.19.13 - '@inquirer/core@10.3.2(@types/node@22.19.11)': + '@inquirer/core@10.3.2(@types/node@22.19.13)': dependencies: '@inquirer/ansi': 1.0.2 '@inquirer/figures': 1.0.15 - '@inquirer/type': 3.0.10(@types/node@22.19.11) + '@inquirer/type': 3.0.10(@types/node@22.19.13) cli-width: 4.1.0 mute-stream: 2.0.0 signal-exit: 4.1.0 wrap-ansi: 6.2.0 yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 22.19.11 + '@types/node': 22.19.13 '@inquirer/figures@1.0.15': {} - '@inquirer/type@3.0.10(@types/node@22.19.11)': + '@inquirer/type@3.0.10(@types/node@22.19.13)': optionalDependencies: - '@types/node': 22.19.11 + '@types/node': 22.19.13 '@jridgewell/gen-mapping@0.3.13': dependencies: @@ -5671,47 +5684,54 @@ snapshots: '@sec-ant/readable-stream@0.4.1': {} - '@shikijs/core@3.23.0': + '@shikijs/core@4.0.0': dependencies: - '@shikijs/types': 3.23.0 + '@shikijs/primitive': 4.0.0 + '@shikijs/types': 4.0.0 '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 hast-util-to-html: 9.0.5 - '@shikijs/engine-javascript@3.23.0': + '@shikijs/engine-javascript@4.0.0': dependencies: - '@shikijs/types': 3.23.0 + '@shikijs/types': 4.0.0 '@shikijs/vscode-textmate': 10.0.2 oniguruma-to-es: 4.3.4 - '@shikijs/engine-oniguruma@3.23.0': + '@shikijs/engine-oniguruma@4.0.0': dependencies: - '@shikijs/types': 3.23.0 + '@shikijs/types': 4.0.0 '@shikijs/vscode-textmate': 10.0.2 - '@shikijs/langs@3.23.0': + '@shikijs/langs@4.0.0': + dependencies: + '@shikijs/types': 4.0.0 + + '@shikijs/primitive@4.0.0': dependencies: - '@shikijs/types': 3.23.0 + '@shikijs/types': 4.0.0 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 - '@shikijs/rehype@3.23.0': + '@shikijs/rehype@4.0.0': dependencies: - '@shikijs/types': 3.23.0 + '@shikijs/types': 4.0.0 '@types/hast': 3.0.4 hast-util-to-string: 3.0.1 - shiki: 3.23.0 + shiki: 4.0.0 unified: 11.0.5 unist-util-visit: 5.1.0 - '@shikijs/themes@3.23.0': + '@shikijs/themes@4.0.0': dependencies: - '@shikijs/types': 3.23.0 + '@shikijs/types': 4.0.0 - '@shikijs/transformers@3.23.0': + '@shikijs/transformers@4.0.0': dependencies: - '@shikijs/core': 3.23.0 - '@shikijs/types': 3.23.0 + '@shikijs/core': 4.0.0 + '@shikijs/types': 4.0.0 - '@shikijs/types@3.23.0': + '@shikijs/types@4.0.0': dependencies: '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 @@ -5837,7 +5857,7 @@ snapshots: '@types/ms@2.1.0': {} - '@types/node@22.19.11': + '@types/node@22.19.13': dependencies: undici-types: 6.21.0 @@ -8223,9 +8243,9 @@ snapshots: ms@2.1.3: {} - msw@2.12.10(@types/node@22.19.11)(typescript@5.9.3): + msw@2.12.10(@types/node@22.19.13)(typescript@5.9.3): dependencies: - '@inquirer/confirm': 5.1.21(@types/node@22.19.11) + '@inquirer/confirm': 5.1.21(@types/node@22.19.13) '@mswjs/interceptors': 0.41.3 '@open-draft/deferred-promise': 2.2.0 '@types/statuses': 2.0.6 @@ -8894,7 +8914,7 @@ snapshots: setprototypeof@1.2.0: {} - shadcn@3.8.5(@types/node@22.19.11)(typescript@5.9.3): + shadcn@3.8.5(@types/node@22.19.13)(typescript@5.9.3): dependencies: '@antfu/ni': 25.0.0 '@babel/core': 7.29.0 @@ -8916,7 +8936,7 @@ snapshots: fuzzysort: 3.1.0 https-proxy-agent: 7.0.6 kleur: 4.1.5 - msw: 2.12.10(@types/node@22.19.11)(typescript@5.9.3) + msw: 2.12.10(@types/node@22.19.13)(typescript@5.9.3) node-fetch: 3.3.2 open: 11.0.0 ora: 8.2.0 @@ -8976,14 +8996,14 @@ snapshots: shebang-regex@3.0.0: {} - shiki@3.23.0: + shiki@4.0.0: dependencies: - '@shikijs/core': 3.23.0 - '@shikijs/engine-javascript': 3.23.0 - '@shikijs/engine-oniguruma': 3.23.0 - '@shikijs/langs': 3.23.0 - '@shikijs/themes': 3.23.0 - '@shikijs/types': 3.23.0 + '@shikijs/core': 4.0.0 + '@shikijs/engine-javascript': 4.0.0 + '@shikijs/engine-oniguruma': 4.0.0 + '@shikijs/langs': 4.0.0 + '@shikijs/themes': 4.0.0 + '@shikijs/types': 4.0.0 '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4