@uiw/react-md-editor 3.24.0 → 3.24.1

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.
@@ -21,6 +21,9 @@ import { title3 } from './title3';
21
21
  import { title4 } from './title4';
22
22
  import { title5 } from './title5';
23
23
  import { title6 } from './title6';
24
+ import { table } from './table';
25
+ import { issue } from './issue';
26
+ import { help } from './help';
24
27
  export interface CommandOrchestrator {
25
28
  executeCommand(command: ICommand): void;
26
29
  }
@@ -90,4 +93,4 @@ declare class TextAreaCommandOrchestrator implements CommandOrchestrator {
90
93
  getState(): false | TextState;
91
94
  executeCommand(command: ICommand<string>, dispatch?: React.Dispatch<ContextStore>, state?: ExecuteCommandState, shortcuts?: string[]): void;
92
95
  }
93
- export { title, title1, title2, title3, title4, title5, title6, bold, codeBlock, comment, italic, strikethrough, hr, group, divider, link, quote, code, image, unorderedListCommand, orderedListCommand, checkedListCommand, codeEdit, codeLive, codePreview, fullscreen, getCommands, getExtraCommands, getStateFromTextArea, TextAreaCommandOrchestrator, TextAreaTextApi, };
96
+ export { title, title1, title2, title3, title4, title5, title6, bold, codeBlock, comment, italic, strikethrough, hr, group, divider, link, quote, code, image, unorderedListCommand, orderedListCommand, checkedListCommand, table, issue, help, codeEdit, codeLive, codePreview, fullscreen, getCommands, getExtraCommands, getStateFromTextArea, TextAreaCommandOrchestrator, TextAreaTextApi, };
@@ -22,6 +22,7 @@ import { title4 } from './title4';
22
22
  import { title5 } from './title5';
23
23
  import { title6 } from './title6';
24
24
  import { table } from './table';
25
+ import { issue } from './issue';
25
26
  import { help } from './help';
26
27
  var getCommands = () => [bold, italic, strikethrough, hr, group([title1, title2, title3, title4, title5, title6], {
27
28
  name: 'title',
@@ -87,6 +88,6 @@ class TextAreaCommandOrchestrator {
87
88
  }, getStateFromTextArea(this.textArea)), this.textApi, dispatch, state, shortcuts);
88
89
  }
89
90
  }
90
- export { title, title1, title2, title3, title4, title5, title6, bold, codeBlock, comment, italic, strikethrough, hr, group, divider, link, quote, code, image, unorderedListCommand, orderedListCommand, checkedListCommand, codeEdit, codeLive, codePreview, fullscreen,
91
+ export { title, title1, title2, title3, title4, title5, title6, bold, codeBlock, comment, italic, strikethrough, hr, group, divider, link, quote, code, image, unorderedListCommand, orderedListCommand, checkedListCommand, table, issue, help, codeEdit, codeLive, codePreview, fullscreen,
91
92
  // Tool method.
92
93
  getCommands, getExtraCommands, getStateFromTextArea, TextAreaCommandOrchestrator, TextAreaTextApi };
@@ -123,10 +123,8 @@ export default function handleKeyDown(e, tabSize, defaultTabEnable) {
123
123
  if (currentLineStr.startsWith('*')) {
124
124
  startStr = '\n* ';
125
125
  }
126
- if (currentLineStr.startsWith('- [ ]')) {
126
+ if (currentLineStr.startsWith('- [ ]') || currentLineStr.startsWith('- [X]') || currentLineStr.startsWith('- [x]')) {
127
127
  startStr = '\n- [ ] ';
128
- } else if (currentLineStr.startsWith('- [X]') || currentLineStr.startsWith('- [x]')) {
129
- startStr = '\n- [X] ';
130
128
  }
131
129
  if (/^\d+.\s/.test(currentLineStr)) {
132
130
  startStr = "\n" + (parseInt(currentLineStr) + 1) + ". ";
@@ -21,6 +21,9 @@ import { title3 } from './title3';
21
21
  import { title4 } from './title4';
22
22
  import { title5 } from './title5';
23
23
  import { title6 } from './title6';
24
+ import { table } from './table';
25
+ import { issue } from './issue';
26
+ import { help } from './help';
24
27
  export interface CommandOrchestrator {
25
28
  executeCommand(command: ICommand): void;
26
29
  }
@@ -90,4 +93,4 @@ declare class TextAreaCommandOrchestrator implements CommandOrchestrator {
90
93
  getState(): false | TextState;
91
94
  executeCommand(command: ICommand<string>, dispatch?: React.Dispatch<ContextStore>, state?: ExecuteCommandState, shortcuts?: string[]): void;
92
95
  }
93
- export { title, title1, title2, title3, title4, title5, title6, bold, codeBlock, comment, italic, strikethrough, hr, group, divider, link, quote, code, image, unorderedListCommand, orderedListCommand, checkedListCommand, codeEdit, codeLive, codePreview, fullscreen, getCommands, getExtraCommands, getStateFromTextArea, TextAreaCommandOrchestrator, TextAreaTextApi, };
96
+ export { title, title1, title2, title3, title4, title5, title6, bold, codeBlock, comment, italic, strikethrough, hr, group, divider, link, quote, code, image, unorderedListCommand, orderedListCommand, checkedListCommand, table, issue, help, codeEdit, codeLive, codePreview, fullscreen, getCommands, getExtraCommands, getStateFromTextArea, TextAreaCommandOrchestrator, TextAreaTextApi, };
@@ -73,6 +73,12 @@ Object.defineProperty(exports, "group", {
73
73
  return _group.group;
74
74
  }
75
75
  });
76
+ Object.defineProperty(exports, "help", {
77
+ enumerable: true,
78
+ get: function get() {
79
+ return _help.help;
80
+ }
81
+ });
76
82
  Object.defineProperty(exports, "hr", {
77
83
  enumerable: true,
78
84
  get: function get() {
@@ -85,6 +91,12 @@ Object.defineProperty(exports, "image", {
85
91
  return _image.image;
86
92
  }
87
93
  });
94
+ Object.defineProperty(exports, "issue", {
95
+ enumerable: true,
96
+ get: function get() {
97
+ return _issue.issue;
98
+ }
99
+ });
88
100
  Object.defineProperty(exports, "italic", {
89
101
  enumerable: true,
90
102
  get: function get() {
@@ -115,6 +127,12 @@ Object.defineProperty(exports, "strikethrough", {
115
127
  return _strikeThrough.strikethrough;
116
128
  }
117
129
  });
130
+ Object.defineProperty(exports, "table", {
131
+ enumerable: true,
132
+ get: function get() {
133
+ return _table.table;
134
+ }
135
+ });
118
136
  Object.defineProperty(exports, "title", {
119
137
  enumerable: true,
120
138
  get: function get() {
@@ -190,6 +208,7 @@ var _title5 = require("./title4");
190
208
  var _title6 = require("./title5");
191
209
  var _title7 = require("./title6");
192
210
  var _table = require("./table");
211
+ var _issue = require("./issue");
193
212
  var _help = require("./help");
194
213
  var getCommands = exports.getCommands = function getCommands() {
195
214
  return [_bold.bold, _italic.italic, _strikeThrough.strikethrough, _hr.hr, (0, _group.group)([_title2.title1, _title3.title2, _title4.title3, _title5.title4, _title6.title5, _title7.title6], {
@@ -126,10 +126,8 @@ function handleKeyDown(e) {
126
126
  if (currentLineStr.startsWith('*')) {
127
127
  startStr = '\n* ';
128
128
  }
129
- if (currentLineStr.startsWith('- [ ]')) {
129
+ if (currentLineStr.startsWith('- [ ]') || currentLineStr.startsWith('- [X]') || currentLineStr.startsWith('- [x]')) {
130
130
  startStr = '\n- [ ] ';
131
- } else if (currentLineStr.startsWith('- [X]') || currentLineStr.startsWith('- [x]')) {
132
- startStr = '\n- [X] ';
133
131
  }
134
132
  if (/^\d+.\s/.test(currentLineStr)) {
135
133
  startStr = "\n".concat(parseInt(currentLineStr) + 1, ". ");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uiw/react-md-editor",
3
- "version": "3.24.0",
3
+ "version": "3.24.1",
4
4
  "description": "A markdown editor with preview, implemented with React.js and TypeScript.",
5
5
  "homepage": "https://uiwjs.github.io/react-md-editor/",
6
6
  "author": "kenny wang <wowohoo@qq.com>",
@@ -23,6 +23,7 @@ import { title4 } from './title4';
23
23
  import { title5 } from './title5';
24
24
  import { title6 } from './title6';
25
25
  import { table } from './table';
26
+ import { issue } from './issue';
26
27
  import { help } from './help';
27
28
 
28
29
  export interface CommandOrchestrator {
@@ -202,6 +203,9 @@ export {
202
203
  unorderedListCommand,
203
204
  orderedListCommand,
204
205
  checkedListCommand,
206
+ table,
207
+ issue,
208
+ help,
205
209
  codeEdit,
206
210
  codeLive,
207
211
  codePreview,
@@ -115,10 +115,12 @@ export default function handleKeyDown(
115
115
  startStr = '\n* ';
116
116
  }
117
117
 
118
- if (currentLineStr.startsWith('- [ ]')) {
118
+ if (
119
+ currentLineStr.startsWith('- [ ]') ||
120
+ currentLineStr.startsWith('- [X]') ||
121
+ currentLineStr.startsWith('- [x]')
122
+ ) {
119
123
  startStr = '\n- [ ] ';
120
- } else if (currentLineStr.startsWith('- [X]') || currentLineStr.startsWith('- [x]')) {
121
- startStr = '\n- [X] ';
122
124
  }
123
125
 
124
126
  if (/^\d+.\s/.test(currentLineStr)) {