Skip to content

Commit

Permalink
✨ Plate Headless UI
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeyens authored Jul 6, 2023
1 parent 56dc99f commit aa6538b
Show file tree
Hide file tree
Showing 3,757 changed files with 90,717 additions and 98,627 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
150 changes: 0 additions & 150 deletions .all-contributorsrc

This file was deleted.

6 changes: 6 additions & 0 deletions .changeset/align.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@udecode/plate-alignment': minor
---

New exports:
- `useAlignDropdownMenu`
8 changes: 8 additions & 0 deletions .changeset/cloud-minor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@udecode/plate-cloud': minor
---

New exports:
- `generateSrcAndSrcSet`
- `useCloudAttachmentElementState`
- `useCloudImageElementState`
8 changes: 8 additions & 0 deletions .changeset/codeblock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@udecode/plate-code-block': minor
---

New exports:
- `useCodeBlockElement`
- `useCodeBlockSelectElement`
- `useCodeSyntaxLeaf`
7 changes: 7 additions & 0 deletions .changeset/combobox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@udecode/plate-combobox': minor
---

New hooks:
- `useComboboxContent`
- `useComboboxItem`
16 changes: 16 additions & 0 deletions .changeset/comments-major.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
'@udecode/plate-comments': major
---

Removed:
- `AccountCircleIcon`
- `CheckIcon`
- `MoreVertIcon`
- `RefreshIcon`
- `AvatarImage`
- `CommentLinkButton`
- `CommentLinkDialog`
- `CommentLinkDialogCloseButton`
- `CommentLinkDialogCopyLink`
- `CommentLinkDialogInput`
- `PlateCommentLeaf` for `useCommentLeafState`
6 changes: 6 additions & 0 deletions .changeset/comments-minor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@udecode/plate-comments': minor
---

New exports:
-
4 changes: 2 additions & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["./changelog-config", { "repo": "udecode/plate" }],
"commit": false,
"linked": [["@udecode/slate*", "@udecode/plate*"]],
"linked": [["@udecode/*", "plate-cli"]],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["examples*"]
"ignore": ["apps*"]
}
6 changes: 6 additions & 0 deletions .changeset/core-minor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@udecode/plate-core': minor
---

New plugin option:
- `enabled`: boolean to enable/disable the plugin
13 changes: 13 additions & 0 deletions .changeset/dnd-major.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'@udecode/plate-dnd': major
---

Removed:
- `Draggable`
- `DraggableBlock`
- `DraggableBlockToolbar`
- `DraggableBlockToolbarWrapper`
- `DraggableDropline`
- `DraggableGutterLeftProps`
- `DraggableRoot`
- `DragHandle`
7 changes: 7 additions & 0 deletions .changeset/emoji.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@udecode/plate-emoji': minor
---

New exports:
- `useEmojiCombobox`
- `useEmojiDropdownMenuState`
7 changes: 7 additions & 0 deletions .changeset/excalidraw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@udecode/plate-excalidraw': minor
---

Renamed package to `@udecode/plate-excalidraw`.
New hooks:
- `useExalidawElement`
8 changes: 8 additions & 0 deletions .changeset/font.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@udecode/plate-font': minor
---

New exports:
- `useColorDropdownMenu`
- `useColorInput`
- `useColorsCustom`
7 changes: 7 additions & 0 deletions .changeset/indent-list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@udecode/plate-indent-list': minor
---

New exports:
- `someIndentList`
- `useIndentListToolbarButton`
7 changes: 7 additions & 0 deletions .changeset/indent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@udecode/plate-indent': minor
---

New exports:
- `useIndentButton`
- `useOutdentButton`
14 changes: 14 additions & 0 deletions .changeset/link-major.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'@udecode/plate-link': major
---

Removed:
- `FloatingLink`
- `FloatingLinkEditButton`
- `FloatingLinkTextInput`
- `UnlinkButton`
- `LaunchIcon`
- `Link`
- `LinkIcon`
- `LinkOffIcon`
- `ShortTextIcon`
7 changes: 7 additions & 0 deletions .changeset/link.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@udecode/plate-link': minor
---

New hooks:
- `useLink`
- `useLinkToolbarButton`
8 changes: 8 additions & 0 deletions .changeset/list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@udecode/plate-link': minor
---

New exports:
- `useListToolbarButton`
- `useTodoListElement`
- `someList`
6 changes: 6 additions & 0 deletions .changeset/media-major.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@udecode/plate-media': major
---

Removed:
- `MediaEmbed`
8 changes: 8 additions & 0 deletions .changeset/media.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@udecode/plate-media': minor
---

New exports:
- `insertMedia`
- `useMediaState`
- `useMediaToolbarButton`
11 changes: 11 additions & 0 deletions .changeset/plate-utils-major.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@udecode/plate-utils': major
---

Upgraded peer dependencies:
- `slate-react: >=0.95.0`
Removed:
- `useElementPrpos`
- `useWrapElement`
- `createComponentAs`
- `createElementAs`
34 changes: 34 additions & 0 deletions .changeset/plate-utils.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
'@udecode/plate-utils': minor
---

New components:
- `PlateElement`: Headless element component
- `PlateLeaf`: Headless leaf component
- `Box`: Slot div component
- `Text`: Slot text component
- `PortalBody`
New hooks:
- `useMarkToolbarButton`
- `usePlaceholder`
- `useRemoveNodeButton`
New functions:
- `getRootProps`
- `createSlotComponent`: Merges its props onto its immediate child. https://www.radix-ui.com/docs/primitives/utilities/slot
- `createPrimitiveComponent`: Primitive component factory used by most Plate components. It uses hooks for managing state and props, and forwards references to child components.
Component props:
- `asChild`: If true, the component will be rendered as a `Slot` {@link https://www.radix-ui.com/docs/primitives/utilities/slot}.
- `options`: Options passed to the state hook.
- `state`: Provide your state instead of using the state hook.
- `...props`: Props to be passed to the component.
Props hook return value:
- `ref`: Reference to be forwarded to the component.
- `props`: Props to be passed to the component.
- `hidden`: If true, the component will not be rendered.
Example:
```tsx
const MyButton = createPrimitiveComponent(Button)({
stateHook: useButtonState,
propsHook: useButton
});
```
Loading

0 comments on commit aa6538b

Please sign in to comment.