Skip to content

Commit

Permalink
chore: update some docs deps
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaellis committed May 26, 2024
1 parent f7a9f97 commit dd6556c
Show file tree
Hide file tree
Showing 6 changed files with 469 additions and 569 deletions.
324 changes: 1 addition & 323 deletions docs/app/data/subnavSchema.generated.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions docs/app/helpers/links.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import { FlattenedNavigation } from './navigation'

const BASE_URL =
'https://github.com/pmndrs/react-spring/tree/main/docs/app/routes/docs/'
'https://github.com/pmndrs/react-spring/tree/main/docs/app/routes'

export const getDocFilePathToGithub = (item?: FlattenedNavigation): string => {
if (!item) {
return BASE_URL
}

let filePath = item.href.split('/docs/')[1]
let filePath = item.href.split('/docs/')[1].split('/').join('.')

if (!filePath) {
filePath = 'index'
filePath = '_index'
}

if (item.hasChildren) {
filePath = `${filePath}/index`
filePath = `${filePath}._index`
}

return `${BASE_URL}${filePath}.mdx`
return `${BASE_URL}/docs.${filePath}.mdx`
}
26 changes: 13 additions & 13 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,31 @@
"@remix-run/react": "2.9.2",
"@remix-run/serve": "2.9.2",
"@remix-run/server-runtime": "2.9.2",
"@supabase/supabase-js": "2.39.3",
"@vanilla-extract/css": "1.15.1",
"@vanilla-extract/dynamic": "2.1.0",
"@vanilla-extract/recipes": "0.5.2",
"@vercel/analytics": "1.2.2",
"@vercel/remix": "2.9.2-patch.2",
"@supabase/supabase-js": "2.43.4",
"@vanilla-extract/css": "1.15.2",
"@vanilla-extract/dynamic": "2.1.1",
"@vanilla-extract/recipes": "0.5.3",
"@vercel/analytics": "1.3.1",
"@vercel/remix": "2.9.2",
"clsx": "2.1.1",
"cookie": "0.6.0",
"isbot": "4",
"isbot": "5.1.7",
"phosphor-react": "1.4.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-select": "5.8.0",
"zod": "3.21.4"
"zod": "3.23.8"
},
"devDependencies": {
"@mdx-js/rollup": "3.0.1",
"@remix-run/dev": "2.9.2",
"@vanilla-extract/vite-plugin": "4.0.9",
"chokidar": "3.5.3",
"@vanilla-extract/vite-plugin": "4.0.10",
"chokidar": "3.6.0",
"concurrently": "8.2.2",
"esbuild": "0.20.2",
"esbuild": "0.21.4",
"esbuild-register": "3.5.0",
"gray-matter": "4.0.3",
"hast-util-to-html": "7.1.3",
"hast-util-to-html": "9.0.1",
"parse-numeric-range": "1.3.0",
"refractor": "4.8.1",
"rehype-autolink-headings": "7.1.0",
Expand All @@ -68,6 +68,6 @@
"unified": "11.0.4",
"unist-util-visit": "5.0.0",
"vite": "5.2.11",
"vite-tsconfig-paths": "4.2.1"
"vite-tsconfig-paths": "4.3.2"
}
}
4 changes: 2 additions & 2 deletions docs/scripts/mdx/rehype-highlight-line.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Credit to https://ped.ro/writing/code-blocks-but-better
*/

import hastToHtml from 'hast-util-to-html'
import { toHtml } from 'hast-util-to-html'
import { unified } from 'unified'
import parse from 'rehype-parse'

Expand Down Expand Up @@ -96,7 +96,7 @@ const MULTILINE_TOKEN_SPAN = /<span class="token ([^"]+)">[^<]*\n[^<]*<\/span>/g

const applyMultilineFix = function (ast) {
// AST to HTML
let html = hastToHtml(ast)
let html = toHtml(ast)

// Fix JSX issue
html = html.replace(MULTILINE_TOKEN_SPAN, (match, token) =>
Expand Down
4 changes: 2 additions & 2 deletions docs/scripts/mdx/rehype-highlight-word.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* Credit to https://ped.ro/writing/code-blocks-but-better
*/

import hastToHtml from 'hast-util-to-html'
import { toHtml } from 'hast-util-to-html'
import { unified } from 'unified'
import parse from 'rehype-parse'

const CALLOUT = /__(.*?)__/g

export default function (code) {
const html = hastToHtml(code)
const html = toHtml(code)
const result = html.replace(
CALLOUT,
(_, text) => `<span class="highlight-word">${text}</span>`
Expand Down
Loading

0 comments on commit dd6556c

Please sign in to comment.