Skip to content

Commit 83ebb10

Browse files
authored
Merge pull request #3697 from udecode/refactor/remove-icons
Styling
2 parents 8f5d4f4 + 268fffd commit 83ebb10

File tree

146 files changed

+1986
-2313
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+1986
-2313
lines changed

.changeset/lovely-weeks-act.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@udecode/slate-utils': patch
3+
---
4+
5+
Fix `getSelectionFragment` to support collapsed selection

.changeset/tiny-bees-return.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'shadcx': patch
3+
---
4+
5+
shadcn sync

apps/www/content/docs/collaboration.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ const editor = createPlateEditor({
3434
plugins: [
3535
// ...otherPlugins,
3636
YjsPlugin.configure({
37-
options: {
38-
hocuspocusProviderOptions: {
37+
options: {
38+
hocuspocusProviderOptions: {
3939
url: "https://hocuspocus.test/hocuspocus",
4040
name: "test",
41-
}
41+
},
4242
},
4343
}),
44-
]
44+
],
4545
});
4646
```
4747

apps/www/content/docs/components/changelog.mdx

+39-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,45 @@ Use the [CLI](https://platejs.org/docs/components/cli) to install the latest ver
1313

1414
### October 31 #15.6
1515

16-
- Fixed and modified some styles in emoji and color picker
17-
- Remove `Icons` file dependency. All icons are now imported from `lucide-react`.
16+
- Added `lib/transforms.ts`. Contains useful transforms for common operations.
17+
- Removed `Icons` file dependency. All icons are now imported from `lucide-react`.
18+
- Fixed and modified some styles in emoji and color picker.
19+
- Group styling:
20+
- `dropdown-menu`
21+
- `context-menu`
22+
- `inline-combobox`
23+
- Added groups and items to `slash-input-element`
24+
- Spacing and sizing update:
25+
- `ai-menu-items.tsx`
26+
- `align-dropdown-menu.tsx`
27+
- `block-context-menu.tsx`
28+
- `button.tsx`
29+
- `code-block-combobox.tsx`
30+
- `color-dropdown-menu-items.tsx`
31+
- `color-picker.tsx`
32+
- `column-group-element.tsx`
33+
- `command.tsx`
34+
- `comment-more-dropdown.tsx`
35+
- `context-menu.tsx`
36+
- `dropdown-menu.tsx`
37+
- `emoji-dropdown-menu.tsx`
38+
- `emoji-input-element.tsx`
39+
- `image-preview.tsx`
40+
- `inline-combobox.tsx`
41+
- `input.tsx`
42+
- `insert-dropdown-menu.tsx`
43+
- `line-height-dropdown-menu.tsx`
44+
- `link-floating-toolbar.tsx`
45+
- `media-popover.tsx`
46+
- `mention-input-element.tsx`
47+
- `mode-dropdown-menu.tsx`
48+
- `more-dropdown-menu.tsx`
49+
- `popover.tsx`
50+
- `slash-input-element.tsx`
51+
- `table-dropdown-menu.tsx`
52+
- `table-element.tsx`
53+
- `toggle-element.tsx`
54+
- `toggle-toolbar-button.tsx`
1855

1956
### October 26 #15.5
2057

apps/www/content/docs/components/cli.mdx

+11-4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ Options:
4040
-y, --yes skip confirmation prompt. (default: false)
4141
-c, --cwd <cwd> the working directory. defaults to the current directory.
4242
-u, --url <url> custom registry URL. (default: https://platejs.org/r)
43-
-n, --name <name> registry name. (default: plate-ui)
43+
-n, --name <name> registry name. (default: plate)
44+
-s, --silent mute output (default: false)
45+
--src-dir use the src directory when creating a new project (default: false)
4446
-h, --help display help for command
4547
```
4648

@@ -49,7 +51,7 @@ Options:
4951
Use the `add` command to add Plate UI components and dependencies to your project.
5052

5153
```bash
52-
npx shadcx@latest add [component]
54+
npx shadcx@latest add [component] -r plate
5355
```
5456

5557
You will be presented with a list of components to choose from:
@@ -84,6 +86,11 @@ Options:
8486
-o, --overwrite overwrite existing files. (default: false)
8587
-c, --cwd <cwd> the working directory. defaults to the current directory.
8688
-p, --path <path> the path to add the component to.
89+
-a, --all add all available components (default: false)
90+
-s, --silent mute output (default: false)
91+
--src-dir use the src directory when creating a new project (default: false)
92+
-r, --registry registry name or url
93+
-l, --list list all available registries (default: false)
8794
-h, --help display help for command
8895
```
8996

@@ -98,7 +105,7 @@ npx shadcx@latest init -u https://platejs.org/r -n plate -c ./apps/www
98105
or
99106

100107
```bash
101-
npx shadcx@latest add align-dropdown-menu -c ./apps/www
108+
npx shadcx@latest add align-dropdown-menu -r plate -c ./apps/www
102109
```
103110

104111
## Example components.json
@@ -119,7 +126,7 @@ Here's an example `components.json` file configured for [shadcn/ui](https://ui.s
119126
"utils": "@/lib/utils"
120127
},
121128
"registries": {
122-
"plate-ui": {
129+
"plate": {
123130
"url": "https://platejs.org/r",
124131
"style": "default",
125132
"aliases": {

apps/www/content/docs/components/components-json.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ The `registries` section allows you to configure multiple component registries f
196196
```json title="components.json"
197197
{
198198
"registries": {
199-
"plate-ui": {
199+
"plate": {
200200
"url": "https://platejs.org/r",
201201
"style": "default",
202202
"aliases": {

apps/www/content/docs/components/installation/next.mdx

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ description: Install and configure Next.js.
77

88
A [template](https://github.com/udecode/plate/tree/main/templates/plate-template) is available to help you get started quickly.
99

10+
<Callout>
11+
**If you're using Next.js 15, see the [Next.js 15 + React 19](https://ui.shadcn.com/docs/installation/react-19) guide.**
12+
</Callout>
13+
1014
</Callout>
1115

1216
<Steps>

apps/www/content/docs/components/installation/vite.mdx

+22
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,28 @@ npm install -D tailwindcss postcss autoprefixer
2323
npx tailwindcss init -p
2424
```
2525

26+
Add this import header in your main css file, `src/index.css` in our case:
27+
28+
```css {1-3} showLineNumbers
29+
@tailwind base;
30+
@tailwind components;
31+
@tailwind utilities;
32+
/* ... */
33+
```
34+
35+
Configure the tailwind template paths in `tailwind.config.js`:
36+
37+
```js {3}
38+
/** @type {import('tailwindcss').Config} */
39+
module.exports = {
40+
content: ["./index.html", "./src/**/*.{ts,tsx,js,jsx}"],
41+
theme: {
42+
extend: {},
43+
},
44+
plugins: [],
45+
}
46+
```
47+
2648
### Edit tsconfig.json file
2749

2850
The current version of Vite splits TypeScript configuration into three files, two of which need to be edited.

apps/www/public/r/index.json

+54-45
Original file line numberDiff line numberDiff line change
@@ -701,30 +701,18 @@
701701
},
702702
{
703703
"dependencies": [
704-
"@udecode/plate-heading",
705704
"@udecode/plate-ai",
705+
"@udecode/plate-block-quote",
706+
"@udecode/plate-code-block",
706707
"@udecode/plate-date",
707-
"@udecode/plate-indent-list"
708+
"@udecode/plate-heading",
709+
"@udecode/plate-indent-list",
710+
"@udecode/plate-table",
711+
"@udecode/plate-toggle"
708712
],
709713
"doc": {
710714
"description": "A command input component for inserting various elements.",
711715
"docs": [
712-
{
713-
"route": "/docs/ai",
714-
"title": "AI"
715-
},
716-
{
717-
"route": "/docs/basic-elements",
718-
"title": "Basic Elements"
719-
},
720-
{
721-
"route": "/docs/date",
722-
"title": "Date"
723-
},
724-
{
725-
"route": "/docs/indent-list",
726-
"title": "Indent List"
727-
},
728716
{
729717
"route": "https://pro.platejs.org/docs/components/slash-input-element"
730718
}
@@ -744,7 +732,8 @@
744732
"name": "slash-input-element",
745733
"registryDependencies": [
746734
"inline-combobox",
747-
"plate-element"
735+
"plate-element",
736+
"transforms"
748737
],
749738
"type": "registry:ui"
750739
},
@@ -896,6 +885,7 @@
896885
],
897886
"name": "toggle-element",
898887
"registryDependencies": [
888+
"button",
899889
"plate-element"
900890
],
901891
"type": "registry:ui"
@@ -1641,16 +1631,14 @@
16411631
},
16421632
{
16431633
"dependencies": [
1644-
"@udecode/plate-basic-marks"
1634+
"@udecode/plate-basic-marks",
1635+
"@udecode/plate-font",
1636+
"@udecode/plate-indent-list",
1637+
"@udecode/plate-list",
1638+
"@udecode/plate-media"
16451639
],
16461640
"doc": {
16471641
"description": "A set of commonly used formatting buttons.",
1648-
"docs": [
1649-
{
1650-
"route": "/docs/basic-marks",
1651-
"title": "Basic Marks"
1652-
}
1653-
],
16541642
"examples": [
16551643
"toolbar-demo"
16561644
]
@@ -1664,9 +1652,25 @@
16641652
"name": "fixed-toolbar-buttons",
16651653
"registryDependencies": [
16661654
"toolbar",
1655+
"ai-toolbar-button",
1656+
"align-dropdown-menu",
1657+
"color-dropdown-menu",
1658+
"comment-toolbar-button",
1659+
"emoji-dropdown-menu",
1660+
"indent-list-toolbar-button",
1661+
"indent-todo-toolbar-button",
1662+
"indent-toolbar-button",
16671663
"insert-dropdown-menu",
1664+
"line-height-dropdown-menu",
1665+
"link-toolbar-button",
1666+
"list-toolbar-button",
16681667
"mark-toolbar-button",
1668+
"media-toolbar-button",
16691669
"mode-dropdown-menu",
1670+
"more-dropdown-menu",
1671+
"outdent-toolbar-button",
1672+
"table-dropdown-menu",
1673+
"toggle-toolbar-button",
16701674
"turn-into-dropdown-menu"
16711675
],
16721676
"type": "registry:ui"
@@ -1715,6 +1719,10 @@
17151719
],
17161720
"name": "floating-toolbar-buttons",
17171721
"registryDependencies": [
1722+
"toolbar",
1723+
"ai-toolbar-button",
1724+
"comment-toolbar-button",
1725+
"link-toolbar-button",
17181726
"mark-toolbar-button",
17191727
"more-dropdown-menu",
17201728
"turn-into-dropdown-menu"
@@ -1929,18 +1937,21 @@
19291937
},
19301938
{
19311939
"dependencies": [
1940+
"@radix-ui/react-dropdown-menu",
19321941
"@udecode/plate-block-quote",
1942+
"@udecode/plate-code-block",
1943+
"@udecode/plate-date",
1944+
"@udecode/plate-excalidraw",
19331945
"@udecode/plate-heading",
1934-
"@radix-ui/react-dropdown-menu"
1946+
"@udecode/plate-horizontal-rule",
1947+
"@udecode/plate-indent-list",
1948+
"@udecode/plate-link",
1949+
"@udecode/plate-media",
1950+
"@udecode/plate-table",
1951+
"@udecode/plate-toggle"
19351952
],
19361953
"doc": {
19371954
"description": "A menu for inserting different types of blocks.",
1938-
"docs": [
1939-
{
1940-
"route": "/docs/basic-elements",
1941-
"title": "Basic Elements"
1942-
}
1943-
],
19441955
"examples": [
19451956
"basic-nodes-demo"
19461957
]
@@ -1954,7 +1965,8 @@
19541965
"name": "insert-dropdown-menu",
19551966
"registryDependencies": [
19561967
"dropdown-menu",
1957-
"toolbar"
1968+
"toolbar",
1969+
"transforms"
19581970
],
19591971
"type": "registry:ui"
19601972
},
@@ -2199,8 +2211,10 @@
21992211
},
22002212
{
22012213
"dependencies": [
2214+
"@radix-ui/react-dropdown-menu",
22022215
"@udecode/plate-basic-marks",
2203-
"@radix-ui/react-dropdown-menu"
2216+
"@udecode/plate-highlight",
2217+
"@udecode/plate-kbd"
22042218
],
22052219
"doc": {
22062220
"description": "A menu for additional text formatting options.",
@@ -2400,22 +2414,16 @@
24002414
},
24012415
{
24022416
"dependencies": [
2417+
"@radix-ui/react-dropdown-menu",
24032418
"@udecode/plate-block-quote",
2419+
"@udecode/plate-code-block",
24042420
"@udecode/plate-heading",
24052421
"@udecode/plate-indent-list",
2406-
"@radix-ui/react-dropdown-menu"
2422+
"@udecode/plate-toggle"
24072423
],
24082424
"doc": {
24092425
"description": "A menu for converting between different block types.",
24102426
"docs": [
2411-
{
2412-
"route": "/docs/basic-elements",
2413-
"title": "Basic Elements"
2414-
},
2415-
{
2416-
"route": "/docs/indent-list",
2417-
"title": "Indent List"
2418-
},
24192427
{
24202428
"route": "https://pro.platejs.org/docs/components/turn-into-dropdown-menu"
24212429
}
@@ -2434,7 +2442,8 @@
24342442
"name": "turn-into-dropdown-menu",
24352443
"registryDependencies": [
24362444
"dropdown-menu",
2437-
"toolbar"
2445+
"toolbar",
2446+
"transforms"
24382447
],
24392448
"type": "registry:ui"
24402449
}

0 commit comments

Comments
 (0)