@mhamz.01/easyflow-texteditor 0.1.97 → 0.1.99
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.css +24 -24
- package/dist/index.css.map +1 -1
- package/dist/index.js +478 -883
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +407 -812
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1273,15 +1273,14 @@ function EditorLayout({ children, onChange, initialTabs, onTabsChange }) {
|
|
|
1273
1273
|
import { useEffect as useEffect24, useRef as useRef7, useState as useState33 } from "react";
|
|
1274
1274
|
import { EditorContent, EditorContext, useEditor } from "@tiptap/react";
|
|
1275
1275
|
import { StarterKit } from "@tiptap/starter-kit";
|
|
1276
|
-
import ImageResize from "tiptap-extension-resize-image";
|
|
1277
1276
|
import Image from "@tiptap/extension-image";
|
|
1278
|
-
import {
|
|
1277
|
+
import { TaskItem, TaskList } from "@tiptap/extension-list";
|
|
1279
1278
|
import { TextAlign } from "@tiptap/extension-text-align";
|
|
1280
1279
|
import { Typography } from "@tiptap/extension-typography";
|
|
1281
1280
|
import { Highlight } from "@tiptap/extension-highlight";
|
|
1282
1281
|
import { Subscript } from "@tiptap/extension-subscript";
|
|
1283
1282
|
import { Superscript } from "@tiptap/extension-superscript";
|
|
1284
|
-
import { Gapcursor, Selection as
|
|
1283
|
+
import { Gapcursor, Selection as Selection2 } from "@tiptap/extensions";
|
|
1285
1284
|
import { TextStyleKit } from "@tiptap/extension-text-style";
|
|
1286
1285
|
|
|
1287
1286
|
// node_modules/@tiptap/extension-document/dist/index.js
|
|
@@ -1350,396 +1349,9 @@ var Paragraph = Node2.create({
|
|
|
1350
1349
|
});
|
|
1351
1350
|
var index_default2 = Paragraph;
|
|
1352
1351
|
|
|
1353
|
-
// node_modules/@tiptap/extension-blockquote/dist/index.js
|
|
1354
|
-
import { mergeAttributes as mergeAttributes2, Node as Node3, wrappingInputRule } from "@tiptap/core";
|
|
1355
|
-
import { jsx as jsx17 } from "@tiptap/core/jsx-runtime";
|
|
1356
|
-
var inputRegex = /^\s*>\s$/;
|
|
1357
|
-
var Blockquote = Node3.create({
|
|
1358
|
-
name: "blockquote",
|
|
1359
|
-
addOptions() {
|
|
1360
|
-
return {
|
|
1361
|
-
HTMLAttributes: {}
|
|
1362
|
-
};
|
|
1363
|
-
},
|
|
1364
|
-
content: "block+",
|
|
1365
|
-
group: "block",
|
|
1366
|
-
defining: true,
|
|
1367
|
-
parseHTML() {
|
|
1368
|
-
return [{ tag: "blockquote" }];
|
|
1369
|
-
},
|
|
1370
|
-
renderHTML({ HTMLAttributes }) {
|
|
1371
|
-
return /* @__PURE__ */ jsx17("blockquote", { ...mergeAttributes2(this.options.HTMLAttributes, HTMLAttributes), children: /* @__PURE__ */ jsx17("slot", {}) });
|
|
1372
|
-
},
|
|
1373
|
-
parseMarkdown: (token, helpers) => {
|
|
1374
|
-
return helpers.createNode("blockquote", void 0, helpers.parseChildren(token.tokens || []));
|
|
1375
|
-
},
|
|
1376
|
-
renderMarkdown: (node, h) => {
|
|
1377
|
-
if (!node.content) {
|
|
1378
|
-
return "";
|
|
1379
|
-
}
|
|
1380
|
-
const prefix = ">";
|
|
1381
|
-
const result = [];
|
|
1382
|
-
node.content.forEach((child) => {
|
|
1383
|
-
const childContent = h.renderChildren([child]);
|
|
1384
|
-
const lines = childContent.split("\n");
|
|
1385
|
-
const linesWithPrefix = lines.map((line) => {
|
|
1386
|
-
if (line.trim() === "") {
|
|
1387
|
-
return prefix;
|
|
1388
|
-
}
|
|
1389
|
-
return `${prefix} ${line}`;
|
|
1390
|
-
});
|
|
1391
|
-
result.push(linesWithPrefix.join("\n"));
|
|
1392
|
-
});
|
|
1393
|
-
return result.join(`
|
|
1394
|
-
${prefix}
|
|
1395
|
-
`);
|
|
1396
|
-
},
|
|
1397
|
-
addCommands() {
|
|
1398
|
-
return {
|
|
1399
|
-
setBlockquote: () => ({ commands }) => {
|
|
1400
|
-
return commands.wrapIn(this.name);
|
|
1401
|
-
},
|
|
1402
|
-
toggleBlockquote: () => ({ commands }) => {
|
|
1403
|
-
return commands.toggleWrap(this.name);
|
|
1404
|
-
},
|
|
1405
|
-
unsetBlockquote: () => ({ commands }) => {
|
|
1406
|
-
return commands.lift(this.name);
|
|
1407
|
-
}
|
|
1408
|
-
};
|
|
1409
|
-
},
|
|
1410
|
-
addKeyboardShortcuts() {
|
|
1411
|
-
return {
|
|
1412
|
-
"Mod-Shift-b": () => this.editor.commands.toggleBlockquote()
|
|
1413
|
-
};
|
|
1414
|
-
},
|
|
1415
|
-
addInputRules() {
|
|
1416
|
-
return [
|
|
1417
|
-
wrappingInputRule({
|
|
1418
|
-
find: inputRegex,
|
|
1419
|
-
type: this.type
|
|
1420
|
-
})
|
|
1421
|
-
];
|
|
1422
|
-
}
|
|
1423
|
-
});
|
|
1424
|
-
var index_default3 = Blockquote;
|
|
1425
|
-
|
|
1426
|
-
// node_modules/@tiptap/extension-code-block/dist/index.js
|
|
1427
|
-
import { mergeAttributes as mergeAttributes3, Node as Node4, textblockTypeInputRule } from "@tiptap/core";
|
|
1428
|
-
import { Plugin, PluginKey, Selection, TextSelection } from "@tiptap/pm/state";
|
|
1429
|
-
var DEFAULT_TAB_SIZE = 4;
|
|
1430
|
-
var backtickInputRegex = /^```([a-z]+)?[\s\n]$/;
|
|
1431
|
-
var tildeInputRegex = /^~~~([a-z]+)?[\s\n]$/;
|
|
1432
|
-
var CodeBlock = Node4.create({
|
|
1433
|
-
name: "codeBlock",
|
|
1434
|
-
addOptions() {
|
|
1435
|
-
return {
|
|
1436
|
-
languageClassPrefix: "language-",
|
|
1437
|
-
exitOnTripleEnter: true,
|
|
1438
|
-
exitOnArrowDown: true,
|
|
1439
|
-
defaultLanguage: null,
|
|
1440
|
-
enableTabIndentation: false,
|
|
1441
|
-
tabSize: DEFAULT_TAB_SIZE,
|
|
1442
|
-
HTMLAttributes: {}
|
|
1443
|
-
};
|
|
1444
|
-
},
|
|
1445
|
-
content: "text*",
|
|
1446
|
-
marks: "",
|
|
1447
|
-
group: "block",
|
|
1448
|
-
code: true,
|
|
1449
|
-
defining: true,
|
|
1450
|
-
addAttributes() {
|
|
1451
|
-
return {
|
|
1452
|
-
language: {
|
|
1453
|
-
default: this.options.defaultLanguage,
|
|
1454
|
-
parseHTML: (element) => {
|
|
1455
|
-
var _a;
|
|
1456
|
-
const { languageClassPrefix } = this.options;
|
|
1457
|
-
if (!languageClassPrefix) {
|
|
1458
|
-
return null;
|
|
1459
|
-
}
|
|
1460
|
-
const classNames = [...((_a = element.firstElementChild) == null ? void 0 : _a.classList) || []];
|
|
1461
|
-
const languages = classNames.filter((className) => className.startsWith(languageClassPrefix)).map((className) => className.replace(languageClassPrefix, ""));
|
|
1462
|
-
const language = languages[0];
|
|
1463
|
-
if (!language) {
|
|
1464
|
-
return null;
|
|
1465
|
-
}
|
|
1466
|
-
return language;
|
|
1467
|
-
},
|
|
1468
|
-
rendered: false
|
|
1469
|
-
}
|
|
1470
|
-
};
|
|
1471
|
-
},
|
|
1472
|
-
parseHTML() {
|
|
1473
|
-
return [
|
|
1474
|
-
{
|
|
1475
|
-
tag: "pre",
|
|
1476
|
-
preserveWhitespace: "full"
|
|
1477
|
-
}
|
|
1478
|
-
];
|
|
1479
|
-
},
|
|
1480
|
-
renderHTML({ node, HTMLAttributes }) {
|
|
1481
|
-
return [
|
|
1482
|
-
"pre",
|
|
1483
|
-
mergeAttributes3(this.options.HTMLAttributes, HTMLAttributes),
|
|
1484
|
-
[
|
|
1485
|
-
"code",
|
|
1486
|
-
{
|
|
1487
|
-
class: node.attrs.language ? this.options.languageClassPrefix + node.attrs.language : null
|
|
1488
|
-
},
|
|
1489
|
-
0
|
|
1490
|
-
]
|
|
1491
|
-
];
|
|
1492
|
-
},
|
|
1493
|
-
markdownTokenName: "code",
|
|
1494
|
-
parseMarkdown: (token, helpers) => {
|
|
1495
|
-
var _a;
|
|
1496
|
-
if (((_a = token.raw) == null ? void 0 : _a.startsWith("```")) === false && token.codeBlockStyle !== "indented") {
|
|
1497
|
-
return [];
|
|
1498
|
-
}
|
|
1499
|
-
return helpers.createNode(
|
|
1500
|
-
"codeBlock",
|
|
1501
|
-
{ language: token.lang || null },
|
|
1502
|
-
token.text ? [helpers.createTextNode(token.text)] : []
|
|
1503
|
-
);
|
|
1504
|
-
},
|
|
1505
|
-
renderMarkdown: (node, h) => {
|
|
1506
|
-
var _a;
|
|
1507
|
-
let output = "";
|
|
1508
|
-
const language = ((_a = node.attrs) == null ? void 0 : _a.language) || "";
|
|
1509
|
-
if (!node.content) {
|
|
1510
|
-
output = `\`\`\`${language}
|
|
1511
|
-
|
|
1512
|
-
\`\`\``;
|
|
1513
|
-
} else {
|
|
1514
|
-
const lines = [`\`\`\`${language}`, h.renderChildren(node.content), "```"];
|
|
1515
|
-
output = lines.join("\n");
|
|
1516
|
-
}
|
|
1517
|
-
return output;
|
|
1518
|
-
},
|
|
1519
|
-
addCommands() {
|
|
1520
|
-
return {
|
|
1521
|
-
setCodeBlock: (attributes) => ({ commands }) => {
|
|
1522
|
-
return commands.setNode(this.name, attributes);
|
|
1523
|
-
},
|
|
1524
|
-
toggleCodeBlock: (attributes) => ({ commands }) => {
|
|
1525
|
-
return commands.toggleNode(this.name, "paragraph", attributes);
|
|
1526
|
-
}
|
|
1527
|
-
};
|
|
1528
|
-
},
|
|
1529
|
-
addKeyboardShortcuts() {
|
|
1530
|
-
return {
|
|
1531
|
-
"Mod-Alt-c": () => this.editor.commands.toggleCodeBlock(),
|
|
1532
|
-
// remove code block when at start of document or code block is empty
|
|
1533
|
-
Backspace: () => {
|
|
1534
|
-
const { empty, $anchor } = this.editor.state.selection;
|
|
1535
|
-
const isAtStart = $anchor.pos === 1;
|
|
1536
|
-
if (!empty || $anchor.parent.type.name !== this.name) {
|
|
1537
|
-
return false;
|
|
1538
|
-
}
|
|
1539
|
-
if (isAtStart || !$anchor.parent.textContent.length) {
|
|
1540
|
-
return this.editor.commands.clearNodes();
|
|
1541
|
-
}
|
|
1542
|
-
return false;
|
|
1543
|
-
},
|
|
1544
|
-
// handle tab indentation
|
|
1545
|
-
Tab: ({ editor }) => {
|
|
1546
|
-
var _a;
|
|
1547
|
-
if (!this.options.enableTabIndentation) {
|
|
1548
|
-
return false;
|
|
1549
|
-
}
|
|
1550
|
-
const tabSize = (_a = this.options.tabSize) != null ? _a : DEFAULT_TAB_SIZE;
|
|
1551
|
-
const { state } = editor;
|
|
1552
|
-
const { selection } = state;
|
|
1553
|
-
const { $from, empty } = selection;
|
|
1554
|
-
if ($from.parent.type !== this.type) {
|
|
1555
|
-
return false;
|
|
1556
|
-
}
|
|
1557
|
-
const indent = " ".repeat(tabSize);
|
|
1558
|
-
if (empty) {
|
|
1559
|
-
return editor.commands.insertContent(indent);
|
|
1560
|
-
}
|
|
1561
|
-
return editor.commands.command(({ tr }) => {
|
|
1562
|
-
const { from, to } = selection;
|
|
1563
|
-
const text = state.doc.textBetween(from, to, "\n", "\n");
|
|
1564
|
-
const lines = text.split("\n");
|
|
1565
|
-
const indentedText = lines.map((line) => indent + line).join("\n");
|
|
1566
|
-
tr.replaceWith(from, to, state.schema.text(indentedText));
|
|
1567
|
-
return true;
|
|
1568
|
-
});
|
|
1569
|
-
},
|
|
1570
|
-
// handle shift+tab reverse indentation
|
|
1571
|
-
"Shift-Tab": ({ editor }) => {
|
|
1572
|
-
var _a;
|
|
1573
|
-
if (!this.options.enableTabIndentation) {
|
|
1574
|
-
return false;
|
|
1575
|
-
}
|
|
1576
|
-
const tabSize = (_a = this.options.tabSize) != null ? _a : DEFAULT_TAB_SIZE;
|
|
1577
|
-
const { state } = editor;
|
|
1578
|
-
const { selection } = state;
|
|
1579
|
-
const { $from, empty } = selection;
|
|
1580
|
-
if ($from.parent.type !== this.type) {
|
|
1581
|
-
return false;
|
|
1582
|
-
}
|
|
1583
|
-
if (empty) {
|
|
1584
|
-
return editor.commands.command(({ tr }) => {
|
|
1585
|
-
var _a2;
|
|
1586
|
-
const { pos } = $from;
|
|
1587
|
-
const codeBlockStart = $from.start();
|
|
1588
|
-
const codeBlockEnd = $from.end();
|
|
1589
|
-
const allText = state.doc.textBetween(codeBlockStart, codeBlockEnd, "\n", "\n");
|
|
1590
|
-
const lines = allText.split("\n");
|
|
1591
|
-
let currentLineIndex = 0;
|
|
1592
|
-
let charCount = 0;
|
|
1593
|
-
const relativeCursorPos = pos - codeBlockStart;
|
|
1594
|
-
for (let i = 0; i < lines.length; i += 1) {
|
|
1595
|
-
if (charCount + lines[i].length >= relativeCursorPos) {
|
|
1596
|
-
currentLineIndex = i;
|
|
1597
|
-
break;
|
|
1598
|
-
}
|
|
1599
|
-
charCount += lines[i].length + 1;
|
|
1600
|
-
}
|
|
1601
|
-
const currentLine = lines[currentLineIndex];
|
|
1602
|
-
const leadingSpaces = ((_a2 = currentLine.match(/^ */)) == null ? void 0 : _a2[0]) || "";
|
|
1603
|
-
const spacesToRemove = Math.min(leadingSpaces.length, tabSize);
|
|
1604
|
-
if (spacesToRemove === 0) {
|
|
1605
|
-
return true;
|
|
1606
|
-
}
|
|
1607
|
-
let lineStartPos = codeBlockStart;
|
|
1608
|
-
for (let i = 0; i < currentLineIndex; i += 1) {
|
|
1609
|
-
lineStartPos += lines[i].length + 1;
|
|
1610
|
-
}
|
|
1611
|
-
tr.delete(lineStartPos, lineStartPos + spacesToRemove);
|
|
1612
|
-
const cursorPosInLine = pos - lineStartPos;
|
|
1613
|
-
if (cursorPosInLine <= spacesToRemove) {
|
|
1614
|
-
tr.setSelection(TextSelection.create(tr.doc, lineStartPos));
|
|
1615
|
-
}
|
|
1616
|
-
return true;
|
|
1617
|
-
});
|
|
1618
|
-
}
|
|
1619
|
-
return editor.commands.command(({ tr }) => {
|
|
1620
|
-
const { from, to } = selection;
|
|
1621
|
-
const text = state.doc.textBetween(from, to, "\n", "\n");
|
|
1622
|
-
const lines = text.split("\n");
|
|
1623
|
-
const reverseIndentText = lines.map((line) => {
|
|
1624
|
-
var _a2;
|
|
1625
|
-
const leadingSpaces = ((_a2 = line.match(/^ */)) == null ? void 0 : _a2[0]) || "";
|
|
1626
|
-
const spacesToRemove = Math.min(leadingSpaces.length, tabSize);
|
|
1627
|
-
return line.slice(spacesToRemove);
|
|
1628
|
-
}).join("\n");
|
|
1629
|
-
tr.replaceWith(from, to, state.schema.text(reverseIndentText));
|
|
1630
|
-
return true;
|
|
1631
|
-
});
|
|
1632
|
-
},
|
|
1633
|
-
// exit node on triple enter
|
|
1634
|
-
Enter: ({ editor }) => {
|
|
1635
|
-
if (!this.options.exitOnTripleEnter) {
|
|
1636
|
-
return false;
|
|
1637
|
-
}
|
|
1638
|
-
const { state } = editor;
|
|
1639
|
-
const { selection } = state;
|
|
1640
|
-
const { $from, empty } = selection;
|
|
1641
|
-
if (!empty || $from.parent.type !== this.type) {
|
|
1642
|
-
return false;
|
|
1643
|
-
}
|
|
1644
|
-
const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2;
|
|
1645
|
-
const endsWithDoubleNewline = $from.parent.textContent.endsWith("\n\n");
|
|
1646
|
-
if (!isAtEnd || !endsWithDoubleNewline) {
|
|
1647
|
-
return false;
|
|
1648
|
-
}
|
|
1649
|
-
return editor.chain().command(({ tr }) => {
|
|
1650
|
-
tr.delete($from.pos - 2, $from.pos);
|
|
1651
|
-
return true;
|
|
1652
|
-
}).exitCode().run();
|
|
1653
|
-
},
|
|
1654
|
-
// exit node on arrow down
|
|
1655
|
-
ArrowDown: ({ editor }) => {
|
|
1656
|
-
if (!this.options.exitOnArrowDown) {
|
|
1657
|
-
return false;
|
|
1658
|
-
}
|
|
1659
|
-
const { state } = editor;
|
|
1660
|
-
const { selection, doc } = state;
|
|
1661
|
-
const { $from, empty } = selection;
|
|
1662
|
-
if (!empty || $from.parent.type !== this.type) {
|
|
1663
|
-
return false;
|
|
1664
|
-
}
|
|
1665
|
-
const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2;
|
|
1666
|
-
if (!isAtEnd) {
|
|
1667
|
-
return false;
|
|
1668
|
-
}
|
|
1669
|
-
const after = $from.after();
|
|
1670
|
-
if (after === void 0) {
|
|
1671
|
-
return false;
|
|
1672
|
-
}
|
|
1673
|
-
const nodeAfter = doc.nodeAt(after);
|
|
1674
|
-
if (nodeAfter) {
|
|
1675
|
-
return editor.commands.command(({ tr }) => {
|
|
1676
|
-
tr.setSelection(Selection.near(doc.resolve(after)));
|
|
1677
|
-
return true;
|
|
1678
|
-
});
|
|
1679
|
-
}
|
|
1680
|
-
return editor.commands.exitCode();
|
|
1681
|
-
}
|
|
1682
|
-
};
|
|
1683
|
-
},
|
|
1684
|
-
addInputRules() {
|
|
1685
|
-
return [
|
|
1686
|
-
textblockTypeInputRule({
|
|
1687
|
-
find: backtickInputRegex,
|
|
1688
|
-
type: this.type,
|
|
1689
|
-
getAttributes: (match) => ({
|
|
1690
|
-
language: match[1]
|
|
1691
|
-
})
|
|
1692
|
-
}),
|
|
1693
|
-
textblockTypeInputRule({
|
|
1694
|
-
find: tildeInputRegex,
|
|
1695
|
-
type: this.type,
|
|
1696
|
-
getAttributes: (match) => ({
|
|
1697
|
-
language: match[1]
|
|
1698
|
-
})
|
|
1699
|
-
})
|
|
1700
|
-
];
|
|
1701
|
-
},
|
|
1702
|
-
addProseMirrorPlugins() {
|
|
1703
|
-
return [
|
|
1704
|
-
// this plugin creates a code block for pasted content from VS Code
|
|
1705
|
-
// we can also detect the copied code language
|
|
1706
|
-
new Plugin({
|
|
1707
|
-
key: new PluginKey("codeBlockVSCodeHandler"),
|
|
1708
|
-
props: {
|
|
1709
|
-
handlePaste: (view, event) => {
|
|
1710
|
-
if (!event.clipboardData) {
|
|
1711
|
-
return false;
|
|
1712
|
-
}
|
|
1713
|
-
if (this.editor.isActive(this.type.name)) {
|
|
1714
|
-
return false;
|
|
1715
|
-
}
|
|
1716
|
-
const text = event.clipboardData.getData("text/plain");
|
|
1717
|
-
const vscode = event.clipboardData.getData("vscode-editor-data");
|
|
1718
|
-
const vscodeData = vscode ? JSON.parse(vscode) : void 0;
|
|
1719
|
-
const language = vscodeData == null ? void 0 : vscodeData.mode;
|
|
1720
|
-
if (!text || !language) {
|
|
1721
|
-
return false;
|
|
1722
|
-
}
|
|
1723
|
-
const { tr, schema } = view.state;
|
|
1724
|
-
const textNode = schema.text(text.replace(/\r\n?/g, "\n"));
|
|
1725
|
-
tr.replaceSelectionWith(this.type.create({ language }, textNode));
|
|
1726
|
-
if (tr.selection.$from.parent.type !== this.type) {
|
|
1727
|
-
tr.setSelection(TextSelection.near(tr.doc.resolve(Math.max(0, tr.selection.from - 2))));
|
|
1728
|
-
}
|
|
1729
|
-
tr.setMeta("paste", true);
|
|
1730
|
-
view.dispatch(tr);
|
|
1731
|
-
return true;
|
|
1732
|
-
}
|
|
1733
|
-
}
|
|
1734
|
-
})
|
|
1735
|
-
];
|
|
1736
|
-
}
|
|
1737
|
-
});
|
|
1738
|
-
var index_default4 = CodeBlock;
|
|
1739
|
-
|
|
1740
1352
|
// node_modules/@tiptap/extension-text/dist/index.js
|
|
1741
|
-
import { Node as
|
|
1742
|
-
var Text =
|
|
1353
|
+
import { Node as Node3 } from "@tiptap/core";
|
|
1354
|
+
var Text = Node3.create({
|
|
1743
1355
|
name: "text",
|
|
1744
1356
|
group: "inline",
|
|
1745
1357
|
parseMarkdown: (token) => {
|
|
@@ -1750,7 +1362,7 @@ var Text = Node5.create({
|
|
|
1750
1362
|
},
|
|
1751
1363
|
renderMarkdown: (node) => node.text || ""
|
|
1752
1364
|
});
|
|
1753
|
-
var
|
|
1365
|
+
var index_default3 = Text;
|
|
1754
1366
|
|
|
1755
1367
|
// src/components/tiptap-templates/simple/simple-editor.tsx
|
|
1756
1368
|
import { FontFamily, TextStyle } from "@tiptap/extension-text-style";
|
|
@@ -1869,7 +1481,7 @@ import {
|
|
|
1869
1481
|
FloatingPortal,
|
|
1870
1482
|
FloatingDelayGroup
|
|
1871
1483
|
} from "@floating-ui/react";
|
|
1872
|
-
import { jsx as
|
|
1484
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1873
1485
|
function useTooltip({
|
|
1874
1486
|
initialOpen = false,
|
|
1875
1487
|
placement = "top",
|
|
@@ -1933,14 +1545,14 @@ function useTooltipContext() {
|
|
|
1933
1545
|
function Tooltip2({ children, ...props }) {
|
|
1934
1546
|
const tooltip = useTooltip(props);
|
|
1935
1547
|
if (!props.useDelayGroup) {
|
|
1936
|
-
return /* @__PURE__ */
|
|
1548
|
+
return /* @__PURE__ */ jsx17(TooltipContext.Provider, { value: tooltip, children });
|
|
1937
1549
|
}
|
|
1938
|
-
return /* @__PURE__ */
|
|
1550
|
+
return /* @__PURE__ */ jsx17(
|
|
1939
1551
|
FloatingDelayGroup,
|
|
1940
1552
|
{
|
|
1941
1553
|
delay: { open: props.delay ?? 0, close: props.closeDelay ?? 0 },
|
|
1942
1554
|
timeoutMs: props.timeout,
|
|
1943
|
-
children: /* @__PURE__ */
|
|
1555
|
+
children: /* @__PURE__ */ jsx17(TooltipContext.Provider, { value: tooltip, children })
|
|
1944
1556
|
}
|
|
1945
1557
|
);
|
|
1946
1558
|
}
|
|
@@ -1969,7 +1581,7 @@ var TooltipTrigger2 = forwardRef(
|
|
|
1969
1581
|
})
|
|
1970
1582
|
);
|
|
1971
1583
|
}
|
|
1972
|
-
return /* @__PURE__ */
|
|
1584
|
+
return /* @__PURE__ */ jsx17(
|
|
1973
1585
|
"button",
|
|
1974
1586
|
{
|
|
1975
1587
|
ref,
|
|
@@ -1985,7 +1597,7 @@ var TooltipContent2 = forwardRef(
|
|
|
1985
1597
|
const context = useTooltipContext();
|
|
1986
1598
|
const ref = useMergeRefs([context.refs.setFloating, propRef]);
|
|
1987
1599
|
if (!context.open) return null;
|
|
1988
|
-
const content = /* @__PURE__ */
|
|
1600
|
+
const content = /* @__PURE__ */ jsx17(
|
|
1989
1601
|
"div",
|
|
1990
1602
|
{
|
|
1991
1603
|
ref,
|
|
@@ -1999,7 +1611,7 @@ var TooltipContent2 = forwardRef(
|
|
|
1999
1611
|
}
|
|
2000
1612
|
);
|
|
2001
1613
|
if (portal) {
|
|
2002
|
-
return /* @__PURE__ */
|
|
1614
|
+
return /* @__PURE__ */ jsx17(FloatingPortal, { ...portalProps, children: content });
|
|
2003
1615
|
}
|
|
2004
1616
|
return content;
|
|
2005
1617
|
}
|
|
@@ -2012,8 +1624,8 @@ TooltipContent2.displayName = "TooltipContent";
|
|
|
2012
1624
|
import {
|
|
2013
1625
|
AllSelection,
|
|
2014
1626
|
NodeSelection,
|
|
2015
|
-
Selection
|
|
2016
|
-
TextSelection
|
|
1627
|
+
Selection,
|
|
1628
|
+
TextSelection
|
|
2017
1629
|
} from "@tiptap/pm/state";
|
|
2018
1630
|
import { Extension as Extension2 } from "@tiptap/core";
|
|
2019
1631
|
var MAX_FILE_SIZE = 5 * 1024 * 1024;
|
|
@@ -2061,7 +1673,7 @@ var isNodeInSchema = (nodeName, editor) => {
|
|
|
2061
1673
|
function focusNextNode(editor) {
|
|
2062
1674
|
const { state, view } = editor;
|
|
2063
1675
|
const { doc, selection } = state;
|
|
2064
|
-
const nextSel =
|
|
1676
|
+
const nextSel = Selection.findFrom(selection.$to, 1, true);
|
|
2065
1677
|
if (nextSel) {
|
|
2066
1678
|
view.dispatch(state.tr.setSelection(nextSel).scrollIntoView());
|
|
2067
1679
|
return true;
|
|
@@ -2075,7 +1687,7 @@ function focusNextNode(editor) {
|
|
|
2075
1687
|
const para = paragraphType.create();
|
|
2076
1688
|
let tr = state.tr.insert(end, para);
|
|
2077
1689
|
const $inside = tr.doc.resolve(end + 1);
|
|
2078
|
-
tr = tr.setSelection(
|
|
1690
|
+
tr = tr.setSelection(TextSelection.near($inside)).scrollIntoView();
|
|
2079
1691
|
view.dispatch(tr);
|
|
2080
1692
|
return true;
|
|
2081
1693
|
}
|
|
@@ -2167,7 +1779,7 @@ function selectionWithinConvertibleTypes(editor, types = []) {
|
|
|
2167
1779
|
const nodeType = selection.node?.type?.name;
|
|
2168
1780
|
return !!nodeType && allowed.has(nodeType);
|
|
2169
1781
|
}
|
|
2170
|
-
if (selection instanceof
|
|
1782
|
+
if (selection instanceof TextSelection || selection instanceof AllSelection) {
|
|
2171
1783
|
let valid = true;
|
|
2172
1784
|
state.doc.nodesBetween(selection.from, selection.to, (node) => {
|
|
2173
1785
|
if (node.isTextblock && !allowed.has(node.type.name)) {
|
|
@@ -2316,14 +1928,14 @@ var FontSizeExtension = Extension2.create({
|
|
|
2316
1928
|
});
|
|
2317
1929
|
|
|
2318
1930
|
// src/components/tiptap-ui-primitive/button/button.tsx
|
|
2319
|
-
import { jsx as
|
|
1931
|
+
import { jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2320
1932
|
var ShortcutDisplay = ({
|
|
2321
1933
|
shortcuts
|
|
2322
1934
|
}) => {
|
|
2323
1935
|
if (shortcuts.length === 0) return null;
|
|
2324
|
-
return /* @__PURE__ */
|
|
2325
|
-
index > 0 && /* @__PURE__ */
|
|
2326
|
-
/* @__PURE__ */
|
|
1936
|
+
return /* @__PURE__ */ jsx18("div", { children: shortcuts.map((key, index) => /* @__PURE__ */ jsxs9(Fragment2, { children: [
|
|
1937
|
+
index > 0 && /* @__PURE__ */ jsx18("kbd", { children: "+" }),
|
|
1938
|
+
/* @__PURE__ */ jsx18("kbd", { children: key })
|
|
2327
1939
|
] }, index)) });
|
|
2328
1940
|
};
|
|
2329
1941
|
var Button2 = forwardRef2(
|
|
@@ -2341,7 +1953,7 @@ var Button2 = forwardRef2(
|
|
|
2341
1953
|
[shortcutKeys]
|
|
2342
1954
|
);
|
|
2343
1955
|
if (!tooltip || !showTooltip) {
|
|
2344
|
-
return /* @__PURE__ */
|
|
1956
|
+
return /* @__PURE__ */ jsx18(
|
|
2345
1957
|
"button",
|
|
2346
1958
|
{
|
|
2347
1959
|
className: cn2("tiptap-button", className),
|
|
@@ -2353,7 +1965,7 @@ var Button2 = forwardRef2(
|
|
|
2353
1965
|
);
|
|
2354
1966
|
}
|
|
2355
1967
|
return /* @__PURE__ */ jsxs9(Tooltip2, { delay: 200, children: [
|
|
2356
|
-
/* @__PURE__ */
|
|
1968
|
+
/* @__PURE__ */ jsx18(
|
|
2357
1969
|
TooltipTrigger2,
|
|
2358
1970
|
{
|
|
2359
1971
|
className: cn2("tiptap-button", className),
|
|
@@ -2365,14 +1977,14 @@ var Button2 = forwardRef2(
|
|
|
2365
1977
|
),
|
|
2366
1978
|
/* @__PURE__ */ jsxs9(TooltipContent2, { children: [
|
|
2367
1979
|
tooltip,
|
|
2368
|
-
/* @__PURE__ */
|
|
1980
|
+
/* @__PURE__ */ jsx18(ShortcutDisplay, { shortcuts })
|
|
2369
1981
|
] })
|
|
2370
1982
|
] });
|
|
2371
1983
|
}
|
|
2372
1984
|
);
|
|
2373
1985
|
Button2.displayName = "Button";
|
|
2374
1986
|
var ButtonGroup = forwardRef2(({ className, children, orientation = "vertical", ...props }, ref) => {
|
|
2375
|
-
return /* @__PURE__ */
|
|
1987
|
+
return /* @__PURE__ */ jsx18(
|
|
2376
1988
|
"div",
|
|
2377
1989
|
{
|
|
2378
1990
|
ref,
|
|
@@ -2387,7 +1999,7 @@ var ButtonGroup = forwardRef2(({ className, children, orientation = "vertical",
|
|
|
2387
1999
|
ButtonGroup.displayName = "ButtonGroup";
|
|
2388
2000
|
|
|
2389
2001
|
// src/components/tiptap-ui-primitive/spacer/spacer.tsx
|
|
2390
|
-
import { jsx as
|
|
2002
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
2391
2003
|
function Spacer({
|
|
2392
2004
|
orientation = "horizontal",
|
|
2393
2005
|
size,
|
|
@@ -2402,7 +2014,7 @@ function Spacer({
|
|
|
2402
2014
|
height: orientation === "horizontal" ? "1px" : size
|
|
2403
2015
|
}
|
|
2404
2016
|
};
|
|
2405
|
-
return /* @__PURE__ */
|
|
2017
|
+
return /* @__PURE__ */ jsx19("div", { ...props, style: computedStyle });
|
|
2406
2018
|
}
|
|
2407
2019
|
|
|
2408
2020
|
// src/components/tiptap-ui-primitive/toolbar/toolbar.tsx
|
|
@@ -2410,12 +2022,12 @@ import { forwardRef as forwardRef4, useCallback as useCallback7, useEffect as us
|
|
|
2410
2022
|
|
|
2411
2023
|
// src/components/tiptap-ui-primitive/separator/separator.tsx
|
|
2412
2024
|
import { forwardRef as forwardRef3 } from "react";
|
|
2413
|
-
import { jsx as
|
|
2025
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
2414
2026
|
var Separator2 = forwardRef3(
|
|
2415
2027
|
({ decorative, orientation = "vertical", className, ...divProps }, ref) => {
|
|
2416
2028
|
const ariaOrientation = orientation === "vertical" ? orientation : void 0;
|
|
2417
2029
|
const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
|
|
2418
|
-
return /* @__PURE__ */
|
|
2030
|
+
return /* @__PURE__ */ jsx20(
|
|
2419
2031
|
"div",
|
|
2420
2032
|
{
|
|
2421
2033
|
className: cn2("tiptap-separator", className),
|
|
@@ -2584,7 +2196,7 @@ var useComposedRef = (libRef, userRef) => {
|
|
|
2584
2196
|
};
|
|
2585
2197
|
|
|
2586
2198
|
// src/components/tiptap-ui-primitive/toolbar/toolbar.tsx
|
|
2587
|
-
import { jsx as
|
|
2199
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
2588
2200
|
var useToolbarNavigation = (toolbarRef) => {
|
|
2589
2201
|
const [items, setItems] = useState10([]);
|
|
2590
2202
|
const collectItems = useCallback7(() => {
|
|
@@ -2641,7 +2253,7 @@ var Toolbar = forwardRef4(
|
|
|
2641
2253
|
const toolbarRef = useRef3(null);
|
|
2642
2254
|
const composedRef = useComposedRef(toolbarRef, ref);
|
|
2643
2255
|
useToolbarNavigation(toolbarRef);
|
|
2644
|
-
return /* @__PURE__ */
|
|
2256
|
+
return /* @__PURE__ */ jsx21(
|
|
2645
2257
|
"div",
|
|
2646
2258
|
{
|
|
2647
2259
|
ref: composedRef,
|
|
@@ -2657,7 +2269,7 @@ var Toolbar = forwardRef4(
|
|
|
2657
2269
|
);
|
|
2658
2270
|
Toolbar.displayName = "Toolbar";
|
|
2659
2271
|
var ToolbarGroup = forwardRef4(
|
|
2660
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
2272
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsx21(
|
|
2661
2273
|
"div",
|
|
2662
2274
|
{
|
|
2663
2275
|
ref,
|
|
@@ -2670,7 +2282,7 @@ var ToolbarGroup = forwardRef4(
|
|
|
2670
2282
|
);
|
|
2671
2283
|
ToolbarGroup.displayName = "ToolbarGroup";
|
|
2672
2284
|
var ToolbarSeparator = forwardRef4(
|
|
2673
|
-
({ ...props }, ref) => /* @__PURE__ */
|
|
2285
|
+
({ ...props }, ref) => /* @__PURE__ */ jsx21(Separator2, { ref, orientation: "vertical", decorative: true, ...props })
|
|
2674
2286
|
);
|
|
2675
2287
|
ToolbarSeparator.displayName = "ToolbarSeparator";
|
|
2676
2288
|
|
|
@@ -2686,11 +2298,11 @@ import {
|
|
|
2686
2298
|
Heading3,
|
|
2687
2299
|
Code
|
|
2688
2300
|
} from "lucide-react";
|
|
2689
|
-
import { jsx as
|
|
2301
|
+
import { jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2690
2302
|
function BubbleMenuInline() {
|
|
2691
2303
|
const { editor } = useCurrentEditor();
|
|
2692
2304
|
if (!editor) return null;
|
|
2693
|
-
return /* @__PURE__ */
|
|
2305
|
+
return /* @__PURE__ */ jsx22(
|
|
2694
2306
|
BubbleMenu,
|
|
2695
2307
|
{
|
|
2696
2308
|
editor,
|
|
@@ -2714,76 +2326,76 @@ function BubbleMenuInline() {
|
|
|
2714
2326
|
{
|
|
2715
2327
|
className: "relative flex items-center gap-1 rounded-md border bg-[#171717] text-[#a1a1a6] p-1 shadow-md z-[15]\r\n animate-in fade-in slide-in-from-top-2 duration-200",
|
|
2716
2328
|
children: [
|
|
2717
|
-
/* @__PURE__ */
|
|
2329
|
+
/* @__PURE__ */ jsx22(
|
|
2718
2330
|
Button,
|
|
2719
2331
|
{
|
|
2720
2332
|
variant: "ghost",
|
|
2721
2333
|
size: "sm",
|
|
2722
2334
|
onClick: () => editor.chain().focus().toggleHeading({ level: 1 }).run(),
|
|
2723
2335
|
className: editor.isActive("heading", { level: 1 }) ? "bg-accent" : "",
|
|
2724
|
-
children: /* @__PURE__ */
|
|
2336
|
+
children: /* @__PURE__ */ jsx22(Heading1, { size: 15 })
|
|
2725
2337
|
}
|
|
2726
2338
|
),
|
|
2727
|
-
/* @__PURE__ */
|
|
2339
|
+
/* @__PURE__ */ jsx22(
|
|
2728
2340
|
Button,
|
|
2729
2341
|
{
|
|
2730
2342
|
variant: "ghost",
|
|
2731
2343
|
size: "sm",
|
|
2732
2344
|
onClick: () => editor.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
2733
2345
|
className: editor.isActive("heading", { level: 2 }) ? "bg-accent" : "",
|
|
2734
|
-
children: /* @__PURE__ */
|
|
2346
|
+
children: /* @__PURE__ */ jsx22(Heading2, { size: 15 })
|
|
2735
2347
|
}
|
|
2736
2348
|
),
|
|
2737
|
-
/* @__PURE__ */
|
|
2349
|
+
/* @__PURE__ */ jsx22(
|
|
2738
2350
|
Button,
|
|
2739
2351
|
{
|
|
2740
2352
|
variant: "ghost",
|
|
2741
2353
|
size: "sm",
|
|
2742
2354
|
onClick: () => editor.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
2743
2355
|
className: editor.isActive("heading", { level: 3 }) ? "bg-accent" : "",
|
|
2744
|
-
children: /* @__PURE__ */
|
|
2356
|
+
children: /* @__PURE__ */ jsx22(Heading3, { size: 15 })
|
|
2745
2357
|
}
|
|
2746
2358
|
),
|
|
2747
|
-
/* @__PURE__ */
|
|
2748
|
-
/* @__PURE__ */
|
|
2359
|
+
/* @__PURE__ */ jsx22(Separator, { orientation: "vertical", className: "mx-1" }),
|
|
2360
|
+
/* @__PURE__ */ jsx22(
|
|
2749
2361
|
Button,
|
|
2750
2362
|
{
|
|
2751
2363
|
variant: "ghost",
|
|
2752
2364
|
size: "sm",
|
|
2753
2365
|
onClick: () => editor.chain().focus().toggleBulletList().run(),
|
|
2754
2366
|
className: editor.isActive("bulletList") ? "bg-accent" : "",
|
|
2755
|
-
children: /* @__PURE__ */
|
|
2367
|
+
children: /* @__PURE__ */ jsx22(List, { size: 15 })
|
|
2756
2368
|
}
|
|
2757
2369
|
),
|
|
2758
|
-
/* @__PURE__ */
|
|
2370
|
+
/* @__PURE__ */ jsx22(
|
|
2759
2371
|
Button,
|
|
2760
2372
|
{
|
|
2761
2373
|
variant: "ghost",
|
|
2762
2374
|
size: "sm",
|
|
2763
2375
|
onClick: () => editor.chain().focus().toggleOrderedList().run(),
|
|
2764
2376
|
className: editor.isActive("orderedList") ? "bg-accent" : "",
|
|
2765
|
-
children: /* @__PURE__ */
|
|
2377
|
+
children: /* @__PURE__ */ jsx22(ListOrdered, { size: 15 })
|
|
2766
2378
|
}
|
|
2767
2379
|
),
|
|
2768
|
-
/* @__PURE__ */
|
|
2380
|
+
/* @__PURE__ */ jsx22(
|
|
2769
2381
|
Button,
|
|
2770
2382
|
{
|
|
2771
2383
|
variant: "ghost",
|
|
2772
2384
|
size: "sm",
|
|
2773
2385
|
onClick: () => editor.chain().focus().toggleTaskList().run(),
|
|
2774
2386
|
className: editor.isActive("taskList") ? "bg-accent" : "",
|
|
2775
|
-
children: /* @__PURE__ */
|
|
2387
|
+
children: /* @__PURE__ */ jsx22(CheckSquare, { size: 15 })
|
|
2776
2388
|
}
|
|
2777
2389
|
),
|
|
2778
|
-
/* @__PURE__ */
|
|
2779
|
-
/* @__PURE__ */
|
|
2390
|
+
/* @__PURE__ */ jsx22(Separator, { orientation: "vertical", className: "mx-1" }),
|
|
2391
|
+
/* @__PURE__ */ jsx22(
|
|
2780
2392
|
Button,
|
|
2781
2393
|
{
|
|
2782
2394
|
variant: "ghost",
|
|
2783
2395
|
size: "sm",
|
|
2784
2396
|
onClick: () => editor.chain().focus().toggleCodeBlock().run(),
|
|
2785
2397
|
className: editor.isActive("codeBlock") ? "bg-accent" : "",
|
|
2786
|
-
children: /* @__PURE__ */
|
|
2398
|
+
children: /* @__PURE__ */ jsx22(Code, { size: 15 })
|
|
2787
2399
|
}
|
|
2788
2400
|
)
|
|
2789
2401
|
]
|
|
@@ -2794,7 +2406,7 @@ function BubbleMenuInline() {
|
|
|
2794
2406
|
}
|
|
2795
2407
|
|
|
2796
2408
|
// src/components/tiptap-node/image-upload-node/image-upload-node-extension.ts
|
|
2797
|
-
import { mergeAttributes as
|
|
2409
|
+
import { mergeAttributes as mergeAttributes2, Node as Node4 } from "@tiptap/react";
|
|
2798
2410
|
import { ReactNodeViewRenderer } from "@tiptap/react";
|
|
2799
2411
|
|
|
2800
2412
|
// src/components/tiptap-node/image-upload-node/image-upload-node.tsx
|
|
@@ -2803,9 +2415,9 @@ import { NodeViewWrapper } from "@tiptap/react";
|
|
|
2803
2415
|
|
|
2804
2416
|
// src/components/tiptap-icons/close-icon.tsx
|
|
2805
2417
|
import { memo as memo6 } from "react";
|
|
2806
|
-
import { jsx as
|
|
2418
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
2807
2419
|
var CloseIcon = memo6(({ className, ...props }) => {
|
|
2808
|
-
return /* @__PURE__ */
|
|
2420
|
+
return /* @__PURE__ */ jsx23(
|
|
2809
2421
|
"svg",
|
|
2810
2422
|
{
|
|
2811
2423
|
width: "24",
|
|
@@ -2815,7 +2427,7 @@ var CloseIcon = memo6(({ className, ...props }) => {
|
|
|
2815
2427
|
fill: "currentColor",
|
|
2816
2428
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2817
2429
|
...props,
|
|
2818
|
-
children: /* @__PURE__ */
|
|
2430
|
+
children: /* @__PURE__ */ jsx23(
|
|
2819
2431
|
"path",
|
|
2820
2432
|
{
|
|
2821
2433
|
d: "M18.7071 6.70711C19.0976 6.31658 19.0976 5.68342 18.7071 5.29289C18.3166 4.90237 17.6834 4.90237 17.2929 5.29289L12 10.5858L6.70711 5.29289C6.31658 4.90237 5.68342 4.90237 5.29289 5.29289C4.90237 5.68342 4.90237 6.31658 5.29289 6.70711L10.5858 12L5.29289 17.2929C4.90237 17.6834 4.90237 18.3166 5.29289 18.7071C5.68342 19.0976 6.31658 19.0976 6.70711 18.7071L12 13.4142L17.2929 18.7071C17.6834 19.0976 18.3166 19.0976 18.7071 18.7071C19.0976 18.3166 19.0976 17.6834 18.7071 17.2929L13.4142 12L18.7071 6.70711Z",
|
|
@@ -2828,7 +2440,7 @@ var CloseIcon = memo6(({ className, ...props }) => {
|
|
|
2828
2440
|
CloseIcon.displayName = "CloseIcon";
|
|
2829
2441
|
|
|
2830
2442
|
// src/components/tiptap-node/image-upload-node/image-upload-node.tsx
|
|
2831
|
-
import { Fragment as Fragment3, jsx as
|
|
2443
|
+
import { Fragment as Fragment3, jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2832
2444
|
function useFileUpload(options) {
|
|
2833
2445
|
const [fileItems, setFileItems] = useState11([]);
|
|
2834
2446
|
const uploadFile = async (file) => {
|
|
@@ -2946,14 +2558,14 @@ var CloudUploadIcon = () => /* @__PURE__ */ jsxs11(
|
|
|
2946
2558
|
fill: "currentColor",
|
|
2947
2559
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2948
2560
|
children: [
|
|
2949
|
-
/* @__PURE__ */
|
|
2561
|
+
/* @__PURE__ */ jsx24(
|
|
2950
2562
|
"path",
|
|
2951
2563
|
{
|
|
2952
2564
|
d: "M11.1953 4.41771C10.3478 4.08499 9.43578 3.94949 8.5282 4.02147C7.62062 4.09345 6.74133 4.37102 5.95691 4.83316C5.1725 5.2953 4.50354 5.92989 4.00071 6.68886C3.49788 7.44783 3.17436 8.31128 3.05465 9.2138C2.93495 10.1163 3.0222 11.0343 3.3098 11.8981C3.5974 12.7619 4.07781 13.5489 4.71463 14.1995C5.10094 14.5942 5.09414 15.2274 4.69945 15.6137C4.30476 16 3.67163 15.9932 3.28532 15.5985C2.43622 14.731 1.79568 13.6816 1.41221 12.5299C1.02875 11.3781 0.91241 10.1542 1.07201 8.95084C1.23162 7.74748 1.66298 6.59621 2.33343 5.58425C3.00387 4.57229 3.89581 3.72617 4.9417 3.10998C5.98758 2.4938 7.15998 2.1237 8.37008 2.02773C9.58018 1.93176 10.7963 2.11243 11.9262 2.55605C13.0561 2.99968 14.0703 3.69462 14.8919 4.58825C15.5423 5.29573 16.0585 6.11304 16.4177 7.00002H17.4999C18.6799 6.99991 19.8288 7.37933 20.7766 8.08222C21.7245 8.78515 22.4212 9.7743 22.7637 10.9036C23.1062 12.0328 23.0765 13.2423 22.6788 14.3534C22.2812 15.4644 21.5367 16.4181 20.5554 17.0736C20.0962 17.3803 19.4752 17.2567 19.1684 16.7975C18.8617 16.3382 18.9853 15.7172 19.4445 15.4105C20.069 14.9934 20.5427 14.3865 20.7958 13.6794C21.0488 12.9724 21.0678 12.2027 20.8498 11.4841C20.6318 10.7655 20.1885 10.136 19.5853 9.6887C18.9821 9.24138 18.251 8.99993 17.5001 9.00002H15.71C15.2679 9.00002 14.8783 8.70973 14.7518 8.28611C14.4913 7.41374 14.0357 6.61208 13.4195 5.94186C12.8034 5.27164 12.0427 4.75043 11.1953 4.41771Z",
|
|
2953
2565
|
fill: "currentColor"
|
|
2954
2566
|
}
|
|
2955
2567
|
),
|
|
2956
|
-
/* @__PURE__ */
|
|
2568
|
+
/* @__PURE__ */ jsx24(
|
|
2957
2569
|
"path",
|
|
2958
2570
|
{
|
|
2959
2571
|
d: "M11 14.4142V21C11 21.5523 11.4477 22 12 22C12.5523 22 13 21.5523 13 21V14.4142L15.2929 16.7071C15.6834 17.0976 16.3166 17.0976 16.7071 16.7071C17.0976 16.3166 17.0976 15.6834 16.7071 15.2929L12.7078 11.2936C12.7054 11.2912 12.703 11.2888 12.7005 11.2864C12.5208 11.1099 12.2746 11.0008 12.003 11L12 11L11.997 11C11.8625 11.0004 11.7343 11.0273 11.6172 11.0759C11.502 11.1236 11.3938 11.1937 11.2995 11.2864C11.297 11.2888 11.2946 11.2912 11.2922 11.2936L7.29289 15.2929C6.90237 15.6834 6.90237 16.3166 7.29289 16.7071C7.68342 17.0976 8.31658 17.0976 8.70711 16.7071L11 14.4142Z",
|
|
@@ -2963,7 +2575,7 @@ var CloudUploadIcon = () => /* @__PURE__ */ jsxs11(
|
|
|
2963
2575
|
]
|
|
2964
2576
|
}
|
|
2965
2577
|
);
|
|
2966
|
-
var FileIcon = () => /* @__PURE__ */
|
|
2578
|
+
var FileIcon = () => /* @__PURE__ */ jsx24(
|
|
2967
2579
|
"svg",
|
|
2968
2580
|
{
|
|
2969
2581
|
width: "43",
|
|
@@ -2972,7 +2584,7 @@ var FileIcon = () => /* @__PURE__ */ jsx25(
|
|
|
2972
2584
|
fill: "currentColor",
|
|
2973
2585
|
className: "tiptap-image-upload-dropzone-rect-primary",
|
|
2974
2586
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2975
|
-
children: /* @__PURE__ */
|
|
2587
|
+
children: /* @__PURE__ */ jsx24(
|
|
2976
2588
|
"path",
|
|
2977
2589
|
{
|
|
2978
2590
|
d: "M0.75 10.75C0.75 5.64137 4.89137 1.5 10 1.5H32.3431C33.2051 1.5 34.0317 1.84241 34.6412 2.4519L40.2981 8.10876C40.9076 8.71825 41.25 9.5449 41.25 10.4069V46.75C41.25 51.8586 37.1086 56 32 56H10C4.89137 56 0.75 51.8586 0.75 46.75V10.75Z",
|
|
@@ -2984,7 +2596,7 @@ var FileIcon = () => /* @__PURE__ */ jsx25(
|
|
|
2984
2596
|
)
|
|
2985
2597
|
}
|
|
2986
2598
|
);
|
|
2987
|
-
var FileCornerIcon = () => /* @__PURE__ */
|
|
2599
|
+
var FileCornerIcon = () => /* @__PURE__ */ jsx24(
|
|
2988
2600
|
"svg",
|
|
2989
2601
|
{
|
|
2990
2602
|
width: "10",
|
|
@@ -2993,7 +2605,7 @@ var FileCornerIcon = () => /* @__PURE__ */ jsx25(
|
|
|
2993
2605
|
viewBox: "0 0 10 10",
|
|
2994
2606
|
fill: "currentColor",
|
|
2995
2607
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2996
|
-
children: /* @__PURE__ */
|
|
2608
|
+
children: /* @__PURE__ */ jsx24(
|
|
2997
2609
|
"path",
|
|
2998
2610
|
{
|
|
2999
2611
|
d: "M0 0.75H0.343146C1.40401 0.75 2.42143 1.17143 3.17157 1.92157L8.82843 7.57843C9.57857 8.32857 10 9.34599 10 10.4069V10.75H4C1.79086 10.75 0 8.95914 0 6.75V0.75Z",
|
|
@@ -3036,7 +2648,7 @@ var ImageUploadDragArea = ({
|
|
|
3036
2648
|
onFile(files);
|
|
3037
2649
|
}
|
|
3038
2650
|
};
|
|
3039
|
-
return /* @__PURE__ */
|
|
2651
|
+
return /* @__PURE__ */ jsx24(
|
|
3040
2652
|
"div",
|
|
3041
2653
|
{
|
|
3042
2654
|
className: `tiptap-image-upload-drag-area ${isDragActive ? "drag-active" : ""} ${isDragOver ? "drag-over" : ""}`,
|
|
@@ -3060,7 +2672,7 @@ var ImageUploadPreview = ({
|
|
|
3060
2672
|
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(2))} ${sizes[i]}`;
|
|
3061
2673
|
};
|
|
3062
2674
|
return /* @__PURE__ */ jsxs11("div", { className: "tiptap-image-upload-preview", children: [
|
|
3063
|
-
fileItem.status === "uploading" && /* @__PURE__ */
|
|
2675
|
+
fileItem.status === "uploading" && /* @__PURE__ */ jsx24(
|
|
3064
2676
|
"div",
|
|
3065
2677
|
{
|
|
3066
2678
|
className: "tiptap-image-upload-progress",
|
|
@@ -3069,10 +2681,10 @@ var ImageUploadPreview = ({
|
|
|
3069
2681
|
),
|
|
3070
2682
|
/* @__PURE__ */ jsxs11("div", { className: "tiptap-image-upload-preview-content", children: [
|
|
3071
2683
|
/* @__PURE__ */ jsxs11("div", { className: "tiptap-image-upload-file-info", children: [
|
|
3072
|
-
/* @__PURE__ */
|
|
2684
|
+
/* @__PURE__ */ jsx24("div", { className: "tiptap-image-upload-file-icon", children: /* @__PURE__ */ jsx24(CloudUploadIcon, {}) }),
|
|
3073
2685
|
/* @__PURE__ */ jsxs11("div", { className: "tiptap-image-upload-details", children: [
|
|
3074
|
-
/* @__PURE__ */
|
|
3075
|
-
/* @__PURE__ */
|
|
2686
|
+
/* @__PURE__ */ jsx24("span", { className: "tiptap-image-upload-text", children: fileItem.file.name }),
|
|
2687
|
+
/* @__PURE__ */ jsx24("span", { className: "tiptap-image-upload-subtext", children: formatFileSize(fileItem.file.size) })
|
|
3076
2688
|
] })
|
|
3077
2689
|
] }),
|
|
3078
2690
|
/* @__PURE__ */ jsxs11("div", { className: "tiptap-image-upload-actions", children: [
|
|
@@ -3080,7 +2692,7 @@ var ImageUploadPreview = ({
|
|
|
3080
2692
|
fileItem.progress,
|
|
3081
2693
|
"%"
|
|
3082
2694
|
] }),
|
|
3083
|
-
/* @__PURE__ */
|
|
2695
|
+
/* @__PURE__ */ jsx24(
|
|
3084
2696
|
Button2,
|
|
3085
2697
|
{
|
|
3086
2698
|
type: "button",
|
|
@@ -3089,7 +2701,7 @@ var ImageUploadPreview = ({
|
|
|
3089
2701
|
e.stopPropagation();
|
|
3090
2702
|
onRemove();
|
|
3091
2703
|
},
|
|
3092
|
-
children: /* @__PURE__ */
|
|
2704
|
+
children: /* @__PURE__ */ jsx24(CloseIcon, { className: "tiptap-button-icon" })
|
|
3093
2705
|
}
|
|
3094
2706
|
)
|
|
3095
2707
|
] })
|
|
@@ -3101,13 +2713,13 @@ var DropZoneContent = ({
|
|
|
3101
2713
|
limit
|
|
3102
2714
|
}) => /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
3103
2715
|
/* @__PURE__ */ jsxs11("div", { className: "tiptap-image-upload-dropzone", children: [
|
|
3104
|
-
/* @__PURE__ */
|
|
3105
|
-
/* @__PURE__ */
|
|
3106
|
-
/* @__PURE__ */
|
|
2716
|
+
/* @__PURE__ */ jsx24(FileIcon, {}),
|
|
2717
|
+
/* @__PURE__ */ jsx24(FileCornerIcon, {}),
|
|
2718
|
+
/* @__PURE__ */ jsx24("div", { className: "tiptap-image-upload-icon-container", children: /* @__PURE__ */ jsx24(CloudUploadIcon, {}) })
|
|
3107
2719
|
] }),
|
|
3108
2720
|
/* @__PURE__ */ jsxs11("div", { className: "tiptap-image-upload-content", children: [
|
|
3109
2721
|
/* @__PURE__ */ jsxs11("span", { className: "tiptap-image-upload-text", children: [
|
|
3110
|
-
/* @__PURE__ */
|
|
2722
|
+
/* @__PURE__ */ jsx24("em", { children: "Click to upload" }),
|
|
3111
2723
|
" or drag and drop"
|
|
3112
2724
|
] }),
|
|
3113
2725
|
/* @__PURE__ */ jsxs11("span", { className: "tiptap-image-upload-subtext", children: [
|
|
@@ -3178,7 +2790,7 @@ var ImageUploadNode = (props) => {
|
|
|
3178
2790
|
tabIndex: 0,
|
|
3179
2791
|
onClick: handleClick,
|
|
3180
2792
|
children: [
|
|
3181
|
-
!hasFiles && /* @__PURE__ */
|
|
2793
|
+
!hasFiles && /* @__PURE__ */ jsx24(ImageUploadDragArea, { onFile: handleUpload, children: /* @__PURE__ */ jsx24(DropZoneContent, { maxSize, limit }) }),
|
|
3182
2794
|
hasFiles && /* @__PURE__ */ jsxs11("div", { className: "tiptap-image-upload-previews", children: [
|
|
3183
2795
|
fileItems.length > 1 && /* @__PURE__ */ jsxs11("div", { className: "tiptap-image-upload-header", children: [
|
|
3184
2796
|
/* @__PURE__ */ jsxs11("span", { children: [
|
|
@@ -3186,7 +2798,7 @@ var ImageUploadNode = (props) => {
|
|
|
3186
2798
|
fileItems.length,
|
|
3187
2799
|
" files"
|
|
3188
2800
|
] }),
|
|
3189
|
-
/* @__PURE__ */
|
|
2801
|
+
/* @__PURE__ */ jsx24(
|
|
3190
2802
|
Button2,
|
|
3191
2803
|
{
|
|
3192
2804
|
type: "button",
|
|
@@ -3199,7 +2811,7 @@ var ImageUploadNode = (props) => {
|
|
|
3199
2811
|
}
|
|
3200
2812
|
)
|
|
3201
2813
|
] }),
|
|
3202
|
-
fileItems.map((fileItem) => /* @__PURE__ */
|
|
2814
|
+
fileItems.map((fileItem) => /* @__PURE__ */ jsx24(
|
|
3203
2815
|
ImageUploadPreview,
|
|
3204
2816
|
{
|
|
3205
2817
|
fileItem,
|
|
@@ -3208,7 +2820,7 @@ var ImageUploadNode = (props) => {
|
|
|
3208
2820
|
fileItem.id
|
|
3209
2821
|
))
|
|
3210
2822
|
] }),
|
|
3211
|
-
/* @__PURE__ */
|
|
2823
|
+
/* @__PURE__ */ jsx24(
|
|
3212
2824
|
"input",
|
|
3213
2825
|
{
|
|
3214
2826
|
ref: inputRef,
|
|
@@ -3226,7 +2838,7 @@ var ImageUploadNode = (props) => {
|
|
|
3226
2838
|
};
|
|
3227
2839
|
|
|
3228
2840
|
// src/components/tiptap-node/image-upload-node/image-upload-node-extension.ts
|
|
3229
|
-
var ImageUploadNode2 =
|
|
2841
|
+
var ImageUploadNode2 = Node4.create({
|
|
3230
2842
|
name: "imageUpload",
|
|
3231
2843
|
group: "block",
|
|
3232
2844
|
draggable: true,
|
|
@@ -3263,7 +2875,7 @@ var ImageUploadNode2 = Node6.create({
|
|
|
3263
2875
|
renderHTML({ HTMLAttributes }) {
|
|
3264
2876
|
return [
|
|
3265
2877
|
"div",
|
|
3266
|
-
|
|
2878
|
+
mergeAttributes2({ "data-type": "image-upload" }, HTMLAttributes)
|
|
3267
2879
|
];
|
|
3268
2880
|
},
|
|
3269
2881
|
addNodeView() {
|
|
@@ -3304,13 +2916,13 @@ var ImageUploadNode2 = Node6.create({
|
|
|
3304
2916
|
});
|
|
3305
2917
|
|
|
3306
2918
|
// src/components/tiptap-node/horizontal-rule-node/horizontal-rule-node-extension.ts
|
|
3307
|
-
import { mergeAttributes as
|
|
2919
|
+
import { mergeAttributes as mergeAttributes3 } from "@tiptap/react";
|
|
3308
2920
|
import TiptapHorizontalRule from "@tiptap/extension-horizontal-rule";
|
|
3309
2921
|
var HorizontalRule = TiptapHorizontalRule.extend({
|
|
3310
2922
|
renderHTML() {
|
|
3311
2923
|
return [
|
|
3312
2924
|
"div",
|
|
3313
|
-
|
|
2925
|
+
mergeAttributes3(this.options.HTMLAttributes, { "data-type": this.name }),
|
|
3314
2926
|
["hr"]
|
|
3315
2927
|
];
|
|
3316
2928
|
}
|
|
@@ -3321,9 +2933,9 @@ import { forwardRef as forwardRef9, useCallback as useCallback10, useState as us
|
|
|
3321
2933
|
|
|
3322
2934
|
// src/components/tiptap-icons/chevron-down-icon.tsx
|
|
3323
2935
|
import { memo as memo7 } from "react";
|
|
3324
|
-
import { jsx as
|
|
2936
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
3325
2937
|
var ChevronDownIcon = memo7(({ className, ...props }) => {
|
|
3326
|
-
return /* @__PURE__ */
|
|
2938
|
+
return /* @__PURE__ */ jsx25(
|
|
3327
2939
|
"svg",
|
|
3328
2940
|
{
|
|
3329
2941
|
width: "24",
|
|
@@ -3333,7 +2945,7 @@ var ChevronDownIcon = memo7(({ className, ...props }) => {
|
|
|
3333
2945
|
fill: "currentColor",
|
|
3334
2946
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3335
2947
|
...props,
|
|
3336
|
-
children: /* @__PURE__ */
|
|
2948
|
+
children: /* @__PURE__ */ jsx25(
|
|
3337
2949
|
"path",
|
|
3338
2950
|
{
|
|
3339
2951
|
fillRule: "evenodd",
|
|
@@ -3381,7 +2993,7 @@ import { forwardRef as forwardRef6, useCallback as useCallback8 } from "react";
|
|
|
3381
2993
|
|
|
3382
2994
|
// src/components/tiptap-ui-primitive/badge/badge.tsx
|
|
3383
2995
|
import { forwardRef as forwardRef5 } from "react";
|
|
3384
|
-
import { jsx as
|
|
2996
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
3385
2997
|
var Badge = forwardRef5(
|
|
3386
2998
|
({
|
|
3387
2999
|
variant,
|
|
@@ -3392,7 +3004,7 @@ var Badge = forwardRef5(
|
|
|
3392
3004
|
children,
|
|
3393
3005
|
...props
|
|
3394
3006
|
}, ref) => {
|
|
3395
|
-
return /* @__PURE__ */
|
|
3007
|
+
return /* @__PURE__ */ jsx26(
|
|
3396
3008
|
"div",
|
|
3397
3009
|
{
|
|
3398
3010
|
ref,
|
|
@@ -3410,12 +3022,12 @@ var Badge = forwardRef5(
|
|
|
3410
3022
|
Badge.displayName = "Badge";
|
|
3411
3023
|
|
|
3412
3024
|
// src/components/tiptap-ui/heading-button/heading-button.tsx
|
|
3413
|
-
import { Fragment as Fragment4, jsx as
|
|
3025
|
+
import { Fragment as Fragment4, jsx as jsx27, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3414
3026
|
function HeadingShortcutBadge({
|
|
3415
3027
|
level,
|
|
3416
3028
|
shortcutKeys = HEADING_SHORTCUT_KEYS[level]
|
|
3417
3029
|
}) {
|
|
3418
|
-
return /* @__PURE__ */
|
|
3030
|
+
return /* @__PURE__ */ jsx27(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
|
|
3419
3031
|
}
|
|
3420
3032
|
var HeadingButton = forwardRef6(
|
|
3421
3033
|
({
|
|
@@ -3455,7 +3067,7 @@ var HeadingButton = forwardRef6(
|
|
|
3455
3067
|
if (!isVisible) {
|
|
3456
3068
|
return null;
|
|
3457
3069
|
}
|
|
3458
|
-
return /* @__PURE__ */
|
|
3070
|
+
return /* @__PURE__ */ jsx27(
|
|
3459
3071
|
Button2,
|
|
3460
3072
|
{
|
|
3461
3073
|
type: "button",
|
|
@@ -3472,9 +3084,9 @@ var HeadingButton = forwardRef6(
|
|
|
3472
3084
|
...buttonProps,
|
|
3473
3085
|
ref,
|
|
3474
3086
|
children: children ?? /* @__PURE__ */ jsxs12(Fragment4, { children: [
|
|
3475
|
-
/* @__PURE__ */
|
|
3476
|
-
text && /* @__PURE__ */
|
|
3477
|
-
showShortcut && /* @__PURE__ */
|
|
3087
|
+
/* @__PURE__ */ jsx27(Icon, { className: "tiptap-button-icon" }),
|
|
3088
|
+
text && /* @__PURE__ */ jsx27("span", { className: "tiptap-button-text", children: text }),
|
|
3089
|
+
showShortcut && /* @__PURE__ */ jsx27(HeadingShortcutBadge, { level, shortcutKeys })
|
|
3478
3090
|
] })
|
|
3479
3091
|
}
|
|
3480
3092
|
);
|
|
@@ -3484,11 +3096,11 @@ HeadingButton.displayName = "HeadingButton";
|
|
|
3484
3096
|
|
|
3485
3097
|
// src/components/tiptap-ui/heading-button/use-heading.ts
|
|
3486
3098
|
import { useCallback as useCallback9, useEffect as useEffect5, useState as useState12 } from "react";
|
|
3487
|
-
import { NodeSelection as NodeSelection2, TextSelection as
|
|
3099
|
+
import { NodeSelection as NodeSelection2, TextSelection as TextSelection2 } from "@tiptap/pm/state";
|
|
3488
3100
|
|
|
3489
3101
|
// src/components/tiptap-icons/heading-one-icon.tsx
|
|
3490
3102
|
import { memo as memo8 } from "react";
|
|
3491
|
-
import { jsx as
|
|
3103
|
+
import { jsx as jsx28, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3492
3104
|
var HeadingOneIcon = memo8(({ className, ...props }) => {
|
|
3493
3105
|
return /* @__PURE__ */ jsxs13(
|
|
3494
3106
|
"svg",
|
|
@@ -3501,14 +3113,14 @@ var HeadingOneIcon = memo8(({ className, ...props }) => {
|
|
|
3501
3113
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3502
3114
|
...props,
|
|
3503
3115
|
children: [
|
|
3504
|
-
/* @__PURE__ */
|
|
3116
|
+
/* @__PURE__ */ jsx28(
|
|
3505
3117
|
"path",
|
|
3506
3118
|
{
|
|
3507
3119
|
d: "M5 6C5 5.44772 4.55228 5 4 5C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19C4.55228 19 5 18.5523 5 18V13H11V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V6C13 5.44772 12.5523 5 12 5C11.4477 5 11 5.44772 11 6V11H5V6Z",
|
|
3508
3120
|
fill: "currentColor"
|
|
3509
3121
|
}
|
|
3510
3122
|
),
|
|
3511
|
-
/* @__PURE__ */
|
|
3123
|
+
/* @__PURE__ */ jsx28(
|
|
3512
3124
|
"path",
|
|
3513
3125
|
{
|
|
3514
3126
|
d: "M21.0001 10C21.0001 9.63121 20.7971 9.29235 20.472 9.11833C20.1468 8.94431 19.7523 8.96338 19.4454 9.16795L16.4454 11.168C15.9859 11.4743 15.8617 12.0952 16.1681 12.5547C16.4744 13.0142 17.0953 13.1384 17.5548 12.8321L19.0001 11.8685V18C19.0001 18.5523 19.4478 19 20.0001 19C20.5524 19 21.0001 18.5523 21.0001 18V10Z",
|
|
@@ -3523,7 +3135,7 @@ HeadingOneIcon.displayName = "HeadingOneIcon";
|
|
|
3523
3135
|
|
|
3524
3136
|
// src/components/tiptap-icons/heading-two-icon.tsx
|
|
3525
3137
|
import { memo as memo9 } from "react";
|
|
3526
|
-
import { jsx as
|
|
3138
|
+
import { jsx as jsx29, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3527
3139
|
var HeadingTwoIcon = memo9(({ className, ...props }) => {
|
|
3528
3140
|
return /* @__PURE__ */ jsxs14(
|
|
3529
3141
|
"svg",
|
|
@@ -3536,14 +3148,14 @@ var HeadingTwoIcon = memo9(({ className, ...props }) => {
|
|
|
3536
3148
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3537
3149
|
...props,
|
|
3538
3150
|
children: [
|
|
3539
|
-
/* @__PURE__ */
|
|
3151
|
+
/* @__PURE__ */ jsx29(
|
|
3540
3152
|
"path",
|
|
3541
3153
|
{
|
|
3542
3154
|
d: "M5 6C5 5.44772 4.55228 5 4 5C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19C4.55228 19 5 18.5523 5 18V13H11V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V6C13 5.44772 12.5523 5 12 5C11.4477 5 11 5.44772 11 6V11H5V6Z",
|
|
3543
3155
|
fill: "currentColor"
|
|
3544
3156
|
}
|
|
3545
3157
|
),
|
|
3546
|
-
/* @__PURE__ */
|
|
3158
|
+
/* @__PURE__ */ jsx29(
|
|
3547
3159
|
"path",
|
|
3548
3160
|
{
|
|
3549
3161
|
d: "M22.0001 12C22.0001 10.7611 21.1663 9.79297 20.0663 9.42632C18.9547 9.05578 17.6171 9.28724 16.4001 10.2C15.9582 10.5314 15.8687 11.1582 16.2001 11.6C16.5314 12.0418 17.1582 12.1314 17.6001 11.8C18.383 11.2128 19.0455 11.1942 19.4338 11.3237C19.8339 11.457 20.0001 11.7389 20.0001 12C20.0001 12.4839 19.8554 12.7379 19.6537 12.9481C19.4275 13.1837 19.1378 13.363 18.7055 13.6307C18.6313 13.6767 18.553 13.7252 18.4701 13.777C17.9572 14.0975 17.3128 14.5261 16.8163 15.2087C16.3007 15.9177 16.0001 16.8183 16.0001 18C16.0001 18.5523 16.4478 19 17.0001 19H21.0001C21.5523 19 22.0001 18.5523 22.0001 18C22.0001 17.4477 21.5523 17 21.0001 17H18.131C18.21 16.742 18.3176 16.5448 18.4338 16.385C18.6873 16.0364 19.0429 15.7775 19.5301 15.473C19.5898 15.4357 19.6536 15.3966 19.7205 15.3556C20.139 15.0992 20.6783 14.7687 21.0964 14.3332C21.6447 13.7621 22.0001 13.0161 22.0001 12Z",
|
|
@@ -3558,7 +3170,7 @@ HeadingTwoIcon.displayName = "HeadingTwoIcon";
|
|
|
3558
3170
|
|
|
3559
3171
|
// src/components/tiptap-icons/heading-three-icon.tsx
|
|
3560
3172
|
import { memo as memo10 } from "react";
|
|
3561
|
-
import { jsx as
|
|
3173
|
+
import { jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3562
3174
|
var HeadingThreeIcon = memo10(({ className, ...props }) => {
|
|
3563
3175
|
return /* @__PURE__ */ jsxs15(
|
|
3564
3176
|
"svg",
|
|
@@ -3571,14 +3183,14 @@ var HeadingThreeIcon = memo10(({ className, ...props }) => {
|
|
|
3571
3183
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3572
3184
|
...props,
|
|
3573
3185
|
children: [
|
|
3574
|
-
/* @__PURE__ */
|
|
3186
|
+
/* @__PURE__ */ jsx30(
|
|
3575
3187
|
"path",
|
|
3576
3188
|
{
|
|
3577
3189
|
d: "M4 5C4.55228 5 5 5.44772 5 6V11H11V6C11 5.44772 11.4477 5 12 5C12.5523 5 13 5.44772 13 6V18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18V13H5V18C5 18.5523 4.55228 19 4 19C3.44772 19 3 18.5523 3 18V6C3 5.44772 3.44772 5 4 5Z",
|
|
3578
3190
|
fill: "currentColor"
|
|
3579
3191
|
}
|
|
3580
3192
|
),
|
|
3581
|
-
/* @__PURE__ */
|
|
3193
|
+
/* @__PURE__ */ jsx30(
|
|
3582
3194
|
"path",
|
|
3583
3195
|
{
|
|
3584
3196
|
fillRule: "evenodd",
|
|
@@ -3587,7 +3199,7 @@ var HeadingThreeIcon = memo10(({ className, ...props }) => {
|
|
|
3587
3199
|
fill: "currentColor"
|
|
3588
3200
|
}
|
|
3589
3201
|
),
|
|
3590
|
-
/* @__PURE__ */
|
|
3202
|
+
/* @__PURE__ */ jsx30(
|
|
3591
3203
|
"path",
|
|
3592
3204
|
{
|
|
3593
3205
|
fillRule: "evenodd",
|
|
@@ -3604,7 +3216,7 @@ HeadingThreeIcon.displayName = "HeadingThreeIcon";
|
|
|
3604
3216
|
|
|
3605
3217
|
// src/components/tiptap-icons/heading-four-icon.tsx
|
|
3606
3218
|
import { memo as memo11 } from "react";
|
|
3607
|
-
import { jsx as
|
|
3219
|
+
import { jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3608
3220
|
var HeadingFourIcon = memo11(({ className, ...props }) => {
|
|
3609
3221
|
return /* @__PURE__ */ jsxs16(
|
|
3610
3222
|
"svg",
|
|
@@ -3617,14 +3229,14 @@ var HeadingFourIcon = memo11(({ className, ...props }) => {
|
|
|
3617
3229
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3618
3230
|
...props,
|
|
3619
3231
|
children: [
|
|
3620
|
-
/* @__PURE__ */
|
|
3232
|
+
/* @__PURE__ */ jsx31(
|
|
3621
3233
|
"path",
|
|
3622
3234
|
{
|
|
3623
3235
|
d: "M4 5C4.55228 5 5 5.44772 5 6V11H11V6C11 5.44772 11.4477 5 12 5C12.5523 5 13 5.44772 13 6V18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18V13H5V18C5 18.5523 4.55228 19 4 19C3.44772 19 3 18.5523 3 18V6C3 5.44772 3.44772 5 4 5Z",
|
|
3624
3236
|
fill: "currentColor"
|
|
3625
3237
|
}
|
|
3626
3238
|
),
|
|
3627
|
-
/* @__PURE__ */
|
|
3239
|
+
/* @__PURE__ */ jsx31(
|
|
3628
3240
|
"path",
|
|
3629
3241
|
{
|
|
3630
3242
|
d: "M17 9C17.5523 9 18 9.44772 18 10V13H20V10C20 9.44772 20.4477 9 21 9C21.5523 9 22 9.44772 22 10V18C22 18.5523 21.5523 19 21 19C20.4477 19 20 18.5523 20 18V15H17C16.4477 15 16 14.5523 16 14V10C16 9.44772 16.4477 9 17 9Z",
|
|
@@ -3639,7 +3251,7 @@ HeadingFourIcon.displayName = "HeadingFourIcon";
|
|
|
3639
3251
|
|
|
3640
3252
|
// src/components/tiptap-icons/heading-five-icon.tsx
|
|
3641
3253
|
import { memo as memo12 } from "react";
|
|
3642
|
-
import { jsx as
|
|
3254
|
+
import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3643
3255
|
var HeadingFiveIcon = memo12(({ className, ...props }) => {
|
|
3644
3256
|
return /* @__PURE__ */ jsxs17(
|
|
3645
3257
|
"svg",
|
|
@@ -3652,14 +3264,14 @@ var HeadingFiveIcon = memo12(({ className, ...props }) => {
|
|
|
3652
3264
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3653
3265
|
...props,
|
|
3654
3266
|
children: [
|
|
3655
|
-
/* @__PURE__ */
|
|
3267
|
+
/* @__PURE__ */ jsx32(
|
|
3656
3268
|
"path",
|
|
3657
3269
|
{
|
|
3658
3270
|
d: "M5 6C5 5.44772 4.55228 5 4 5C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19C4.55228 19 5 18.5523 5 18V13H11V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V6C13 5.44772 12.5523 5 12 5C11.4477 5 11 5.44772 11 6V11H5V6Z",
|
|
3659
3271
|
fill: "currentColor"
|
|
3660
3272
|
}
|
|
3661
3273
|
),
|
|
3662
|
-
/* @__PURE__ */
|
|
3274
|
+
/* @__PURE__ */ jsx32(
|
|
3663
3275
|
"path",
|
|
3664
3276
|
{
|
|
3665
3277
|
d: "M16 10C16 9.44772 16.4477 9 17 9H21C21.5523 9 22 9.44772 22 10C22 10.5523 21.5523 11 21 11H18V12H18.3C20.2754 12 22 13.4739 22 15.5C22 17.5261 20.2754 19 18.3 19C17.6457 19 17.0925 18.8643 16.5528 18.5944C16.0588 18.3474 15.8586 17.7468 16.1055 17.2528C16.3525 16.7588 16.9532 16.5586 17.4472 16.8056C17.7074 16.9357 17.9542 17 18.3 17C19.3246 17 20 16.2739 20 15.5C20 14.7261 19.3246 14 18.3 14H17C16.4477 14 16 13.5523 16 13L16 12.9928V10Z",
|
|
@@ -3674,7 +3286,7 @@ HeadingFiveIcon.displayName = "HeadingFiveIcon";
|
|
|
3674
3286
|
|
|
3675
3287
|
// src/components/tiptap-icons/heading-six-icon.tsx
|
|
3676
3288
|
import { memo as memo13 } from "react";
|
|
3677
|
-
import { jsx as
|
|
3289
|
+
import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3678
3290
|
var HeadingSixIcon = memo13(({ className, ...props }) => {
|
|
3679
3291
|
return /* @__PURE__ */ jsxs18(
|
|
3680
3292
|
"svg",
|
|
@@ -3687,14 +3299,14 @@ var HeadingSixIcon = memo13(({ className, ...props }) => {
|
|
|
3687
3299
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3688
3300
|
...props,
|
|
3689
3301
|
children: [
|
|
3690
|
-
/* @__PURE__ */
|
|
3302
|
+
/* @__PURE__ */ jsx33(
|
|
3691
3303
|
"path",
|
|
3692
3304
|
{
|
|
3693
3305
|
d: "M5 6C5 5.44772 4.55228 5 4 5C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19C4.55228 19 5 18.5523 5 18V13H11V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V6C13 5.44772 12.5523 5 12 5C11.4477 5 11 5.44772 11 6V11H5V6Z",
|
|
3694
3306
|
fill: "currentColor"
|
|
3695
3307
|
}
|
|
3696
3308
|
),
|
|
3697
|
-
/* @__PURE__ */
|
|
3309
|
+
/* @__PURE__ */ jsx33(
|
|
3698
3310
|
"path",
|
|
3699
3311
|
{
|
|
3700
3312
|
fillRule: "evenodd",
|
|
@@ -3761,7 +3373,7 @@ function toggleHeading(editor, level) {
|
|
|
3761
3373
|
const view = editor.view;
|
|
3762
3374
|
let state = view.state;
|
|
3763
3375
|
let tr = state.tr;
|
|
3764
|
-
if (state.selection.empty || state.selection instanceof
|
|
3376
|
+
if (state.selection.empty || state.selection instanceof TextSelection2) {
|
|
3765
3377
|
const pos = findNodePosition({
|
|
3766
3378
|
editor,
|
|
3767
3379
|
node: state.selection.$anchor.node(1)
|
|
@@ -3780,7 +3392,7 @@ function toggleHeading(editor, level) {
|
|
|
3780
3392
|
const to = lastChild ? selection.to - lastChild.nodeSize : selection.to - 1;
|
|
3781
3393
|
const resolvedFrom = state.doc.resolve(from);
|
|
3782
3394
|
const resolvedTo = state.doc.resolve(to);
|
|
3783
|
-
chain = chain.setTextSelection(
|
|
3395
|
+
chain = chain.setTextSelection(TextSelection2.between(resolvedFrom, resolvedTo)).clearNodes();
|
|
3784
3396
|
}
|
|
3785
3397
|
const isActive = levels.some(
|
|
3786
3398
|
(l) => editor.isActive("heading", { level: l })
|
|
@@ -3849,22 +3461,22 @@ function useHeading(config) {
|
|
|
3849
3461
|
// src/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.tsx
|
|
3850
3462
|
import { forwardRef as forwardRef7 } from "react";
|
|
3851
3463
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3852
|
-
import { jsx as
|
|
3464
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
3853
3465
|
function DropdownMenu({
|
|
3854
3466
|
...props
|
|
3855
3467
|
}) {
|
|
3856
|
-
return /* @__PURE__ */
|
|
3468
|
+
return /* @__PURE__ */ jsx34(DropdownMenuPrimitive.Root, { modal: false, ...props });
|
|
3857
3469
|
}
|
|
3858
3470
|
function DropdownMenuPortal({
|
|
3859
3471
|
...props
|
|
3860
3472
|
}) {
|
|
3861
|
-
return /* @__PURE__ */
|
|
3473
|
+
return /* @__PURE__ */ jsx34(DropdownMenuPrimitive.Portal, { ...props });
|
|
3862
3474
|
}
|
|
3863
|
-
var DropdownMenuTrigger = forwardRef7(({ ...props }, ref) => /* @__PURE__ */
|
|
3475
|
+
var DropdownMenuTrigger = forwardRef7(({ ...props }, ref) => /* @__PURE__ */ jsx34(DropdownMenuPrimitive.Trigger, { ref, ...props }));
|
|
3864
3476
|
DropdownMenuTrigger.displayName = DropdownMenuPrimitive.Trigger.displayName;
|
|
3865
3477
|
var DropdownMenuItem = DropdownMenuPrimitive.Item;
|
|
3866
3478
|
var DropdownMenuSubContent = forwardRef7(({ className, portal = true, ...props }, ref) => {
|
|
3867
|
-
const content = /* @__PURE__ */
|
|
3479
|
+
const content = /* @__PURE__ */ jsx34(
|
|
3868
3480
|
DropdownMenuPrimitive.SubContent,
|
|
3869
3481
|
{
|
|
3870
3482
|
ref,
|
|
@@ -3872,11 +3484,11 @@ var DropdownMenuSubContent = forwardRef7(({ className, portal = true, ...props }
|
|
|
3872
3484
|
...props
|
|
3873
3485
|
}
|
|
3874
3486
|
);
|
|
3875
|
-
return portal ? /* @__PURE__ */
|
|
3487
|
+
return portal ? /* @__PURE__ */ jsx34(DropdownMenuPortal, { ...typeof portal === "object" ? portal : {}, children: content }) : content;
|
|
3876
3488
|
});
|
|
3877
3489
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
3878
3490
|
var DropdownMenuContent = forwardRef7(({ className, sideOffset = 4, portal = false, ...props }, ref) => {
|
|
3879
|
-
const content = /* @__PURE__ */
|
|
3491
|
+
const content = /* @__PURE__ */ jsx34(
|
|
3880
3492
|
DropdownMenuPrimitive.Content,
|
|
3881
3493
|
{
|
|
3882
3494
|
ref,
|
|
@@ -3886,22 +3498,22 @@ var DropdownMenuContent = forwardRef7(({ className, sideOffset = 4, portal = fal
|
|
|
3886
3498
|
...props
|
|
3887
3499
|
}
|
|
3888
3500
|
);
|
|
3889
|
-
return portal ? /* @__PURE__ */
|
|
3501
|
+
return portal ? /* @__PURE__ */ jsx34(DropdownMenuPortal, { ...typeof portal === "object" ? portal : {}, children: content }) : content;
|
|
3890
3502
|
});
|
|
3891
3503
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
3892
3504
|
|
|
3893
3505
|
// src/components/tiptap-ui-primitive/card/card.tsx
|
|
3894
3506
|
import { forwardRef as forwardRef8 } from "react";
|
|
3895
|
-
import { jsx as
|
|
3507
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
3896
3508
|
var Card = forwardRef8(
|
|
3897
3509
|
({ className, ...props }, ref) => {
|
|
3898
|
-
return /* @__PURE__ */
|
|
3510
|
+
return /* @__PURE__ */ jsx35("div", { ref, className: cn2("tiptap-card", className), ...props });
|
|
3899
3511
|
}
|
|
3900
3512
|
);
|
|
3901
3513
|
Card.displayName = "Card";
|
|
3902
3514
|
var CardHeader = forwardRef8(
|
|
3903
3515
|
({ className, ...props }, ref) => {
|
|
3904
|
-
return /* @__PURE__ */
|
|
3516
|
+
return /* @__PURE__ */ jsx35(
|
|
3905
3517
|
"div",
|
|
3906
3518
|
{
|
|
3907
3519
|
ref,
|
|
@@ -3914,12 +3526,12 @@ var CardHeader = forwardRef8(
|
|
|
3914
3526
|
CardHeader.displayName = "CardHeader";
|
|
3915
3527
|
var CardBody = forwardRef8(
|
|
3916
3528
|
({ className, ...props }, ref) => {
|
|
3917
|
-
return /* @__PURE__ */
|
|
3529
|
+
return /* @__PURE__ */ jsx35("div", { ref, className: cn2("tiptap-card-body", className), ...props });
|
|
3918
3530
|
}
|
|
3919
3531
|
);
|
|
3920
3532
|
CardBody.displayName = "CardBody";
|
|
3921
3533
|
var CardItemGroup = forwardRef8(({ className, orientation = "vertical", ...props }, ref) => {
|
|
3922
|
-
return /* @__PURE__ */
|
|
3534
|
+
return /* @__PURE__ */ jsx35(
|
|
3923
3535
|
"div",
|
|
3924
3536
|
{
|
|
3925
3537
|
ref,
|
|
@@ -3932,7 +3544,7 @@ var CardItemGroup = forwardRef8(({ className, orientation = "vertical", ...props
|
|
|
3932
3544
|
CardItemGroup.displayName = "CardItemGroup";
|
|
3933
3545
|
var CardGroupLabel = forwardRef8(
|
|
3934
3546
|
({ className, ...props }, ref) => {
|
|
3935
|
-
return /* @__PURE__ */
|
|
3547
|
+
return /* @__PURE__ */ jsx35(
|
|
3936
3548
|
"div",
|
|
3937
3549
|
{
|
|
3938
3550
|
ref,
|
|
@@ -3945,7 +3557,7 @@ var CardGroupLabel = forwardRef8(
|
|
|
3945
3557
|
CardGroupLabel.displayName = "CardGroupLabel";
|
|
3946
3558
|
var CardFooter = forwardRef8(
|
|
3947
3559
|
({ className, ...props }, ref) => {
|
|
3948
|
-
return /* @__PURE__ */
|
|
3560
|
+
return /* @__PURE__ */ jsx35(
|
|
3949
3561
|
"div",
|
|
3950
3562
|
{
|
|
3951
3563
|
ref,
|
|
@@ -3958,7 +3570,7 @@ var CardFooter = forwardRef8(
|
|
|
3958
3570
|
CardFooter.displayName = "CardFooter";
|
|
3959
3571
|
|
|
3960
3572
|
// src/components/tiptap-ui/heading-dropdown-menu/heading-dropdown-menu.tsx
|
|
3961
|
-
import { jsx as
|
|
3573
|
+
import { jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3962
3574
|
var HeadingDropdownMenu = forwardRef9(
|
|
3963
3575
|
({
|
|
3964
3576
|
editor: providedEditor,
|
|
@@ -3987,7 +3599,7 @@ var HeadingDropdownMenu = forwardRef9(
|
|
|
3987
3599
|
return null;
|
|
3988
3600
|
}
|
|
3989
3601
|
return /* @__PURE__ */ jsxs19(DropdownMenu, { modal: true, open: isOpen, onOpenChange: handleOpenChange, children: [
|
|
3990
|
-
/* @__PURE__ */
|
|
3602
|
+
/* @__PURE__ */ jsx36(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs19(
|
|
3991
3603
|
Button2,
|
|
3992
3604
|
{
|
|
3993
3605
|
type: "button",
|
|
@@ -4003,12 +3615,12 @@ var HeadingDropdownMenu = forwardRef9(
|
|
|
4003
3615
|
...buttonProps,
|
|
4004
3616
|
ref,
|
|
4005
3617
|
children: [
|
|
4006
|
-
/* @__PURE__ */
|
|
4007
|
-
/* @__PURE__ */
|
|
3618
|
+
/* @__PURE__ */ jsx36(Icon, { className: "tiptap-button-icon" }),
|
|
3619
|
+
/* @__PURE__ */ jsx36(ChevronDownIcon, { className: "tiptap-button-dropdown-small" })
|
|
4008
3620
|
]
|
|
4009
3621
|
}
|
|
4010
3622
|
) }),
|
|
4011
|
-
/* @__PURE__ */
|
|
3623
|
+
/* @__PURE__ */ jsx36(DropdownMenuContent, { align: "start", portal, children: /* @__PURE__ */ jsx36(Card, { children: /* @__PURE__ */ jsx36(CardBody, { children: /* @__PURE__ */ jsx36(ButtonGroup, { children: levels.map((level) => /* @__PURE__ */ jsx36(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsx36(
|
|
4012
3624
|
HeadingButton,
|
|
4013
3625
|
{
|
|
4014
3626
|
editor,
|
|
@@ -4027,9 +3639,9 @@ import { useEffect as useEffect6, useState as useState14 } from "react";
|
|
|
4027
3639
|
|
|
4028
3640
|
// src/components/tiptap-icons/heading-icon.tsx
|
|
4029
3641
|
import { memo as memo14 } from "react";
|
|
4030
|
-
import { jsx as
|
|
3642
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
4031
3643
|
var HeadingIcon = memo14(({ className, ...props }) => {
|
|
4032
|
-
return /* @__PURE__ */
|
|
3644
|
+
return /* @__PURE__ */ jsx37(
|
|
4033
3645
|
"svg",
|
|
4034
3646
|
{
|
|
4035
3647
|
width: "24",
|
|
@@ -4039,7 +3651,7 @@ var HeadingIcon = memo14(({ className, ...props }) => {
|
|
|
4039
3651
|
fill: "currentColor",
|
|
4040
3652
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4041
3653
|
...props,
|
|
4042
|
-
children: /* @__PURE__ */
|
|
3654
|
+
children: /* @__PURE__ */ jsx37(
|
|
4043
3655
|
"path",
|
|
4044
3656
|
{
|
|
4045
3657
|
d: "M6 3C6.55228 3 7 3.44772 7 4V11H17V4C17 3.44772 17.4477 3 18 3C18.5523 3 19 3.44772 19 4V20C19 20.5523 18.5523 21 18 21C17.4477 21 17 20.5523 17 20V13H7V20C7 20.5523 6.55228 21 6 21C5.44772 21 5 20.5523 5 20V4C5 3.44772 5.44772 3 6 3Z",
|
|
@@ -4093,11 +3705,11 @@ function useHeadingDropdownMenu(config) {
|
|
|
4093
3705
|
|
|
4094
3706
|
// src/components/tiptap-ui/image-upload-button/image-upload-button.tsx
|
|
4095
3707
|
import { forwardRef as forwardRef10, useCallback as useCallback11 } from "react";
|
|
4096
|
-
import { Fragment as Fragment5, jsx as
|
|
3708
|
+
import { Fragment as Fragment5, jsx as jsx38, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4097
3709
|
function ImageShortcutBadge({
|
|
4098
3710
|
shortcutKeys = IMAGE_UPLOAD_SHORTCUT_KEY
|
|
4099
3711
|
}) {
|
|
4100
|
-
return /* @__PURE__ */
|
|
3712
|
+
return /* @__PURE__ */ jsx38(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
|
|
4101
3713
|
}
|
|
4102
3714
|
var ImageUploadButton = forwardRef10(
|
|
4103
3715
|
({
|
|
@@ -4137,7 +3749,7 @@ var ImageUploadButton = forwardRef10(
|
|
|
4137
3749
|
return null;
|
|
4138
3750
|
}
|
|
4139
3751
|
const RenderIcon = CustomIcon ?? Icon;
|
|
4140
|
-
return /* @__PURE__ */
|
|
3752
|
+
return /* @__PURE__ */ jsx38(
|
|
4141
3753
|
Button2,
|
|
4142
3754
|
{
|
|
4143
3755
|
type: "button",
|
|
@@ -4154,9 +3766,9 @@ var ImageUploadButton = forwardRef10(
|
|
|
4154
3766
|
...buttonProps,
|
|
4155
3767
|
ref,
|
|
4156
3768
|
children: children ?? /* @__PURE__ */ jsxs20(Fragment5, { children: [
|
|
4157
|
-
/* @__PURE__ */
|
|
4158
|
-
text && /* @__PURE__ */
|
|
4159
|
-
showShortcut && /* @__PURE__ */
|
|
3769
|
+
/* @__PURE__ */ jsx38(RenderIcon, { className: "tiptap-button-icon" }),
|
|
3770
|
+
text && /* @__PURE__ */ jsx38("span", { className: "tiptap-button-text", children: text }),
|
|
3771
|
+
showShortcut && /* @__PURE__ */ jsx38(ImageShortcutBadge, { shortcutKeys })
|
|
4160
3772
|
] })
|
|
4161
3773
|
}
|
|
4162
3774
|
);
|
|
@@ -4185,9 +3797,9 @@ function useIsBreakpoint(mode = "max", breakpoint = 768) {
|
|
|
4185
3797
|
|
|
4186
3798
|
// src/components/tiptap-icons/image-plus-icon.tsx
|
|
4187
3799
|
import { memo as memo15 } from "react";
|
|
4188
|
-
import { jsx as
|
|
3800
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
4189
3801
|
var ImagePlusIcon = memo15(({ className, ...props }) => {
|
|
4190
|
-
return /* @__PURE__ */
|
|
3802
|
+
return /* @__PURE__ */ jsx39(
|
|
4191
3803
|
"svg",
|
|
4192
3804
|
{
|
|
4193
3805
|
width: "24",
|
|
@@ -4197,7 +3809,7 @@ var ImagePlusIcon = memo15(({ className, ...props }) => {
|
|
|
4197
3809
|
fill: "currentColor",
|
|
4198
3810
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4199
3811
|
...props,
|
|
4200
|
-
children: /* @__PURE__ */
|
|
3812
|
+
children: /* @__PURE__ */ jsx39(
|
|
4201
3813
|
"path",
|
|
4202
3814
|
{
|
|
4203
3815
|
fillRule: "evenodd",
|
|
@@ -4321,12 +3933,12 @@ import { useCallback as useCallback15, useState as useState19 } from "react";
|
|
|
4321
3933
|
|
|
4322
3934
|
// src/components/tiptap-ui/list-button/list-button.tsx
|
|
4323
3935
|
import { forwardRef as forwardRef11, useCallback as useCallback13 } from "react";
|
|
4324
|
-
import { Fragment as Fragment6, jsx as
|
|
3936
|
+
import { Fragment as Fragment6, jsx as jsx40, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4325
3937
|
function ListShortcutBadge({
|
|
4326
3938
|
type,
|
|
4327
3939
|
shortcutKeys = LIST_SHORTCUT_KEYS[type]
|
|
4328
3940
|
}) {
|
|
4329
|
-
return /* @__PURE__ */
|
|
3941
|
+
return /* @__PURE__ */ jsx40(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
|
|
4330
3942
|
}
|
|
4331
3943
|
var ListButton = forwardRef11(
|
|
4332
3944
|
({
|
|
@@ -4366,7 +3978,7 @@ var ListButton = forwardRef11(
|
|
|
4366
3978
|
if (!isVisible) {
|
|
4367
3979
|
return null;
|
|
4368
3980
|
}
|
|
4369
|
-
return /* @__PURE__ */
|
|
3981
|
+
return /* @__PURE__ */ jsx40(
|
|
4370
3982
|
Button2,
|
|
4371
3983
|
{
|
|
4372
3984
|
type: "button",
|
|
@@ -4383,9 +3995,9 @@ var ListButton = forwardRef11(
|
|
|
4383
3995
|
...buttonProps,
|
|
4384
3996
|
ref,
|
|
4385
3997
|
children: children ?? /* @__PURE__ */ jsxs21(Fragment6, { children: [
|
|
4386
|
-
/* @__PURE__ */
|
|
4387
|
-
text && /* @__PURE__ */
|
|
4388
|
-
showShortcut && /* @__PURE__ */
|
|
3998
|
+
/* @__PURE__ */ jsx40(Icon, { className: "tiptap-button-icon" }),
|
|
3999
|
+
text && /* @__PURE__ */ jsx40("span", { className: "tiptap-button-text", children: text }),
|
|
4000
|
+
showShortcut && /* @__PURE__ */ jsx40(ListShortcutBadge, { type, shortcutKeys })
|
|
4389
4001
|
] })
|
|
4390
4002
|
}
|
|
4391
4003
|
);
|
|
@@ -4395,11 +4007,11 @@ ListButton.displayName = "ListButton";
|
|
|
4395
4007
|
|
|
4396
4008
|
// src/components/tiptap-ui/list-button/use-list.ts
|
|
4397
4009
|
import { useCallback as useCallback14, useEffect as useEffect9, useState as useState17 } from "react";
|
|
4398
|
-
import { NodeSelection as NodeSelection3, TextSelection as
|
|
4010
|
+
import { NodeSelection as NodeSelection3, TextSelection as TextSelection3 } from "@tiptap/pm/state";
|
|
4399
4011
|
|
|
4400
4012
|
// src/components/tiptap-icons/list-icon.tsx
|
|
4401
4013
|
import { memo as memo16 } from "react";
|
|
4402
|
-
import { jsx as
|
|
4014
|
+
import { jsx as jsx41, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4403
4015
|
var ListIcon = memo16(({ className, ...props }) => {
|
|
4404
4016
|
return /* @__PURE__ */ jsxs22(
|
|
4405
4017
|
"svg",
|
|
@@ -4412,7 +4024,7 @@ var ListIcon = memo16(({ className, ...props }) => {
|
|
|
4412
4024
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4413
4025
|
...props,
|
|
4414
4026
|
children: [
|
|
4415
|
-
/* @__PURE__ */
|
|
4027
|
+
/* @__PURE__ */ jsx41(
|
|
4416
4028
|
"path",
|
|
4417
4029
|
{
|
|
4418
4030
|
fillRule: "evenodd",
|
|
@@ -4421,7 +4033,7 @@ var ListIcon = memo16(({ className, ...props }) => {
|
|
|
4421
4033
|
fill: "currentColor"
|
|
4422
4034
|
}
|
|
4423
4035
|
),
|
|
4424
|
-
/* @__PURE__ */
|
|
4036
|
+
/* @__PURE__ */ jsx41(
|
|
4425
4037
|
"path",
|
|
4426
4038
|
{
|
|
4427
4039
|
fillRule: "evenodd",
|
|
@@ -4430,7 +4042,7 @@ var ListIcon = memo16(({ className, ...props }) => {
|
|
|
4430
4042
|
fill: "currentColor"
|
|
4431
4043
|
}
|
|
4432
4044
|
),
|
|
4433
|
-
/* @__PURE__ */
|
|
4045
|
+
/* @__PURE__ */ jsx41(
|
|
4434
4046
|
"path",
|
|
4435
4047
|
{
|
|
4436
4048
|
fillRule: "evenodd",
|
|
@@ -4439,7 +4051,7 @@ var ListIcon = memo16(({ className, ...props }) => {
|
|
|
4439
4051
|
fill: "currentColor"
|
|
4440
4052
|
}
|
|
4441
4053
|
),
|
|
4442
|
-
/* @__PURE__ */
|
|
4054
|
+
/* @__PURE__ */ jsx41(
|
|
4443
4055
|
"path",
|
|
4444
4056
|
{
|
|
4445
4057
|
fillRule: "evenodd",
|
|
@@ -4448,7 +4060,7 @@ var ListIcon = memo16(({ className, ...props }) => {
|
|
|
4448
4060
|
fill: "currentColor"
|
|
4449
4061
|
}
|
|
4450
4062
|
),
|
|
4451
|
-
/* @__PURE__ */
|
|
4063
|
+
/* @__PURE__ */ jsx41(
|
|
4452
4064
|
"path",
|
|
4453
4065
|
{
|
|
4454
4066
|
fillRule: "evenodd",
|
|
@@ -4457,7 +4069,7 @@ var ListIcon = memo16(({ className, ...props }) => {
|
|
|
4457
4069
|
fill: "currentColor"
|
|
4458
4070
|
}
|
|
4459
4071
|
),
|
|
4460
|
-
/* @__PURE__ */
|
|
4072
|
+
/* @__PURE__ */ jsx41(
|
|
4461
4073
|
"path",
|
|
4462
4074
|
{
|
|
4463
4075
|
fillRule: "evenodd",
|
|
@@ -4474,7 +4086,7 @@ ListIcon.displayName = "ListIcon";
|
|
|
4474
4086
|
|
|
4475
4087
|
// src/components/tiptap-icons/list-ordered-icon.tsx
|
|
4476
4088
|
import { memo as memo17 } from "react";
|
|
4477
|
-
import { jsx as
|
|
4089
|
+
import { jsx as jsx42, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4478
4090
|
var ListOrderedIcon = memo17(({ className, ...props }) => {
|
|
4479
4091
|
return /* @__PURE__ */ jsxs23(
|
|
4480
4092
|
"svg",
|
|
@@ -4487,7 +4099,7 @@ var ListOrderedIcon = memo17(({ className, ...props }) => {
|
|
|
4487
4099
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4488
4100
|
...props,
|
|
4489
4101
|
children: [
|
|
4490
|
-
/* @__PURE__ */
|
|
4102
|
+
/* @__PURE__ */ jsx42(
|
|
4491
4103
|
"path",
|
|
4492
4104
|
{
|
|
4493
4105
|
fillRule: "evenodd",
|
|
@@ -4496,7 +4108,7 @@ var ListOrderedIcon = memo17(({ className, ...props }) => {
|
|
|
4496
4108
|
fill: "currentColor"
|
|
4497
4109
|
}
|
|
4498
4110
|
),
|
|
4499
|
-
/* @__PURE__ */
|
|
4111
|
+
/* @__PURE__ */ jsx42(
|
|
4500
4112
|
"path",
|
|
4501
4113
|
{
|
|
4502
4114
|
fillRule: "evenodd",
|
|
@@ -4505,7 +4117,7 @@ var ListOrderedIcon = memo17(({ className, ...props }) => {
|
|
|
4505
4117
|
fill: "currentColor"
|
|
4506
4118
|
}
|
|
4507
4119
|
),
|
|
4508
|
-
/* @__PURE__ */
|
|
4120
|
+
/* @__PURE__ */ jsx42(
|
|
4509
4121
|
"path",
|
|
4510
4122
|
{
|
|
4511
4123
|
fillRule: "evenodd",
|
|
@@ -4514,7 +4126,7 @@ var ListOrderedIcon = memo17(({ className, ...props }) => {
|
|
|
4514
4126
|
fill: "currentColor"
|
|
4515
4127
|
}
|
|
4516
4128
|
),
|
|
4517
|
-
/* @__PURE__ */
|
|
4129
|
+
/* @__PURE__ */ jsx42(
|
|
4518
4130
|
"path",
|
|
4519
4131
|
{
|
|
4520
4132
|
fillRule: "evenodd",
|
|
@@ -4523,7 +4135,7 @@ var ListOrderedIcon = memo17(({ className, ...props }) => {
|
|
|
4523
4135
|
fill: "currentColor"
|
|
4524
4136
|
}
|
|
4525
4137
|
),
|
|
4526
|
-
/* @__PURE__ */
|
|
4138
|
+
/* @__PURE__ */ jsx42(
|
|
4527
4139
|
"path",
|
|
4528
4140
|
{
|
|
4529
4141
|
fillRule: "evenodd",
|
|
@@ -4532,7 +4144,7 @@ var ListOrderedIcon = memo17(({ className, ...props }) => {
|
|
|
4532
4144
|
fill: "currentColor"
|
|
4533
4145
|
}
|
|
4534
4146
|
),
|
|
4535
|
-
/* @__PURE__ */
|
|
4147
|
+
/* @__PURE__ */ jsx42(
|
|
4536
4148
|
"path",
|
|
4537
4149
|
{
|
|
4538
4150
|
fillRule: "evenodd",
|
|
@@ -4549,7 +4161,7 @@ ListOrderedIcon.displayName = "ListOrderedIcon";
|
|
|
4549
4161
|
|
|
4550
4162
|
// src/components/tiptap-icons/list-todo-icon.tsx
|
|
4551
4163
|
import { memo as memo18 } from "react";
|
|
4552
|
-
import { jsx as
|
|
4164
|
+
import { jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4553
4165
|
var ListTodoIcon = memo18(({ className, ...props }) => {
|
|
4554
4166
|
return /* @__PURE__ */ jsxs24(
|
|
4555
4167
|
"svg",
|
|
@@ -4562,7 +4174,7 @@ var ListTodoIcon = memo18(({ className, ...props }) => {
|
|
|
4562
4174
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4563
4175
|
...props,
|
|
4564
4176
|
children: [
|
|
4565
|
-
/* @__PURE__ */
|
|
4177
|
+
/* @__PURE__ */ jsx43(
|
|
4566
4178
|
"path",
|
|
4567
4179
|
{
|
|
4568
4180
|
fillRule: "evenodd",
|
|
@@ -4571,7 +4183,7 @@ var ListTodoIcon = memo18(({ className, ...props }) => {
|
|
|
4571
4183
|
fill: "currentColor"
|
|
4572
4184
|
}
|
|
4573
4185
|
),
|
|
4574
|
-
/* @__PURE__ */
|
|
4186
|
+
/* @__PURE__ */ jsx43(
|
|
4575
4187
|
"path",
|
|
4576
4188
|
{
|
|
4577
4189
|
fillRule: "evenodd",
|
|
@@ -4580,7 +4192,7 @@ var ListTodoIcon = memo18(({ className, ...props }) => {
|
|
|
4580
4192
|
fill: "currentColor"
|
|
4581
4193
|
}
|
|
4582
4194
|
),
|
|
4583
|
-
/* @__PURE__ */
|
|
4195
|
+
/* @__PURE__ */ jsx43(
|
|
4584
4196
|
"path",
|
|
4585
4197
|
{
|
|
4586
4198
|
fillRule: "evenodd",
|
|
@@ -4589,7 +4201,7 @@ var ListTodoIcon = memo18(({ className, ...props }) => {
|
|
|
4589
4201
|
fill: "currentColor"
|
|
4590
4202
|
}
|
|
4591
4203
|
),
|
|
4592
|
-
/* @__PURE__ */
|
|
4204
|
+
/* @__PURE__ */ jsx43(
|
|
4593
4205
|
"path",
|
|
4594
4206
|
{
|
|
4595
4207
|
fillRule: "evenodd",
|
|
@@ -4598,7 +4210,7 @@ var ListTodoIcon = memo18(({ className, ...props }) => {
|
|
|
4598
4210
|
fill: "currentColor"
|
|
4599
4211
|
}
|
|
4600
4212
|
),
|
|
4601
|
-
/* @__PURE__ */
|
|
4213
|
+
/* @__PURE__ */ jsx43(
|
|
4602
4214
|
"path",
|
|
4603
4215
|
{
|
|
4604
4216
|
fillRule: "evenodd",
|
|
@@ -4686,7 +4298,7 @@ function toggleList(editor, type) {
|
|
|
4686
4298
|
const view = editor.view;
|
|
4687
4299
|
let state = view.state;
|
|
4688
4300
|
let tr = state.tr;
|
|
4689
|
-
if (state.selection.empty || state.selection instanceof
|
|
4301
|
+
if (state.selection.empty || state.selection instanceof TextSelection3) {
|
|
4690
4302
|
const pos = findNodePosition({
|
|
4691
4303
|
editor,
|
|
4692
4304
|
node: state.selection.$anchor.node(1)
|
|
@@ -4705,7 +4317,7 @@ function toggleList(editor, type) {
|
|
|
4705
4317
|
const to = lastChild ? selection.to - lastChild.nodeSize : selection.to - 1;
|
|
4706
4318
|
const resolvedFrom = state.doc.resolve(from);
|
|
4707
4319
|
const resolvedTo = state.doc.resolve(to);
|
|
4708
|
-
chain = chain.setTextSelection(
|
|
4320
|
+
chain = chain.setTextSelection(TextSelection3.between(resolvedFrom, resolvedTo)).clearNodes();
|
|
4709
4321
|
}
|
|
4710
4322
|
if (editor.isActive(type)) {
|
|
4711
4323
|
chain.liftListItem("listItem").lift("bulletList").lift("orderedList").lift("taskList").run();
|
|
@@ -4867,7 +4479,7 @@ function useListDropdownMenu(config) {
|
|
|
4867
4479
|
}
|
|
4868
4480
|
|
|
4869
4481
|
// src/components/tiptap-ui/list-dropdown-menu/list-dropdown-menu.tsx
|
|
4870
|
-
import { jsx as
|
|
4482
|
+
import { jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4871
4483
|
function ListDropdownMenu({
|
|
4872
4484
|
editor: providedEditor,
|
|
4873
4485
|
types = ["bulletList", "orderedList", "taskList"],
|
|
@@ -4894,7 +4506,7 @@ function ListDropdownMenu({
|
|
|
4894
4506
|
return null;
|
|
4895
4507
|
}
|
|
4896
4508
|
return /* @__PURE__ */ jsxs25(DropdownMenu, { open: isOpen, onOpenChange: handleOnOpenChange, children: [
|
|
4897
|
-
/* @__PURE__ */
|
|
4509
|
+
/* @__PURE__ */ jsx44(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs25(
|
|
4898
4510
|
Button2,
|
|
4899
4511
|
{
|
|
4900
4512
|
type: "button",
|
|
@@ -4908,12 +4520,12 @@ function ListDropdownMenu({
|
|
|
4908
4520
|
tooltip: "List",
|
|
4909
4521
|
...props,
|
|
4910
4522
|
children: [
|
|
4911
|
-
/* @__PURE__ */
|
|
4912
|
-
/* @__PURE__ */
|
|
4523
|
+
/* @__PURE__ */ jsx44(Icon, { className: "tiptap-button-icon" }),
|
|
4524
|
+
/* @__PURE__ */ jsx44(ChevronDownIcon, { className: "tiptap-button-dropdown-small" })
|
|
4913
4525
|
]
|
|
4914
4526
|
}
|
|
4915
4527
|
) }),
|
|
4916
|
-
/* @__PURE__ */
|
|
4528
|
+
/* @__PURE__ */ jsx44(DropdownMenuContent, { align: "start", portal, children: /* @__PURE__ */ jsx44(Card, { children: /* @__PURE__ */ jsx44(CardBody, { children: /* @__PURE__ */ jsx44(ButtonGroup, { children: filteredLists.map((option) => /* @__PURE__ */ jsx44(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsx44(
|
|
4917
4529
|
ListButton,
|
|
4918
4530
|
{
|
|
4919
4531
|
editor,
|
|
@@ -4927,11 +4539,11 @@ function ListDropdownMenu({
|
|
|
4927
4539
|
|
|
4928
4540
|
// src/components/tiptap-ui/blockquote-button/blockquote-button.tsx
|
|
4929
4541
|
import { forwardRef as forwardRef12, useCallback as useCallback16 } from "react";
|
|
4930
|
-
import { Fragment as Fragment7, jsx as
|
|
4542
|
+
import { Fragment as Fragment7, jsx as jsx45, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4931
4543
|
function BlockquoteShortcutBadge({
|
|
4932
4544
|
shortcutKeys = BLOCKQUOTE_SHORTCUT_KEY
|
|
4933
4545
|
}) {
|
|
4934
|
-
return /* @__PURE__ */
|
|
4546
|
+
return /* @__PURE__ */ jsx45(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
|
|
4935
4547
|
}
|
|
4936
4548
|
var BlockquoteButton = forwardRef12(
|
|
4937
4549
|
({
|
|
@@ -4969,7 +4581,7 @@ var BlockquoteButton = forwardRef12(
|
|
|
4969
4581
|
if (!isVisible) {
|
|
4970
4582
|
return null;
|
|
4971
4583
|
}
|
|
4972
|
-
return /* @__PURE__ */
|
|
4584
|
+
return /* @__PURE__ */ jsx45(
|
|
4973
4585
|
Button2,
|
|
4974
4586
|
{
|
|
4975
4587
|
type: "button",
|
|
@@ -4986,9 +4598,9 @@ var BlockquoteButton = forwardRef12(
|
|
|
4986
4598
|
...buttonProps,
|
|
4987
4599
|
ref,
|
|
4988
4600
|
children: children ?? /* @__PURE__ */ jsxs26(Fragment7, { children: [
|
|
4989
|
-
/* @__PURE__ */
|
|
4990
|
-
text && /* @__PURE__ */
|
|
4991
|
-
showShortcut && /* @__PURE__ */
|
|
4601
|
+
/* @__PURE__ */ jsx45(Icon, { className: "tiptap-button-icon" }),
|
|
4602
|
+
text && /* @__PURE__ */ jsx45("span", { className: "tiptap-button-text", children: text }),
|
|
4603
|
+
showShortcut && /* @__PURE__ */ jsx45(BlockquoteShortcutBadge, { shortcutKeys })
|
|
4992
4604
|
] })
|
|
4993
4605
|
}
|
|
4994
4606
|
);
|
|
@@ -4998,11 +4610,11 @@ BlockquoteButton.displayName = "BlockquoteButton";
|
|
|
4998
4610
|
|
|
4999
4611
|
// src/components/tiptap-ui/blockquote-button/use-blockquote.ts
|
|
5000
4612
|
import { useCallback as useCallback17, useEffect as useEffect11, useState as useState20 } from "react";
|
|
5001
|
-
import { NodeSelection as NodeSelection4, TextSelection as
|
|
4613
|
+
import { NodeSelection as NodeSelection4, TextSelection as TextSelection4 } from "@tiptap/pm/state";
|
|
5002
4614
|
|
|
5003
4615
|
// src/components/tiptap-icons/blockquote-icon.tsx
|
|
5004
4616
|
import { memo as memo19 } from "react";
|
|
5005
|
-
import { jsx as
|
|
4617
|
+
import { jsx as jsx46, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5006
4618
|
var BlockquoteIcon = memo19(({ className, ...props }) => {
|
|
5007
4619
|
return /* @__PURE__ */ jsxs27(
|
|
5008
4620
|
"svg",
|
|
@@ -5015,7 +4627,7 @@ var BlockquoteIcon = memo19(({ className, ...props }) => {
|
|
|
5015
4627
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5016
4628
|
...props,
|
|
5017
4629
|
children: [
|
|
5018
|
-
/* @__PURE__ */
|
|
4630
|
+
/* @__PURE__ */ jsx46(
|
|
5019
4631
|
"path",
|
|
5020
4632
|
{
|
|
5021
4633
|
fillRule: "evenodd",
|
|
@@ -5024,7 +4636,7 @@ var BlockquoteIcon = memo19(({ className, ...props }) => {
|
|
|
5024
4636
|
fill: "currentColor"
|
|
5025
4637
|
}
|
|
5026
4638
|
),
|
|
5027
|
-
/* @__PURE__ */
|
|
4639
|
+
/* @__PURE__ */ jsx46(
|
|
5028
4640
|
"path",
|
|
5029
4641
|
{
|
|
5030
4642
|
fillRule: "evenodd",
|
|
@@ -5033,7 +4645,7 @@ var BlockquoteIcon = memo19(({ className, ...props }) => {
|
|
|
5033
4645
|
fill: "currentColor"
|
|
5034
4646
|
}
|
|
5035
4647
|
),
|
|
5036
|
-
/* @__PURE__ */
|
|
4648
|
+
/* @__PURE__ */ jsx46(
|
|
5037
4649
|
"path",
|
|
5038
4650
|
{
|
|
5039
4651
|
fillRule: "evenodd",
|
|
@@ -5042,7 +4654,7 @@ var BlockquoteIcon = memo19(({ className, ...props }) => {
|
|
|
5042
4654
|
fill: "currentColor"
|
|
5043
4655
|
}
|
|
5044
4656
|
),
|
|
5045
|
-
/* @__PURE__ */
|
|
4657
|
+
/* @__PURE__ */ jsx46(
|
|
5046
4658
|
"path",
|
|
5047
4659
|
{
|
|
5048
4660
|
fillRule: "evenodd",
|
|
@@ -5085,7 +4697,7 @@ function toggleBlockquote(editor) {
|
|
|
5085
4697
|
const view = editor.view;
|
|
5086
4698
|
let state = view.state;
|
|
5087
4699
|
let tr = state.tr;
|
|
5088
|
-
if (state.selection.empty || state.selection instanceof
|
|
4700
|
+
if (state.selection.empty || state.selection instanceof TextSelection4) {
|
|
5089
4701
|
const pos = findNodePosition({
|
|
5090
4702
|
editor,
|
|
5091
4703
|
node: state.selection.$anchor.node(1)
|
|
@@ -5104,7 +4716,7 @@ function toggleBlockquote(editor) {
|
|
|
5104
4716
|
const to = lastChild ? selection.to - lastChild.nodeSize : selection.to - 1;
|
|
5105
4717
|
const resolvedFrom = state.doc.resolve(from);
|
|
5106
4718
|
const resolvedTo = state.doc.resolve(to);
|
|
5107
|
-
chain = chain.setTextSelection(
|
|
4719
|
+
chain = chain.setTextSelection(TextSelection4.between(resolvedFrom, resolvedTo)).clearNodes();
|
|
5108
4720
|
}
|
|
5109
4721
|
const toggle = editor.isActive("blockquote") ? chain.lift("blockquote") : chain.wrapIn("blockquote");
|
|
5110
4722
|
toggle.run();
|
|
@@ -5168,9 +4780,9 @@ import { forwardRef as forwardRef14, useMemo as useMemo8, useRef as useRef5, use
|
|
|
5168
4780
|
|
|
5169
4781
|
// src/components/tiptap-icons/ban-icon.tsx
|
|
5170
4782
|
import { memo as memo20 } from "react";
|
|
5171
|
-
import { jsx as
|
|
4783
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
5172
4784
|
var BanIcon = memo20(({ className, ...props }) => {
|
|
5173
|
-
return /* @__PURE__ */
|
|
4785
|
+
return /* @__PURE__ */ jsx47(
|
|
5174
4786
|
"svg",
|
|
5175
4787
|
{
|
|
5176
4788
|
width: "24",
|
|
@@ -5180,7 +4792,7 @@ var BanIcon = memo20(({ className, ...props }) => {
|
|
|
5180
4792
|
fill: "currentColor",
|
|
5181
4793
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5182
4794
|
...props,
|
|
5183
|
-
children: /* @__PURE__ */
|
|
4795
|
+
children: /* @__PURE__ */ jsx47(
|
|
5184
4796
|
"path",
|
|
5185
4797
|
{
|
|
5186
4798
|
fillRule: "evenodd",
|
|
@@ -5196,9 +4808,9 @@ BanIcon.displayName = "BanIcon";
|
|
|
5196
4808
|
|
|
5197
4809
|
// src/components/tiptap-icons/highlighter-icon.tsx
|
|
5198
4810
|
import { memo as memo21 } from "react";
|
|
5199
|
-
import { jsx as
|
|
4811
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
5200
4812
|
var HighlighterIcon = memo21(({ className, ...props }) => {
|
|
5201
|
-
return /* @__PURE__ */
|
|
4813
|
+
return /* @__PURE__ */ jsx48(
|
|
5202
4814
|
"svg",
|
|
5203
4815
|
{
|
|
5204
4816
|
width: "24",
|
|
@@ -5208,7 +4820,7 @@ var HighlighterIcon = memo21(({ className, ...props }) => {
|
|
|
5208
4820
|
fill: "currentColor",
|
|
5209
4821
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5210
4822
|
...props,
|
|
5211
|
-
children: /* @__PURE__ */
|
|
4823
|
+
children: /* @__PURE__ */ jsx48(
|
|
5212
4824
|
"path",
|
|
5213
4825
|
{
|
|
5214
4826
|
fillRule: "evenodd",
|
|
@@ -5224,16 +4836,16 @@ HighlighterIcon.displayName = "HighlighterIcon";
|
|
|
5224
4836
|
|
|
5225
4837
|
// src/components/tiptap-ui-primitive/popover/popover.tsx
|
|
5226
4838
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
5227
|
-
import { jsx as
|
|
4839
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
5228
4840
|
function Popover({
|
|
5229
4841
|
...props
|
|
5230
4842
|
}) {
|
|
5231
|
-
return /* @__PURE__ */
|
|
4843
|
+
return /* @__PURE__ */ jsx49(PopoverPrimitive.Root, { ...props });
|
|
5232
4844
|
}
|
|
5233
4845
|
function PopoverTrigger({
|
|
5234
4846
|
...props
|
|
5235
4847
|
}) {
|
|
5236
|
-
return /* @__PURE__ */
|
|
4848
|
+
return /* @__PURE__ */ jsx49(PopoverPrimitive.Trigger, { ...props });
|
|
5237
4849
|
}
|
|
5238
4850
|
function PopoverContent({
|
|
5239
4851
|
className,
|
|
@@ -5241,7 +4853,7 @@ function PopoverContent({
|
|
|
5241
4853
|
sideOffset = 4,
|
|
5242
4854
|
...props
|
|
5243
4855
|
}) {
|
|
5244
|
-
return /* @__PURE__ */
|
|
4856
|
+
return /* @__PURE__ */ jsx49(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx49(
|
|
5245
4857
|
PopoverPrimitive.Content,
|
|
5246
4858
|
{
|
|
5247
4859
|
align,
|
|
@@ -5254,11 +4866,11 @@ function PopoverContent({
|
|
|
5254
4866
|
|
|
5255
4867
|
// src/components/tiptap-ui/color-highlight-button/color-highlight-button.tsx
|
|
5256
4868
|
import { forwardRef as forwardRef13, useCallback as useCallback18, useMemo as useMemo7 } from "react";
|
|
5257
|
-
import { Fragment as Fragment8, jsx as
|
|
4869
|
+
import { Fragment as Fragment8, jsx as jsx50, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
5258
4870
|
function ColorHighlightShortcutBadge({
|
|
5259
4871
|
shortcutKeys = COLOR_HIGHLIGHT_SHORTCUT_KEY
|
|
5260
4872
|
}) {
|
|
5261
|
-
return /* @__PURE__ */
|
|
4873
|
+
return /* @__PURE__ */ jsx50(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
|
|
5262
4874
|
}
|
|
5263
4875
|
var ColorHighlightButton = forwardRef13(
|
|
5264
4876
|
({
|
|
@@ -5308,7 +4920,7 @@ var ColorHighlightButton = forwardRef13(
|
|
|
5308
4920
|
if (!isVisible) {
|
|
5309
4921
|
return null;
|
|
5310
4922
|
}
|
|
5311
|
-
return /* @__PURE__ */
|
|
4923
|
+
return /* @__PURE__ */ jsx50(
|
|
5312
4924
|
Button2,
|
|
5313
4925
|
{
|
|
5314
4926
|
type: "button",
|
|
@@ -5326,15 +4938,15 @@ var ColorHighlightButton = forwardRef13(
|
|
|
5326
4938
|
...buttonProps,
|
|
5327
4939
|
ref,
|
|
5328
4940
|
children: children ?? /* @__PURE__ */ jsxs28(Fragment8, { children: [
|
|
5329
|
-
/* @__PURE__ */
|
|
4941
|
+
/* @__PURE__ */ jsx50(
|
|
5330
4942
|
"span",
|
|
5331
4943
|
{
|
|
5332
4944
|
className: "tiptap-button-highlight",
|
|
5333
4945
|
style: { "--highlight-color": highlightColor }
|
|
5334
4946
|
}
|
|
5335
4947
|
),
|
|
5336
|
-
text && /* @__PURE__ */
|
|
5337
|
-
showShortcut && /* @__PURE__ */
|
|
4948
|
+
text && /* @__PURE__ */ jsx50("span", { className: "tiptap-button-text", children: text }),
|
|
4949
|
+
showShortcut && /* @__PURE__ */ jsx50(ColorHighlightShortcutBadge, { shortcutKeys })
|
|
5338
4950
|
] })
|
|
5339
4951
|
}
|
|
5340
4952
|
);
|
|
@@ -5549,8 +5161,8 @@ function useColorHighlight(config) {
|
|
|
5549
5161
|
}
|
|
5550
5162
|
|
|
5551
5163
|
// src/components/tiptap-ui/color-highlight-popover/color-highlight-popover.tsx
|
|
5552
|
-
import { jsx as
|
|
5553
|
-
var ColorHighlightPopoverButton = forwardRef14(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
5164
|
+
import { jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
5165
|
+
var ColorHighlightPopoverButton = forwardRef14(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx51(
|
|
5554
5166
|
Button2,
|
|
5555
5167
|
{
|
|
5556
5168
|
type: "button",
|
|
@@ -5563,7 +5175,7 @@ var ColorHighlightPopoverButton = forwardRef14(({ className, children, ...props
|
|
|
5563
5175
|
tooltip: "Highlight",
|
|
5564
5176
|
ref,
|
|
5565
5177
|
...props,
|
|
5566
|
-
children: children ?? /* @__PURE__ */
|
|
5178
|
+
children: children ?? /* @__PURE__ */ jsx51(HighlighterIcon, { className: "tiptap-button-icon" })
|
|
5567
5179
|
}
|
|
5568
5180
|
));
|
|
5569
5181
|
ColorHighlightPopoverButton.displayName = "ColorHighlightPopoverButton";
|
|
@@ -5599,14 +5211,14 @@ function ColorHighlightPopoverContent({
|
|
|
5599
5211
|
},
|
|
5600
5212
|
autoSelectFirstItem: false
|
|
5601
5213
|
});
|
|
5602
|
-
return /* @__PURE__ */
|
|
5214
|
+
return /* @__PURE__ */ jsx51(
|
|
5603
5215
|
Card,
|
|
5604
5216
|
{
|
|
5605
5217
|
ref: containerRef,
|
|
5606
5218
|
tabIndex: 0,
|
|
5607
5219
|
style: isMobile ? { boxShadow: "none", border: 0 } : {},
|
|
5608
|
-
children: /* @__PURE__ */
|
|
5609
|
-
/* @__PURE__ */
|
|
5220
|
+
children: /* @__PURE__ */ jsx51(CardBody, { style: isMobile ? { padding: 0 } : {}, children: /* @__PURE__ */ jsxs29(CardItemGroup, { orientation: "horizontal", children: [
|
|
5221
|
+
/* @__PURE__ */ jsx51(ButtonGroup, { orientation: "horizontal", children: colors.map((color, index) => /* @__PURE__ */ jsx51(
|
|
5610
5222
|
ColorHighlightButton,
|
|
5611
5223
|
{
|
|
5612
5224
|
editor,
|
|
@@ -5618,8 +5230,8 @@ function ColorHighlightPopoverContent({
|
|
|
5618
5230
|
},
|
|
5619
5231
|
color.value
|
|
5620
5232
|
)) }),
|
|
5621
|
-
/* @__PURE__ */
|
|
5622
|
-
/* @__PURE__ */
|
|
5233
|
+
/* @__PURE__ */ jsx51(Separator2, {}),
|
|
5234
|
+
/* @__PURE__ */ jsx51(ButtonGroup, { orientation: "horizontal", children: /* @__PURE__ */ jsx51(
|
|
5623
5235
|
Button2,
|
|
5624
5236
|
{
|
|
5625
5237
|
onClick: handleRemoveHighlight,
|
|
@@ -5630,7 +5242,7 @@ function ColorHighlightPopoverContent({
|
|
|
5630
5242
|
role: "menuitem",
|
|
5631
5243
|
"data-style": "ghost",
|
|
5632
5244
|
"data-highlighted": selectedIndex === colors.length,
|
|
5633
|
-
children: /* @__PURE__ */
|
|
5245
|
+
children: /* @__PURE__ */ jsx51(BanIcon, { className: "tiptap-button-icon" })
|
|
5634
5246
|
}
|
|
5635
5247
|
) })
|
|
5636
5248
|
] }) })
|
|
@@ -5643,9 +5255,9 @@ import { forwardRef as forwardRef15, useCallback as useCallback20, useEffect as
|
|
|
5643
5255
|
|
|
5644
5256
|
// src/components/tiptap-icons/corner-down-left-icon.tsx
|
|
5645
5257
|
import { memo as memo22 } from "react";
|
|
5646
|
-
import { jsx as
|
|
5258
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
5647
5259
|
var CornerDownLeftIcon = memo22(({ className, ...props }) => {
|
|
5648
|
-
return /* @__PURE__ */
|
|
5260
|
+
return /* @__PURE__ */ jsx52(
|
|
5649
5261
|
"svg",
|
|
5650
5262
|
{
|
|
5651
5263
|
width: "24",
|
|
@@ -5655,7 +5267,7 @@ var CornerDownLeftIcon = memo22(({ className, ...props }) => {
|
|
|
5655
5267
|
fill: "currentColor",
|
|
5656
5268
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5657
5269
|
...props,
|
|
5658
|
-
children: /* @__PURE__ */
|
|
5270
|
+
children: /* @__PURE__ */ jsx52(
|
|
5659
5271
|
"path",
|
|
5660
5272
|
{
|
|
5661
5273
|
fillRule: "evenodd",
|
|
@@ -5671,7 +5283,7 @@ CornerDownLeftIcon.displayName = "CornerDownLeftIcon";
|
|
|
5671
5283
|
|
|
5672
5284
|
// src/components/tiptap-icons/external-link-icon.tsx
|
|
5673
5285
|
import { memo as memo23 } from "react";
|
|
5674
|
-
import { jsx as
|
|
5286
|
+
import { jsx as jsx53, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
5675
5287
|
var ExternalLinkIcon = memo23(({ className, ...props }) => {
|
|
5676
5288
|
return /* @__PURE__ */ jsxs30(
|
|
5677
5289
|
"svg",
|
|
@@ -5684,14 +5296,14 @@ var ExternalLinkIcon = memo23(({ className, ...props }) => {
|
|
|
5684
5296
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5685
5297
|
...props,
|
|
5686
5298
|
children: [
|
|
5687
|
-
/* @__PURE__ */
|
|
5299
|
+
/* @__PURE__ */ jsx53(
|
|
5688
5300
|
"path",
|
|
5689
5301
|
{
|
|
5690
5302
|
d: "M14 3C14 2.44772 14.4477 2 15 2H21C21.5523 2 22 2.44772 22 3V9C22 9.55228 21.5523 10 21 10C20.4477 10 20 9.55228 20 9V5.41421L10.7071 14.7071C10.3166 15.0976 9.68342 15.0976 9.29289 14.7071C8.90237 14.3166 8.90237 13.6834 9.29289 13.2929L18.5858 4H15C14.4477 4 14 3.55228 14 3Z",
|
|
5691
5303
|
fill: "currentColor"
|
|
5692
5304
|
}
|
|
5693
5305
|
),
|
|
5694
|
-
/* @__PURE__ */
|
|
5306
|
+
/* @__PURE__ */ jsx53(
|
|
5695
5307
|
"path",
|
|
5696
5308
|
{
|
|
5697
5309
|
d: "M4.29289 7.29289C4.48043 7.10536 4.73478 7 5 7H11C11.5523 7 12 6.55228 12 6C12 5.44772 11.5523 5 11 5H5C4.20435 5 3.44129 5.31607 2.87868 5.87868C2.31607 6.44129 2 7.20435 2 8V19C2 19.7957 2.31607 20.5587 2.87868 21.1213C3.44129 21.6839 4.20435 22 5 22H16C16.7957 22 17.5587 21.6839 18.1213 21.1213C18.6839 20.5587 19 19.7957 19 19V13C19 12.4477 18.5523 12 18 12C17.4477 12 17 12.4477 17 13V19C17 19.2652 16.8946 19.5196 16.7071 19.7071C16.5196 19.8946 16.2652 20 16 20H5C4.73478 20 4.48043 19.8946 4.29289 19.7071C4.10536 19.5196 4 19.2652 4 19V8C4 7.73478 4.10536 7.48043 4.29289 7.29289Z",
|
|
@@ -5706,7 +5318,7 @@ ExternalLinkIcon.displayName = "ExternalLinkIcon";
|
|
|
5706
5318
|
|
|
5707
5319
|
// src/components/tiptap-icons/link-icon.tsx
|
|
5708
5320
|
import { memo as memo24 } from "react";
|
|
5709
|
-
import { jsx as
|
|
5321
|
+
import { jsx as jsx54, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
5710
5322
|
var LinkIcon = memo24(({ className, ...props }) => {
|
|
5711
5323
|
return /* @__PURE__ */ jsxs31(
|
|
5712
5324
|
"svg",
|
|
@@ -5719,14 +5331,14 @@ var LinkIcon = memo24(({ className, ...props }) => {
|
|
|
5719
5331
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5720
5332
|
...props,
|
|
5721
5333
|
children: [
|
|
5722
|
-
/* @__PURE__ */
|
|
5334
|
+
/* @__PURE__ */ jsx54(
|
|
5723
5335
|
"path",
|
|
5724
5336
|
{
|
|
5725
5337
|
d: "M16.9958 1.06669C15.4226 1.05302 13.907 1.65779 12.7753 2.75074L12.765 2.76086L11.045 4.47086C10.6534 4.86024 10.6515 5.49341 11.0409 5.88507C11.4303 6.27673 12.0634 6.27858 12.4551 5.88919L14.1697 4.18456C14.9236 3.45893 15.9319 3.05752 16.9784 3.06662C18.0272 3.07573 19.0304 3.49641 19.772 4.23804C20.5137 4.97967 20.9344 5.98292 20.9435 7.03171C20.9526 8.07776 20.5515 9.08563 19.8265 9.83941L16.833 12.8329C16.4274 13.2386 15.9393 13.5524 15.4019 13.7529C14.8645 13.9533 14.2903 14.0359 13.7181 13.9949C13.146 13.9539 12.5894 13.7904 12.0861 13.5154C11.5827 13.2404 11.1444 12.8604 10.8008 12.401C10.47 11.9588 9.84333 11.8685 9.40108 12.1993C8.95883 12.5301 8.86849 13.1568 9.1993 13.599C9.71464 14.288 10.3721 14.858 11.1272 15.2705C11.8822 15.683 12.7171 15.9283 13.5753 15.9898C14.4334 16.0513 15.2948 15.9274 16.1009 15.6267C16.907 15.326 17.639 14.8555 18.2473 14.247L21.2472 11.2471L21.2593 11.2347C22.3523 10.1031 22.9571 8.58751 22.9434 7.01433C22.9297 5.44115 22.2987 3.93628 21.1863 2.82383C20.0738 1.71138 18.5689 1.08036 16.9958 1.06669Z",
|
|
5726
5338
|
fill: "currentColor"
|
|
5727
5339
|
}
|
|
5728
5340
|
),
|
|
5729
|
-
/* @__PURE__ */
|
|
5341
|
+
/* @__PURE__ */ jsx54(
|
|
5730
5342
|
"path",
|
|
5731
5343
|
{
|
|
5732
5344
|
d: "M10.4247 8.0102C9.56657 7.94874 8.70522 8.07256 7.89911 8.37326C7.09305 8.67395 6.36096 9.14458 5.75272 9.753L2.75285 12.7529L2.74067 12.7653C1.64772 13.8969 1.04295 15.4125 1.05662 16.9857C1.07029 18.5589 1.70131 20.0637 2.81376 21.1762C3.9262 22.2886 5.43108 22.9196 7.00426 22.9333C8.57744 22.947 10.0931 22.3422 11.2247 21.2493L11.2371 21.2371L12.9471 19.5271C13.3376 19.1366 13.3376 18.5034 12.9471 18.1129C12.5565 17.7223 11.9234 17.7223 11.5328 18.1129L9.82932 19.8164C9.07555 20.5414 8.06768 20.9425 7.02164 20.9334C5.97285 20.9243 4.9696 20.5036 4.22797 19.762C3.48634 19.0203 3.06566 18.0171 3.05655 16.9683C3.04746 15.9222 3.44851 14.9144 4.17355 14.1606L7.16719 11.167C7.5727 10.7613 8.06071 10.4476 8.59811 10.2471C9.13552 10.0467 9.70976 9.96412 10.2819 10.0051C10.854 10.0461 11.4106 10.2096 11.9139 10.4846C12.4173 10.7596 12.8556 11.1397 13.1992 11.599C13.53 12.0412 14.1567 12.1316 14.5989 11.8007C15.0412 11.4699 15.1315 10.8433 14.8007 10.401C14.2854 9.71205 13.6279 9.14198 12.8729 8.72948C12.1178 8.31697 11.2829 8.07166 10.4247 8.0102Z",
|
|
@@ -5741,9 +5353,9 @@ LinkIcon.displayName = "LinkIcon";
|
|
|
5741
5353
|
|
|
5742
5354
|
// src/components/tiptap-icons/trash-icon.tsx
|
|
5743
5355
|
import { memo as memo25 } from "react";
|
|
5744
|
-
import { jsx as
|
|
5356
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
5745
5357
|
var TrashIcon = memo25(({ className, ...props }) => {
|
|
5746
|
-
return /* @__PURE__ */
|
|
5358
|
+
return /* @__PURE__ */ jsx55(
|
|
5747
5359
|
"svg",
|
|
5748
5360
|
{
|
|
5749
5361
|
width: "24",
|
|
@@ -5753,7 +5365,7 @@ var TrashIcon = memo25(({ className, ...props }) => {
|
|
|
5753
5365
|
fill: "currentColor",
|
|
5754
5366
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5755
5367
|
...props,
|
|
5756
|
-
children: /* @__PURE__ */
|
|
5368
|
+
children: /* @__PURE__ */ jsx55(
|
|
5757
5369
|
"path",
|
|
5758
5370
|
{
|
|
5759
5371
|
fillRule: "evenodd",
|
|
@@ -5768,23 +5380,23 @@ var TrashIcon = memo25(({ className, ...props }) => {
|
|
|
5768
5380
|
TrashIcon.displayName = "TrashIcon";
|
|
5769
5381
|
|
|
5770
5382
|
// src/components/tiptap-ui-primitive/input/input.tsx
|
|
5771
|
-
import { jsx as
|
|
5383
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
5772
5384
|
function Input({ className, type, ...props }) {
|
|
5773
|
-
return /* @__PURE__ */
|
|
5385
|
+
return /* @__PURE__ */ jsx56("input", { type, className: cn2("tiptap-input", className), ...props });
|
|
5774
5386
|
}
|
|
5775
5387
|
function InputGroup({
|
|
5776
5388
|
className,
|
|
5777
5389
|
children,
|
|
5778
5390
|
...props
|
|
5779
5391
|
}) {
|
|
5780
|
-
return /* @__PURE__ */
|
|
5392
|
+
return /* @__PURE__ */ jsx56("div", { className: cn2("tiptap-input-group", className), ...props, children });
|
|
5781
5393
|
}
|
|
5782
5394
|
|
|
5783
5395
|
// src/components/tiptap-ui/link-popover/link-popover.tsx
|
|
5784
|
-
import { jsx as
|
|
5396
|
+
import { jsx as jsx57, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
5785
5397
|
var LinkButton = forwardRef15(
|
|
5786
5398
|
({ className, children, ...props }, ref) => {
|
|
5787
|
-
return /* @__PURE__ */
|
|
5399
|
+
return /* @__PURE__ */ jsx57(
|
|
5788
5400
|
Button2,
|
|
5789
5401
|
{
|
|
5790
5402
|
type: "button",
|
|
@@ -5796,7 +5408,7 @@ var LinkButton = forwardRef15(
|
|
|
5796
5408
|
tooltip: "Link",
|
|
5797
5409
|
ref,
|
|
5798
5410
|
...props,
|
|
5799
|
-
children: children || /* @__PURE__ */
|
|
5411
|
+
children: children || /* @__PURE__ */ jsx57(LinkIcon, { className: "tiptap-button-icon" })
|
|
5800
5412
|
}
|
|
5801
5413
|
);
|
|
5802
5414
|
}
|
|
@@ -5817,20 +5429,20 @@ var LinkMain = ({
|
|
|
5817
5429
|
setLink();
|
|
5818
5430
|
}
|
|
5819
5431
|
};
|
|
5820
|
-
return /* @__PURE__ */
|
|
5432
|
+
return /* @__PURE__ */ jsx57(
|
|
5821
5433
|
Card,
|
|
5822
5434
|
{
|
|
5823
5435
|
style: {
|
|
5824
5436
|
...isMobile ? { boxShadow: "none", border: 0 } : {}
|
|
5825
5437
|
},
|
|
5826
|
-
children: /* @__PURE__ */
|
|
5438
|
+
children: /* @__PURE__ */ jsx57(
|
|
5827
5439
|
CardBody,
|
|
5828
5440
|
{
|
|
5829
5441
|
style: {
|
|
5830
5442
|
...isMobile ? { padding: 0 } : {}
|
|
5831
5443
|
},
|
|
5832
5444
|
children: /* @__PURE__ */ jsxs32(CardItemGroup, { orientation: "horizontal", children: [
|
|
5833
|
-
/* @__PURE__ */
|
|
5445
|
+
/* @__PURE__ */ jsx57(InputGroup, { children: /* @__PURE__ */ jsx57(
|
|
5834
5446
|
Input,
|
|
5835
5447
|
{
|
|
5836
5448
|
type: "url",
|
|
@@ -5844,7 +5456,7 @@ var LinkMain = ({
|
|
|
5844
5456
|
autoCapitalize: "off"
|
|
5845
5457
|
}
|
|
5846
5458
|
) }),
|
|
5847
|
-
/* @__PURE__ */
|
|
5459
|
+
/* @__PURE__ */ jsx57(ButtonGroup, { orientation: "horizontal", children: /* @__PURE__ */ jsx57(
|
|
5848
5460
|
Button2,
|
|
5849
5461
|
{
|
|
5850
5462
|
type: "button",
|
|
@@ -5852,12 +5464,12 @@ var LinkMain = ({
|
|
|
5852
5464
|
title: "Apply link",
|
|
5853
5465
|
disabled: !url && !isActive,
|
|
5854
5466
|
"data-style": "ghost",
|
|
5855
|
-
children: /* @__PURE__ */
|
|
5467
|
+
children: /* @__PURE__ */ jsx57(CornerDownLeftIcon, { className: "tiptap-button-icon" })
|
|
5856
5468
|
}
|
|
5857
5469
|
) }),
|
|
5858
|
-
/* @__PURE__ */
|
|
5470
|
+
/* @__PURE__ */ jsx57(Separator2, {}),
|
|
5859
5471
|
/* @__PURE__ */ jsxs32(ButtonGroup, { orientation: "horizontal", children: [
|
|
5860
|
-
/* @__PURE__ */
|
|
5472
|
+
/* @__PURE__ */ jsx57(
|
|
5861
5473
|
Button2,
|
|
5862
5474
|
{
|
|
5863
5475
|
type: "button",
|
|
@@ -5865,10 +5477,10 @@ var LinkMain = ({
|
|
|
5865
5477
|
title: "Open in new window",
|
|
5866
5478
|
disabled: !url && !isActive,
|
|
5867
5479
|
"data-style": "ghost",
|
|
5868
|
-
children: /* @__PURE__ */
|
|
5480
|
+
children: /* @__PURE__ */ jsx57(ExternalLinkIcon, { className: "tiptap-button-icon" })
|
|
5869
5481
|
}
|
|
5870
5482
|
),
|
|
5871
|
-
/* @__PURE__ */
|
|
5483
|
+
/* @__PURE__ */ jsx57(
|
|
5872
5484
|
Button2,
|
|
5873
5485
|
{
|
|
5874
5486
|
type: "button",
|
|
@@ -5876,7 +5488,7 @@ var LinkMain = ({
|
|
|
5876
5488
|
title: "Remove link",
|
|
5877
5489
|
disabled: !url && !isActive,
|
|
5878
5490
|
"data-style": "ghost",
|
|
5879
|
-
children: /* @__PURE__ */
|
|
5491
|
+
children: /* @__PURE__ */ jsx57(TrashIcon, { className: "tiptap-button-icon" })
|
|
5880
5492
|
}
|
|
5881
5493
|
)
|
|
5882
5494
|
] })
|
|
@@ -5890,7 +5502,7 @@ var LinkContent = ({ editor }) => {
|
|
|
5890
5502
|
const linkPopover = useLinkPopover({
|
|
5891
5503
|
editor
|
|
5892
5504
|
});
|
|
5893
|
-
return /* @__PURE__ */
|
|
5505
|
+
return /* @__PURE__ */ jsx57(LinkMain, { ...linkPopover });
|
|
5894
5506
|
};
|
|
5895
5507
|
var LinkPopover = forwardRef15(
|
|
5896
5508
|
({
|
|
@@ -5949,7 +5561,7 @@ var LinkPopover = forwardRef15(
|
|
|
5949
5561
|
return null;
|
|
5950
5562
|
}
|
|
5951
5563
|
return /* @__PURE__ */ jsxs32(Popover, { open: isOpen, onOpenChange: handleOnOpenChange, children: [
|
|
5952
|
-
/* @__PURE__ */
|
|
5564
|
+
/* @__PURE__ */ jsx57(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx57(
|
|
5953
5565
|
LinkButton,
|
|
5954
5566
|
{
|
|
5955
5567
|
disabled: !canSet,
|
|
@@ -5960,10 +5572,10 @@ var LinkPopover = forwardRef15(
|
|
|
5960
5572
|
onClick: handleClick,
|
|
5961
5573
|
...buttonProps,
|
|
5962
5574
|
ref,
|
|
5963
|
-
children: children ?? /* @__PURE__ */
|
|
5575
|
+
children: children ?? /* @__PURE__ */ jsx57(Icon, { className: "tiptap-button-icon" })
|
|
5964
5576
|
}
|
|
5965
5577
|
) }),
|
|
5966
|
-
/* @__PURE__ */
|
|
5578
|
+
/* @__PURE__ */ jsx57(PopoverContent, { children: /* @__PURE__ */ jsx57(
|
|
5967
5579
|
LinkMain,
|
|
5968
5580
|
{
|
|
5969
5581
|
url,
|
|
@@ -6112,12 +5724,12 @@ function useLinkPopover(config) {
|
|
|
6112
5724
|
|
|
6113
5725
|
// src/components/tiptap-ui/mark-button/mark-button.tsx
|
|
6114
5726
|
import { forwardRef as forwardRef16, useCallback as useCallback22 } from "react";
|
|
6115
|
-
import { Fragment as Fragment9, jsx as
|
|
5727
|
+
import { Fragment as Fragment9, jsx as jsx58, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6116
5728
|
function MarkShortcutBadge({
|
|
6117
5729
|
type,
|
|
6118
5730
|
shortcutKeys = MARK_SHORTCUT_KEYS[type]
|
|
6119
5731
|
}) {
|
|
6120
|
-
return /* @__PURE__ */
|
|
5732
|
+
return /* @__PURE__ */ jsx58(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
|
|
6121
5733
|
}
|
|
6122
5734
|
var MarkButton = forwardRef16(
|
|
6123
5735
|
({
|
|
@@ -6157,7 +5769,7 @@ var MarkButton = forwardRef16(
|
|
|
6157
5769
|
if (!isVisible) {
|
|
6158
5770
|
return null;
|
|
6159
5771
|
}
|
|
6160
|
-
return /* @__PURE__ */
|
|
5772
|
+
return /* @__PURE__ */ jsx58(
|
|
6161
5773
|
Button2,
|
|
6162
5774
|
{
|
|
6163
5775
|
type: "button",
|
|
@@ -6174,9 +5786,9 @@ var MarkButton = forwardRef16(
|
|
|
6174
5786
|
...buttonProps,
|
|
6175
5787
|
ref,
|
|
6176
5788
|
children: children ?? /* @__PURE__ */ jsxs33(Fragment9, { children: [
|
|
6177
|
-
/* @__PURE__ */
|
|
6178
|
-
text && /* @__PURE__ */
|
|
6179
|
-
showShortcut && /* @__PURE__ */
|
|
5789
|
+
/* @__PURE__ */ jsx58(Icon, { className: "tiptap-button-icon" }),
|
|
5790
|
+
text && /* @__PURE__ */ jsx58("span", { className: "tiptap-button-text", children: text }),
|
|
5791
|
+
showShortcut && /* @__PURE__ */ jsx58(MarkShortcutBadge, { type, shortcutKeys })
|
|
6180
5792
|
] })
|
|
6181
5793
|
}
|
|
6182
5794
|
);
|
|
@@ -6189,9 +5801,9 @@ import { useCallback as useCallback23, useEffect as useEffect15, useState as use
|
|
|
6189
5801
|
|
|
6190
5802
|
// src/components/tiptap-icons/bold-icon.tsx
|
|
6191
5803
|
import { memo as memo26 } from "react";
|
|
6192
|
-
import { jsx as
|
|
5804
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
6193
5805
|
var BoldIcon = memo26(({ className, ...props }) => {
|
|
6194
|
-
return /* @__PURE__ */
|
|
5806
|
+
return /* @__PURE__ */ jsx59(
|
|
6195
5807
|
"svg",
|
|
6196
5808
|
{
|
|
6197
5809
|
width: "24",
|
|
@@ -6201,7 +5813,7 @@ var BoldIcon = memo26(({ className, ...props }) => {
|
|
|
6201
5813
|
fill: "currentColor",
|
|
6202
5814
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6203
5815
|
...props,
|
|
6204
|
-
children: /* @__PURE__ */
|
|
5816
|
+
children: /* @__PURE__ */ jsx59(
|
|
6205
5817
|
"path",
|
|
6206
5818
|
{
|
|
6207
5819
|
fillRule: "evenodd",
|
|
@@ -6217,7 +5829,7 @@ BoldIcon.displayName = "BoldIcon";
|
|
|
6217
5829
|
|
|
6218
5830
|
// src/components/tiptap-icons/code2-icon.tsx
|
|
6219
5831
|
import { memo as memo27 } from "react";
|
|
6220
|
-
import { jsx as
|
|
5832
|
+
import { jsx as jsx60, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6221
5833
|
var Code2Icon = memo27(({ className, ...props }) => {
|
|
6222
5834
|
return /* @__PURE__ */ jsxs34(
|
|
6223
5835
|
"svg",
|
|
@@ -6230,21 +5842,21 @@ var Code2Icon = memo27(({ className, ...props }) => {
|
|
|
6230
5842
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6231
5843
|
...props,
|
|
6232
5844
|
children: [
|
|
6233
|
-
/* @__PURE__ */
|
|
5845
|
+
/* @__PURE__ */ jsx60(
|
|
6234
5846
|
"path",
|
|
6235
5847
|
{
|
|
6236
5848
|
d: "M15.4545 4.2983C15.6192 3.77115 15.3254 3.21028 14.7983 3.04554C14.2712 2.88081 13.7103 3.1746 13.5455 3.70175L8.54554 19.7017C8.38081 20.2289 8.6746 20.7898 9.20175 20.9545C9.72889 21.1192 10.2898 20.8254 10.4545 20.2983L15.4545 4.2983Z",
|
|
6237
5849
|
fill: "currentColor"
|
|
6238
5850
|
}
|
|
6239
5851
|
),
|
|
6240
|
-
/* @__PURE__ */
|
|
5852
|
+
/* @__PURE__ */ jsx60(
|
|
6241
5853
|
"path",
|
|
6242
5854
|
{
|
|
6243
5855
|
d: "M6.70711 7.29289C7.09763 7.68342 7.09763 8.31658 6.70711 8.70711L3.41421 12L6.70711 15.2929C7.09763 15.6834 7.09763 16.3166 6.70711 16.7071C6.31658 17.0976 5.68342 17.0976 5.29289 16.7071L1.29289 12.7071C0.902369 12.3166 0.902369 11.6834 1.29289 11.2929L5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.70711 7.29289Z",
|
|
6244
5856
|
fill: "currentColor"
|
|
6245
5857
|
}
|
|
6246
5858
|
),
|
|
6247
|
-
/* @__PURE__ */
|
|
5859
|
+
/* @__PURE__ */ jsx60(
|
|
6248
5860
|
"path",
|
|
6249
5861
|
{
|
|
6250
5862
|
d: "M17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289L22.7071 11.2929C23.0976 11.6834 23.0976 12.3166 22.7071 12.7071L18.7071 16.7071C18.3166 17.0976 17.6834 17.0976 17.2929 16.7071C16.9024 16.3166 16.9024 15.6834 17.2929 15.2929L20.5858 12L17.2929 8.70711C16.9024 8.31658 16.9024 7.68342 17.2929 7.29289Z",
|
|
@@ -6259,9 +5871,9 @@ Code2Icon.displayName = "Code2Icon";
|
|
|
6259
5871
|
|
|
6260
5872
|
// src/components/tiptap-icons/italic-icon.tsx
|
|
6261
5873
|
import { memo as memo28 } from "react";
|
|
6262
|
-
import { jsx as
|
|
5874
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
6263
5875
|
var ItalicIcon = memo28(({ className, ...props }) => {
|
|
6264
|
-
return /* @__PURE__ */
|
|
5876
|
+
return /* @__PURE__ */ jsx61(
|
|
6265
5877
|
"svg",
|
|
6266
5878
|
{
|
|
6267
5879
|
width: "24",
|
|
@@ -6271,7 +5883,7 @@ var ItalicIcon = memo28(({ className, ...props }) => {
|
|
|
6271
5883
|
fill: "currentColor",
|
|
6272
5884
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6273
5885
|
...props,
|
|
6274
|
-
children: /* @__PURE__ */
|
|
5886
|
+
children: /* @__PURE__ */ jsx61(
|
|
6275
5887
|
"path",
|
|
6276
5888
|
{
|
|
6277
5889
|
d: "M15.0222 3H19C19.5523 3 20 3.44772 20 4C20 4.55228 19.5523 5 19 5H15.693L10.443 19H14C14.5523 19 15 19.4477 15 20C15 20.5523 14.5523 21 14 21H9.02418C9.00802 21.0004 8.99181 21.0004 8.97557 21H5C4.44772 21 4 20.5523 4 20C4 19.4477 4.44772 19 5 19H8.30704L13.557 5H10C9.44772 5 9 4.55228 9 4C9 3.44772 9.44772 3 10 3H14.9782C14.9928 2.99968 15.0075 2.99967 15.0222 3Z",
|
|
@@ -6285,7 +5897,7 @@ ItalicIcon.displayName = "ItalicIcon";
|
|
|
6285
5897
|
|
|
6286
5898
|
// src/components/tiptap-icons/strike-icon.tsx
|
|
6287
5899
|
import { memo as memo29 } from "react";
|
|
6288
|
-
import { jsx as
|
|
5900
|
+
import { jsx as jsx62, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
6289
5901
|
var StrikeIcon = memo29(({ className, ...props }) => {
|
|
6290
5902
|
return /* @__PURE__ */ jsxs35(
|
|
6291
5903
|
"svg",
|
|
@@ -6298,14 +5910,14 @@ var StrikeIcon = memo29(({ className, ...props }) => {
|
|
|
6298
5910
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6299
5911
|
...props,
|
|
6300
5912
|
children: [
|
|
6301
|
-
/* @__PURE__ */
|
|
5913
|
+
/* @__PURE__ */ jsx62(
|
|
6302
5914
|
"path",
|
|
6303
5915
|
{
|
|
6304
5916
|
d: "M9.00039 3H16.0001C16.5524 3 17.0001 3.44772 17.0001 4C17.0001 4.55229 16.5524 5 16.0001 5H9.00011C8.68006 4.99983 8.36412 5.07648 8.07983 5.22349C7.79555 5.37051 7.55069 5.5836 7.36585 5.84487C7.181 6.10614 7.06155 6.40796 7.01754 6.72497C6.97352 7.04198 7.00623 7.36492 7.11292 7.66667C7.29701 8.18737 7.02414 8.75872 6.50344 8.94281C5.98274 9.1269 5.4114 8.85403 5.2273 8.33333C5.01393 7.72984 4.94851 7.08396 5.03654 6.44994C5.12456 5.81592 5.36346 5.21229 5.73316 4.68974C6.10285 4.1672 6.59256 3.74101 7.16113 3.44698C7.72955 3.15303 8.36047 2.99975 9.00039 3Z",
|
|
6305
5917
|
fill: "currentColor"
|
|
6306
5918
|
}
|
|
6307
5919
|
),
|
|
6308
|
-
/* @__PURE__ */
|
|
5920
|
+
/* @__PURE__ */ jsx62(
|
|
6309
5921
|
"path",
|
|
6310
5922
|
{
|
|
6311
5923
|
d: "M18 13H20C20.5523 13 21 12.5523 21 12C21 11.4477 20.5523 11 20 11H4C3.44772 11 3 11.4477 3 12C3 12.5523 3.44772 13 4 13H14C14.7956 13 15.5587 13.3161 16.1213 13.8787C16.6839 14.4413 17 15.2044 17 16C17 16.7956 16.6839 17.5587 16.1213 18.1213C15.5587 18.6839 14.7956 19 14 19H6C5.44772 19 5 19.4477 5 20C5 20.5523 5.44772 21 6 21H14C15.3261 21 16.5979 20.4732 17.5355 19.5355C18.4732 18.5979 19 17.3261 19 16C19 14.9119 18.6453 13.8604 18 13Z",
|
|
@@ -6320,7 +5932,7 @@ StrikeIcon.displayName = "StrikeIcon";
|
|
|
6320
5932
|
|
|
6321
5933
|
// src/components/tiptap-icons/subscript-icon.tsx
|
|
6322
5934
|
import { memo as memo30 } from "react";
|
|
6323
|
-
import { jsx as
|
|
5935
|
+
import { jsx as jsx63, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
6324
5936
|
var SubscriptIcon = memo30(({ className, ...props }) => {
|
|
6325
5937
|
return /* @__PURE__ */ jsxs36(
|
|
6326
5938
|
"svg",
|
|
@@ -6333,7 +5945,7 @@ var SubscriptIcon = memo30(({ className, ...props }) => {
|
|
|
6333
5945
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6334
5946
|
...props,
|
|
6335
5947
|
children: [
|
|
6336
|
-
/* @__PURE__ */
|
|
5948
|
+
/* @__PURE__ */ jsx63(
|
|
6337
5949
|
"path",
|
|
6338
5950
|
{
|
|
6339
5951
|
fillRule: "evenodd",
|
|
@@ -6342,7 +5954,7 @@ var SubscriptIcon = memo30(({ className, ...props }) => {
|
|
|
6342
5954
|
fill: "currentColor"
|
|
6343
5955
|
}
|
|
6344
5956
|
),
|
|
6345
|
-
/* @__PURE__ */
|
|
5957
|
+
/* @__PURE__ */ jsx63(
|
|
6346
5958
|
"path",
|
|
6347
5959
|
{
|
|
6348
5960
|
fillRule: "evenodd",
|
|
@@ -6351,7 +5963,7 @@ var SubscriptIcon = memo30(({ className, ...props }) => {
|
|
|
6351
5963
|
fill: "currentColor"
|
|
6352
5964
|
}
|
|
6353
5965
|
),
|
|
6354
|
-
/* @__PURE__ */
|
|
5966
|
+
/* @__PURE__ */ jsx63(
|
|
6355
5967
|
"path",
|
|
6356
5968
|
{
|
|
6357
5969
|
fillRule: "evenodd",
|
|
@@ -6368,7 +5980,7 @@ SubscriptIcon.displayName = "SubscriptIcon";
|
|
|
6368
5980
|
|
|
6369
5981
|
// src/components/tiptap-icons/superscript-icon.tsx
|
|
6370
5982
|
import { memo as memo31 } from "react";
|
|
6371
|
-
import { jsx as
|
|
5983
|
+
import { jsx as jsx64, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
6372
5984
|
var SuperscriptIcon = memo31(({ className, ...props }) => {
|
|
6373
5985
|
return /* @__PURE__ */ jsxs37(
|
|
6374
5986
|
"svg",
|
|
@@ -6381,7 +5993,7 @@ var SuperscriptIcon = memo31(({ className, ...props }) => {
|
|
|
6381
5993
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6382
5994
|
...props,
|
|
6383
5995
|
children: [
|
|
6384
|
-
/* @__PURE__ */
|
|
5996
|
+
/* @__PURE__ */ jsx64(
|
|
6385
5997
|
"path",
|
|
6386
5998
|
{
|
|
6387
5999
|
fillRule: "evenodd",
|
|
@@ -6390,7 +6002,7 @@ var SuperscriptIcon = memo31(({ className, ...props }) => {
|
|
|
6390
6002
|
fill: "currentColor"
|
|
6391
6003
|
}
|
|
6392
6004
|
),
|
|
6393
|
-
/* @__PURE__ */
|
|
6005
|
+
/* @__PURE__ */ jsx64(
|
|
6394
6006
|
"path",
|
|
6395
6007
|
{
|
|
6396
6008
|
fillRule: "evenodd",
|
|
@@ -6399,7 +6011,7 @@ var SuperscriptIcon = memo31(({ className, ...props }) => {
|
|
|
6399
6011
|
fill: "currentColor"
|
|
6400
6012
|
}
|
|
6401
6013
|
),
|
|
6402
|
-
/* @__PURE__ */
|
|
6014
|
+
/* @__PURE__ */ jsx64(
|
|
6403
6015
|
"path",
|
|
6404
6016
|
{
|
|
6405
6017
|
fillRule: "evenodd",
|
|
@@ -6416,9 +6028,9 @@ SuperscriptIcon.displayName = "SuperscriptIcon";
|
|
|
6416
6028
|
|
|
6417
6029
|
// src/components/tiptap-icons/underline-icon.tsx
|
|
6418
6030
|
import { memo as memo32 } from "react";
|
|
6419
|
-
import { jsx as
|
|
6031
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
6420
6032
|
var UnderlineIcon = memo32(({ className, ...props }) => {
|
|
6421
|
-
return /* @__PURE__ */
|
|
6033
|
+
return /* @__PURE__ */ jsx65(
|
|
6422
6034
|
"svg",
|
|
6423
6035
|
{
|
|
6424
6036
|
width: "24",
|
|
@@ -6428,7 +6040,7 @@ var UnderlineIcon = memo32(({ className, ...props }) => {
|
|
|
6428
6040
|
fill: "currentColor",
|
|
6429
6041
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6430
6042
|
...props,
|
|
6431
|
-
children: /* @__PURE__ */
|
|
6043
|
+
children: /* @__PURE__ */ jsx65(
|
|
6432
6044
|
"path",
|
|
6433
6045
|
{
|
|
6434
6046
|
fillRule: "evenodd",
|
|
@@ -6531,12 +6143,12 @@ function useMark(config) {
|
|
|
6531
6143
|
|
|
6532
6144
|
// src/components/tiptap-ui/text-align-button/text-align-button.tsx
|
|
6533
6145
|
import { forwardRef as forwardRef17, useCallback as useCallback24 } from "react";
|
|
6534
|
-
import { Fragment as Fragment10, jsx as
|
|
6146
|
+
import { Fragment as Fragment10, jsx as jsx66, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
6535
6147
|
function TextAlignShortcutBadge({
|
|
6536
6148
|
align,
|
|
6537
6149
|
shortcutKeys = TEXT_ALIGN_SHORTCUT_KEYS[align]
|
|
6538
6150
|
}) {
|
|
6539
|
-
return /* @__PURE__ */
|
|
6151
|
+
return /* @__PURE__ */ jsx66(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
|
|
6540
6152
|
}
|
|
6541
6153
|
var TextAlignButton = forwardRef17(
|
|
6542
6154
|
({
|
|
@@ -6578,7 +6190,7 @@ var TextAlignButton = forwardRef17(
|
|
|
6578
6190
|
return null;
|
|
6579
6191
|
}
|
|
6580
6192
|
const RenderIcon = CustomIcon ?? Icon;
|
|
6581
|
-
return /* @__PURE__ */
|
|
6193
|
+
return /* @__PURE__ */ jsx66(
|
|
6582
6194
|
Button2,
|
|
6583
6195
|
{
|
|
6584
6196
|
type: "button",
|
|
@@ -6595,9 +6207,9 @@ var TextAlignButton = forwardRef17(
|
|
|
6595
6207
|
...buttonProps,
|
|
6596
6208
|
ref,
|
|
6597
6209
|
children: children ?? /* @__PURE__ */ jsxs38(Fragment10, { children: [
|
|
6598
|
-
/* @__PURE__ */
|
|
6599
|
-
text && /* @__PURE__ */
|
|
6600
|
-
showShortcut && /* @__PURE__ */
|
|
6210
|
+
/* @__PURE__ */ jsx66(RenderIcon, { className: "tiptap-button-icon" }),
|
|
6211
|
+
text && /* @__PURE__ */ jsx66("span", { className: "tiptap-button-text", children: text }),
|
|
6212
|
+
showShortcut && /* @__PURE__ */ jsx66(
|
|
6601
6213
|
TextAlignShortcutBadge,
|
|
6602
6214
|
{
|
|
6603
6215
|
align,
|
|
@@ -6616,7 +6228,7 @@ import { useCallback as useCallback25, useEffect as useEffect16, useState as use
|
|
|
6616
6228
|
|
|
6617
6229
|
// src/components/tiptap-icons/align-center-icon.tsx
|
|
6618
6230
|
import { memo as memo33 } from "react";
|
|
6619
|
-
import { jsx as
|
|
6231
|
+
import { jsx as jsx67, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
6620
6232
|
var AlignCenterIcon = memo33(({ className, ...props }) => {
|
|
6621
6233
|
return /* @__PURE__ */ jsxs39(
|
|
6622
6234
|
"svg",
|
|
@@ -6629,7 +6241,7 @@ var AlignCenterIcon = memo33(({ className, ...props }) => {
|
|
|
6629
6241
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6630
6242
|
...props,
|
|
6631
6243
|
children: [
|
|
6632
|
-
/* @__PURE__ */
|
|
6244
|
+
/* @__PURE__ */ jsx67(
|
|
6633
6245
|
"path",
|
|
6634
6246
|
{
|
|
6635
6247
|
fillRule: "evenodd",
|
|
@@ -6638,7 +6250,7 @@ var AlignCenterIcon = memo33(({ className, ...props }) => {
|
|
|
6638
6250
|
fill: "currentColor"
|
|
6639
6251
|
}
|
|
6640
6252
|
),
|
|
6641
|
-
/* @__PURE__ */
|
|
6253
|
+
/* @__PURE__ */ jsx67(
|
|
6642
6254
|
"path",
|
|
6643
6255
|
{
|
|
6644
6256
|
fillRule: "evenodd",
|
|
@@ -6647,7 +6259,7 @@ var AlignCenterIcon = memo33(({ className, ...props }) => {
|
|
|
6647
6259
|
fill: "currentColor"
|
|
6648
6260
|
}
|
|
6649
6261
|
),
|
|
6650
|
-
/* @__PURE__ */
|
|
6262
|
+
/* @__PURE__ */ jsx67(
|
|
6651
6263
|
"path",
|
|
6652
6264
|
{
|
|
6653
6265
|
fillRule: "evenodd",
|
|
@@ -6664,7 +6276,7 @@ AlignCenterIcon.displayName = "AlignCenterIcon";
|
|
|
6664
6276
|
|
|
6665
6277
|
// src/components/tiptap-icons/align-justify-icon.tsx
|
|
6666
6278
|
import { memo as memo34 } from "react";
|
|
6667
|
-
import { jsx as
|
|
6279
|
+
import { jsx as jsx68, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
6668
6280
|
var AlignJustifyIcon = memo34(({ className, ...props }) => {
|
|
6669
6281
|
return /* @__PURE__ */ jsxs40(
|
|
6670
6282
|
"svg",
|
|
@@ -6677,7 +6289,7 @@ var AlignJustifyIcon = memo34(({ className, ...props }) => {
|
|
|
6677
6289
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6678
6290
|
...props,
|
|
6679
6291
|
children: [
|
|
6680
|
-
/* @__PURE__ */
|
|
6292
|
+
/* @__PURE__ */ jsx68(
|
|
6681
6293
|
"path",
|
|
6682
6294
|
{
|
|
6683
6295
|
fillRule: "evenodd",
|
|
@@ -6686,7 +6298,7 @@ var AlignJustifyIcon = memo34(({ className, ...props }) => {
|
|
|
6686
6298
|
fill: "currentColor"
|
|
6687
6299
|
}
|
|
6688
6300
|
),
|
|
6689
|
-
/* @__PURE__ */
|
|
6301
|
+
/* @__PURE__ */ jsx68(
|
|
6690
6302
|
"path",
|
|
6691
6303
|
{
|
|
6692
6304
|
fillRule: "evenodd",
|
|
@@ -6695,7 +6307,7 @@ var AlignJustifyIcon = memo34(({ className, ...props }) => {
|
|
|
6695
6307
|
fill: "currentColor"
|
|
6696
6308
|
}
|
|
6697
6309
|
),
|
|
6698
|
-
/* @__PURE__ */
|
|
6310
|
+
/* @__PURE__ */ jsx68(
|
|
6699
6311
|
"path",
|
|
6700
6312
|
{
|
|
6701
6313
|
fillRule: "evenodd",
|
|
@@ -6712,7 +6324,7 @@ AlignJustifyIcon.displayName = "AlignJustifyIcon";
|
|
|
6712
6324
|
|
|
6713
6325
|
// src/components/tiptap-icons/align-left-icon.tsx
|
|
6714
6326
|
import { memo as memo35 } from "react";
|
|
6715
|
-
import { jsx as
|
|
6327
|
+
import { jsx as jsx69, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
6716
6328
|
var AlignLeftIcon = memo35(({ className, ...props }) => {
|
|
6717
6329
|
return /* @__PURE__ */ jsxs41(
|
|
6718
6330
|
"svg",
|
|
@@ -6725,7 +6337,7 @@ var AlignLeftIcon = memo35(({ className, ...props }) => {
|
|
|
6725
6337
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6726
6338
|
...props,
|
|
6727
6339
|
children: [
|
|
6728
|
-
/* @__PURE__ */
|
|
6340
|
+
/* @__PURE__ */ jsx69(
|
|
6729
6341
|
"path",
|
|
6730
6342
|
{
|
|
6731
6343
|
fillRule: "evenodd",
|
|
@@ -6734,7 +6346,7 @@ var AlignLeftIcon = memo35(({ className, ...props }) => {
|
|
|
6734
6346
|
fill: "currentColor"
|
|
6735
6347
|
}
|
|
6736
6348
|
),
|
|
6737
|
-
/* @__PURE__ */
|
|
6349
|
+
/* @__PURE__ */ jsx69(
|
|
6738
6350
|
"path",
|
|
6739
6351
|
{
|
|
6740
6352
|
fillRule: "evenodd",
|
|
@@ -6743,7 +6355,7 @@ var AlignLeftIcon = memo35(({ className, ...props }) => {
|
|
|
6743
6355
|
fill: "currentColor"
|
|
6744
6356
|
}
|
|
6745
6357
|
),
|
|
6746
|
-
/* @__PURE__ */
|
|
6358
|
+
/* @__PURE__ */ jsx69(
|
|
6747
6359
|
"path",
|
|
6748
6360
|
{
|
|
6749
6361
|
fillRule: "evenodd",
|
|
@@ -6760,7 +6372,7 @@ AlignLeftIcon.displayName = "AlignLeftIcon";
|
|
|
6760
6372
|
|
|
6761
6373
|
// src/components/tiptap-icons/align-right-icon.tsx
|
|
6762
6374
|
import { memo as memo36 } from "react";
|
|
6763
|
-
import { jsx as
|
|
6375
|
+
import { jsx as jsx70, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
6764
6376
|
var AlignRightIcon = memo36(({ className, ...props }) => {
|
|
6765
6377
|
return /* @__PURE__ */ jsxs42(
|
|
6766
6378
|
"svg",
|
|
@@ -6773,7 +6385,7 @@ var AlignRightIcon = memo36(({ className, ...props }) => {
|
|
|
6773
6385
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6774
6386
|
...props,
|
|
6775
6387
|
children: [
|
|
6776
|
-
/* @__PURE__ */
|
|
6388
|
+
/* @__PURE__ */ jsx70(
|
|
6777
6389
|
"path",
|
|
6778
6390
|
{
|
|
6779
6391
|
fillRule: "evenodd",
|
|
@@ -6782,7 +6394,7 @@ var AlignRightIcon = memo36(({ className, ...props }) => {
|
|
|
6782
6394
|
fill: "currentColor"
|
|
6783
6395
|
}
|
|
6784
6396
|
),
|
|
6785
|
-
/* @__PURE__ */
|
|
6397
|
+
/* @__PURE__ */ jsx70(
|
|
6786
6398
|
"path",
|
|
6787
6399
|
{
|
|
6788
6400
|
fillRule: "evenodd",
|
|
@@ -6791,7 +6403,7 @@ var AlignRightIcon = memo36(({ className, ...props }) => {
|
|
|
6791
6403
|
fill: "currentColor"
|
|
6792
6404
|
}
|
|
6793
6405
|
),
|
|
6794
|
-
/* @__PURE__ */
|
|
6406
|
+
/* @__PURE__ */ jsx70(
|
|
6795
6407
|
"path",
|
|
6796
6408
|
{
|
|
6797
6409
|
fillRule: "evenodd",
|
|
@@ -6899,12 +6511,12 @@ function useTextAlign(config) {
|
|
|
6899
6511
|
|
|
6900
6512
|
// src/components/tiptap-ui/undo-redo-button/undo-redo-button.tsx
|
|
6901
6513
|
import { forwardRef as forwardRef18, useCallback as useCallback26 } from "react";
|
|
6902
|
-
import { Fragment as Fragment11, jsx as
|
|
6514
|
+
import { Fragment as Fragment11, jsx as jsx71, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
6903
6515
|
function HistoryShortcutBadge({
|
|
6904
6516
|
action,
|
|
6905
6517
|
shortcutKeys = UNDO_REDO_SHORTCUT_KEYS[action]
|
|
6906
6518
|
}) {
|
|
6907
|
-
return /* @__PURE__ */
|
|
6519
|
+
return /* @__PURE__ */ jsx71(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
|
|
6908
6520
|
}
|
|
6909
6521
|
var UndoRedoButton = forwardRef18(
|
|
6910
6522
|
({
|
|
@@ -6936,7 +6548,7 @@ var UndoRedoButton = forwardRef18(
|
|
|
6936
6548
|
if (!isVisible) {
|
|
6937
6549
|
return null;
|
|
6938
6550
|
}
|
|
6939
|
-
return /* @__PURE__ */
|
|
6551
|
+
return /* @__PURE__ */ jsx71(
|
|
6940
6552
|
Button2,
|
|
6941
6553
|
{
|
|
6942
6554
|
type: "button",
|
|
@@ -6951,9 +6563,9 @@ var UndoRedoButton = forwardRef18(
|
|
|
6951
6563
|
...buttonProps,
|
|
6952
6564
|
ref,
|
|
6953
6565
|
children: children ?? /* @__PURE__ */ jsxs43(Fragment11, { children: [
|
|
6954
|
-
/* @__PURE__ */
|
|
6955
|
-
text && /* @__PURE__ */
|
|
6956
|
-
showShortcut && /* @__PURE__ */
|
|
6566
|
+
/* @__PURE__ */ jsx71(Icon, { className: "tiptap-button-icon" }),
|
|
6567
|
+
text && /* @__PURE__ */ jsx71("span", { className: "tiptap-button-text", children: text }),
|
|
6568
|
+
showShortcut && /* @__PURE__ */ jsx71(
|
|
6957
6569
|
HistoryShortcutBadge,
|
|
6958
6570
|
{
|
|
6959
6571
|
action,
|
|
@@ -6972,9 +6584,9 @@ import { useCallback as useCallback27, useEffect as useEffect17, useState as use
|
|
|
6972
6584
|
|
|
6973
6585
|
// src/components/tiptap-icons/redo2-icon.tsx
|
|
6974
6586
|
import { memo as memo37 } from "react";
|
|
6975
|
-
import { jsx as
|
|
6587
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
6976
6588
|
var Redo2Icon = memo37(({ className, ...props }) => {
|
|
6977
|
-
return /* @__PURE__ */
|
|
6589
|
+
return /* @__PURE__ */ jsx72(
|
|
6978
6590
|
"svg",
|
|
6979
6591
|
{
|
|
6980
6592
|
width: "24",
|
|
@@ -6984,7 +6596,7 @@ var Redo2Icon = memo37(({ className, ...props }) => {
|
|
|
6984
6596
|
fill: "currentColor",
|
|
6985
6597
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6986
6598
|
...props,
|
|
6987
|
-
children: /* @__PURE__ */
|
|
6599
|
+
children: /* @__PURE__ */ jsx72(
|
|
6988
6600
|
"path",
|
|
6989
6601
|
{
|
|
6990
6602
|
fillRule: "evenodd",
|
|
@@ -7000,9 +6612,9 @@ Redo2Icon.displayName = "Redo2Icon";
|
|
|
7000
6612
|
|
|
7001
6613
|
// src/components/tiptap-icons/undo2-icon.tsx
|
|
7002
6614
|
import { memo as memo38 } from "react";
|
|
7003
|
-
import { jsx as
|
|
6615
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
7004
6616
|
var Undo2Icon = memo38(({ className, ...props }) => {
|
|
7005
|
-
return /* @__PURE__ */
|
|
6617
|
+
return /* @__PURE__ */ jsx73(
|
|
7006
6618
|
"svg",
|
|
7007
6619
|
{
|
|
7008
6620
|
width: "24",
|
|
@@ -7012,7 +6624,7 @@ var Undo2Icon = memo38(({ className, ...props }) => {
|
|
|
7012
6624
|
fill: "currentColor",
|
|
7013
6625
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7014
6626
|
...props,
|
|
7015
|
-
children: /* @__PURE__ */
|
|
6627
|
+
children: /* @__PURE__ */ jsx73(
|
|
7016
6628
|
"path",
|
|
7017
6629
|
{
|
|
7018
6630
|
fillRule: "evenodd",
|
|
@@ -7288,12 +6900,12 @@ import { ChevronDown } from "lucide-react";
|
|
|
7288
6900
|
// src/components/ui/command.tsx
|
|
7289
6901
|
import { Command as CommandPrimitive } from "cmdk";
|
|
7290
6902
|
import { SearchIcon } from "lucide-react";
|
|
7291
|
-
import { jsx as
|
|
6903
|
+
import { jsx as jsx74, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
7292
6904
|
function Command({
|
|
7293
6905
|
className,
|
|
7294
6906
|
...props
|
|
7295
6907
|
}) {
|
|
7296
|
-
return /* @__PURE__ */
|
|
6908
|
+
return /* @__PURE__ */ jsx74(
|
|
7297
6909
|
CommandPrimitive,
|
|
7298
6910
|
{
|
|
7299
6911
|
"data-slot": "command",
|
|
@@ -7315,8 +6927,8 @@ function CommandInput({
|
|
|
7315
6927
|
"data-slot": "command-input-wrapper",
|
|
7316
6928
|
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
7317
6929
|
children: [
|
|
7318
|
-
/* @__PURE__ */
|
|
7319
|
-
/* @__PURE__ */
|
|
6930
|
+
/* @__PURE__ */ jsx74(SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
|
|
6931
|
+
/* @__PURE__ */ jsx74(
|
|
7320
6932
|
CommandPrimitive.Input,
|
|
7321
6933
|
{
|
|
7322
6934
|
"data-slot": "command-input",
|
|
@@ -7335,7 +6947,7 @@ function CommandList({
|
|
|
7335
6947
|
className,
|
|
7336
6948
|
...props
|
|
7337
6949
|
}) {
|
|
7338
|
-
return /* @__PURE__ */
|
|
6950
|
+
return /* @__PURE__ */ jsx74(
|
|
7339
6951
|
CommandPrimitive.List,
|
|
7340
6952
|
{
|
|
7341
6953
|
"data-slot": "command-list",
|
|
@@ -7350,7 +6962,7 @@ function CommandList({
|
|
|
7350
6962
|
function CommandEmpty({
|
|
7351
6963
|
...props
|
|
7352
6964
|
}) {
|
|
7353
|
-
return /* @__PURE__ */
|
|
6965
|
+
return /* @__PURE__ */ jsx74(
|
|
7354
6966
|
CommandPrimitive.Empty,
|
|
7355
6967
|
{
|
|
7356
6968
|
"data-slot": "command-empty",
|
|
@@ -7363,7 +6975,7 @@ function CommandGroup({
|
|
|
7363
6975
|
className,
|
|
7364
6976
|
...props
|
|
7365
6977
|
}) {
|
|
7366
|
-
return /* @__PURE__ */
|
|
6978
|
+
return /* @__PURE__ */ jsx74(
|
|
7367
6979
|
CommandPrimitive.Group,
|
|
7368
6980
|
{
|
|
7369
6981
|
"data-slot": "command-group",
|
|
@@ -7379,7 +6991,7 @@ function CommandItem({
|
|
|
7379
6991
|
className,
|
|
7380
6992
|
...props
|
|
7381
6993
|
}) {
|
|
7382
|
-
return /* @__PURE__ */
|
|
6994
|
+
return /* @__PURE__ */ jsx74(
|
|
7383
6995
|
CommandPrimitive.Item,
|
|
7384
6996
|
{
|
|
7385
6997
|
"data-slot": "command-item",
|
|
@@ -7394,16 +7006,16 @@ function CommandItem({
|
|
|
7394
7006
|
|
|
7395
7007
|
// src/components/ui/popover.tsx
|
|
7396
7008
|
import * as PopoverPrimitive2 from "@radix-ui/react-popover";
|
|
7397
|
-
import { jsx as
|
|
7009
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
7398
7010
|
function Popover2({
|
|
7399
7011
|
...props
|
|
7400
7012
|
}) {
|
|
7401
|
-
return /* @__PURE__ */
|
|
7013
|
+
return /* @__PURE__ */ jsx75(PopoverPrimitive2.Root, { "data-slot": "popover", ...props });
|
|
7402
7014
|
}
|
|
7403
7015
|
function PopoverTrigger2({
|
|
7404
7016
|
...props
|
|
7405
7017
|
}) {
|
|
7406
|
-
return /* @__PURE__ */
|
|
7018
|
+
return /* @__PURE__ */ jsx75(PopoverPrimitive2.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
7407
7019
|
}
|
|
7408
7020
|
function PopoverContent2({
|
|
7409
7021
|
className,
|
|
@@ -7411,7 +7023,7 @@ function PopoverContent2({
|
|
|
7411
7023
|
sideOffset = 4,
|
|
7412
7024
|
...props
|
|
7413
7025
|
}) {
|
|
7414
|
-
return /* @__PURE__ */
|
|
7026
|
+
return /* @__PURE__ */ jsx75(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx75(
|
|
7415
7027
|
PopoverPrimitive2.Content,
|
|
7416
7028
|
{
|
|
7417
7029
|
"data-slot": "popover-content",
|
|
@@ -7427,7 +7039,7 @@ function PopoverContent2({
|
|
|
7427
7039
|
}
|
|
7428
7040
|
|
|
7429
7041
|
// src/components/tiptap-ui/font-family-dropdown/font-family-dropdown.tsx
|
|
7430
|
-
import { jsx as
|
|
7042
|
+
import { jsx as jsx76, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
7431
7043
|
function FontFamilyDropdown() {
|
|
7432
7044
|
const { editor } = useCurrentEditor3();
|
|
7433
7045
|
const [open, setOpen] = useState28(false);
|
|
@@ -7454,18 +7066,18 @@ function FontFamilyDropdown() {
|
|
|
7454
7066
|
editor.chain().focus().setMark("textStyle", { fontFamily: family }).run();
|
|
7455
7067
|
};
|
|
7456
7068
|
return /* @__PURE__ */ jsxs45(Popover2, { open, onOpenChange: setOpen, children: [
|
|
7457
|
-
/* @__PURE__ */
|
|
7069
|
+
/* @__PURE__ */ jsx76(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs45(
|
|
7458
7070
|
Button,
|
|
7459
7071
|
{
|
|
7460
7072
|
variant: "outlineFontFamily",
|
|
7461
7073
|
className: "min-w-[90px] h-7 px-2 flex items-center justify-between rounded-sm border-[#a3a3a8] text-[#a3a3a8] hover:border-[#000] hover:text-[#fff] transition-colors",
|
|
7462
7074
|
children: [
|
|
7463
7075
|
currentFont,
|
|
7464
|
-
/* @__PURE__ */
|
|
7076
|
+
/* @__PURE__ */ jsx76(ChevronDown, { className: "w-4 h-4" })
|
|
7465
7077
|
]
|
|
7466
7078
|
}
|
|
7467
7079
|
) }),
|
|
7468
|
-
/* @__PURE__ */
|
|
7080
|
+
/* @__PURE__ */ jsx76(
|
|
7469
7081
|
PopoverContent2,
|
|
7470
7082
|
{
|
|
7471
7083
|
className: "w-[300px] p-0",
|
|
@@ -7477,11 +7089,11 @@ function FontFamilyDropdown() {
|
|
|
7477
7089
|
}
|
|
7478
7090
|
},
|
|
7479
7091
|
children: /* @__PURE__ */ jsxs45(Command, { children: [
|
|
7480
|
-
/* @__PURE__ */
|
|
7092
|
+
/* @__PURE__ */ jsx76("div", { className: "cmd-input-wrapper", children: /* @__PURE__ */ jsx76(CommandInput, { placeholder: "Search font..." }) }),
|
|
7481
7093
|
/* @__PURE__ */ jsxs45(CommandList, { className: "max-h-[220px]", children: [
|
|
7482
|
-
/* @__PURE__ */
|
|
7094
|
+
/* @__PURE__ */ jsx76(CommandEmpty, { children: "No font found." }),
|
|
7483
7095
|
/* @__PURE__ */ jsxs45(CommandGroup, { children: [
|
|
7484
|
-
/* @__PURE__ */
|
|
7096
|
+
/* @__PURE__ */ jsx76(
|
|
7485
7097
|
CommandItem,
|
|
7486
7098
|
{
|
|
7487
7099
|
onSelect: () => {
|
|
@@ -7494,7 +7106,7 @@ function FontFamilyDropdown() {
|
|
|
7494
7106
|
},
|
|
7495
7107
|
"default"
|
|
7496
7108
|
),
|
|
7497
|
-
FONT_OPTIONS.map(({ label, cssFontFamily }) => /* @__PURE__ */
|
|
7109
|
+
FONT_OPTIONS.map(({ label, cssFontFamily }) => /* @__PURE__ */ jsx76(
|
|
7498
7110
|
CommandItem,
|
|
7499
7111
|
{
|
|
7500
7112
|
onSelect: () => {
|
|
@@ -7522,12 +7134,12 @@ import { debounce } from "lodash";
|
|
|
7522
7134
|
|
|
7523
7135
|
// src/components/ui/label.tsx
|
|
7524
7136
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
7525
|
-
import { jsx as
|
|
7137
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
7526
7138
|
function Label({
|
|
7527
7139
|
className,
|
|
7528
7140
|
...props
|
|
7529
7141
|
}) {
|
|
7530
|
-
return /* @__PURE__ */
|
|
7142
|
+
return /* @__PURE__ */ jsx77(
|
|
7531
7143
|
LabelPrimitive.Root,
|
|
7532
7144
|
{
|
|
7533
7145
|
"data-slot": "label",
|
|
@@ -7542,7 +7154,7 @@ function Label({
|
|
|
7542
7154
|
|
|
7543
7155
|
// src/components/tiptap-ui/color-picker/color-picker.tsx
|
|
7544
7156
|
import React4 from "react";
|
|
7545
|
-
import { jsx as
|
|
7157
|
+
import { jsx as jsx78, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
7546
7158
|
function ColorPicker({ type = "text" }) {
|
|
7547
7159
|
const { editor } = useCurrentEditor4();
|
|
7548
7160
|
const [open, setOpen] = useState29(false);
|
|
@@ -7593,14 +7205,14 @@ function ColorPicker({ type = "text" }) {
|
|
|
7593
7205
|
);
|
|
7594
7206
|
if (!editor) return null;
|
|
7595
7207
|
return /* @__PURE__ */ jsxs46(Popover2, { open, onOpenChange: (v) => setOpen(v), children: [
|
|
7596
|
-
/* @__PURE__ */
|
|
7208
|
+
/* @__PURE__ */ jsx78(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs46(
|
|
7597
7209
|
Button,
|
|
7598
7210
|
{
|
|
7599
7211
|
variant: "outlineFontFamily",
|
|
7600
7212
|
className: "flex items-center h-7 rounded-sm px-2 border-[#a3a3a8] text-[#a3a3a8] hover:text-white",
|
|
7601
7213
|
children: [
|
|
7602
7214
|
"Color",
|
|
7603
|
-
/* @__PURE__ */
|
|
7215
|
+
/* @__PURE__ */ jsx78(
|
|
7604
7216
|
"span",
|
|
7605
7217
|
{
|
|
7606
7218
|
className: "w-3 h-3 ml-2 rounded-sm border border-black/20",
|
|
@@ -7617,9 +7229,9 @@ function ColorPicker({ type = "text" }) {
|
|
|
7617
7229
|
align: "start",
|
|
7618
7230
|
onClick: (e) => e.stopPropagation(),
|
|
7619
7231
|
children: [
|
|
7620
|
-
/* @__PURE__ */
|
|
7232
|
+
/* @__PURE__ */ jsx78(Label, { className: "text-xs mb-2", children: type === "text" ? "Text Color" : "Highlight Color" }),
|
|
7621
7233
|
!showCustom && /* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-3", children: [
|
|
7622
|
-
/* @__PURE__ */
|
|
7234
|
+
/* @__PURE__ */ jsx78("div", { className: "grid grid-cols-7 gap-1", children: GRADIENT_ROWS_70.map((c) => /* @__PURE__ */ jsx78(
|
|
7623
7235
|
"div",
|
|
7624
7236
|
{
|
|
7625
7237
|
onClick: () => {
|
|
@@ -7631,7 +7243,7 @@ function ColorPicker({ type = "text" }) {
|
|
|
7631
7243
|
},
|
|
7632
7244
|
c
|
|
7633
7245
|
)) }),
|
|
7634
|
-
/* @__PURE__ */
|
|
7246
|
+
/* @__PURE__ */ jsx78(
|
|
7635
7247
|
Button,
|
|
7636
7248
|
{
|
|
7637
7249
|
size: "sm",
|
|
@@ -7655,7 +7267,7 @@ function ColorPicker({ type = "text" }) {
|
|
|
7655
7267
|
onPointerUp: (e) => e.stopPropagation(),
|
|
7656
7268
|
onClick: (e) => e.stopPropagation(),
|
|
7657
7269
|
children: [
|
|
7658
|
-
/* @__PURE__ */
|
|
7270
|
+
/* @__PURE__ */ jsx78(
|
|
7659
7271
|
HexColorPicker,
|
|
7660
7272
|
{
|
|
7661
7273
|
color: tempHex,
|
|
@@ -7667,7 +7279,7 @@ function ColorPicker({ type = "text" }) {
|
|
|
7667
7279
|
}
|
|
7668
7280
|
),
|
|
7669
7281
|
/* @__PURE__ */ jsxs46("div", { className: "flex gap-2 items-center", children: [
|
|
7670
|
-
/* @__PURE__ */
|
|
7282
|
+
/* @__PURE__ */ jsx78(
|
|
7671
7283
|
"input",
|
|
7672
7284
|
{
|
|
7673
7285
|
value: tempHex,
|
|
@@ -7678,7 +7290,7 @@ function ColorPicker({ type = "text" }) {
|
|
|
7678
7290
|
className: "w-full px-2 py-1 border rounded text-sm"
|
|
7679
7291
|
}
|
|
7680
7292
|
),
|
|
7681
|
-
/* @__PURE__ */
|
|
7293
|
+
/* @__PURE__ */ jsx78(
|
|
7682
7294
|
Button,
|
|
7683
7295
|
{
|
|
7684
7296
|
size: "sm",
|
|
@@ -7691,7 +7303,7 @@ function ColorPicker({ type = "text" }) {
|
|
|
7691
7303
|
}
|
|
7692
7304
|
)
|
|
7693
7305
|
] }),
|
|
7694
|
-
/* @__PURE__ */
|
|
7306
|
+
/* @__PURE__ */ jsx78("div", { className: "flex justify-end mt-2", children: /* @__PURE__ */ jsx78(
|
|
7695
7307
|
Button,
|
|
7696
7308
|
{
|
|
7697
7309
|
size: "sm",
|
|
@@ -7719,7 +7331,7 @@ function ColorPicker({ type = "text" }) {
|
|
|
7719
7331
|
import { useState as useState30 } from "react";
|
|
7720
7332
|
import { useCurrentEditor as useCurrentEditor5 } from "@tiptap/react";
|
|
7721
7333
|
import { FiTable } from "react-icons/fi";
|
|
7722
|
-
import { jsx as
|
|
7334
|
+
import { jsx as jsx79, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
7723
7335
|
function TableDropdownMenu() {
|
|
7724
7336
|
const { editor } = useCurrentEditor5();
|
|
7725
7337
|
const [open, setOpen] = useState30(false);
|
|
@@ -7762,20 +7374,20 @@ function TableDropdownMenu() {
|
|
|
7762
7374
|
setOpen(false);
|
|
7763
7375
|
};
|
|
7764
7376
|
return /* @__PURE__ */ jsxs47(Popover2, { open, onOpenChange: setOpen, children: [
|
|
7765
|
-
/* @__PURE__ */
|
|
7766
|
-
/* @__PURE__ */
|
|
7767
|
-
/* @__PURE__ */
|
|
7768
|
-
/* @__PURE__ */
|
|
7769
|
-
/* @__PURE__ */
|
|
7770
|
-
/* @__PURE__ */
|
|
7771
|
-
/* @__PURE__ */
|
|
7772
|
-
/* @__PURE__ */
|
|
7773
|
-
/* @__PURE__ */
|
|
7774
|
-
/* @__PURE__ */
|
|
7775
|
-
/* @__PURE__ */
|
|
7776
|
-
/* @__PURE__ */
|
|
7777
|
-
/* @__PURE__ */
|
|
7778
|
-
/* @__PURE__ */
|
|
7377
|
+
/* @__PURE__ */ jsx79(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx79(Button, { variant: "tableButton", size: "sm", children: /* @__PURE__ */ jsx79(FiTable, { size: 16, color: "#a3a3a8" }) }) }),
|
|
7378
|
+
/* @__PURE__ */ jsx79(PopoverContent2, { className: "w-[220px] p-0", align: "start", children: /* @__PURE__ */ jsxs47(Command, { children: [
|
|
7379
|
+
/* @__PURE__ */ jsx79(CommandInput, { placeholder: "Search table actions..." }),
|
|
7380
|
+
/* @__PURE__ */ jsx79(CommandList, { className: "max-h-[260px]", children: /* @__PURE__ */ jsxs47(CommandGroup, { children: [
|
|
7381
|
+
/* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("insert"), children: "Insert Table" }),
|
|
7382
|
+
/* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("addColBefore"), children: "Add Column Before" }),
|
|
7383
|
+
/* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("addColAfter"), children: "Add Column After" }),
|
|
7384
|
+
/* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("delCol"), children: "Delete Column" }),
|
|
7385
|
+
/* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("addRowBefore"), children: "Add Row Before" }),
|
|
7386
|
+
/* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("addRowAfter"), children: "Add Row After" }),
|
|
7387
|
+
/* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("delRow"), children: "Delete Row" }),
|
|
7388
|
+
/* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("merge"), children: "Merge Cells" }),
|
|
7389
|
+
/* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("split"), children: "Split Cells" }),
|
|
7390
|
+
/* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("deleteTable"), children: "Delete Table" })
|
|
7779
7391
|
] }) })
|
|
7780
7392
|
] }) })
|
|
7781
7393
|
] });
|
|
@@ -7783,9 +7395,9 @@ function TableDropdownMenu() {
|
|
|
7783
7395
|
|
|
7784
7396
|
// src/components/tiptap-icons/arrow-left-icon.tsx
|
|
7785
7397
|
import { memo as memo39 } from "react";
|
|
7786
|
-
import { jsx as
|
|
7398
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
7787
7399
|
var ArrowLeftIcon = memo39(({ className, ...props }) => {
|
|
7788
|
-
return /* @__PURE__ */
|
|
7400
|
+
return /* @__PURE__ */ jsx80(
|
|
7789
7401
|
"svg",
|
|
7790
7402
|
{
|
|
7791
7403
|
width: "24",
|
|
@@ -7795,7 +7407,7 @@ var ArrowLeftIcon = memo39(({ className, ...props }) => {
|
|
|
7795
7407
|
fill: "currentColor",
|
|
7796
7408
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7797
7409
|
...props,
|
|
7798
|
-
children: /* @__PURE__ */
|
|
7410
|
+
children: /* @__PURE__ */ jsx80(
|
|
7799
7411
|
"path",
|
|
7800
7412
|
{
|
|
7801
7413
|
d: "M12.7071 5.70711C13.0976 5.31658 13.0976 4.68342 12.7071 4.29289C12.3166 3.90237 11.6834 3.90237 11.2929 4.29289L4.29289 11.2929C3.90237 11.6834 3.90237 12.3166 4.29289 12.7071L11.2929 19.7071C11.6834 20.0976 12.3166 20.0976 12.7071 19.7071C13.0976 19.3166 13.0976 18.6834 12.7071 18.2929L7.41421 13L19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11L7.41421 11L12.7071 5.70711Z",
|
|
@@ -8021,62 +7633,62 @@ function useCursorVisibility({
|
|
|
8021
7633
|
}
|
|
8022
7634
|
|
|
8023
7635
|
// src/components/tiptap-templates/simple/simple-editor.tsx
|
|
8024
|
-
import { Fragment as Fragment12, jsx as
|
|
7636
|
+
import { Fragment as Fragment12, jsx as jsx81, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
8025
7637
|
var MainToolbarContent = ({
|
|
8026
7638
|
onHighlighterClick,
|
|
8027
7639
|
onLinkClick,
|
|
8028
7640
|
isMobile
|
|
8029
7641
|
}) => {
|
|
8030
7642
|
return /* @__PURE__ */ jsxs48(Fragment12, { children: [
|
|
8031
|
-
/* @__PURE__ */
|
|
8032
|
-
/* @__PURE__ */
|
|
8033
|
-
/* @__PURE__ */
|
|
7643
|
+
/* @__PURE__ */ jsx81(Spacer, {}),
|
|
7644
|
+
/* @__PURE__ */ jsx81(FontFamilyDropdown, {}),
|
|
7645
|
+
/* @__PURE__ */ jsx81(ColorPicker, { type: "text" }),
|
|
8034
7646
|
/* @__PURE__ */ jsxs48(ToolbarGroup, { children: [
|
|
8035
|
-
/* @__PURE__ */
|
|
8036
|
-
/* @__PURE__ */
|
|
8037
|
-
/* @__PURE__ */
|
|
8038
|
-
/* @__PURE__ */
|
|
8039
|
-
/* @__PURE__ */
|
|
8040
|
-
/* @__PURE__ */
|
|
8041
|
-
/* @__PURE__ */
|
|
7647
|
+
/* @__PURE__ */ jsx81(MarkButton, { type: "bold" }),
|
|
7648
|
+
/* @__PURE__ */ jsx81(MarkButton, { type: "italic" }),
|
|
7649
|
+
/* @__PURE__ */ jsx81(MarkButton, { type: "strike" }),
|
|
7650
|
+
/* @__PURE__ */ jsx81(MarkButton, { type: "code" }),
|
|
7651
|
+
/* @__PURE__ */ jsx81(MarkButton, { type: "underline" }),
|
|
7652
|
+
/* @__PURE__ */ jsx81(UndoRedoButton, { action: "undo" }),
|
|
7653
|
+
/* @__PURE__ */ jsx81(UndoRedoButton, { action: "redo" })
|
|
8042
7654
|
] }),
|
|
8043
|
-
/* @__PURE__ */
|
|
7655
|
+
/* @__PURE__ */ jsx81(ToolbarSeparator, {}),
|
|
8044
7656
|
/* @__PURE__ */ jsxs48(ToolbarGroup, { children: [
|
|
8045
|
-
/* @__PURE__ */
|
|
8046
|
-
/* @__PURE__ */
|
|
8047
|
-
/* @__PURE__ */
|
|
8048
|
-
/* @__PURE__ */
|
|
7657
|
+
/* @__PURE__ */ jsx81(TextAlignButton, { align: "left" }),
|
|
7658
|
+
/* @__PURE__ */ jsx81(TextAlignButton, { align: "center" }),
|
|
7659
|
+
/* @__PURE__ */ jsx81(TextAlignButton, { align: "right" }),
|
|
7660
|
+
/* @__PURE__ */ jsx81(TextAlignButton, { align: "justify" })
|
|
8049
7661
|
] }),
|
|
8050
|
-
/* @__PURE__ */
|
|
7662
|
+
/* @__PURE__ */ jsx81(ToolbarSeparator, {}),
|
|
8051
7663
|
/* @__PURE__ */ jsxs48(ToolbarGroup, { children: [
|
|
8052
|
-
/* @__PURE__ */
|
|
8053
|
-
/* @__PURE__ */
|
|
7664
|
+
/* @__PURE__ */ jsx81(HeadingDropdownMenu, { levels: [1, 2, 3, 4], portal: isMobile }),
|
|
7665
|
+
/* @__PURE__ */ jsx81(
|
|
8054
7666
|
ListDropdownMenu,
|
|
8055
7667
|
{
|
|
8056
7668
|
types: ["bulletList", "orderedList", "taskList"],
|
|
8057
7669
|
portal: isMobile
|
|
8058
7670
|
}
|
|
8059
7671
|
),
|
|
8060
|
-
/* @__PURE__ */
|
|
7672
|
+
/* @__PURE__ */ jsx81(BlockquoteButton, {})
|
|
8061
7673
|
] }),
|
|
8062
|
-
/* @__PURE__ */
|
|
8063
|
-
/* @__PURE__ */
|
|
8064
|
-
/* @__PURE__ */
|
|
8065
|
-
/* @__PURE__ */
|
|
8066
|
-
/* @__PURE__ */
|
|
8067
|
-
isMobile && /* @__PURE__ */
|
|
7674
|
+
/* @__PURE__ */ jsx81(ToolbarGroup, { children: /* @__PURE__ */ jsx81(TableDropdownMenu, {}) }),
|
|
7675
|
+
/* @__PURE__ */ jsx81(ToolbarGroup, {}),
|
|
7676
|
+
/* @__PURE__ */ jsx81(ToolbarSeparator, {}),
|
|
7677
|
+
/* @__PURE__ */ jsx81(ToolbarGroup, { children: /* @__PURE__ */ jsx81(ImageUploadButton, { text: "Add" }) }),
|
|
7678
|
+
/* @__PURE__ */ jsx81(Spacer, {}),
|
|
7679
|
+
isMobile && /* @__PURE__ */ jsx81(ToolbarSeparator, {})
|
|
8068
7680
|
] });
|
|
8069
7681
|
};
|
|
8070
7682
|
var MobileToolbarContent = ({
|
|
8071
7683
|
type,
|
|
8072
7684
|
onBack
|
|
8073
7685
|
}) => /* @__PURE__ */ jsxs48(Fragment12, { children: [
|
|
8074
|
-
/* @__PURE__ */
|
|
8075
|
-
/* @__PURE__ */
|
|
8076
|
-
type === "highlighter" ? /* @__PURE__ */
|
|
7686
|
+
/* @__PURE__ */ jsx81(ToolbarGroup, { children: /* @__PURE__ */ jsxs48(Button2, { "data-style": "ghost", onClick: onBack, children: [
|
|
7687
|
+
/* @__PURE__ */ jsx81(ArrowLeftIcon, { className: "tiptap-button-icon" }),
|
|
7688
|
+
type === "highlighter" ? /* @__PURE__ */ jsx81(HighlighterIcon, { className: "tiptap-button-icon" }) : /* @__PURE__ */ jsx81(LinkIcon, { className: "tiptap-button-icon" })
|
|
8077
7689
|
] }) }),
|
|
8078
|
-
/* @__PURE__ */
|
|
8079
|
-
type === "highlighter" ? /* @__PURE__ */
|
|
7690
|
+
/* @__PURE__ */ jsx81(ToolbarSeparator, {}),
|
|
7691
|
+
type === "highlighter" ? /* @__PURE__ */ jsx81(ColorHighlightPopoverContent, {}) : /* @__PURE__ */ jsx81(LinkContent, {})
|
|
8080
7692
|
] });
|
|
8081
7693
|
function SimpleEditor() {
|
|
8082
7694
|
const { setEditorContent, debouncedSave } = useEditorBridge();
|
|
@@ -8107,25 +7719,8 @@ function SimpleEditor() {
|
|
|
8107
7719
|
}),
|
|
8108
7720
|
HorizontalRule,
|
|
8109
7721
|
index_default,
|
|
8110
|
-
index_default3.configure({
|
|
8111
|
-
HTMLAttributes: {
|
|
8112
|
-
class: "blockquote-node"
|
|
8113
|
-
}
|
|
8114
|
-
}),
|
|
8115
|
-
index_default4.configure({
|
|
8116
|
-
HTMLAttributes: {
|
|
8117
|
-
class: "code-block-node"
|
|
8118
|
-
}
|
|
8119
|
-
}),
|
|
8120
|
-
ListItem.configure({
|
|
8121
|
-
HTMLAttributes: {
|
|
8122
|
-
class: "list-item-node"
|
|
8123
|
-
}
|
|
8124
|
-
}),
|
|
8125
|
-
ImageResize,
|
|
8126
|
-
Image,
|
|
8127
7722
|
index_default2,
|
|
8128
|
-
|
|
7723
|
+
index_default3,
|
|
8129
7724
|
Gapcursor,
|
|
8130
7725
|
TextStyle,
|
|
8131
7726
|
FontSizeStepper.configure({ step: 2, min: 8, defaultSize: 16 }),
|
|
@@ -8147,7 +7742,7 @@ function SimpleEditor() {
|
|
|
8147
7742
|
Typography,
|
|
8148
7743
|
Superscript,
|
|
8149
7744
|
Subscript,
|
|
8150
|
-
|
|
7745
|
+
Selection2,
|
|
8151
7746
|
ImageUploadNode2.configure({
|
|
8152
7747
|
accept: "image/*",
|
|
8153
7748
|
maxSize: MAX_FILE_SIZE,
|
|
@@ -8203,8 +7798,8 @@ function SimpleEditor() {
|
|
|
8203
7798
|
window.visualViewport?.removeEventListener("scroll", updatePosition);
|
|
8204
7799
|
};
|
|
8205
7800
|
}, []);
|
|
8206
|
-
return /* @__PURE__ */
|
|
8207
|
-
/* @__PURE__ */
|
|
7801
|
+
return /* @__PURE__ */ jsx81("div", { className: "simple-editor-wrapper", children: /* @__PURE__ */ jsxs48(EditorContext.Provider, { value: { editor }, children: [
|
|
7802
|
+
/* @__PURE__ */ jsx81(
|
|
8208
7803
|
Toolbar,
|
|
8209
7804
|
{
|
|
8210
7805
|
ref: toolbarRef,
|
|
@@ -8213,14 +7808,14 @@ function SimpleEditor() {
|
|
|
8213
7808
|
bottom: `calc(100% - ${height - rect.y}px)`
|
|
8214
7809
|
} : {}
|
|
8215
7810
|
},
|
|
8216
|
-
children: mobileView === "main" ? /* @__PURE__ */
|
|
7811
|
+
children: mobileView === "main" ? /* @__PURE__ */ jsx81(
|
|
8217
7812
|
MainToolbarContent,
|
|
8218
7813
|
{
|
|
8219
7814
|
onHighlighterClick: () => setMobileView("highlighter"),
|
|
8220
7815
|
onLinkClick: () => setMobileView("link"),
|
|
8221
7816
|
isMobile
|
|
8222
7817
|
}
|
|
8223
|
-
) : /* @__PURE__ */
|
|
7818
|
+
) : /* @__PURE__ */ jsx81(
|
|
8224
7819
|
MobileToolbarContent,
|
|
8225
7820
|
{
|
|
8226
7821
|
type: mobileView === "highlighter" ? "highlighter" : "link",
|
|
@@ -8229,14 +7824,14 @@ function SimpleEditor() {
|
|
|
8229
7824
|
)
|
|
8230
7825
|
}
|
|
8231
7826
|
),
|
|
8232
|
-
/* @__PURE__ */
|
|
7827
|
+
/* @__PURE__ */ jsx81(
|
|
8233
7828
|
EditorContent,
|
|
8234
7829
|
{
|
|
8235
7830
|
editor,
|
|
8236
7831
|
role: "presentation",
|
|
8237
7832
|
autoFocus: true,
|
|
8238
7833
|
className: "simple-editor-content",
|
|
8239
|
-
children: editor && /* @__PURE__ */
|
|
7834
|
+
children: editor && /* @__PURE__ */ jsx81(BubbleMenuInline, {})
|
|
8240
7835
|
}
|
|
8241
7836
|
)
|
|
8242
7837
|
] }) });
|
|
@@ -8244,9 +7839,9 @@ function SimpleEditor() {
|
|
|
8244
7839
|
|
|
8245
7840
|
// src/components/editor/editor.tsx
|
|
8246
7841
|
import clsx2 from "clsx";
|
|
8247
|
-
import { jsx as
|
|
7842
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
8248
7843
|
function Editor({ onChange, className, style, onTabsChange, initialTabs }) {
|
|
8249
|
-
return /* @__PURE__ */
|
|
7844
|
+
return /* @__PURE__ */ jsx82(
|
|
8250
7845
|
"div",
|
|
8251
7846
|
{
|
|
8252
7847
|
className: clsx2(
|
|
@@ -8254,7 +7849,7 @@ function Editor({ onChange, className, style, onTabsChange, initialTabs }) {
|
|
|
8254
7849
|
className
|
|
8255
7850
|
),
|
|
8256
7851
|
style,
|
|
8257
|
-
children: /* @__PURE__ */
|
|
7852
|
+
children: /* @__PURE__ */ jsx82(EditorShell, { children: /* @__PURE__ */ jsx82(EditorLayout, { onChange, initialTabs, onTabsChange, children: /* @__PURE__ */ jsx82(SimpleEditor, {}) }) })
|
|
8258
7853
|
}
|
|
8259
7854
|
);
|
|
8260
7855
|
}
|