ct-rich-text-editor 1.3.1 → 1.3.2
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/assets/style.css +171 -130
- package/dist/{babel-d3085146.js → babel-d155920e.js} +3278 -3551
- package/dist/babel-d155920e.js.map +1 -0
- package/dist/components/CodeActionMenuPlugin/utils.d.ts +1 -1
- package/dist/components/FormatTextMenu/FormatTextMenuDrop.d.ts +5 -0
- package/dist/{estree-164983f6.js → estree-b1fff53b.js} +1778 -1763
- package/dist/estree-b1fff53b.js.map +1 -0
- package/dist/hooks/useDebounce.d.ts +1 -1
- package/dist/{html-5586dbf6.js → html-f95ee5dc.js} +656 -701
- package/dist/html-f95ee5dc.js.map +1 -0
- package/dist/{html2pdf.bundle-f23e1b00.js → html2pdf.bundle-7d125fec.js} +2 -2
- package/dist/html2pdf.bundle-7d125fec.js.map +1 -0
- package/dist/{html2pdf.bundle.min-daf952fb.js → html2pdf.bundle.min-96e9ee6a.js} +2 -2
- package/dist/html2pdf.bundle.min-96e9ee6a.js.map +1 -0
- package/dist/{index-8d147c36.js → index-413952d9.js} +489 -348
- package/dist/index-413952d9.js.map +1 -0
- package/dist/{index-10f9d057.js → index-91e0322d.js} +2 -2
- package/dist/{index-10f9d057.js.map → index-91e0322d.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{markdown-d513479b.js → markdown-1d9e6c3f.js} +1789 -1836
- package/dist/markdown-1d9e6c3f.js.map +1 -0
- package/dist/{postcss-f084f74d.js → postcss-c2592f3f.js} +1357 -1378
- package/dist/postcss-c2592f3f.js.map +1 -0
- package/dist/standalone-bcc7f37a.js +2649 -0
- package/dist/standalone-bcc7f37a.js.map +1 -0
- package/dist/typescript-48c10f50.js +13601 -0
- package/dist/typescript-48c10f50.js.map +1 -0
- package/dist/ui/Icons.d.ts +2 -1
- package/package.json +1 -1
- package/dist/babel-d3085146.js.map +0 -1
- package/dist/estree-164983f6.js.map +0 -1
- package/dist/html-5586dbf6.js.map +0 -1
- package/dist/html2pdf.bundle-f23e1b00.js.map +0 -1
- package/dist/html2pdf.bundle.min-daf952fb.js.map +0 -1
- package/dist/index-8d147c36.js.map +0 -1
- package/dist/markdown-d513479b.js.map +0 -1
- package/dist/postcss-f084f74d.js.map +0 -1
- package/dist/standalone-5a8c6b7e.js +0 -2518
- package/dist/standalone-5a8c6b7e.js.map +0 -1
- package/dist/typescript-b1005db4.js +0 -13705
- package/dist/typescript-b1005db4.js.map +0 -1
|
@@ -343,18 +343,18 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
343
343
|
}
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
|
-
function setRef(ref, value) {
|
|
346
|
+
function setRef$1(ref, value) {
|
|
347
347
|
if (typeof ref === "function") {
|
|
348
348
|
return ref(value);
|
|
349
349
|
} else if (ref !== null && ref !== void 0) {
|
|
350
350
|
ref.current = value;
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
-
function composeRefs(...refs) {
|
|
353
|
+
function composeRefs$1(...refs) {
|
|
354
354
|
return (node) => {
|
|
355
355
|
let hasCleanup = false;
|
|
356
356
|
const cleanups = refs.map((ref) => {
|
|
357
|
-
const cleanup = setRef(ref, node);
|
|
357
|
+
const cleanup = setRef$1(ref, node);
|
|
358
358
|
if (!hasCleanup && typeof cleanup == "function") {
|
|
359
359
|
hasCleanup = true;
|
|
360
360
|
}
|
|
@@ -367,7 +367,7 @@ function composeRefs(...refs) {
|
|
|
367
367
|
if (typeof cleanup == "function") {
|
|
368
368
|
cleanup();
|
|
369
369
|
} else {
|
|
370
|
-
setRef(refs[i2], null);
|
|
370
|
+
setRef$1(refs[i2], null);
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
};
|
|
@@ -375,7 +375,7 @@ function composeRefs(...refs) {
|
|
|
375
375
|
};
|
|
376
376
|
}
|
|
377
377
|
function useComposedRefs(...refs) {
|
|
378
|
-
return React$1.useCallback(composeRefs(...refs), refs);
|
|
378
|
+
return React$1.useCallback(composeRefs$1(...refs), refs);
|
|
379
379
|
}
|
|
380
380
|
function createContext2(rootComponentName, defaultContext) {
|
|
381
381
|
const Context2 = React$1.createContext(defaultContext);
|
|
@@ -536,12 +536,12 @@ function isFunction(value) {
|
|
|
536
536
|
return typeof value === "function";
|
|
537
537
|
}
|
|
538
538
|
// @__NO_SIDE_EFFECTS__
|
|
539
|
-
function createSlot(ownerName) {
|
|
540
|
-
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
539
|
+
function createSlot$1(ownerName) {
|
|
540
|
+
const SlotClone = /* @__PURE__ */ createSlotClone$1(ownerName);
|
|
541
541
|
const Slot2 = React$1.forwardRef((props, forwardedRef) => {
|
|
542
542
|
const { children, ...slotProps } = props;
|
|
543
543
|
const childrenArray = React$1.Children.toArray(children);
|
|
544
|
-
const slottable = childrenArray.find(isSlottable);
|
|
544
|
+
const slottable = childrenArray.find(isSlottable$1);
|
|
545
545
|
if (slottable) {
|
|
546
546
|
const newElement = slottable.props.children;
|
|
547
547
|
const newChildren = childrenArray.map((child) => {
|
|
@@ -560,16 +560,15 @@ function createSlot(ownerName) {
|
|
|
560
560
|
Slot2.displayName = `${ownerName}.Slot`;
|
|
561
561
|
return Slot2;
|
|
562
562
|
}
|
|
563
|
-
var Slot$4 = /* @__PURE__ */ createSlot("Slot");
|
|
564
563
|
// @__NO_SIDE_EFFECTS__
|
|
565
|
-
function createSlotClone(ownerName) {
|
|
564
|
+
function createSlotClone$1(ownerName) {
|
|
566
565
|
const SlotClone = React$1.forwardRef((props, forwardedRef) => {
|
|
567
566
|
const { children, ...slotProps } = props;
|
|
568
567
|
if (React$1.isValidElement(children)) {
|
|
569
|
-
const childrenRef = getElementRef$
|
|
570
|
-
const props2 = mergeProps(slotProps, children.props);
|
|
568
|
+
const childrenRef = getElementRef$2(children);
|
|
569
|
+
const props2 = mergeProps$1(slotProps, children.props);
|
|
571
570
|
if (children.type !== React$1.Fragment) {
|
|
572
|
-
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
571
|
+
props2.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
|
|
573
572
|
}
|
|
574
573
|
return React$1.cloneElement(children, props2);
|
|
575
574
|
}
|
|
@@ -578,20 +577,20 @@ function createSlotClone(ownerName) {
|
|
|
578
577
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
579
578
|
return SlotClone;
|
|
580
579
|
}
|
|
581
|
-
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
580
|
+
var SLOTTABLE_IDENTIFIER$1 = Symbol("radix.slottable");
|
|
582
581
|
// @__NO_SIDE_EFFECTS__
|
|
583
582
|
function createSlottable(ownerName) {
|
|
584
583
|
const Slottable2 = ({ children }) => {
|
|
585
584
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
586
585
|
};
|
|
587
586
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
588
|
-
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
587
|
+
Slottable2.__radixId = SLOTTABLE_IDENTIFIER$1;
|
|
589
588
|
return Slottable2;
|
|
590
589
|
}
|
|
591
|
-
function isSlottable(child) {
|
|
592
|
-
return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
590
|
+
function isSlottable$1(child) {
|
|
591
|
+
return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$1;
|
|
593
592
|
}
|
|
594
|
-
function mergeProps(slotProps, childProps) {
|
|
593
|
+
function mergeProps$1(slotProps, childProps) {
|
|
595
594
|
const overrideProps = { ...childProps };
|
|
596
595
|
for (const propName in childProps) {
|
|
597
596
|
const slotPropValue = slotProps[propName];
|
|
@@ -615,7 +614,7 @@ function mergeProps(slotProps, childProps) {
|
|
|
615
614
|
}
|
|
616
615
|
return { ...slotProps, ...overrideProps };
|
|
617
616
|
}
|
|
618
|
-
function getElementRef$
|
|
617
|
+
function getElementRef$2(element) {
|
|
619
618
|
var _a, _b;
|
|
620
619
|
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
621
620
|
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
@@ -649,7 +648,7 @@ var NODES = [
|
|
|
649
648
|
"ul"
|
|
650
649
|
];
|
|
651
650
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
652
|
-
const Slot2 = /* @__PURE__ */ createSlot(`Primitive.${node}`);
|
|
651
|
+
const Slot2 = /* @__PURE__ */ createSlot$1(`Primitive.${node}`);
|
|
653
652
|
const Node2 = React$1.forwardRef((props, forwardedRef) => {
|
|
654
653
|
const { asChild, ...primitiveProps } = props;
|
|
655
654
|
const Comp = asChild ? Slot2 : node;
|
|
@@ -1134,7 +1133,7 @@ var Presence = (props) => {
|
|
|
1134
1133
|
const { present, children } = props;
|
|
1135
1134
|
const presence = usePresence(present);
|
|
1136
1135
|
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React$1.Children.only(children);
|
|
1137
|
-
const ref = useComposedRefs(presence.ref, getElementRef(child));
|
|
1136
|
+
const ref = useComposedRefs(presence.ref, getElementRef$1(child));
|
|
1138
1137
|
const forceMount = typeof children === "function";
|
|
1139
1138
|
return forceMount || presence.isPresent ? React$1.cloneElement(child, { ref }) : null;
|
|
1140
1139
|
};
|
|
@@ -1233,7 +1232,7 @@ function usePresence(present) {
|
|
|
1233
1232
|
function getAnimationName(styles) {
|
|
1234
1233
|
return (styles == null ? void 0 : styles.animationName) || "none";
|
|
1235
1234
|
}
|
|
1236
|
-
function getElementRef(element) {
|
|
1235
|
+
function getElementRef$1(element) {
|
|
1237
1236
|
var _a, _b;
|
|
1238
1237
|
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
1239
1238
|
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
@@ -2135,7 +2134,7 @@ var DialogOverlay$1 = React$1.forwardRef(
|
|
|
2135
2134
|
}
|
|
2136
2135
|
);
|
|
2137
2136
|
DialogOverlay$1.displayName = OVERLAY_NAME;
|
|
2138
|
-
var Slot$
|
|
2137
|
+
var Slot$4 = /* @__PURE__ */ createSlot$1("DialogOverlay.RemoveScroll");
|
|
2139
2138
|
var DialogOverlayImpl = React$1.forwardRef(
|
|
2140
2139
|
(props, forwardedRef) => {
|
|
2141
2140
|
const { __scopeDialog, ...overlayProps } = props;
|
|
@@ -2143,7 +2142,7 @@ var DialogOverlayImpl = React$1.forwardRef(
|
|
|
2143
2142
|
return (
|
|
2144
2143
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2145
2144
|
// ie. when `Overlay` and `Content` are siblings
|
|
2146
|
-
/* @__PURE__ */ jsx(RemoveScroll, { as: Slot$
|
|
2145
|
+
/* @__PURE__ */ jsx(RemoveScroll, { as: Slot$4, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(
|
|
2147
2146
|
Primitive.div,
|
|
2148
2147
|
{
|
|
2149
2148
|
"data-state": getState$1(context.open),
|
|
@@ -2848,28 +2847,6 @@ const Plus = createLucideIcon("Plus", [
|
|
|
2848
2847
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
2849
2848
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
2850
2849
|
]);
|
|
2851
|
-
/**
|
|
2852
|
-
* @license lucide-react v0.344.0 - ISC
|
|
2853
|
-
*
|
|
2854
|
-
* This source code is licensed under the ISC license.
|
|
2855
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
2856
|
-
*/
|
|
2857
|
-
const Quote = createLucideIcon("Quote", [
|
|
2858
|
-
[
|
|
2859
|
-
"path",
|
|
2860
|
-
{
|
|
2861
|
-
d: "M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z",
|
|
2862
|
-
key: "4rm80e"
|
|
2863
|
-
}
|
|
2864
|
-
],
|
|
2865
|
-
[
|
|
2866
|
-
"path",
|
|
2867
|
-
{
|
|
2868
|
-
d: "M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z",
|
|
2869
|
-
key: "10za9r"
|
|
2870
|
-
}
|
|
2871
|
-
]
|
|
2872
|
-
]);
|
|
2873
2850
|
/**
|
|
2874
2851
|
* @license lucide-react v0.344.0 - ISC
|
|
2875
2852
|
*
|
|
@@ -6074,6 +6051,136 @@ const DialogDescription = React$1.forwardRef(({ className, ...props }, ref) => /
|
|
|
6074
6051
|
}
|
|
6075
6052
|
));
|
|
6076
6053
|
DialogDescription.displayName = Description.displayName;
|
|
6054
|
+
function setRef(ref, value) {
|
|
6055
|
+
if (typeof ref === "function") {
|
|
6056
|
+
return ref(value);
|
|
6057
|
+
} else if (ref !== null && ref !== void 0) {
|
|
6058
|
+
ref.current = value;
|
|
6059
|
+
}
|
|
6060
|
+
}
|
|
6061
|
+
function composeRefs(...refs) {
|
|
6062
|
+
return (node) => {
|
|
6063
|
+
let hasCleanup = false;
|
|
6064
|
+
const cleanups = refs.map((ref) => {
|
|
6065
|
+
const cleanup = setRef(ref, node);
|
|
6066
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
6067
|
+
hasCleanup = true;
|
|
6068
|
+
}
|
|
6069
|
+
return cleanup;
|
|
6070
|
+
});
|
|
6071
|
+
if (hasCleanup) {
|
|
6072
|
+
return () => {
|
|
6073
|
+
for (let i2 = 0; i2 < cleanups.length; i2++) {
|
|
6074
|
+
const cleanup = cleanups[i2];
|
|
6075
|
+
if (typeof cleanup == "function") {
|
|
6076
|
+
cleanup();
|
|
6077
|
+
} else {
|
|
6078
|
+
setRef(refs[i2], null);
|
|
6079
|
+
}
|
|
6080
|
+
}
|
|
6081
|
+
};
|
|
6082
|
+
}
|
|
6083
|
+
};
|
|
6084
|
+
}
|
|
6085
|
+
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
6086
|
+
var use = React$1[" use ".trim().toString()];
|
|
6087
|
+
function isPromiseLike(value) {
|
|
6088
|
+
return typeof value === "object" && value !== null && "then" in value;
|
|
6089
|
+
}
|
|
6090
|
+
function isLazyComponent(element) {
|
|
6091
|
+
return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
|
|
6092
|
+
}
|
|
6093
|
+
// @__NO_SIDE_EFFECTS__
|
|
6094
|
+
function createSlot(ownerName) {
|
|
6095
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
6096
|
+
const Slot2 = React$1.forwardRef((props, forwardedRef) => {
|
|
6097
|
+
let { children, ...slotProps } = props;
|
|
6098
|
+
if (isLazyComponent(children) && typeof use === "function") {
|
|
6099
|
+
children = use(children._payload);
|
|
6100
|
+
}
|
|
6101
|
+
const childrenArray = React$1.Children.toArray(children);
|
|
6102
|
+
const slottable = childrenArray.find(isSlottable);
|
|
6103
|
+
if (slottable) {
|
|
6104
|
+
const newElement = slottable.props.children;
|
|
6105
|
+
const newChildren = childrenArray.map((child) => {
|
|
6106
|
+
if (child === slottable) {
|
|
6107
|
+
if (React$1.Children.count(newElement) > 1)
|
|
6108
|
+
return React$1.Children.only(null);
|
|
6109
|
+
return React$1.isValidElement(newElement) ? newElement.props.children : null;
|
|
6110
|
+
} else {
|
|
6111
|
+
return child;
|
|
6112
|
+
}
|
|
6113
|
+
});
|
|
6114
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React$1.isValidElement(newElement) ? React$1.cloneElement(newElement, void 0, newChildren) : null });
|
|
6115
|
+
}
|
|
6116
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
6117
|
+
});
|
|
6118
|
+
Slot2.displayName = `${ownerName}.Slot`;
|
|
6119
|
+
return Slot2;
|
|
6120
|
+
}
|
|
6121
|
+
var Slot$3 = /* @__PURE__ */ createSlot("Slot");
|
|
6122
|
+
// @__NO_SIDE_EFFECTS__
|
|
6123
|
+
function createSlotClone(ownerName) {
|
|
6124
|
+
const SlotClone = React$1.forwardRef((props, forwardedRef) => {
|
|
6125
|
+
let { children, ...slotProps } = props;
|
|
6126
|
+
if (isLazyComponent(children) && typeof use === "function") {
|
|
6127
|
+
children = use(children._payload);
|
|
6128
|
+
}
|
|
6129
|
+
if (React$1.isValidElement(children)) {
|
|
6130
|
+
const childrenRef = getElementRef(children);
|
|
6131
|
+
const props2 = mergeProps(slotProps, children.props);
|
|
6132
|
+
if (children.type !== React$1.Fragment) {
|
|
6133
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
6134
|
+
}
|
|
6135
|
+
return React$1.cloneElement(children, props2);
|
|
6136
|
+
}
|
|
6137
|
+
return React$1.Children.count(children) > 1 ? React$1.Children.only(null) : null;
|
|
6138
|
+
});
|
|
6139
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
6140
|
+
return SlotClone;
|
|
6141
|
+
}
|
|
6142
|
+
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
6143
|
+
function isSlottable(child) {
|
|
6144
|
+
return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
6145
|
+
}
|
|
6146
|
+
function mergeProps(slotProps, childProps) {
|
|
6147
|
+
const overrideProps = { ...childProps };
|
|
6148
|
+
for (const propName in childProps) {
|
|
6149
|
+
const slotPropValue = slotProps[propName];
|
|
6150
|
+
const childPropValue = childProps[propName];
|
|
6151
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
6152
|
+
if (isHandler) {
|
|
6153
|
+
if (slotPropValue && childPropValue) {
|
|
6154
|
+
overrideProps[propName] = (...args) => {
|
|
6155
|
+
const result = childPropValue(...args);
|
|
6156
|
+
slotPropValue(...args);
|
|
6157
|
+
return result;
|
|
6158
|
+
};
|
|
6159
|
+
} else if (slotPropValue) {
|
|
6160
|
+
overrideProps[propName] = slotPropValue;
|
|
6161
|
+
}
|
|
6162
|
+
} else if (propName === "style") {
|
|
6163
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
6164
|
+
} else if (propName === "className") {
|
|
6165
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
6166
|
+
}
|
|
6167
|
+
}
|
|
6168
|
+
return { ...slotProps, ...overrideProps };
|
|
6169
|
+
}
|
|
6170
|
+
function getElementRef(element) {
|
|
6171
|
+
var _a, _b;
|
|
6172
|
+
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
6173
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
6174
|
+
if (mayWarn) {
|
|
6175
|
+
return element.ref;
|
|
6176
|
+
}
|
|
6177
|
+
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
6178
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
6179
|
+
if (mayWarn) {
|
|
6180
|
+
return element.props.ref;
|
|
6181
|
+
}
|
|
6182
|
+
return element.props.ref || element.ref;
|
|
6183
|
+
}
|
|
6077
6184
|
const falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
6078
6185
|
const cx = clsx;
|
|
6079
6186
|
const cva = (base, config) => (props) => {
|
|
@@ -6146,7 +6253,7 @@ const buttonVariants = cva(
|
|
|
6146
6253
|
);
|
|
6147
6254
|
const Button = React$1.forwardRef(
|
|
6148
6255
|
({ className, variant, size: size2, asChild = false, ...props }, ref) => {
|
|
6149
|
-
const Comp = asChild ? Slot$
|
|
6256
|
+
const Comp = asChild ? Slot$3 : "button";
|
|
6150
6257
|
return /* @__PURE__ */ jsx(
|
|
6151
6258
|
Comp,
|
|
6152
6259
|
{
|
|
@@ -7822,16 +7929,16 @@ function CopyButton({ editor, getCodeDOMNode }) {
|
|
|
7822
7929
|
}
|
|
7823
7930
|
const index$4 = "";
|
|
7824
7931
|
const PRETTIER_PARSER_MODULES = {
|
|
7825
|
-
css: [() => import("./postcss-
|
|
7826
|
-
html: [() => import("./html-
|
|
7932
|
+
css: [() => import("./postcss-c2592f3f.js")],
|
|
7933
|
+
html: [() => import("./html-f95ee5dc.js")],
|
|
7827
7934
|
js: [
|
|
7828
|
-
() => import("./babel-
|
|
7829
|
-
() => import("./estree-
|
|
7935
|
+
() => import("./babel-d155920e.js"),
|
|
7936
|
+
() => import("./estree-b1fff53b.js")
|
|
7830
7937
|
],
|
|
7831
|
-
markdown: [() => import("./markdown-
|
|
7938
|
+
markdown: [() => import("./markdown-1d9e6c3f.js")],
|
|
7832
7939
|
typescript: [
|
|
7833
|
-
() => import("./typescript-
|
|
7834
|
-
() => import("./estree-
|
|
7940
|
+
() => import("./typescript-48c10f50.js"),
|
|
7941
|
+
() => import("./estree-b1fff53b.js")
|
|
7835
7942
|
]
|
|
7836
7943
|
};
|
|
7837
7944
|
async function loadPrettierParserByLang(lang) {
|
|
@@ -7842,7 +7949,7 @@ async function loadPrettierParserByLang(lang) {
|
|
|
7842
7949
|
return modules;
|
|
7843
7950
|
}
|
|
7844
7951
|
async function loadPrettierFormat() {
|
|
7845
|
-
const { format } = await import("./standalone-
|
|
7952
|
+
const { format } = await import("./standalone-bcc7f37a.js");
|
|
7846
7953
|
return format;
|
|
7847
7954
|
}
|
|
7848
7955
|
const PRETTIER_OPTIONS_BY_LANG = {
|
|
@@ -8726,7 +8833,7 @@ function createCollection(name) {
|
|
|
8726
8833
|
};
|
|
8727
8834
|
CollectionProvider.displayName = PROVIDER_NAME2;
|
|
8728
8835
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
8729
|
-
const CollectionSlotImpl = /* @__PURE__ */ createSlot(COLLECTION_SLOT_NAME);
|
|
8836
|
+
const CollectionSlotImpl = /* @__PURE__ */ createSlot$1(COLLECTION_SLOT_NAME);
|
|
8730
8837
|
const CollectionSlot = React__default.forwardRef(
|
|
8731
8838
|
(props, forwardedRef) => {
|
|
8732
8839
|
const { scope, children } = props;
|
|
@@ -8738,7 +8845,7 @@ function createCollection(name) {
|
|
|
8738
8845
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
8739
8846
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
8740
8847
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
8741
|
-
const CollectionItemSlotImpl = /* @__PURE__ */ createSlot(ITEM_SLOT_NAME);
|
|
8848
|
+
const CollectionItemSlotImpl = /* @__PURE__ */ createSlot$1(ITEM_SLOT_NAME);
|
|
8742
8849
|
const CollectionItemSlot = React__default.forwardRef(
|
|
8743
8850
|
(props, forwardedRef) => {
|
|
8744
8851
|
const { scope, children, ...itemData } = props;
|
|
@@ -12717,10 +12824,10 @@ const PDF_CONFIG = {
|
|
|
12717
12824
|
};
|
|
12718
12825
|
const loadHtml2Pdf = async () => {
|
|
12719
12826
|
try {
|
|
12720
|
-
const mod = await import("./html2pdf.bundle.min-
|
|
12827
|
+
const mod = await import("./html2pdf.bundle.min-96e9ee6a.js").then((n) => n.h);
|
|
12721
12828
|
return (mod == null ? void 0 : mod.default) || mod;
|
|
12722
12829
|
} catch {
|
|
12723
|
-
const mod2 = await import("./html2pdf.bundle-
|
|
12830
|
+
const mod2 = await import("./html2pdf.bundle-7d125fec.js").then((n) => n.h);
|
|
12724
12831
|
return (mod2 == null ? void 0 : mod2.default) || mod2;
|
|
12725
12832
|
}
|
|
12726
12833
|
};
|
|
@@ -13927,7 +14034,7 @@ const EmbedComponent = ({ url, displayType, alignment, nodeKey }) => {
|
|
|
13927
14034
|
}
|
|
13928
14035
|
);
|
|
13929
14036
|
};
|
|
13930
|
-
const ImageView = React__default.lazy(() => import("./index-
|
|
14037
|
+
const ImageView = React__default.lazy(() => import("./index-91e0322d.js"));
|
|
13931
14038
|
function isGoogleDocCheckboxImg(img) {
|
|
13932
14039
|
return img.parentElement != null && img.parentElement.tagName === "LI" && img.previousSibling === null && img.getAttribute("aria-roledescription") === "checkbox";
|
|
13933
14040
|
}
|
|
@@ -15386,38 +15493,10 @@ const BulletListIcon = () => /* @__PURE__ */ jsx(
|
|
|
15386
15493
|
)
|
|
15387
15494
|
}
|
|
15388
15495
|
);
|
|
15389
|
-
const CheckBoxIcon = () => /* @__PURE__ */ jsxs(
|
|
15390
|
-
"
|
|
15391
|
-
{
|
|
15392
|
-
|
|
15393
|
-
width: "24",
|
|
15394
|
-
height: "24",
|
|
15395
|
-
viewBox: "0 0 24 24",
|
|
15396
|
-
fill: "none",
|
|
15397
|
-
children: [
|
|
15398
|
-
/* @__PURE__ */ jsx(
|
|
15399
|
-
"path",
|
|
15400
|
-
{
|
|
15401
|
-
d: "M19 3H5C3.89543 3 3 3.89543 3 5V19C3 20.1046 3.89543 21 5 21H19C20.1046 21 21 20.1046 21 19V5C21 3.89543 20.1046 3 19 3Z",
|
|
15402
|
-
stroke: "currentColor",
|
|
15403
|
-
strokeWidth: "2",
|
|
15404
|
-
strokeLinecap: "round",
|
|
15405
|
-
strokeLinejoin: "round"
|
|
15406
|
-
}
|
|
15407
|
-
),
|
|
15408
|
-
/* @__PURE__ */ jsx(
|
|
15409
|
-
"path",
|
|
15410
|
-
{
|
|
15411
|
-
d: "M7 13L10 16L17 9",
|
|
15412
|
-
stroke: "currentColor",
|
|
15413
|
-
strokeWidth: "2",
|
|
15414
|
-
strokeLinecap: "round",
|
|
15415
|
-
strokeLinejoin: "round"
|
|
15416
|
-
}
|
|
15417
|
-
)
|
|
15418
|
-
]
|
|
15419
|
-
}
|
|
15420
|
-
);
|
|
15496
|
+
const CheckBoxIcon = () => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: [
|
|
15497
|
+
/* @__PURE__ */ jsx("path", { d: "M18.2222 4H5.77778C4.79594 4 4 4.79594 4 5.77778V18.2222C4 19.2041 4.79594 20 5.77778 20H18.2222C19.2041 20 20 19.2041 20 18.2222V5.77778C20 4.79594 19.2041 4 18.2222 4Z", stroke: "currentColor" }),
|
|
15498
|
+
/* @__PURE__ */ jsx("path", { d: "M7.55566 12.8886L10.2223 15.5552L16.4446 9.33301", stroke: "currentColor" })
|
|
15499
|
+
] });
|
|
15421
15500
|
const SearchTextIcon = () => /* @__PURE__ */ jsx(
|
|
15422
15501
|
"svg",
|
|
15423
15502
|
{
|
|
@@ -15601,6 +15680,10 @@ const RecordingIcon = () => /* @__PURE__ */ jsx(
|
|
|
15601
15680
|
);
|
|
15602
15681
|
const AddCommentIcon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M19 14.3333C19 14.7459 18.8361 15.1416 18.5444 15.4333C18.2527 15.725 17.857 15.8889 17.4444 15.8889H8.11111L5 19V6.55556C5 6.143 5.16389 5.74733 5.45561 5.45561C5.74733 5.16389 6.143 5 6.55556 5H17.4444C17.857 5 18.2527 5.16389 18.5444 5.45561C18.8361 5.74733 19 6.143 19 6.55556V14.3333Z", stroke: "currentColor", "stroke-width": "1.33333", "stroke-linecap": "round", "stroke-linejoin": "round" }) });
|
|
15603
15682
|
const CheckIcon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" }) });
|
|
15683
|
+
const QuoteIcon = () => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: [
|
|
15684
|
+
/* @__PURE__ */ jsx("path", { d: "M4.75 19C7 19 10 18.2222 10 12.7779V6.55575C10 5.58354 9.433 4.98699 8.5 5.00022H5.5C4.5625 5.00022 4 5.58354 4 6.53397V11.2223C4 12.1945 4.5625 12.7779 5.5 12.7779C6.25 12.7779 6.25 12.7779 6.25 13.5556V14.3334C6.25 15.1112 5.5 15.8889 4.75 15.8889C4 15.8889 4 15.8952 4 16.6908V18.2222C4 19 4 19 4.75 19Z", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
15685
|
+
/* @__PURE__ */ jsx("path", { d: "M14.75 19C17 19 20 18.2222 20 12.7779V6.55575C20 5.58354 19.4323 4.98699 18.5 5.00022H15.5C14.5625 5.00022 14 5.58354 14 6.53397V11.2223C14 12.1945 14.5625 12.7779 15.5 12.7779H16.0625C16.0625 14.5278 16.25 15.8889 14 15.8889V18.2222C14 19 14 19 14.75 19Z", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })
|
|
15686
|
+
] });
|
|
15604
15687
|
const EDITOR_NODES = [
|
|
15605
15688
|
CodeNode,
|
|
15606
15689
|
CodeHighlightNode,
|
|
@@ -15736,7 +15819,7 @@ const formatMenuItems = [
|
|
|
15736
15819
|
},
|
|
15737
15820
|
{
|
|
15738
15821
|
name: "Quote",
|
|
15739
|
-
icon: /* @__PURE__ */ jsx(
|
|
15822
|
+
icon: /* @__PURE__ */ jsx(QuoteIcon, {}),
|
|
15740
15823
|
payload: "quote"
|
|
15741
15824
|
}
|
|
15742
15825
|
];
|
|
@@ -17295,7 +17378,7 @@ var MenuRootContentNonModal = React$1.forwardRef((props, forwardedRef) => {
|
|
|
17295
17378
|
}
|
|
17296
17379
|
);
|
|
17297
17380
|
});
|
|
17298
|
-
var Slot$2 = /* @__PURE__ */ createSlot("MenuContent.ScrollLock");
|
|
17381
|
+
var Slot$2 = /* @__PURE__ */ createSlot$1("MenuContent.ScrollLock");
|
|
17299
17382
|
var MenuContentImpl = React$1.forwardRef(
|
|
17300
17383
|
(props, forwardedRef) => {
|
|
17301
17384
|
const {
|
|
@@ -17767,7 +17850,7 @@ var MenuSubTrigger = React$1.forwardRef(
|
|
|
17767
17850
|
"aria-controls": subContext.contentId,
|
|
17768
17851
|
"data-state": getOpenState(context.open),
|
|
17769
17852
|
...props,
|
|
17770
|
-
ref: composeRefs(forwardedRef, subContext.onTriggerChange),
|
|
17853
|
+
ref: composeRefs$1(forwardedRef, subContext.onTriggerChange),
|
|
17771
17854
|
onClick: (event) => {
|
|
17772
17855
|
var _a;
|
|
17773
17856
|
(_a = props.onClick) == null ? void 0 : _a.call(props, event);
|
|
@@ -18031,7 +18114,7 @@ var DropdownMenuTrigger$1 = React$1.forwardRef(
|
|
|
18031
18114
|
"data-disabled": disabled ? "" : void 0,
|
|
18032
18115
|
disabled,
|
|
18033
18116
|
...triggerProps,
|
|
18034
|
-
ref: composeRefs(forwardedRef, context.triggerRef),
|
|
18117
|
+
ref: composeRefs$1(forwardedRef, context.triggerRef),
|
|
18035
18118
|
onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {
|
|
18036
18119
|
if (!disabled && event.button === 0 && event.ctrlKey === false) {
|
|
18037
18120
|
context.onOpenToggle();
|
|
@@ -18862,7 +18945,7 @@ var PopoverContent$1 = React$1.forwardRef(
|
|
|
18862
18945
|
}
|
|
18863
18946
|
);
|
|
18864
18947
|
PopoverContent$1.displayName = CONTENT_NAME$1;
|
|
18865
|
-
var Slot$1 = /* @__PURE__ */ createSlot("PopoverContent.RemoveScroll");
|
|
18948
|
+
var Slot$1 = /* @__PURE__ */ createSlot$1("PopoverContent.RemoveScroll");
|
|
18866
18949
|
var PopoverContentModal = React$1.forwardRef(
|
|
18867
18950
|
(props, forwardedRef) => {
|
|
18868
18951
|
const context = usePopoverContext(CONTENT_NAME$1, props.__scopePopover);
|
|
@@ -19628,7 +19711,7 @@ SelectContent$1.displayName = CONTENT_NAME;
|
|
|
19628
19711
|
var CONTENT_MARGIN = 10;
|
|
19629
19712
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME);
|
|
19630
19713
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
19631
|
-
var Slot = /* @__PURE__ */ createSlot("SelectContent.RemoveScroll");
|
|
19714
|
+
var Slot = /* @__PURE__ */ createSlot$1("SelectContent.RemoveScroll");
|
|
19632
19715
|
var SelectContentImpl = React$1.forwardRef(
|
|
19633
19716
|
(props, forwardedRef) => {
|
|
19634
19717
|
const {
|
|
@@ -20697,7 +20780,7 @@ const FontFamilyMenu = ({
|
|
|
20697
20780
|
applyFontFamily(value);
|
|
20698
20781
|
};
|
|
20699
20782
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Select, { value: selectedFont, onValueChange: handleFontChange, children: [
|
|
20700
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "!cteditor-h-7
|
|
20783
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "!cteditor-h-7 md:!cteditor-bg-secondary !cteditor-bg-foreground/5 cteditor-text-foreground md:!cteditor-w-[120px] cteditor-text-xs max-md:cteditor-w-full", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select font" }) }),
|
|
20701
20784
|
/* @__PURE__ */ jsx(SelectContent, { children: fonts.map((font) => /* @__PURE__ */ jsx(SelectItem, { value: font, style: { fontFamily: font }, children: font }, font)) })
|
|
20702
20785
|
] }) });
|
|
20703
20786
|
};
|
|
@@ -20890,7 +20973,7 @@ const FormatTextMenu = ({ hasFormat, blockType }) => {
|
|
|
20890
20973
|
},
|
|
20891
20974
|
index2
|
|
20892
20975
|
)),
|
|
20893
|
-
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
20976
|
+
/* @__PURE__ */ jsx(DropdownMenuSeparator, { className: "!cteditor-bg-foreground/10" }),
|
|
20894
20977
|
listQuoteFormattingItems.map((option, index2) => /* @__PURE__ */ jsxs(
|
|
20895
20978
|
DropdownMenuItem$1,
|
|
20896
20979
|
{
|
|
@@ -21208,7 +21291,7 @@ const InsertFileUploadedDialogBody = ({ onClick }) => {
|
|
|
21208
21291
|
Input$1,
|
|
21209
21292
|
{
|
|
21210
21293
|
type: "file",
|
|
21211
|
-
className: "cteditor-w-full",
|
|
21294
|
+
className: "cteditor-w-full cteditor-border-[1px] cteditor-border-dashed cteditor-border-foreground cteditor-h-auto cteditor-py-4 cteditor-rounded-xl cteditor-cursor-pointer",
|
|
21212
21295
|
accept: ALLOWED_MIME_TYPES.join(","),
|
|
21213
21296
|
onChange: onChangeFile
|
|
21214
21297
|
}
|
|
@@ -21225,7 +21308,7 @@ const InsertFileUploadedDialogBody = ({ onClick }) => {
|
|
|
21225
21308
|
{
|
|
21226
21309
|
disabled: !fileToUpload || uploading,
|
|
21227
21310
|
onClick: handleConfirmUpload,
|
|
21228
|
-
className: "cteditor-mt-2",
|
|
21311
|
+
className: "cteditor-mt-2 cteditor-w-full",
|
|
21229
21312
|
children: uploading ? `Uploading... ${progress}%` : "Confirm Upload"
|
|
21230
21313
|
}
|
|
21231
21314
|
)
|
|
@@ -21241,8 +21324,7 @@ const InsertFileDialog = ({
|
|
|
21241
21324
|
};
|
|
21242
21325
|
return /* @__PURE__ */ jsx(Dialog, { open: true, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsxs(DialogContent, { className: "sm:cteditor-max-w-md", children: [
|
|
21243
21326
|
/* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: "Insert File" }) }),
|
|
21244
|
-
/* @__PURE__ */ jsx("div", { className: "cteditor-py-2", children: /* @__PURE__ */ jsx(InsertFileUploadedDialogBody, { onClick }) })
|
|
21245
|
-
/* @__PURE__ */ jsx(DialogFooter, { children: /* @__PURE__ */ jsx(Button, { onClick: onClose, children: "Cancel" }) })
|
|
21327
|
+
/* @__PURE__ */ jsx("div", { className: "cteditor-py-2", children: /* @__PURE__ */ jsx(InsertFileUploadedDialogBody, { onClick }) })
|
|
21246
21328
|
] }) });
|
|
21247
21329
|
};
|
|
21248
21330
|
const INSERT_IMAGE_COMMAND = createCommand("INSERT_IMAGE_COMMAND");
|
|
@@ -21322,49 +21404,28 @@ const InsertImageUploadedDialogBody = ({
|
|
|
21322
21404
|
}
|
|
21323
21405
|
};
|
|
21324
21406
|
return /* @__PURE__ */ jsxs("div", { className: "cteditor-space-y-4", children: [
|
|
21325
|
-
tempSrc && /* @__PURE__ */ jsx("div", { className: "cteditor-mb-4", children: /* @__PURE__ */ jsx(
|
|
21407
|
+
tempSrc && /* @__PURE__ */ jsx("div", { className: "cteditor-mb-4 cteditor-flex cteditor-justify-center", children: /* @__PURE__ */ jsx(
|
|
21326
21408
|
"img",
|
|
21327
21409
|
{
|
|
21328
21410
|
src: tempSrc,
|
|
21329
21411
|
alt: "Preview",
|
|
21330
|
-
className: "cteditor-max-w-full cteditor-max-h-
|
|
21412
|
+
className: "cteditor-max-w-full cteditor-max-h-44 cteditor-object-contain"
|
|
21331
21413
|
}
|
|
21332
21414
|
) }),
|
|
21333
|
-
/* @__PURE__ */
|
|
21334
|
-
/* @__PURE__ */ jsx("
|
|
21335
|
-
|
|
21415
|
+
/* @__PURE__ */ jsx("div", { className: "fileUploadBox cteditor-flex cteditor-items-center cteditor-justify-center cteditor-border-[1px] cteditor-border-dashed cteditor-h-auto cteditor-border-foreground cteditor-rounded-xl cteditor-p-0 ", children: /* @__PURE__ */ jsxs("div", { className: "flex-grow cteditor-w-full", children: [
|
|
21416
|
+
/* @__PURE__ */ jsx(Label$2, { htmlFor: "image-upload", className: "!cteditor-sr-only", children: "Upload Image" }),
|
|
21417
|
+
/* @__PURE__ */ jsx(
|
|
21418
|
+
Input$1,
|
|
21336
21419
|
{
|
|
21337
|
-
|
|
21338
|
-
|
|
21339
|
-
|
|
21340
|
-
|
|
21341
|
-
|
|
21342
|
-
|
|
21343
|
-
strokeWidth: "2",
|
|
21344
|
-
strokeLinecap: "round",
|
|
21345
|
-
strokeLinejoin: "round",
|
|
21346
|
-
children: [
|
|
21347
|
-
/* @__PURE__ */ jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
21348
|
-
/* @__PURE__ */ jsx("polyline", { points: "17 8 12 3 7 8" }),
|
|
21349
|
-
/* @__PURE__ */ jsx("line", { x1: "12", x2: "12", y1: "3", y2: "15" })
|
|
21350
|
-
]
|
|
21420
|
+
id: "image-upload",
|
|
21421
|
+
type: "file",
|
|
21422
|
+
accept: "image/*",
|
|
21423
|
+
onChange: onChangeImage,
|
|
21424
|
+
"data-test-id": "image-modal-file-upload",
|
|
21425
|
+
className: "cteditor-w-full !cteditor-py-3 !cteditor-h-auto !cteditor-border-none"
|
|
21351
21426
|
}
|
|
21352
|
-
)
|
|
21353
|
-
|
|
21354
|
-
/* @__PURE__ */ jsx(Label$2, { htmlFor: "image-upload", className: "!cteditor-sr-only", children: "Upload Image" }),
|
|
21355
|
-
/* @__PURE__ */ jsx(
|
|
21356
|
-
Input$1,
|
|
21357
|
-
{
|
|
21358
|
-
id: "image-upload",
|
|
21359
|
-
type: "file",
|
|
21360
|
-
accept: "image/*",
|
|
21361
|
-
onChange: onChangeImage,
|
|
21362
|
-
"data-test-id": "image-modal-file-upload",
|
|
21363
|
-
className: "cteditor-w-full"
|
|
21364
|
-
}
|
|
21365
|
-
)
|
|
21366
|
-
] })
|
|
21367
|
-
] }),
|
|
21427
|
+
)
|
|
21428
|
+
] }) }),
|
|
21368
21429
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
21369
21430
|
/* @__PURE__ */ jsx(Label$2, { htmlFor: "alt-text", className: "cteditor-mb-2 cteditor-block", children: "Alt Text" }),
|
|
21370
21431
|
/* @__PURE__ */ jsx(
|
|
@@ -21375,7 +21436,7 @@ const InsertImageUploadedDialogBody = ({
|
|
|
21375
21436
|
value: altText,
|
|
21376
21437
|
onChange: (e) => setAltText(e.target.value),
|
|
21377
21438
|
"data-test-id": "image-modal-alt-text-input",
|
|
21378
|
-
className: "cteditor-w-full"
|
|
21439
|
+
className: "cteditor-w-full cteditor-cursor-pointer"
|
|
21379
21440
|
}
|
|
21380
21441
|
)
|
|
21381
21442
|
] }),
|
|
@@ -21566,8 +21627,7 @@ const InsertImageDialog = ({ activeEditor, onClose }) => {
|
|
|
21566
21627
|
]
|
|
21567
21628
|
}
|
|
21568
21629
|
)
|
|
21569
|
-
] }) : mode === "file" ? /* @__PURE__ */ jsx(InsertImageUploadedDialogBody, { onClick }) : /* @__PURE__ */ jsx(InsertImageUrlDialogBody, { onClick })
|
|
21570
|
-
/* @__PURE__ */ jsx(DialogFooter, { children: /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: onClose, children: "Cancel" }) })
|
|
21630
|
+
] }) : mode === "file" ? /* @__PURE__ */ jsx(InsertImageUploadedDialogBody, { onClick }) : /* @__PURE__ */ jsx(InsertImageUrlDialogBody, { onClick })
|
|
21571
21631
|
] }) });
|
|
21572
21632
|
};
|
|
21573
21633
|
function _extends() {
|
|
@@ -22497,30 +22557,33 @@ const SignatureCanvasDialog = ({
|
|
|
22497
22557
|
return /* @__PURE__ */ jsx(Dialog, { open: true, onOpenChange: () => onClose(), children: /* @__PURE__ */ jsxs(DialogContent, { className: "!cteditor-max-w-3xl", children: [
|
|
22498
22558
|
/* @__PURE__ */ jsxs("div", { className: "cteditor-space-y-4", children: [
|
|
22499
22559
|
/* @__PURE__ */ jsx("div", { className: "cteditor-text-lg cteditor-font-medium", children: "Draw your signature" }),
|
|
22500
|
-
/* @__PURE__ */ jsxs("div", { className: "cteditor-
|
|
22501
|
-
/* @__PURE__ */
|
|
22502
|
-
|
|
22503
|
-
"
|
|
22504
|
-
|
|
22505
|
-
|
|
22506
|
-
|
|
22507
|
-
|
|
22508
|
-
|
|
22509
|
-
|
|
22510
|
-
|
|
22511
|
-
|
|
22512
|
-
|
|
22513
|
-
|
|
22514
|
-
/* @__PURE__ */
|
|
22515
|
-
"input",
|
|
22516
|
-
|
|
22517
|
-
|
|
22518
|
-
|
|
22519
|
-
|
|
22520
|
-
|
|
22521
|
-
|
|
22522
|
-
|
|
22523
|
-
|
|
22560
|
+
/* @__PURE__ */ jsxs("div", { className: "cteditor-flex cteditor-justify-between cteditor-gap-3 cteditor-items-center", children: [
|
|
22561
|
+
/* @__PURE__ */ jsxs("div", { className: "cteditor-flex cteditor-gap-2 cteditor-items-center", children: [
|
|
22562
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "penColor", children: "Choose Color:" }),
|
|
22563
|
+
/* @__PURE__ */ jsx("div", { className: "cteditor-size-8 cteditor-overflow-hidden cteditor-relative cteditor-rounded-md cteditor-border cteditor-border-foreground/5", children: /* @__PURE__ */ jsx(
|
|
22564
|
+
"input",
|
|
22565
|
+
{
|
|
22566
|
+
type: "color",
|
|
22567
|
+
id: "penColor",
|
|
22568
|
+
value: penColor,
|
|
22569
|
+
onChange: handleColorChange,
|
|
22570
|
+
className: "cteditor-scale-[5] cteditor-absolute cteditor-inset-0 cteditor-cursor-pointer"
|
|
22571
|
+
}
|
|
22572
|
+
) })
|
|
22573
|
+
] }),
|
|
22574
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
22575
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "uploadSignature", className: "cteditor-cursor-pointer cteditor-text-foreground underline cteditor-text-sm cteditor-rounded-md cteditor-h-9 cteditor-px-4 cteditor-font-medium cteditor-shadow-sm cteditor-bg-background cteditor-border-input cteditor-border cteditor-flex cteditor-items-center hover:cteditor-bg-accent", children: "Upload Signature Image" }),
|
|
22576
|
+
/* @__PURE__ */ jsx(
|
|
22577
|
+
"input",
|
|
22578
|
+
{
|
|
22579
|
+
type: "file",
|
|
22580
|
+
id: "uploadSignature",
|
|
22581
|
+
accept: "image/*",
|
|
22582
|
+
onChange: handleUpload,
|
|
22583
|
+
className: "cteditor-hidden"
|
|
22584
|
+
}
|
|
22585
|
+
)
|
|
22586
|
+
] })
|
|
22524
22587
|
] }),
|
|
22525
22588
|
/* @__PURE__ */ jsx("div", { className: "cteditor-border cteditor-border-gray-300 cteditor-rounded-sm cteditor-bg-white", children: /* @__PURE__ */ jsx(
|
|
22526
22589
|
SignatureCanvas,
|
|
@@ -22782,14 +22845,14 @@ const InsertMenuDrop = () => {
|
|
|
22782
22845
|
}
|
|
22783
22846
|
];
|
|
22784
22847
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22785
|
-
/* @__PURE__ */ jsx("div", { className: "cteditor-flex cteditor-flex-col
|
|
22848
|
+
/* @__PURE__ */ jsx("div", { className: "cteditor-flex cteditor-flex-col", children: insertMenuItems.map((option, index2) => /* @__PURE__ */ jsxs(
|
|
22786
22849
|
"button",
|
|
22787
22850
|
{
|
|
22788
|
-
className: "cteditor-relative cteditor-flex cteditor-cursor-pointer cteditor-select-none cteditor-items-center cteditor-gap-2 cteditor-rounded-sm cteditor-px-2 cteditor-py-1.5 cteditor-text-[13px] cteditor-outline-none cteditor-transition-colors focus:cteditor-bg-foreground/5 focus:cteditor-text-accent-foreground data-[disabled]:cteditor-pointer-events-none data-[disabled]:cteditor-opacity-50
|
|
22851
|
+
className: "cteditor-relative cteditor-flex cteditor-cursor-pointer cteditor-select-none cteditor-items-center cteditor-gap-2 cteditor-rounded-sm cteditor-px-2 cteditor-py-1.5 cteditor-text-[13px] cteditor-outline-none cteditor-transition-colors focus:cteditor-bg-foreground/5 focus:cteditor-text-accent-foreground hover:cteditor-bg-foreground/5 data-[disabled]:cteditor-pointer-events-none data-[disabled]:cteditor-opacity-50 [&>svg]:cteditor-shrink-0",
|
|
22789
22852
|
onClick: option.onClick,
|
|
22790
22853
|
title: option.name,
|
|
22791
22854
|
children: [
|
|
22792
|
-
/* @__PURE__ */ jsx("span", { className: "[&>svg]:cteditor-size-4", children: option.icon }),
|
|
22855
|
+
/* @__PURE__ */ jsx("span", { className: "cteditor-size-6 [&>svg]:cteditor-size-4 cteditor-flex cteditor-justify-center cteditor-items-center", children: option.icon }),
|
|
22793
22856
|
/* @__PURE__ */ jsx("span", { children: option.name })
|
|
22794
22857
|
]
|
|
22795
22858
|
},
|
|
@@ -22806,7 +22869,7 @@ const AlignMenuDrop = () => {
|
|
|
22806
22869
|
onClick: () => {
|
|
22807
22870
|
editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, option.payload);
|
|
22808
22871
|
},
|
|
22809
|
-
className: "cteditor-relative cteditor-flex cteditor-cursor-pointer cteditor-select-none cteditor-items-center cteditor-gap-2 cteditor-rounded-sm cteditor-px-2 cteditor-py-1.5 cteditor-text-[13px] cteditor-outline-none cteditor-transition-colors focus:cteditor-bg-foreground/5 focus:cteditor-text-accent-foreground data-[disabled]:cteditor-pointer-events-none data-[disabled]:cteditor-opacity-50 [&>svg]:cteditor-size-4 [&>svg]:cteditor-shrink-0",
|
|
22872
|
+
className: "cteditor-relative cteditor-flex cteditor-cursor-pointer cteditor-select-none cteditor-items-center cteditor-gap-2 cteditor-rounded-sm cteditor-px-2 cteditor-py-1.5 cteditor-text-[13px] cteditor-outline-none cteditor-transition-colors focus:cteditor-bg-foreground/5 focus:cteditor-text-accent-foreground hover:cteditor-bg-foreground/5 data-[disabled]:cteditor-pointer-events-none data-[disabled]:cteditor-opacity-50 [&>svg]:cteditor-size-4 [&>svg]:cteditor-shrink-0",
|
|
22810
22873
|
title: option.name,
|
|
22811
22874
|
children: [
|
|
22812
22875
|
/* @__PURE__ */ jsx("span", { className: "[&>svg]:cteditor-size-4", children: option.icon }),
|
|
@@ -22816,6 +22879,99 @@ const AlignMenuDrop = () => {
|
|
|
22816
22879
|
index2
|
|
22817
22880
|
)) });
|
|
22818
22881
|
};
|
|
22882
|
+
const FormatTextMenuDrop = ({ hasFormat, blockType }) => {
|
|
22883
|
+
const [editor] = useLexicalComposerContext();
|
|
22884
|
+
const textFormats = [
|
|
22885
|
+
"bold",
|
|
22886
|
+
"italic",
|
|
22887
|
+
"strikethrough",
|
|
22888
|
+
"underline",
|
|
22889
|
+
"code",
|
|
22890
|
+
"subscript",
|
|
22891
|
+
"superscript"
|
|
22892
|
+
];
|
|
22893
|
+
const handleFormatClick = (payload) => {
|
|
22894
|
+
if (textFormats.includes(payload)) {
|
|
22895
|
+
editor.dispatchCommand(FORMAT_TEXT_COMMAND, payload);
|
|
22896
|
+
return;
|
|
22897
|
+
}
|
|
22898
|
+
editor.update(() => {
|
|
22899
|
+
const selection = $getSelection();
|
|
22900
|
+
if (!$isRangeSelection(selection))
|
|
22901
|
+
return;
|
|
22902
|
+
switch (payload) {
|
|
22903
|
+
case "bullet":
|
|
22904
|
+
if (blockType !== "bullet") {
|
|
22905
|
+
editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, void 0);
|
|
22906
|
+
} else {
|
|
22907
|
+
editor.dispatchCommand(REMOVE_LIST_COMMAND, void 0);
|
|
22908
|
+
}
|
|
22909
|
+
break;
|
|
22910
|
+
case "number":
|
|
22911
|
+
if (blockType !== "number") {
|
|
22912
|
+
editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, void 0);
|
|
22913
|
+
} else {
|
|
22914
|
+
editor.dispatchCommand(REMOVE_LIST_COMMAND, void 0);
|
|
22915
|
+
}
|
|
22916
|
+
break;
|
|
22917
|
+
case "check":
|
|
22918
|
+
if (blockType !== "check") {
|
|
22919
|
+
editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, void 0);
|
|
22920
|
+
} else {
|
|
22921
|
+
editor.dispatchCommand(REMOVE_LIST_COMMAND, void 0);
|
|
22922
|
+
}
|
|
22923
|
+
break;
|
|
22924
|
+
case "quote":
|
|
22925
|
+
$setBlocksType(selection, () => $createQuoteNode());
|
|
22926
|
+
break;
|
|
22927
|
+
}
|
|
22928
|
+
});
|
|
22929
|
+
};
|
|
22930
|
+
const textFormattingItems = formatMenuItems.filter(
|
|
22931
|
+
(item) => textFormats.includes(item.payload)
|
|
22932
|
+
);
|
|
22933
|
+
const listQuoteFormattingItems = formatMenuItems.filter(
|
|
22934
|
+
(item) => !textFormats.includes(item.payload)
|
|
22935
|
+
);
|
|
22936
|
+
return /* @__PURE__ */ jsxs("div", { className: "cteditor-flex cteditor-flex-col cteditor-w-full", children: [
|
|
22937
|
+
textFormattingItems.map((option, index2) => /* @__PURE__ */ jsxs(
|
|
22938
|
+
Button,
|
|
22939
|
+
{
|
|
22940
|
+
variant: "ghost",
|
|
22941
|
+
size: "sm",
|
|
22942
|
+
className: cn$1(
|
|
22943
|
+
"cteditor-relative cteditor-flex cteditor-cursor-pointer cteditor-select-none cteditor-items-center cteditor-gap-2 cteditor-rounded-sm cteditor-px-2 cteditor-py-1.5 cteditor-text-[13px] cteditor-outline-none cteditor-transition-colors focus:cteditor-bg-foreground/5 focus:cteditor-text-accent-foreground hover:cteditor-bg-foreground/5 data-[disabled]:cteditor-pointer-events-none data-[disabled]:cteditor-opacity-50 [&>svg]:cteditor-size-4 [&>svg]:cteditor-shrink-0 !cteditor-justify-start cteditor-h-auto ",
|
|
22944
|
+
hasFormat[option.payload] && "cteditor-bg-accent"
|
|
22945
|
+
),
|
|
22946
|
+
onClick: () => handleFormatClick(option.payload),
|
|
22947
|
+
title: option.name,
|
|
22948
|
+
children: [
|
|
22949
|
+
/* @__PURE__ */ jsx("span", { className: "[&>svg]:cteditor-size-4", children: option.icon }),
|
|
22950
|
+
/* @__PURE__ */ jsx("span", { children: option.name })
|
|
22951
|
+
]
|
|
22952
|
+
},
|
|
22953
|
+
index2
|
|
22954
|
+
)),
|
|
22955
|
+
listQuoteFormattingItems.map((option, index2) => /* @__PURE__ */ jsxs(
|
|
22956
|
+
Button,
|
|
22957
|
+
{
|
|
22958
|
+
variant: "ghost",
|
|
22959
|
+
size: "sm",
|
|
22960
|
+
className: cn$1(
|
|
22961
|
+
"cteditor-relative cteditor-flex cteditor-cursor-pointer cteditor-select-none cteditor-items-center cteditor-gap-2 cteditor-rounded-sm cteditor-px-2 cteditor-py-1.5 cteditor-text-[13px] cteditor-outline-none cteditor-transition-colors focus:cteditor-bg-foreground/5 focus:cteditor-text-accent-foreground hover:cteditor-bg-foreground/5 data-[disabled]:cteditor-pointer-events-none data-[disabled]:cteditor-opacity-50 [&>svg]:cteditor-size-4 [&>svg]:cteditor-shrink-0 !cteditor-justify-start cteditor-h-auto",
|
|
22962
|
+
blockType === option.payload && "cteditor-bg-accent"
|
|
22963
|
+
),
|
|
22964
|
+
onClick: () => handleFormatClick(option.payload),
|
|
22965
|
+
title: option.name,
|
|
22966
|
+
children: [
|
|
22967
|
+
/* @__PURE__ */ jsx("span", { className: "[&>svg]:cteditor-size-4", children: option.icon }),
|
|
22968
|
+
/* @__PURE__ */ jsx("span", { children: option.name })
|
|
22969
|
+
]
|
|
22970
|
+
},
|
|
22971
|
+
`list-quote-${index2}`
|
|
22972
|
+
))
|
|
22973
|
+
] });
|
|
22974
|
+
};
|
|
22819
22975
|
const Toolbar = ({
|
|
22820
22976
|
editable,
|
|
22821
22977
|
enableUndoRedo = true,
|
|
@@ -23246,7 +23402,7 @@ const Toolbar = ({
|
|
|
23246
23402
|
"div",
|
|
23247
23403
|
{
|
|
23248
23404
|
ref: contentRef,
|
|
23249
|
-
className: "cteditor-flex cteditor-items-center cteditor-gap-1.5
|
|
23405
|
+
className: "cteditor-flex cteditor-items-center cteditor-gap-1.5 cteditor-overflow-x-auto cteditor-overflow-y-hidden cteditor-flex-nowrap no-scrollbar",
|
|
23250
23406
|
style: {
|
|
23251
23407
|
scrollBehavior: "smooth",
|
|
23252
23408
|
WebkitOverflowScrolling: "touch"
|
|
@@ -23420,8 +23576,10 @@ const Toolbar = ({
|
|
|
23420
23576
|
) }),
|
|
23421
23577
|
/* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsx("p", { children: "Insert code block" }) })
|
|
23422
23578
|
] }) }),
|
|
23423
|
-
enableFormatTextMenu && activeEditor === editor && /* @__PURE__ */
|
|
23424
|
-
|
|
23579
|
+
enableFormatTextMenu && activeEditor === editor && /* @__PURE__ */ jsxs("div", { "data-toolbar-item": "formatTextMenu", className: "cteditor-size-6", children: [
|
|
23580
|
+
/* @__PURE__ */ jsx(FormatTextMenu, { hasFormat, blockType }),
|
|
23581
|
+
/* @__PURE__ */ jsx(Separator$2, { orientation: "vertical", className: "!cteditor-h-7" })
|
|
23582
|
+
] }),
|
|
23425
23583
|
enableColorPicker && activeEditor === editor && /* @__PURE__ */ jsxs(
|
|
23426
23584
|
"div",
|
|
23427
23585
|
{
|
|
@@ -23458,8 +23616,7 @@ const Toolbar = ({
|
|
|
23458
23616
|
}
|
|
23459
23617
|
},
|
|
23460
23618
|
"bg-color-picker"
|
|
23461
|
-
) })
|
|
23462
|
-
/* @__PURE__ */ jsx(Separator$2, { orientation: "vertical", className: "!cteditor-h-7" })
|
|
23619
|
+
) })
|
|
23463
23620
|
]
|
|
23464
23621
|
}
|
|
23465
23622
|
),
|
|
@@ -23472,7 +23629,7 @@ const Toolbar = ({
|
|
|
23472
23629
|
size: "icon-sm",
|
|
23473
23630
|
onClick: insertLink,
|
|
23474
23631
|
className: cn$1(
|
|
23475
|
-
isLinkActive ? "
|
|
23632
|
+
isLinkActive ? "cteditor-bg-accent" : "cteditor-text-foreground"
|
|
23476
23633
|
),
|
|
23477
23634
|
children: /* @__PURE__ */ jsx(LinkIcon, {})
|
|
23478
23635
|
}
|
|
@@ -23548,8 +23705,8 @@ const Toolbar = ({
|
|
|
23548
23705
|
disabled: !editable,
|
|
23549
23706
|
className: cn$1(
|
|
23550
23707
|
classes.toolbarButton,
|
|
23551
|
-
toolbarState.isAutocompleteEnabled && "
|
|
23552
|
-
"[&>svg]:!cteditor-size-4"
|
|
23708
|
+
toolbarState.isAutocompleteEnabled && "",
|
|
23709
|
+
"[&>svg]:!cteditor-size-4 p-1"
|
|
23553
23710
|
),
|
|
23554
23711
|
children: /* @__PURE__ */ jsx(SearchTextIcon2, {})
|
|
23555
23712
|
}
|
|
@@ -23588,7 +23745,7 @@ const Toolbar = ({
|
|
|
23588
23745
|
className: "cteditor-relative",
|
|
23589
23746
|
children: [
|
|
23590
23747
|
isExportingPDF ? /* @__PURE__ */ jsx(Loader2, { className: "!cteditor-size-4 cteditor-animate-spin" }) : /* @__PURE__ */ jsx(Download, { className: "!cteditor-size-4" }),
|
|
23591
|
-
/* @__PURE__ */ jsx("span", {
|
|
23748
|
+
/* @__PURE__ */ jsx("span", { children: isExportingPDF ? `Exporting... ${exportProgress}%` : "Export" })
|
|
23592
23749
|
]
|
|
23593
23750
|
}
|
|
23594
23751
|
) }),
|
|
@@ -23600,7 +23757,7 @@ const Toolbar = ({
|
|
|
23600
23757
|
{
|
|
23601
23758
|
variant: "outline",
|
|
23602
23759
|
size: "sm",
|
|
23603
|
-
className: "cteditor-px-4 cteditor-gap-
|
|
23760
|
+
className: "cteditor-px-4 cteditor-gap-2 [&>svg]:!cteditor-size-4 cteditor-bg-gradient-to-r cteditor-from-background cteditor-via-primary/10 cteditor-to-background hover:cteditor-from-background/80 hover:cteditor-via-primary/10 hover:cteditor-to-background/80",
|
|
23604
23761
|
children: [
|
|
23605
23762
|
/* @__PURE__ */ jsx(MagicoonIcon, {}),
|
|
23606
23763
|
" Go with AI"
|
|
@@ -23705,7 +23862,7 @@ const Toolbar = ({
|
|
|
23705
23862
|
open: isMoreMenuOpen,
|
|
23706
23863
|
onOpenChange: setIsMoreMenuOpen,
|
|
23707
23864
|
children: [
|
|
23708
|
-
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", className: "!cteditor-px-1 !cteditor-py-0.5 !cteditor-h-7 !cteditor-gap-1", children: [
|
|
23865
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", className: "!cteditor-px-1 !cteditor-py-0.5 !cteditor-h-7 !cteditor-gap-1 !cteditor-bg-accent", children: [
|
|
23709
23866
|
/* @__PURE__ */ jsx(Plus, { className: "!cteditor-size-5" }),
|
|
23710
23867
|
/* @__PURE__ */ jsx(ChevronDown, { className: "!cteditor-size-3.5" })
|
|
23711
23868
|
] }) }),
|
|
@@ -23776,33 +23933,32 @@ const Toolbar = ({
|
|
|
23776
23933
|
children: /* @__PURE__ */ jsx(
|
|
23777
23934
|
"div",
|
|
23778
23935
|
{
|
|
23779
|
-
className: "cteditor-w-full",
|
|
23936
|
+
className: "cteditor-w-full ",
|
|
23780
23937
|
onClick: (e) => e.stopPropagation(),
|
|
23781
23938
|
children: /* @__PURE__ */ jsx(FontSizeControl, {})
|
|
23782
23939
|
}
|
|
23783
23940
|
)
|
|
23784
23941
|
}
|
|
23785
|
-
)
|
|
23786
|
-
/* @__PURE__ */ jsx(DropdownMenuSeparator, {})
|
|
23787
|
-
] }),
|
|
23788
|
-
enableTableOptions && activeEditor === editor && hiddenItemIds.has("tableOptions") && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23789
|
-
/* @__PURE__ */ jsx(
|
|
23790
|
-
DropdownMenuItem$1,
|
|
23791
|
-
{
|
|
23792
|
-
asChild: true,
|
|
23793
|
-
onSelect: (e) => e.preventDefault(),
|
|
23794
|
-
children: /* @__PURE__ */ jsx(
|
|
23795
|
-
"div",
|
|
23796
|
-
{
|
|
23797
|
-
className: "cteditor-w-full",
|
|
23798
|
-
onClick: (e) => e.stopPropagation(),
|
|
23799
|
-
children: /* @__PURE__ */ jsx(TableOptionPlugin, {})
|
|
23800
|
-
}
|
|
23801
|
-
)
|
|
23802
|
-
}
|
|
23803
|
-
),
|
|
23804
|
-
/* @__PURE__ */ jsx(DropdownMenuSeparator, {})
|
|
23942
|
+
)
|
|
23805
23943
|
] }),
|
|
23944
|
+
enableTableOptions && activeEditor === editor && hiddenItemIds.has("tableOptions") && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
23945
|
+
DropdownMenuItem$1,
|
|
23946
|
+
{
|
|
23947
|
+
asChild: true,
|
|
23948
|
+
onSelect: (e) => e.preventDefault(),
|
|
23949
|
+
children: /* @__PURE__ */ jsxs(
|
|
23950
|
+
"div",
|
|
23951
|
+
{
|
|
23952
|
+
className: "cteditor-w-full",
|
|
23953
|
+
onClick: (e) => e.stopPropagation(),
|
|
23954
|
+
children: [
|
|
23955
|
+
/* @__PURE__ */ jsx(TableOptionPlugin, {}),
|
|
23956
|
+
"Table"
|
|
23957
|
+
]
|
|
23958
|
+
}
|
|
23959
|
+
)
|
|
23960
|
+
}
|
|
23961
|
+
) }),
|
|
23806
23962
|
enableTextFormatting && hiddenItemIds.has("inlineFormats") && /* @__PURE__ */ jsxs(
|
|
23807
23963
|
DropdownMenuItem$1,
|
|
23808
23964
|
{
|
|
@@ -23811,33 +23967,22 @@ const Toolbar = ({
|
|
|
23811
23967
|
"strikethrough"
|
|
23812
23968
|
),
|
|
23813
23969
|
children: [
|
|
23814
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
23970
|
+
/* @__PURE__ */ jsx("div", { className: "[&>svg]:!cteditor-size-6", children: /* @__PURE__ */ jsx(StrikethroughIcon, {}) }),
|
|
23815
23971
|
"Strikethrough"
|
|
23816
23972
|
]
|
|
23817
23973
|
}
|
|
23818
23974
|
),
|
|
23819
23975
|
enableCodeFormat && activeEditor === editor && hiddenItemIds.has("codeBlock") && /* @__PURE__ */ jsxs(DropdownMenuItem$1, { onClick: formatCodeBlock, children: [
|
|
23820
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
23976
|
+
/* @__PURE__ */ jsx("div", { className: " [&>svg]:!cteditor-size-6", children: /* @__PURE__ */ jsx(CodeIcon, {}) }),
|
|
23821
23977
|
"Code Block"
|
|
23822
23978
|
] }),
|
|
23823
|
-
enableFormatTextMenu && activeEditor === editor && hiddenItemIds.has("formatTextMenu") && /* @__PURE__ */
|
|
23824
|
-
|
|
23825
|
-
{
|
|
23826
|
-
|
|
23827
|
-
|
|
23828
|
-
children: /* @__PURE__ */ jsx(
|
|
23829
|
-
"div",
|
|
23830
|
-
{
|
|
23831
|
-
className: "cteditor-w-full",
|
|
23832
|
-
onClick: (e) => e.stopPropagation(),
|
|
23833
|
-
children: /* @__PURE__ */ jsx(FormatTextMenu, { hasFormat, blockType })
|
|
23834
|
-
}
|
|
23835
|
-
)
|
|
23836
|
-
}
|
|
23837
|
-
),
|
|
23979
|
+
enableFormatTextMenu && activeEditor === editor && hiddenItemIds.has("formatTextMenu") && /* @__PURE__ */ jsxs("div", { className: "cteditor-w-full cteditor-pt-1", children: [
|
|
23980
|
+
/* @__PURE__ */ jsx("div", { className: "cteditor-text-xs cteditor-font-medium cteditor-mb-1 cteditor-opacity-60 cteditor-px-2", children: "Format" }),
|
|
23981
|
+
/* @__PURE__ */ jsx(FormatTextMenuDrop, { hasFormat, blockType }),
|
|
23982
|
+
/* @__PURE__ */ jsx(DropdownMenuSeparator, { className: "!cteditor-bg-foreground/10" })
|
|
23983
|
+
] }),
|
|
23838
23984
|
enableColorPicker && activeEditor === editor && hiddenItemIds.has("colorPickers") && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23839
|
-
/* @__PURE__ */
|
|
23840
|
-
/* @__PURE__ */ jsxs("div", { className: "cteditor-w-full cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-px-2 cteditor-py-1.5", children: [
|
|
23985
|
+
/* @__PURE__ */ jsxs("div", { className: "cteditor-w-full cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-px-2 cteditor-py-1.5 hover:cteditor-bg-foreground/5", children: [
|
|
23841
23986
|
/* @__PURE__ */ jsx(
|
|
23842
23987
|
ColorPicker$2,
|
|
23843
23988
|
{
|
|
@@ -23864,7 +24009,7 @@ const Toolbar = ({
|
|
|
23864
24009
|
),
|
|
23865
24010
|
/* @__PURE__ */ jsx("span", { className: "cteditor-flex-1 cteditor-text-xs", children: "Font Color" })
|
|
23866
24011
|
] }),
|
|
23867
|
-
/* @__PURE__ */ jsxs("div", { className: "cteditor-w-full cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-px-2 cteditor-py-1.5", children: [
|
|
24012
|
+
/* @__PURE__ */ jsxs("div", { className: "cteditor-w-full cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-px-2 cteditor-py-1.5 hover:cteditor-bg-foreground/5", children: [
|
|
23868
24013
|
/* @__PURE__ */ jsx(
|
|
23869
24014
|
ColorPicker$2,
|
|
23870
24015
|
{
|
|
@@ -23926,7 +24071,7 @@ const Toolbar = ({
|
|
|
23926
24071
|
)
|
|
23927
24072
|
}
|
|
23928
24073
|
),
|
|
23929
|
-
hiddenItemIds.has("highlight") && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "cteditor-w-full cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-px-2 cteditor-py-1.5", children: [
|
|
24074
|
+
hiddenItemIds.has("highlight") && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "cteditor-w-full cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-px-2 cteditor-py-1.5 hover:cteditor-bg-foreground/5", children: [
|
|
23930
24075
|
/* @__PURE__ */ jsx(
|
|
23931
24076
|
HighlightColorPicker,
|
|
23932
24077
|
{
|
|
@@ -23939,108 +24084,119 @@ const Toolbar = ({
|
|
|
23939
24084
|
),
|
|
23940
24085
|
/* @__PURE__ */ jsx("span", { className: "cteditor-flex-1 cteditor-text-sm", children: "Highlight" })
|
|
23941
24086
|
] }) }),
|
|
23942
|
-
enableAlignment && activeEditor === editor && hiddenItemIds.has("alignMenu") && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "cteditor-w-full cteditor-
|
|
23943
|
-
/* @__PURE__ */ jsx("div", { className: "cteditor-text-xs cteditor-font-medium cteditor-mb-1 cteditor-opacity-60", children: "Align Menu" }),
|
|
24087
|
+
enableAlignment && activeEditor === editor && hiddenItemIds.has("alignMenu") && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "cteditor-w-full cteditor-pt-2", children: [
|
|
24088
|
+
/* @__PURE__ */ jsx("div", { className: "cteditor-text-xs cteditor-font-medium cteditor-mb-1 cteditor-opacity-60 cteditor-px-2", children: "Align Menu" }),
|
|
23944
24089
|
/* @__PURE__ */ jsx(AlignMenuDrop, {})
|
|
23945
24090
|
] }) }),
|
|
23946
|
-
hiddenItemIds.has("aiOptions") && /* @__PURE__ */
|
|
23947
|
-
/* @__PURE__ */
|
|
23948
|
-
|
|
23949
|
-
/* @__PURE__ */ jsxs(
|
|
23950
|
-
|
|
23951
|
-
|
|
23952
|
-
{
|
|
23953
|
-
|
|
23954
|
-
|
|
23955
|
-
|
|
23956
|
-
|
|
23957
|
-
children:
|
|
23958
|
-
|
|
23959
|
-
|
|
23960
|
-
|
|
23961
|
-
|
|
23962
|
-
|
|
23963
|
-
|
|
23964
|
-
|
|
23965
|
-
{
|
|
23966
|
-
|
|
23967
|
-
|
|
23968
|
-
|
|
23969
|
-
|
|
23970
|
-
children:
|
|
23971
|
-
|
|
23972
|
-
|
|
23973
|
-
|
|
23974
|
-
|
|
23975
|
-
|
|
23976
|
-
|
|
23977
|
-
|
|
23978
|
-
{
|
|
23979
|
-
|
|
23980
|
-
|
|
23981
|
-
|
|
23982
|
-
|
|
23983
|
-
children:
|
|
23984
|
-
|
|
23985
|
-
|
|
23986
|
-
|
|
23987
|
-
|
|
23988
|
-
|
|
23989
|
-
|
|
23990
|
-
|
|
23991
|
-
{
|
|
23992
|
-
|
|
23993
|
-
|
|
23994
|
-
|
|
23995
|
-
|
|
23996
|
-
children:
|
|
23997
|
-
|
|
23998
|
-
|
|
23999
|
-
|
|
24000
|
-
|
|
24001
|
-
|
|
24002
|
-
|
|
24003
|
-
|
|
24004
|
-
{
|
|
24005
|
-
|
|
24006
|
-
|
|
24007
|
-
|
|
24008
|
-
|
|
24009
|
-
children:
|
|
24010
|
-
|
|
24011
|
-
|
|
24012
|
-
|
|
24013
|
-
|
|
24014
|
-
|
|
24015
|
-
|
|
24016
|
-
|
|
24017
|
-
{
|
|
24018
|
-
|
|
24019
|
-
|
|
24020
|
-
|
|
24021
|
-
|
|
24022
|
-
children:
|
|
24023
|
-
|
|
24024
|
-
|
|
24025
|
-
|
|
24026
|
-
|
|
24027
|
-
|
|
24028
|
-
|
|
24029
|
-
|
|
24030
|
-
{
|
|
24031
|
-
|
|
24032
|
-
|
|
24033
|
-
|
|
24034
|
-
|
|
24035
|
-
children:
|
|
24036
|
-
|
|
24037
|
-
|
|
24038
|
-
|
|
24039
|
-
|
|
24040
|
-
|
|
24041
|
-
|
|
24042
|
-
|
|
24043
|
-
/* @__PURE__ */ jsx(DropdownMenuSeparator, { className: "!cteditor-bg-foreground/10" })
|
|
24091
|
+
hiddenItemIds.has("aiOptions") && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "cteditor-w-full", children: [
|
|
24092
|
+
/* @__PURE__ */ jsx("div", { className: "cteditor-text-xs cteditor-font-medium cteditor-mb-1 cteditor-opacity-60 cteditor-px-2 cteditor-pt-2", children: "Go with AI" }),
|
|
24093
|
+
/* @__PURE__ */ jsxs("div", { className: "cteditor-aiOption cteditor-w-full [&>button]:cteditor-relative [&>button]:cteditor-flex [&>button]:cteditor-cursor-pointer [&>button]:cteditor-select-none [&>button]:cteditor-items-center [&>button]:cteditor-gap-2 [&>button]:cteditor-rounded-sm [&>button]:cteditor-px-2 [&>button]:cteditor-py-1.5 [&>button]:cteditor-text-[13px] [&>button]:cteditor-outline-none [&>button]:cteditor-transition-colors focus:[&>button]:cteditor-bg-foreground/5 focus:[&>button]:cteditor-text-accent-foreground hover:[&>button]:cteditor-bg-foreground/5 [&>button]:data-[disabled]:cteditor-pointer-events-none [&>button]:data-[disabled]:cteditor-opacity-50 [&>button>svg]:cteditor-size-4 [&>button>svg]:cteditor-shrink-0", children: [
|
|
24094
|
+
/* @__PURE__ */ jsxs(
|
|
24095
|
+
"button",
|
|
24096
|
+
{
|
|
24097
|
+
onClick: () => editor.dispatchCommand(AI_ACTION_COMMAND, {
|
|
24098
|
+
type: "SPELLING_GRAMMAR"
|
|
24099
|
+
}),
|
|
24100
|
+
className: "cteditor-w-full cteditor-justify-start cteditor-gap-2",
|
|
24101
|
+
children: [
|
|
24102
|
+
/* @__PURE__ */ jsx("div", { className: "[&>svg]:cteditor-size-5 cteditor-size-6 cteditor-flex cteditor-justify-center cteditor-items-center", children: /* @__PURE__ */ jsx(SearchTextIcon, {}) }),
|
|
24103
|
+
"Fix Grammar"
|
|
24104
|
+
]
|
|
24105
|
+
}
|
|
24106
|
+
),
|
|
24107
|
+
/* @__PURE__ */ jsxs(
|
|
24108
|
+
"button",
|
|
24109
|
+
{
|
|
24110
|
+
onClick: () => editor.dispatchCommand(AI_ACTION_COMMAND, {
|
|
24111
|
+
type: "SIMPLIFY"
|
|
24112
|
+
}),
|
|
24113
|
+
className: "cteditor-w-full cteditor-justify-start cteditor-gap-2",
|
|
24114
|
+
children: [
|
|
24115
|
+
/* @__PURE__ */ jsx("div", { className: "[&>svg]:cteditor-size-5 cteditor-size-6 cteditor-flex cteditor-justify-center cteditor-items-center", children: /* @__PURE__ */ jsx(PenLineIcon, {}) }),
|
|
24116
|
+
"Simplify"
|
|
24117
|
+
]
|
|
24118
|
+
}
|
|
24119
|
+
),
|
|
24120
|
+
/* @__PURE__ */ jsxs(
|
|
24121
|
+
"button",
|
|
24122
|
+
{
|
|
24123
|
+
onClick: () => editor.dispatchCommand(AI_ACTION_COMMAND, {
|
|
24124
|
+
type: "COMPLETE_SENTENCE"
|
|
24125
|
+
}),
|
|
24126
|
+
className: "cteditor-w-full cteditor-justify-start cteditor-gap-2",
|
|
24127
|
+
children: [
|
|
24128
|
+
/* @__PURE__ */ jsx("div", { className: "[&>svg]:cteditor-size-5 cteditor-size-6 cteditor-flex cteditor-justify-center cteditor-items-center", children: /* @__PURE__ */ jsx(MenuAltIcon, {}) }),
|
|
24129
|
+
"Complete Sentence"
|
|
24130
|
+
]
|
|
24131
|
+
}
|
|
24132
|
+
),
|
|
24133
|
+
/* @__PURE__ */ jsxs(
|
|
24134
|
+
"button",
|
|
24135
|
+
{
|
|
24136
|
+
onClick: () => editor.dispatchCommand(AI_ACTION_COMMAND, {
|
|
24137
|
+
type: "EMOJIFY"
|
|
24138
|
+
}),
|
|
24139
|
+
className: "cteditor-w-full cteditor-justify-start cteditor-gap-2",
|
|
24140
|
+
children: [
|
|
24141
|
+
/* @__PURE__ */ jsx("div", { className: "[&>svg]:cteditor-size-5 cteditor-size-6 cteditor-flex cteditor-justify-center cteditor-items-center", children: /* @__PURE__ */ jsx(FaceSmileIcon2, {}) }),
|
|
24142
|
+
"Emojify"
|
|
24143
|
+
]
|
|
24144
|
+
}
|
|
24145
|
+
),
|
|
24146
|
+
/* @__PURE__ */ jsxs(
|
|
24147
|
+
"button",
|
|
24148
|
+
{
|
|
24149
|
+
onClick: () => editor.dispatchCommand(AI_ACTION_COMMAND, {
|
|
24150
|
+
type: "TRANSLATE"
|
|
24151
|
+
}),
|
|
24152
|
+
className: "cteditor-w-full cteditor-justify-start cteditor-gap-2",
|
|
24153
|
+
children: [
|
|
24154
|
+
/* @__PURE__ */ jsx("div", { className: "[&>svg]:cteditor-size-5 cteditor-size-6 cteditor-flex cteditor-justify-center cteditor-items-center", children: /* @__PURE__ */ jsx(TranslateIcon, {}) }),
|
|
24155
|
+
"Translate"
|
|
24156
|
+
]
|
|
24157
|
+
}
|
|
24158
|
+
),
|
|
24159
|
+
/* @__PURE__ */ jsxs(
|
|
24160
|
+
"button",
|
|
24161
|
+
{
|
|
24162
|
+
onClick: () => editor.dispatchCommand(AI_ACTION_COMMAND, {
|
|
24163
|
+
type: "AI_RESPONSE"
|
|
24164
|
+
}),
|
|
24165
|
+
className: "cteditor-w-full cteditor-justify-start cteditor-gap-2",
|
|
24166
|
+
children: [
|
|
24167
|
+
/* @__PURE__ */ jsx("div", { className: "[&>svg]:cteditor-size-5 cteditor-size-6 cteditor-flex cteditor-justify-center cteditor-items-center", children: /* @__PURE__ */ jsx(SparkleIcon, {}) }),
|
|
24168
|
+
"AI"
|
|
24169
|
+
]
|
|
24170
|
+
}
|
|
24171
|
+
),
|
|
24172
|
+
/* @__PURE__ */ jsxs(
|
|
24173
|
+
"button",
|
|
24174
|
+
{
|
|
24175
|
+
onClick: () => editor.dispatchCommand(AI_IMAGE_COMMAND, {
|
|
24176
|
+
type: "CREATE_IMAGE"
|
|
24177
|
+
}),
|
|
24178
|
+
className: "cteditor-w-full cteditor-justify-start cteditor-gap-2",
|
|
24179
|
+
children: [
|
|
24180
|
+
/* @__PURE__ */ jsx("div", { className: "[&>svg]:cteditor-size-5 cteditor-size-6 cteditor-flex cteditor-justify-center cteditor-items-center", children: /* @__PURE__ */ jsx(ImageIcon, {}) }),
|
|
24181
|
+
"Generate Image"
|
|
24182
|
+
]
|
|
24183
|
+
}
|
|
24184
|
+
)
|
|
24185
|
+
] })
|
|
24186
|
+
] }) }),
|
|
24187
|
+
(enableHtmlViewToggle || enableHtmlView) && hiddenItemIds.has("htmlView") && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24188
|
+
/* @__PURE__ */ jsx(DropdownMenuSeparator, { className: "!cteditor-bg-foreground/10" }),
|
|
24189
|
+
/* @__PURE__ */ jsxs(
|
|
24190
|
+
DropdownMenuItem$1,
|
|
24191
|
+
{
|
|
24192
|
+
onClick: toggleHtmlView,
|
|
24193
|
+
disabled: !editable,
|
|
24194
|
+
children: [
|
|
24195
|
+
/* @__PURE__ */ jsx("div", { className: "[&>svg]:!cteditor-size-4 cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center", children: /* @__PURE__ */ jsx(FileCode2, {}) }),
|
|
24196
|
+
isHtmlView ? "Switch to Editor View" : "Switch to HTML View"
|
|
24197
|
+
]
|
|
24198
|
+
}
|
|
24199
|
+
)
|
|
24044
24200
|
] }),
|
|
24045
24201
|
enableAutocompleteToggle && hiddenItemIds.has("autocomplete") && /* @__PURE__ */ jsxs(
|
|
24046
24202
|
DropdownMenuItem$1,
|
|
@@ -24052,17 +24208,6 @@ const Toolbar = ({
|
|
|
24052
24208
|
toolbarState.isAutocompleteEnabled ? "Disable Autocorrection" : "Enable Autocorrection"
|
|
24053
24209
|
]
|
|
24054
24210
|
}
|
|
24055
|
-
),
|
|
24056
|
-
(enableHtmlViewToggle || enableHtmlView) && hiddenItemIds.has("htmlView") && /* @__PURE__ */ jsxs(
|
|
24057
|
-
DropdownMenuItem$1,
|
|
24058
|
-
{
|
|
24059
|
-
onClick: toggleHtmlView,
|
|
24060
|
-
disabled: !editable,
|
|
24061
|
-
children: [
|
|
24062
|
-
/* @__PURE__ */ jsx("div", { className: "[&>svg]:!cteditor-size-4 cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center", children: /* @__PURE__ */ jsx(FileCode2, {}) }),
|
|
24063
|
-
isHtmlView ? "Switch to Editor View" : "Switch to HTML View"
|
|
24064
|
-
]
|
|
24065
|
-
}
|
|
24066
24211
|
)
|
|
24067
24212
|
]
|
|
24068
24213
|
}
|
|
@@ -24980,7 +25125,7 @@ function CombinedAutocompleteGrammarPlugin({
|
|
|
24980
25125
|
Card,
|
|
24981
25126
|
{
|
|
24982
25127
|
ref: menuRef,
|
|
24983
|
-
className: "cteditor-w-
|
|
25128
|
+
className: "sm:cteditor-w-[28rem] sm:cteditor-max-w-md cteditor-w-[20rem] cteditor-max-w-xs cteditor-max-h-64 cteditor-overflow-hidden cteditor-shadow-lg cteditor-border cteditor-bg-background cteditor-rounded-md",
|
|
24984
25129
|
children: [
|
|
24985
25130
|
/* @__PURE__ */ jsxs("div", { className: "cteditor-flex cteditor-border-b cteditor-bg-muted/30", children: [
|
|
24986
25131
|
/* @__PURE__ */ jsxs(
|
|
@@ -26260,19 +26405,15 @@ function FloatingLinkEditor({
|
|
|
26260
26405
|
"div",
|
|
26261
26406
|
{
|
|
26262
26407
|
ref: editorRef,
|
|
26263
|
-
className: "link-editor
|
|
26264
|
-
style: {
|
|
26265
|
-
background: "linear-gradient(135deg, hsl(var(--cteditor-background)) 0%, hsl(var(--cteditor-accent) / 0.05) 100%)",
|
|
26266
|
-
minWidth: "200px"
|
|
26267
|
-
},
|
|
26408
|
+
className: "link-editor cteditor-border cteditor-border-background/20 cteditor-rounded-md cteditor-shadow-2xl cteditor-overflow-hidden cteditor-backdrop-blur-sm",
|
|
26268
26409
|
children: shouldShowEditMode ? (
|
|
26269
26410
|
// EDIT MODE - Input to edit URL
|
|
26270
|
-
/* @__PURE__ */ jsxs("div", { className: "cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-p-
|
|
26411
|
+
/* @__PURE__ */ jsxs("div", { className: "cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-p-1 cteditor-w-full", children: [
|
|
26271
26412
|
/* @__PURE__ */ jsx("div", { className: "cteditor-flex-1", children: /* @__PURE__ */ jsx(
|
|
26272
26413
|
"input",
|
|
26273
26414
|
{
|
|
26274
26415
|
ref: inputRef,
|
|
26275
|
-
className: "link-input cteditor-w-full cteditor-px-4 cteditor-py-2.5 cteditor-text-sm cteditor-border cteditor-border-
|
|
26416
|
+
className: "link-input cteditor-w-full cteditor-px-4 cteditor-py-2.5 cteditor-text-sm cteditor-border cteditor-border-background/20 cteditor-rounded-md cteditor-bg-transparent cteditor-transition-all cteditor-duration-200 cteditor-text-background placeholder:cteditor-text-background cteditor-font-medium cteditor-outline-background/30",
|
|
26276
26417
|
value: editedLinkUrl,
|
|
26277
26418
|
placeholder: "Enter URL (e.g., https://example.com)",
|
|
26278
26419
|
onChange: (event) => setEditedLinkUrl(event.target.value),
|
|
@@ -26291,7 +26432,7 @@ function FloatingLinkEditor({
|
|
|
26291
26432
|
/* @__PURE__ */ jsx(
|
|
26292
26433
|
"button",
|
|
26293
26434
|
{
|
|
26294
|
-
className: "cteditor-p-2.5 cteditor-rounded-lg cteditor-bg-
|
|
26435
|
+
className: "cteditor-p-2.5 cteditor-rounded-lg cteditor-bg-background hover:cteditor-bg-background/80 cteditor-text-foreground hover:cteditor-text-foreground cteditor-transition-all cteditor-duration-200 hover:cteditor-scale-105 active:cteditor-scale-95",
|
|
26295
26436
|
onClick: handleLinkSubmission,
|
|
26296
26437
|
title: "Save link",
|
|
26297
26438
|
children: /* @__PURE__ */ jsx(Check, { className: "cteditor-size-4" })
|
|
@@ -26300,7 +26441,7 @@ function FloatingLinkEditor({
|
|
|
26300
26441
|
/* @__PURE__ */ jsx(
|
|
26301
26442
|
"button",
|
|
26302
26443
|
{
|
|
26303
|
-
className: "cteditor-p-2.5 cteditor-rounded-lg cteditor-bg-
|
|
26444
|
+
className: "cteditor-p-2.5 cteditor-rounded-lg cteditor-bg-background hover:cteditor-bg-background/80 cteditor-text-foreground hover:cteditor-text-foreground cteditor-transition-all cteditor-duration-200 hover:cteditor-scale-105 active:cteditor-scale-95",
|
|
26304
26445
|
onClick: () => {
|
|
26305
26446
|
setIsLinkEditMode(false);
|
|
26306
26447
|
setShowUrlView(true);
|
|
@@ -29710,7 +29851,7 @@ const useStyles = () => ({
|
|
|
29710
29851
|
contentEditable: cn$1(
|
|
29711
29852
|
"cteditor-relative cteditor-min-h-[150px] !cteditor-h-auto cteditor-resize-none cteditor-outline-0",
|
|
29712
29853
|
// Ensure strong contrast in both themes
|
|
29713
|
-
"cteditor-text-black dark:cteditor-text-white
|
|
29854
|
+
"cteditor-text-black dark:cteditor-text-white ",
|
|
29714
29855
|
// Caret and spacing
|
|
29715
29856
|
"cteditor-caret-[#3b82f6] cteditor-p-0 cteditor-transition-all cteditor-duration-200",
|
|
29716
29857
|
"cteditor-w-full ",
|
|
@@ -29881,7 +30022,7 @@ const ConfigurableEditor = ({
|
|
|
29881
30022
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(CommentProvider, { children: /* @__PURE__ */ jsxs(LexicalComposer, { initialConfig: editorInitialConfig, children: [
|
|
29882
30023
|
/* @__PURE__ */ jsx(HtmlViewProvider, { children: /* @__PURE__ */ jsxs(ToolbarContext, { children: [
|
|
29883
30024
|
/* @__PURE__ */ jsxs(Stack, { children: [
|
|
29884
|
-
config.enableToolbar && /* @__PURE__ */ jsxs("div", { className: "cteditor-flex cteditor-justify-between cteditor-items-center cteditor-mb-4", children: [
|
|
30025
|
+
config.enableToolbar && /* @__PURE__ */ jsxs("div", { className: "cteditor-flex cteditor-justify-between cteditor-items-center cteditor-mb-4 cteditor-sticky cteditor-top-2 cteditor-z-50", children: [
|
|
29885
30026
|
/* @__PURE__ */ jsx(
|
|
29886
30027
|
ToolbarWithEditor,
|
|
29887
30028
|
{
|
|
@@ -30000,7 +30141,7 @@ const ScopedEditorWrapper = ({
|
|
|
30000
30141
|
className = "",
|
|
30001
30142
|
darkMode = false
|
|
30002
30143
|
}) => {
|
|
30003
|
-
return /* @__PURE__ */ jsx("div", { id: "ct-editor-f47ac10b", className: "cteditor-max-w-full
|
|
30144
|
+
return /* @__PURE__ */ jsx("div", { id: "ct-editor-f47ac10b", className: "cteditor-max-w-full", children: /* @__PURE__ */ jsx("div", { className: "cteditor-p-2 cteditor-w-full", children }) });
|
|
30004
30145
|
};
|
|
30005
30146
|
const MessageContainer = styled.div`
|
|
30006
30147
|
display: flex;
|
|
@@ -30124,4 +30265,4 @@ export {
|
|
|
30124
30265
|
useHtmlView as u,
|
|
30125
30266
|
verifyApiKey as v
|
|
30126
30267
|
};
|
|
30127
|
-
//# sourceMappingURL=index-
|
|
30268
|
+
//# sourceMappingURL=index-413952d9.js.map
|