-
-
Notifications
You must be signed in to change notification settings - Fork 755
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
70 changed files
with
877 additions
and
610 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
'use client'; | ||
|
||
import * as React from 'react'; | ||
|
||
import { MoonIcon, SunIcon } from 'lucide-react'; | ||
|
13 changes: 6 additions & 7 deletions
13
apps/www/src/registry/default/plate-ui/blockquote-element-static.tsx
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 |
---|---|---|
@@ -1,23 +1,22 @@ | ||
import React from 'react'; | ||
|
||
import type { StaticElementProps } from '@udecode/plate-common'; | ||
import type { PlateElementStaticProps } from '@udecode/plate-common'; | ||
|
||
import { PlateStaticElement } from '@udecode/plate-common'; | ||
|
||
import { cn } from '../lib/utils'; | ||
import { cn } from '@udecode/cn'; | ||
import { PlateElementStatic } from '@udecode/plate-common'; | ||
|
||
export const BlockquoteElementStatic = ({ | ||
children, | ||
className, | ||
...props | ||
}: StaticElementProps) => { | ||
}: PlateElementStaticProps) => { | ||
return ( | ||
<PlateStaticElement | ||
<PlateElementStatic | ||
as="blockquote" | ||
className={cn('my-1 border-l-2 pl-6 italic', className)} | ||
{...props} | ||
> | ||
{children} | ||
</PlateStaticElement> | ||
</PlateElementStatic> | ||
); | ||
}; |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
'use client'; | ||
|
||
import React from 'react'; | ||
|
||
import { cn, withRef } from '@udecode/cn'; | ||
|
17 changes: 8 additions & 9 deletions
17
apps/www/src/registry/default/plate-ui/code-block-element-static.tsx
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 |
---|---|---|
@@ -1,30 +1,29 @@ | ||
import React from 'react'; | ||
|
||
import type { TCodeBlockElement } from '@udecode/plate-code-block'; | ||
import type { StaticElementProps } from '@udecode/plate-common'; | ||
import type { PlateElementStaticProps } from '@udecode/plate-common'; | ||
|
||
import { PlateStaticElement } from '@udecode/plate-common'; | ||
|
||
import { cn } from '../lib/utils'; | ||
import { cn } from '@udecode/cn'; | ||
import { PlateElementStatic } from '@udecode/plate-common'; | ||
|
||
export const CodeBlockElementStatic = ({ | ||
children, | ||
element, | ||
...props | ||
}: StaticElementProps<TCodeBlockElement>) => { | ||
}: PlateElementStaticProps<TCodeBlockElement>) => { | ||
const { element } = props; | ||
|
||
const codeClassName = element?.lang | ||
? `${element.lang} language-${element.lang}` | ||
: ''; | ||
|
||
return ( | ||
<PlateStaticElement | ||
<PlateElementStatic | ||
className={cn('relative py-1', codeClassName)} | ||
{...props} | ||
element={element} | ||
> | ||
<pre className="overflow-x-auto rounded-md bg-muted px-6 py-8 font-mono text-sm leading-[normal] [tab-size:2]"> | ||
<code>{children}</code> | ||
</pre> | ||
</PlateStaticElement> | ||
</PlateElementStatic> | ||
); | ||
}; |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
'use client'; | ||
|
||
import React from 'react'; | ||
|
||
import { cn, withRef } from '@udecode/cn'; | ||
|
10 changes: 5 additions & 5 deletions
10
apps/www/src/registry/default/plate-ui/code-leaf-static.tsx
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import React from 'react'; | ||
|
||
import type { StaticLeafProps } from '@udecode/plate-common'; | ||
import type { PlateLeafStaticProps } from '@udecode/plate-common'; | ||
|
||
import { PlateStaticLeaf } from '@udecode/plate-common'; | ||
import { PlateLeafStatic } from '@udecode/plate-common'; | ||
|
||
export const CodeLeafStatic = ({ children, ...props }: StaticLeafProps) => { | ||
export const CodeLeafStatic = ({ children, ...props }: PlateLeafStaticProps) => { | ||
return ( | ||
<PlateStaticLeaf {...props}> | ||
<PlateLeafStatic {...props}> | ||
<code className="whitespace-pre-wrap rounded-md bg-muted px-[0.3em] py-[0.2em] font-mono text-sm"> | ||
{children} | ||
</code> | ||
</PlateStaticLeaf> | ||
</PlateLeafStatic> | ||
); | ||
}; |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
'use client'; | ||
|
||
import React from 'react'; | ||
|
||
import { cn, withRef } from '@udecode/cn'; | ||
|
8 changes: 4 additions & 4 deletions
8
apps/www/src/registry/default/plate-ui/code-line-element-static.tsx
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import React from 'react'; | ||
|
||
import type { StaticElementProps } from '@udecode/plate-common'; | ||
import type { PlateElementStaticProps } from '@udecode/plate-common'; | ||
|
||
import { PlateStaticElement } from '@udecode/plate-common'; | ||
import { PlateElementStatic } from '@udecode/plate-common'; | ||
|
||
export const CodeLineElementStatic = ({ | ||
children, | ||
...props | ||
}: StaticElementProps) => { | ||
return <PlateStaticElement {...props}>{children}</PlateStaticElement>; | ||
}: PlateElementStaticProps) => { | ||
return <PlateElementStatic {...props}>{children}</PlateElementStatic>; | ||
}; |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
'use client'; | ||
|
||
import React from 'react'; | ||
|
||
import { withRef } from '@udecode/cn'; | ||
|
8 changes: 4 additions & 4 deletions
8
apps/www/src/registry/default/plate-ui/code-syntax-leaf-static.tsx
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import React from 'react'; | ||
|
||
import type { StaticLeafProps } from '@udecode/plate-common'; | ||
import type { PlateLeafStaticProps } from '@udecode/plate-common'; | ||
|
||
import { PlateStaticLeaf } from '@udecode/plate-common'; | ||
import { PlateLeafStatic } from '@udecode/plate-common'; | ||
|
||
export function CodeSyntaxLeafStatic({ children, ...props }: StaticLeafProps) { | ||
return <PlateStaticLeaf {...props}>{children}</PlateStaticLeaf>; | ||
export function CodeSyntaxLeafStatic({ children, ...props }: PlateLeafStaticProps) { | ||
return <PlateLeafStatic {...props}>{children}</PlateLeafStatic>; | ||
} |
10 changes: 5 additions & 5 deletions
10
apps/www/src/registry/default/plate-ui/column-element-static.tsx
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 |
---|---|---|
@@ -1,27 +1,27 @@ | ||
import React from 'react'; | ||
|
||
import type { StaticElementProps } from '@udecode/plate-common'; | ||
import type { PlateElementStaticProps } from '@udecode/plate-common'; | ||
import type { TColumnElement } from '@udecode/plate-layout'; | ||
|
||
import { cn } from '@udecode/cn'; | ||
import { PlateStaticElement } from '@udecode/plate-common'; | ||
import { PlateElementStatic } from '@udecode/plate-common'; | ||
|
||
export function ColumnElementStatic({ | ||
children, | ||
className, | ||
element, | ||
...props | ||
}: StaticElementProps) { | ||
}: PlateElementStaticProps) { | ||
const { width } = element as TColumnElement; | ||
|
||
return ( | ||
<PlateStaticElement | ||
<PlateElementStatic | ||
className={cn('rounded-lg border border-dashed p-1.5', className)} | ||
style={{ width: width ?? '100%' }} | ||
element={element} | ||
{...props} | ||
> | ||
{children} | ||
</PlateStaticElement> | ||
</PlateElementStatic> | ||
); | ||
} |
10 changes: 5 additions & 5 deletions
10
apps/www/src/registry/default/plate-ui/column-group-element-staic.tsx
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
import React from 'react'; | ||
|
||
import type { StaticElementProps } from '@udecode/plate-common'; | ||
import type { PlateElementStaticProps } from '@udecode/plate-common'; | ||
|
||
import { cn } from '@udecode/cn'; | ||
import { PlateStaticElement } from '@udecode/plate-common'; | ||
import { PlateElementStatic } from '@udecode/plate-common'; | ||
|
||
export function ColumnGroupElementStatic({ | ||
children, | ||
className, | ||
element, | ||
...props | ||
}: StaticElementProps) { | ||
}: PlateElementStaticProps) { | ||
return ( | ||
<PlateStaticElement | ||
<PlateElementStatic | ||
className={cn('my-2', className)} | ||
element={element} | ||
{...props} | ||
> | ||
<div className={cn('flex size-full gap-4 rounded')}>{children}</div> | ||
</PlateStaticElement> | ||
</PlateElementStatic> | ||
); | ||
} |
10 changes: 5 additions & 5 deletions
10
apps/www/src/registry/default/plate-ui/comment-leaf-static.tsx
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 |
---|---|---|
@@ -1,25 +1,25 @@ | ||
import React from 'react'; | ||
|
||
import type { TCommentText } from '@udecode/plate-comments'; | ||
import type { StaticLeafProps } from '@udecode/plate-common'; | ||
import type { PlateLeafStaticProps } from '@udecode/plate-common'; | ||
|
||
import { cn } from '@udecode/cn'; | ||
import { PlateStaticLeaf } from '@udecode/plate-common'; | ||
import { PlateLeafStatic } from '@udecode/plate-common'; | ||
|
||
export function CommentLeafStatic({ | ||
children, | ||
className, | ||
...props | ||
}: StaticLeafProps<TCommentText>) { | ||
}: PlateLeafStaticProps<TCommentText>) { | ||
return ( | ||
<PlateStaticLeaf | ||
<PlateLeafStatic | ||
className={cn( | ||
'border-b-2 border-b-highlight/35 bg-highlight/15', | ||
className | ||
)} | ||
{...props} | ||
> | ||
<>{children}</> | ||
</PlateStaticLeaf> | ||
</PlateLeafStatic> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
'use client'; | ||
|
||
import React from 'react'; | ||
|
||
import { withRef } from '@udecode/cn'; | ||
|
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
10 changes: 5 additions & 5 deletions
10
apps/www/src/registry/default/plate-ui/highlight-leaf-static.tsx
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 |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import React from 'react'; | ||
|
||
import type { StaticLeafProps } from '@udecode/plate-core'; | ||
import type { PlateLeafStaticProps } from '@udecode/plate-core'; | ||
|
||
import { cn } from '@udecode/cn'; | ||
import { PlateStaticLeaf } from '@udecode/plate-common'; | ||
import { PlateLeafStatic } from '@udecode/plate-common'; | ||
|
||
export function HighlightLeafStatic({ | ||
children, | ||
className, | ||
...props | ||
}: StaticLeafProps) { | ||
}: PlateLeafStaticProps) { | ||
return ( | ||
<PlateStaticLeaf | ||
<PlateLeafStatic | ||
className={cn('bg-highlight/30 text-inherit', className)} | ||
{...props} | ||
> | ||
<mark>{children}</mark> | ||
</PlateStaticLeaf> | ||
</PlateLeafStatic> | ||
); | ||
} |
Oops, something went wrong.