@doist/typist 1.0.8 → 1.0.10
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.10](https://github.com/Doist/typist/compare/v1.0.9...v1.0.10) (2022-12-19)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- Add required ProseMirror dependencies to package ([#73](https://github.com/Doist/typist/issues/73)) ([cd605c0](https://github.com/Doist/typist/commit/cd605c0606a980516e586f3a6d0915f2c13704a9))
|
|
6
|
+
|
|
7
|
+
## [1.0.9](https://github.com/Doist/typist/compare/v1.0.8...v1.0.9) (2022-12-19)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **rich-text-link:** More lenient regex for input/paste rule ([#72](https://github.com/Doist/typist/issues/72)) ([98e363f](https://github.com/Doist/typist/commit/98e363f27e6e403a775ca8fe729ce17dbdf721df))
|
|
12
|
+
|
|
1
13
|
## [1.0.8](https://github.com/Doist/typist/compare/v1.0.7...v1.0.8) (2022-12-19)
|
|
2
14
|
|
|
3
15
|
### Bug Fixes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rich-text-link.d.ts","sourceRoot":"","sources":["../../../src/extensions/rich-text/rich-text-link.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"rich-text-link.d.ts","sourceRoot":"","sources":["../../../src/extensions/rich-text/rich-text-link.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAuDzD;;;;GAIG;AACH,QAAA,MAAM,YAAY,+CA8ChB,CAAA;AAEF,OAAO,EAAE,YAAY,EAAE,CAAA;AAEvB,YAAY,EAAE,WAAW,IAAI,mBAAmB,EAAE,CAAA"}
|
|
@@ -3,17 +3,13 @@ import { Link } from '@tiptap/extension-link';
|
|
|
3
3
|
/**
|
|
4
4
|
* The input regex for Markdown links with title support, and multiple quotation marks (required
|
|
5
5
|
* in case the `Typography` extension is being included).
|
|
6
|
-
*
|
|
7
|
-
* @see https://stephenweiss.dev/regex-markdown-link
|
|
8
6
|
*/
|
|
9
|
-
const inputRegex = /(?:^|\s)\[([^\]]*)?\]\((
|
|
7
|
+
const inputRegex = /(?:^|\s)\[([^\]]*)?\]\((\S+)(?: ["“](.+)["”])?\)$/i;
|
|
10
8
|
/**
|
|
11
9
|
* The paste regex for Markdown links with title support, and multiple quotation marks (required
|
|
12
10
|
* in case the `Typography` extension is being included).
|
|
13
|
-
*
|
|
14
|
-
* @see https://stephenweiss.dev/regex-markdown-link
|
|
15
11
|
*/
|
|
16
|
-
const pasteRegex = /(?:^|\s)\[([^\]]*)?\]\((
|
|
12
|
+
const pasteRegex = /(?:^|\s)\[([^\]]*)?\]\((\S+)(?: ["“](.+)["”])?\)/gi;
|
|
17
13
|
/**
|
|
18
14
|
* Input rule built specifically for the `Link` extension, which ignores the auto-linked URL in
|
|
19
15
|
* parentheses (e.g., `(https://doist.dev)`).
|
|
@@ -24,7 +20,7 @@ function linkInputRule(config) {
|
|
|
24
20
|
const defaultMarkInputRule = markInputRule(config);
|
|
25
21
|
return new InputRule({
|
|
26
22
|
find: config.find,
|
|
27
|
-
handler
|
|
23
|
+
handler(props) {
|
|
28
24
|
const { tr } = props.state;
|
|
29
25
|
defaultMarkInputRule.handler(props);
|
|
30
26
|
tr.setMeta('preventAutolink', true);
|
|
@@ -42,7 +38,7 @@ function linkPasteRule(config) {
|
|
|
42
38
|
const defaultMarkInputRule = markPasteRule(config);
|
|
43
39
|
return new PasteRule({
|
|
44
40
|
find: config.find,
|
|
45
|
-
handler
|
|
41
|
+
handler(props) {
|
|
46
42
|
const { tr } = props.state;
|
|
47
43
|
defaultMarkInputRule.handler(props);
|
|
48
44
|
tr.setMeta('preventAutolink', true);
|
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.10",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://typist.doist.dev/",
|
|
7
7
|
"repository": "https://github.com/Doist/typist",
|
|
@@ -75,22 +75,37 @@
|
|
|
75
75
|
"@tiptap/react": "2.0.0-beta.207",
|
|
76
76
|
"@tiptap/suggestion": "2.0.0-beta.207",
|
|
77
77
|
"prosemirror-codemark": "0.4.2",
|
|
78
|
+
"prosemirror-changeset": "2.2.0",
|
|
79
|
+
"prosemirror-collab": "1.3.0",
|
|
80
|
+
"prosemirror-commands": "1.5.0",
|
|
81
|
+
"prosemirror-dropcursor": "1.5.0",
|
|
82
|
+
"prosemirror-gapcursor": "1.3.1",
|
|
83
|
+
"prosemirror-history": "1.3.0",
|
|
84
|
+
"prosemirror-inputrules": "1.2.0",
|
|
85
|
+
"prosemirror-keymap": "1.2.0",
|
|
86
|
+
"prosemirror-markdown": "1.10.1",
|
|
87
|
+
"prosemirror-menu": "1.2.1",
|
|
78
88
|
"prosemirror-model": "1.18.3",
|
|
89
|
+
"prosemirror-schema-basic": "1.2.0",
|
|
90
|
+
"prosemirror-schema-list": "1.2.2",
|
|
79
91
|
"prosemirror-state": "1.4.2",
|
|
92
|
+
"prosemirror-tables": "1.3.0",
|
|
93
|
+
"prosemirror-trailing-node": "2.0.2",
|
|
94
|
+
"prosemirror-transform": "1.7.0",
|
|
80
95
|
"prosemirror-view": "1.29.1"
|
|
81
96
|
},
|
|
82
97
|
"devDependencies": {
|
|
83
98
|
"@doist/eslint-config": "8.1.3",
|
|
84
99
|
"@doist/prettier-config": "3.0.5",
|
|
85
|
-
"@doist/reactist": "17.
|
|
86
|
-
"@mdx-js/react": "2.1
|
|
100
|
+
"@doist/reactist": "17.5.0",
|
|
101
|
+
"@mdx-js/react": "2.2.1",
|
|
87
102
|
"@semantic-release/changelog": "6.0.2",
|
|
88
103
|
"@semantic-release/exec": "6.0.3",
|
|
89
104
|
"@semantic-release/git": "10.0.1",
|
|
90
105
|
"@storybook/addon-a11y": "6.5.14",
|
|
91
106
|
"@storybook/addon-essentials": "6.5.14",
|
|
92
107
|
"@storybook/addons": "6.5.14",
|
|
93
|
-
"@storybook/builder-vite": "0.2.
|
|
108
|
+
"@storybook/builder-vite": "0.2.6",
|
|
94
109
|
"@storybook/mdx2-csf": "0.0.3",
|
|
95
110
|
"@storybook/react": "6.5.14",
|
|
96
111
|
"@testing-library/dom": "8.19.0",
|
|
@@ -112,7 +127,7 @@
|
|
|
112
127
|
"eslint-import-resolver-typescript": "3.5.2",
|
|
113
128
|
"eslint-plugin-jest": "27.1.6",
|
|
114
129
|
"eslint-plugin-simple-import-sort": "8.0.0",
|
|
115
|
-
"eslint-plugin-unicorn": "45.0.
|
|
130
|
+
"eslint-plugin-unicorn": "45.0.2",
|
|
116
131
|
"github-markdown-css": "5.1.0",
|
|
117
132
|
"husky": "8.0.2",
|
|
118
133
|
"ignore-sync": "6.0.2",
|
|
@@ -132,7 +147,7 @@
|
|
|
132
147
|
"storybook-css-modules": "1.0.8",
|
|
133
148
|
"ts-jest": "29.0.3",
|
|
134
149
|
"ts-node": "10.9.1",
|
|
135
|
-
"type-fest": "3.
|
|
150
|
+
"type-fest": "3.4.0",
|
|
136
151
|
"typescript": "4.9.4",
|
|
137
152
|
"typescript-plugin-css-modules": "4.1.1"
|
|
138
153
|
},
|