@doist/typist 1.3.1 → 1.4.0

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.0](https://github.com/Doist/typist/compare/v1.3.2...v1.4.0) (2023-06-20)
2
+
3
+ ### Features
4
+
5
+ - Allow all marks to coexist with the Code mark ([#309](https://github.com/Doist/typist/issues/309)) ([ac06735](https://github.com/Doist/typist/commit/ac067352d97f6c7987ae94a47855654cfbf1dda6))
6
+
7
+ ## [1.3.2](https://github.com/Doist/typist/compare/v1.3.1...v1.3.2) (2023-06-19)
8
+
9
+ ### Bug Fixes
10
+
11
+ - Extra paragraph node inserted above an Horizontal Rule ([#313](https://github.com/Doist/typist/issues/313)) ([3852309](https://github.com/Doist/typist/commit/38523099af792428531162655a1aabd2bdc9b6ad))
12
+
1
13
  ## [1.3.1](https://github.com/Doist/typist/compare/v1.3.0...v1.3.1) (2023-06-13)
2
14
 
3
15
  ### Bug Fixes
@@ -28,5 +28,11 @@ declare const VIEW_EVENT_HANDLERS_PRIORITY = 105;
28
28
  * precedence over the `Bold` extension keyboard shortcut.
29
29
  */
30
30
  declare const BLOCKQUOTE_EXTENSION_PRIORITY = 101;
31
- export { BLOCKQUOTE_EXTENSION_PRIORITY, PASTE_EXTENSION_PRIORITY, SMART_MARKDOWN_TYPING_PRIORITY, SUGGESTION_EXTENSION_PRIORITY, VIEW_EVENT_HANDLERS_PRIORITY, };
31
+ /**
32
+ * Priority for the `RichTextCode` extension. This needs to be lower than the default for most
33
+ * built-in and official extensions (i.e. `100`), so that other marks wrap the `Code` mark, and not
34
+ * the other way around (i.e. prevents `<code><em>code</em></code>` from happening).
35
+ */
36
+ declare const CODE_EXTENSION_PRIORITY = 99;
37
+ export { BLOCKQUOTE_EXTENSION_PRIORITY, CODE_EXTENSION_PRIORITY, PASTE_EXTENSION_PRIORITY, SMART_MARKDOWN_TYPING_PRIORITY, SUGGESTION_EXTENSION_PRIORITY, VIEW_EVENT_HANDLERS_PRIORITY, };
32
38
  //# sourceMappingURL=extension-priorities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"extension-priorities.d.ts","sourceRoot":"","sources":["../../src/constants/extension-priorities.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,QAAA,MAAM,6BAA6B,OAAO,CAAA;AAE1C;;;;GAIG;AACH,QAAA,MAAM,8BAA8B,MAAM,CAAA;AAE1C;;;;GAIG;AACH,QAAA,MAAM,wBAAwB,MAAM,CAAA;AAEpC;;;;GAIG;AACH,QAAA,MAAM,4BAA4B,MAAM,CAAA;AAExC;;;;GAIG;AACH,QAAA,MAAM,6BAA6B,MAAM,CAAA;AAEzC,OAAO,EACH,6BAA6B,EAC7B,wBAAwB,EACxB,8BAA8B,EAC9B,6BAA6B,EAC7B,4BAA4B,GAC/B,CAAA"}
1
+ {"version":3,"file":"extension-priorities.d.ts","sourceRoot":"","sources":["../../src/constants/extension-priorities.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,QAAA,MAAM,6BAA6B,OAAO,CAAA;AAE1C;;;;GAIG;AACH,QAAA,MAAM,8BAA8B,MAAM,CAAA;AAE1C;;;;GAIG;AACH,QAAA,MAAM,wBAAwB,MAAM,CAAA;AAEpC;;;;GAIG;AACH,QAAA,MAAM,4BAA4B,MAAM,CAAA;AAExC;;;;GAIG;AACH,QAAA,MAAM,6BAA6B,MAAM,CAAA;AAEzC;;;;GAIG;AACH,QAAA,MAAM,uBAAuB,KAAK,CAAA;AAElC,OAAO,EACH,6BAA6B,EAC7B,uBAAuB,EACvB,wBAAwB,EACxB,8BAA8B,EAC9B,6BAA6B,EAC7B,4BAA4B,GAC/B,CAAA"}
@@ -28,4 +28,10 @@ const VIEW_EVENT_HANDLERS_PRIORITY = 105;
28
28
  * precedence over the `Bold` extension keyboard shortcut.
29
29
  */
30
30
  const BLOCKQUOTE_EXTENSION_PRIORITY = 101;
31
- export { BLOCKQUOTE_EXTENSION_PRIORITY, PASTE_EXTENSION_PRIORITY, SMART_MARKDOWN_TYPING_PRIORITY, SUGGESTION_EXTENSION_PRIORITY, VIEW_EVENT_HANDLERS_PRIORITY, };
31
+ /**
32
+ * Priority for the `RichTextCode` extension. This needs to be lower than the default for most
33
+ * built-in and official extensions (i.e. `100`), so that other marks wrap the `Code` mark, and not
34
+ * the other way around (i.e. prevents `<code><em>code</em></code>` from happening).
35
+ */
36
+ const CODE_EXTENSION_PRIORITY = 99;
37
+ export { BLOCKQUOTE_EXTENSION_PRIORITY, CODE_EXTENSION_PRIORITY, PASTE_EXTENSION_PRIORITY, SMART_MARKDOWN_TYPING_PRIORITY, SUGGESTION_EXTENSION_PRIORITY, VIEW_EVENT_HANDLERS_PRIORITY, };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Custom extension that extends the built-in `Code` extension to allow all marks (e.g., Bold,
3
+ * Italic, and Strikethrough) to coexist with the `Code` mark (as opposed to disallowing all any
4
+ * other mark by default).
5
+ *
6
+ * @see https://tiptap.dev/api/schema#excludes
7
+ * @see https://prosemirror.net/docs/ref/#model.MarkSpec.excludes
8
+ */
9
+ declare const RichTextCode: import("@tiptap/core").Mark<import("@tiptap/extension-code").CodeOptions, any>;
10
+ export { RichTextCode };
11
+ //# sourceMappingURL=rich-text-code.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rich-text-code.d.ts","sourceRoot":"","sources":["../../../src/extensions/rich-text/rich-text-code.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,QAAA,MAAM,YAAY,gFAGhB,CAAA;AAEF,OAAO,EAAE,YAAY,EAAE,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { Code } from '@tiptap/extension-code';
2
+ import { CODE_EXTENSION_PRIORITY } from '../../constants/extension-priorities';
3
+ /**
4
+ * Custom extension that extends the built-in `Code` extension to allow all marks (e.g., Bold,
5
+ * Italic, and Strikethrough) to coexist with the `Code` mark (as opposed to disallowing all any
6
+ * other mark by default).
7
+ *
8
+ * @see https://tiptap.dev/api/schema#excludes
9
+ * @see https://prosemirror.net/docs/ref/#model.MarkSpec.excludes
10
+ */
11
+ const RichTextCode = Code.extend({
12
+ priority: CODE_EXTENSION_PRIORITY,
13
+ excludes: Code.name,
14
+ });
15
+ export { RichTextCode };
@@ -0,0 +1,12 @@
1
+ import type { HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule';
2
+ /**
3
+ * Custom extension that extends the built-in `HorizontalRule` extension to fix an issue with the
4
+ * built-in input rule that adds extra paragraph node above the horizontal rule.
5
+ *
6
+ * @see https://github.com/ueberdosis/tiptap/issues/3809
7
+ * @see https://github.com/ueberdosis/tiptap/pull/3859#issuecomment-1536799740
8
+ */
9
+ declare const RichTextHorizontalRule: import("@tiptap/core").Node<HorizontalRuleOptions, any>;
10
+ export { RichTextHorizontalRule };
11
+ export type { HorizontalRuleOptions as RichTextHorizontalRuleOptions };
12
+ //# sourceMappingURL=rich-text-horizontal-rule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rich-text-horizontal-rule.d.ts","sourceRoot":"","sources":["../../../src/extensions/rich-text/rich-text-horizontal-rule.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AAO9E;;;;;;GAMG;AACH,QAAA,MAAM,sBAAsB,yDAgB1B,CAAA;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAA;AAEjC,YAAY,EAAE,qBAAqB,IAAI,6BAA6B,EAAE,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { InputRule } from '@tiptap/core';
2
+ import { HorizontalRule } from '@tiptap/extension-horizontal-rule';
3
+ /**
4
+ * The input regex for Markdown horizontal rules.
5
+ */
6
+ const inputRegex = /^(?:---|—-|___\s|\*\*\*\s)$/;
7
+ /**
8
+ * Custom extension that extends the built-in `HorizontalRule` extension to fix an issue with the
9
+ * built-in input rule that adds extra paragraph node above the horizontal rule.
10
+ *
11
+ * @see https://github.com/ueberdosis/tiptap/issues/3809
12
+ * @see https://github.com/ueberdosis/tiptap/pull/3859#issuecomment-1536799740
13
+ */
14
+ const RichTextHorizontalRule = HorizontalRule.extend({
15
+ addInputRules() {
16
+ const { type } = this;
17
+ return [
18
+ new InputRule({
19
+ find: inputRegex,
20
+ handler({ state: { tr }, range }) {
21
+ tr.insert(range.from - 1, type.create({})).delete(tr.mapping.map(range.from), tr.mapping.map(range.to));
22
+ },
23
+ }),
24
+ ];
25
+ },
26
+ });
27
+ export { RichTextHorizontalRule };
@@ -8,13 +8,13 @@ import type { DropcursorOptions } from '@tiptap/extension-dropcursor';
8
8
  import type { HardBreakOptions } from '@tiptap/extension-hard-break';
9
9
  import type { HeadingOptions } from '@tiptap/extension-heading';
10
10
  import type { HistoryOptions } from '@tiptap/extension-history';
11
- import type { HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule';
12
11
  import type { ItalicOptions } from '@tiptap/extension-italic';
13
12
  import type { ListItemOptions } from '@tiptap/extension-list-item';
14
13
  import type { OrderedListOptions } from '@tiptap/extension-ordered-list';
15
14
  import type { ParagraphOptions } from '@tiptap/extension-paragraph';
16
15
  import type { StrikeOptions } from '@tiptap/extension-strike';
17
16
  import type { RichTextDocumentOptions } from './rich-text-document';
17
+ import type { RichTextHorizontalRuleOptions } from './rich-text-horizontal-rule';
18
18
  import type { RichTextImageOptions } from './rich-text-image';
19
19
  import type { RichTextLinkOptions } from './rich-text-link';
20
20
  /**
@@ -68,7 +68,7 @@ type RichTextKitOptions = {
68
68
  /**
69
69
  * Set options for the `HorizontalRule` extension, or `false` to disable.
70
70
  */
71
- horizontalRule: Partial<HorizontalRuleOptions> | false;
71
+ horizontalRule: Partial<RichTextHorizontalRuleOptions> | false;
72
72
  /**
73
73
  * Set options for the `Image` extension, or `false` to disable.
74
74
  */
@@ -1 +1 @@
1
- {"version":3,"file":"rich-text-kit.d.ts","sourceRoot":"","sources":["../../../src/extensions/rich-text/rich-text-kit.ts"],"names":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AC,cAAc,CAAC,GAAG,KAAK,CAAA;IAExC;;OAEG;IACH,cAAc,EAAE,OAAO,CAAC,6BAA6B,CAAC,GAAG,KAAK,CAAA;IAE9D;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAA;IAE5C;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,KAAK,CAAA;IAEtC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,KAAK,CAAA;IAE1C;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,KAAK,CAAA;IAE1C;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,KAAK,CAAA;IAEhD;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAA;IAE5C;;OAEG;IACH,WAAW,EAAE,KAAK,CAAA;IAElB;;OAEG;IACH,aAAa,EAAE,KAAK,CAAA;IAEpB;;OAEG;IACH,mBAAmB,EAAE,KAAK,CAAA;IAE1B;;OAEG;IACH,sBAAsB,EAAE,KAAK,CAAA;IAE7B;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,KAAK,CAAA;IAEtC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAA;IAEX;;OAEG;IACH,UAAU,EAAE,KAAK,CAAA;CACpB,CAAA;AAED;;;;GAIG;AACH,QAAA,MAAM,WAAW,oCAuIf,CAAA;AAEF,OAAO,EAAE,WAAW,EAAE,CAAA;AAEtB,YAAY,EAAE,kBAAkB,EAAE,CAAA"}
@@ -2,14 +2,12 @@ import { Extension } from '@tiptap/core';
2
2
  import { Blockquote } from '@tiptap/extension-blockquote';
3
3
  import { Bold } from '@tiptap/extension-bold';
4
4
  import { BulletList } from '@tiptap/extension-bullet-list';
5
- import { Code } from '@tiptap/extension-code';
6
5
  import { CodeBlock } from '@tiptap/extension-code-block';
7
6
  import { Dropcursor } from '@tiptap/extension-dropcursor';
8
7
  import { Gapcursor } from '@tiptap/extension-gapcursor';
9
8
  import { HardBreak } from '@tiptap/extension-hard-break';
10
9
  import { Heading } from '@tiptap/extension-heading';
11
10
  import { History } from '@tiptap/extension-history';
12
- import { HorizontalRule } from '@tiptap/extension-horizontal-rule';
13
11
  import { Italic } from '@tiptap/extension-italic';
14
12
  import { ListItem } from '@tiptap/extension-list-item';
15
13
  import { OrderedList } from '@tiptap/extension-ordered-list';
@@ -25,7 +23,9 @@ import { BoldAndItalics } from './bold-and-italics';
25
23
  import { CurvenoteCodemark } from './curvenote-codemark';
26
24
  import { PasteEmojis } from './paste-emojis';
27
25
  import { PasteMarkdown } from './paste-markdown';
26
+ import { RichTextCode } from './rich-text-code';
28
27
  import { RichTextDocument } from './rich-text-document';
28
+ import { RichTextHorizontalRule } from './rich-text-horizontal-rule';
29
29
  import { RichTextImage } from './rich-text-image';
30
30
  import { RichTextLink } from './rich-text-link';
31
31
  /**
@@ -49,7 +49,7 @@ const RichTextKit = Extension.create({
49
49
  extensions.push(BulletList.configure(this.options?.bulletList));
50
50
  }
51
51
  if (this.options.code !== false) {
52
- extensions.push(Code.configure(this.options?.code),
52
+ extensions.push(RichTextCode.configure(this.options?.code),
53
53
  // Enhances the Code extension capabilities with additional features
54
54
  CurvenoteCodemark);
55
55
  }
@@ -97,7 +97,7 @@ const RichTextKit = Extension.create({
97
97
  extensions.push(History.configure(this.options?.history));
98
98
  }
99
99
  if (this.options.horizontalRule !== false) {
100
- extensions.push(HorizontalRule.configure(this.options?.horizontalRule));
100
+ extensions.push(RichTextHorizontalRule.configure(this.options?.horizontalRule));
101
101
  }
102
102
  if (this.options.image !== false) {
103
103
  extensions.push(RichTextImage.configure(this.options?.image));
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.3.1",
4
+ "version": "1.4.0",
5
5
  "license": "MIT",
6
6
  "homepage": "https://typist.doist.dev/",
7
7
  "repository": "https://github.com/Doist/typist",
@@ -85,23 +85,23 @@
85
85
  "@semantic-release/changelog": "6.0.3",
86
86
  "@semantic-release/exec": "6.0.3",
87
87
  "@semantic-release/git": "10.0.1",
88
- "@storybook/addon-a11y": "7.0.18",
89
- "@storybook/addon-essentials": "7.0.18",
90
- "@storybook/addons": "7.0.18",
88
+ "@storybook/addon-a11y": "7.0.20",
89
+ "@storybook/addon-essentials": "7.0.20",
90
+ "@storybook/addons": "7.0.20",
91
91
  "@storybook/csf": "0.1.1",
92
92
  "@storybook/mdx2-csf": "1.1.0",
93
- "@storybook/react": "7.0.18",
94
- "@storybook/react-vite": "7.0.18",
95
- "@testing-library/dom": "9.3.0",
93
+ "@storybook/react": "7.0.20",
94
+ "@storybook/react-vite": "7.0.20",
95
+ "@testing-library/dom": "9.3.1",
96
96
  "@testing-library/jest-dom": "5.16.5",
97
97
  "@testing-library/react": "14.0.0",
98
98
  "@types/hast": "2.3.4",
99
99
  "@types/lodash-es": "4.17.7",
100
- "@types/react": "18.2.9",
101
- "@types/react-dom": "18.2.4",
100
+ "@types/react": "18.2.12",
101
+ "@types/react-dom": "18.2.5",
102
102
  "@types/react-syntax-highlighter": "15.5.7",
103
103
  "@types/turndown": "5.0.1",
104
- "boring-avatars": "1.10.0",
104
+ "boring-avatars": "1.10.1",
105
105
  "classnames": "2.3.2",
106
106
  "conventional-changelog-conventionalcommits": "6.0.0",
107
107
  "emoji-regex": "10.2.1",
@@ -111,7 +111,7 @@
111
111
  "eslint-plugin-simple-import-sort": "10.0.0",
112
112
  "eslint-plugin-storybook": "0.6.12",
113
113
  "eslint-plugin-unicorn": "47.0.0",
114
- "eslint-plugin-vitest": "0.2.5",
114
+ "eslint-plugin-vitest": "0.2.6",
115
115
  "eslint-plugin-vitest-globals": "1.3.1",
116
116
  "github-markdown-css": "5.2.0",
117
117
  "husky": "8.0.3",
@@ -127,10 +127,10 @@
127
127
  "react-markdown": "8.0.7",
128
128
  "react-syntax-highlighter": "15.5.0",
129
129
  "rimraf": "5.0.1",
130
- "semantic-release": "21.0.3",
131
- "storybook": "7.0.18",
130
+ "semantic-release": "21.0.5",
131
+ "storybook": "7.0.20",
132
132
  "storybook-css-modules": "1.0.8",
133
- "type-fest": "3.11.1",
133
+ "type-fest": "3.12.0",
134
134
  "typescript": "5.1.3",
135
135
  "typescript-plugin-css-modules": "5.0.1",
136
136
  "vitest": "0.32.0"