-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request dev-next-release - 1.16.0
- Loading branch information
Showing
86 changed files
with
4,424 additions
and
629 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
|
||
## Getting Started | ||
|
||
First, run the development server: | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
# or | ||
pnpm dev | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
|
||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. | ||
|
||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. | ||
|
||
## Learn More | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
|
||
## Deploy on Vercel | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { exitPreview } from "@prismicio/next"; | ||
|
||
export async function GET(): Promise<void | Response> { | ||
return await exitPreview(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { redirectToPreviewURL } from "@prismicio/next"; | ||
import { draftMode } from "next/headers"; | ||
import { NextRequest } from "next/server"; | ||
|
||
import { createClient } from "../../../prismicio"; | ||
|
||
export async function GET(request: NextRequest): Promise<void> { | ||
const client = createClient(); | ||
|
||
draftMode().enable(); | ||
|
||
await redirectToPreviewURL({ client, request }); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { revalidateTag } from "next/cache"; | ||
import { NextResponse } from "next/server"; | ||
|
||
export async function POST(): Promise<Response> { | ||
revalidateTag("prismic"); | ||
|
||
return NextResponse.json({ revalidated: true, now: Date.now() }); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import type { Metadata } from "next"; | ||
import { Inter } from "next/font/google"; | ||
|
||
const inter = Inter({ subsets: ["latin"] }); | ||
|
||
// eslint-disable-next-line react-refresh/only-export-components | ||
export const metadata: Metadata = { | ||
title: "Create Next App", | ||
description: "Generated by create next app", | ||
}; | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}): JSX.Element { | ||
return ( | ||
<html lang="en"> | ||
<body className={inter.className}>{children}</body> | ||
</html> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default function Home(): JSX.Element { | ||
return ( | ||
<main> | ||
home | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"use client"; | ||
|
||
import { SliceZone } from "@prismicio/react"; | ||
import { SliceSimulator } from "@slicemachine/adapter-next/simulator"; | ||
|
||
import { components } from "../../slices"; | ||
|
||
export default function SliceSimulatorPage(): JSX.Element { | ||
return ( | ||
<SliceSimulator | ||
sliceZone={(props) => <SliceZone {...props} components={components} />} | ||
/> | ||
); | ||
} |
123 changes: 123 additions & 0 deletions
123
e2e-projects/next-upgrade/customtypes/kitchen_sink/index.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
{ | ||
"id": "kitchen_sink", | ||
"label": "Kitchen Sink", | ||
"repeatable": true, | ||
"json": { | ||
"Main": { | ||
"body": { | ||
"type": "Slices", | ||
"fieldset": "Slice zone", | ||
"config": { | ||
"labels": null, | ||
"choices": { | ||
"legacy_cta": { | ||
"type": "Link", | ||
"config": { | ||
"allowTargetBlank": true, | ||
"label": "CTA Link", | ||
"select": null | ||
} | ||
}, | ||
"quiet_cta": { | ||
"type": "Slice", | ||
"fieldset": "Quiet CTA", | ||
"description": "Quiet CTA", | ||
"icon": "account_balance", | ||
"display": "list", | ||
"non-repeat": { | ||
"title": { | ||
"type": "StructuredText", | ||
"config": { | ||
"single": "heading2", | ||
"label": "Title" | ||
} | ||
}, | ||
"cta_label": { | ||
"type": "Text", | ||
"config": { | ||
"label": "CTA Label" | ||
} | ||
}, | ||
"cta_link": { | ||
"type": "Link", | ||
"config": { | ||
"allowTargetBlank": true, | ||
"label": "CTA Link", | ||
"select": null | ||
} | ||
} | ||
}, | ||
"repeat": {} | ||
}, | ||
"shouting_cta": { | ||
"type": "Slice", | ||
"fieldset": "Shouting CTA", | ||
"description": "Shouting CTA", | ||
"icon": "account_box", | ||
"display": "list", | ||
"non-repeat": { | ||
"title": { | ||
"type": "StructuredText", | ||
"config": { | ||
"single": "heading2", | ||
"label": "Title" | ||
} | ||
} | ||
}, | ||
"repeat": { | ||
"cta_label": { | ||
"type": "Text", | ||
"config": { | ||
"label": "CTA Label" | ||
} | ||
}, | ||
"cta_link": { | ||
"type": "Link", | ||
"config": { | ||
"allowTargetBlank": true, | ||
"label": "CTA Link", | ||
"select": null | ||
} | ||
} | ||
} | ||
}, | ||
"beautiful_cta": { | ||
"type": "Slice", | ||
"fieldset": "Beautiful CTA", | ||
"description": "Beautiful CTA", | ||
"icon": "adb", | ||
"display": "grid", | ||
"non-repeat": { | ||
"title": { | ||
"type": "StructuredText", | ||
"config": { | ||
"single": "heading2", | ||
"label": "Title" | ||
} | ||
} | ||
}, | ||
"repeat": { | ||
"cta_label": { | ||
"type": "Text", | ||
"config": { | ||
"label": "CTA Label" | ||
} | ||
}, | ||
"cta_link": { | ||
"type": "Link", | ||
"config": { | ||
"allowTargetBlank": true, | ||
"label": "CTA Link", | ||
"select": null | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"status": true, | ||
"format": "custom" | ||
} |
83 changes: 83 additions & 0 deletions
83
e2e-projects/next-upgrade/customtypes/kitchen_sink_2/index.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{ | ||
"id": "kitchen_sink_2", | ||
"label": "Kitchen Sink 2", | ||
"repeatable": true, | ||
"json": { | ||
"Main": { | ||
"body": { | ||
"type": "Slices", | ||
"fieldset": "Slice zone", | ||
"config": { | ||
"labels": null, | ||
"choices": { | ||
"legacy_cta": { | ||
"type": "Link", | ||
"config": { | ||
"allowTargetBlank": true, | ||
"label": "CTA Link", | ||
"select": null | ||
} | ||
}, | ||
"quiet_cta": { | ||
"type": "Slice", | ||
"fieldset": "Quiet CTA", | ||
"description": "Quiet CTA", | ||
"icon": "account_balance", | ||
"display": "list", | ||
"non-repeat": { | ||
"title": { | ||
"type": "StructuredText", | ||
"config": { | ||
"single": "heading2", | ||
"label": "Title" | ||
} | ||
}, | ||
"cta_label": { | ||
"type": "Text", | ||
"config": { | ||
"label": "CTA Label" | ||
} | ||
}, | ||
"cta_link": { | ||
"type": "Link", | ||
"config": { | ||
"allowTargetBlank": true, | ||
"label": "CTA Link", | ||
"select": null | ||
} | ||
} | ||
}, | ||
"repeat": {} | ||
}, | ||
"shouting_cta": { | ||
"type": "Slice", | ||
"fieldset": "Shouting CTA", | ||
"description": "Shouting CTA", | ||
"icon": "account_box", | ||
"display": "list", | ||
"non-repeat": { | ||
"title": { | ||
"type": "StructuredText", | ||
"config": { | ||
"single": "heading2", | ||
"label": "Title" | ||
} | ||
} | ||
}, | ||
"repeat": { | ||
"cta_label": { | ||
"type": "Text", | ||
"config": { | ||
"label": "CTA Label" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"status": true, | ||
"format": "custom" | ||
} |
Oops, something went wrong.