@firecms/editor 3.0.0-canary.293 → 3.0.0-canary.294
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.es.js +15 -10
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +15 -10
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -63,7 +63,7 @@ const EditorBubble = forwardRef((t0, ref) => {
|
|
|
63
63
|
} = useCurrentEditor();
|
|
64
64
|
tippyOptions?.placement;
|
|
65
65
|
let t1;
|
|
66
|
-
const shouldShow = _temp$
|
|
66
|
+
const shouldShow = _temp$2;
|
|
67
67
|
const t2 = tippyOptions?.placement ?? options?.placement;
|
|
68
68
|
let t3;
|
|
69
69
|
if ($[5] !== options || $[6] !== t2) {
|
|
@@ -117,7 +117,7 @@ const EditorBubble = forwardRef((t0, ref) => {
|
|
|
117
117
|
}
|
|
118
118
|
return t6;
|
|
119
119
|
});
|
|
120
|
-
function _temp$
|
|
120
|
+
function _temp$2(t0) {
|
|
121
121
|
const {
|
|
122
122
|
editor: editor_0,
|
|
123
123
|
state
|
|
@@ -477,7 +477,7 @@ const TextButtons = () => {
|
|
|
477
477
|
if ($[0] !== editor) {
|
|
478
478
|
const items2 = [{
|
|
479
479
|
name: "bold",
|
|
480
|
-
isActive: _temp,
|
|
480
|
+
isActive: _temp$1,
|
|
481
481
|
command: _temp2,
|
|
482
482
|
icon: FormatBoldIcon
|
|
483
483
|
}, {
|
|
@@ -514,7 +514,7 @@ const TextButtons = () => {
|
|
|
514
514
|
}
|
|
515
515
|
return t0;
|
|
516
516
|
};
|
|
517
|
-
function _temp(editor_0) {
|
|
517
|
+
function _temp$1(editor_0) {
|
|
518
518
|
return editor_0?.isActive("bold") ?? false;
|
|
519
519
|
}
|
|
520
520
|
function _temp2(editor_1) {
|
|
@@ -1523,10 +1523,12 @@ const CommandList = forwardRef((props, ref) => {
|
|
|
1523
1523
|
} = useCurrentEditor();
|
|
1524
1524
|
let t0;
|
|
1525
1525
|
if ($[0] !== editor || $[1] !== props.aiController || $[2] !== props.range || $[3] !== props.upload) {
|
|
1526
|
-
t0 = (item) => {
|
|
1526
|
+
t0 = (item, event) => {
|
|
1527
1527
|
if (!editor) {
|
|
1528
1528
|
return;
|
|
1529
1529
|
}
|
|
1530
|
+
event?.preventDefault();
|
|
1531
|
+
event?.stopPropagation();
|
|
1530
1532
|
item?.command?.({
|
|
1531
1533
|
editor,
|
|
1532
1534
|
range: props.range,
|
|
@@ -1602,17 +1604,17 @@ const CommandList = forwardRef((props, ref) => {
|
|
|
1602
1604
|
t6 = () => ({
|
|
1603
1605
|
onKeyDown: (t72) => {
|
|
1604
1606
|
const {
|
|
1605
|
-
event
|
|
1607
|
+
event: event_0
|
|
1606
1608
|
} = t72;
|
|
1607
|
-
if (
|
|
1609
|
+
if (event_0.key === "ArrowUp") {
|
|
1608
1610
|
upHandler();
|
|
1609
1611
|
return true;
|
|
1610
1612
|
}
|
|
1611
|
-
if (
|
|
1613
|
+
if (event_0.key === "ArrowDown") {
|
|
1612
1614
|
downHandler();
|
|
1613
1615
|
return true;
|
|
1614
1616
|
}
|
|
1615
|
-
if (
|
|
1617
|
+
if (event_0.key === "Enter") {
|
|
1616
1618
|
enterHandler();
|
|
1617
1619
|
return true;
|
|
1618
1620
|
}
|
|
@@ -1668,7 +1670,7 @@ const CommandList = forwardRef((props, ref) => {
|
|
|
1668
1670
|
return;
|
|
1669
1671
|
}
|
|
1670
1672
|
itemRefs.current[index] = el;
|
|
1671
|
-
}, onClick: () => selectItem(item_1), tabIndex: index === selectedIndex ? 0 : -1, "aria-selected": index === selectedIndex, className: cls("flex w-full items-center space-x-2 rounded-md px-2 py-1 text-left text-sm hover:bg-blue-50 hover:dark:bg-surface-700 aria-selected:bg-blue-50 aria-selected:dark:bg-surface-700", index === selectedIndex ? "bg-blue-100 dark:bg-surface-accent-950" : ""), children: [
|
|
1673
|
+
}, onMouseDown: _temp, onClick: (e_0) => selectItem(item_1, e_0), tabIndex: index === selectedIndex ? 0 : -1, "aria-selected": index === selectedIndex, className: cls("flex w-full items-center space-x-2 rounded-md px-2 py-1 text-left text-sm hover:bg-blue-50 hover:dark:bg-surface-700 aria-selected:bg-blue-50 aria-selected:dark:bg-surface-700", index === selectedIndex ? "bg-blue-100 dark:bg-surface-accent-950" : ""), children: [
|
|
1672
1674
|
/* @__PURE__ */ jsx("div", { className: cls("flex h-10 w-10 items-center justify-center rounded-md border bg-white dark:bg-surface-900", defaultBorderMixin), children: item_1.icon }),
|
|
1673
1675
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
1674
1676
|
/* @__PURE__ */ jsx("p", { className: "font-medium", children: item_1.title }),
|
|
@@ -1871,6 +1873,9 @@ const suggestionItems = [{
|
|
|
1871
1873
|
input.click();
|
|
1872
1874
|
}
|
|
1873
1875
|
}];
|
|
1876
|
+
function _temp(e) {
|
|
1877
|
+
return e.preventDefault();
|
|
1878
|
+
}
|
|
1874
1879
|
const proseClasses = {
|
|
1875
1880
|
"sm": "prose-sm",
|
|
1876
1881
|
"base": "prose-base",
|