rte-builder 2.0.4 → 2.0.5

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.
package/dist/index.js CHANGED
@@ -1589,12 +1589,13 @@ var init_Indent = __esm({
1589
1589
  });
1590
1590
 
1591
1591
  // src/adapters/tiptap/TipTapToolbar.tsx
1592
- var import_react, import_jsx_runtime, FONT_FAMILIES, FONT_SIZES, LINE_HEIGHTS, EmojiPicker, TipTapToolbar;
1592
+ var import_react, import_lucide_react, import_jsx_runtime, FONT_FAMILIES, FONT_SIZES, LINE_HEIGHTS, EmojiPicker, TipTapToolbar;
1593
1593
  var init_TipTapToolbar = __esm({
1594
1594
  "src/adapters/tiptap/TipTapToolbar.tsx"() {
1595
1595
  "use strict";
1596
1596
  import_react = require("react");
1597
1597
  init_Emoji();
1598
+ import_lucide_react = require("lucide-react");
1598
1599
  import_jsx_runtime = require("react/jsx-runtime");
1599
1600
  FONT_FAMILIES = [
1600
1601
  { value: "Arial", label: "Arial" },
@@ -1779,24 +1780,7 @@ var init_TipTapToolbar = __esm({
1779
1780
  onClick: () => editor.chain().focus().toggleCodeBlock().run(),
1780
1781
  active: editor.isActive("codeBlock"),
1781
1782
  title: "Code Block",
1782
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
1783
- "svg",
1784
- {
1785
- width: "18",
1786
- height: "18",
1787
- viewBox: "0 0 24 24",
1788
- fill: "none",
1789
- stroke: "currentColor",
1790
- strokeWidth: "2",
1791
- strokeLinecap: "round",
1792
- strokeLinejoin: "round",
1793
- children: [
1794
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
1795
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "9 8 5 12 9 16" }),
1796
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "15 8 19 12 15 16" })
1797
- ]
1798
- }
1799
- )
1783
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CodeXml, { size: 18 })
1800
1784
  },
1801
1785
  "codeBlock"
1802
1786
  );
@@ -6198,7 +6182,7 @@ init_Indent();
6198
6182
  // src/components/Toolbar.tsx
6199
6183
  var import_react9 = require("react");
6200
6184
  init_Emoji();
6201
- var import_lucide_react = require("lucide-react");
6185
+ var import_lucide_react2 = require("lucide-react");
6202
6186
  var import_jsx_runtime8 = require("react/jsx-runtime");
6203
6187
  var FONT_FAMILIES2 = [
6204
6188
  { value: "Arial", label: "Arial" },
@@ -6312,7 +6296,7 @@ var Toolbar = ({
6312
6296
  onClick: () => editor.chain().focus().toggleBold().run(),
6313
6297
  active: editor.isActive("bold"),
6314
6298
  title: "Bold (Ctrl+B)",
6315
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Bold, { size: 18 })
6299
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Bold, { size: 18 })
6316
6300
  },
6317
6301
  "bold"
6318
6302
  );
@@ -6323,7 +6307,7 @@ var Toolbar = ({
6323
6307
  onClick: () => editor.chain().focus().toggleItalic().run(),
6324
6308
  active: editor.isActive("italic"),
6325
6309
  title: "Italic (Ctrl+I)",
6326
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Italic, { size: 18 })
6310
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Italic, { size: 18 })
6327
6311
  },
6328
6312
  "italic"
6329
6313
  );
@@ -6334,7 +6318,7 @@ var Toolbar = ({
6334
6318
  onClick: () => editor.chain().focus().toggleUnderline().run(),
6335
6319
  active: editor.isActive("underline"),
6336
6320
  title: "Underline (Ctrl+U)",
6337
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Underline, { size: 18 })
6321
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Underline, { size: 18 })
6338
6322
  },
6339
6323
  "underline"
6340
6324
  );
@@ -6345,7 +6329,7 @@ var Toolbar = ({
6345
6329
  onClick: () => editor.chain().focus().toggleStrike().run(),
6346
6330
  active: editor.isActive("strike"),
6347
6331
  title: "Strikethrough",
6348
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Strikethrough, { size: 18 })
6332
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Strikethrough, { size: 18 })
6349
6333
  },
6350
6334
  "strike"
6351
6335
  );
@@ -6356,7 +6340,7 @@ var Toolbar = ({
6356
6340
  onClick: () => editor.chain().focus().toggleCode().run(),
6357
6341
  active: editor.isActive("code"),
6358
6342
  title: "Inline Code",
6359
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Code, { size: 18 })
6343
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Code, { size: 18 })
6360
6344
  },
6361
6345
  "code"
6362
6346
  );
@@ -6367,7 +6351,7 @@ var Toolbar = ({
6367
6351
  onClick: () => editor.chain().focus().toggleCodeBlock().run(),
6368
6352
  active: editor.isActive("codeBlock"),
6369
6353
  title: "Code Block",
6370
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.FileCode, { size: 18 })
6354
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.CodeXml, { size: 18 })
6371
6355
  },
6372
6356
  "codeBlock"
6373
6357
  );
@@ -6378,7 +6362,7 @@ var Toolbar = ({
6378
6362
  onClick: () => editor.chain().focus().toggleSubscript().run(),
6379
6363
  active: editor.isActive("subscript"),
6380
6364
  title: "Subscript",
6381
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Subscript, { size: 18 })
6365
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Subscript, { size: 18 })
6382
6366
  },
6383
6367
  "subscript"
6384
6368
  );
@@ -6389,7 +6373,7 @@ var Toolbar = ({
6389
6373
  onClick: () => editor.chain().focus().toggleSuperscript().run(),
6390
6374
  active: editor.isActive("superscript"),
6391
6375
  title: "Superscript",
6392
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Superscript, { size: 18 })
6376
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Superscript, { size: 18 })
6393
6377
  },
6394
6378
  "superscript"
6395
6379
  );
@@ -6399,7 +6383,7 @@ var Toolbar = ({
6399
6383
  {
6400
6384
  onClick: () => editor.chain().focus().clearNodes().unsetAllMarks().run(),
6401
6385
  title: "Clear Formatting",
6402
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.RemoveFormatting, { size: 18 })
6386
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.RemoveFormatting, { size: 18 })
6403
6387
  },
6404
6388
  "clearFormatting"
6405
6389
  );
@@ -6466,7 +6450,7 @@ var Toolbar = ({
6466
6450
  );
6467
6451
  case "textColor":
6468
6452
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "rte-builder-toolbar-color", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { title: "Text Color", children: [
6469
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Type, { size: 18 }),
6453
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Type, { size: 18 }),
6470
6454
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6471
6455
  "input",
6472
6456
  {
@@ -6478,7 +6462,7 @@ var Toolbar = ({
6478
6462
  ] }) }, "textColor");
6479
6463
  case "backgroundColor":
6480
6464
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "rte-builder-toolbar-color", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { title: "Background Color", children: [
6481
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Highlighter, { size: 18 }),
6465
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Highlighter, { size: 18 }),
6482
6466
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6483
6467
  "input",
6484
6468
  {
@@ -6495,7 +6479,7 @@ var Toolbar = ({
6495
6479
  onClick: () => editor.chain().focus().setTextAlign("left").run(),
6496
6480
  active: editor.isActive({ textAlign: "left" }),
6497
6481
  title: "Align Left",
6498
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.AlignLeft, { size: 18 })
6482
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.AlignLeft, { size: 18 })
6499
6483
  },
6500
6484
  "alignLeft"
6501
6485
  );
@@ -6506,7 +6490,7 @@ var Toolbar = ({
6506
6490
  onClick: () => editor.chain().focus().setTextAlign("center").run(),
6507
6491
  active: editor.isActive({ textAlign: "center" }),
6508
6492
  title: "Align Center",
6509
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.AlignCenter, { size: 18 })
6493
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.AlignCenter, { size: 18 })
6510
6494
  },
6511
6495
  "alignCenter"
6512
6496
  );
@@ -6517,7 +6501,7 @@ var Toolbar = ({
6517
6501
  onClick: () => editor.chain().focus().setTextAlign("right").run(),
6518
6502
  active: editor.isActive({ textAlign: "right" }),
6519
6503
  title: "Align Right",
6520
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.AlignRight, { size: 18 })
6504
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.AlignRight, { size: 18 })
6521
6505
  },
6522
6506
  "alignRight"
6523
6507
  );
@@ -6528,7 +6512,7 @@ var Toolbar = ({
6528
6512
  onClick: () => editor.chain().focus().setTextAlign("justify").run(),
6529
6513
  active: editor.isActive({ textAlign: "justify" }),
6530
6514
  title: "Justify",
6531
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.AlignJustify, { size: 18 })
6515
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.AlignJustify, { size: 18 })
6532
6516
  },
6533
6517
  "alignJustify"
6534
6518
  );
@@ -6538,7 +6522,7 @@ var Toolbar = ({
6538
6522
  {
6539
6523
  onClick: () => editor.chain().focus().indent().run(),
6540
6524
  title: "Indent (Tab)",
6541
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Indent, { size: 18 })
6525
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Indent, { size: 18 })
6542
6526
  },
6543
6527
  "indent"
6544
6528
  );
@@ -6548,7 +6532,7 @@ var Toolbar = ({
6548
6532
  {
6549
6533
  onClick: () => editor.chain().focus().outdent().run(),
6550
6534
  title: "Outdent (Shift+Tab)",
6551
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Outdent, { size: 18 })
6535
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Outdent, { size: 18 })
6552
6536
  },
6553
6537
  "outdent"
6554
6538
  );
@@ -6559,7 +6543,7 @@ var Toolbar = ({
6559
6543
  onClick: () => editor.chain().focus().toggleBulletList().run(),
6560
6544
  active: editor.isActive("bulletList"),
6561
6545
  title: "Bullet List",
6562
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.List, { size: 18 })
6546
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.List, { size: 18 })
6563
6547
  },
6564
6548
  "bulletList"
6565
6549
  );
@@ -6570,7 +6554,7 @@ var Toolbar = ({
6570
6554
  onClick: () => editor.chain().focus().toggleOrderedList().run(),
6571
6555
  active: editor.isActive("orderedList"),
6572
6556
  title: "Numbered List",
6573
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.ListOrdered, { size: 18 })
6557
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.ListOrdered, { size: 18 })
6574
6558
  },
6575
6559
  "orderedList"
6576
6560
  );
@@ -6588,7 +6572,7 @@ var Toolbar = ({
6588
6572
  active: editor.isActive("heading", { level }),
6589
6573
  title: `Heading ${level}`,
6590
6574
  children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { display: "flex", alignItems: "center", gap: "2px" }, children: [
6591
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Heading, { size: 18 }),
6575
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Heading, { size: 18 }),
6592
6576
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { fontSize: "11px", fontWeight: "bold" }, children: level })
6593
6577
  ] })
6594
6578
  },
@@ -6601,7 +6585,7 @@ var Toolbar = ({
6601
6585
  onClick: () => editor.chain().focus().toggleBlockquote().run(),
6602
6586
  active: editor.isActive("blockquote"),
6603
6587
  title: "Blockquote",
6604
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Quote, { size: 18 })
6588
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Quote, { size: 18 })
6605
6589
  },
6606
6590
  "blockquote"
6607
6591
  );
@@ -6611,7 +6595,7 @@ var Toolbar = ({
6611
6595
  {
6612
6596
  onClick: () => editor.chain().focus().setHorizontalRule().run(),
6613
6597
  title: "Horizontal Rule",
6614
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Minus, { size: 18 })
6598
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Minus, { size: 18 })
6615
6599
  },
6616
6600
  "horizontalRule"
6617
6601
  );
@@ -6627,7 +6611,7 @@ var Toolbar = ({
6627
6611
  },
6628
6612
  active: editor.isActive("link"),
6629
6613
  title: "Insert Link",
6630
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Link, { size: 18 })
6614
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Link, { size: 18 })
6631
6615
  },
6632
6616
  "link"
6633
6617
  );
@@ -6638,7 +6622,7 @@ var Toolbar = ({
6638
6622
  onClick: () => editor.chain().focus().unsetLink().run(),
6639
6623
  disabled: !editor.isActive("link"),
6640
6624
  title: "Remove Link",
6641
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Unlink, { size: 18 })
6625
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Unlink, { size: 18 })
6642
6626
  },
6643
6627
  "unlink"
6644
6628
  );
@@ -6657,7 +6641,7 @@ var Toolbar = ({
6657
6641
  }
6658
6642
  },
6659
6643
  title: "Insert Image",
6660
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Image, { size: 18 })
6644
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Image, { size: 18 })
6661
6645
  },
6662
6646
  "image"
6663
6647
  );
@@ -6676,7 +6660,7 @@ var Toolbar = ({
6676
6660
  }
6677
6661
  },
6678
6662
  title: "Insert Video",
6679
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Video, { size: 18 })
6663
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Video, { size: 18 })
6680
6664
  },
6681
6665
  "video"
6682
6666
  );
@@ -6686,7 +6670,7 @@ var Toolbar = ({
6686
6670
  {
6687
6671
  onClick: () => editor.chain().focus().insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run(),
6688
6672
  title: "Insert Table",
6689
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Table, { size: 18 })
6673
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Table, { size: 18 })
6690
6674
  },
6691
6675
  "table"
6692
6676
  );
@@ -6699,7 +6683,7 @@ var Toolbar = ({
6699
6683
  onClick: () => setShowEmojiPicker(!showEmojiPicker),
6700
6684
  active: showEmojiPicker,
6701
6685
  title: "Insert Emoji",
6702
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Smile, { size: 18 })
6686
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Smile, { size: 18 })
6703
6687
  }
6704
6688
  ),
6705
6689
  showEmojiPicker && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
@@ -6718,7 +6702,7 @@ var Toolbar = ({
6718
6702
  onClick: () => editor.chain().focus().toggleFullscreen().run(),
6719
6703
  active: isFullscreen,
6720
6704
  title: isFullscreen ? "Exit Fullscreen (Esc)" : "Fullscreen (Ctrl+Shift+F)",
6721
- children: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Minimize, { size: 18 }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Maximize, { size: 18 })
6705
+ children: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Minimize, { size: 18 }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Maximize, { size: 18 })
6722
6706
  },
6723
6707
  "fullscreen"
6724
6708
  );
@@ -6728,7 +6712,7 @@ var Toolbar = ({
6728
6712
  {
6729
6713
  onClick: () => editor.chain().focus().print().run(),
6730
6714
  title: "Print (Ctrl+P)",
6731
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Printer, { size: 18 })
6715
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Printer, { size: 18 })
6732
6716
  },
6733
6717
  "print"
6734
6718
  );
@@ -6739,7 +6723,7 @@ var Toolbar = ({
6739
6723
  onClick: () => editor.chain().focus().undo().run(),
6740
6724
  disabled: !editor.can().undo(),
6741
6725
  title: "Undo (Ctrl+Z)",
6742
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Undo, { size: 18 })
6726
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Undo, { size: 18 })
6743
6727
  },
6744
6728
  "undo"
6745
6729
  );
@@ -6750,7 +6734,7 @@ var Toolbar = ({
6750
6734
  onClick: () => editor.chain().focus().redo().run(),
6751
6735
  disabled: !editor.can().redo(),
6752
6736
  title: "Redo (Ctrl+Y)",
6753
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.Redo, { size: 18 })
6737
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Redo, { size: 18 })
6754
6738
  },
6755
6739
  "redo"
6756
6740
  );