Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support slate-react 0.99.0 #2675

Merged
merged 6 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .changeset/clean-gorillas-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
'@udecode/plate-horizontal-rule': minor
'@udecode/plate-serializer-docx': minor
'@udecode/plate-serializer-html': minor
'@udecode/plate-basic-elements': minor
'@udecode/plate-serializer-csv': minor
'@udecode/plate-trailing-block': minor
'@udecode/plate-serializer-md': minor
'@udecode/plate-find-replace': minor
'@udecode/plate-basic-marks': minor
'@udecode/plate-block-quote': minor
'@udecode/plate-indent-list': minor
'@udecode/plate-line-height': minor
'@udecode/plate-normalizers': minor
'@udecode/plate-utils': minor
'@udecode/slate-react': minor
'@udecode/plate-autoformat': minor
'@udecode/plate-code-block': minor
'@udecode/plate-excalidraw': minor
'@udecode/plate-reset-node': minor
'@udecode/plate-suggestion': minor
'@udecode/plate-alignment': minor
'@udecode/plate-highlight': minor
'@udecode/plate-paragraph': minor
'@udecode/plate-resizable': minor
'@udecode/plate-selection': minor
'@udecode/plate-combobox': minor
'@udecode/plate-comments': minor
'@udecode/plate-floating': minor
'@udecode/plate-tabbable': minor
'@udecode/plate-caption': minor
'@udecode/plate-heading': minor
'@udecode/plate-mention': minor
'@udecode/plate-node-id': minor
'@udecode/plate-common': minor
'@udecode/plate-cursor': minor
'@udecode/plate-indent': minor
'@udecode/plate-select': minor
'@udecode/plate-break': minor
'@udecode/plate-cloud': minor
'@udecode/plate-emoji': minor
'@udecode/plate-juice': minor
'@udecode/plate-media': minor
'@udecode/plate': minor
'@udecode/plate-table': minor
'@udecode/plate-core': minor
'@udecode/plate-font': minor
'@udecode/plate-link': minor
'@udecode/plate-list': minor
'@udecode/plate-dnd': minor
'@udecode/plate-kbd': minor
'@udecode/plate-yjs': minor
---

Support slate-react 0.99.0
2 changes: 1 addition & 1 deletion apps/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"slate": "0.94.1",
"slate-history": "0.93.0",
"slate-hyperscript": "0.77.0",
"slate-react": "0.98.1",
"slate-react": "0.99.0",
"slate-test-utils": "1.3.2",
"tailwind-merge": "^1.13.2",
"unist-builder": "3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion config/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default defineConfig((opts) => {
...opts,
entry: [INPUT_FILE],
format: ['cjs', 'esm'],
dts: { resolve: false },
dts: true,
sourcemap: true,
clean: true,

Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "MIT",
"scripts": {
"build": "yarn g:build",
"build:watch": "turbowatch ./config/turbowatch.config.ts",
"build:watch": "ROARR_LOG=true turbowatch ./config/turbowatch.config.ts | roarr",
"build:apps": "turbo --filter \"./apps/www\" build",
"build:registry": "yarn workspace www build:registry",
"build:templates": "turbo --filter \"./templates/**\" build",
Expand All @@ -26,6 +26,7 @@
"typecheck": "yarn g:typecheck",
"g:brl": "turbo --filter \"./packages/**\" brl",
"g:build": "turbo --filter \"./packages/**\" build",
"g:build:watch": "yarn build:watch",
"g:build:registry": "yarn workspace www build:registry",
"g:changeset": "changeset",
"g:clean": "turbo --filter \"./packages/**\" clean",
Expand Down Expand Up @@ -89,6 +90,7 @@
"@dword-design/eslint-plugin-import-alias": "^4.0.8",
"@ianvs/prettier-plugin-sort-imports": "^4.0.2",
"@playwright/test": "1.36.0",
"@roarr/cli": "^5.12.3",
"@swc/core": "1.3.90",
"@swc/jest": "0.2.29",
"@tailwindcss/typography": "^0.5.9",
Expand Down Expand Up @@ -175,7 +177,7 @@
"slate": "0.94.1",
"slate-history": "0.93.0",
"slate-hyperscript": "0.77.0",
"slate-react": "0.98.1",
"slate-react": "0.99.0",
"slate-test-utils": "1.3.2",
"tailwindcss": "^3.3.2",
"ts-jest": "^29.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/alignment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/autoformat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/basic-elements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/basic-marks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/block-quote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/break/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/caption/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/cloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/code-block/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/combobox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/comments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { focusEditor, useEditorRef } from '@udecode/plate-common';
import { useEditorRef } from '@udecode/plate-common';

export const useCommentsShowResolvedButton = () => {
const editor = useEditorRef();
Expand All @@ -11,13 +11,11 @@ export const useCommentsShowResolvedButton = () => {
return {
props: {
pressed: isActive,
onClick: (e: React.MouseEvent<HTMLButtonElement>) => {
onMouseDown: (e: React.MouseEvent<HTMLButtonElement>) => {
e.preventDefault();
e.stopPropagation();

},
onClick: (e: React.MouseEvent<HTMLButtonElement>) => {
setAnchorEl(e.currentTarget);

focusEditor(editor);
},
},
};
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"contentEditable",
Expand Down
2 changes: 1 addition & 1 deletion packages/cursor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/dnd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/emoji/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/excalidraw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/find-replace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/floating/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/font/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/heading/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/highlight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/horizontal-rule/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
2 changes: 1 addition & 1 deletion packages/indent-list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
13 changes: 4 additions & 9 deletions packages/indent-list/src/hooks/useIndentListToolbarButton.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import {
focusEditor,
useEditorRef,
useEditorState,
} from '@udecode/plate-common';
import { useEditorRef, useEditorState } from '@udecode/plate-common';

import { ListStyleType, toggleIndentList } from '../index';
import { someIndentList } from './someIndentList';
Expand All @@ -27,14 +23,13 @@ export const useIndentListToolbarButton = ({
return {
props: {
pressed,
onClick: (e: any) => {
onMouseDown: (e: React.MouseEvent<HTMLButtonElement>) => {
e.preventDefault();
e.stopPropagation();

},
onClick: () => {
toggleIndentList(editor, {
listStyleType: nodeType,
});
focusEditor(editor);
},
},
};
Expand Down
2 changes: 1 addition & 1 deletion packages/indent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"slate": ">=0.94.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.95.0"
"slate-react": ">=0.99.0"
},
"keywords": [
"plate",
Expand Down
Loading
Loading