@doist/typist 1.4.6 → 1.4.8

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.4.8](https://github.com/Doist/typist/compare/v1.4.7...v1.4.8) (2023-08-28)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **rich-text-link:** Markdown pasting broken with conflicting `linkOnPaste` option ([#411](https://github.com/Doist/typist/issues/411)) ([2df2ba9](https://github.com/Doist/typist/commit/2df2ba94208357cbeaa3a9ac482503ac843e9b06))
6
+
7
+ ## [1.4.7](https://github.com/Doist/typist/compare/v1.4.6...v1.4.7) (2023-08-24)
8
+
9
+ ### Bug Fixes
10
+
11
+ - **deps:** update tiptap packages to v2.1.7 ([#407](https://github.com/Doist/typist/issues/407)) ([0df2f58](https://github.com/Doist/typist/commit/0df2f58ee912b8447d50c63b1790c8623ccf0ab7))
12
+
1
13
  ## [1.4.6](https://github.com/Doist/typist/compare/v1.4.5...v1.4.6) (2023-08-24)
2
14
 
3
15
  ### Bug Fixes
@@ -1,10 +1,14 @@
1
1
  import type { LinkOptions } from '@tiptap/extension-link';
2
+ /**
3
+ * The options available to customize the `RichTextLink` extension.
4
+ */
5
+ type RichTextLinkOptions = Omit<LinkOptions, 'linkOnPaste'>;
2
6
  /**
3
7
  * Custom extension that extends the built-in `Link` extension to add additional input/paste rules
4
8
  * for converting the Markdown link syntax (i.e. `[Doist](https://doist.com)`) into links, and also
5
9
  * adds support for the `title` attribute.
6
10
  */
7
- declare const RichTextLink: import("@tiptap/core").Mark<LinkOptions, any>;
11
+ declare const RichTextLink: import("@tiptap/core").Mark<RichTextLinkOptions, any>;
8
12
  export { RichTextLink };
9
- export type { LinkOptions as RichTextLinkOptions };
13
+ export type { RichTextLinkOptions };
10
14
  //# sourceMappingURL=rich-text-link.d.ts.map
@@ -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;AAuDzD;;;;GAIG;AACH,QAAA,MAAM,YAAY,+CA8ChB,CAAA;AAEF,OAAO,EAAE,YAAY,EAAE,CAAA;AAEvB,YAAY,EAAE,WAAW,IAAI,mBAAmB,EAAE,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;;GAEG;AACH,KAAK,mBAAmB,GAAG,IAAI,CAC3B,WAAW,EAGX,aAAa,CAChB,CAAA;AAED;;;;GAIG;AACH,QAAA,MAAM,YAAY,uDAuDhB,CAAA;AAEF,OAAO,EAAE,YAAY,EAAE,CAAA;AAEvB,YAAY,EAAE,mBAAmB,EAAE,CAAA"}
@@ -52,6 +52,15 @@ function linkPasteRule(config) {
52
52
  */
53
53
  const RichTextLink = Link.extend({
54
54
  inclusive: false,
55
+ addOptions() {
56
+ return {
57
+ ...this.parent?.(),
58
+ // Disable the built-in auto-linking feature for pasted URLs, since we're using our own
59
+ // paste rules to handle Markdown syntax (on top of that, the `PasteMarkdown` extension
60
+ // takes precedence, and will handle auto-linking for pasted URLs anyway)
61
+ linkOnPaste: false,
62
+ };
63
+ },
55
64
  addAttributes() {
56
65
  return {
57
66
  ...this.parent?.(),
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.4.6",
4
+ "version": "1.4.8",
5
5
  "license": "MIT",
6
6
  "homepage": "https://typist.doist.dev/",
7
7
  "repository": "https://github.com/Doist/typist",
@@ -46,36 +46,36 @@
46
46
  "validate:pre-push": "run-s test"
47
47
  },
48
48
  "dependencies": {
49
- "@tiptap/core": "2.1.6",
50
- "@tiptap/extension-blockquote": "2.1.6",
51
- "@tiptap/extension-bold": "2.1.6",
52
- "@tiptap/extension-bullet-list": "2.1.6",
53
- "@tiptap/extension-character-count": "2.1.6",
54
- "@tiptap/extension-code": "2.1.6",
55
- "@tiptap/extension-code-block": "2.1.6",
56
- "@tiptap/extension-document": "2.1.6",
57
- "@tiptap/extension-dropcursor": "2.1.6",
58
- "@tiptap/extension-gapcursor": "2.1.6",
59
- "@tiptap/extension-hard-break": "2.1.6",
60
- "@tiptap/extension-heading": "2.1.6",
61
- "@tiptap/extension-history": "2.1.6",
62
- "@tiptap/extension-horizontal-rule": "2.1.6",
63
- "@tiptap/extension-image": "2.1.6",
64
- "@tiptap/extension-italic": "2.1.6",
65
- "@tiptap/extension-link": "2.1.6",
66
- "@tiptap/extension-list-item": "2.1.6",
67
- "@tiptap/extension-list-keymap": "2.1.6",
68
- "@tiptap/extension-ordered-list": "2.1.6",
69
- "@tiptap/extension-paragraph": "2.1.6",
70
- "@tiptap/extension-placeholder": "2.1.6",
71
- "@tiptap/extension-strike": "2.1.6",
72
- "@tiptap/extension-task-item": "2.1.6",
73
- "@tiptap/extension-task-list": "2.1.6",
74
- "@tiptap/extension-text": "2.1.6",
75
- "@tiptap/extension-typography": "2.1.6",
76
- "@tiptap/pm": "2.1.6",
77
- "@tiptap/react": "2.1.6",
78
- "@tiptap/suggestion": "2.1.6",
49
+ "@tiptap/core": "2.1.7",
50
+ "@tiptap/extension-blockquote": "2.1.7",
51
+ "@tiptap/extension-bold": "2.1.7",
52
+ "@tiptap/extension-bullet-list": "2.1.7",
53
+ "@tiptap/extension-character-count": "2.1.7",
54
+ "@tiptap/extension-code": "2.1.7",
55
+ "@tiptap/extension-code-block": "2.1.7",
56
+ "@tiptap/extension-document": "2.1.7",
57
+ "@tiptap/extension-dropcursor": "2.1.7",
58
+ "@tiptap/extension-gapcursor": "2.1.7",
59
+ "@tiptap/extension-hard-break": "2.1.7",
60
+ "@tiptap/extension-heading": "2.1.7",
61
+ "@tiptap/extension-history": "2.1.7",
62
+ "@tiptap/extension-horizontal-rule": "2.1.7",
63
+ "@tiptap/extension-image": "2.1.7",
64
+ "@tiptap/extension-italic": "2.1.7",
65
+ "@tiptap/extension-link": "2.1.7",
66
+ "@tiptap/extension-list-item": "2.1.7",
67
+ "@tiptap/extension-list-keymap": "2.1.7",
68
+ "@tiptap/extension-ordered-list": "2.1.7",
69
+ "@tiptap/extension-paragraph": "2.1.7",
70
+ "@tiptap/extension-placeholder": "2.1.7",
71
+ "@tiptap/extension-strike": "2.1.7",
72
+ "@tiptap/extension-task-item": "2.1.7",
73
+ "@tiptap/extension-task-list": "2.1.7",
74
+ "@tiptap/extension-text": "2.1.7",
75
+ "@tiptap/extension-typography": "2.1.7",
76
+ "@tiptap/pm": "2.1.7",
77
+ "@tiptap/react": "2.1.7",
78
+ "@tiptap/suggestion": "2.1.7",
79
79
  "prosemirror-codemark": "0.4.2"
80
80
  },
81
81
  "devDependencies": {
@@ -94,7 +94,7 @@
94
94
  "@storybook/react": "7.3.2",
95
95
  "@storybook/react-vite": "7.3.2",
96
96
  "@testing-library/dom": "9.3.1",
97
- "@testing-library/jest-dom": "6.0.1",
97
+ "@testing-library/jest-dom": "6.1.2",
98
98
  "@testing-library/react": "14.0.0",
99
99
  "@types/lodash-es": "4.17.8",
100
100
  "@types/react": "18.2.21",