From 7bedf3915914b77d042e5c36061b70b99d9f562d Mon Sep 17 00:00:00 2001 From: Jack Shelton <104264123+thejackshelton@users.noreply.github.com> Date: Sun, 22 Dec 2024 03:52:16 -0600 Subject: [PATCH] docs: add TOC + site changes (#655) --- docs/package.json | 2 + docs/pnpm-lock.yaml | 17 ++ docs/src/components/Aside/Aside.tsx | 4 +- docs/src/components/Footer/Footer.tsx | 2 +- docs/src/components/Header/Header.tsx | 4 +- .../MdxComponents/MdxComponents.tsx | 2 +- docs/src/components/Toc/Toc.tsx | 217 +++++++++++++++--- docs/src/global.scss | 9 +- docs/src/root.tsx | 2 +- docs/src/routes/layout.tsx | 16 +- docs/src/utils/cn.ts | 6 + 11 files changed, 237 insertions(+), 44 deletions(-) create mode 100644 docs/src/utils/cn.ts diff --git a/docs/package.json b/docs/package.json index 52264d23..b4d8291e 100644 --- a/docs/package.json +++ b/docs/package.json @@ -36,6 +36,7 @@ "@typescript-eslint/eslint-plugin": "7.16.1", "@typescript-eslint/parser": "7.16.1", "autoprefixer": "^10.4.19", + "clsx": "^2.1.1", "eslint": "8.57.0", "eslint-plugin-qwik": "^2.0.0-alpha.4", "postcss": "^8.4.39", @@ -44,6 +45,7 @@ "rehype-pretty-code": "^0.14.0", "sass": "^1.83.0", "shiki": "^1.24.3", + "tailwind-merge": "^2.5.5", "tailwindcss": "^3.4.6", "typescript": "5.4.5", "unist-util-visit": "^5.0.0", diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml index e4d4d1eb..3dc34a10 100644 --- a/docs/pnpm-lock.yaml +++ b/docs/pnpm-lock.yaml @@ -29,6 +29,9 @@ importers: autoprefixer: specifier: ^10.4.19 version: 10.4.20(postcss@8.4.49) + clsx: + specifier: ^2.1.1 + version: 2.1.1 eslint: specifier: 8.57.0 version: 8.57.0 @@ -53,6 +56,9 @@ importers: shiki: specifier: ^1.24.3 version: 1.24.3 + tailwind-merge: + specifier: ^2.5.5 + version: 2.5.5 tailwindcss: specifier: ^3.4.6 version: 3.4.17 @@ -1104,6 +1110,10 @@ packages: resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} engines: {node: '>= 14.16.0'} + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + engines: {node: '>=6'} + collapse-white-space@2.1.0: resolution: {integrity: sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==} @@ -2486,6 +2496,9 @@ packages: engines: {node: '>=14.0.0'} hasBin: true + tailwind-merge@2.5.5: + resolution: {integrity: sha512-0LXunzzAZzo0tEPxV3I297ffKZPlKDrjj7NXphC8V5ak9yHC5zRmxnOe2m/Rd/7ivsOMJe3JZ2JVocoDdQTRBA==} + tailwindcss@3.4.17: resolution: {integrity: sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==} engines: {node: '>=14.0.0'} @@ -3655,6 +3668,8 @@ snapshots: dependencies: readdirp: 4.0.2 + clsx@2.1.1: {} + collapse-white-space@2.1.0: {} color-convert@2.0.1: @@ -5497,6 +5512,8 @@ snapshots: csso: 5.0.5 picocolors: 1.1.1 + tailwind-merge@2.5.5: {} + tailwindcss@3.4.17: dependencies: '@alloc/quick-lru': 5.2.0 diff --git a/docs/src/components/Aside/Aside.tsx b/docs/src/components/Aside/Aside.tsx index 65d5b2d1..ede6377e 100644 --- a/docs/src/components/Aside/Aside.tsx +++ b/docs/src/components/Aside/Aside.tsx @@ -6,7 +6,7 @@ export const Aside = component$(() => { return (