Skip to content

Commit 2baab5c

Browse files
committed
docs
1 parent cb05146 commit 2baab5c

File tree

8 files changed

+550
-1142
lines changed

8 files changed

+550
-1142
lines changed

package.json

+11-16
Original file line numberDiff line numberDiff line change
@@ -13,45 +13,40 @@
1313
"typecheck": "tsc --noEmit"
1414
},
1515
"dependencies": {
16-
"@udecode/cn": "^40.2.8",
17-
"@udecode/plate-basic-elements": "^41.0.0",
18-
"@udecode/plate-basic-marks": "^41.0.0",
19-
"@udecode/plate-common": "^41.0.2",
16+
"@udecode/cn": "^42.0.0",
17+
"@udecode/plate": "^42.0.1",
18+
"@udecode/plate-basic-elements": "^42.0.0",
19+
"@udecode/plate-basic-marks": "^42.0.0",
2020
"class-variance-authority": "0.7.1",
2121
"clsx": "^2.1.1",
2222
"lucide-react": "0.469.0",
23-
"next": "^15.1.2",
23+
"next": "^15.1.4",
2424
"react": "^18.3.1",
2525
"react-dom": "^18.3.1",
26-
"slate": "^0.112.0",
27-
"slate-dom": "^0.111.0",
28-
"slate-history": "^0.110.3",
29-
"slate-hyperscript": "^0.100.0",
30-
"slate-react": "^0.112.0",
31-
"tailwind-merge": "2.5.5",
26+
"tailwind-merge": "2.6.0",
3227
"tailwind-scrollbar-hide": "^2.0.0",
3328
"tailwindcss-animate": "1.0.7"
3429
},
3530
"devDependencies": {
36-
"@types/node": "^22.10.2",
31+
"@types/node": "^22.10.5",
3732
"@types/react": "^18.3.12",
3833
"@types/react-dom": "^18.3.1",
39-
"@typescript-eslint/parser": "^8.18.1",
34+
"@typescript-eslint/parser": "^8.19.1",
4035
"autoprefixer": "^10.4.20",
4136
"encoding": "^0.1.13",
4237
"eslint": "^8.56.0",
43-
"eslint-config-next": "15.1.2",
38+
"eslint-config-next": "15.1.4",
4439
"eslint-config-prettier": "^9.1.0",
4540
"eslint-plugin-perfectionist": "3.9.1",
46-
"eslint-plugin-react": "^7.37.2",
41+
"eslint-plugin-react": "^7.37.3",
4742
"eslint-plugin-tailwindcss": "^3.17.5",
4843
"eslint-plugin-unused-imports": "^4.1.3",
4944
"postcss": "^8.4.49",
5045
"prettier": "^3.4.2",
5146
"prettier-plugin-packagejson": "^2.5.6",
5247
"tailwindcss": "^3.4.17",
5348
"tsx": "^4.19.1",
54-
"typescript": "5.7.2"
49+
"typescript": "5.7.3"
5550
},
5651
"packageManager": "pnpm@9.2.0",
5752
"pnpm": {

pnpm-lock.yaml

+497-1,086
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/layout.tsx

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1-
import type { Metadata } from "next";
2-
import localFont from "next/font/local";
3-
import "./globals.css";
1+
import type { Metadata } from 'next';
2+
3+
import localFont from 'next/font/local';
4+
5+
import './globals.css';
46

57
const geistSans = localFont({
6-
src: "./fonts/GeistVF.woff",
7-
variable: "--font-geist-sans",
8-
weight: "100 900",
8+
src: './fonts/GeistVF.woff',
9+
variable: '--font-geist-sans',
10+
weight: '100 900',
911
});
1012
const geistMono = localFont({
11-
src: "./fonts/GeistMonoVF.woff",
12-
variable: "--font-geist-mono",
13-
weight: "100 900",
13+
src: './fonts/GeistMonoVF.woff',
14+
variable: '--font-geist-mono',
15+
weight: '100 900',
1416
});
1517

1618
export const metadata: Metadata = {
17-
title: "Create Next App",
18-
description: "Generated by create next app",
19+
description: 'Generated by create next app',
20+
title: 'Create Next App',
1921
};
2022

2123
export default function RootLayout({

src/app/page.tsx

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
import Image from "next/image";
1+
import Image from 'next/image';
22

33
export default function Home() {
44
return (
55
<div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
66
<main className="flex flex-col gap-8 row-start-2 items-center sm:items-start">
77
<Image
88
className="dark:invert"
9-
src="https://nextjs.org/icons/next.svg"
109
alt="Next.js logo"
11-
width={180}
1210
height={38}
11+
src="https://nextjs.org/icons/next.svg"
12+
width={180}
1313
priority
1414
/>
1515
<ol className="list-inside list-decimal text-sm text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
1616
<li className="mb-2">
17-
Get started by editing{" "}
17+
Get started by editing{' '}
1818
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold">
1919
app/page.tsx
2020
</code>
@@ -27,23 +27,23 @@ export default function Home() {
2727
<a
2828
className="rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground text-background gap-2 hover:bg-[#383838] dark:hover:bg-[#ccc] text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5"
2929
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
30-
target="_blank"
3130
rel="noopener noreferrer"
31+
target="_blank"
3232
>
3333
<Image
3434
className="dark:invert"
35-
src="https://nextjs.org/icons/vercel.svg"
3635
alt="Vercel logomark"
37-
width={20}
3836
height={20}
37+
src="https://nextjs.org/icons/vercel.svg"
38+
width={20}
3939
/>
4040
Deploy now
4141
</a>
4242
<a
4343
className="rounded-full border border-solid border-black/[.08] dark:border-white/[.145] transition-colors flex items-center justify-center hover:bg-[#f2f2f2] dark:hover:bg-[#1a1a1a] hover:border-transparent text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 sm:min-w-44"
4444
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
45-
target="_blank"
4645
rel="noopener noreferrer"
46+
target="_blank"
4747
>
4848
Read our docs
4949
</a>
@@ -53,45 +53,45 @@ export default function Home() {
5353
<a
5454
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
5555
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
56-
target="_blank"
5756
rel="noopener noreferrer"
57+
target="_blank"
5858
>
5959
<Image
60+
alt="File icon"
6061
aria-hidden
62+
height={16}
6163
src="https://nextjs.org/icons/file.svg"
62-
alt="File icon"
6364
width={16}
64-
height={16}
6565
/>
6666
Learn
6767
</a>
6868
<a
6969
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
7070
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
71-
target="_blank"
7271
rel="noopener noreferrer"
72+
target="_blank"
7373
>
7474
<Image
75+
alt="Window icon"
7576
aria-hidden
77+
height={16}
7678
src="https://nextjs.org/icons/window.svg"
77-
alt="Window icon"
7879
width={16}
79-
height={16}
8080
/>
8181
Examples
8282
</a>
8383
<a
8484
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
8585
href="https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
86-
target="_blank"
8786
rel="noopener noreferrer"
87+
target="_blank"
8888
>
8989
<Image
90+
alt="Globe icon"
9091
aria-hidden
92+
height={16}
9193
src="https://nextjs.org/icons/globe.svg"
92-
alt="Globe icon"
9394
width={16}
94-
height={16}
9595
/>
9696
Go to nextjs.org →
9797
</a>

src/components/editor/plate-editor.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22

3-
import { Plate } from '@udecode/plate-common/react';
3+
import { Plate } from '@udecode/plate/react';
44

55
import { useCreateEditor } from '@/components/editor/use-create-editor';
66
import { Editor, EditorContainer } from '@/components/plate-ui/editor';

src/components/editor/use-create-editor.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
'use client';
22

33
import { withProps } from '@udecode/cn';
4+
import {
5+
ParagraphPlugin,
6+
PlateElement,
7+
PlateLeaf,
8+
usePlateEditor,
9+
} from '@udecode/plate/react';
410
import { BasicElementsPlugin } from '@udecode/plate-basic-elements/react';
511
import {
612
BasicMarksPlugin,
@@ -9,12 +15,6 @@ import {
915
StrikethroughPlugin,
1016
UnderlinePlugin,
1117
} from '@udecode/plate-basic-marks/react';
12-
import {
13-
ParagraphPlugin,
14-
PlateElement,
15-
PlateLeaf,
16-
usePlateEditor,
17-
} from '@udecode/plate-common/react';
1818

1919
export const useCreateEditor = () => {
2020
return usePlateEditor({

src/components/plate-ui/editor.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
import React from 'react';
44

5-
import type { PlateContentProps } from '@udecode/plate-common/react';
5+
import type { PlateContentProps } from '@udecode/plate/react';
66
import type { VariantProps } from 'class-variance-authority';
77

88
import { cn } from '@udecode/cn';
99
import {
1010
PlateContent,
1111
useEditorContainerRef,
1212
useEditorRef,
13-
} from '@udecode/plate-common/react';
13+
} from '@udecode/plate/react';
1414
import { cva } from 'class-variance-authority';
1515

1616
const editorContainerVariants = cva(

src/lib/utils.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { clsx, type ClassValue } from "clsx"
2-
import { twMerge } from "tailwind-merge"
1+
import { type ClassValue, clsx } from 'clsx';
2+
import { twMerge } from 'tailwind-merge';
33

44
export function cn(...inputs: ClassValue[]) {
5-
return twMerge(clsx(inputs))
5+
return twMerge(clsx(inputs));
66
}

0 commit comments

Comments
 (0)