@toast-ui/editor 3.1.1 → 3.1.4

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.
Files changed (58) hide show
  1. package/dist/esm/i18n/ar.js +2 -2
  2. package/dist/esm/i18n/cs-cz.js +2 -2
  3. package/dist/esm/i18n/de-de.js +4 -4
  4. package/dist/esm/i18n/en-us.js +3 -3
  5. package/dist/esm/i18n/es-es.js +2 -2
  6. package/dist/esm/i18n/fi-fi.js +2 -2
  7. package/dist/esm/i18n/fr-fr.js +2 -2
  8. package/dist/esm/i18n/gl-es.js +2 -2
  9. package/dist/esm/i18n/hr-hr.js +2 -2
  10. package/dist/esm/i18n/i18n.js +4 -5
  11. package/dist/esm/i18n/it-it.js +2 -2
  12. package/dist/esm/i18n/ja-jp.js +3 -3
  13. package/dist/esm/i18n/ko-kr.js +3 -3
  14. package/dist/esm/i18n/nb-no.js +2 -2
  15. package/dist/esm/i18n/nl-nl.js +3 -3
  16. package/dist/esm/i18n/pl-pl.js +2 -2
  17. package/dist/esm/i18n/pt-br.js +2 -2
  18. package/dist/esm/i18n/ru-ru.js +2 -2
  19. package/dist/esm/i18n/sv-se.js +2 -2
  20. package/dist/esm/i18n/tr-tr.js +2 -2
  21. package/dist/esm/i18n/uk-ua.js +2 -2
  22. package/dist/esm/i18n/zh-cn.js +3 -3
  23. package/dist/esm/i18n/zh-tw.js +2 -2
  24. package/dist/esm/index.js +990 -703
  25. package/dist/esm/indexViewer.js +34 -18
  26. package/dist/i18n/ar.js +6 -6
  27. package/dist/i18n/cs-cz.js +6 -6
  28. package/dist/i18n/de-de.js +8 -8
  29. package/dist/i18n/es-es.js +6 -6
  30. package/dist/i18n/fi-fi.js +6 -6
  31. package/dist/i18n/fr-fr.js +6 -6
  32. package/dist/i18n/gl-es.js +6 -6
  33. package/dist/i18n/hr-hr.js +6 -6
  34. package/dist/i18n/it-it.js +6 -6
  35. package/dist/i18n/ja-jp.js +7 -7
  36. package/dist/i18n/ko-kr.js +7 -7
  37. package/dist/i18n/nb-no.js +6 -6
  38. package/dist/i18n/nl-nl.js +7 -7
  39. package/dist/i18n/pl-pl.js +6 -6
  40. package/dist/i18n/pt-br.js +6 -6
  41. package/dist/i18n/ru-ru.js +6 -6
  42. package/dist/i18n/sv-se.js +6 -6
  43. package/dist/i18n/tr-tr.js +6 -6
  44. package/dist/i18n/uk-ua.js +6 -6
  45. package/dist/i18n/zh-cn.js +7 -7
  46. package/dist/i18n/zh-tw.js +6 -6
  47. package/dist/toastui-editor-only.css +2 -2
  48. package/dist/toastui-editor-viewer.css +7 -7
  49. package/dist/toastui-editor-viewer.js +98 -43
  50. package/dist/toastui-editor.css +7 -7
  51. package/dist/toastui-editor.js +1021 -726
  52. package/package.json +4 -3
  53. package/types/editor.d.ts +9 -1
  54. package/types/event.d.ts +2 -0
  55. package/types/index.d.ts +1 -1
  56. package/types/spec.d.ts +1 -1
  57. package/types/ui.d.ts +22 -20
  58. package/types/wysiwyg.d.ts +2 -1
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@toast-ui/editor",
3
- "version": "3.1.1",
3
+ "version": "3.1.4",
4
4
  "description": "GFM Markdown Wysiwyg Editor - Productive and Extensible",
5
5
  "keywords": [
6
6
  "nhn",
7
+ "nhn cloud",
7
8
  "toast",
8
9
  "toastui",
9
10
  "toast-ui",
@@ -47,7 +48,7 @@
47
48
  "dist/i18n",
48
49
  "types"
49
50
  ],
50
- "author": "NHN FE Development Lab <dl_javascript@nhn.com>",
51
+ "author": "NHN Cloud FE Development Lab <dl_javascript@nhn.com>",
51
52
  "license": "MIT",
52
53
  "repository": {
53
54
  "type": "git",
@@ -77,7 +78,7 @@
77
78
  },
78
79
  "devDependencies": {
79
80
  "@toast-ui/release-notes": "^2.0.1",
80
- "@types/dompurify": "2.3.1",
81
+ "@types/dompurify": "2.3.3",
81
82
  "cross-env": "^6.0.3"
82
83
  },
83
84
  "dependencies": {
package/types/editor.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { Schema, NodeSpec, MarkSpec, Fragment } from 'prosemirror-model';
2
2
  import { EditorView, Decoration, DecorationSet } from 'prosemirror-view';
3
- import { EditorState, Plugin, Selection, TextSelection } from 'prosemirror-state';
3
+ import { EditorState, Plugin, PluginKey, Selection, TextSelection } from 'prosemirror-state';
4
+ import { undoInputRule, InputRule, inputRules } from 'prosemirror-inputrules';
5
+
4
6
  import {
5
7
  HTMLConvertor,
6
8
  MdPos,
@@ -122,11 +124,17 @@ export interface PluginContext {
122
124
  i18n: I18n;
123
125
  pmState: {
124
126
  Plugin: typeof Plugin;
127
+ PluginKey: typeof PluginKey;
125
128
  Selection: typeof Selection;
126
129
  TextSelection: typeof TextSelection;
127
130
  };
128
131
  pmView: { Decoration: typeof Decoration; DecorationSet: typeof DecorationSet };
129
132
  pmModel: { Fragment: typeof Fragment };
133
+ pmRules: {
134
+ inputRules: typeof inputRules;
135
+ InputRule: typeof InputRule;
136
+ undoInputRule: typeof undoInputRule;
137
+ };
130
138
  }
131
139
 
132
140
  export type PluginFn = (context: PluginContext, options?: any) => PluginInfo | null;
package/types/event.d.ts CHANGED
@@ -38,6 +38,7 @@ export type EventTypes =
38
38
  | 'mixinTableOffsetMapPrototype'
39
39
  | 'setFocusedNode'
40
40
  | 'removePopupWidget'
41
+ | 'query'
41
42
  // provide event for user
42
43
  | 'openPopup'
43
44
  | 'closePopup'
@@ -45,6 +46,7 @@ export type EventTypes =
45
46
  | 'beforePreviewRender'
46
47
  | 'beforeConvertWysiwygToMarkdown'
47
48
  | 'load'
49
+ | 'loadUI'
48
50
  | 'change'
49
51
  | 'caretChange'
50
52
  | 'destroy'
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for TOAST UI Editor v3.1.1
1
+ // Type definitions for TOAST UI Editor v3.1.4
2
2
  // TypeScript Version: 4.2.3
3
3
  import {
4
4
  EditorCore,
package/types/spec.d.ts CHANGED
@@ -37,7 +37,7 @@ export interface SpecManager {
37
37
  addedCommands?: Record<string, EditorCommand>
38
38
  ): EditorAllCommandMap<DefaultPayload>;
39
39
 
40
- keymaps(): Plugin<any, any>[];
40
+ keymaps(useCommandShortcut: boolean): Plugin<any, any>[];
41
41
 
42
42
  setContext(context: SpecContext): void;
43
43
  }
package/types/ui.d.ts CHANGED
@@ -15,11 +15,6 @@ export interface ToolbarButtonOptions {
15
15
  state?: ToolbarStateKeys;
16
16
  }
17
17
 
18
- interface ToolbarCustomItemState {
19
- active: boolean;
20
- disabled: boolean;
21
- }
22
-
23
18
  export interface ToolbarCustomOptions {
24
19
  name: string;
25
20
  tooltip?: string;
@@ -28,7 +23,7 @@ export interface ToolbarCustomOptions {
28
23
  hidden?: boolean;
29
24
  state?: ToolbarStateKeys;
30
25
  onMounted?: (execCommand: ExecCommand) => void;
31
- onUpdated?: (toolbarState: ToolbarCustomItemState) => void;
26
+ onUpdated?: (toolbarState: ToolbarItemState) => void;
32
27
  }
33
28
 
34
29
  export type ToolbarButtonInfo = {
@@ -115,21 +110,28 @@ export interface TabInfo {
115
110
  text: string;
116
111
  }
117
112
 
118
- interface ToolbarState {
119
- taskList: boolean;
120
- orderedList: boolean;
121
- bulletList: boolean;
122
- table: boolean;
123
- strong: boolean;
124
- emph: boolean;
125
- strike: boolean;
126
- heading: boolean;
127
- thematicBreak: boolean;
128
- blockQuote: boolean;
129
- code: boolean;
130
- codeBlock: boolean;
113
+ interface ToolbarItemState {
114
+ active: boolean;
115
+ disabled?: boolean;
116
+ }
117
+
118
+ interface ToolbarStateMap {
119
+ taskList: ToolbarItemState;
120
+ orderedList: ToolbarItemState;
121
+ bulletList: ToolbarItemState;
122
+ table: ToolbarItemState;
123
+ strong: ToolbarItemState;
124
+ emph: ToolbarItemState;
125
+ strike: ToolbarItemState;
126
+ heading: ToolbarItemState;
127
+ thematicBreak: ToolbarItemState;
128
+ blockQuote: ToolbarItemState;
129
+ code: ToolbarItemState;
130
+ codeBlock: ToolbarItemState;
131
+ indent: ToolbarItemState;
132
+ outdent: ToolbarItemState;
131
133
  }
132
- export type ToolbarStateKeys = keyof ToolbarState;
134
+ export type ToolbarStateKeys = keyof ToolbarStateMap;
133
135
 
134
136
  export type ToolbarItemInfo = ToolbarCustomOptions | ToolbarButtonInfo;
135
137
  export type ToolbarGroupInfo = ToolbarItemInfo[] & { hidden?: boolean };
@@ -23,7 +23,8 @@ export type WwNodeType =
23
23
  | 'customBlock'
24
24
  | 'frontMatter'
25
25
  | 'widget'
26
- | 'html';
26
+ | 'html'
27
+ | 'htmlComment';
27
28
 
28
29
  export type WwMarkType = 'strong' | 'emph' | 'strike' | 'link' | 'code' | 'html';
29
30