@progress/kendo-editor-common 1.9.1-dev.202205300804 → 1.9.1-dev.202206231329

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 (101) hide show
  1. package/dist/cdn/js/kendo-editor-common.js +1 -16
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/blockNode.js +5 -5
  4. package/dist/es/config/indent-rules.js +3 -3
  5. package/dist/es/config/keymap.js +4 -4
  6. package/dist/es/config/list-settings.js +3 -3
  7. package/dist/es/config/schema.js +27 -27
  8. package/dist/es/find-replace.js +2 -2
  9. package/dist/es/inline-style.js +5 -5
  10. package/dist/es/lists.js +3 -3
  11. package/dist/es/main.js +1 -1
  12. package/dist/es/mark.js +2 -2
  13. package/dist/es/plugins/image-resize.js +3 -3
  14. package/dist/es/plugins/table-resize/column-resize.js +4 -4
  15. package/dist/es/plugins/table-resize/row-resize.js +1 -1
  16. package/dist/es/plugins/table-resize/table-resize.js +9 -9
  17. package/dist/es/plugins/table-resize/utils.js +5 -5
  18. package/dist/es/table.js +1 -1
  19. package/dist/es/types/active-marks.js +1 -0
  20. package/dist/es/types/command.js +1 -0
  21. package/dist/es/types/dispatchFn.js +1 -0
  22. package/dist/es/types/paste-cleanup-settings.js +1 -0
  23. package/dist/es/types/predicate.js +1 -0
  24. package/dist/es2015/blockNode.js +5 -5
  25. package/dist/es2015/config/keymap.js +3 -3
  26. package/dist/es2015/config/schema.js +17 -17
  27. package/dist/es2015/find-replace.js +2 -2
  28. package/dist/es2015/inline-style.js +3 -3
  29. package/dist/es2015/main.js +1 -1
  30. package/dist/es2015/plugins/image-resize.js +2 -2
  31. package/dist/es2015/plugins/table-resize/column-resize.js +3 -3
  32. package/dist/es2015/plugins/table-resize/row-resize.js +1 -1
  33. package/dist/es2015/plugins/table-resize/table-resize.js +5 -5
  34. package/dist/es2015/plugins/table-resize/utils.js +4 -4
  35. package/dist/es2015/table.js +1 -1
  36. package/dist/es2015/types/active-marks.js +1 -0
  37. package/dist/es2015/types/command.js +1 -0
  38. package/dist/es2015/types/dispatchFn.js +1 -0
  39. package/dist/es2015/types/paste-cleanup-settings.js +1 -0
  40. package/dist/es2015/types/predicate.js +1 -0
  41. package/dist/npm/align.d.ts +2 -2
  42. package/dist/npm/align.js +5 -2
  43. package/dist/npm/blockNode.d.ts +13 -13
  44. package/dist/npm/blockNode.js +20 -10
  45. package/dist/npm/blockquote.d.ts +2 -2
  46. package/dist/npm/blockquote.js +5 -2
  47. package/dist/npm/cleanFormatting.d.ts +1 -1
  48. package/dist/npm/cleanFormatting.js +3 -1
  49. package/dist/npm/config/align-rules.js +1 -0
  50. package/dist/npm/config/commands.js +1 -0
  51. package/dist/npm/config/constants.js +1 -0
  52. package/dist/npm/config/indent-rules.js +1 -0
  53. package/dist/npm/config/keymap.d.ts +2 -2
  54. package/dist/npm/config/keymap.js +8 -5
  55. package/dist/npm/config/list-settings.js +1 -0
  56. package/dist/npm/config/schema.js +21 -19
  57. package/dist/npm/find-replace.d.ts +9 -9
  58. package/dist/npm/find-replace.js +11 -5
  59. package/dist/npm/image.js +3 -1
  60. package/dist/npm/indent.d.ts +5 -5
  61. package/dist/npm/indent.js +15 -7
  62. package/dist/npm/inline-style.d.ts +3 -3
  63. package/dist/npm/inline-style.js +11 -7
  64. package/dist/npm/link.js +5 -2
  65. package/dist/npm/listConvert.js +3 -1
  66. package/dist/npm/lists.d.ts +4 -6
  67. package/dist/npm/lists.js +7 -3
  68. package/dist/npm/main.d.ts +1 -1
  69. package/dist/npm/main.js +146 -143
  70. package/dist/npm/mark.d.ts +10 -10
  71. package/dist/npm/mark.js +25 -13
  72. package/dist/npm/paste.js +17 -8
  73. package/dist/npm/plugins/caret-color.d.ts +1 -1
  74. package/dist/npm/plugins/caret-color.js +1 -0
  75. package/dist/npm/plugins/highlight.d.ts +1 -1
  76. package/dist/npm/plugins/highlight.js +1 -0
  77. package/dist/npm/plugins/image-resize.d.ts +24 -3
  78. package/dist/npm/plugins/image-resize.js +5 -3
  79. package/dist/npm/plugins/placeholder.js +1 -0
  80. package/dist/npm/plugins/resize-utils.d.ts +8 -8
  81. package/dist/npm/plugins/resize-utils.js +1 -0
  82. package/dist/npm/plugins/spaces-fix.d.ts +1 -1
  83. package/dist/npm/plugins/spaces-fix.js +3 -1
  84. package/dist/npm/plugins/table-resize/column-resize.js +8 -7
  85. package/dist/npm/plugins/table-resize/index.d.ts +1 -1
  86. package/dist/npm/plugins/table-resize/index.js +6 -4
  87. package/dist/npm/plugins/table-resize/row-resize.js +5 -4
  88. package/dist/npm/plugins/table-resize/table-resize.d.ts +16 -2
  89. package/dist/npm/plugins/table-resize/table-resize.js +8 -6
  90. package/dist/npm/plugins/table-resize/table-view.js +1 -0
  91. package/dist/npm/plugins/table-resize/utils.d.ts +4 -4
  92. package/dist/npm/plugins/table-resize/utils.js +7 -5
  93. package/dist/npm/source.d.ts +6 -6
  94. package/dist/npm/source.js +15 -7
  95. package/dist/npm/table.d.ts +7 -7
  96. package/dist/npm/table.js +12 -8
  97. package/dist/npm/text.js +3 -1
  98. package/dist/npm/utils.d.ts +8 -8
  99. package/dist/npm/utils.js +25 -12
  100. package/dist/systemjs/kendo-editor-common.js +1 -1
  101. package/package.json +15 -26
@@ -1,4 +1,4 @@
1
- import * as tslib_1 from "tslib";
1
+ import { __assign, __rest } from "tslib";
2
2
  import { changeStylesString } from './utils';
3
3
  import { ReplaceAroundStep } from 'prosemirror-transform';
4
4
  import { Fragment, Slice } from 'prosemirror-model';
@@ -90,15 +90,15 @@ export var formatBlockElements = function (value, commandName) {
90
90
  blocks.forEach(function (node) {
91
91
  if (node.type.isTextblock) {
92
92
  if (value === 'p') {
93
- var _a = node.attrs, level = _a.level, attrs = tslib_1.__rest(_a, ["level"]);
93
+ var _a = node.attrs, level = _a.level, attrs = __rest(_a, ["level"]);
94
94
  changeTextBlock(tr, node, nodes.paragraph, attrs);
95
95
  }
96
96
  else if (/^h[1-6]$/i.test(value)) {
97
97
  var level = parseInt(value.substr(1), 10);
98
- changeTextBlock(tr, node, nodes.heading, tslib_1.__assign({}, node.attrs, { level: level }));
98
+ changeTextBlock(tr, node, nodes.heading, __assign(__assign({}, node.attrs), { level: level }));
99
99
  }
100
100
  else if (value === 'blockquote') {
101
- var _b = node.attrs, level = _b.level, attrs = tslib_1.__rest(_b, ["level"]);
101
+ var _b = node.attrs, level = _b.level, attrs = __rest(_b, ["level"]);
102
102
  changeTextBlock(tr, node, nodes.blockquote, attrs);
103
103
  }
104
104
  }
@@ -124,7 +124,7 @@ export var cleanTextBlockFormatting = function (tr, options) {
124
124
  var nodes = blockNodes({ doc: doc, selection: selection }, { blocksInSelection: blocksInSelection });
125
125
  var textBlocks = nodes.filter(function (node) { return node.isTextblock; });
126
126
  textBlocks.forEach(function (node) {
127
- var _a = node.attrs || {}, _b = _a.style, style = _b === void 0 ? '' : _b, _c = _a.class, className = _c === void 0 ? '' : _c, attrs = tslib_1.__rest(_a, ["style", "class"]);
127
+ var _a = node.attrs || {}, _b = _a.style, style = _b === void 0 ? '' : _b, _c = _a.class, className = _c === void 0 ? '' : _c, attrs = __rest(_a, ["style", "class"]);
128
128
  var nodeType = blockNodeType || node.type;
129
129
  if (style || className || nodeType !== node.type) {
130
130
  changeTextBlock(tr, node, nodeType, attrs);
@@ -1,4 +1,4 @@
1
- import * as tslib_1 from "tslib";
1
+ import { __assign } from "tslib";
2
2
  import { listsTypes } from './list-settings';
3
3
  /**
4
4
  * The object of the Indent tool settings.
@@ -17,7 +17,7 @@ export var indentRules = {
17
17
  step: 30,
18
18
  unit: 'px'
19
19
  }],
20
- listsTypes: tslib_1.__assign({}, listsTypes)
20
+ listsTypes: __assign({}, listsTypes)
21
21
  };
22
22
  /**
23
23
  * The object of the Outdent tool settings.
@@ -36,5 +36,5 @@ export var outdentRules = {
36
36
  step: -30,
37
37
  unit: 'px'
38
38
  }],
39
- listsTypes: tslib_1.__assign({}, listsTypes)
39
+ listsTypes: __assign({}, listsTypes)
40
40
  };
@@ -1,4 +1,4 @@
1
- import * as tslib_1 from "tslib";
1
+ import { __assign } from "tslib";
2
2
  import { chainCommands, exitCode, newlineInCode, createParagraphNear, liftEmptyBlock, splitBlockKeepMarks, deleteSelection, joinBackward, selectNodeBackward } from 'prosemirror-commands';
3
3
  import { undo, redo } from 'prosemirror-history';
4
4
  import { undoInputRule } from 'prosemirror-inputrules';
@@ -21,13 +21,13 @@ export var buildKeymap = function (schema, options) {
21
21
  keys['Mod-y'] = redo;
22
22
  }
23
23
  if (schema.marks.strong) {
24
- keys['Mod-b'] = expandToWordWrap(toggleInlineFormat, tslib_1.__assign({}, bold, { applyToWord: applyToWord }));
24
+ keys['Mod-b'] = expandToWordWrap(toggleInlineFormat, __assign(__assign({}, bold), { applyToWord: applyToWord }));
25
25
  }
26
26
  if (schema.marks.em) {
27
- keys['Mod-i'] = expandToWordWrap(toggleInlineFormat, tslib_1.__assign({}, italic, { applyToWord: applyToWord }));
27
+ keys['Mod-i'] = expandToWordWrap(toggleInlineFormat, __assign(__assign({}, italic), { applyToWord: applyToWord }));
28
28
  }
29
29
  if (schema.marks.u) {
30
- keys['Mod-u'] = expandToWordWrap(toggleInlineFormat, tslib_1.__assign({}, underline, { applyToWord: applyToWord }));
30
+ keys['Mod-u'] = expandToWordWrap(toggleInlineFormat, __assign(__assign({}, underline), { applyToWord: applyToWord }));
31
31
  }
32
32
  if (schema.nodes.hard_break) {
33
33
  var br_1 = schema.nodes.hard_break;
@@ -1,4 +1,4 @@
1
- import * as tslib_1 from "tslib";
1
+ import { __assign } from "tslib";
2
2
  export var listsTypes = {
3
3
  orderedList: 'ordered_list',
4
4
  bulletList: 'bullet_list',
@@ -9,12 +9,12 @@ export var listsTypes = {
9
9
  */
10
10
  export var orderedList = {
11
11
  listType: listsTypes.orderedList,
12
- types: tslib_1.__assign({}, listsTypes)
12
+ types: __assign({}, listsTypes)
13
13
  };
14
14
  /**
15
15
  * The object of the UnorderedList tool settings.
16
16
  */
17
17
  export var bulletList = {
18
18
  listType: listsTypes.bulletList,
19
- types: tslib_1.__assign({}, listsTypes)
19
+ types: __assign({}, listsTypes)
20
20
  };
@@ -1,6 +1,6 @@
1
- import * as tslib_1 from "tslib";
1
+ import { __assign } from "tslib";
2
2
  import { Schema } from 'prosemirror-model';
3
- import { tableNodes } from 'prosemirror-tables';
3
+ import { tableNodes } from 'prosemirror-tables-ts';
4
4
  import { domToPmDoc, htmlToFragment, pmDocToFragment } from '../source';
5
5
  import { rowTypeAttr, colgroupAttr, resizableAttr } from './constants';
6
6
  var hole = 0;
@@ -55,17 +55,17 @@ var tagMark = function (tag) {
55
55
  },
56
56
  _a;
57
57
  };
58
- var marks = tslib_1.__assign({
58
+ var marks = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({
59
59
  // :: MarkSpec A link. Has `href` and `title` attributes. `title`
60
60
  // defaults to the empty string. Rendered and parsed as an `<a>`
61
61
  // element.
62
62
  link: {
63
- attrs: tslib_1.__assign({}, commonAttributes(), { href: { default: null }, target: { default: null }, title: { default: null } }),
63
+ attrs: __assign(__assign({}, commonAttributes()), { href: { default: null }, target: { default: null }, title: { default: null } }),
64
64
  inclusive: false,
65
65
  parseDOM: [{ tag: 'a', getAttrs: domAttributes }],
66
66
  toDOM: function (node) { return ['a', pmAttributes(node.attrs), hole]; }
67
- } }, tagMark('strong'), tagMark('b'), tagMark('em'), tagMark('i'), tagMark('u'), tagMark('del'), tagMark('sub'), tagMark('sup'), tagMark('code'), { style: {
68
- attrs: tslib_1.__assign({}, commonAttributes()),
67
+ } }, tagMark('strong')), tagMark('b')), tagMark('em')), tagMark('i')), tagMark('u')), tagMark('del')), tagMark('sub')), tagMark('sup')), tagMark('code')), { style: {
68
+ attrs: __assign({}, commonAttributes()),
69
69
  parseDOM: [{
70
70
  tag: 'span',
71
71
  getAttrs: domAttributes
@@ -83,7 +83,7 @@ var cellAttribute = function (name) {
83
83
  },
84
84
  _a;
85
85
  };
86
- var cellAttributes = tslib_1.__assign({}, cellAttribute('style'), cellAttribute('class'), cellAttribute('id'), cellAttribute('headers'));
86
+ var cellAttributes = __assign(__assign(__assign(__assign({}, cellAttribute('style')), cellAttribute('class')), cellAttribute('id')), cellAttribute('headers'));
87
87
  var colgroupNodes = {
88
88
  doc: { content: 'colgroup*' },
89
89
  col: {
@@ -120,10 +120,10 @@ export var parseStrColgroup = function (colgroup) {
120
120
  return colgroupEl;
121
121
  };
122
122
  var tNodes = tableNodes({ tableGroup: 'block', cellContent: 'block+', cellAttributes: cellAttributes });
123
- tNodes.table_row.attrs = tslib_1.__assign({}, tNodes.table_row.attrs, defaultAttrs([rowTypeAttr, 'style', 'class', 'id']));
123
+ tNodes.table_row.attrs = __assign(__assign({}, tNodes.table_row.attrs), defaultAttrs([rowTypeAttr, 'style', 'class', 'id']));
124
124
  tNodes.table_row.toDOM = function (node) { return ['tr', pmAttributes(node.attrs), 0]; };
125
125
  tNodes.table_row.parseDOM = [{ tag: 'tr', getAttrs: domAttributes }];
126
- tNodes.table.attrs = tslib_1.__assign({}, tNodes.table.attrs, defaultAttrs(['style', 'class', 'id', colgroupAttr, resizableAttr]));
126
+ tNodes.table.attrs = __assign(__assign({}, tNodes.table.attrs), defaultAttrs(['style', 'class', 'id', colgroupAttr, resizableAttr]));
127
127
  tNodes.table.toDOM = function (node) {
128
128
  var tableAttrs = hasAttrs(node.attrs) ? pmAttributes(node.attrs, [colgroupAttr, resizableAttr]) : {};
129
129
  var colgroup = null;
@@ -151,7 +151,7 @@ tNodes.table.parseDOM = [{
151
151
  return attrs;
152
152
  }
153
153
  }];
154
- var nodes = tslib_1.__assign({
154
+ var nodes = __assign({
155
155
  // :: NodeSpec The top level document node.
156
156
  doc: {
157
157
  content: 'block+'
@@ -161,7 +161,7 @@ var nodes = tslib_1.__assign({
161
161
  paragraph: {
162
162
  content: 'inline*',
163
163
  group: 'block',
164
- attrs: tslib_1.__assign({}, commonAttributes()),
164
+ attrs: __assign({}, commonAttributes()),
165
165
  parseDOM: [{
166
166
  tag: 'p',
167
167
  getAttrs: domAttributes
@@ -172,7 +172,7 @@ var nodes = tslib_1.__assign({
172
172
  // content: '(block | inline)*',
173
173
  content: 'block*',
174
174
  group: 'block',
175
- attrs: tslib_1.__assign({}, commonAttributes()),
175
+ attrs: __assign({}, commonAttributes()),
176
176
  parseDOM: [{
177
177
  tag: 'div',
178
178
  getAttrs: domAttributes
@@ -181,7 +181,7 @@ var nodes = tslib_1.__assign({
181
181
  },
182
182
  // :: NodeSpec A blockquote (`<blockquote>`) wrapping one or more blocks.
183
183
  blockquote: {
184
- attrs: tslib_1.__assign({}, commonAttributes()),
184
+ attrs: __assign({}, commonAttributes()),
185
185
  content: 'block+',
186
186
  group: 'block',
187
187
  defining: true,
@@ -201,17 +201,17 @@ var nodes = tslib_1.__assign({
201
201
  // has to hold the numbers from 1 to 6. Parsed and serialized as `<h1>` to
202
202
  // `<h6>` elements.
203
203
  heading: {
204
- attrs: tslib_1.__assign({}, commonAttributes(), { level: { default: 1 } }),
204
+ attrs: __assign(__assign({}, commonAttributes()), { level: { default: 1 } }),
205
205
  content: 'inline*',
206
206
  group: 'block',
207
207
  defining: true,
208
208
  parseDOM: [
209
- { tag: 'h1', getAttrs: function (node) { return (tslib_1.__assign({}, domAttributes(node), { level: 1 })); } },
210
- { tag: 'h2', getAttrs: function (node) { return (tslib_1.__assign({}, domAttributes(node), { level: 2 })); } },
211
- { tag: 'h3', getAttrs: function (node) { return (tslib_1.__assign({}, domAttributes(node), { level: 3 })); } },
212
- { tag: 'h4', getAttrs: function (node) { return (tslib_1.__assign({}, domAttributes(node), { level: 4 })); } },
213
- { tag: 'h5', getAttrs: function (node) { return (tslib_1.__assign({}, domAttributes(node), { level: 5 })); } },
214
- { tag: 'h6', getAttrs: function (node) { return (tslib_1.__assign({}, domAttributes(node), { level: 6 })); } }
209
+ { tag: 'h1', getAttrs: function (node) { return (__assign(__assign({}, domAttributes(node)), { level: 1 })); } },
210
+ { tag: 'h2', getAttrs: function (node) { return (__assign(__assign({}, domAttributes(node)), { level: 2 })); } },
211
+ { tag: 'h3', getAttrs: function (node) { return (__assign(__assign({}, domAttributes(node)), { level: 3 })); } },
212
+ { tag: 'h4', getAttrs: function (node) { return (__assign(__assign({}, domAttributes(node)), { level: 4 })); } },
213
+ { tag: 'h5', getAttrs: function (node) { return (__assign(__assign({}, domAttributes(node)), { level: 5 })); } },
214
+ { tag: 'h6', getAttrs: function (node) { return (__assign(__assign({}, domAttributes(node)), { level: 6 })); } }
215
215
  ],
216
216
  toDOM: function (node) { return hasAttrs(node.attrs, 'level') ?
217
217
  ['h' + node.attrs.level, pmAttributes(node.attrs, ['level']), hole] :
@@ -239,7 +239,7 @@ var nodes = tslib_1.__assign({
239
239
  // string.
240
240
  image: {
241
241
  inline: true,
242
- attrs: tslib_1.__assign({ src: { default: null }, alt: { default: null }, title: { default: null }, width: { default: null }, height: { default: null } }, commonAttributes()),
242
+ attrs: __assign({ src: { default: null }, alt: { default: null }, title: { default: null }, width: { default: null }, height: { default: null } }, commonAttributes()),
243
243
  group: 'inline',
244
244
  draggable: true,
245
245
  parseDOM: [{ tag: 'img', getAttrs: domAttributes }],
@@ -248,7 +248,7 @@ var nodes = tslib_1.__assign({
248
248
  // :: NodeSpec A hard line break represented in the DOM as a `<br>` element.
249
249
  hard_break: {
250
250
  inline: true,
251
- attrs: tslib_1.__assign({}, commonAttributes()),
251
+ attrs: __assign({}, commonAttributes()),
252
252
  group: 'inline',
253
253
  selectable: false,
254
254
  parseDOM: [{
@@ -265,14 +265,14 @@ var nodes = tslib_1.__assign({
265
265
  ordered_list: {
266
266
  content: 'list_item+',
267
267
  group: 'block',
268
- attrs: tslib_1.__assign({}, commonAttributes(), { type: { default: null }, order: { default: 1 } }),
268
+ attrs: __assign(__assign({}, commonAttributes()), { type: { default: null }, order: { default: 1 } }),
269
269
  parseDOM: [{ tag: 'ol', getAttrs: function (dom) {
270
- return tslib_1.__assign({}, domAttributes(dom), { order: dom.hasAttribute('start') ? parseInt(dom.getAttribute('start') || '1', 10) : 1 });
270
+ return __assign(__assign({}, domAttributes(dom)), { order: dom.hasAttribute('start') ? parseInt(dom.getAttribute('start') || '1', 10) : 1 });
271
271
  } }],
272
272
  toDOM: function (node) {
273
273
  return node.attrs.order === 1 ?
274
274
  (hasAttrs(node.attrs, 'order') ? ['ol', pmAttributes(node.attrs, ['order']), hole] : olDOM) :
275
- ['ol', tslib_1.__assign({}, pmAttributes(node.attrs, ['order']), { start: node.attrs.order }), hole];
275
+ ['ol', __assign(__assign({}, pmAttributes(node.attrs, ['order'])), { start: node.attrs.order }), hole];
276
276
  }
277
277
  },
278
278
  // :: NodeSpec
@@ -280,7 +280,7 @@ var nodes = tslib_1.__assign({
280
280
  bullet_list: {
281
281
  content: 'list_item+',
282
282
  group: 'block',
283
- attrs: tslib_1.__assign({}, commonAttributes()),
283
+ attrs: __assign({}, commonAttributes()),
284
284
  parseDOM: [{ tag: 'ul', getAttrs: domAttributes }],
285
285
  toDOM: function (node) { return hasAttrs(node.attrs) ? ['ul', pmAttributes(node.attrs), hole] : ulDOM; }
286
286
  },
@@ -288,7 +288,7 @@ var nodes = tslib_1.__assign({
288
288
  // A list item (`<li>`) specification.
289
289
  list_item: {
290
290
  content: '(paragraph | heading) block*',
291
- attrs: tslib_1.__assign({}, commonAttributes()),
291
+ attrs: __assign({}, commonAttributes()),
292
292
  parseDOM: [{ tag: 'li', getAttrs: domAttributes }],
293
293
  toDOM: function (node) { return hasAttrs(node.attrs) ? ['li', pmAttributes(node.attrs), hole] : liDOM; },
294
294
  defining: true
@@ -1,4 +1,4 @@
1
- import * as tslib_1 from "tslib";
1
+ import { __rest } from "tslib";
2
2
  import { TextSelection } from 'prosemirror-state';
3
3
  export var findAt = function (doc, searchOptions, start, end, exit) {
4
4
  var result = [], exec, text, from, to, childText, nextSibling;
@@ -57,7 +57,7 @@ export var findAt = function (doc, searchOptions, start, end, exit) {
57
57
  return result;
58
58
  };
59
59
  export var find = function (state, searchOptions) {
60
- var backward = searchOptions.backward, matchCyclic = searchOptions.matchCyclic, options = tslib_1.__rest(searchOptions, ["backward", "matchCyclic"]);
60
+ var backward = searchOptions.backward, matchCyclic = searchOptions.matchCyclic, options = __rest(searchOptions, ["backward", "matchCyclic"]);
61
61
  var exit = backward ? function () { return false; } : function (r) { return r.length > 0; };
62
62
  var doc = state.doc, selection = state.selection;
63
63
  var result = [];
@@ -1,4 +1,4 @@
1
- import * as tslib_1 from "tslib";
1
+ import { __assign, __spreadArray } from "tslib";
2
2
  import { AddMarkStep, RemoveMarkStep } from 'prosemirror-transform';
3
3
  import { changeStylesString, shallowEqual } from './utils';
4
4
  import { markApplies, hasMark, removeMarks, toggleMark, styleValue, selectionMarks } from './mark';
@@ -22,7 +22,7 @@ var changeStyleMark = function (tr, from, to, attrs, markType) {
22
22
  var style = newStyle.changed ?
23
23
  { style: newStyle.style || null } : { style: [attrs.style] + ": " + attrs.newValue + ";" };
24
24
  var currentMark = markType.isInSet(marks) ? marks.find(function (m) { return m.type.name === 'style'; }) : null;
25
- var newMarkAttrs_1 = currentMark ? tslib_1.__assign({}, currentMark.attrs, style) : style;
25
+ var newMarkAttrs_1 = currentMark ? __assign(__assign({}, currentMark.attrs), style) : style;
26
26
  var newStyleMark = markType.create(newMarkAttrs_1);
27
27
  var newSet = newStyleMark.addToSet(marks);
28
28
  for (var i = 0; i < marks.length; i++) {
@@ -74,7 +74,7 @@ var changeStyle = function (markType, attrs) {
74
74
  if (markType.isInSet(currentMarks)) {
75
75
  var newStyle = changeStyleFromMark(currentMarks, attrs);
76
76
  var styleMark = currentMarks.find(function (m) { return m.type.name === 'style'; });
77
- var newAttrs_1 = tslib_1.__assign({}, (styleMark ? styleMark.attrs : {}), { style: newStyle.style || null });
77
+ var newAttrs_1 = __assign(__assign({}, (styleMark ? styleMark.attrs : {})), { style: newStyle.style || null });
78
78
  if (shallowEqual(styleMark.attrs, newAttrs_1)) {
79
79
  return false;
80
80
  }
@@ -113,7 +113,7 @@ export var toggleInlineFormat = function (options, tr, markAttrs) { return funct
113
113
  var cmd = changeStyle(marks.style, { style: altStyle.name, value: altStyle.value });
114
114
  styleRemoved = cmd(state, markDispatched, transaction);
115
115
  }
116
- var allMarks = [mark].concat(altMarks).filter(function (m) { return marks[m]; });
116
+ var allMarks = __spreadArray([mark], altMarks).filter(function (m) { return marks[m]; });
117
117
  var toRemove = allMarks.map(function (m) { return hasMark(state, { mark: m }) && marks[m]; }).filter(function (m) { return m; });
118
118
  if (toRemove.length) {
119
119
  removeMarks(toRemove, state, markDispatched, transaction);
@@ -160,7 +160,7 @@ export var applyInlineStyle = function (options, command) { return function (sta
160
160
  else if (attrs.newValue) {
161
161
  newStyles.style = [attrs.style] + ": " + attrs.newValue + ";";
162
162
  }
163
- var newMarkAttrs_2 = currentMark ? tslib_1.__assign({}, currentMark.attrs, newStyles) : newStyles;
163
+ var newMarkAttrs_2 = currentMark ? __assign(__assign({}, currentMark.attrs), newStyles) : newStyles;
164
164
  if (Object.keys(newMarkAttrs_2).some(function (attrName) { return newMarkAttrs_2[attrName] !== null; })) {
165
165
  dispatch(tr.addStoredMark(markType.create(newMarkAttrs_2)));
166
166
  }
package/dist/es/lists.js CHANGED
@@ -1,4 +1,4 @@
1
- import * as tslib_1 from "tslib";
1
+ import { __assign } from "tslib";
2
2
  import { Fragment, Slice, NodeRange } from 'prosemirror-model';
3
3
  import { TextSelection, NodeSelection } from 'prosemirror-state';
4
4
  import { liftTarget, ReplaceAroundStep } from 'prosemirror-transform';
@@ -247,10 +247,10 @@ export var toggleList = function (state, dispatch, view, options, command) {
247
247
  }
248
248
  };
249
249
  export function toggleUnorderedList(state, dispatch, view) {
250
- return toggleList(state, dispatch, view, tslib_1.__assign({ listType: bulletListSettings.listType }, bulletListSettings.types));
250
+ return toggleList(state, dispatch, view, __assign({ listType: bulletListSettings.listType }, bulletListSettings.types));
251
251
  }
252
252
  export function toggleOrderedList(state, dispatch, view) {
253
- return toggleList(state, dispatch, view, tslib_1.__assign({ listType: orderedListSettings.listType }, orderedListSettings.types));
253
+ return toggleList(state, dispatch, view, __assign({ listType: orderedListSettings.listType }, orderedListSettings.types));
254
254
  }
255
255
  export var splitListItemKeepMarks = function (itemType) { return function (state, dispatch) {
256
256
  // see https://github.com/ProseMirror/prosemirror-commands/blob/master/src/commands.js#L321-L327
package/dist/es/main.js CHANGED
@@ -36,7 +36,7 @@ export * from 'prosemirror-model';
36
36
  export * from 'prosemirror-schema-list';
37
37
  export * from 'prosemirror-state';
38
38
  // Fixes an error related to setting over the addRowAfter and addRowBefore exports from the PM tables module
39
- export { TableMap, tableEditing, tableEditingKey, tableNodeTypes, tableNodes, fixTables, fixTablesKey, isInTable, deleteTable, inSameTable, CellSelection, selectedRect, selectionCell, setCellAttr, goToNextCell, toggleHeader, toggleHeaderCell, toggleHeaderColumn, toggleHeaderRow, splitCell, splitCellWithType, mergeCells, deleteColumn, deleteRow, rowIsHeader, addRow, addColSpan, addColumn, addColumnAfter, addColumnBefore, colCount, columnIsHeader, columnResizing, columnResizingPluginKey, updateColumnsOnResize, cellAround, findCell, removeColSpan, moveCellForward, nextCell } from 'prosemirror-tables';
39
+ export { TableMap, tableEditing, tableEditingKey, tableNodeTypes, tableNodes, fixTables, fixTablesKey, isInTable, deleteTable, inSameTable, CellSelection, selectedRect, selectionCell, setCellAttr, goToNextCell, toggleHeader, toggleHeaderCell, toggleHeaderColumn, toggleHeaderRow, splitCell, splitCellWithType, mergeCells, deleteColumn, deleteRow, rowIsHeader, addRow, addColSpan, addColumn, addColumnAfter, addColumnBefore, colCount, columnIsHeader, columnResizing, columnResizingPluginKey, updateColumnsOnResize, cellAround, findCell, removeColSpan, moveCellForward, nextCell } from 'prosemirror-tables-ts';
40
40
  export * from 'prosemirror-transform';
41
41
  export * from 'prosemirror-view';
42
42
  export { createTable, addRowAfter, addRowBefore, pmAddRowAfter, pmAddRowBefore } from './table';
package/dist/es/mark.js CHANGED
@@ -118,7 +118,7 @@ export var removeMarks = function (marks, state, dispatch, tr) {
118
118
  }
119
119
  else {
120
120
  var _loop_1 = function (i) {
121
- var _a = ranges[i], $from = _a.$from, $to = _a.$to;
121
+ var _b = ranges[i], $from = _b.$from, $to = _b.$to;
122
122
  marks.forEach(function (m) {
123
123
  removeMark(tr, $from.pos, $to.pos, m);
124
124
  });
@@ -132,7 +132,7 @@ export var removeMarks = function (marks, state, dispatch, tr) {
132
132
  };
133
133
  var toArray = function (x) { return x instanceof Array ? x : [x]; };
134
134
  export var removeAllMarks = function (_a) {
135
- var _b = (_a === void 0 ? {} : _a).except, except = _b === void 0 ? [] : _b;
135
+ var _b = _a === void 0 ? {} : _a, _c = _b.except, except = _c === void 0 ? [] : _c;
136
136
  return function (state, dispatch) {
137
137
  var tr = state.tr;
138
138
  cleanMarks(tr, { except: toArray(except) });
@@ -1,4 +1,4 @@
1
- import * as tslib_1 from "tslib";
1
+ import { __assign } from "tslib";
2
2
  import { NodeSelection, Plugin, PluginKey } from "prosemirror-state";
3
3
  import { Decoration, DecorationSet } from "prosemirror-view";
4
4
  import { dataResizeDirImage, resizeHandle } from "../config/constants";
@@ -75,10 +75,10 @@ var handleMouseUp = function (view) {
75
75
  if (reSize.test(currAttrs.style || '')) {
76
76
  var changedWidth = changeStylesString(currAttrs.style, { style: 'width', value: reAnyValue, newValue: width + 'px' });
77
77
  var style = changeStylesString(changedWidth.style || '', { style: 'height', value: reAnyValue, newValue: height + 'px' }).style;
78
- attrs = tslib_1.__assign({}, currAttrs, { style: style });
78
+ attrs = __assign(__assign({}, currAttrs), { style: style });
79
79
  }
80
80
  else {
81
- attrs = tslib_1.__assign({}, currAttrs, { width: width, height: height });
81
+ attrs = __assign(__assign({}, currAttrs), { width: width, height: height });
82
82
  }
83
83
  var newImage = selection.node.type.createAndFill(attrs);
84
84
  if (newImage) {
@@ -1,6 +1,6 @@
1
- import * as tslib_1 from "tslib";
1
+ import { __assign } from "tslib";
2
2
  import { Plugin } from 'prosemirror-state';
3
- import { tableNodeTypes, TableMap } from 'prosemirror-tables';
3
+ import { tableNodeTypes, TableMap } from 'prosemirror-tables-ts';
4
4
  import { Decoration, DecorationSet } from 'prosemirror-view';
5
5
  import { colgroupAttr } from '../../config/constants';
6
6
  import { TableView } from './table-view';
@@ -148,7 +148,7 @@ function handleMouseDown(view, event, cellMinWidth) {
148
148
  tableDom.insertBefore(colgroup, tableDom.firstChild);
149
149
  col = cols[cellIndex];
150
150
  col.style.width = col.offsetWidth + 'px';
151
- tableAttrs = tslib_1.__assign({}, tableNode.attrs, (_a = {}, _a[colgroupAttr] = '<colgroup>' + cols.reduce(function (acc, cur) { return acc + cur.outerHTML; }, '') + '</colgroup>', _a));
151
+ tableAttrs = __assign(__assign({}, tableNode.attrs), (_a = {}, _a[colgroupAttr] = '<colgroup>' + cols.reduce(function (acc, cur) { return acc + cur.outerHTML; }, '') + '</colgroup>', _a));
152
152
  }
153
153
  var width = parseFloat(col.style.width);
154
154
  var tr = view.state.tr.setMeta(key, { setDragging: { startX: event.clientX, startWidth: width } });
@@ -222,7 +222,7 @@ function updateColumnWidth(view, tr, cell, _width) {
222
222
  var attrs = tableNode.attrs;
223
223
  if (tableNode && attrs[colgroupAttr]) {
224
224
  var colgroup = tableDom.firstChild;
225
- attrs = tslib_1.__assign({}, attrs, (_a = {}, _a[colgroupAttr] = colgroup.outerHTML, _a));
225
+ attrs = __assign(__assign({}, attrs), (_a = {}, _a[colgroupAttr] = colgroup.outerHTML, _a));
226
226
  }
227
227
  var tableDomWidth = tableDom.style.width;
228
228
  if (tableDom && tableDomWidth && parseStyle(attrs.style).width !== tableDomWidth) {
@@ -1,5 +1,5 @@
1
1
  import { Plugin } from 'prosemirror-state';
2
- import { TableMap, tableNodeTypes } from 'prosemirror-tables';
2
+ import { TableMap, tableNodeTypes } from 'prosemirror-tables-ts';
3
3
  import { Decoration, DecorationSet } from 'prosemirror-view';
4
4
  import { domCellAround, otherResizeHandle, otherResizing, parentNode, parseStyle, setNodeStyle, tableRowResizeKey as key } from './utils';
5
5
  var TableRowView = /** @class */ (function () {
@@ -1,4 +1,4 @@
1
- import * as tslib_1 from "tslib";
1
+ import { __assign } from "tslib";
2
2
  import { NodeSelection, Plugin } from 'prosemirror-state';
3
3
  import { colgroupAttr, dataResizeDirTable, resizableAttr } from '../../config/constants';
4
4
  import { getTable, parentNode, parseStyle, setNodeStyle, tableResizeKey as key } from './utils';
@@ -9,8 +9,8 @@ var commonDir = {
9
9
  'northwest': true,
10
10
  'northeast': true
11
11
  };
12
- var horizontalDir = tslib_1.__assign({ 'east': true, 'west': true }, commonDir);
13
- var verticalDir = tslib_1.__assign({ 'south': true, 'north': true }, commonDir);
12
+ var horizontalDir = __assign({ 'east': true, 'west': true }, commonDir);
13
+ var verticalDir = __assign({ 'south': true, 'north': true }, commonDir);
14
14
  var ResizeState = /** @class */ (function () {
15
15
  function ResizeState(activeHandle, dragging, nodePosition) {
16
16
  this.activeHandle = activeHandle;
@@ -109,7 +109,7 @@ var toPixels = function (view, tr, tablePos, attrs) {
109
109
  widthChanged = true;
110
110
  }
111
111
  });
112
- var tableAttrs = tslib_1.__assign({}, attrs);
112
+ var tableAttrs = __assign({}, attrs);
113
113
  if (widthChanged) {
114
114
  tableAttrs[colgroupAttr] = colgroup.outerHTML;
115
115
  }
@@ -222,22 +222,22 @@ export var tableResizing = function (options) {
222
222
  tr.setMeta('addToHistory', false);
223
223
  if (selected && prevSelected && selected.pos !== prevSelected.pos) {
224
224
  tr.setMeta(key, { nodePosition: selected.pos });
225
- tr.setNodeMarkup(prevSelected.pos, nodeType, tslib_1.__assign({}, prevSelected.node.attrs, (_a = {}, _a[resizableAttr] = false, _a)));
226
- tr.setNodeMarkup(selected.pos, nodeType, tslib_1.__assign({}, selected.node.attrs, (_b = {}, _b[resizableAttr] = true, _b)));
225
+ tr.setNodeMarkup(prevSelected.pos, nodeType, __assign(__assign({}, prevSelected.node.attrs), (_a = {}, _a[resizableAttr] = false, _a)));
226
+ tr.setNodeMarkup(selected.pos, nodeType, __assign(__assign({}, selected.node.attrs), (_b = {}, _b[resizableAttr] = true, _b)));
227
227
  view.dispatch(tr);
228
228
  }
229
229
  else if (selected && prevSelected && selected.pos === prevSelected.pos &&
230
230
  !selected.node.attrs[resizableAttr] && !state.selection.eq(prevState.selection)) {
231
231
  tr.setMeta(key, { nodePosition: selected.pos });
232
- view.dispatch(tr.setNodeMarkup(selected.pos, nodeType, tslib_1.__assign({}, selected.node.attrs, (_c = {}, _c[resizableAttr] = true, _c))));
232
+ view.dispatch(tr.setNodeMarkup(selected.pos, nodeType, __assign(__assign({}, selected.node.attrs), (_c = {}, _c[resizableAttr] = true, _c))));
233
233
  }
234
234
  else if (selected && !prevSelected) {
235
235
  tr.setMeta(key, { nodePosition: selected.pos });
236
- view.dispatch(tr.setNodeMarkup(selected.pos, nodeType, tslib_1.__assign({}, selected.node.attrs, (_d = {}, _d[resizableAttr] = true, _d))));
236
+ view.dispatch(tr.setNodeMarkup(selected.pos, nodeType, __assign(__assign({}, selected.node.attrs), (_d = {}, _d[resizableAttr] = true, _d))));
237
237
  }
238
238
  else if (!selected && prevSelected) {
239
239
  tr.setMeta(key, { nodePosition: -1 });
240
- view.dispatch(tr.setNodeMarkup(prevSelected.pos, nodeType, tslib_1.__assign({}, prevSelected.node.attrs, (_f = {}, _f[resizableAttr] = false, _f))));
240
+ view.dispatch(tr.setNodeMarkup(prevSelected.pos, nodeType, __assign(__assign({}, prevSelected.node.attrs), (_f = {}, _f[resizableAttr] = false, _f))));
241
241
  }
242
242
  }
243
243
  }
@@ -1,4 +1,4 @@
1
- import * as tslib_1 from "tslib";
1
+ import { __assign } from "tslib";
2
2
  import { PluginKey } from 'prosemirror-state';
3
3
  import { changeStylesString } from '../../utils';
4
4
  export var reAnyValue = /^.+$/;
@@ -7,20 +7,20 @@ export var parseStyle = function (styleText) {
7
7
  var _a;
8
8
  var nameValue = s.split(/\s*:\s*/);
9
9
  return _a = {}, _a[nameValue[0]] = nameValue[1], _a;
10
- }).reduce(function (acc, val) { return (tslib_1.__assign({}, acc, val)); }, {});
10
+ }).reduce(function (acc, val) { return (__assign(__assign({}, acc), val)); }, {});
11
11
  return styles;
12
12
  };
13
13
  export function setNodeStyle(nodeAttrs, styleType, value) {
14
14
  var attrs;
15
15
  if (new RegExp('[^-]?' + styleType + ':').test(nodeAttrs.style || '')) {
16
16
  var style = changeStylesString(nodeAttrs.style || '', { style: styleType, value: reAnyValue, newValue: value }).style;
17
- attrs = tslib_1.__assign({}, nodeAttrs, { style: style });
17
+ attrs = __assign(__assign({}, nodeAttrs), { style: style });
18
18
  }
19
19
  else if (nodeAttrs.style) {
20
- attrs = tslib_1.__assign({}, nodeAttrs, { style: nodeAttrs.style.replace(/;$/, '') + '; ' + styleType + ': ' + value + ';' });
20
+ attrs = __assign(__assign({}, nodeAttrs), { style: nodeAttrs.style.replace(/;$/, '') + '; ' + styleType + ': ' + value + ';' });
21
21
  }
22
22
  else {
23
- attrs = tslib_1.__assign({}, nodeAttrs, { style: styleType + ': ' + value + ';' });
23
+ attrs = __assign(__assign({}, nodeAttrs), { style: styleType + ': ' + value + ';' });
24
24
  }
25
25
  return attrs;
26
26
  }
package/dist/es/table.js CHANGED
@@ -1,4 +1,4 @@
1
- import { addRowAfter as pmAddRowAfter, addRowBefore as pmAddRowBefore } from 'prosemirror-tables';
1
+ import { addRowAfter as pmAddRowAfter, addRowBefore as pmAddRowBefore } from 'prosemirror-tables-ts';
2
2
  import { rowTypeAttr } from './config/constants';
3
3
  /**
4
4
  * Creates a table.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- import * as tslib_1 from "tslib";
1
+ import { __rest } from "tslib";
2
2
  import { changeStylesString } from './utils';
3
3
  import { ReplaceAroundStep } from 'prosemirror-transform';
4
4
  import { Fragment, Slice } from 'prosemirror-model';
@@ -88,15 +88,15 @@ export const formatBlockElements = (value, commandName) => (state, dispatch) =>
88
88
  blocks.forEach(node => {
89
89
  if (node.type.isTextblock) {
90
90
  if (value === 'p') {
91
- const _a = node.attrs, { level } = _a, attrs = tslib_1.__rest(_a, ["level"]);
91
+ const _a = node.attrs, { level } = _a, attrs = __rest(_a, ["level"]);
92
92
  changeTextBlock(tr, node, nodes.paragraph, attrs);
93
93
  }
94
94
  else if (/^h[1-6]$/i.test(value)) {
95
95
  const level = parseInt(value.substr(1), 10);
96
- changeTextBlock(tr, node, nodes.heading, Object.assign({}, node.attrs, { level }));
96
+ changeTextBlock(tr, node, nodes.heading, Object.assign(Object.assign({}, node.attrs), { level }));
97
97
  }
98
98
  else if (value === 'blockquote') {
99
- const _b = node.attrs, { level } = _b, attrs = tslib_1.__rest(_b, ["level"]);
99
+ const _b = node.attrs, { level } = _b, attrs = __rest(_b, ["level"]);
100
100
  changeTextBlock(tr, node, nodes.blockquote, attrs);
101
101
  }
102
102
  }
@@ -120,7 +120,7 @@ export const cleanTextBlockFormatting = (tr, options = { blocksInSelection: true
120
120
  const nodes = blockNodes({ doc, selection }, { blocksInSelection });
121
121
  const textBlocks = nodes.filter(node => node.isTextblock);
122
122
  textBlocks.forEach(node => {
123
- const _a = node.attrs || {}, { style = '', class: className = '' } = _a, attrs = tslib_1.__rest(_a, ["style", "class"]);
123
+ const _a = node.attrs || {}, { style = '', class: className = '' } = _a, attrs = __rest(_a, ["style", "class"]);
124
124
  const nodeType = blockNodeType || node.type;
125
125
  if (style || className || nodeType !== node.type) {
126
126
  changeTextBlock(tr, node, nodeType, attrs);
@@ -20,13 +20,13 @@ export const buildKeymap = (schema, options) => {
20
20
  keys['Mod-y'] = redo;
21
21
  }
22
22
  if (schema.marks.strong) {
23
- keys['Mod-b'] = expandToWordWrap(toggleInlineFormat, Object.assign({}, bold, { applyToWord }));
23
+ keys['Mod-b'] = expandToWordWrap(toggleInlineFormat, Object.assign(Object.assign({}, bold), { applyToWord }));
24
24
  }
25
25
  if (schema.marks.em) {
26
- keys['Mod-i'] = expandToWordWrap(toggleInlineFormat, Object.assign({}, italic, { applyToWord }));
26
+ keys['Mod-i'] = expandToWordWrap(toggleInlineFormat, Object.assign(Object.assign({}, italic), { applyToWord }));
27
27
  }
28
28
  if (schema.marks.u) {
29
- keys['Mod-u'] = expandToWordWrap(toggleInlineFormat, Object.assign({}, underline, { applyToWord }));
29
+ keys['Mod-u'] = expandToWordWrap(toggleInlineFormat, Object.assign(Object.assign({}, underline), { applyToWord }));
30
30
  }
31
31
  if (schema.nodes.hard_break) {
32
32
  const br = schema.nodes.hard_break;