@doist/typist 7.0.4 → 7.0.6
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.6](https://github.com/Doist/typist/compare/v7.0.5...v7.0.6) (2025-01-07)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **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))
|
|
6
|
+
|
|
7
|
+
## [7.0.5](https://github.com/Doist/typist/compare/v7.0.4...v7.0.5) (2025-01-07)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **deps:** update tiptap packages to v2.11.0 ([#992](https://github.com/Doist/typist/issues/992)) ([a13270e](https://github.com/Doist/typist/commit/a13270efa093acd76961cf174edbb83522402a6e))
|
|
12
|
+
|
|
1
13
|
## [7.0.4](https://github.com/Doist/typist/compare/v7.0.3...v7.0.4) (2024-12-11)
|
|
2
14
|
|
|
3
15
|
### Bug Fixes
|
package/LICENSE
CHANGED
|
@@ -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.6",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://typist.doist.dev/",
|
|
7
7
|
"repository": "https://github.com/Doist/typist",
|
|
@@ -45,43 +45,43 @@
|
|
|
45
45
|
"validate:pre-push": "run-s test"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@tiptap/core": "2.
|
|
49
|
-
"@tiptap/extension-blockquote": "2.
|
|
50
|
-
"@tiptap/extension-bold": "2.
|
|
51
|
-
"@tiptap/extension-bullet-list": "2.
|
|
52
|
-
"@tiptap/extension-character-count": "2.
|
|
53
|
-
"@tiptap/extension-code": "2.
|
|
54
|
-
"@tiptap/extension-code-block": "2.
|
|
55
|
-
"@tiptap/extension-document": "2.
|
|
56
|
-
"@tiptap/extension-dropcursor": "2.
|
|
57
|
-
"@tiptap/extension-gapcursor": "2.
|
|
58
|
-
"@tiptap/extension-hard-break": "2.
|
|
59
|
-
"@tiptap/extension-heading": "2.
|
|
60
|
-
"@tiptap/extension-history": "2.
|
|
61
|
-
"@tiptap/extension-horizontal-rule": "2.
|
|
62
|
-
"@tiptap/extension-image": "2.
|
|
63
|
-
"@tiptap/extension-italic": "2.
|
|
64
|
-
"@tiptap/extension-link": "2.
|
|
65
|
-
"@tiptap/extension-list-item": "2.
|
|
66
|
-
"@tiptap/extension-list-keymap": "2.
|
|
67
|
-
"@tiptap/extension-ordered-list": "2.
|
|
68
|
-
"@tiptap/extension-paragraph": "2.
|
|
69
|
-
"@tiptap/extension-placeholder": "2.
|
|
70
|
-
"@tiptap/extension-strike": "2.
|
|
71
|
-
"@tiptap/extension-task-item": "2.
|
|
72
|
-
"@tiptap/extension-task-list": "2.
|
|
73
|
-
"@tiptap/extension-text": "2.
|
|
74
|
-
"@tiptap/extension-text-style": "2.
|
|
75
|
-
"@tiptap/extension-typography": "2.
|
|
76
|
-
"@tiptap/pm": "2.
|
|
77
|
-
"@tiptap/react": "2.
|
|
78
|
-
"@tiptap/suggestion": "2.
|
|
48
|
+
"@tiptap/core": "2.11.0",
|
|
49
|
+
"@tiptap/extension-blockquote": "2.11.0",
|
|
50
|
+
"@tiptap/extension-bold": "2.11.0",
|
|
51
|
+
"@tiptap/extension-bullet-list": "2.11.0",
|
|
52
|
+
"@tiptap/extension-character-count": "2.11.0",
|
|
53
|
+
"@tiptap/extension-code": "2.11.0",
|
|
54
|
+
"@tiptap/extension-code-block": "2.11.0",
|
|
55
|
+
"@tiptap/extension-document": "2.11.0",
|
|
56
|
+
"@tiptap/extension-dropcursor": "2.11.0",
|
|
57
|
+
"@tiptap/extension-gapcursor": "2.11.0",
|
|
58
|
+
"@tiptap/extension-hard-break": "2.11.0",
|
|
59
|
+
"@tiptap/extension-heading": "2.11.0",
|
|
60
|
+
"@tiptap/extension-history": "2.11.0",
|
|
61
|
+
"@tiptap/extension-horizontal-rule": "2.11.0",
|
|
62
|
+
"@tiptap/extension-image": "2.11.0",
|
|
63
|
+
"@tiptap/extension-italic": "2.11.0",
|
|
64
|
+
"@tiptap/extension-link": "2.11.0",
|
|
65
|
+
"@tiptap/extension-list-item": "2.11.0",
|
|
66
|
+
"@tiptap/extension-list-keymap": "2.11.0",
|
|
67
|
+
"@tiptap/extension-ordered-list": "2.11.0",
|
|
68
|
+
"@tiptap/extension-paragraph": "2.11.0",
|
|
69
|
+
"@tiptap/extension-placeholder": "2.11.0",
|
|
70
|
+
"@tiptap/extension-strike": "2.11.0",
|
|
71
|
+
"@tiptap/extension-task-item": "2.11.0",
|
|
72
|
+
"@tiptap/extension-task-list": "2.11.0",
|
|
73
|
+
"@tiptap/extension-text": "2.11.0",
|
|
74
|
+
"@tiptap/extension-text-style": "2.11.0",
|
|
75
|
+
"@tiptap/extension-typography": "2.11.0",
|
|
76
|
+
"@tiptap/pm": "2.11.0",
|
|
77
|
+
"@tiptap/react": "2.11.0",
|
|
78
|
+
"@tiptap/suggestion": "2.11.0",
|
|
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": "26.2.
|
|
84
|
+
"@doist/reactist": "26.2.5",
|
|
85
85
|
"@mdx-js/react": "3.1.0",
|
|
86
86
|
"@semantic-release/changelog": "6.0.3",
|
|
87
87
|
"@semantic-release/exec": "6.0.3",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"@storybook/addon-a11y": "8.4.7",
|
|
90
90
|
"@storybook/addon-essentials": "8.4.7",
|
|
91
91
|
"@storybook/blocks": "8.4.7",
|
|
92
|
-
"@storybook/csf": "0.1.
|
|
92
|
+
"@storybook/csf": "0.1.13",
|
|
93
93
|
"@storybook/manager-api": "8.4.7",
|
|
94
94
|
"@storybook/mdx2-csf": "1.1.0",
|
|
95
95
|
"@storybook/react": "8.4.7",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"@testing-library/react": "16.1.0",
|
|
100
100
|
"@types/hast": "3.0.4",
|
|
101
101
|
"@types/lodash-es": "4.17.12",
|
|
102
|
-
"@types/react": "18.3.
|
|
103
|
-
"@types/react-dom": "18.3.
|
|
102
|
+
"@types/react": "18.3.18",
|
|
103
|
+
"@types/react-dom": "18.3.5",
|
|
104
104
|
"@types/react-syntax-highlighter": "15.5.13",
|
|
105
105
|
"@types/turndown": "5.0.5",
|
|
106
106
|
"@types/unist": "3.0.3",
|
|
@@ -119,11 +119,11 @@
|
|
|
119
119
|
"eslint-plugin-vitest-globals": "1.5.0",
|
|
120
120
|
"github-markdown-css": "5.8.1",
|
|
121
121
|
"husky": "9.1.7",
|
|
122
|
-
"ignore-sync": "
|
|
123
|
-
"is-ci": "
|
|
122
|
+
"ignore-sync": "8.0.0",
|
|
123
|
+
"is-ci": "4.1.0",
|
|
124
124
|
"jsdom": "25.0.1",
|
|
125
|
-
"lint-staged": "15.
|
|
126
|
-
"npm-run-all2": "7.0.
|
|
125
|
+
"lint-staged": "15.3.0",
|
|
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",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
"storybook": "8.4.7",
|
|
139
139
|
"storybook-css-modules": "1.0.8",
|
|
140
140
|
"tippy.js": "6.3.7",
|
|
141
|
-
"type-fest": "4.
|
|
141
|
+
"type-fest": "4.31.0",
|
|
142
142
|
"typescript": "5.7.2",
|
|
143
143
|
"typescript-plugin-css-modules": "5.1.0",
|
|
144
144
|
"vitest": "2.1.8"
|