x-star-editor 0.2.2 → 0.2.3

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 (79) hide show
  1. package/dist/components/FileInput.js +2 -2
  2. package/dist/components/Toolbar.js +164 -107
  3. package/dist/icons/Blockquote.d.ts +4 -0
  4. package/dist/icons/Blockquote.js +16 -0
  5. package/dist/icons/Code.d.ts +4 -0
  6. package/dist/icons/Code.js +15 -0
  7. package/dist/icons/Delete.d.ts +4 -0
  8. package/dist/icons/Delete.js +15 -0
  9. package/dist/icons/Emphasis.d.ts +4 -0
  10. package/dist/icons/Emphasis.js +15 -0
  11. package/dist/icons/EnterFullscreen.d.ts +4 -0
  12. package/dist/icons/EnterFullscreen.js +15 -0
  13. package/dist/icons/ExitFullscreen.d.ts +4 -0
  14. package/dist/icons/ExitFullscreen.js +15 -0
  15. package/dist/icons/Heading.d.ts +4 -0
  16. package/dist/icons/Heading.js +15 -0
  17. package/dist/icons/Image.d.ts +4 -0
  18. package/dist/icons/Image.js +15 -0
  19. package/dist/icons/InlineCode.d.ts +4 -0
  20. package/dist/icons/InlineCode.js +19 -0
  21. package/dist/icons/InlineMath.d.ts +4 -0
  22. package/dist/icons/InlineMath.js +25 -0
  23. package/dist/icons/Link.d.ts +4 -0
  24. package/dist/icons/Link.js +15 -0
  25. package/dist/icons/Math.d.ts +4 -0
  26. package/dist/icons/Math.js +15 -0
  27. package/dist/icons/OrderedList.d.ts +4 -0
  28. package/dist/icons/OrderedList.js +15 -0
  29. package/dist/icons/Redo.d.ts +4 -0
  30. package/dist/icons/Redo.js +15 -0
  31. package/dist/icons/Strong.d.ts +4 -0
  32. package/dist/icons/Strong.js +15 -0
  33. package/dist/icons/Table.d.ts +4 -0
  34. package/dist/icons/Table.js +15 -0
  35. package/dist/icons/ThematicBreak.d.ts +4 -0
  36. package/dist/icons/ThematicBreak.js +15 -0
  37. package/dist/icons/ToHtml.d.ts +4 -0
  38. package/dist/icons/ToHtml.js +15 -0
  39. package/dist/icons/ToMarkdown.d.ts +4 -0
  40. package/dist/icons/ToMarkdown.js +15 -0
  41. package/dist/icons/Undo.d.ts +4 -0
  42. package/dist/icons/Undo.js +15 -0
  43. package/dist/icons/UnorderedList.d.ts +4 -0
  44. package/dist/icons/UnorderedList.js +15 -0
  45. package/dist/locales/en_US.d.ts +5 -0
  46. package/dist/locales/en_US.js +6 -1
  47. package/dist/locales/index.d.ts +20 -0
  48. package/dist/locales/zh_CN.d.ts +5 -0
  49. package/dist/locales/zh_CN.js +6 -1
  50. package/dist/styles/index.css +8 -69
  51. package/dist/utils/container.d.ts +2 -3
  52. package/dist/utils/container.js +2 -7
  53. package/dist/utils/markdown.d.ts +6 -6
  54. package/dist/utils/markdown.js +146 -49
  55. package/dist/x-star-editor/index.js +3 -3
  56. package/dist/x-star-md-editor/index.js +4 -3
  57. package/dist/x-star-md-viewer/index.js +44 -14
  58. package/package.json +9 -5
  59. package/dist/styles/icons/blockquote.svg +0 -18
  60. package/dist/styles/icons/code.svg +0 -18
  61. package/dist/styles/icons/delete.svg +0 -18
  62. package/dist/styles/icons/emphasis.svg +0 -18
  63. package/dist/styles/icons/fullscreen-enter.svg +0 -18
  64. package/dist/styles/icons/fullscreen-exit.svg +0 -18
  65. package/dist/styles/icons/heading.svg +0 -16
  66. package/dist/styles/icons/image.svg +0 -18
  67. package/dist/styles/icons/inline-code.svg +0 -19
  68. package/dist/styles/icons/inline-math.svg +0 -20
  69. package/dist/styles/icons/link.svg +0 -18
  70. package/dist/styles/icons/math.svg +0 -17
  71. package/dist/styles/icons/ordered-list.svg +0 -18
  72. package/dist/styles/icons/redo.svg +0 -18
  73. package/dist/styles/icons/strong.svg +0 -18
  74. package/dist/styles/icons/table.svg +0 -18
  75. package/dist/styles/icons/thematic-break.svg +0 -18
  76. package/dist/styles/icons/to-html.svg +0 -18
  77. package/dist/styles/icons/to-markdown.svg +0 -18
  78. package/dist/styles/icons/undo.svg +0 -18
  79. package/dist/styles/icons/unordered-list.svg +0 -18
@@ -19,7 +19,7 @@ var FileInput = function FileInput(_ref) {
19
19
  var _useState5 = useState(''),
20
20
  _useState6 = _slicedToArray(_useState5, 2),
21
21
  url = _useState6[0],
22
- setUrl = _useState6[1];
22
+ setURL = _useState6[1];
23
23
  var _useState7 = useState(''),
24
24
  _useState8 = _slicedToArray(_useState7, 2),
25
25
  description = _useState8[0],
@@ -63,7 +63,7 @@ var FileInput = function FileInput(_ref) {
63
63
  }, t('url'), /*#__PURE__*/React.createElement("input", {
64
64
  className: classNames("".concat(prefix, "input")),
65
65
  onChange: function onChange(e) {
66
- return setUrl(e.target.value);
66
+ return setURL(e.target.value);
67
67
  }
68
68
  })), /*#__PURE__*/React.createElement("label", {
69
69
  className: classNames("".concat(prefix, "field"))
@@ -1,7 +1,30 @@
1
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
1
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
5
  import classNames from 'classnames';
4
6
  import React, { useEffect, useRef, useState } from 'react';
7
+ import SvgBlockquote from "../icons/Blockquote";
8
+ import SvgCode from "../icons/Code";
9
+ import SvgDelete from "../icons/Delete";
10
+ import SvgEmphasis from "../icons/Emphasis";
11
+ import SvgEnterFullscreen from "../icons/EnterFullscreen";
12
+ import SvgExitFullscreen from "../icons/ExitFullscreen";
13
+ import SvgHeading from "../icons/Heading";
14
+ import SvgImage from "../icons/Image";
15
+ import SvgInlineCode from "../icons/InlineCode";
16
+ import SvgInlineMath from "../icons/InlineMath";
17
+ import SvgLink from "../icons/Link";
18
+ import SvgMath from "../icons/Math";
19
+ import SvgOrderedList from "../icons/OrderedList";
20
+ import SvgRedo from "../icons/Redo";
21
+ import SvgStrong from "../icons/Strong";
22
+ import SvgTable from "../icons/Table";
23
+ import SvgThematicBreak from "../icons/ThematicBreak";
24
+ import SvgToHTML from "../icons/ToHtml";
25
+ import SvgToMarkdown from "../icons/ToMarkdown";
26
+ import SvgUndo from "../icons/Undo";
27
+ import SvgUnorderedList from "../icons/UnorderedList";
5
28
  import { getFormat } from "../locales";
6
29
  import { createSelection } from "../utils/container";
7
30
  import { prefix } from "../utils/global";
@@ -88,14 +111,14 @@ var Button = function Button(_ref) {
88
111
  }, popover)));
89
112
  };
90
113
  export var getDefaultToolbarItemMap = function getDefaultToolbarItemMap() {
114
+ var _SvgEnterFullscreen, _t;
91
115
  var locale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
92
116
  var onInsertFile = arguments.length > 1 ? arguments[1] : undefined;
93
- var iconPrefix = "".concat(prefix, "icon-");
94
117
  var t = getFormat(locale, 'toolbarItem');
95
118
  return {
96
119
  blockquote: {
97
- children: /*#__PURE__*/React.createElement("div", {
98
- className: classNames("".concat(prefix, "icon"), "".concat(iconPrefix, "blockquote"))
120
+ children: /*#__PURE__*/React.createElement(SvgBlockquote, {
121
+ className: classNames("".concat(prefix, "icon"))
99
122
  }),
100
123
  tooltip: t('blockquote'),
101
124
  onClick: function onClick(exec) {
@@ -105,8 +128,8 @@ export var getDefaultToolbarItemMap = function getDefaultToolbarItemMap() {
105
128
  }
106
129
  },
107
130
  code: {
108
- children: /*#__PURE__*/React.createElement("div", {
109
- className: classNames("".concat(prefix, "icon"), "".concat(iconPrefix, "code"))
131
+ children: /*#__PURE__*/React.createElement(SvgCode, {
132
+ className: classNames("".concat(prefix, "icon"))
110
133
  }),
111
134
  tooltip: t('code'),
112
135
  popoverRender: function popoverRender(exec, close) {
@@ -126,8 +149,8 @@ export var getDefaultToolbarItemMap = function getDefaultToolbarItemMap() {
126
149
  }
127
150
  },
128
151
  delete: {
129
- children: /*#__PURE__*/React.createElement("div", {
130
- className: classNames("".concat(prefix, "icon"), "".concat(iconPrefix, "delete"))
152
+ children: /*#__PURE__*/React.createElement(SvgDelete, {
153
+ className: classNames("".concat(prefix, "icon"))
131
154
  }),
132
155
  tooltip: t('delete'),
133
156
  onClick: function onClick(exec) {
@@ -137,8 +160,8 @@ export var getDefaultToolbarItemMap = function getDefaultToolbarItemMap() {
137
160
  }
138
161
  },
139
162
  emphasis: {
140
- children: /*#__PURE__*/React.createElement("div", {
141
- className: classNames("".concat(prefix, "icon"), "".concat(iconPrefix, "emphasis"))
163
+ children: /*#__PURE__*/React.createElement(SvgEmphasis, {
164
+ className: classNames("".concat(prefix, "icon"))
142
165
  }),
143
166
  tooltip: t('emphasis'),
144
167
  onClick: function onClick(exec) {
@@ -147,20 +170,17 @@ export var getDefaultToolbarItemMap = function getDefaultToolbarItemMap() {
147
170
  }));
148
171
  }
149
172
  },
150
- // fullscreen: {
151
- // children: (
152
- // <div
153
- // className={classNames(
154
- // `${prefix}icon`,
155
- // `${iconPrefix}fullscreen-enter`,
156
- // )}
157
- // />
158
- // ),
159
- // },
160
-
173
+ fullscreen: {
174
+ children: (_SvgEnterFullscreen = /*#__PURE__*/React.createElement(SvgEnterFullscreen, {
175
+ className: classNames("".concat(prefix, "icon"))
176
+ })) !== null && _SvgEnterFullscreen !== void 0 ? _SvgEnterFullscreen : /*#__PURE__*/React.createElement(SvgExitFullscreen, {
177
+ className: classNames("".concat(prefix, "icon"))
178
+ }),
179
+ tooltip: (_t = t('enterFullscreen')) !== null && _t !== void 0 ? _t : t('exitFullscreen')
180
+ },
161
181
  heading: {
162
- children: /*#__PURE__*/React.createElement("div", {
163
- className: classNames("".concat(prefix, "icon"), "".concat(iconPrefix, "heading"))
182
+ children: /*#__PURE__*/React.createElement(SvgHeading, {
183
+ className: classNames("".concat(prefix, "icon"))
164
184
  }),
165
185
  tooltip: t('heading'),
166
186
  popoverRender: function popoverRender(exec, close) {
@@ -183,8 +203,8 @@ export var getDefaultToolbarItemMap = function getDefaultToolbarItemMap() {
183
203
  }
184
204
  },
185
205
  image: {
186
- children: /*#__PURE__*/React.createElement("div", {
187
- className: classNames("".concat(prefix, "icon"), "".concat(iconPrefix, "image"))
206
+ children: /*#__PURE__*/React.createElement(SvgImage, {
207
+ className: classNames("".concat(prefix, "icon"))
188
208
  }),
189
209
  tooltip: t('image'),
190
210
  popoverRender: function popoverRender(exec, close) {
@@ -209,8 +229,8 @@ export var getDefaultToolbarItemMap = function getDefaultToolbarItemMap() {
209
229
  }
210
230
  },
211
231
  inlineCode: {
212
- children: /*#__PURE__*/React.createElement("div", {
213
- className: classNames("".concat(prefix, "icon"), "".concat(iconPrefix, "inline-code"))
232
+ children: /*#__PURE__*/React.createElement(SvgInlineCode, {
233
+ className: classNames("".concat(prefix, "icon"))
214
234
  }),
215
235
  tooltip: t('inlineCode'),
216
236
  onClick: function onClick(exec) {
@@ -220,8 +240,8 @@ export var getDefaultToolbarItemMap = function getDefaultToolbarItemMap() {
220
240
  }
221
241
  },
222
242
  inlineMath: {
223
- children: /*#__PURE__*/React.createElement("div", {
224
- className: classNames("".concat(prefix, "icon"), "".concat(iconPrefix, "inline-math"))
243
+ children: /*#__PURE__*/React.createElement(SvgInlineMath, {
244
+ className: classNames("".concat(prefix, "icon"))
225
245
  }),
226
246
  tooltip: t('inlineMath'),
227
247
  onClick: function onClick(exec) {
@@ -231,8 +251,8 @@ export var getDefaultToolbarItemMap = function getDefaultToolbarItemMap() {
231
251
  }
232
252
  },
233
253
  link: {
234
- children: /*#__PURE__*/React.createElement("div", {
235
- className: classNames("".concat(prefix, "icon"), "".concat(iconPrefix, "link"))
254
+ children: /*#__PURE__*/React.createElement(SvgLink, {
255
+ className: classNames("".concat(prefix, "icon"))
236
256
  }),
237
257
  tooltip: t('link'),
238
258
  popoverRender: function popoverRender(exec, close) {
@@ -257,8 +277,8 @@ export var getDefaultToolbarItemMap = function getDefaultToolbarItemMap() {
257
277
  }
258
278
  },
259
279
  math: {
260
- children: /*#__PURE__*/React.createElement("div", {
261
- className: classNames("".concat(prefix, "icon"), "".concat(iconPrefix, "math"))
280
+ children: /*#__PURE__*/React.createElement(SvgMath, {
281
+ className: classNames("".concat(prefix, "icon"))
262
282
  }),
263
283
  tooltip: t('math'),
264
284
  onClick: function onClick(exec) {
@@ -267,19 +287,17 @@ export var getDefaultToolbarItemMap = function getDefaultToolbarItemMap() {
267
287
  }));
268
288
  }
269
289
  },
270
- // orderedList: {
271
- // children: (
272
- // <div
273
- // className={classNames(`${prefix}icon`, `${iconPrefix}ordered-list`)}
274
- // />
275
- // ),
276
- // },
277
-
290
+ orderedList: {
291
+ children: /*#__PURE__*/React.createElement(SvgOrderedList, {
292
+ className: classNames("".concat(prefix, "icon"))
293
+ }),
294
+ tooltip: t('orderedList')
295
+ },
278
296
  redo: function redo(_ref2) {
279
297
  var history = _ref2.history;
280
298
  return {
281
- children: /*#__PURE__*/React.createElement("div", {
282
- className: classNames("".concat(prefix, "icon"), "".concat(iconPrefix, "redo"))
299
+ children: /*#__PURE__*/React.createElement(SvgRedo, {
300
+ className: classNames("".concat(prefix, "icon"))
283
301
  }),
284
302
  disabled: history.index === history.states.length - 1,
285
303
  tooltip: t('redo'),
@@ -289,8 +307,8 @@ export var getDefaultToolbarItemMap = function getDefaultToolbarItemMap() {
289
307
  };
290
308
  },
291
309
  strong: {
292
- children: /*#__PURE__*/React.createElement("div", {
293
- className: classNames("".concat(prefix, "icon"), "".concat(iconPrefix, "strong"))
310
+ children: /*#__PURE__*/React.createElement(SvgStrong, {
311
+ className: classNames("".concat(prefix, "icon"))
294
312
  }),
295
313
  tooltip: t('strong'),
296
314
  onClick: function onClick(exec) {
@@ -299,15 +317,15 @@ export var getDefaultToolbarItemMap = function getDefaultToolbarItemMap() {
299
317
  }));
300
318
  }
301
319
  },
302
- // table: {
303
- // children: (
304
- // <div className={classNames(`${prefix}icon`, `${iconPrefix}table`)} />
305
- // ),
306
- // },
307
-
320
+ table: {
321
+ children: /*#__PURE__*/React.createElement(SvgTable, {
322
+ className: classNames("".concat(prefix, "icon"))
323
+ }),
324
+ tooltip: t('table')
325
+ },
308
326
  thematicBreak: {
309
- children: /*#__PURE__*/React.createElement("div", {
310
- className: classNames("".concat(prefix, "icon"), "".concat(iconPrefix, "thematic-break"))
327
+ children: /*#__PURE__*/React.createElement(SvgThematicBreak, {
328
+ className: classNames("".concat(prefix, "icon"))
311
329
  }),
312
330
  tooltip: t('thematicBreak'),
313
331
  onClick: function onClick(exec) {
@@ -317,52 +335,94 @@ export var getDefaultToolbarItemMap = function getDefaultToolbarItemMap() {
317
335
  }
318
336
  },
319
337
  toHTML: {
320
- children: /*#__PURE__*/React.createElement("div", {
321
- className: classNames("".concat(prefix, "icon"), "".concat(iconPrefix, "to-html"))
338
+ children: /*#__PURE__*/React.createElement(SvgToHTML, {
339
+ className: classNames("".concat(prefix, "icon"))
322
340
  }),
323
341
  tooltip: t('toHTML'),
324
342
  onClick: function onClick(exec) {
325
- return exec(function (_ref3) {
326
- var sourceCode = _ref3.sourceCode,
327
- selection = _ref3.selection,
328
- dispatch = _ref3.dispatch;
329
- return dispatch({
330
- type: 'set',
331
- payload: {
332
- sourceCode: toHTML(sourceCode),
333
- selection: createSelection(0)
334
- },
335
- selection: selection
336
- });
337
- });
343
+ return exec( /*#__PURE__*/function () {
344
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref3) {
345
+ var sourceCode, selection, dispatch;
346
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
347
+ while (1) switch (_context.prev = _context.next) {
348
+ case 0:
349
+ sourceCode = _ref3.sourceCode, selection = _ref3.selection, dispatch = _ref3.dispatch;
350
+ _context.t0 = dispatch;
351
+ _context.next = 4;
352
+ return toHTML(sourceCode);
353
+ case 4:
354
+ _context.t1 = _context.sent;
355
+ _context.t2 = createSelection(0);
356
+ _context.t3 = {
357
+ sourceCode: _context.t1,
358
+ selection: _context.t2
359
+ };
360
+ _context.t4 = selection;
361
+ _context.t5 = {
362
+ type: 'set',
363
+ payload: _context.t3,
364
+ selection: _context.t4
365
+ };
366
+ return _context.abrupt("return", (0, _context.t0)(_context.t5));
367
+ case 10:
368
+ case "end":
369
+ return _context.stop();
370
+ }
371
+ }, _callee);
372
+ }));
373
+ return function (_x) {
374
+ return _ref4.apply(this, arguments);
375
+ };
376
+ }());
338
377
  }
339
378
  },
340
379
  toMarkdown: {
341
- children: /*#__PURE__*/React.createElement("div", {
342
- className: classNames("".concat(prefix, "icon"), "".concat(iconPrefix, "to-markdown"))
380
+ children: /*#__PURE__*/React.createElement(SvgToMarkdown, {
381
+ className: classNames("".concat(prefix, "icon"))
343
382
  }),
344
383
  tooltip: t('toMarkdown'),
345
384
  onClick: function onClick(exec) {
346
- return exec(function (_ref4) {
347
- var sourceCode = _ref4.sourceCode,
348
- selection = _ref4.selection,
349
- dispatch = _ref4.dispatch;
350
- return dispatch({
351
- type: 'set',
352
- payload: {
353
- sourceCode: toMarkdown(sourceCode),
354
- selection: createSelection(0)
355
- },
356
- selection: selection
357
- });
358
- });
385
+ return exec( /*#__PURE__*/function () {
386
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref5) {
387
+ var sourceCode, selection, dispatch;
388
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
389
+ while (1) switch (_context2.prev = _context2.next) {
390
+ case 0:
391
+ sourceCode = _ref5.sourceCode, selection = _ref5.selection, dispatch = _ref5.dispatch;
392
+ _context2.t0 = dispatch;
393
+ _context2.next = 4;
394
+ return toMarkdown(sourceCode);
395
+ case 4:
396
+ _context2.t1 = _context2.sent;
397
+ _context2.t2 = createSelection(0);
398
+ _context2.t3 = {
399
+ sourceCode: _context2.t1,
400
+ selection: _context2.t2
401
+ };
402
+ _context2.t4 = selection;
403
+ _context2.t5 = {
404
+ type: 'set',
405
+ payload: _context2.t3,
406
+ selection: _context2.t4
407
+ };
408
+ return _context2.abrupt("return", (0, _context2.t0)(_context2.t5));
409
+ case 10:
410
+ case "end":
411
+ return _context2.stop();
412
+ }
413
+ }, _callee2);
414
+ }));
415
+ return function (_x2) {
416
+ return _ref6.apply(this, arguments);
417
+ };
418
+ }());
359
419
  }
360
420
  },
361
- undo: function undo(_ref5) {
362
- var history = _ref5.history;
421
+ undo: function undo(_ref7) {
422
+ var history = _ref7.history;
363
423
  return {
364
- children: /*#__PURE__*/React.createElement("div", {
365
- className: classNames("".concat(prefix, "icon"), "".concat(iconPrefix, "undo"))
424
+ children: /*#__PURE__*/React.createElement(SvgUndo, {
425
+ className: classNames("".concat(prefix, "icon"))
366
426
  }),
367
427
  disabled: !history.index,
368
428
  tooltip: t('undo'),
@@ -370,18 +430,15 @@ export var getDefaultToolbarItemMap = function getDefaultToolbarItemMap() {
370
430
  return exec(undoHandler());
371
431
  }
372
432
  };
433
+ },
434
+ unorderedList: {
435
+ children: /*#__PURE__*/React.createElement(SvgUnorderedList, {
436
+ className: classNames("".concat(prefix, "icon"))
437
+ }),
438
+ tooltip: t('unorderedList')
373
439
  }
374
-
375
- // unorderedList: {
376
- // children: (
377
- // <div
378
- // className={classNames(`${prefix}icon`, `${iconPrefix}unordered-list`)}
379
- // />
380
- // ),
381
- // },
382
440
  };
383
441
  };
384
-
385
442
  export var getDefaultToolbarItems = function getDefaultToolbarItems() {
386
443
  return [['heading', 'strong', 'emphasis', 'delete'], ['thematicBreak', 'blockquote'],
387
444
  // ['table', 'orderedList', 'unorderedList'],
@@ -390,12 +447,12 @@ export var getDefaultToolbarItems = function getDefaultToolbarItems() {
390
447
  ];
391
448
  };
392
449
 
393
- var Toolbar = function Toolbar(_ref6) {
394
- var className = _ref6.className,
395
- style = _ref6.style,
396
- itemMap = _ref6.itemMap,
397
- items = _ref6.items,
398
- exec = _ref6.exec;
450
+ var Toolbar = function Toolbar(_ref8) {
451
+ var className = _ref8.className,
452
+ style = _ref8.style,
453
+ itemMap = _ref8.itemMap,
454
+ items = _ref8.items,
455
+ exec = _ref8.exec;
399
456
  var toolbarRef = useRef(null);
400
457
  var ctx = exec(function (ctx) {
401
458
  return ctx;
@@ -414,12 +471,12 @@ var Toolbar = function Toolbar(_ref6) {
414
471
  if (!toolbarItem) {
415
472
  return undefined;
416
473
  }
417
- var _ref7 = typeof toolbarItem === 'function' ? toolbarItem(ctx) : toolbarItem,
418
- children = _ref7.children,
419
- disabled = _ref7.disabled,
420
- tooltip = _ref7.tooltip,
421
- _popoverRender = _ref7.popoverRender,
422
- _onClick2 = _ref7.onClick;
474
+ var _ref9 = typeof toolbarItem === 'function' ? toolbarItem(ctx) : toolbarItem,
475
+ children = _ref9.children,
476
+ disabled = _ref9.disabled,
477
+ tooltip = _ref9.tooltip,
478
+ _popoverRender = _ref9.popoverRender,
479
+ _onClick2 = _ref9.onClick;
423
480
  return /*#__PURE__*/React.createElement(Button, {
424
481
  key: index,
425
482
  toolbarRef: toolbarRef,
@@ -0,0 +1,4 @@
1
+ import type { SVGProps } from 'react';
2
+ import React from 'react';
3
+ declare const SvgBlockquote: (props: SVGProps<SVGSVGElement>) => React.JSX.Element;
4
+ export default SvgBlockquote;
@@ -0,0 +1,16 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import React from 'react';
3
+ var SvgBlockquote = function SvgBlockquote(props) {
4
+ return /*#__PURE__*/React.createElement("svg", _extends({
5
+ xmlns: "http://www.w3.org/2000/svg",
6
+ width: "1em",
7
+ height: "1em",
8
+ viewBox: "0 0 24 24"
9
+ }, props), /*#__PURE__*/React.createElement("g", {
10
+ fill: "currentColor",
11
+ fillRule: "evenodd"
12
+ }, /*#__PURE__*/React.createElement("path", {
13
+ d: "M10.75 8.067c-1.93 1.24-3.003 2.683-3.217 4.33-.334 2.563 1.958 3.818 3.12 2.69 1.161-1.127.465-2.558-.376-2.949-.841-.39-1.355-.255-1.266-.777.09-.523 1.287-1.972 2.338-2.647a.192.192 0 0 0 .029-.262l-.26-.337c-.113-.147-.221-.142-.367-.048ZM15.834 8.067c-1.93 1.24-3.003 2.683-3.218 4.33-.334 2.563 1.959 3.818 3.12 2.69 1.161-1.127.465-2.558-.376-2.949-.84-.39-1.355-.255-1.265-.777.09-.523 1.286-1.972 2.337-2.647a.192.192 0 0 0 .03-.262l-.26-.337c-.114-.147-.222-.142-.368-.048Z"
14
+ })));
15
+ };
16
+ export default SvgBlockquote;
@@ -0,0 +1,4 @@
1
+ import type { SVGProps } from 'react';
2
+ import React from 'react';
3
+ declare const SvgCode: (props: SVGProps<SVGSVGElement>) => React.JSX.Element;
4
+ export default SvgCode;
@@ -0,0 +1,15 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import React from 'react';
3
+ var SvgCode = function SvgCode(props) {
4
+ return /*#__PURE__*/React.createElement("svg", _extends({
5
+ xmlns: "http://www.w3.org/2000/svg",
6
+ width: "1em",
7
+ height: "1em",
8
+ viewBox: "0 0 24 24"
9
+ }, props), /*#__PURE__*/React.createElement("path", {
10
+ fill: "currentColor",
11
+ fillRule: "nonzero",
12
+ d: "M8 15.47v-2.153c0-.482-.336-.872-.75-.872H7v-.93h.25c.414 0 .75-.391.75-.873V8.49c0-.964.672-1.745 1.5-1.745h.5v1.163h-.5a.467.467 0 0 0-.354.17A.633.633 0 0 0 9 8.49v2.384c0 .503-.277.948-.687 1.106.41.157.687.602.687 1.105v2.384c0 .155.053.303.146.412.094.109.221.17.354.17h.5v1.163h-.5c-.828 0-1.5-.781-1.5-1.745Zm8.143 0c0 .963-.672 1.744-1.5 1.744h-.5v-1.163h.5c.276 0 .5-.26.5-.582v-2.384c0-.503.277-.948.687-1.105-.41-.158-.687-.603-.687-1.106V8.49c0-.321-.224-.582-.5-.582h-.5V6.745h.5c.828 0 1.5.781 1.5 1.745v2.152c0 .482.336.872.75.872h.25v.93h-.25c-.414 0-.75.391-.75.873v2.152Z"
13
+ }));
14
+ };
15
+ export default SvgCode;
@@ -0,0 +1,4 @@
1
+ import type { SVGProps } from 'react';
2
+ import React from 'react';
3
+ declare const SvgDelete: (props: SVGProps<SVGSVGElement>) => React.JSX.Element;
4
+ export default SvgDelete;
@@ -0,0 +1,15 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import React from 'react';
3
+ var SvgDelete = function SvgDelete(props) {
4
+ return /*#__PURE__*/React.createElement("svg", _extends({
5
+ xmlns: "http://www.w3.org/2000/svg",
6
+ width: "1em",
7
+ height: "1em",
8
+ viewBox: "0 0 24 24"
9
+ }, props), /*#__PURE__*/React.createElement("path", {
10
+ fill: "currentColor",
11
+ fillRule: "nonzero",
12
+ d: "M18.016 11.48h-5.224l-.432-.082-.422-.079c-.7-.137-1.123-.273-1.46-.467-.48-.28-.713-.66-.713-1.164 0-.506.207-.926.601-1.217.388-.287.94-.439 1.597-.439.75 0 1.328.197 1.72.586.2.196.346.438.435.719.018.056.038.136.059.243a.139.139 0 0 0 .135.112h.995a.139.139 0 0 0 .138-.138V9.54a2.584 2.584 0 0 0-.844-1.727c-.606-.553-1.499-.844-2.58-.844-.988 0-1.878.247-2.505.696-.35.251-.62.563-.801.925-.185.37-.278.799-.278 1.27 0 .404.078.745.237 1.046.113.215.268.404.466.574H5.984a.11.11 0 0 0-.109.11v.82c0 .06.05.11.11.11h5.922l.08.016c.423.085.677.142.911.208.315.089.555.182.755.294.49.276.729.672.729 1.216 0 .483-.212.914-.596 1.215-.417.326-1.034.497-1.785.497-.597 0-1.103-.116-1.506-.342a1.738 1.738 0 0 1-.853-1.073.14.14 0 0 0-.133-.102h-1.09a.139.139 0 0 0-.138.138v.013l.008.078c.09.668.415 1.214.967 1.625.644.475 1.55.727 2.622.727 1.151 0 2.117-.27 2.792-.784.342-.258.604-.576.78-.943.179-.37.27-.791.27-1.25 0-.436-.08-.8-.243-1.114a1.882 1.882 0 0 0-.298-.42h2.837c.06 0 .109-.05.109-.11v-.82a.11.11 0 0 0-.11-.109Z"
13
+ }));
14
+ };
15
+ export default SvgDelete;
@@ -0,0 +1,4 @@
1
+ import type { SVGProps } from 'react';
2
+ import React from 'react';
3
+ declare const SvgEmphasis: (props: SVGProps<SVGSVGElement>) => React.JSX.Element;
4
+ export default SvgEmphasis;
@@ -0,0 +1,15 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import React from 'react';
3
+ var SvgEmphasis = function SvgEmphasis(props) {
4
+ return /*#__PURE__*/React.createElement("svg", _extends({
5
+ xmlns: "http://www.w3.org/2000/svg",
6
+ width: "1em",
7
+ height: "1em",
8
+ viewBox: "0 0 24 24"
9
+ }, props), /*#__PURE__*/React.createElement("path", {
10
+ fill: "currentColor",
11
+ fillRule: "nonzero",
12
+ d: "M15.91 7.188h-5.906a.11.11 0 0 0-.11.109v.875c0 .06.05.11.11.11h2.477l-2.133 7.437H8.131a.11.11 0 0 0-.11.11v.874c0 .06.05.11.11.11h5.906c.06 0 .11-.05.11-.11v-.875a.11.11 0 0 0-.11-.11h-2.551l2.133-7.437h2.291c.06 0 .11-.049.11-.11v-.874a.11.11 0 0 0-.11-.11Z"
13
+ }));
14
+ };
15
+ export default SvgEmphasis;
@@ -0,0 +1,4 @@
1
+ import type { SVGProps } from 'react';
2
+ import React from 'react';
3
+ declare const SvgEnterFullscreen: (props: SVGProps<SVGSVGElement>) => React.JSX.Element;
4
+ export default SvgEnterFullscreen;
@@ -0,0 +1,15 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import React from 'react';
3
+ var SvgEnterFullscreen = function SvgEnterFullscreen(props) {
4
+ return /*#__PURE__*/React.createElement("svg", _extends({
5
+ xmlns: "http://www.w3.org/2000/svg",
6
+ width: "1em",
7
+ height: "1em",
8
+ viewBox: "0 0 24 24"
9
+ }, props), /*#__PURE__*/React.createElement("path", {
10
+ fill: "currentColor",
11
+ fillRule: "nonzero",
12
+ d: "M9.795 6.5h-2.88a.415.415 0 0 0-.415.415v2.906c0 .114.093.207.208.207h.622a.208.208 0 0 0 .208-.207V7.538h2.257a.208.208 0 0 0 .207-.208v-.622a.208.208 0 0 0-.207-.208Zm7.497 7.472h-.622a.208.208 0 0 0-.208.207v2.283h-2.257a.208.208 0 0 0-.207.208v.622c0 .115.093.208.207.208h2.88c.23 0 .415-.185.415-.415v-2.906a.208.208 0 0 0-.208-.207Zm-7.497 2.49H7.538V14.18a.208.208 0 0 0-.208-.207h-.622a.208.208 0 0 0-.208.207v2.906c0 .23.185.415.415.415h2.88a.208.208 0 0 0 .207-.208v-.622a.208.208 0 0 0-.207-.208Zm7.29-9.962h-2.88a.208.208 0 0 0-.207.208v.622c0 .114.093.208.207.208h2.257V9.82c0 .114.094.207.208.207h.622a.208.208 0 0 0 .208-.207V6.915a.415.415 0 0 0-.415-.415Z"
13
+ }));
14
+ };
15
+ export default SvgEnterFullscreen;
@@ -0,0 +1,4 @@
1
+ import type { SVGProps } from 'react';
2
+ import React from 'react';
3
+ declare const SvgExitFullscreen: (props: SVGProps<SVGSVGElement>) => React.JSX.Element;
4
+ export default SvgExitFullscreen;
@@ -0,0 +1,15 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import React from 'react';
3
+ var SvgExitFullscreen = function SvgExitFullscreen(props) {
4
+ return /*#__PURE__*/React.createElement("svg", _extends({
5
+ xmlns: "http://www.w3.org/2000/svg",
6
+ width: "1em",
7
+ height: "1em",
8
+ viewBox: "0 0 24 24"
9
+ }, props), /*#__PURE__*/React.createElement("path", {
10
+ fill: "currentColor",
11
+ fillRule: "nonzero",
12
+ d: "M9.587 13.972h-2.88a.208.208 0 0 0-.207.207v.623c0 .114.093.207.208.207h2.257v2.283c0 .115.093.208.207.208h.623a.208.208 0 0 0 .207-.208v-2.905a.415.415 0 0 0-.415-.415ZM9.795 6.5h-.623a.208.208 0 0 0-.207.208V8.99H6.708a.208.208 0 0 0-.208.207v.623c0 .114.093.207.208.207h2.88c.229 0 .414-.185.414-.415V6.708a.208.208 0 0 0-.207-.208Zm7.497 7.472h-2.88a.415.415 0 0 0-.414.415v2.905c0 .115.093.208.207.208h.623a.208.208 0 0 0 .207-.208V15.01h2.257a.208.208 0 0 0 .208-.207v-.623a.208.208 0 0 0-.208-.207Zm0-4.981h-2.257V6.708a.208.208 0 0 0-.207-.208h-.623a.208.208 0 0 0-.207.208v2.905c0 .23.185.415.415.415h2.88a.208.208 0 0 0 .207-.207v-.623a.208.208 0 0 0-.208-.207Z"
13
+ }));
14
+ };
15
+ export default SvgExitFullscreen;
@@ -0,0 +1,4 @@
1
+ import type { SVGProps } from 'react';
2
+ import React from 'react';
3
+ declare const SvgHeading: (props: SVGProps<SVGSVGElement>) => React.JSX.Element;
4
+ export default SvgHeading;
@@ -0,0 +1,15 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import React from 'react';
3
+ var SvgHeading = function SvgHeading(props) {
4
+ return /*#__PURE__*/React.createElement("svg", _extends({
5
+ xmlns: "http://www.w3.org/2000/svg",
6
+ width: "1em",
7
+ height: "1em",
8
+ viewBox: "0 0 24 24"
9
+ }, props), /*#__PURE__*/React.createElement("path", {
10
+ fill: "currentColor",
11
+ fillRule: "nonzero",
12
+ d: "M9.524 7.331c.06 0 .11.08.11.179v4.208h4.9V7.51c0-.079.032-.146.075-.17l.035-.009h.88c.06 0 .11.08.11.179v9.643c0 .098-.05.178-.11.178h-.88c-.06 0-.11-.08-.11-.178v-4.335h-4.9v4.335c0 .078-.032.145-.075.17l-.035.008h-.88c-.06 0-.11-.08-.11-.178V7.51c0-.098.05-.179.11-.179Z"
13
+ }));
14
+ };
15
+ export default SvgHeading;
@@ -0,0 +1,4 @@
1
+ import type { SVGProps } from 'react';
2
+ import React from 'react';
3
+ declare const SvgImage: (props: SVGProps<SVGSVGElement>) => React.JSX.Element;
4
+ export default SvgImage;
@@ -0,0 +1,15 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import React from 'react';
3
+ var SvgImage = function SvgImage(props) {
4
+ return /*#__PURE__*/React.createElement("svg", _extends({
5
+ xmlns: "http://www.w3.org/2000/svg",
6
+ width: "1em",
7
+ height: "1em",
8
+ viewBox: "0 0 24 24"
9
+ }, props), /*#__PURE__*/React.createElement("path", {
10
+ fill: "currentColor",
11
+ fillRule: "nonzero",
12
+ d: "M17.688 7.188H6.313a.437.437 0 0 0-.438.437v8.75c0 .242.196.438.438.438h11.375a.437.437 0 0 0 .437-.438v-8.75a.437.437 0 0 0-.438-.438Zm-.547 8.64H6.859v-.545l1.894-2.247 2.052 2.434 3.192-3.784 3.144 3.726v.416Zm0-1.774-3.06-3.629a.109.109 0 0 0-.167 0l-3.109 3.686-1.969-2.334a.109.109 0 0 0-.166 0l-1.81 2.147V8.172h10.28v5.882Zm-7.985-2.82a1.203 1.203 0 1 0 0-2.406 1.203 1.203 0 0 0 0 2.406Zm0-1.586a.382.382 0 1 1 .002.765.382.382 0 0 1-.002-.765Z"
13
+ }));
14
+ };
15
+ export default SvgImage;
@@ -0,0 +1,4 @@
1
+ import type { SVGProps } from 'react';
2
+ import React from 'react';
3
+ declare const SvgInlineCode: (props: SVGProps<SVGSVGElement>) => React.JSX.Element;
4
+ export default SvgInlineCode;