@doist/typist 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [1.0.16](https://github.com/Doist/typist/compare/v1.0.15...v1.0.16) (2023-02-22)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- Replace usage of useEvent with useCallback ([#98](https://github.com/Doist/typist/issues/98)) ([3b175f7](https://github.com/Doist/typist/commit/3b175f77cf0fa638a8ad267959ab720d24815fdd))
|
|
6
|
+
|
|
7
|
+
## [1.0.15](https://github.com/Doist/typist/compare/v1.0.14...v1.0.15) (2023-02-14)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **deps:** update tiptap packages to v2.0.0-beta.217 ([#136](https://github.com/Doist/typist/issues/136)) ([eebba15](https://github.com/Doist/typist/commit/eebba150de5f8a972c99a31b77b52af672169a94))
|
|
12
|
+
|
|
1
13
|
## [1.0.14](https://github.com/Doist/typist/compare/v1.0.13...v1.0.14) (2023-02-13)
|
|
2
14
|
|
|
3
15
|
### Bug Fixes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typist-editor.d.ts","sourceRoot":"","sources":["../../src/components/typist-editor.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"typist-editor.d.ts","sourceRoot":"","sources":["../../src/components/typist-editor.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAqB,wBAAwB,EAAE,MAAM,wCAAwC,CAAA;AAMpG,OAAO,EAAE,2BAA2B,EAA2B,MAAM,wBAAwB,CAAA;AAE7F,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAClF,OAAO,KAAK,EAAU,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAE1D;;;GAG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B,EACjB,iBAAiB,EACjB,eAAe,EACf,WAAW,GACd,CAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useImperativeHandle, useMemo } from 'react';
|
|
3
|
-
import { useEvent } from 'react-use-event-hook';
|
|
2
|
+
import { forwardRef, useCallback, useImperativeHandle, useMemo } from 'react';
|
|
4
3
|
import { getSchema } from '@tiptap/core';
|
|
5
4
|
import { Placeholder } from '@tiptap/extension-placeholder';
|
|
6
5
|
import { EditorContent } from '@tiptap/react';
|
|
@@ -57,7 +56,7 @@ const TypistEditor = forwardRef(function TypistEditor({ autoFocus, className, co
|
|
|
57
56
|
...(ariaLabelledBy ? { 'aria-labelledby': ariaLabelledBy } : {}),
|
|
58
57
|
};
|
|
59
58
|
}, [ariaDescribedBy, ariaLabel, ariaLabelledBy, editable, schema]);
|
|
60
|
-
const handleCreate =
|
|
59
|
+
const handleCreate = useCallback(function handleCreate(props) {
|
|
61
60
|
const { view } = props.editor;
|
|
62
61
|
// Apply a selection to the document if one was given and `autoFocus` is `true`
|
|
63
62
|
if (autoFocus && contentSelection) {
|
|
@@ -87,7 +86,7 @@ const TypistEditor = forwardRef(function TypistEditor({ autoFocus, className, co
|
|
|
87
86
|
}
|
|
88
87
|
// Invoke the user `onCreate` handle after all internal initializations
|
|
89
88
|
onCreate?.(props);
|
|
90
|
-
});
|
|
89
|
+
}, [autoFocus, contentSelection, onCreate]);
|
|
91
90
|
const editor = useEditor({
|
|
92
91
|
autofocus: autoFocus ? 'end' : false,
|
|
93
92
|
content: htmlContent,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doist/typist",
|
|
3
3
|
"description": "The mighty Tiptap-based rich-text editor React component that powers Doist products.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.16",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://typist.doist.dev/",
|
|
7
7
|
"repository": "https://github.com/Doist/typist",
|
|
@@ -46,34 +46,34 @@
|
|
|
46
46
|
"validate:pre-push": "run-s test"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@tiptap/core": "2.0.0-beta.
|
|
50
|
-
"@tiptap/extension-blockquote": "2.0.0-beta.
|
|
51
|
-
"@tiptap/extension-bold": "2.0.0-beta.
|
|
52
|
-
"@tiptap/extension-bullet-list": "2.0.0-beta.
|
|
53
|
-
"@tiptap/extension-character-count": "2.0.0-beta.
|
|
54
|
-
"@tiptap/extension-code": "2.0.0-beta.
|
|
55
|
-
"@tiptap/extension-code-block": "2.0.0-beta.
|
|
56
|
-
"@tiptap/extension-document": "2.0.0-beta.
|
|
57
|
-
"@tiptap/extension-dropcursor": "2.0.0-beta.
|
|
58
|
-
"@tiptap/extension-gapcursor": "2.0.0-beta.
|
|
59
|
-
"@tiptap/extension-hard-break": "2.0.0-beta.
|
|
60
|
-
"@tiptap/extension-heading": "2.0.0-beta.
|
|
61
|
-
"@tiptap/extension-history": "2.0.0-beta.
|
|
62
|
-
"@tiptap/extension-horizontal-rule": "2.0.0-beta.
|
|
63
|
-
"@tiptap/extension-image": "2.0.0-beta.
|
|
64
|
-
"@tiptap/extension-italic": "2.0.0-beta.
|
|
65
|
-
"@tiptap/extension-link": "2.0.0-beta.
|
|
66
|
-
"@tiptap/extension-list-item": "2.0.0-beta.
|
|
67
|
-
"@tiptap/extension-ordered-list": "2.0.0-beta.
|
|
68
|
-
"@tiptap/extension-paragraph": "2.0.0-beta.
|
|
69
|
-
"@tiptap/extension-placeholder": "2.0.0-beta.
|
|
70
|
-
"@tiptap/extension-strike": "2.0.0-beta.
|
|
71
|
-
"@tiptap/extension-task-item": "2.0.0-beta.
|
|
72
|
-
"@tiptap/extension-task-list": "2.0.0-beta.
|
|
73
|
-
"@tiptap/extension-text": "2.0.0-beta.
|
|
74
|
-
"@tiptap/extension-typography": "2.0.0-beta.
|
|
75
|
-
"@tiptap/react": "2.0.0-beta.
|
|
76
|
-
"@tiptap/suggestion": "2.0.0-beta.
|
|
49
|
+
"@tiptap/core": "2.0.0-beta.217",
|
|
50
|
+
"@tiptap/extension-blockquote": "2.0.0-beta.217",
|
|
51
|
+
"@tiptap/extension-bold": "2.0.0-beta.217",
|
|
52
|
+
"@tiptap/extension-bullet-list": "2.0.0-beta.217",
|
|
53
|
+
"@tiptap/extension-character-count": "2.0.0-beta.217",
|
|
54
|
+
"@tiptap/extension-code": "2.0.0-beta.217",
|
|
55
|
+
"@tiptap/extension-code-block": "2.0.0-beta.217",
|
|
56
|
+
"@tiptap/extension-document": "2.0.0-beta.217",
|
|
57
|
+
"@tiptap/extension-dropcursor": "2.0.0-beta.217",
|
|
58
|
+
"@tiptap/extension-gapcursor": "2.0.0-beta.217",
|
|
59
|
+
"@tiptap/extension-hard-break": "2.0.0-beta.217",
|
|
60
|
+
"@tiptap/extension-heading": "2.0.0-beta.217",
|
|
61
|
+
"@tiptap/extension-history": "2.0.0-beta.217",
|
|
62
|
+
"@tiptap/extension-horizontal-rule": "2.0.0-beta.217",
|
|
63
|
+
"@tiptap/extension-image": "2.0.0-beta.217",
|
|
64
|
+
"@tiptap/extension-italic": "2.0.0-beta.217",
|
|
65
|
+
"@tiptap/extension-link": "2.0.0-beta.217",
|
|
66
|
+
"@tiptap/extension-list-item": "2.0.0-beta.217",
|
|
67
|
+
"@tiptap/extension-ordered-list": "2.0.0-beta.217",
|
|
68
|
+
"@tiptap/extension-paragraph": "2.0.0-beta.217",
|
|
69
|
+
"@tiptap/extension-placeholder": "2.0.0-beta.217",
|
|
70
|
+
"@tiptap/extension-strike": "2.0.0-beta.217",
|
|
71
|
+
"@tiptap/extension-task-item": "2.0.0-beta.217",
|
|
72
|
+
"@tiptap/extension-task-list": "2.0.0-beta.217",
|
|
73
|
+
"@tiptap/extension-text": "2.0.0-beta.217",
|
|
74
|
+
"@tiptap/extension-typography": "2.0.0-beta.217",
|
|
75
|
+
"@tiptap/react": "2.0.0-beta.217",
|
|
76
|
+
"@tiptap/suggestion": "2.0.0-beta.217",
|
|
77
77
|
"prosemirror-codemark": "0.4.2",
|
|
78
78
|
"prosemirror-changeset": "2.2.0",
|
|
79
79
|
"prosemirror-collab": "1.3.0",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"@doist/eslint-config": "8.1.3",
|
|
99
99
|
"@doist/prettier-config": "3.0.5",
|
|
100
100
|
"@doist/reactist": "17.10.1",
|
|
101
|
-
"@mdx-js/react": "2.
|
|
101
|
+
"@mdx-js/react": "2.3.0",
|
|
102
102
|
"@semantic-release/changelog": "6.0.2",
|
|
103
103
|
"@semantic-release/exec": "6.0.3",
|
|
104
104
|
"@semantic-release/git": "10.0.1",
|
|
@@ -114,32 +114,33 @@
|
|
|
114
114
|
"@types/jest": "29.4.0",
|
|
115
115
|
"@types/lodash-es": "4.17.6",
|
|
116
116
|
"@types/marked": "4.0.8",
|
|
117
|
-
"@types/react": "18.0.
|
|
118
|
-
"@types/react-dom": "18.0.
|
|
117
|
+
"@types/react": "18.0.28",
|
|
118
|
+
"@types/react-dom": "18.0.11",
|
|
119
119
|
"@types/react-syntax-highlighter": "15.5.6",
|
|
120
120
|
"@types/turndown": "5.0.1",
|
|
121
121
|
"boring-avatars": "1.7.0",
|
|
122
122
|
"classnames": "2.3.2",
|
|
123
123
|
"conventional-changelog-conventionalcommits": "5.0.0",
|
|
124
124
|
"emoji-regex": "10.2.1",
|
|
125
|
-
"eslint": "8.
|
|
125
|
+
"eslint": "8.34.0",
|
|
126
126
|
"eslint-formatter-codeframe": "7.32.1",
|
|
127
127
|
"eslint-import-resolver-typescript": "3.5.3",
|
|
128
128
|
"eslint-plugin-jest": "27.2.1",
|
|
129
129
|
"eslint-plugin-simple-import-sort": "8.0.0",
|
|
130
130
|
"eslint-plugin-unicorn": "45.0.2",
|
|
131
|
-
"github-markdown-css": "5.
|
|
131
|
+
"github-markdown-css": "5.2.0",
|
|
132
132
|
"husky": "8.0.3",
|
|
133
133
|
"ignore-sync": "6.0.2",
|
|
134
134
|
"is-ci": "3.0.1",
|
|
135
|
-
"jest": "29.4.
|
|
136
|
-
"jest-environment-jsdom": "29.4.
|
|
137
|
-
"lint-staged": "13.1.
|
|
135
|
+
"jest": "29.4.3",
|
|
136
|
+
"jest-environment-jsdom": "29.4.3",
|
|
137
|
+
"lint-staged": "13.1.2",
|
|
138
138
|
"npm-run-all": "4.1.5",
|
|
139
139
|
"prettier": "2.8.4",
|
|
140
140
|
"react-icons": "4.7.1",
|
|
141
141
|
"react-markdown": "8.0.5",
|
|
142
142
|
"react-syntax-highlighter": "15.5.0",
|
|
143
|
+
"react-use-event-hook": "0.9.3",
|
|
143
144
|
"rehype-raw": "6.1.1",
|
|
144
145
|
"remark-gfm": "3.0.1",
|
|
145
146
|
"rimraf": "3.0.2",
|
|
@@ -147,7 +148,7 @@
|
|
|
147
148
|
"storybook-css-modules": "1.0.8",
|
|
148
149
|
"ts-jest": "29.0.5",
|
|
149
150
|
"ts-node": "10.9.1",
|
|
150
|
-
"type-fest": "3.
|
|
151
|
+
"type-fest": "3.6.0",
|
|
151
152
|
"typescript": "4.9.5",
|
|
152
153
|
"typescript-plugin-css-modules": "4.1.1"
|
|
153
154
|
},
|
|
@@ -158,7 +159,6 @@
|
|
|
158
159
|
"marked": "^4.1.1",
|
|
159
160
|
"react": "^17.0.0 || ^18.0.0",
|
|
160
161
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
161
|
-
"react-use-event-hook": "^0.9.3",
|
|
162
162
|
"turndown": "^7.1.1"
|
|
163
163
|
}
|
|
164
164
|
}
|