-
-
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.
Merge pull request #3643 from udecode/sync-shadcn
Sync shadcn
- Loading branch information
Showing
140 changed files
with
1,454 additions
and
1,684 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 was deleted.
Oops, something went wrong.
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
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
13 changes: 13 additions & 0 deletions
13
apps/www/public/r/styles/default/basic-editor-default-demo.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,13 @@ | ||
{ | ||
"files": [ | ||
{ | ||
"content": "import React from 'react';\n\nimport {\n Plate,\n PlateContent,\n usePlateEditor,\n} from '@udecode/plate-common/react';\n\nexport default function BasicEditorDefaultDemo() {\n const editor = usePlateEditor();\n\n return (\n <Plate editor={editor}>\n <PlateContent placeholder=\"Type...\" />\n </Plate>\n );\n}\n", | ||
"path": "example/basic-editor-default-demo.tsx", | ||
"target": "components/basic-editor-default-demo.tsx", | ||
"type": "registry:example" | ||
} | ||
], | ||
"name": "basic-editor-default-demo", | ||
"registryDependencies": [], | ||
"type": "registry:example" | ||
} |
13 changes: 13 additions & 0 deletions
13
apps/www/public/r/styles/default/basic-editor-handler-demo.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,13 @@ | ||
{ | ||
"files": [ | ||
{ | ||
"content": "import React, { useState } from 'react';\n\nimport type { Value } from '@udecode/plate-common';\n\nimport { Plate, usePlateEditor } from '@udecode/plate-common/react';\n\nimport {\n Accordion,\n AccordionContent,\n AccordionItem,\n AccordionTrigger,\n} from '@/components/ui/accordion';\nimport { editableProps } from '@/plate/demo/editableProps';\nimport { Editor } from '@/components/plate-ui/editor';\n\nconst value = [\n {\n children: [\n {\n text: 'This is editable plain text with react and history plugins, just like a textarea!',\n },\n ],\n type: 'p',\n },\n];\n\nexport default function BasicEditorHandlerDemo() {\n const [debugValue, setDebugValue] = useState<Value>(value);\n\n const localValue =\n typeof window !== 'undefined' && localStorage.getItem('editorContent');\n\n const editor = usePlateEditor({\n value: localValue ? JSON.parse(localValue) : value,\n });\n\n return (\n <Plate\n onChange={({ value }) => {\n localStorage.setItem('editorContent', JSON.stringify(value));\n setDebugValue(value);\n }}\n editor={editor}\n >\n <Editor {...editableProps} />\n\n <Accordion type=\"single\" collapsible>\n <AccordionItem value=\"manual-installation\">\n <AccordionTrigger>Debug Value</AccordionTrigger>\n <AccordionContent>{JSON.stringify(debugValue)}</AccordionContent>\n </AccordionItem>\n </Accordion>\n </Plate>\n );\n}\n", | ||
"path": "example/basic-editor-handler-demo.tsx", | ||
"target": "components/basic-editor-handler-demo.tsx", | ||
"type": "registry:example" | ||
} | ||
], | ||
"name": "basic-editor-handler-demo", | ||
"registryDependencies": [], | ||
"type": "registry:example" | ||
} |
13 changes: 13 additions & 0 deletions
13
apps/www/public/r/styles/default/basic-editor-styling-demo.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,13 @@ | ||
{ | ||
"files": [ | ||
{ | ||
"content": "import React from 'react';\n\nimport { Plate, usePlateEditor } from '@udecode/plate-common/react';\n\nimport { Editor } from '@/components/plate-ui/editor';\n\nexport default function BasicEditorStylingDemo() {\n const editor = usePlateEditor();\n\n return (\n <Plate editor={editor}>\n <Editor placeholder=\"Type...\" />\n </Plate>\n );\n}\n", | ||
"path": "example/basic-editor-styling-demo.tsx", | ||
"target": "components/basic-editor-styling-demo.tsx", | ||
"type": "registry:example" | ||
} | ||
], | ||
"name": "basic-editor-styling-demo", | ||
"registryDependencies": [], | ||
"type": "registry:example" | ||
} |
13 changes: 13 additions & 0 deletions
13
apps/www/public/r/styles/default/basic-editor-value-demo.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,13 @@ | ||
{ | ||
"files": [ | ||
{ | ||
"content": "import React from 'react';\n\nimport { Plate, usePlateEditor } from '@udecode/plate-common/react';\n\nimport { editableProps } from '@/plate/demo/editableProps';\nimport { Editor } from '@/components/plate-ui/editor';\n\nconst value = [\n {\n children: [\n {\n text: 'This is editable plain text with react and history plugins, just like a <textarea>!',\n },\n ],\n type: 'p',\n },\n];\n\nexport default function BasicEditorValueDemo() {\n const editor = usePlateEditor({ value });\n\n return (\n <Plate editor={editor}>\n <Editor {...editableProps} />\n </Plate>\n );\n}\n", | ||
"path": "example/basic-editor-value-demo.tsx", | ||
"target": "components/basic-editor-value-demo.tsx", | ||
"type": "registry:example" | ||
} | ||
], | ||
"name": "basic-editor-value-demo", | ||
"registryDependencies": [], | ||
"type": "registry:example" | ||
} |
13 changes: 13 additions & 0 deletions
13
apps/www/public/r/styles/default/basic-plugins-components-demo.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,13 @@ | ||
{ | ||
"files": [ | ||
{ | ||
"content": "import {\n BoldPlugin,\n CodePlugin,\n ItalicPlugin,\n StrikethroughPlugin,\n UnderlinePlugin,\n} from '@udecode/plate-basic-marks/react';\nimport { BlockquotePlugin } from '@udecode/plate-block-quote/react';\nimport { CodeBlockPlugin } from '@udecode/plate-code-block/react';\nimport { Plate, usePlateEditor } from '@udecode/plate-common/react';\nimport { HeadingPlugin } from '@udecode/plate-heading/react';\nimport Prism from 'prismjs';\n\nimport { createPlateUI } from '@/lib/plate/create-plate-ui';\nimport { Editor } from '@/components/plate-ui/editor';\n\nexport default function BasicPluginsComponentsDemo() {\n const editor = usePlateEditor({\n override: { components: createPlateUI() },\n plugins: [\n BlockquotePlugin,\n CodeBlockPlugin.configure({ options: { prism: Prism } }),\n HeadingPlugin,\n BoldPlugin,\n ItalicPlugin,\n UnderlinePlugin,\n StrikethroughPlugin,\n CodePlugin,\n ],\n value: basicEditorValue,\n });\n\n return (\n <Plate editor={editor}>\n <Editor placeholder=\"Type...\" autoFocus={false} spellCheck={false} />\n </Plate>\n );\n}\n\nexport const basicEditorValue = [\n {\n id: '1',\n children: [\n {\n text: '🌳 Blocks',\n },\n ],\n type: 'h1',\n },\n {\n id: '2',\n children: [\n {\n text: 'Easily create headings of various levels, from H1 to H6, to structure your content and make it more organized.',\n },\n ],\n type: 'p',\n },\n {\n id: '3',\n children: [\n {\n text: 'Create blockquotes to emphasize important information or highlight quotes from external sources.',\n },\n ],\n type: 'blockquote',\n },\n {\n id: '4',\n children: [\n {\n children: [\n {\n text: '// Use code blocks to showcase code snippets',\n },\n ],\n type: 'code_line',\n },\n {\n children: [\n {\n text: 'function greet() {',\n },\n ],\n type: 'code_line',\n },\n {\n children: [\n {\n text: \" console.info('Hello World!');\",\n },\n ],\n type: 'code_line',\n },\n {\n children: [\n {\n text: '}',\n },\n ],\n type: 'code_line',\n },\n ],\n lang: 'javascript',\n type: 'code_block',\n },\n {\n id: '1',\n children: [\n {\n text: '🌱 Marks',\n },\n ],\n type: 'h1',\n },\n {\n id: '2',\n children: [\n {\n text: 'Add style and emphasis to your text using the mark plugins, which offers a variety of formatting options.',\n },\n ],\n type: 'p',\n },\n {\n id: '3',\n children: [\n {\n text: 'Make text ',\n },\n {\n bold: true,\n text: 'bold',\n },\n {\n text: ', ',\n },\n {\n italic: true,\n text: 'italic',\n },\n {\n text: ', ',\n },\n {\n text: 'underlined',\n underline: true,\n },\n {\n text: ', or apply a ',\n },\n {\n bold: true,\n italic: true,\n text: 'combination',\n underline: true,\n },\n {\n text: ' of these styles for a visually striking effect.',\n },\n ],\n type: 'p',\n },\n {\n id: '4',\n children: [\n {\n text: 'Add ',\n },\n {\n strikethrough: true,\n text: 'strikethrough',\n },\n {\n text: ' to indicate deleted or outdated content.',\n },\n ],\n type: 'p',\n },\n {\n id: '5',\n children: [\n {\n text: 'Write code snippets with inline ',\n },\n {\n code: true,\n text: 'code',\n },\n {\n text: ' formatting for easy readability.',\n },\n ],\n type: 'p',\n },\n {\n id: '6',\n children: [\n {\n text: 'Press ',\n },\n {\n kbd: true,\n text: '⌘+B',\n },\n {\n text: ' to apply bold mark or ',\n },\n {\n kbd: true,\n text: '⌘+I',\n },\n {\n text: ' for italic mark.',\n },\n ],\n type: 'p',\n },\n];\n", | ||
"path": "example/basic-plugins-components-demo.tsx", | ||
"target": "components/basic-plugins-components-demo.tsx", | ||
"type": "registry:example" | ||
} | ||
], | ||
"name": "basic-plugins-components-demo", | ||
"registryDependencies": [], | ||
"type": "registry:example" | ||
} |
Oops, something went wrong.