Skip to content

Commit

Permalink
chore: licenses and format
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Nov 11, 2024
1 parent 7f3319b commit e145c9f
Show file tree
Hide file tree
Showing 51 changed files with 254 additions and 46 deletions.
29 changes: 21 additions & 8 deletions examples/nextjs-app-router/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
This is a [Next.js](https://nextjs.org) project bootstrapped with
[`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).

## Getting Started

Expand All @@ -14,23 +15,35 @@ pnpm dev
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
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.
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/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
This project uses
[`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts)
to automatically optimize and load [Geist](https://vercel.com/font), a new font
family for Vercel.

## 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.
- [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!
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.
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/app/building-your-application/deploying) for more details.
Check out our
[Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying)
for more details.
3 changes: 3 additions & 0 deletions examples/nextjs-app-router/app/auth/login/card-header.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

"use client"

export default function CardHeader() {
Expand Down
3 changes: 3 additions & 0 deletions examples/nextjs-app-router/app/auth/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { Login } from "@ory/elements-react/theme"
import { useOryConfig } from "@ory/nextjs"
import { getLoginFlow, OryPageParams } from "@ory/nextjs/app"
Expand Down
3 changes: 3 additions & 0 deletions examples/nextjs-app-router/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* Copyright © 2024 Ory Corp */
/* SPDX-License-Identifier: Apache-2.0 */

@tailwind base;
@tailwind components;
@tailwind utilities;
Expand Down
3 changes: 3 additions & 0 deletions examples/nextjs-app-router/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import "./globals.css"
import React, { Suspense, ReactNode } from "react"

Expand Down
3 changes: 3 additions & 0 deletions examples/nextjs-app-router/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

"use client"
import { useSession } from "@ory/nextjs"
import Link from "next/link"
Expand Down
3 changes: 3 additions & 0 deletions examples/nextjs-app-router/middleware.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { createOryMiddleware } from "@ory/nextjs/middleware"

// This function can be marked `async` if using `await` inside
Expand Down
4 changes: 2 additions & 2 deletions examples/nextjs-app-router/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {}

export default nextConfig;
export default nextConfig
3 changes: 3 additions & 0 deletions examples/nextjs-app-router/ory.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import type { OryConfig } from "@ory/nextjs"

const config: OryConfig = {
Expand Down
4 changes: 2 additions & 2 deletions examples/nextjs-app-router/postcss.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ const config = {
plugins: {
tailwindcss: {},
},
};
}

export default config;
export default config
9 changes: 6 additions & 3 deletions examples/nextjs-app-router/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import type { Config } from "tailwindcss";
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import type { Config } from "tailwindcss"

const config: Config = {
content: [
Expand All @@ -15,5 +18,5 @@ const config: Config = {
},
},
plugins: [],
};
export default config;
}
export default config
36 changes: 26 additions & 10 deletions examples/nextjs-pages-router/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
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).
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

Expand All @@ -14,27 +15,42 @@ pnpm dev
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
Open [http://localhost:3000](http://localhost:3000) with your browser to see the
result.

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
You can start editing the page by modifying `pages/index.tsx`. The page
auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on
[http://localhost:3000/api/hello](http://localhost:3000/api/hello). This
endpoint can be edited in `pages/api/hello.ts`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
The `pages/api` directory is mapped to `/api/*`. Files in this directory are
treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead
of React pages.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
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.
- [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!
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.
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.
Check out our
[Next.js deployment documentation](https://nextjs.org/docs/deployment) for more
details.
3 changes: 3 additions & 0 deletions examples/nextjs-pages-router/middleware.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { createOryMiddleware } from "@ory/nextjs/server"

// This function can be marked `async` if using `await` inside
Expand Down
4 changes: 2 additions & 2 deletions examples/nextjs-pages-router/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
};
}

export default nextConfig;
export default nextConfig
3 changes: 3 additions & 0 deletions examples/nextjs-pages-router/ory.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import type { OryConfig } from "@ory/nextjs"

const config: OryConfig = {
Expand Down
9 changes: 6 additions & 3 deletions examples/nextjs-pages-router/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import "@/styles/globals.css";
import type { AppProps } from "next/app";
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import "@/styles/globals.css"
import type { AppProps } from "next/app"

export default function App({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />;
return <Component {...pageProps} />
}
7 changes: 5 additions & 2 deletions examples/nextjs-pages-router/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { Html, Head, Main, NextScript } from "next/document";
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { Html, Head, Main, NextScript } from "next/document"

export default function Document() {
return (
Expand All @@ -9,5 +12,5 @@ export default function Document() {
<NextScript />
</body>
</Html>
);
)
}
11 changes: 7 additions & 4 deletions examples/nextjs-pages-router/pages/api/hello.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import type { NextApiRequest, NextApiResponse } from "next";
import type { NextApiRequest, NextApiResponse } from "next"

type Data = {
name: string;
};
name: string
}

export default function handler(
req: NextApiRequest,
res: NextApiResponse<Data>,
) {
res.status(200).json({ name: "John Doe" });
res.status(200).json({ name: "John Doe" })
}
3 changes: 3 additions & 0 deletions examples/nextjs-pages-router/pages/auth/login.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { Registration } from "@ory/elements-react/theme"
import {
useRegistrationFlow,
Expand Down
13 changes: 8 additions & 5 deletions examples/nextjs-pages-router/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import Image from "next/image";
import localFont from "next/font/local";
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import Image from "next/image"
import localFont from "next/font/local"

const geistSans = localFont({
src: "./fonts/GeistVF.woff",
variable: "--font-geist-sans",
weight: "100 900",
});
})
const geistMono = localFont({
src: "./fonts/GeistMonoVF.woff",
variable: "--font-geist-mono",
weight: "100 900",
});
})

export default function Home() {
return (
Expand Down Expand Up @@ -111,5 +114,5 @@ export default function Home() {
</a>
</footer>
</div>
);
)
}
4 changes: 2 additions & 2 deletions examples/nextjs-pages-router/postcss.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ const config = {
plugins: {
tailwindcss: {},
},
};
}

export default config;
export default config
3 changes: 3 additions & 0 deletions examples/nextjs-pages-router/styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* Copyright © 2024 Ory Corp */
/* SPDX-License-Identifier: Apache-2.0 */

@tailwind base;
@tailwind components;
@tailwind utilities;
Expand Down
9 changes: 6 additions & 3 deletions examples/nextjs-pages-router/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import type { Config } from "tailwindcss";
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import type { Config } from "tailwindcss"

const config: Config = {
content: [
Expand All @@ -15,5 +18,5 @@ const config: Config = {
},
},
plugins: [],
};
export default config;
}
export default config
47 changes: 47 additions & 0 deletions packages/elements-react/api-report/elements-react-theme.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,53 @@
"parameters": [],
"name": "DefaultCardHeader"
},
{
"kind": "Function",
"canonicalReference": "@ory/elements-react!DefaultCardLayout:function(1)",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "declare function DefaultCardLayout({ children }: "
},
{
"kind": "Reference",
"text": "PropsWithChildren",
"canonicalReference": "@types/react!React.PropsWithChildren:type"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "react_jsx_runtime.JSX.Element",
"canonicalReference": "@types/react!JSX.Element:interface"
},
{
"kind": "Content",
"text": ";"
}
],
"fileUrlPath": "dist/theme/default/index.d.ts",
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "{ children }",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"isOptional": false
}
],
"name": "DefaultCardLayout"
},
{
"kind": "Function",
"canonicalReference": "@ory/elements-react!DefaultCardLogo:function(1)",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { PropsWithChildren } from "react"

export function DefaultCardLayout({ children }: PropsWithChildren) {
Expand Down
Loading

0 comments on commit e145c9f

Please sign in to comment.