@doist/typist 7.0.5 → 7.0.7
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
|
+
## [7.0.7](https://github.com/Doist/typist/compare/v7.0.6...v7.0.7) (2025-01-27)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **deps:** update tiptap packages to v2.11.2 ([#1006](https://github.com/Doist/typist/issues/1006)) ([87dcb3a](https://github.com/Doist/typist/commit/87dcb3a2685a701d2991d74ee8374833f614068e))
|
|
6
|
+
|
|
7
|
+
## [7.0.6](https://github.com/Doist/typist/compare/v7.0.5...v7.0.6) (2025-01-07)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **rich-text-code:** Retore original Tiptap input/paste rules ([#999](https://github.com/Doist/typist/issues/999)) ([6673d83](https://github.com/Doist/typist/commit/6673d83e1e6985cfcd68e5f836518f7edee8d444))
|
|
12
|
+
|
|
1
13
|
## [7.0.5](https://github.com/Doist/typist/compare/v7.0.4...v7.0.5) (2025-01-07)
|
|
2
14
|
|
|
3
15
|
### Bug Fixes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rich-text-code.d.ts","sourceRoot":"","sources":["../../../src/extensions/rich-text/rich-text-code.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rich-text-code.d.ts","sourceRoot":"","sources":["../../../src/extensions/rich-text/rich-text-code.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAEzD;;GAEG;AACH,KAAK,mBAAmB,GAAG,WAAW,CAAA;AActC;;;;;;;GAOG;AACH,QAAA,MAAM,YAAY,+CAmBhB,CAAA;AAEF,OAAO,EAAE,YAAY,EAAE,CAAA;AAEvB,YAAY,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
+
import { markInputRule, markPasteRule } from '@tiptap/core';
|
|
1
2
|
import { Code } from '@tiptap/extension-code';
|
|
2
3
|
import { CODE_EXTENSION_PRIORITY } from '../../constants/extension-priorities';
|
|
4
|
+
/**
|
|
5
|
+
* The original input regex for Markdown inline code (i.e. `<code>code</code>`) to prevent the issue
|
|
6
|
+
* introduced in this PR: https://github.com/ueberdosis/tiptap/pull/4468#issuecomment-2575093998
|
|
7
|
+
*/
|
|
8
|
+
const inputRegex = /(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))$/;
|
|
9
|
+
/**
|
|
10
|
+
* The original paste regex for Markdown inline code (i.e. `<code>code</code>`) to prevent the issue
|
|
11
|
+
* introduced in this PR: https://github.com/ueberdosis/tiptap/pull/4468#issuecomment-2575093998
|
|
12
|
+
*/
|
|
13
|
+
const pasteRegex = /(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))/g;
|
|
3
14
|
/**
|
|
4
15
|
* Custom extension that extends the built-in `Code` extension to allow all marks (e.g., Bold,
|
|
5
16
|
* Italic, and Strikethrough) to coexist with the `Code` mark (as opposed to disallowing all any
|
|
@@ -11,5 +22,21 @@ import { CODE_EXTENSION_PRIORITY } from '../../constants/extension-priorities';
|
|
|
11
22
|
const RichTextCode = Code.extend({
|
|
12
23
|
priority: CODE_EXTENSION_PRIORITY,
|
|
13
24
|
excludes: Code.name,
|
|
25
|
+
addInputRules() {
|
|
26
|
+
return [
|
|
27
|
+
markInputRule({
|
|
28
|
+
find: inputRegex,
|
|
29
|
+
type: this.type,
|
|
30
|
+
}),
|
|
31
|
+
];
|
|
32
|
+
},
|
|
33
|
+
addPasteRules() {
|
|
34
|
+
return [
|
|
35
|
+
markPasteRule({
|
|
36
|
+
find: pasteRegex,
|
|
37
|
+
type: this.type,
|
|
38
|
+
}),
|
|
39
|
+
];
|
|
40
|
+
},
|
|
14
41
|
});
|
|
15
42
|
export { RichTextCode };
|
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": "7.0.
|
|
4
|
+
"version": "7.0.7",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://typist.doist.dev/",
|
|
7
7
|
"repository": "https://github.com/Doist/typist",
|
|
@@ -45,58 +45,58 @@
|
|
|
45
45
|
"validate:pre-push": "run-s test"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@tiptap/core": "2.11.
|
|
49
|
-
"@tiptap/extension-blockquote": "2.11.
|
|
50
|
-
"@tiptap/extension-bold": "2.11.
|
|
51
|
-
"@tiptap/extension-bullet-list": "2.11.
|
|
52
|
-
"@tiptap/extension-character-count": "2.11.
|
|
53
|
-
"@tiptap/extension-code": "2.11.
|
|
54
|
-
"@tiptap/extension-code-block": "2.11.
|
|
55
|
-
"@tiptap/extension-document": "2.11.
|
|
56
|
-
"@tiptap/extension-dropcursor": "2.11.
|
|
57
|
-
"@tiptap/extension-gapcursor": "2.11.
|
|
58
|
-
"@tiptap/extension-hard-break": "2.11.
|
|
59
|
-
"@tiptap/extension-heading": "2.11.
|
|
60
|
-
"@tiptap/extension-history": "2.11.
|
|
61
|
-
"@tiptap/extension-horizontal-rule": "2.11.
|
|
62
|
-
"@tiptap/extension-image": "2.11.
|
|
63
|
-
"@tiptap/extension-italic": "2.11.
|
|
64
|
-
"@tiptap/extension-link": "2.11.
|
|
65
|
-
"@tiptap/extension-list-item": "2.11.
|
|
66
|
-
"@tiptap/extension-list-keymap": "2.11.
|
|
67
|
-
"@tiptap/extension-ordered-list": "2.11.
|
|
68
|
-
"@tiptap/extension-paragraph": "2.11.
|
|
69
|
-
"@tiptap/extension-placeholder": "2.11.
|
|
70
|
-
"@tiptap/extension-strike": "2.11.
|
|
71
|
-
"@tiptap/extension-task-item": "2.11.
|
|
72
|
-
"@tiptap/extension-task-list": "2.11.
|
|
73
|
-
"@tiptap/extension-text": "2.11.
|
|
74
|
-
"@tiptap/extension-text-style": "2.11.
|
|
75
|
-
"@tiptap/extension-typography": "2.11.
|
|
76
|
-
"@tiptap/pm": "2.11.
|
|
77
|
-
"@tiptap/react": "2.11.
|
|
78
|
-
"@tiptap/suggestion": "2.11.
|
|
48
|
+
"@tiptap/core": "2.11.2",
|
|
49
|
+
"@tiptap/extension-blockquote": "2.11.2",
|
|
50
|
+
"@tiptap/extension-bold": "2.11.2",
|
|
51
|
+
"@tiptap/extension-bullet-list": "2.11.2",
|
|
52
|
+
"@tiptap/extension-character-count": "2.11.2",
|
|
53
|
+
"@tiptap/extension-code": "2.11.2",
|
|
54
|
+
"@tiptap/extension-code-block": "2.11.2",
|
|
55
|
+
"@tiptap/extension-document": "2.11.2",
|
|
56
|
+
"@tiptap/extension-dropcursor": "2.11.2",
|
|
57
|
+
"@tiptap/extension-gapcursor": "2.11.2",
|
|
58
|
+
"@tiptap/extension-hard-break": "2.11.2",
|
|
59
|
+
"@tiptap/extension-heading": "2.11.2",
|
|
60
|
+
"@tiptap/extension-history": "2.11.2",
|
|
61
|
+
"@tiptap/extension-horizontal-rule": "2.11.2",
|
|
62
|
+
"@tiptap/extension-image": "2.11.2",
|
|
63
|
+
"@tiptap/extension-italic": "2.11.2",
|
|
64
|
+
"@tiptap/extension-link": "2.11.2",
|
|
65
|
+
"@tiptap/extension-list-item": "2.11.2",
|
|
66
|
+
"@tiptap/extension-list-keymap": "2.11.2",
|
|
67
|
+
"@tiptap/extension-ordered-list": "2.11.2",
|
|
68
|
+
"@tiptap/extension-paragraph": "2.11.2",
|
|
69
|
+
"@tiptap/extension-placeholder": "2.11.2",
|
|
70
|
+
"@tiptap/extension-strike": "2.11.2",
|
|
71
|
+
"@tiptap/extension-task-item": "2.11.2",
|
|
72
|
+
"@tiptap/extension-task-list": "2.11.2",
|
|
73
|
+
"@tiptap/extension-text": "2.11.2",
|
|
74
|
+
"@tiptap/extension-text-style": "2.11.2",
|
|
75
|
+
"@tiptap/extension-typography": "2.11.2",
|
|
76
|
+
"@tiptap/pm": "2.11.2",
|
|
77
|
+
"@tiptap/react": "2.11.2",
|
|
78
|
+
"@tiptap/suggestion": "2.11.2",
|
|
79
79
|
"prosemirror-codemark": "0.4.2"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@doist/eslint-config": "11.1.0",
|
|
83
83
|
"@doist/prettier-config": "4.0.0",
|
|
84
|
-
"@doist/reactist": "
|
|
84
|
+
"@doist/reactist": "27.2.2",
|
|
85
85
|
"@mdx-js/react": "3.1.0",
|
|
86
86
|
"@semantic-release/changelog": "6.0.3",
|
|
87
87
|
"@semantic-release/exec": "6.0.3",
|
|
88
88
|
"@semantic-release/git": "10.0.1",
|
|
89
|
-
"@storybook/addon-a11y": "8.
|
|
90
|
-
"@storybook/addon-essentials": "8.
|
|
91
|
-
"@storybook/blocks": "8.
|
|
89
|
+
"@storybook/addon-a11y": "8.5.0",
|
|
90
|
+
"@storybook/addon-essentials": "8.5.0",
|
|
91
|
+
"@storybook/blocks": "8.5.0",
|
|
92
92
|
"@storybook/csf": "0.1.13",
|
|
93
|
-
"@storybook/manager-api": "8.
|
|
93
|
+
"@storybook/manager-api": "8.5.0",
|
|
94
94
|
"@storybook/mdx2-csf": "1.1.0",
|
|
95
|
-
"@storybook/react": "8.
|
|
96
|
-
"@storybook/react-vite": "8.
|
|
95
|
+
"@storybook/react": "8.5.0",
|
|
96
|
+
"@storybook/react-vite": "8.5.0",
|
|
97
97
|
"@testing-library/dom": "10.4.0",
|
|
98
98
|
"@testing-library/jest-dom": "6.6.3",
|
|
99
|
-
"@testing-library/react": "16.
|
|
99
|
+
"@testing-library/react": "16.2.0",
|
|
100
100
|
"@types/hast": "3.0.4",
|
|
101
101
|
"@types/lodash-es": "4.17.12",
|
|
102
102
|
"@types/react": "18.3.18",
|
|
@@ -121,27 +121,27 @@
|
|
|
121
121
|
"husky": "9.1.7",
|
|
122
122
|
"ignore-sync": "8.0.0",
|
|
123
123
|
"is-ci": "4.1.0",
|
|
124
|
-
"jsdom": "
|
|
125
|
-
"lint-staged": "15.
|
|
124
|
+
"jsdom": "26.0.0",
|
|
125
|
+
"lint-staged": "15.4.1",
|
|
126
126
|
"npm-run-all2": "7.0.2",
|
|
127
127
|
"prettier": "3.2.5",
|
|
128
128
|
"react": "18.3.1",
|
|
129
129
|
"react-dom": "18.3.1",
|
|
130
130
|
"react-icons": "5.4.0",
|
|
131
|
-
"react-markdown": "9.0.
|
|
131
|
+
"react-markdown": "9.0.3",
|
|
132
132
|
"react-syntax-highlighter": "15.6.1",
|
|
133
133
|
"react-use-event-hook": "0.9.6",
|
|
134
134
|
"rehype-raw": "7.0.0",
|
|
135
135
|
"remark-gfm": "4.0.0",
|
|
136
136
|
"rimraf": "6.0.1",
|
|
137
|
-
"semantic-release": "24.2.
|
|
138
|
-
"storybook": "8.
|
|
137
|
+
"semantic-release": "24.2.1",
|
|
138
|
+
"storybook": "8.5.0",
|
|
139
139
|
"storybook-css-modules": "1.0.8",
|
|
140
140
|
"tippy.js": "6.3.7",
|
|
141
|
-
"type-fest": "4.
|
|
142
|
-
"typescript": "5.7.
|
|
141
|
+
"type-fest": "4.33.0",
|
|
142
|
+
"typescript": "5.7.3",
|
|
143
143
|
"typescript-plugin-css-modules": "5.1.0",
|
|
144
|
-
"vitest": "
|
|
144
|
+
"vitest": "3.0.3"
|
|
145
145
|
},
|
|
146
146
|
"peerDependencies": {
|
|
147
147
|
"emoji-regex": "^10.2.1",
|