@doist/typist 4.0.0 → 4.0.2

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
+ ## [4.0.2](https://github.com/Doist/typist/compare/v4.0.1...v4.0.2) (2024-02-08)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **bold-and-italics:** Disallow only whitespace in the markdown shortcuts ([#651](https://github.com/Doist/typist/issues/651)) ([4c740dd](https://github.com/Doist/typist/commit/4c740ddedc487ad27f2fc8b56e2440913911e40f))
6
+
7
+ ## [4.0.1](https://github.com/Doist/typist/compare/v4.0.0...v4.0.1) (2024-02-07)
8
+
9
+ ### Bug Fixes
10
+
11
+ - **deps:** update tiptap packages to v2.2.1 ([#643](https://github.com/Doist/typist/issues/643)) ([0abbe97](https://github.com/Doist/typist/commit/0abbe9755a9acb14ee8004202ae3f7f48ff47a0f))
12
+
1
13
  ## [4.0.0](https://github.com/Doist/typist/compare/v3.0.0...v4.0.0) (2024-01-30)
2
14
 
3
15
  ### ⚠ BREAKING CHANGES
@@ -1,4 +1,8 @@
1
1
  import { Mark } from '@tiptap/core';
2
+ export declare const starInputRegex: RegExp;
3
+ export declare const starPasteRegex: RegExp;
4
+ export declare const underscoreInputRegex: RegExp;
5
+ export declare const underscorePasteRegex: RegExp;
2
6
  /**
3
7
  * The `BoldAndItalics` extension adds the ability to use the `***` and `___` Markdown shortcuts
4
8
  * when typing and pasting into the editor.
@@ -1 +1 @@
1
- {"version":3,"file":"bold-and-italics.d.ts","sourceRoot":"","sources":["../../../src/extensions/rich-text/bold-and-italics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAgC,MAAM,cAAc,CAAA;AAOjE;;;GAGG;AACH,QAAA,MAAM,cAAc,gBA6BlB,CAAA;AAEF,OAAO,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"bold-and-italics.d.ts","sourceRoot":"","sources":["../../../src/extensions/rich-text/bold-and-italics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAgC,MAAM,cAAc,CAAA;AAEjE,eAAO,MAAM,cAAc,QAAiE,CAAA;AAC5F,eAAO,MAAM,cAAc,QAAiE,CAAA;AAC5F,eAAO,MAAM,oBAAoB,QAAqD,CAAA;AACtF,eAAO,MAAM,oBAAoB,QAAqD,CAAA;AAEtF;;;GAGG;AACH,QAAA,MAAM,cAAc,gBA6BlB,CAAA;AAEF,OAAO,EAAE,cAAc,EAAE,CAAA"}
@@ -1,8 +1,8 @@
1
1
  import { Mark, markInputRule, markPasteRule } from '@tiptap/core';
2
- const starInputRegex = /(?:^|\s)((?:\*{3})((?:[^*]+))(?:\*{3}))$/;
3
- const starPasteRegex = /(?:^|\s)((?:\*{3})((?:[^*]+))(?:\*{3}))/g;
4
- const underscoreInputRegex = /(?:^|\s)((?:_{3})((?:[^_]+))(?:_{3}))$/;
5
- const underscorePasteRegex = /(?:^|\s)((?:_{3})((?:[^_]+))(?:_{3}))/g;
2
+ export const starInputRegex = /(?:^|\s)(\*\*\*(?!\s+\*\*\*)((?:[^*]+))\*\*\*(?!\s+\*\*\*))$/;
3
+ export const starPasteRegex = /(?:^|\s)(\*\*\*(?!\s+\*\*\*)((?:[^*]+))\*\*\*(?!\s+\*\*\*))/g;
4
+ export const underscoreInputRegex = /(?:^|\s)(___(?!\s+___)((?:[^_]+))___(?!\s+___))$/;
5
+ export const underscorePasteRegex = /(?:^|\s)(___(?!\s+___)((?:[^_]+))___(?!\s+___))/g;
6
6
  /**
7
7
  * The `BoldAndItalics` extension adds the ability to use the `***` and `___` Markdown shortcuts
8
8
  * when typing and pasting into the editor.
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": "4.0.0",
4
+ "version": "4.0.2",
5
5
  "license": "MIT",
6
6
  "homepage": "https://typist.doist.dev/",
7
7
  "repository": "https://github.com/Doist/typist",
@@ -46,37 +46,37 @@
46
46
  "validate:pre-push": "run-s test"
47
47
  },
48
48
  "dependencies": {
49
- "@tiptap/core": "2.1.13",
50
- "@tiptap/extension-blockquote": "2.1.13",
51
- "@tiptap/extension-bold": "2.1.13",
52
- "@tiptap/extension-bullet-list": "2.1.13",
53
- "@tiptap/extension-character-count": "2.1.13",
54
- "@tiptap/extension-code": "2.1.13",
55
- "@tiptap/extension-code-block": "2.1.13",
56
- "@tiptap/extension-document": "2.1.13",
57
- "@tiptap/extension-dropcursor": "2.1.13",
58
- "@tiptap/extension-gapcursor": "2.1.13",
59
- "@tiptap/extension-hard-break": "2.1.13",
60
- "@tiptap/extension-heading": "2.1.13",
61
- "@tiptap/extension-history": "2.1.13",
62
- "@tiptap/extension-horizontal-rule": "2.1.13",
63
- "@tiptap/extension-image": "2.1.13",
64
- "@tiptap/extension-italic": "2.1.13",
65
- "@tiptap/extension-link": "2.1.13",
66
- "@tiptap/extension-list-item": "2.1.13",
67
- "@tiptap/extension-list-keymap": "2.1.13",
68
- "@tiptap/extension-ordered-list": "2.1.13",
69
- "@tiptap/extension-paragraph": "2.1.13",
70
- "@tiptap/extension-placeholder": "2.1.13",
71
- "@tiptap/extension-strike": "2.1.13",
72
- "@tiptap/extension-task-item": "2.1.13",
73
- "@tiptap/extension-task-list": "2.1.13",
74
- "@tiptap/extension-text": "2.1.13",
75
- "@tiptap/extension-text-style": "2.1.13",
76
- "@tiptap/extension-typography": "2.1.13",
77
- "@tiptap/pm": "2.1.13",
78
- "@tiptap/react": "2.1.13",
79
- "@tiptap/suggestion": "2.1.13",
49
+ "@tiptap/core": "2.2.1",
50
+ "@tiptap/extension-blockquote": "2.2.1",
51
+ "@tiptap/extension-bold": "2.2.1",
52
+ "@tiptap/extension-bullet-list": "2.2.1",
53
+ "@tiptap/extension-character-count": "2.2.1",
54
+ "@tiptap/extension-code": "2.2.1",
55
+ "@tiptap/extension-code-block": "2.2.1",
56
+ "@tiptap/extension-document": "2.2.1",
57
+ "@tiptap/extension-dropcursor": "2.2.1",
58
+ "@tiptap/extension-gapcursor": "2.2.1",
59
+ "@tiptap/extension-hard-break": "2.2.1",
60
+ "@tiptap/extension-heading": "2.2.1",
61
+ "@tiptap/extension-history": "2.2.1",
62
+ "@tiptap/extension-horizontal-rule": "2.2.1",
63
+ "@tiptap/extension-image": "2.2.1",
64
+ "@tiptap/extension-italic": "2.2.1",
65
+ "@tiptap/extension-link": "2.2.1",
66
+ "@tiptap/extension-list-item": "2.2.1",
67
+ "@tiptap/extension-list-keymap": "2.2.1",
68
+ "@tiptap/extension-ordered-list": "2.2.1",
69
+ "@tiptap/extension-paragraph": "2.2.1",
70
+ "@tiptap/extension-placeholder": "2.2.1",
71
+ "@tiptap/extension-strike": "2.2.1",
72
+ "@tiptap/extension-task-item": "2.2.1",
73
+ "@tiptap/extension-task-list": "2.2.1",
74
+ "@tiptap/extension-text": "2.2.1",
75
+ "@tiptap/extension-text-style": "2.2.1",
76
+ "@tiptap/extension-typography": "2.2.1",
77
+ "@tiptap/pm": "2.2.1",
78
+ "@tiptap/react": "2.2.1",
79
+ "@tiptap/suggestion": "2.2.1",
80
80
  "prosemirror-codemark": "0.4.2"
81
81
  },
82
82
  "devDependencies": {
@@ -88,19 +88,19 @@
88
88
  "@semantic-release/changelog": "6.0.3",
89
89
  "@semantic-release/exec": "6.0.3",
90
90
  "@semantic-release/git": "10.0.1",
91
- "@storybook/addon-a11y": "7.6.10",
92
- "@storybook/addon-essentials": "7.6.10",
93
- "@storybook/addons": "7.6.10",
91
+ "@storybook/addon-a11y": "7.6.12",
92
+ "@storybook/addon-essentials": "7.6.12",
93
+ "@storybook/addons": "7.6.12",
94
94
  "@storybook/csf": "0.1.2",
95
95
  "@storybook/mdx2-csf": "1.1.0",
96
- "@storybook/react": "7.6.10",
97
- "@storybook/react-vite": "7.6.10",
96
+ "@storybook/react": "7.6.12",
97
+ "@storybook/react-vite": "7.6.12",
98
98
  "@testing-library/dom": "9.3.4",
99
- "@testing-library/jest-dom": "6.3.0",
100
- "@testing-library/react": "14.1.2",
101
- "@types/hast": "3.0.3",
99
+ "@testing-library/jest-dom": "6.4.1",
100
+ "@testing-library/react": "14.2.1",
101
+ "@types/hast": "3.0.4",
102
102
  "@types/lodash-es": "4.17.12",
103
- "@types/react": "18.2.48",
103
+ "@types/react": "18.2.52",
104
104
  "@types/react-dom": "18.2.18",
105
105
  "@types/react-syntax-highlighter": "15.5.11",
106
106
  "@types/turndown": "5.0.4",
@@ -116,15 +116,15 @@
116
116
  "eslint-plugin-simple-import-sort": "10.0.0",
117
117
  "eslint-plugin-storybook": "0.6.15",
118
118
  "eslint-plugin-unicorn": "50.0.1",
119
- "eslint-plugin-vitest": "0.3.20",
119
+ "eslint-plugin-vitest": "0.3.21",
120
120
  "eslint-plugin-vitest-globals": "1.4.0",
121
121
  "github-markdown-css": "5.5.0",
122
122
  "husky": "8.0.3",
123
123
  "ignore-sync": "7.0.1",
124
124
  "is-ci": "3.0.1",
125
- "jsdom": "23.2.0",
126
- "lint-staged": "15.2.0",
127
- "npm-run-all": "4.1.5",
125
+ "jsdom": "24.0.0",
126
+ "lint-staged": "15.2.1",
127
+ "npm-run-all2": "6.1.2",
128
128
  "prettier": "3.2.4",
129
129
  "react": "18.2.0",
130
130
  "react-dom": "18.2.0",
@@ -136,12 +136,12 @@
136
136
  "rimraf": "5.0.5",
137
137
  "semantic-release": "23.0.0",
138
138
  "tippy.js": "6.3.7",
139
- "storybook": "7.6.10",
139
+ "storybook": "7.6.12",
140
140
  "storybook-css-modules": "1.0.8",
141
- "type-fest": "4.10.1",
141
+ "type-fest": "4.10.2",
142
142
  "typescript": "5.3.3",
143
143
  "typescript-plugin-css-modules": "5.0.2",
144
- "vitest": "1.2.1"
144
+ "vitest": "1.2.2"
145
145
  },
146
146
  "peerDependencies": {
147
147
  "@react-hookz/web": "^14.2.3 || >=15.x",