@block-kit/plugin 1.0.0 → 1.0.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.
Files changed (169) hide show
  1. package/dist/es/align/{index.js → align/index.js} +1 -1
  2. package/dist/es/background/{index.js → background/index.js} +1 -1
  3. package/dist/es/bold/{index.js → bold/index.js} +1 -1
  4. package/dist/es/bullet-list/{index.js → bullet-list/index.js} +8 -12
  5. package/dist/es/{is-2b264ec8.js → bullet-list/utils/bullet-list/utils/is.js} +2 -2
  6. package/dist/es/bullet-list/view/bullet-list/view/list.js +9 -0
  7. package/dist/es/divider/{index.js → divider/index.js} +5 -5
  8. package/dist/es/emoji/{index.js → emoji/index.js} +2 -2
  9. package/dist/es/font-color/{index.js → font-color/index.js} +1 -1
  10. package/dist/es/font-size/{index.js → font-size/index.js} +1 -1
  11. package/dist/es/heading/{index.js → heading/index.js} +1 -1
  12. package/dist/es/image/image/index.js +135 -0
  13. package/dist/es/image/view/image/view/image.js +39 -0
  14. package/dist/es/image/view/image/view/wrapper.js +90 -0
  15. package/dist/es/indent/{index.js → indent/index.js} +3 -3
  16. package/dist/es/index.css +1 -1
  17. package/dist/es/index.js +50 -64
  18. package/dist/es/inline-code/{index.js → inline-code/index.js} +2 -2
  19. package/dist/es/italic/{index.js → italic/index.js} +1 -1
  20. package/dist/es/line-height/{index.js → line-height/index.js} +1 -1
  21. package/dist/es/link/{index.js → link/index.js} +5 -17
  22. package/dist/es/link/view/link/view/a.js +18 -0
  23. package/dist/es/mention/mention/index.js +28 -0
  24. package/dist/es/mention/modules/mention/modules/suggest.js +98 -0
  25. package/dist/es/mention/utils/mention/utils/constant.js +24 -0
  26. package/dist/es/mention/view/mention/view/suggest.js +72 -0
  27. package/dist/es/{tslib.es6-83956cc1.js → node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs.js} +1 -1
  28. package/dist/es/order-list/{index.js → order-list/index.js} +11 -150
  29. package/dist/es/order-list/utils/order-list/utils/format.js +75 -0
  30. package/dist/es/order-list/utils/order-list/utils/is.js +12 -0
  31. package/dist/es/order-list/utils/order-list/utils/serial.js +68 -0
  32. package/dist/es/order-list/view/order-list/view/list.js +10 -0
  33. package/dist/es/quote/{index.js → quote/index.js} +4 -4
  34. package/dist/es/{selection-badfb0bc.js → shared/components/shared/components/selection.js} +3 -31
  35. package/dist/es/shared/icons/shared/icons/divider.js +5 -0
  36. package/dist/es/shared/icons/shared/icons/emoji.js +5 -0
  37. package/dist/es/shared/icons/shared/icons/font-color.js +5 -0
  38. package/dist/es/shared/icons/shared/icons/font-size.js +5 -0
  39. package/dist/es/shared/icons/shared/icons/justify.js +5 -0
  40. package/dist/es/shared/icons/shared/icons/line-height.js +5 -0
  41. package/dist/es/shared/icons/shared/icons/text.js +5 -0
  42. package/dist/es/shared/modules/shared/modules/selection.js +32 -0
  43. package/dist/es/{dom-71a99400.js → shared/utils/shared/utils/dom.js} +1 -1
  44. package/dist/es/shared/utils/shared/utils/event.js +5 -0
  45. package/dist/es/{is-3de778e2.js → shared/utils/shared/utils/is.js} +1 -1
  46. package/dist/es/shortcut/modules/shortcut/modules/preset.js +23 -0
  47. package/dist/es/shortcut/{index.js → shortcut/index.js} +6 -25
  48. package/dist/es/strike/{index.js → strike/index.js} +1 -1
  49. package/dist/es/toolbar/context/toolbar/context/basic.js +69 -0
  50. package/dist/es/toolbar/context/toolbar/context/float.js +67 -0
  51. package/dist/es/toolbar/context/toolbar/context/provider.js +12 -0
  52. package/dist/es/toolbar/modules/toolbar/modules/align.js +20 -0
  53. package/dist/es/toolbar/modules/toolbar/modules/bold.js +16 -0
  54. package/dist/es/toolbar/modules/toolbar/modules/bullet-list.js +17 -0
  55. package/dist/es/toolbar/modules/toolbar/modules/cut.js +7 -0
  56. package/dist/es/toolbar/modules/toolbar/modules/divider.js +15 -0
  57. package/dist/es/toolbar/modules/toolbar/modules/emoji.js +25 -0
  58. package/dist/es/toolbar/modules/toolbar/modules/font-color.js +49 -0
  59. package/dist/es/toolbar/modules/toolbar/modules/font-size.js +19 -0
  60. package/dist/es/toolbar/modules/toolbar/modules/heading.js +19 -0
  61. package/dist/es/toolbar/modules/toolbar/modules/history.js +34 -0
  62. package/dist/es/toolbar/modules/toolbar/modules/image.js +15 -0
  63. package/dist/es/toolbar/modules/toolbar/modules/inline-code.js +15 -0
  64. package/dist/es/toolbar/modules/toolbar/modules/italic.js +16 -0
  65. package/dist/es/toolbar/modules/toolbar/modules/line-height.js +15 -0
  66. package/dist/es/toolbar/modules/toolbar/modules/link.js +89 -0
  67. package/dist/es/toolbar/modules/toolbar/modules/order-list.js +17 -0
  68. package/dist/es/toolbar/modules/toolbar/modules/quote.js +15 -0
  69. package/dist/es/toolbar/modules/toolbar/modules/strike.js +15 -0
  70. package/dist/es/toolbar/modules/toolbar/modules/underline.js +15 -0
  71. package/dist/es/toolbar/toolbar/index.js +45 -0
  72. package/dist/es/toolbar/types/toolbar/types/index.js +7 -0
  73. package/dist/es/{marks-ac0ec630.js → toolbar/utils/toolbar/utils/marks.js} +1 -5
  74. package/dist/es/underline/{index.js → underline/index.js} +1 -1
  75. package/dist/lib/bullet-list/index.js +21 -25
  76. package/dist/lib/{is-fa1755d0.js → bullet-list/utils/is.js} +3 -1
  77. package/dist/lib/bullet-list/view/list.js +13 -0
  78. package/dist/lib/divider/index.js +7 -7
  79. package/dist/lib/emoji/index.js +1 -1
  80. package/dist/lib/image/index.js +9 -119
  81. package/dist/lib/image/view/image.js +43 -0
  82. package/dist/lib/image/view/wrapper.js +94 -0
  83. package/dist/lib/indent/index.js +3 -3
  84. package/dist/lib/index.css +1 -1
  85. package/dist/lib/index.js +23 -37
  86. package/dist/lib/inline-code/index.js +1 -1
  87. package/dist/lib/link/index.js +3 -15
  88. package/dist/lib/link/view/a.js +22 -0
  89. package/dist/lib/mention/index.js +26 -15
  90. package/dist/lib/mention/modules/suggest.js +106 -0
  91. package/dist/lib/mention/utils/constant.js +29 -0
  92. package/dist/lib/mention/view/suggest.js +76 -0
  93. package/dist/lib/order-list/index.js +34 -173
  94. package/dist/lib/order-list/utils/format.js +79 -0
  95. package/dist/lib/{is-18806678.js → order-list/utils/is.js} +4 -2
  96. package/dist/lib/order-list/utils/serial.js +72 -0
  97. package/dist/lib/order-list/view/list.js +14 -0
  98. package/dist/lib/quote/index.js +12 -12
  99. package/dist/lib/{selection-868f15c1.js → shared/components/selection.js} +2 -29
  100. package/dist/lib/shared/icons/divider.js +9 -0
  101. package/dist/lib/shared/icons/emoji.js +9 -0
  102. package/dist/lib/shared/icons/font-color.js +9 -0
  103. package/dist/lib/shared/icons/font-size.js +9 -0
  104. package/dist/lib/shared/icons/justify.js +9 -0
  105. package/dist/lib/shared/icons/line-height.js +9 -0
  106. package/dist/lib/shared/icons/text.js +9 -0
  107. package/dist/lib/shared/modules/selection.js +36 -0
  108. package/dist/lib/{dom-cb8b8e40.js → shared/utils/dom.js} +2 -0
  109. package/dist/lib/shared/utils/event.js +9 -0
  110. package/dist/lib/{is-473d664a.js → shared/utils/is.js} +2 -0
  111. package/dist/lib/shortcut/index.js +8 -27
  112. package/dist/lib/shortcut/modules/preset.js +27 -0
  113. package/dist/lib/toolbar/context/basic.js +73 -0
  114. package/dist/lib/toolbar/context/float.js +75 -0
  115. package/dist/lib/toolbar/context/provider.js +21 -0
  116. package/dist/lib/toolbar/index.js +45 -38
  117. package/dist/lib/toolbar/modules/align.js +24 -0
  118. package/dist/lib/toolbar/modules/bold.js +20 -0
  119. package/dist/lib/toolbar/modules/bullet-list.js +21 -0
  120. package/dist/lib/toolbar/modules/cut.js +11 -0
  121. package/dist/lib/toolbar/modules/divider.js +19 -0
  122. package/dist/lib/toolbar/modules/emoji.js +33 -0
  123. package/dist/lib/toolbar/modules/font-color.js +53 -0
  124. package/dist/lib/toolbar/modules/font-size.js +23 -0
  125. package/dist/lib/toolbar/modules/heading.js +23 -0
  126. package/dist/lib/toolbar/modules/history.js +38 -0
  127. package/dist/lib/toolbar/modules/image.js +19 -0
  128. package/dist/lib/toolbar/modules/inline-code.js +19 -0
  129. package/dist/lib/toolbar/modules/italic.js +20 -0
  130. package/dist/lib/toolbar/modules/line-height.js +19 -0
  131. package/dist/lib/toolbar/modules/link.js +97 -0
  132. package/dist/lib/toolbar/modules/order-list.js +21 -0
  133. package/dist/lib/toolbar/modules/quote.js +19 -0
  134. package/dist/lib/toolbar/modules/strike.js +19 -0
  135. package/dist/lib/toolbar/modules/underline.js +19 -0
  136. package/dist/lib/{marks-a30b8a0f.js → toolbar/utils/marks.js} +1 -4
  137. package/dist/styles/index.css +1 -0
  138. package/package.json +6 -6
  139. package/dist/es/image/index.js +0 -245
  140. package/dist/es/index-1e46887d.js +0 -205
  141. package/dist/es/index-ddc2e5ac.js +0 -493
  142. package/dist/es/is-7f3ae820.js +0 -12
  143. package/dist/es/mention/index.js +0 -13
  144. package/dist/es/toolbar/index.js +0 -34
  145. package/dist/es/toolbar/types/index.js +0 -7
  146. package/dist/lib/index-f50053bf.js +0 -506
  147. package/dist/lib/index-ffc4bb34.js +0 -212
  148. /package/dist/es/align/types/{index.js → align/types/index.js} +0 -0
  149. /package/dist/es/background/types/{index.js → background/types/index.js} +0 -0
  150. /package/dist/es/bold/types/{index.js → bold/types/index.js} +0 -0
  151. /package/dist/es/bullet-list/types/{index.js → bullet-list/types/index.js} +0 -0
  152. /package/dist/es/divider/types/{index.js → divider/types/index.js} +0 -0
  153. /package/dist/es/emoji/types/{index.js → emoji/types/index.js} +0 -0
  154. /package/dist/es/font-color/types/{index.js → font-color/types/index.js} +0 -0
  155. /package/dist/es/font-size/types/{index.js → font-size/types/index.js} +0 -0
  156. /package/dist/es/heading/types/{index.js → heading/types/index.js} +0 -0
  157. /package/dist/es/image/types/{index.js → image/types/index.js} +0 -0
  158. /package/dist/es/indent/types/{index.js → indent/types/index.js} +0 -0
  159. /package/dist/es/inline-code/types/{index.js → inline-code/types/index.js} +0 -0
  160. /package/dist/es/italic/types/{index.js → italic/types/index.js} +0 -0
  161. /package/dist/es/line-height/types/{index.js → line-height/types/index.js} +0 -0
  162. /package/dist/es/link/types/{index.js → link/types/index.js} +0 -0
  163. /package/dist/es/mention/types/{index.js → mention/types/index.js} +0 -0
  164. /package/dist/es/order-list/types/{index.js → order-list/types/index.js} +0 -0
  165. /package/dist/es/quote/types/{index.js → quote/types/index.js} +0 -0
  166. /package/dist/es/shortcut/types/{index.js → shortcut/types/index.js} +0 -0
  167. /package/dist/es/strike/types/{index.js → strike/types/index.js} +0 -0
  168. /package/dist/es/underline/types/{index.js → underline/types/index.js} +0 -0
  169. /package/dist/lib/{tslib.es6-d44c9a95.js → tslib.es6-82029525.js} +0 -0
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var utils = require('@block-kit/utils');
7
+ var orderList_utils_format = require('../utils/format.js');
8
+
9
+ const OrderListView = props => {
10
+ const { level, start, children } = props;
11
+ return (jsxRuntime.jsxs("ol", { className: "block-kit-order-list", children: [jsxRuntime.jsx("div", { contentEditable: false, className: "block-kit-order-indicator", onMouseDown: utils.preventNativeEvent, children: orderList_utils_format.formatListLevel(start, level) }), jsxRuntime.jsx("li", { value: start, className: utils.cs("block-kit-order-item", `block-kit-li-level-${level % 3}`), children: children })] }));
12
+ };
13
+
14
+ exports.OrderListView = OrderListView;
@@ -2,14 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var tslib_es6 = require('../tslib.es6-d44c9a95.js');
5
+ var tslib_es6 = require('../tslib.es6-82029525.js');
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var core = require('@block-kit/core');
8
8
  var delta = require('@block-kit/delta');
9
9
  var react = require('@block-kit/react');
10
10
  var utils = require('@block-kit/utils');
11
- var dom = require('../dom-cb8b8e40.js');
12
- var is = require('../is-473d664a.js');
11
+ var shared_utils_dom = require('../shared/utils/dom.js');
12
+ var shared_utils_is = require('../shared/utils/is.js');
13
13
  var quote_types_index = require('./types/index.js');
14
14
 
15
15
  class QuotePlugin extends react.EditorPlugin {
@@ -73,21 +73,21 @@ class QuotePlugin extends react.EditorPlugin {
73
73
  const attrs = startLine.attributes;
74
74
  // 当前行是引用行, 且按下回车键, 且选区折叠, 且当前行是空行
75
75
  // => 删除当前的引用行格式
76
- if (is.isKeyCode(event, utils.KEY_CODE.ENTER) &&
76
+ if (shared_utils_is.isKeyCode(event, utils.KEY_CODE.ENTER) &&
77
77
  attrs[quote_types_index.QUOTE_KEY] &&
78
78
  sel.isCollapsed &&
79
- is.isEmptyLine(startLine)) {
79
+ shared_utils_is.isEmptyLine(startLine)) {
80
80
  const nextAttrs = {
81
81
  [quote_types_index.QUOTE_KEY]: utils.NIL,
82
82
  };
83
83
  const delta$1 = new delta.Delta().retain(startLine.start + startLine.length - 1).retain(1, nextAttrs);
84
84
  this.editor.state.apply(delta$1, { autoCaret: false });
85
- dom.preventContextEvent(event, context);
85
+ shared_utils_dom.preventContextEvent(event, context);
86
86
  return void 0;
87
87
  }
88
88
  // 当前行是引用行, 且按下回车键, 且选区折叠, 且位于行首, 且上一行是引用行
89
89
  // => 继续引用格式, 避免默认的处理, 保持引用的连续性
90
- if (is.isKeyCode(event, utils.KEY_CODE.ENTER) &&
90
+ if (shared_utils_is.isKeyCode(event, utils.KEY_CODE.ENTER) &&
91
91
  attrs[quote_types_index.QUOTE_KEY] &&
92
92
  sel.isCollapsed &&
93
93
  sel.start.offset === 0 &&
@@ -96,19 +96,19 @@ class QuotePlugin extends react.EditorPlugin {
96
96
  const nextAttrs = Object.assign({}, prevLine.attributes);
97
97
  const delta$1 = new delta.Delta().retain(startLine.start).insertEOL(nextAttrs);
98
98
  this.editor.state.apply(delta$1);
99
- dom.preventContextEvent(event, context);
99
+ shared_utils_dom.preventContextEvent(event, context);
100
100
  return void 0;
101
101
  }
102
102
  // 当前行是引用行, 且按下回车键, 且非行首
103
103
  // => 在引用行内部插入换行符, 且携带引用状态
104
- if (is.isKeyCode(event, utils.KEY_CODE.ENTER) && attrs[quote_types_index.QUOTE_KEY] && sel.start.offset) {
104
+ if (shared_utils_is.isKeyCode(event, utils.KEY_CODE.ENTER) && attrs[quote_types_index.QUOTE_KEY] && sel.start.offset) {
105
105
  this.editor.perform.insertBreak(sel, attrs);
106
- dom.preventContextEvent(event, context);
106
+ shared_utils_dom.preventContextEvent(event, context);
107
107
  return void 0;
108
108
  }
109
109
  // 当前行是引用行, 且折叠选区, 且在行首, 且按下退格键
110
110
  // => 将当前行的引用状态移除
111
- if (is.isKeyCode(event, utils.KEY_CODE.BACKSPACE) &&
111
+ if (shared_utils_is.isKeyCode(event, utils.KEY_CODE.BACKSPACE) &&
112
112
  sel.isCollapsed &&
113
113
  attrs[quote_types_index.QUOTE_KEY] &&
114
114
  !sel.start.offset) {
@@ -116,7 +116,7 @@ class QuotePlugin extends react.EditorPlugin {
116
116
  .retain(startLine.start + startLine.length - 1)
117
117
  .retain(1, { [quote_types_index.QUOTE_KEY]: utils.NIL });
118
118
  this.editor.state.apply(delta$1, { autoCaret: false });
119
- dom.preventContextEvent(event, context);
119
+ shared_utils_dom.preventContextEvent(event, context);
120
120
  return void 0;
121
121
  }
122
122
  }
@@ -1,11 +1,12 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var jsxRuntime = require('react/jsx-runtime');
4
6
  var core = require('@block-kit/core');
5
7
  var react = require('@block-kit/react');
6
8
  var utils = require('@block-kit/utils');
7
9
  var React = require('react');
8
- var tslib_es6 = require('./tslib.es6-d44c9a95.js');
9
10
 
10
11
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
12
 
@@ -57,32 +58,4 @@ class SelectionHOC extends React__default["default"].PureComponent {
57
58
  }
58
59
  SelectionHOC.contextType = react.ReadonlyContext;
59
60
 
60
- class SelectionPlugin {
61
- constructor(editor) {
62
- this.editor = editor;
63
- this.idToView = new Map();
64
- editor.event.on(core.EDITOR_EVENT.SELECTION_CHANGE, this.onSelectionChange);
65
- }
66
- destroy() {
67
- this.idToView.clear();
68
- this.editor.event.off(core.EDITOR_EVENT.SELECTION_CHANGE, this.onSelectionChange);
69
- }
70
- mountView(id, view) {
71
- this.idToView.set(id, view);
72
- }
73
- unmountView(id) {
74
- this.idToView.delete(id);
75
- }
76
- onSelectionChange(e) {
77
- const current = e.current;
78
- this.idToView.forEach(view => {
79
- view.onSelectionChange(current);
80
- });
81
- }
82
- }
83
- tslib_es6.__decorate([
84
- utils.Bind
85
- ], SelectionPlugin.prototype, "onSelectionChange", null);
86
-
87
61
  exports.SelectionHOC = SelectionHOC;
88
- exports.SelectionPlugin = SelectionPlugin;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ const DividerIcon = () => (jsxRuntime.jsx("svg", { className: "arco-icon", viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "currentColor", children: jsxRuntime.jsx("path", { d: "M64.128 810.666667h128a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-128a21.333333 21.333333 0 0 1-21.333333-21.333333v-42.666667a21.333333 21.333333 0 0 1 21.333333-21.333333z m384 0h128a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-128a21.333333 21.333333 0 0 1-21.333333-21.333333v-42.666667a21.333333 21.333333 0 0 1 21.333333-21.333333z m384 0h128a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-128a21.333333 21.333333 0 0 1-21.333333-21.333333v-42.666667a21.333333 21.333333 0 0 1 21.333333-21.333333z m-768-682.666667h128a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-128a21.333333 21.333333 0 0 1-21.333333-21.333333V149.333333a21.333333 21.333333 0 0 1 21.333333-21.333333z m384 0h128a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-128a21.333333 21.333333 0 0 1-21.333333-21.333333V149.333333a21.333333 21.333333 0 0 1 21.333333-21.333333z m384 0h128a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-128a21.333333 21.333333 0 0 1-21.333333-21.333333V149.333333a21.333333 21.333333 0 0 1 21.333333-21.333333zM64 469.333333h896a21.333333 21.333333 0 0 1 21.333333 21.333334v42.666666a21.333333 21.333333 0 0 1-21.333333 21.333334H64a21.333333 21.333333 0 0 1-21.333333-21.333334v-42.666666a21.333333 21.333333 0 0 1 21.333333-21.333334z" }) }));
8
+
9
+ exports.DividerIcon = DividerIcon;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ const EmojiIcon = () => (jsxRuntime.jsxs("svg", { className: "arco-icon", viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", "p-id": "5996", width: "1em", height: "1em", fill: "currentColor", children: [jsxRuntime.jsx("path", { d: "M512 128a384 384 0 1 0 0 768 384 384 0 0 0 0-768zM42.666667 512C42.666667 252.8 252.8 42.666667 512 42.666667s469.333333 210.133333 469.333333 469.333333-210.133333 469.333333-469.333333 469.333333S42.666667 771.2 42.666667 512z m533.333333-64a42.666667 42.666667 0 0 1 42.666667-42.666667h85.333333a42.666667 42.666667 0 1 1 0 85.333334h-85.333333a42.666667 42.666667 0 0 1-42.666667-42.666667z m-254.165333 193.834667a42.666667 42.666667 0 0 1 60.330666 0 183.594667 183.594667 0 0 0 259.669334 0 42.666667 42.666667 0 0 1 60.330666 60.330666 268.928 268.928 0 0 1-380.330666 0 42.666667 42.666667 0 0 1 0-60.330666z" }), jsxRuntime.jsx("path", { d: "M362.666667 362.666667a42.666667 42.666667 0 0 1 42.666666 42.666666v80a42.666667 42.666667 0 0 1-85.333333 0V405.333333a42.666667 42.666667 0 0 1 42.666667-42.666666z" })] }));
8
+
9
+ exports.EmojiIcon = EmojiIcon;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ const FontColorIcon = () => (jsxRuntime.jsx("svg", { className: "arco-icon", viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "currentColor", children: jsxRuntime.jsx("path", { d: "M594.9 842.3h-94.3l-67.4-180.9H158L94.4 842.3H0.1l251.7-660.9h91.3l251.8 660.9zM406.7 586.7l-99.8-274.8c-3.1-8.8-6.5-24.2-10.2-46.1h-2.1c-3.1 19.9-6.7 35.3-10.7 46.1l-99 274.8h221.8z m284.2-183.4c46.9-29.3 101.1-43.9 162.6-43.9 113.8 0 170.7 59.7 170.7 179.2v303.8h-82.8v-73h-2.1c-32.7 56-80.9 84.1-144.6 84.1-45.8 0-82.2-12.4-109.2-37.1-27-24.7-40.5-58.2-40.5-100.3 0-88.2 52.2-139.5 156.6-154l139.9-19.6c0-77.1-31.9-115.6-95.6-115.6-56.6 0-108.2 19.1-154.9 57.2v-80.8z m139.9 217.1c-38.7 5.1-65.4 14.8-80 29-14.7 14.2-22 34.1-22 59.7 0 22.5 8 40.8 23.9 55 15.9 14.2 37 21.3 63.1 21.3 36.4 0 66.4-12.8 90-38.4 23.6-25.6 35.4-57.7 35.4-96.4v-45.2l-110.4 15z" }) }));
8
+
9
+ exports.FontColorIcon = FontColorIcon;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ const FontSizeIcon = () => (jsxRuntime.jsxs("svg", { className: "arco-icon", viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "currentColor", children: [jsxRuntime.jsx("path", { d: "M597.333333 853.333333h85.333334L426.666667 170.666667H341.333333L85.333333 853.333333h85.333334l80-213.333333h266.666666z m-314.666666-298.666666L384 284.458667 485.333333 554.666667z" }), jsxRuntime.jsx("path", { d: "M918.784 331.178667V257.450667L832 170.666667l-86.784 86.784v73.728L810.666667 265.685333v492.629334l-65.450667-65.493334v73.728L832 853.333333l86.784-86.784v-73.728L853.333333 758.314667V265.685333l65.450667 65.493334z" })] }));
8
+
9
+ exports.FontSizeIcon = FontSizeIcon;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ const JustifyIcon = () => (jsxRuntime.jsx("svg", { className: "arco-icon", viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "currentColor", children: jsxRuntime.jsx("path", { d: "M875.975111 823.978667a36.010667 36.010667 0 1 1 0 72.021333H148.024889a36.010667 36.010667 0 1 1 0-72.021333h727.950222z m0-231.992889a36.010667 36.010667 0 1 1 0 72.021333H148.024889a36.010667 36.010667 0 1 1 0-72.021333h727.950222z m0-231.992889a36.010667 36.010667 0 1 1 0 72.021333H148.024889a36.010667 36.010667 0 0 1 0-72.021333h727.950222z m0-231.992889a36.010667 36.010667 0 1 1 0 72.021333H148.024889a36.010667 36.010667 0 0 1 0-72.021333h727.950222z", fill: "currentColor" }) }));
8
+
9
+ exports.JustifyIcon = JustifyIcon;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ const LineHeightIcon = () => (jsxRuntime.jsx("svg", { className: "arco-icon", viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "currentColor", children: jsxRuntime.jsx("path", { d: "M469.333333 170.666667h426.666667v85.333333H469.333333V170.666667zM256 298.666667v170.666666H170.666667V298.666667H42.666667l170.666666-170.666667 170.666667 170.666667H256z m0 426.666666h128l-170.666667 170.666667-170.666666-170.666667h128v-170.666666h85.333333v170.666666z m213.333333 42.666667h426.666667v85.333333H469.333333v-85.333333z m-85.333333-298.666667h512v85.333334H384v-85.333334z" }) }));
8
+
9
+ exports.LineHeightIcon = LineHeightIcon;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ const TextIcon = () => (jsxRuntime.jsx("svg", { className: "arco-icon", viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "currentColor", children: jsxRuntime.jsx("path", { d: "M853.333333 138.666667H170.666667c-17.066667 0-32 14.933333-32 32v128c0 17.066667 14.933333 32 32 32s32-14.933333 32-32V202.666667h277.333333v618.666666H384c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h256c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32h-96v-618.666666h277.333333V298.666667c0 17.066667 14.933333 32 32 32s32-14.933333 32-32V170.666667c0-17.066667-14.933333-32-32-32z" }) }));
8
+
9
+ exports.TextIcon = TextIcon;
@@ -0,0 +1,36 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib_es6 = require('../../tslib.es6-82029525.js');
6
+ var core = require('@block-kit/core');
7
+ var utils = require('@block-kit/utils');
8
+
9
+ class SelectionPlugin {
10
+ constructor(editor) {
11
+ this.editor = editor;
12
+ this.idToView = new Map();
13
+ editor.event.on(core.EDITOR_EVENT.SELECTION_CHANGE, this.onSelectionChange);
14
+ }
15
+ destroy() {
16
+ this.idToView.clear();
17
+ this.editor.event.off(core.EDITOR_EVENT.SELECTION_CHANGE, this.onSelectionChange);
18
+ }
19
+ mountView(id, view) {
20
+ this.idToView.set(id, view);
21
+ }
22
+ unmountView(id) {
23
+ this.idToView.delete(id);
24
+ }
25
+ onSelectionChange(e) {
26
+ const current = e.current;
27
+ this.idToView.forEach(view => {
28
+ view.onSelectionChange(current);
29
+ });
30
+ }
31
+ }
32
+ tslib_es6.__decorate([
33
+ utils.Bind
34
+ ], SelectionPlugin.prototype, "onSelectionChange", null);
35
+
36
+ exports.SelectionPlugin = SelectionPlugin;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  const EDITOR_TO_DOM = new WeakMap();
4
6
  /**
5
7
  * 设置挂载 DOM
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const PLUGIN_EVENTS = {
6
+ SHORTCUT_MARKS_CHANGE: "SHORTCUT_MARKS_CHANGE",
7
+ };
8
+
9
+ exports.PLUGIN_EVENTS = PLUGIN_EVENTS;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var delta = require('@block-kit/delta');
4
6
 
5
7
  const isEmptyLine = (line) => {
@@ -2,39 +2,20 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var tslib_es6 = require('../tslib.es6-d44c9a95.js');
5
+ var tslib_es6 = require('../tslib.es6-82029525.js');
6
6
  var core = require('@block-kit/core');
7
7
  var utils = require('@block-kit/utils');
8
- var marks = require('../marks-a30b8a0f.js');
9
- var bold_types_index = require('../bold/types/index.js');
10
- var italic_types_index = require('../italic/types/index.js');
11
- var is = require('../is-473d664a.js');
8
+ var shared_utils_event = require('../shared/utils/event.js');
9
+ var toolbar_utils_marks = require('../toolbar/utils/marks.js');
10
+ var shortcut_modules_preset = require('./modules/preset.js');
12
11
  var shortcut_types_index = require('./types/index.js');
13
- require('@block-kit/delta');
14
-
15
- const PRESET_SHORTCUT = {
16
- [bold_types_index.BOLD_KEY]: (event, payload) => {
17
- if (event[utils.CTRL_KEY] && is.isKeyCode(event, utils.KEY_CODE.B) && payload.sel) {
18
- const { editor, keys, sel } = payload;
19
- editor.perform.applyMarks(sel, { [bold_types_index.BOLD_KEY]: keys[bold_types_index.BOLD_KEY] ? utils.NIL : utils.TRULY });
20
- return true;
21
- }
22
- },
23
- [italic_types_index.ITALIC_KEY]: (event, payload) => {
24
- if (event[utils.CTRL_KEY] && is.isKeyCode(event, utils.KEY_CODE.I) && payload.sel) {
25
- const { editor, keys, sel } = payload;
26
- editor.perform.applyMarks(sel, { [italic_types_index.ITALIC_KEY]: keys[italic_types_index.ITALIC_KEY] ? utils.NIL : utils.TRULY });
27
- return true;
28
- }
29
- },
30
- };
31
12
 
32
13
  class Shortcut extends core.CorePlugin {
33
14
  constructor(editor, config) {
34
15
  super();
35
16
  this.editor = editor;
36
17
  this.key = shortcut_types_index.SHORTCUT_KEY;
37
- this.config = Object.values(Object.assign(Object.assign({}, PRESET_SHORTCUT), config));
18
+ this.config = Object.values(Object.assign(Object.assign({}, shortcut_modules_preset.PRESET_SHORTCUT), config));
38
19
  this.editor.event.on(core.EDITOR_EVENT.KEY_DOWN, this.onKeydown, 1000);
39
20
  }
40
21
  destroy() {
@@ -50,7 +31,7 @@ class Shortcut extends core.CorePlugin {
50
31
  }
51
32
  const lines = this.editor.state.block.getLines();
52
33
  const { start, end } = current;
53
- const lineMarkMap = marks.filterLineMarkMap(lines.slice(start.line, end.line + 1).map(line => line.attributes));
34
+ const lineMarkMap = toolbar_utils_marks.filterLineMarkMap(lines.slice(start.line, end.line + 1).map(line => line.attributes));
54
35
  if (current.isCollapsed) {
55
36
  return Object.assign(Object.assign({}, this.editor.collect.marks), lineMarkMap);
56
37
  }
@@ -63,7 +44,7 @@ class Shortcut extends core.CorePlugin {
63
44
  const fragment = this.editor.collect.getFragment();
64
45
  fragment && ops.push(...fragment);
65
46
  }
66
- const markMap = marks.filterMarkMap(ops);
47
+ const markMap = toolbar_utils_marks.filterMarkMap(ops);
67
48
  return Object.assign(Object.assign({}, markMap), lineMarkMap);
68
49
  }
69
50
  onKeydown(event) {
@@ -77,7 +58,7 @@ class Shortcut extends core.CorePlugin {
77
58
  const result = func(event, payload);
78
59
  if (!result)
79
60
  continue;
80
- this.editor.event.trigger(marks.PLUGIN_EVENTS.SHORTCUT_MARKS_CHANGE, null);
61
+ this.editor.event.trigger(shared_utils_event.PLUGIN_EVENTS.SHORTCUT_MARKS_CHANGE, null);
81
62
  break;
82
63
  }
83
64
  }
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var utils = require('@block-kit/utils');
6
+ var bold_types_index = require('../../bold/types/index.js');
7
+ var italic_types_index = require('../../italic/types/index.js');
8
+ var shared_utils_is = require('../../shared/utils/is.js');
9
+
10
+ const PRESET_SHORTCUT = {
11
+ [bold_types_index.BOLD_KEY]: (event, payload) => {
12
+ if (event[utils.CTRL_KEY] && shared_utils_is.isKeyCode(event, utils.KEY_CODE.B) && payload.sel) {
13
+ const { editor, keys, sel } = payload;
14
+ editor.perform.applyMarks(sel, { [bold_types_index.BOLD_KEY]: keys[bold_types_index.BOLD_KEY] ? utils.NIL : utils.TRULY });
15
+ return true;
16
+ }
17
+ },
18
+ [italic_types_index.ITALIC_KEY]: (event, payload) => {
19
+ if (event[utils.CTRL_KEY] && shared_utils_is.isKeyCode(event, utils.KEY_CODE.I) && payload.sel) {
20
+ const { editor, keys, sel } = payload;
21
+ editor.perform.applyMarks(sel, { [italic_types_index.ITALIC_KEY]: keys[italic_types_index.ITALIC_KEY] ? utils.NIL : utils.TRULY });
22
+ return true;
23
+ }
24
+ },
25
+ };
26
+
27
+ exports.PRESET_SHORTCUT = PRESET_SHORTCUT;
@@ -0,0 +1,73 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var core = require('@block-kit/core');
7
+ var react = require('@block-kit/react');
8
+ var utils = require('@block-kit/utils');
9
+ var hooks = require('@block-kit/utils/dist/es/hooks');
10
+ var React = require('react');
11
+ var shared_utils_event = require('../../shared/utils/event.js');
12
+ var toolbar_utils_marks = require('../utils/marks.js');
13
+ var toolbar_context_provider = require('./provider.js');
14
+
15
+ const Toolbar = React.forwardRef((props, ref) => {
16
+ const { editor } = react.useEditorStatic();
17
+ const [keys, setKeys] = React.useState({});
18
+ const refreshMarks = hooks.useMemoFn(() => {
19
+ const current = editor.selection.get();
20
+ if (!current) {
21
+ setKeys({});
22
+ return void 0;
23
+ }
24
+ const lines = editor.state.block.getLines();
25
+ const { start, end } = current;
26
+ const lineMarkMap = toolbar_utils_marks.filterLineMarkMap(lines.slice(start.line, end.line + 1).map(line => line.attributes));
27
+ if (current.isCollapsed) {
28
+ setKeys(Object.assign(Object.assign({}, editor.collect.marks), lineMarkMap));
29
+ return void 0;
30
+ }
31
+ const ops = [];
32
+ if (current.isCollapsed) {
33
+ const op = editor.collect.getOpAtPoint(current.start);
34
+ op && ops.push(op);
35
+ }
36
+ else {
37
+ const fragment = editor.collect.getFragment();
38
+ fragment && ops.push(...fragment);
39
+ }
40
+ const markMap = toolbar_utils_marks.filterMarkMap(ops);
41
+ setKeys(Object.assign(Object.assign({}, markMap), lineMarkMap));
42
+ });
43
+ React.useEffect(() => {
44
+ editor.event.on(core.EDITOR_EVENT.SELECTION_CHANGE, refreshMarks);
45
+ editor.event.on(shared_utils_event.PLUGIN_EVENTS.SHORTCUT_MARKS_CHANGE, refreshMarks);
46
+ return () => {
47
+ editor.event.off(core.EDITOR_EVENT.SELECTION_CHANGE, refreshMarks);
48
+ editor.event.off(shared_utils_event.PLUGIN_EVENTS.SHORTCUT_MARKS_CHANGE, refreshMarks);
49
+ };
50
+ }, [editor.event, refreshMarks]);
51
+ // 浮动工具栏的情况下, 挂载时需要刷新 marks
52
+ React.useEffect(() => {
53
+ refreshMarks();
54
+ }, [refreshMarks]);
55
+ return (jsxRuntime.jsx("div", { ref: ref, style: props.styles, className: utils.cs("block-kit-menu-toolbar", props.className), onMouseDown: e => {
56
+ const target = e.target;
57
+ // 避免 float 的情况下触发按下事件
58
+ e.stopPropagation();
59
+ // 存在需要抢夺焦点的情况, 例如超链接输入的弹出层
60
+ if (target instanceof HTMLElement && target.hasAttribute("data-no-prevent")) {
61
+ return void 0;
62
+ }
63
+ e.preventDefault();
64
+ }, children: jsxRuntime.jsx(toolbar_context_provider.ToolbarContext.Provider, { value: {
65
+ keys,
66
+ editor,
67
+ setKeys,
68
+ refreshMarks,
69
+ selection: editor.selection.get(),
70
+ }, children: props.children }) }));
71
+ });
72
+
73
+ exports.Toolbar = Toolbar;
@@ -0,0 +1,75 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var core = require('@block-kit/core');
7
+ var react = require('@block-kit/react');
8
+ var utils = require('@block-kit/utils');
9
+ var hooks = require('@block-kit/utils/dist/es/hooks');
10
+ var React = require('react');
11
+ var ReactDOM = require('react-dom');
12
+ var shared_utils_dom = require('../../shared/utils/dom.js');
13
+ var toolbar_context_basic = require('./basic.js');
14
+
15
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
16
+
17
+ var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
18
+
19
+ const FloatToolbar = props => {
20
+ const { editor } = react.useEditorStatic();
21
+ const { readonly } = react.useReadonly();
22
+ const ref = React.useRef(null);
23
+ const [visible, setVisible] = React.useState(false);
24
+ const [isMouseDown, setIsMouseDown] = React.useState(false);
25
+ const onWeakUp = hooks.useMemoFn((wakeUp) => {
26
+ if (editor.state.isFocused() && wakeUp) {
27
+ setVisible(true);
28
+ }
29
+ else {
30
+ setVisible(false);
31
+ }
32
+ });
33
+ React.useEffect(() => {
34
+ if (readonly)
35
+ return void 0;
36
+ const onMouseUp = () => {
37
+ setIsMouseDown(false);
38
+ };
39
+ const onMouseDown = () => {
40
+ setIsMouseDown(true);
41
+ };
42
+ const onSelectionChange = (e) => {
43
+ const { current } = e;
44
+ const isWakeUp = current ? !current.isCollapsed : false;
45
+ onWeakUp(isWakeUp);
46
+ };
47
+ document.addEventListener(core.EDITOR_EVENT.MOUSE_UP, onMouseUp);
48
+ document.addEventListener(core.EDITOR_EVENT.MOUSE_DOWN, onMouseDown);
49
+ editor.event.on(core.EDITOR_EVENT.SELECTION_CHANGE, onSelectionChange);
50
+ return () => {
51
+ document.removeEventListener(core.EDITOR_EVENT.MOUSE_UP, onMouseUp);
52
+ document.removeEventListener(core.EDITOR_EVENT.MOUSE_DOWN, onMouseDown);
53
+ editor.event.off(core.EDITOR_EVENT.SELECTION_CHANGE, onSelectionChange);
54
+ };
55
+ }, [editor, onWeakUp, readonly]);
56
+ const { left, top } = React.useMemo(() => {
57
+ if (!readonly && visible && !isMouseDown) {
58
+ const rect = editor.rect.getSelectionRect();
59
+ if (rect) {
60
+ const topOffset = props.offsetTop || 0;
61
+ const leftOffset = props.offsetLeft || 0;
62
+ const t = rect.top + topOffset;
63
+ const l = rect.left + rect.width / 2 + leftOffset;
64
+ return { top: t, left: l };
65
+ }
66
+ }
67
+ return { top: -999999, left: -999999 };
68
+ }, [editor.rect, readonly, visible, isMouseDown, props.offsetLeft, props.offsetTop]);
69
+ // 只读状态 / 不可见 / 鼠标按下 时隐藏
70
+ return readonly || !visible || isMouseDown
71
+ ? null
72
+ : ReactDOM__default["default"].createPortal(jsxRuntime.jsx(toolbar_context_basic.Toolbar, { ref: ref, className: utils.cs("block-kit-float-toolbar", props.className), styles: { top: top, left: left }, children: props.children }), shared_utils_dom.getMountDOM(editor));
73
+ };
74
+
75
+ exports.FloatToolbar = FloatToolbar;
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
10
+
11
+ const ToolbarContext = React__default["default"].createContext({
12
+ keys: {},
13
+ setKeys: () => null,
14
+ refreshMarks: () => null,
15
+ editor: null,
16
+ selection: null,
17
+ });
18
+ const useToolbarContext = () => React__default["default"].useContext(ToolbarContext);
19
+
20
+ exports.ToolbarContext = ToolbarContext;
21
+ exports.useToolbarContext = useToolbarContext;
@@ -2,43 +2,50 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var toolbar_index = require('../index-f50053bf.js');
6
- require('react/jsx-runtime');
7
- require('@arco-design/web-react');
8
- require('@arco-design/web-react/icon');
9
- require('@block-kit/utils');
10
- require('../align/types/index.js');
11
- require('react');
12
- require('../bold/types/index.js');
13
- require('../bullet-list/types/index.js');
14
- require('../is-fa1755d0.js');
15
- require('../divider/types/index.js');
16
- require('@emoji-mart/react');
17
- require('../emoji/types/index.js');
18
- require('../background/types/index.js');
19
- require('../font-color/types/index.js');
20
- require('../font-size/types/index.js');
21
- require('../heading/types/index.js');
22
- require('@block-kit/core');
23
- require('@block-kit/utils/dist/es/hooks');
24
- require('../image/types/index.js');
25
- require('../inline-code/types/index.js');
26
- require('../italic/types/index.js');
27
- require('../line-height/types/index.js');
28
- require('@arco-design/web-react/es/Form/useForm');
29
- require('../link/types/index.js');
30
- require('../order-list/types/index.js');
31
- require('../is-18806678.js');
32
- require('../quote/types/index.js');
33
- require('../strike/types/index.js');
34
- require('../underline/types/index.js');
35
- require('@block-kit/react');
36
- require('../marks-a30b8a0f.js');
37
- require('react-dom');
38
- require('../dom-cb8b8e40.js');
5
+ var toolbar_modules_align = require('./modules/align.js');
6
+ var toolbar_modules_bold = require('./modules/bold.js');
7
+ var toolbar_modules_bulletList = require('./modules/bullet-list.js');
8
+ var toolbar_modules_cut = require('./modules/cut.js');
9
+ var toolbar_modules_divider = require('./modules/divider.js');
10
+ var toolbar_modules_emoji = require('./modules/emoji.js');
11
+ var toolbar_modules_fontColor = require('./modules/font-color.js');
12
+ var toolbar_modules_fontSize = require('./modules/font-size.js');
13
+ var toolbar_modules_heading = require('./modules/heading.js');
14
+ var toolbar_modules_history = require('./modules/history.js');
15
+ var toolbar_modules_image = require('./modules/image.js');
16
+ var toolbar_modules_inlineCode = require('./modules/inline-code.js');
17
+ var toolbar_modules_italic = require('./modules/italic.js');
18
+ var toolbar_modules_lineHeight = require('./modules/line-height.js');
19
+ var toolbar_modules_link = require('./modules/link.js');
20
+ var toolbar_modules_orderList = require('./modules/order-list.js');
21
+ var toolbar_modules_quote = require('./modules/quote.js');
22
+ var toolbar_modules_strike = require('./modules/strike.js');
23
+ var toolbar_modules_underline = require('./modules/underline.js');
24
+ var toolbar_context_basic = require('./context/basic.js');
25
+ var toolbar_context_float = require('./context/float.js');
39
26
 
27
+ const Mixin = {
28
+ Cut: toolbar_modules_cut.Cut,
29
+ Bold: toolbar_modules_bold.Bold,
30
+ Link: toolbar_modules_link.Link,
31
+ Quote: toolbar_modules_quote.Quote,
32
+ Image: toolbar_modules_image.Image,
33
+ Align: toolbar_modules_align.Align,
34
+ Emoji: toolbar_modules_emoji.Emoji,
35
+ Italic: toolbar_modules_italic.Italic,
36
+ Strike: toolbar_modules_strike.Strike,
37
+ History: toolbar_modules_history.History,
38
+ Heading: toolbar_modules_heading.Heading,
39
+ Divider: toolbar_modules_divider.Divider,
40
+ FontSize: toolbar_modules_fontSize.FontSize,
41
+ FontColor: toolbar_modules_fontColor.FontColor,
42
+ OrderList: toolbar_modules_orderList.OrderList,
43
+ Underline: toolbar_modules_underline.Underline,
44
+ BulletList: toolbar_modules_bulletList.BulletList,
45
+ InlineCode: toolbar_modules_inlineCode.InlineCode,
46
+ LineHeight: toolbar_modules_lineHeight.LineHeight,
47
+ };
40
48
 
41
-
42
- exports.FloatToolbar = toolbar_index.FloatToolbar;
43
- exports.Mixin = toolbar_index.Mixin;
44
- exports.Toolbar = toolbar_index.Toolbar;
49
+ exports.Toolbar = toolbar_context_basic.Toolbar;
50
+ exports.FloatToolbar = toolbar_context_float.FloatToolbar;
51
+ exports.Mixin = Mixin;