Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: chakra-ui/chakra-ui
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @chakra-ui/react@3.13.0
Choose a base ref
...
head repository: chakra-ui/chakra-ui
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: @chakra-ui/react@3.14.0
Choose a head ref

Commits on Feb 2, 2025

  1. feat: llms-full.txt

    Pagebakers committed Feb 2, 2025
    Copy the full SHA
    012190a View commit details

Commits on Mar 14, 2025

  1. docs: update variable names in select examples for consistency

    wesjune committed Mar 14, 2025
    Copy the full SHA
    8092fba View commit details
  2. Update shadows.mdx

    noidar authored Mar 14, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    601bbb7 View commit details
  3. docs: update blog post

    estheragbaje committed Mar 14, 2025
    Copy the full SHA
    900f0b4 View commit details
  4. docs: updates

    estheragbaje committed Mar 14, 2025
    Copy the full SHA
    af06b5c View commit details
  5. docs: update blog post (#9805)

    estheragbaje authored Mar 14, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ada44ef View commit details
  6. docs: fix opengraph

    segunadebayo committed Mar 14, 2025
    Copy the full SHA
    554874f View commit details
  7. docs: update variable names in select examples for consistency (#9802)

    segunadebayo authored Mar 14, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    05d64a6 View commit details
  8. Update shadows.mdx (#9803)

    segunadebayo authored Mar 14, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    944901a View commit details

Commits on Mar 16, 2025

  1. Merge branch 'main' into chore/llms-txt

    Pagebakers committed Mar 16, 2025
    Copy the full SHA
    76538fb View commit details
  2. feat: render markdown props

    Pagebakers committed Mar 16, 2025
    Copy the full SHA
    cb57ba1 View commit details
  3. feat: add sections

    Pagebakers committed Mar 16, 2025
    Copy the full SHA
    86aa159 View commit details

Commits on Mar 17, 2025

  1. chore(deps): update dependency @chromatic-com/storybook to v3.2.6

    renovate[bot] authored Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    014008a View commit details
  2. fix(deps): update babel to v7.26.10

    renovate[bot] authored Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    8356393 View commit details
  3. fix(deps): update dependency @tanstack/react-virtual to v3.13.4

    renovate[bot] authored Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    2f4f32f View commit details
  4. fix(deps): update dependency bundle-n-require to v1.1.2

    renovate[bot] authored Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e017e0d View commit details
  5. fix(deps): update dependency next-themes to v0.4.6

    renovate[bot] authored Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    721b5ec View commit details
  6. chore(deps): update dependency vite to v6.2.2

    renovate[bot] authored Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    3fd98e1 View commit details
  7. fix(deps): update dependency bundle-n-require to v1.1.2 (#9815)

    segunadebayo authored Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    5655891 View commit details
  8. fix(deps): update dependency @tanstack/react-virtual to v3.13.4 (#9814)

    segunadebayo authored Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    5b1ad73 View commit details
  9. fix(deps): update dependency next-themes to v0.4.6 (#9816)

    segunadebayo authored Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    5da8a68 View commit details
  10. chore(deps): update dependency @chromatic-com/storybook to v3.2.6 (#9812

    )
    segunadebayo authored Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    960f5b3 View commit details
  11. fix(deps): update babel to v7.26.10 (#9813)

    segunadebayo authored Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4552787 View commit details
  12. chore(deps): update dependency vite to v6.2.2 (#9789)

    segunadebayo authored Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    5470ba1 View commit details
  13. chore: fix lockfile

    segunadebayo committed Mar 17, 2025
    Copy the full SHA
    e11d3de View commit details

Commits on Mar 18, 2025

  1. feat: add docs and migration llms

    Pagebakers committed Mar 18, 2025
    Copy the full SHA
    a83adf6 View commit details
  2. chore: remove title

    Pagebakers committed Mar 18, 2025
    Copy the full SHA
    8c3cf0d View commit details
  3. feat(docs): implement llms.txt (#9594)

    segunadebayo authored Mar 18, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    5015d1e View commit details
  4. docs: refactor llms

    segunadebayo committed Mar 18, 2025
    Copy the full SHA
    9fab2e2 View commit details
  5. docs: include prebuild

    segunadebayo committed Mar 18, 2025
    Copy the full SHA
    b43af4d View commit details
  6. docs: fix typo in factory

    segunadebayo committed Mar 18, 2025
    Copy the full SHA
    4dd3dc3 View commit details
  7. docs: mark llms page as new

    segunadebayo committed Mar 18, 2025
    Copy the full SHA
    f7123a6 View commit details

Commits on Mar 19, 2025

  1. Copy the full SHA
    f66ddcf View commit details
  2. docs: update announcement

    segunadebayo committed Mar 19, 2025
    Copy the full SHA
    689a3a9 View commit details

Commits on Mar 21, 2025

  1. docs: rm mention of mergeConfigs

    segunadebayo committed Mar 21, 2025
    Copy the full SHA
    9ecae5c View commit details

Commits on Mar 24, 2025

  1. chore: use ark v5

    segunadebayo committed Mar 24, 2025
    Copy the full SHA
    354eaa6 View commit details
  2. docs: update and fixes

    segunadebayo committed Mar 24, 2025
    Copy the full SHA
    7bd9d18 View commit details
  3. ci(changesets): version packages

    segunadebayo committed Mar 24, 2025
    Copy the full SHA
    97fde7a View commit details
  4. fix: typecheck

    segunadebayo committed Mar 24, 2025
    Copy the full SHA
    048bc58 View commit details
  5. chore: bump deps

    segunadebayo committed Mar 24, 2025
    Copy the full SHA
    5f162bc View commit details
  6. docs: next changelog

    segunadebayo committed Mar 24, 2025
    Copy the full SHA
    9d9f608 View commit details
  7. Version Packages (#9834)

    segunadebayo authored Mar 24, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    48a5bc9 View commit details
Showing with 3,039 additions and 2,468 deletions.
  1. +9 −0 .changelog/v3.mdx
  2. +7 −7 apps/compositions/package.json
  3. +1 −1 apps/compositions/src/examples/radio-controlled.tsx
  4. +1 −1 apps/compositions/src/examples/segmented-control-controlled.tsx
  5. +3 −0 apps/compositions/src/examples/segmented-control-in-card.tsx
  6. +3 −3 apps/compositions/src/examples/select-basic.tsx
  7. +4 −4 apps/compositions/src/examples/select-with-icon-button.tsx
  8. +4 −4 apps/compositions/src/examples/select-with-item-description.tsx
  9. +1 −1 apps/compositions/src/examples/select-with-option-group.tsx
  10. +38 −0 apps/www/app/(llms)/llms-component/[component]/route.ts
  11. +32 −0 apps/www/app/(llms)/llms-component/route.ts
  12. +26 −0 apps/www/app/(llms)/llms-components.txt/route.ts
  13. +22 −0 apps/www/app/(llms)/llms-full.txt/route.ts
  14. +23 −0 apps/www/app/(llms)/llms-styling.txt/route.ts
  15. +22 −0 apps/www/app/(llms)/llms-theming.txt/route.ts
  16. +25 −0 apps/www/app/(llms)/llms-v3-migration.txt/route.ts
  17. +61 −0 apps/www/app/(llms)/llms.txt/route.ts
  18. +98 −0 apps/www/app/(llms)/shared.ts
  19. +22 −19 apps/www/app/blog/[slug]/page.tsx
  20. +2 −2 apps/www/app/guides/page.tsx
  21. +8 −1 apps/www/app/guides/search-input.tsx
  22. +2 −1 apps/www/app/layout.tsx
  23. +5 −7 apps/www/app/og/route.tsx
  24. +3 −3 apps/www/components/blog-card.tsx
  25. +3 −51 apps/www/components/mdx/prop-table.tsx
  26. +2 −2 apps/www/components/site/hero.section.tsx
  27. +1 −1 apps/www/content/blog/01-chakra-v2-vs-v3-a-detailed-comparison.mdx
  28. +1 −1 apps/www/content/blog/03-building-consistent-uis-with-design-tokens.mdx
  29. +1 −1 apps/www/content/blog/04-chakra-ui-london-meetup-2024.mdx
  30. +9 −1 apps/www/content/blog/05-refactoring-snippets.mdx
  31. +85 −0 apps/www/content/blog/06-making-docs-ai-friendly.mdx
  32. +1 −1 apps/www/content/docs/components/action-bar.mdx
  33. +50 −0 apps/www/content/docs/get-started/llms.mdx
  34. +9 −6 apps/www/content/docs/get-started/migration.mdx
  35. +12 −12 apps/www/content/docs/styling/chakra-factory.mdx
  36. +0 −1 apps/www/content/docs/theming/customization/overview.mdx
  37. +19 −0 apps/www/content/docs/theming/shadows.mdx
  38. +1 −0 apps/www/docs.config.ts
  39. +7 −2 apps/www/lib/blog.ts
  40. +10 −7 apps/www/package.json
  41. BIN apps/www/public/authors/eelco-headshot.png
  42. BIN apps/www/public/authors/segun-headshot.png
  43. +2 −4 apps/www/public/compositions/alert.json
  44. +1 −1 apps/www/public/compositions/avatar.json
  45. +1 −1 apps/www/public/compositions/close-button.json
  46. +1 −1 apps/www/public/compositions/color-mode.json
  47. +13 −0 apps/www/public/compositions/color-picker.json
  48. +13 −0 apps/www/public/compositions/file-upload.json
  49. +23 −17 apps/www/public/compositions/index.json
  50. +1 −1 apps/www/public/compositions/input-group.json
  51. +1 −1 apps/www/public/compositions/menu.json
  52. +1 −1 apps/www/public/compositions/pagination.json
  53. +2 −4 apps/www/public/compositions/password-input.json
  54. +11 −0 apps/www/public/compositions/qr-code.json
  55. +1 −1 apps/www/public/compositions/slider.json
  56. +1 −1 apps/www/public/compositions/tooltip.json
  57. BIN apps/www/public/videos/llms-txt-demo.mp4
  58. +1 −1 apps/www/scripts/examples.ts
  59. +3 −3 apps/www/scripts/types/component.ts
  60. +3 −3 apps/www/scripts/types/recipe.ts
  61. 0 apps/www/{scripts → utils}/extract-types.ts
  62. 0 apps/www/{scripts → utils}/get-component-list.ts
  63. +79 −0 apps/www/utils/get-component-props.ts
  64. 0 apps/www/{scripts → utils}/get-recipe-types.ts
  65. +289 −0 apps/www/utils/get-theming-doc.ts
  66. 0 apps/www/{scripts → utils}/project-sdk.ts
  67. 0 apps/www/{scripts → utils}/shared.ts
  68. +68 −0 apps/www/velite.config.ts
  69. +14 −22 package.json
  70. +2 −0 packages/cli/CHANGELOG.md
  71. +2 −2 packages/cli/package.json
  72. +2 −0 packages/panda-preset/CHANGELOG.md
  73. +1 −1 packages/panda-preset/package.json
  74. +12 −0 packages/react/CHANGELOG.md
  75. +4 −4 packages/react/package.json
  76. +1,816 −2,221 pnpm-lock.yaml
  77. +3 −3 sandbox/iframe/package.json
  78. +3 −3 sandbox/next-app/package.json
  79. +3 −3 sandbox/next-pages/package.json
  80. +3 −3 sandbox/panda-preset/package.json
  81. +3 −3 sandbox/remix-ts/package.json
  82. +4 −4 sandbox/shadow-dom/package.json
  83. +13 −13 sandbox/storybook-ts/package.json
  84. +3 −3 sandbox/vite-jsx/package.json
  85. +3 −3 sandbox/vite-ts/package.json
9 changes: 9 additions & 0 deletions .changelog/v3.mdx
Original file line number Diff line number Diff line change
@@ -5,6 +5,15 @@ description:
features, bug fixes, and improvements.
---

## [3.14.0](./#3.14.0) - 2025-03-14

### Changed

- **General**: Improve render performance by upgrading to the latest Ark UI v5.
This brings a **1.5x - 4x** improvements across components. Learn more from
the
[Ark UI v5 changelog](https://ark-ui.com/react/docs/overview/changelog#500---2025-03-06).

## [3.13.0](./#3.13.0) - 2025-03-13

### Added
14 changes: 7 additions & 7 deletions apps/compositions/package.json
Original file line number Diff line number Diff line change
@@ -19,17 +19,17 @@
"@chakra-ui/react": "workspace:*",
"@hookform/resolvers": "3.10.0",
"@tanstack/react-table": "8.21.2",
"@tanstack/react-virtual": "3.13.2",
"@tanstack/react-virtual": "3.13.4",
"es-toolkit": "1.33.0",
"react-spinners": "0.15.0",
"next-themes": "0.4.5",
"next-themes": "0.4.6",
"recharts": "2.13.3",
"react": "^18",
"react-dom": "^18",
"react-use": "17.5.1",
"react": "^19",
"react-dom": "^19",
"react-use": "17.6.0",
"react-frame-component": "5.2.7",
"react-hook-form": "7.53.2",
"react-markdown": "9.0.3",
"react-hook-form": "7.54.2",
"react-markdown": "10.1.0",
"react-icons": "5.5.0",
"react-lorem-ipsum": "1.4.10",
"use-mask-input": "3.4.2",
2 changes: 1 addition & 1 deletion apps/compositions/src/examples/radio-controlled.tsx
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import { HStack, RadioGroup } from "@chakra-ui/react"
import { useState } from "react"

export const RadioControlled = () => {
const [value, setValue] = useState("1")
const [value, setValue] = useState<string | null>(null)
return (
<RadioGroup.Root value={value} onValueChange={(e) => setValue(e.value)}>
<HStack gap="6">
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import { SegmentGroup } from "@chakra-ui/react"
import { useState } from "react"

export const SegmentedControlControlled = () => {
const [value, setValue] = useState("React")
const [value, setValue] = useState<string | null>("React")
return (
<SegmentGroup.Root value={value} onValueChange={(e) => setValue(e.value)}>
<SegmentGroup.Indicator />
3 changes: 3 additions & 0 deletions apps/compositions/src/examples/segmented-control-in-card.tsx
Original file line number Diff line number Diff line change
@@ -11,18 +11,21 @@ export const SegmentedControlInCard = () => {
<Field.Root>
<Field.Label>Bedrooms</Field.Label>
<SegmentGroup.Root defaultValue="Any">
<SegmentGroup.Indicator />
<SegmentGroup.Items items={["Any", "1", "2", "3", "3+"]} />
</SegmentGroup.Root>
</Field.Root>
<Field.Root>
<Field.Label>Beds</Field.Label>
<SegmentGroup.Root defaultValue="1">
<SegmentGroup.Indicator />
<SegmentGroup.Items items={["Any", "1", "2", "2+"]} />
</SegmentGroup.Root>
</Field.Root>
<Field.Root>
<Field.Label>Bathrooms</Field.Label>
<SegmentGroup.Root defaultValue="3">
<SegmentGroup.Indicator />
<SegmentGroup.Items items={["Any", "1", "2", "3"]} />
</SegmentGroup.Root>
</Field.Root>
6 changes: 3 additions & 3 deletions apps/compositions/src/examples/select-basic.tsx
Original file line number Diff line number Diff line change
@@ -18,9 +18,9 @@ export const SelectBasic = () => {
<Portal>
<Select.Positioner>
<Select.Content>
{frameworks.items.map((movie) => (
<Select.Item item={movie} key={movie.value}>
{movie.label}
{frameworks.items.map((framework) => (
<Select.Item item={framework} key={framework.value}>
{framework.label}
<Select.ItemIndicator />
</Select.Item>
))}
8 changes: 4 additions & 4 deletions apps/compositions/src/examples/select-with-icon-button.tsx
Original file line number Diff line number Diff line change
@@ -47,11 +47,11 @@ export const SelectWithIconButton = () => {
<Portal>
<Select.Positioner>
<Select.Content minW="32">
{frameworks.items.map((movie) => (
<Select.Item item={movie} key={movie.value}>
{frameworks.items.map((framework) => (
<Select.Item item={framework} key={framework.value}>
<HStack>
{movie.icon}
{movie.label}
{framework.icon}
{framework.label}
</HStack>
<Select.ItemIndicator />
</Select.Item>
Original file line number Diff line number Diff line change
@@ -29,12 +29,12 @@ export const SelectWithItemDescription = () => {
<Portal>
<Select.Positioner>
<Select.Content>
{frameworks.items.map((movie) => (
<Select.Item item={movie} key={movie.value}>
{frameworks.items.map((framework) => (
<Select.Item item={framework} key={framework.value}>
<Stack gap="0">
<Select.ItemText>{movie.label}</Select.ItemText>
<Select.ItemText>{framework.label}</Select.ItemText>
<Span color="fg.muted" textStyle="xs">
{movie.description}
{framework.description}
</Span>
</Stack>
<Select.ItemIndicator />
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ export const SelectWithOptionGroup = () => {
<Select.Label>Select framework</Select.Label>
<Select.Control>
<Select.Trigger>
<Select.ValueText placeholder="Select movie" />
<Select.ValueText placeholder="Select framework" />
</Select.Trigger>
<Select.IndicatorGroup>
<Select.Indicator />
38 changes: 38 additions & 0 deletions apps/www/app/(llms)/llms-component/[component]/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import {
cleanupContent,
findMatchingDocs,
minifyContent,
parseComponent,
} from "../../shared"

export const dynamic = "force-static"

interface Params {
component: string
}

export async function GET(_request: Request, ctx: { params: Promise<Params> }) {
let { component: componentParam } = await ctx.params
const { minify, component } = parseComponent(componentParam)

let content = !minify
? `<SYSTEM>Documentation for the ${component} component in Chakra UI v3.</SYSTEM>\n\n`
: ""

const componentDocs = findMatchingDocs(component)

for (const doc of componentDocs) {
let llm = doc.llm
if (!llm || llm?.length === 0) continue
if (minify) llm = minifyContent(llm)
llm = cleanupContent(llm)
content += `# ${doc.title}\n\n${llm}\n\n`
}

return new Response(content, {
headers: {
"Content-Type": "text/plain; charset=utf-8",
"Cache-Control": "public, max-age=3600",
},
})
}
32 changes: 32 additions & 0 deletions apps/www/app/(llms)/llms-component/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { getBaseUrl } from "../shared"
import { default as docs } from ".velite/docs.json"

export const dynamic = "force-static"

export async function GET() {
const baseUrl = `${getBaseUrl()}/llms-component`
const components = new Set<{ id: string; path: string; fullPath: string }>()

docs
.filter(
(doc) =>
doc.slug.startsWith("docs/components/") &&
!doc.slug.includes("concepts"),
)
.forEach((doc) => {
const parts = doc.slug.split("/")
const component = parts[2]
components.add({
id: component,
path: `${baseUrl}/${component}.txt`,
fullPath: `${baseUrl}/${component}-full.txt`,
})
})

return Response.json(Array.from(components), {
headers: {
"Content-Type": "application/json",
"Cache-Control": "public, max-age=3600",
},
})
}
26 changes: 26 additions & 0 deletions apps/www/app/(llms)/llms-components.txt/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { cleanupContent } from "../shared"
import { default as docs } from ".velite/docs.json"

export const dynamic = "force-static"

export async function GET() {
let content =
"<SYSTEM>Documentation for all components in Chakra UI v3.</SYSTEM>\n\n"

const componentDocs = docs.filter((doc) =>
doc.slug.startsWith("docs/components"),
)

for (const doc of componentDocs) {
if (!doc.llm || doc.llm?.length === 0) continue
const llm = cleanupContent(doc.llm)
content += `# ${doc.title}\n\n${llm}\n\n`
}

return new Response(content, {
headers: {
"Content-Type": "text/plain; charset=utf-8",
"Cache-Control": "public, max-age=3600",
},
})
}
22 changes: 22 additions & 0 deletions apps/www/app/(llms)/llms-full.txt/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { cleanupContent } from "../shared"
import { default as docs } from ".velite/docs.json"

export const dynamic = "force-static"

export async function GET() {
let content =
"<SYSTEM>This is the full developer documentation for Chakra UI v3.</SYSTEM>\n\n"

for (const doc of docs) {
if (!doc.llm || doc.llm?.length === 0) continue
const llm = cleanupContent(doc.llm)
content += `# ${doc.title}\n\n${llm}\n\n`
}

return new Response(content, {
headers: {
"Content-Type": "text/plain; charset=utf-8",
"Cache-Control": "public, max-age=3600",
},
})
}
23 changes: 23 additions & 0 deletions apps/www/app/(llms)/llms-styling.txt/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { default as docs } from ".velite/docs.json"

export const dynamic = "force-static"

export async function GET() {
let content =
"<SYSTEM>Documentation for the styling system in Chakra UI v3.</SYSTEM>\n\n"

const stylingDocs = docs.filter((doc) => doc.slug.startsWith("docs/styling"))

for (const doc of stylingDocs) {
if (!doc.llm || doc.llm?.length === 0) continue

content += `# ${doc.title}\n\n${doc.llm}\n\n`
}

return new Response(content, {
headers: {
"Content-Type": "text/plain; charset=utf-8",
"Cache-Control": "public, max-age=3600",
},
})
}
22 changes: 22 additions & 0 deletions apps/www/app/(llms)/llms-theming.txt/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { default as docs } from ".velite/docs.json"

export const dynamic = "force-static"

export async function GET() {
let content = "<SYSTEM>Documentation for theming Chakra UI v3.</SYSTEM>\n\n"

const themingDocs = docs.filter((doc) => doc.slug.startsWith("docs/theming"))

for (const doc of themingDocs) {
if (!doc.llm || doc.llm?.length === 0) continue

content += `# ${doc.title}\n\n${doc.llm}\n\n`
}

return new Response(content, {
headers: {
"Content-Type": "text/plain; charset=utf-8",
"Cache-Control": "public, max-age=3600",
},
})
}
25 changes: 25 additions & 0 deletions apps/www/app/(llms)/llms-v3-migration.txt/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { default as docs } from ".velite/docs.json"

export const dynamic = "force-static"

export async function GET() {
let content =
"<SYSTEM>Documentation for migrating to Chakra UI v3.</SYSTEM>\n\n"

const stylingDocs = docs.filter((doc) =>
doc.slug.startsWith("docs/get-started/migration"),
)

for (const doc of stylingDocs) {
if (!doc.llm || doc.llm?.length === 0) continue

content += `# ${doc.title}\n\n${doc.llm}\n\n`
}

return new Response(content, {
headers: {
"Content-Type": "text/plain; charset=utf-8",
"Cache-Control": "public, max-age=3600",
},
})
}
61 changes: 61 additions & 0 deletions apps/www/app/(llms)/llms.txt/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import { getBaseUrl } from "../shared"

export const dynamic = "force-static"

export const GET = async () => {
const baseUrl = getBaseUrl()

const documentSets = [
{
title: "Complete documentation",
href: `${baseUrl}/llms-full.txt`,
description:
"The complete Chakra UI v3 documentation including all components, styling and theming",
},
{
title: "Components",
href: `${baseUrl}/llms-components.txt`,
description: "Documentation for all components in Chakra UI v3.",
},
{
title: "Styling",
href: `${baseUrl}/llms-styling.txt`,
description: "Documentation for the styling system in Chakra UI v3.",
},
{
title: "Theming",
href: `${baseUrl}/llms-theming.txt`,
description: "Documentation for theming Chakra UI v3.",
},
{
title: "Migrating to v3",
href: `${baseUrl}/llms-v3-migration.txt`,
description: "Documentation for migrating to Chakra UI v3.",
},
]

const content = TEMPLATE.replace(
"%DOCUMENT_SETS%",
documentSets
.map((set) => `- [${set.title}](${set.href}): ${set.description}`)
.join("\n"),
)

return new Response(content)
}

const TEMPLATE = `
# Chakra UI v3 Documentation for LLMs
> Chakra UI is an accessible component system for building products with speed
## Documentation Sets
%DOCUMENT_SETS%
## Notes
- The complete documentation includes all content from the official documentation
- Package-specific documentation files contain only the content relevant to that package
- The content is automatically generated from the same source as the official documentation
`
Loading