diff --git a/.changeset/add-isnullable-multiselect.md b/.changeset/add-isnullable-multiselect.md deleted file mode 100644 index edf3088e6da..00000000000 --- a/.changeset/add-isnullable-multiselect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@keystone-6/core': minor ---- - -Add `db.isNullable` support for multiselect field type, defaults to false diff --git a/.changeset/add-relationship-search.md b/.changeset/add-relationship-search.md new file mode 100644 index 00000000000..7d037994509 --- /dev/null +++ b/.changeset/add-relationship-search.md @@ -0,0 +1,5 @@ +--- +"@keystone-6/core": minor +--- + +Add support for searching relationship fields in the list view diff --git a/.changeset/config.json b/.changeset/config.json index a96ace8c24c..24654475a0b 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -5,6 +5,9 @@ "baseBranch": "main", "linked": [], "access": "public", + "privatePackages": { + "version": false + }, "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { "onlyUpdatePeerDependentsWhenOutOfRange": true } diff --git a/.changeset/contributors.json b/.changeset/contributors.json index 895f18cd532..06c011b28fd 100644 --- a/.changeset/contributors.json +++ b/.changeset/contributors.json @@ -4,6 +4,7 @@ "AliceRossa", "CarlQLange", "ChrisLaneAU", + "DavidMulder0", "DiesIrae", "DustinWoods", "Greenheart", @@ -30,6 +31,7 @@ "allcontributors[bot]", "austin047", "bartduisters", + "benderham", "bketelsen", "bladey", "borisno2", @@ -38,6 +40,7 @@ "dcousens", "dependabot", "dependabot[bot]", + "direisc", "dominikwilkowski", "duidae", "emmatown", @@ -60,6 +63,7 @@ "jossmac", "kennedybaird", "keystonejs-release-bot", + "kidneyweakx", "kporten", "lahirurane-rau", "leopoldkristjansson", diff --git a/.changeset/fix-bigint-validation.md b/.changeset/fix-bigint-validation.md deleted file mode 100644 index 2c49d9e94d8..00000000000 --- a/.changeset/fix-bigint-validation.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@keystone-6/core': patch ---- - -Fix bigInt field type to throw if `defaultValue: { kind: 'autoincrement' }` and `validation.isRequired` is set diff --git a/.changeset/fix-hide-ui.md b/.changeset/fix-hide-ui.md deleted file mode 100644 index a0fa2c69c6f..00000000000 --- a/.changeset/fix-hide-ui.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@keystone-6/core': patch ---- - -Fix `list.ui.hide*` defaulting to false when GraphQL is omitted diff --git a/.changeset/fix-keystone-prisma.md b/.changeset/fix-keystone-prisma.md deleted file mode 100644 index 4b71b10fec5..00000000000 --- a/.changeset/fix-keystone-prisma.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@keystone-6/core': patch ---- - -Fix `keystone prisma ...` not returning the same error code as the Prisma engine diff --git a/.changeset/fix-search.md b/.changeset/fix-search.md new file mode 100644 index 00000000000..dfdfd535551 --- /dev/null +++ b/.changeset/fix-search.md @@ -0,0 +1,5 @@ +--- +"@keystone-6/core": patch +--- + +Fix list view ignoring `.ui.listView.searchFields` diff --git a/.changeset/fix-uuid-rel.md b/.changeset/fix-uuid-rel.md deleted file mode 100644 index dc50719a017..00000000000 --- a/.changeset/fix-uuid-rel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@keystone-6/core': patch ---- - -Fix malformed uuid's from breaking relationship filters when using POSTGRESQL diff --git a/.changeset/light-lamps-eat.md b/.changeset/light-lamps-eat.md deleted file mode 100644 index 208bfb90424..00000000000 --- a/.changeset/light-lamps-eat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@keystone-6/core': minor ---- - -Add exports for internal AdminUI pagination components `Pagination`, `PaginationLabel` and `usePaginationParams` for use in custom pages diff --git a/.changeset/split-document-field.md b/.changeset/split-document-field.md deleted file mode 100644 index 19265a633ed..00000000000 --- a/.changeset/split-document-field.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@keystone-6/fields-document': minor ---- - -Fix `@keystone-6/fields-document` package breaking when compiling in SSR environments (#8717) diff --git a/.changeset/update-field-hooks.md b/.changeset/update-field-hooks.md deleted file mode 100644 index b0ea3bd7d5f..00000000000 --- a/.changeset/update-field-hooks.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@keystone-6/core": patch ---- - -Update built-in fields to use newer validate hook syntax diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index aab37766eae..2b501e76da4 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -1,5 +1,5 @@ { "packages": ["packages/*", "design-system/packages/*"], "sandboxes": ["/tests/sandbox"], - "node": "20" + "node": "22" } diff --git a/.github/actions/ci-setup-examples/action.yml b/.github/actions/ci-setup-examples/action.yml index 3bb0f9953af..27cf91d97ad 100644 --- a/.github/actions/ci-setup-examples/action.yml +++ b/.github/actions/ci-setup-examples/action.yml @@ -8,7 +8,7 @@ runs: - uses: actions/setup-node@main with: # preferably lts/*, but we hit API limits when querying that - node-version: 20 + node-version: 22 registry-url: 'https://registry.npmjs.org' cache: pnpm diff --git a/.github/actions/ci-setup/action.yml b/.github/actions/ci-setup/action.yml index 27babea7f8c..c642554b8fe 100644 --- a/.github/actions/ci-setup/action.yml +++ b/.github/actions/ci-setup/action.yml @@ -8,7 +8,7 @@ runs: - uses: actions/setup-node@main with: # preferably lts/*, but we hit API limits when querying that - node-version: 20 + node-version: 22 registry-url: 'https://registry.npmjs.org' cache: pnpm diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9ebb22e21df..e927c2dff09 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,6 +7,7 @@ jobs: publish: name: Publish runs-on: ubuntu-latest + timeout-minutes: 10 environment: Release steps: - uses: actions/checkout@main diff --git a/.github/workflows/publish_snapshot.yml b/.github/workflows/publish_snapshot.yml index cfbe618997c..5f392e45da2 100644 --- a/.github/workflows/publish_snapshot.yml +++ b/.github/workflows/publish_snapshot.yml @@ -11,6 +11,7 @@ jobs: publish_snapshot: name: Publish (Snapshot) runs-on: ubuntu-latest + timeout-minutes: 10 environment: Release steps: - uses: actions/checkout@main diff --git a/.github/workflows/tests_ci.yml b/.github/workflows/tests_ci.yml index 9a3d129ab0a..bcdaf875c8c 100644 --- a/.github/workflows/tests_ci.yml +++ b/.github/workflows/tests_ci.yml @@ -18,6 +18,7 @@ jobs: linting: name: Linting runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: actions/checkout@main - uses: ./.github/actions/ci-setup @@ -31,9 +32,21 @@ jobs: - name: Prisma Filters run: pnpm test:filters + linting-examples: + name: Linting + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@main + - uses: ./.github/actions/ci-setup-examples + + - name: TypeScript + run: pnpm test:types + unit_tests: name: Package Unit Tests runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: actions/checkout@main - uses: ./.github/actions/ci-setup @@ -44,9 +57,10 @@ jobs: graphql_api_tests_postgresql: name: API Tests PostgreSQL runs-on: ubuntu-latest + timeout-minutes: 10 services: postgres: - image: postgres:16 + image: postgres:17 env: POSTGRES_USER: testuser POSTGRES_PASSWORD: testpass @@ -69,6 +83,7 @@ jobs: graphql_api_tests_sqlite: name: API Tests SQLite runs-on: ubuntu-latest + timeout-minutes: 10 strategy: fail-fast: false matrix: @@ -85,9 +100,10 @@ jobs: graphql_api_tests_mysql: name: API Tests MySQL runs-on: ubuntu-latest + timeout-minutes: 10 services: mysql: - image: mariadb:11.4 + image: mariadb:11.6 env: MYSQL_ROOT_PASSWORD: testpass ports: @@ -108,9 +124,10 @@ jobs: field_crud_tests_postgresql: name: Field CRUD Tests PostgreSQL runs-on: ubuntu-latest + timeout-minutes: 10 services: postgres: - image: postgres:16 + image: postgres:17 env: POSTGRES_USER: testuser POSTGRES_PASSWORD: testpass @@ -139,6 +156,7 @@ jobs: field_crud_tests_sqlite: name: Field CRUD Tests SQLite runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: actions/checkout@main - uses: ./.github/actions/ci-setup @@ -161,9 +179,10 @@ jobs: field_crud_tests_mysql: name: Field CRUD Tests MySQL runs-on: ubuntu-latest + timeout-minutes: 10 services: mysql: - image: mariadb:11.4 + image: mariadb:11.6 env: MYSQL_ROOT_PASSWORD: testpass ports: @@ -190,6 +209,7 @@ jobs: examples_tests: name: Testing example project runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: actions/checkout@main - uses: ./.github/actions/ci-setup-examples @@ -200,6 +220,7 @@ jobs: examples_next_app_build: name: Ensure Next in App directory builds runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: actions/checkout@main - uses: ./.github/actions/ci-setup-examples @@ -210,6 +231,7 @@ jobs: examples_smoke_tests: name: Smoke Tests For Examples runs-on: ubuntu-latest + timeout-minutes: 10 env: DATABASE_URL: file:./test.db strategy: @@ -251,6 +273,7 @@ jobs: admin_ui_integration_tests: name: Integration tests for Admin UI runs-on: ubuntu-latest + timeout-minutes: 10 env: DATABASE_URL: file:./test.db strategy: diff --git a/.github/workflows/tests_ci_windows.yml b/.github/workflows/tests_ci_windows.yml index e5375a1bb60..656c9c42ab6 100644 --- a/.github/workflows/tests_ci_windows.yml +++ b/.github/workflows/tests_ci_windows.yml @@ -11,6 +11,7 @@ jobs: unit_tests: name: Package Unit Tests runs-on: windows-latest + timeout-minutes: 10 steps: - uses: actions/checkout@main - uses: ./.github/actions/ci-setup diff --git a/.github/workflows/website_preview.yml b/.github/workflows/website_preview.yml index 09207067651..edcd99d50f2 100644 --- a/.github/workflows/website_preview.yml +++ b/.github/workflows/website_preview.yml @@ -12,6 +12,7 @@ jobs: VERCEL_ORG_ID: ${{ secrets.VERCEL_TEAM_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: actions/checkout@main - uses: ./.github/actions/ci-setup diff --git a/.github/workflows/website_production.yml b/.github/workflows/website_production.yml index 3c78c6a4e6a..c6e0b1b6c1e 100644 --- a/.github/workflows/website_production.yml +++ b/.github/workflows/website_production.yml @@ -15,6 +15,7 @@ jobs: VERCEL_ORG_ID: ${{ secrets.VERCEL_TEAM_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: actions/checkout@main - uses: ./.github/actions/ci-setup diff --git a/.gitignore b/.gitignore index 9a1df743cce..f5cea221f7b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ dist/ node_modules/ *.db +.env # ts-gql __generated__ @@ -10,3 +11,5 @@ __generated__ # system .DS_Store *.vscode + +.pnpm-store diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000000..6c2b9be4c4f --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +link-workspace-packages=true +prefer-workspace-packages=true diff --git a/LICENSE b/LICENSE index 2762e648976..8f0e5cd3917 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 Thinkmill Labs Pty Ltd +Copyright (c) 2024 Thinkmill Labs Pty Ltd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 8e401a59fdd..54b63a1a1e9 100644 --- a/README.md +++ b/README.md @@ -87,4 +87,4 @@ For vulnerability reporting, please refer to our [security policy](/SECURITY.md) Thinkmill -Copyright (c) 2023 [Thinkmill Labs](https://www.thinkmill.com.au/labs?utm_campaign=keystone-github) Pty Ltd. Licensed under the MIT License. +Copyright (c) 2024 [Thinkmill Labs](https://www.thinkmill.com.au/labs?utm_campaign=keystone-github) Pty Ltd. Licensed under the MIT License. diff --git a/design-system/packages/button/package.json b/design-system/packages/button/package.json index 4566143100b..2522f425f13 100644 --- a/design-system/packages/button/package.json +++ b/design-system/packages/button/package.json @@ -12,14 +12,14 @@ "./package.json": "./package.json" }, "devDependencies": { - "@types/react": "catalog:" + "@types/react": "^18.3.3" }, "dependencies": { "@babel/runtime": "^7.24.7", "@keystone-ui/core": "workspace:^", "@keystone-ui/icons": "workspace:^", "@keystone-ui/loading": "workspace:^", - "react": "catalog:" + "react": "^18.3.1" }, "repository": "https://github.com/keystonejs/keystone/tree/main/design-system/packages/button" } diff --git a/design-system/packages/core/package.json b/design-system/packages/core/package.json index e4e0d5d09eb..5fb189129e1 100644 --- a/design-system/packages/core/package.json +++ b/design-system/packages/core/package.json @@ -12,13 +12,13 @@ "./package.json": "./package.json" }, "devDependencies": { - "@types/react": "catalog:", - "react": "catalog:", - "react-dom": "catalog:" + "@types/react": "^18.3.3", + "react": "^18.3.1", + "react-dom": "^18.3.1" }, "peerDependencies": { - "react": "catalog:", - "react-dom": "catalog:" + "react": "^18.3.1", + "react-dom": "^18.3.1" }, "dependencies": { "@babel/runtime": "^7.24.7", diff --git a/design-system/packages/core/src/components/Box.tsx b/design-system/packages/core/src/components/Box.tsx index 68abdc3c192..998cc699523 100644 --- a/design-system/packages/core/src/components/Box.tsx +++ b/design-system/packages/core/src/components/Box.tsx @@ -181,10 +181,10 @@ function useRadii ( { rounding, roundingTop, roundingRight, roundingBottom, roundingLeft }: RadiiProps, { radii }: Theme ) { - let borderBottomLeftRadius = roundingBottom || roundingLeft || rounding - let borderBottomRightRadius = roundingBottom || roundingRight || rounding - let borderTopLeftRadius = roundingTop || roundingLeft || rounding - let borderTopRightRadius = roundingTop || roundingRight || rounding + const borderBottomLeftRadius = roundingBottom || roundingLeft || rounding + const borderBottomRightRadius = roundingBottom || roundingRight || rounding + const borderTopLeftRadius = roundingTop || roundingLeft || rounding + const borderTopRightRadius = roundingTop || roundingRight || rounding return { borderBottomLeftRadius: @@ -208,10 +208,10 @@ function usePadding ( }: PaddingProps, { spacing }: Theme ) { - let pb = paddingBottom || paddingY || padding - let pt = paddingTop || paddingY || padding - let pl = paddingLeft || paddingX || padding - let pr = paddingRight || paddingX || padding + const pb = paddingBottom || paddingY || padding + const pt = paddingTop || paddingY || padding + const pl = paddingLeft || paddingX || padding + const pr = paddingRight || paddingX || padding return { paddingBottom: pb && mapResponsiveProp(pb, spacing), @@ -225,10 +225,10 @@ function useMargin ( { margin, marginTop, marginRight, marginBottom, marginLeft, marginY, marginX }: MarginProps, { spacing }: Theme ) { - let mb = marginBottom || marginY || margin - let mt = marginTop || marginY || margin - let ml = marginLeft || marginX || margin - let mr = marginRight || marginX || margin + const mb = marginBottom || marginY || margin + const mt = marginTop || marginY || margin + const ml = marginLeft || marginX || margin + const mr = marginRight || marginX || margin return { marginBottom: mb && mapResponsiveProp(mb, spacing), diff --git a/design-system/packages/core/src/components/Link.tsx b/design-system/packages/core/src/components/Link.tsx index df3321ffb89..d23cc6b032c 100644 --- a/design-system/packages/core/src/components/Link.tsx +++ b/design-system/packages/core/src/components/Link.tsx @@ -5,7 +5,7 @@ import { jsx } from '../emotion' import { useTheme } from '../theme' import { forwardRefWithAs } from '../utils' -export const Link = forwardRefWithAs<'a', {}>(({ as: Tag = 'a', ...props }, ref) => { +export const Link = forwardRefWithAs<'a', unknown>(({ as: Tag = 'a', ...props }, ref) => { const { typography, colors } = useTheme() const styles = { diff --git a/design-system/packages/fields/package.json b/design-system/packages/fields/package.json index 5fe7a755d5f..625081f0026 100644 --- a/design-system/packages/fields/package.json +++ b/design-system/packages/fields/package.json @@ -12,17 +12,17 @@ "./package.json": "./package.json" }, "devDependencies": { - "@types/react": "catalog:" + "@types/react": "^18.3.3" }, "dependencies": { "@babel/runtime": "^7.24.7", "@keystone-ui/core": "workspace:^", "@keystone-ui/icons": "workspace:^", "@keystone-ui/popover": "workspace:^", - "date-fns": "^3.0.0", - "react": "catalog:", - "react-day-picker": "^8.0.4", - "react-dom": "catalog:", + "date-fns": "^4.0.0", + "react": "^18.3.1", + "react-day-picker": "^9.0.0", + "react-dom": "^18.3.1", "react-focus-lock": "^2.7.1", "react-select": "^5.2.1" }, diff --git a/design-system/packages/fields/src/FieldContainer.tsx b/design-system/packages/fields/src/FieldContainer.tsx index a14e34b4061..6bef2fcf039 100644 --- a/design-system/packages/fields/src/FieldContainer.tsx +++ b/design-system/packages/fields/src/FieldContainer.tsx @@ -2,6 +2,6 @@ /** @jsx jsx */ import { jsx, forwardRefWithAs } from '@keystone-ui/core' -export const FieldContainer = forwardRefWithAs<'div', {}>(({ as: Tag = 'div', ...props }, ref) => { +export const FieldContainer = forwardRefWithAs<'div', unknown>(({ as: Tag = 'div', ...props }, ref) => { return }) diff --git a/design-system/packages/fields/src/Select.tsx b/design-system/packages/fields/src/Select.tsx index c643bfd7583..406ba3038bf 100644 --- a/design-system/packages/fields/src/Select.tsx +++ b/design-system/packages/fields/src/Select.tsx @@ -167,6 +167,7 @@ export function MultiSelect ({ inputId={id} styles={composedStyles} value={value} + filterOption={null} onChange={value => { if (!value) { onChange([]) diff --git a/design-system/packages/fields/src/Switch.tsx b/design-system/packages/fields/src/Switch.tsx index 290c331c8d9..ec790764768 100644 --- a/design-system/packages/fields/src/Switch.tsx +++ b/design-system/packages/fields/src/Switch.tsx @@ -47,7 +47,7 @@ type SwitchControlProps = { export const SwitchControl = forwardRef( ({ a11yLabels = { on: 'On', off: 'Off' }, checked = false, onChange, ...props }, ref) => { - let onClick = () => { + const onClick = () => { if (onChange) { onChange(!checked) } @@ -64,10 +64,10 @@ export const SwitchControl = forwardRef( const Button = forwardRef((props, ref) => { const { animation, fields, sizing } = useTheme() - let gutter = 3 - let trackHeight = sizing.xsmall + gutter - let trackWidth = trackHeight * 2 - 2 * gutter - let handleSize = trackHeight - gutter * 2 + const gutter = 3 + const trackHeight = sizing.xsmall + gutter + const trackWidth = trackHeight * 2 - 2 * gutter + const handleSize = trackHeight - gutter * 2 return ( + + + {featuredDocs} + {featuredExamples} + + + ) +} diff --git a/docs/app/(site)/docs/page.tsx b/docs/app/(site)/docs/page.tsx new file mode 100644 index 00000000000..a81481a282a --- /dev/null +++ b/docs/app/(site)/docs/page.tsx @@ -0,0 +1,21 @@ +import PageClient from './page-client' +import { FeaturedExamples } from '../../../components/docs/featured-examples' +import { FeaturedDocs } from '../../../components/docs/featured-docs' + +import { DocsLayout } from '../../../components/docs/DocsLayout' + +export const metadata = { + title: 'Keystone Docs Home', + description: 'Developer docs for KeystoneJS: The superpowered headless CMS for developers.', +} + +export default function Docs () { + return ( + + } + featuredDocs={} + /> + + ) +} diff --git a/docs/app/(site)/docs/walkthroughs/page-client.tsx b/docs/app/(site)/docs/walkthroughs/page-client.tsx new file mode 100644 index 00000000000..170af891063 --- /dev/null +++ b/docs/app/(site)/docs/walkthroughs/page-client.tsx @@ -0,0 +1,67 @@ +/** @jsxImportSource @emotion/react */ + +'use client' + +import { Type } from '../../../../components/primitives/Type' +import { type FeaturedDocsMap } from '../../../../keystatic/get-featured-docs-map' +import { + FeaturedCard, + FullWidthCardContainer, + SplitCardContainer, +} from '../../../../components/docs/FeaturedCard' + +export default function Docs ({ + quickstart, + walkthroughs, +}: { + quickstart: NonNullable[number]['items'][number] + walkthroughs: NonNullable[number]['items'] +}) { + return ( + <> + + Walkthroughs + + + + Step-by-step tutorials for building with Keystone. + + + + Getting started + + + + If you’re new to Keystone begin here. These walkthroughs introduce the system, key concepts, + and show you how to get up and running with schema-driven development the Keystone way. + + + + + + + + Learn Keystone + + + + Learn how to build a functioning blog backend with relationships, auth, and session data + from an empty folder, and gain insights into Keystone’s core concepts along the way. + + + + {walkthroughs.map((item) => ( + + ))} + + + ) +} diff --git a/docs/app/(site)/docs/walkthroughs/page.tsx b/docs/app/(site)/docs/walkthroughs/page.tsx new file mode 100644 index 00000000000..081484041e1 --- /dev/null +++ b/docs/app/(site)/docs/walkthroughs/page.tsx @@ -0,0 +1,26 @@ +import { DocsLayout } from '../../../../components/docs/DocsLayout' +import { getFeaturedDocsMap } from '../../../../keystatic/get-featured-docs-map' +import { reader } from '../../../../keystatic/reader' +import PageClient from './page-client' + +export const metadata = { + title: 'Walkthroughs', + description: + 'Explore tutorials with step-by-step instruction on building solutions with Keystone.', +} + +export default async function Docs () { + const docs = await getFeaturedDocsMap() + if (!docs) throw new Error('No `featuredDocs` found') + const featuredDocs = docs[0] + const [quickstart, ...walkthroughs] = featuredDocs.items + + return ( + + + + ) +} diff --git a/docs/pages/ds.tsx b/docs/app/(site)/ds/page-client.tsx similarity index 94% rename from docs/pages/ds.tsx rename to docs/app/(site)/ds/page-client.tsx index e631e7c4e7e..41ddd4e74a6 100644 --- a/docs/pages/ds.tsx +++ b/docs/app/(site)/ds/page-client.tsx @@ -1,24 +1,25 @@ -/** @jsxRuntime classic */ -/** @jsx jsx */ +/** @jsxImportSource @emotion/react */ + +'use client' + import { Fragment, useState } from 'react' -import { jsx } from '@emotion/react' -import { CodeWindow, WindowWrapper, WindowL, WindowR } from '../components/content/CodeWindow' -import { GitHubButton } from '../components/primitives/GitHubButton' -import { COLORS, TYPESCALE, TYPE, SPACE } from '../lib/TOKENS' -import { Highlight } from '../components/primitives/Highlight' -import { styleMap, Type } from '../components/primitives/Type' -import { InlineCode } from '../components/primitives/Code' -import { Status } from '../components/primitives/Status' -import { Button } from '../components/primitives/Button' -import { Alert } from '../components/primitives/Alert' -import { Badge } from '../components/primitives/Badge' -import { Emoji } from '../components/primitives/Emoji' -import { Stack } from '../components/primitives/Stack' -import { Field } from '../components/primitives/Field' -import { Well } from '../components/primitives/Well' -import * as allIcons from '../components/icons' -import { Page } from '../components/Page' +import { CodeWindow, WindowWrapper, WindowL, WindowR } from '../../../components/content/CodeWindow' +import { GitHubButton } from '../../../components/primitives/GitHubButton' +import { COLORS, TYPESCALE, TYPE, SPACE } from '../../../lib/TOKENS' +import { Highlight } from '../../../components/primitives/Highlight' +import { styleMap, Type } from '../../../components/primitives/Type' +import { InlineCode } from '../../../components/primitives/Code' +import { Status } from '../../../components/primitives/Status' +import { Button } from '../../../components/primitives/Button' +import { Alert } from '../../../components/primitives/Alert' +import { Badge } from '../../../components/primitives/Badge' +import { Emoji } from '../../../components/primitives/Emoji' +import { Stack } from '../../../components/primitives/Stack' +import { Field } from '../../../components/primitives/Field' +import { Well } from '../../../components/primitives/Well' +import * as allIcons from '../../../components/icons' +import { Page } from '../../../components/Page' const EXCEPT_ICONS = ['FrontEndLogos', 'ClientLogos'] @@ -96,10 +97,7 @@ export default function DS () { let firstGrad: string return ( - + Design System @@ -264,7 +262,7 @@ export default function DS () { Type - {(Object.keys(styleMap) as Array).map(style => ( + {(Object.keys(styleMap) as Array).map((style) => ( Type {style} diff --git a/docs/app/(site)/ds/page.tsx b/docs/app/(site)/ds/page.tsx new file mode 100644 index 00000000000..5991a0df853 --- /dev/null +++ b/docs/app/(site)/ds/page.tsx @@ -0,0 +1,10 @@ +import PageClient from './page-client' + +export const metadata = { + title: 'Design System Components and Tokens', + description: 'Design System Components & Tokens for the KeystoneJS website', +} + +export default function DS () { + return +} diff --git a/docs/pages/enterprise.tsx b/docs/app/(site)/enterprise/page-client.tsx similarity index 76% rename from docs/pages/enterprise.tsx rename to docs/app/(site)/enterprise/page-client.tsx index 9b29ae31bb3..5e851cf3547 100644 --- a/docs/pages/enterprise.tsx +++ b/docs/app/(site)/enterprise/page-client.tsx @@ -1,24 +1,25 @@ -/** @jsxRuntime classic */ -/** @jsx jsx */ -import { jsx } from '@emotion/react' -import { useMediaQuery } from '../lib/media' -import { Highlight } from '../components/primitives/Highlight' -import { MWrapper } from '../components/content/MWrapper' -import { Quote } from '../components/content/Quote' -import { Type } from '../components/primitives/Type' -import { Pill } from '../components/content/Pill' -import { Page } from '../components/Page' -import { ContactForm } from '../components/ContactForm' -import { CustomerCard } from '../components/content/CustomerCard' -import { VocalLogo } from '../components/icons/VocalLogo' -import { PJohnsonLogo } from '../components/icons/PJohnsonLogo' -import { DFATLogo } from '../components/icons/DFATLogo' -import { EnliticLogo } from '../components/icons/EnliticLogo' -import { RugbyAuLogo } from '../components/icons/RugbyAuLogo' -import { WestpacLogo } from '../components/icons/WestpacLogo' -import { PrintBarLogo } from '../components/icons/PrintBarLogo' -import { IntroHeading, IntroLead, IntroWrapper } from '../components/content/Intro' -import { Stack } from '../components/primitives/Stack' +/** @jsxImportSource @emotion/react */ + +'use client' + +import { useMediaQuery } from '../../../lib/media' +import { Highlight } from '../../../components/primitives/Highlight' +import { MWrapper } from '../../../components/content/MWrapper' +import { Quote } from '../../../components/content/Quote' +import { Type } from '../../../components/primitives/Type' +import { Pill } from '../../../components/content/Pill' +import { Page } from '../../../components/Page' +import { ContactForm } from '../../../components/ContactForm' +import { CustomerCard } from '../../../components/content/CustomerCard' +import { VocalLogo } from '../../../components/icons/VocalLogo' +import { PJohnsonLogo } from '../../../components/icons/PJohnsonLogo' +import { DFATLogo } from '../../../components/icons/DFATLogo' +import { EnliticLogo } from '../../../components/icons/EnliticLogo' +import { RugbyAuLogo } from '../../../components/icons/RugbyAuLogo' +import { WestpacLogo } from '../../../components/icons/WestpacLogo' +import { PrintBarLogo } from '../../../components/icons/PrintBarLogo' +import { IntroHeading, IntroLead, IntroWrapper } from '../../../components/content/Intro' +import { Stack } from '../../../components/primitives/Stack' const customers = [ { @@ -64,14 +65,8 @@ const customers = [ export default function ForOrganisations () { const mq = useMediaQuery() - return ( - + Keystone for Enterprise @@ -134,15 +129,15 @@ export default function ForOrganisations () {
  • {learnMoreHref ? ( - + {copy} - - + + ) : ( copy )} diff --git a/docs/app/(site)/enterprise/page.tsx b/docs/app/(site)/enterprise/page.tsx new file mode 100644 index 00000000000..81a361d2813 --- /dev/null +++ b/docs/app/(site)/enterprise/page.tsx @@ -0,0 +1,11 @@ +import PageClient from './page-client' + +export const metadata = { + title: 'Keystone for Enterprise', + description: + 'Discover how Keystone’s Admin UI is a natural extension of how you work in code, and has the flexibility you need to enable content creatives.', +} + +export default function ForOrganisations () { + return +} diff --git a/docs/pages/for-content-management.tsx b/docs/app/(site)/for-content-management/page-client.tsx similarity index 90% rename from docs/pages/for-content-management.tsx rename to docs/app/(site)/for-content-management/page-client.tsx index a1168e6c668..ed2041f4fdb 100644 --- a/docs/pages/for-content-management.tsx +++ b/docs/app/(site)/for-content-management/page-client.tsx @@ -1,39 +1,35 @@ -/** @jsxRuntime classic */ -/** @jsx jsx */ -import { jsx } from '@emotion/react' +/** @jsxImportSource @emotion/react */ + +'use client' + import Image from 'next/image' import Link from 'next/link' -import { useMediaQuery } from '../lib/media' -import { IntroWrapper, IntroHeading, IntroLead } from '../components/content/Intro' -import { Highlight } from '../components/primitives/Highlight' -import { MWrapper } from '../components/content/MWrapper' -import { Section, SideBySideSection } from '../components/content/Section' -import { Button } from '../components/primitives/Button' -import { Quote } from '../components/content/Quote' -import { Type } from '../components/primitives/Type' -import { ArrowR } from '../components/icons/ArrowR' -import { Pill } from '../components/content/Pill' -import { Tick } from '../components/icons/Tick' -import { Page } from '../components/Page' +import { useMediaQuery } from '../../../lib/media' +import { IntroWrapper, IntroHeading, IntroLead } from '../../../components/content/Intro' +import { Highlight } from '../../../components/primitives/Highlight' +import { MWrapper } from '../../../components/content/MWrapper' +import { Section, SideBySideSection } from '../../../components/content/Section' +import { Button } from '../../../components/primitives/Button' +import { Quote } from '../../../components/content/Quote' +import { Type } from '../../../components/primitives/Type' +import { ArrowR } from '../../../components/icons/ArrowR' +import { Pill } from '../../../components/content/Pill' +import { Tick } from '../../../components/icons/Tick' +import { Page } from '../../../components/Page' -import dsGeneration from '../public/assets/ds-generation.png' -import contentManagement1 from '../public/assets/content-management-1.png' -import contentManagement2 from '../public/assets/content-management-2.png' -import contentManagement3 from '../public/assets/content-management-3.png' -import contentManagement4 from '../public/assets/content-management-4.png' -import { EndCta } from '../components/content/EndCta' +import dsGeneration from '../../../public/assets/ds-generation.png' +import contentManagement1 from '../../../public/assets/content-management-1.png' +import contentManagement2 from '../../../public/assets/content-management-2.png' +import contentManagement3 from '../../../public/assets/content-management-3.png' +import contentManagement4 from '../../../public/assets/content-management-4.png' +import { EndCta } from '../../../components/content/EndCta' export default function ForOrganisations () { const mq = useMediaQuery() return ( - + Keystone for content management diff --git a/docs/app/(site)/for-content-management/page.tsx b/docs/app/(site)/for-content-management/page.tsx new file mode 100644 index 00000000000..29999fd0b78 --- /dev/null +++ b/docs/app/(site)/for-content-management/page.tsx @@ -0,0 +1,11 @@ +import PageClient from './page-client' + +export const metadata = { + title: 'KeystoneJS for Content Management', + description: + 'Discover how Keystone’s Admin UI is a natural extension of how you work in code, and has the flexibility you need to enable content creatives.', +} + +export default function ForOrganisations () { + return +} diff --git a/docs/pages/for-developers.tsx b/docs/app/(site)/for-developers/page-client.tsx similarity index 90% rename from docs/pages/for-developers.tsx rename to docs/app/(site)/for-developers/page-client.tsx index 8e4c1724451..944e63ce025 100644 --- a/docs/pages/for-developers.tsx +++ b/docs/app/(site)/for-developers/page-client.tsx @@ -1,48 +1,44 @@ -/** @jsxRuntime classic */ -/** @jsx jsx */ -import { jsx } from '@emotion/react' +/** @jsxImportSource @emotion/react */ + +'use client' + import Image from 'next/image' import Link from 'next/link' -import { useMediaQuery } from '../lib/media' -import { IntroWrapper, IntroHeading, IntroLead } from '../components/content/Intro' -import { CommunityCta } from '../components/content/CommunityCta' -import { FrontEndLogos } from '../components/icons/FrontEndLogos' -import { Highlight } from '../components/primitives/Highlight' -import { Relational } from '../components/icons/Relational' -import { TweetBox } from '../components/content/TweetBox' -import { MWrapper } from '../components/content/MWrapper' -import { Typescript } from '../components/icons/Typescript' -import { Section, SideBySideSection } from '../components/content/Section' -import { CodeBox } from '../components/content/CodeBox' -import { Button } from '../components/primitives/Button' -import { EndCta } from '../components/content/EndCta' -import { Postgres } from '../components/icons/Postgres' -import { Emoji } from '../components/primitives/Emoji' -import { GraphQl } from '../components/icons/GraphQl' -import { Type } from '../components/primitives/Type' -import { ArrowR } from '../components/icons/ArrowR' -import { Nextjs } from '../components/icons/Nextjs' -import { Shield } from '../components/icons/Shield' -import { Prisma } from '../components/icons/Prisma' -import { Pill } from '../components/content/Pill' -import { Tick } from '../components/icons/Tick' -import { Cli } from '../components/icons/Cli' -import { Page } from '../components/Page' +import { useMediaQuery } from '../../../lib/media' +import { IntroWrapper, IntroHeading, IntroLead } from '../../../components/content/Intro' +import { CommunityCta } from '../../../components/content/CommunityCta' +import { FrontEndLogos } from '../../../components/icons/FrontEndLogos' +import { Highlight } from '../../../components/primitives/Highlight' +import { Relational } from '../../../components/icons/Relational' +import { TweetBox } from '../../../components/content/TweetBox' +import { MWrapper } from '../../../components/content/MWrapper' +import { Typescript } from '../../../components/icons/Typescript' +import { Section, SideBySideSection } from '../../../components/content/Section' +import { CodeBox } from '../../../components/content/CodeBox' +import { Button } from '../../../components/primitives/Button' +import { EndCta } from '../../../components/content/EndCta' +import { Postgres } from '../../../components/icons/Postgres' +import { Emoji } from '../../../components/primitives/Emoji' +import { GraphQl } from '../../../components/icons/GraphQl' +import { Type } from '../../../components/primitives/Type' +import { ArrowR } from '../../../components/icons/ArrowR' +import { Nextjs } from '../../../components/icons/Nextjs' +import { Shield } from '../../../components/icons/Shield' +import { Prisma } from '../../../components/icons/Prisma' +import { Pill } from '../../../components/content/Pill' +import { Tick } from '../../../components/icons/Tick' +import { Cli } from '../../../components/icons/Cli' +import { Page } from '../../../components/Page' -import editorStorytelling from '../public/assets/editor-storytelling.png' -import richTextEditor from '../public/assets/rich-text-editor.png' +import editorStorytelling from '../../../public/assets/editor-storytelling.png' +import richTextEditor from '../../../public/assets/rich-text-editor.png' export default function ForDevelopers () { const mq = useMediaQuery() return ( - + Keystone for developers @@ -65,7 +61,7 @@ export default function ForDevelopers () { marginTop: '2.5rem', })} > - +