ct-rich-text-editor 1.3.1 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +217 -217
- package/dist/assets/style.css +4142 -4082
- package/dist/babel-d3085146.js.map +1 -1
- package/dist/components/CodeActionMenuPlugin/utils.d.ts +1 -1
- package/dist/components/FormatTextMenu/FormatTextMenuDrop.d.ts +5 -0
- package/dist/estree-164983f6.js.map +1 -1
- package/dist/hooks/useDebounce.d.ts +1 -1
- package/dist/hooks/useModal.d.ts +0 -1
- package/dist/html-5586dbf6.js.map +1 -1
- package/dist/{html2pdf.bundle-f23e1b00.js → html2pdf.bundle-5c5747c7.js} +2 -2
- package/dist/html2pdf.bundle-5c5747c7.js.map +1 -0
- package/dist/{html2pdf.bundle.min-daf952fb.js → html2pdf.bundle.min-8fcf4f01.js} +2 -2
- package/dist/html2pdf.bundle.min-8fcf4f01.js.map +1 -0
- package/dist/{index-10f9d057.js → index-48519641.js} +2 -2
- package/dist/index-48519641.js.map +1 -0
- package/dist/{index-8d147c36.js → index-db43388d.js} +822 -557
- package/dist/index-db43388d.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/markdown-d513479b.js.map +1 -1
- package/dist/plugins/AutocompletePlugin.d.ts +0 -1
- package/dist/plugins/SignatureCanvasPlugin/SignatureCanvasPlugin.d.ts +0 -1
- package/dist/plugins/SlashCommandPlugin/index.d.ts +0 -1
- package/dist/postcss-f084f74d.js.map +1 -1
- package/dist/standalone-5a8c6b7e.js.map +1 -1
- package/dist/typescript-b1005db4.js.map +1 -1
- package/dist/ui/Icons.d.ts +2 -1
- package/package.json +126 -126
- package/dist/html2pdf.bundle-f23e1b00.js.map +0 -1
- package/dist/html2pdf.bundle.min-daf952fb.js.map +0 -1
- package/dist/index-10f9d057.js.map +0 -1
- package/dist/index-8d147c36.js.map +0 -1
|
@@ -395,7 +395,7 @@ function createContext2(rootComponentName, defaultContext) {
|
|
|
395
395
|
}
|
|
396
396
|
return [Provider2, useContext2];
|
|
397
397
|
}
|
|
398
|
-
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
398
|
+
function createContextScope$1(scopeName, createContextScopeDeps = []) {
|
|
399
399
|
let defaultContexts = [];
|
|
400
400
|
function createContext3(rootComponentName, defaultContext) {
|
|
401
401
|
const BaseContext = React$1.createContext(defaultContext);
|
|
@@ -434,9 +434,9 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
434
434
|
};
|
|
435
435
|
};
|
|
436
436
|
createScope.scopeName = scopeName;
|
|
437
|
-
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
437
|
+
return [createContext3, composeContextScopes$1(createScope, ...createContextScopeDeps)];
|
|
438
438
|
}
|
|
439
|
-
function composeContextScopes(...scopes) {
|
|
439
|
+
function composeContextScopes$1(...scopes) {
|
|
440
440
|
const baseScope = scopes[0];
|
|
441
441
|
if (scopes.length === 1)
|
|
442
442
|
return baseScope;
|
|
@@ -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,14 +560,13 @@ 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
571
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
573
572
|
}
|
|
@@ -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;
|
|
@@ -629,7 +628,7 @@ function getElementRef$1(element) {
|
|
|
629
628
|
}
|
|
630
629
|
return element.props.ref || element.ref;
|
|
631
630
|
}
|
|
632
|
-
var NODES = [
|
|
631
|
+
var NODES$1 = [
|
|
633
632
|
"a",
|
|
634
633
|
"button",
|
|
635
634
|
"div",
|
|
@@ -648,8 +647,8 @@ var NODES = [
|
|
|
648
647
|
"svg",
|
|
649
648
|
"ul"
|
|
650
649
|
];
|
|
651
|
-
var Primitive = NODES.reduce((primitive, node) => {
|
|
652
|
-
const Slot2 = /* @__PURE__ */ createSlot(`Primitive.${node}`);
|
|
650
|
+
var Primitive$1 = NODES$1.reduce((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;
|
|
@@ -782,7 +781,7 @@ var DismissableLayer = React$1.forwardRef(
|
|
|
782
781
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
783
782
|
}, []);
|
|
784
783
|
return /* @__PURE__ */ jsx(
|
|
785
|
-
Primitive.div,
|
|
784
|
+
Primitive$1.div,
|
|
786
785
|
{
|
|
787
786
|
...layerProps,
|
|
788
787
|
ref: composedRefs,
|
|
@@ -815,7 +814,7 @@ var DismissableLayerBranch = React$1.forwardRef((props, forwardedRef) => {
|
|
|
815
814
|
};
|
|
816
815
|
}
|
|
817
816
|
}, [context.branches]);
|
|
818
|
-
return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });
|
|
817
|
+
return /* @__PURE__ */ jsx(Primitive$1.div, { ...props, ref: composedRefs });
|
|
819
818
|
});
|
|
820
819
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
821
820
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
@@ -1024,7 +1023,7 @@ var FocusScope = React$1.forwardRef((props, forwardedRef) => {
|
|
|
1024
1023
|
},
|
|
1025
1024
|
[loop, trapped, focusScope.paused]
|
|
1026
1025
|
);
|
|
1027
|
-
return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
1026
|
+
return /* @__PURE__ */ jsx(Primitive$1.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
1028
1027
|
});
|
|
1029
1028
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
1030
1029
|
function focusFirst$2(candidates, { select = false } = {}) {
|
|
@@ -1121,7 +1120,7 @@ var Portal$5 = React$1.forwardRef((props, forwardedRef) => {
|
|
|
1121
1120
|
const [mounted, setMounted] = React$1.useState(false);
|
|
1122
1121
|
useLayoutEffect2(() => setMounted(true), []);
|
|
1123
1122
|
const container = containerProp || mounted && ((_a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _a.body);
|
|
1124
|
-
return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
1123
|
+
return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive$1.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
1125
1124
|
});
|
|
1126
1125
|
Portal$5.displayName = PORTAL_NAME$6;
|
|
1127
1126
|
function useStateMachine(initialState, machine) {
|
|
@@ -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;
|
|
@@ -2056,7 +2055,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
|
2056
2055
|
return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
|
|
2057
2056
|
};
|
|
2058
2057
|
var DIALOG_NAME = "Dialog";
|
|
2059
|
-
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
2058
|
+
var [createDialogContext, createDialogScope] = createContextScope$1(DIALOG_NAME);
|
|
2060
2059
|
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
2061
2060
|
var Dialog$1 = (props) => {
|
|
2062
2061
|
const {
|
|
@@ -2100,7 +2099,7 @@ var DialogTrigger = React$1.forwardRef(
|
|
|
2100
2099
|
const context = useDialogContext(TRIGGER_NAME$5, __scopeDialog);
|
|
2101
2100
|
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
2102
2101
|
return /* @__PURE__ */ jsx(
|
|
2103
|
-
Primitive.button,
|
|
2102
|
+
Primitive$1.button,
|
|
2104
2103
|
{
|
|
2105
2104
|
type: "button",
|
|
2106
2105
|
"aria-haspopup": "dialog",
|
|
@@ -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,8 +2142,8 @@ 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$
|
|
2147
|
-
Primitive.div,
|
|
2145
|
+
/* @__PURE__ */ jsx(RemoveScroll, { as: Slot$4, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(
|
|
2146
|
+
Primitive$1.div,
|
|
2148
2147
|
{
|
|
2149
2148
|
"data-state": getState$1(context.open),
|
|
2150
2149
|
...overlayProps,
|
|
@@ -2289,7 +2288,7 @@ var DialogTitle$1 = React$1.forwardRef(
|
|
|
2289
2288
|
(props, forwardedRef) => {
|
|
2290
2289
|
const { __scopeDialog, ...titleProps } = props;
|
|
2291
2290
|
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
2292
|
-
return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
2291
|
+
return /* @__PURE__ */ jsx(Primitive$1.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
2293
2292
|
}
|
|
2294
2293
|
);
|
|
2295
2294
|
DialogTitle$1.displayName = TITLE_NAME;
|
|
@@ -2298,7 +2297,7 @@ var DialogDescription$1 = React$1.forwardRef(
|
|
|
2298
2297
|
(props, forwardedRef) => {
|
|
2299
2298
|
const { __scopeDialog, ...descriptionProps } = props;
|
|
2300
2299
|
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
2301
|
-
return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
2300
|
+
return /* @__PURE__ */ jsx(Primitive$1.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
2302
2301
|
}
|
|
2303
2302
|
);
|
|
2304
2303
|
DialogDescription$1.displayName = DESCRIPTION_NAME;
|
|
@@ -2308,7 +2307,7 @@ var DialogClose = React$1.forwardRef(
|
|
|
2308
2307
|
const { __scopeDialog, ...closeProps } = props;
|
|
2309
2308
|
const context = useDialogContext(CLOSE_NAME$1, __scopeDialog);
|
|
2310
2309
|
return /* @__PURE__ */ jsx(
|
|
2311
|
-
Primitive.button,
|
|
2310
|
+
Primitive$1.button,
|
|
2312
2311
|
{
|
|
2313
2312
|
type: "button",
|
|
2314
2313
|
...closeProps,
|
|
@@ -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
|
*
|
|
@@ -3028,7 +3005,28 @@ function clsx() {
|
|
|
3028
3005
|
(e = arguments[f2]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
3029
3006
|
return n;
|
|
3030
3007
|
}
|
|
3008
|
+
const concatArrays = (array1, array2) => {
|
|
3009
|
+
const combinedArray = new Array(array1.length + array2.length);
|
|
3010
|
+
for (let i2 = 0; i2 < array1.length; i2++) {
|
|
3011
|
+
combinedArray[i2] = array1[i2];
|
|
3012
|
+
}
|
|
3013
|
+
for (let i2 = 0; i2 < array2.length; i2++) {
|
|
3014
|
+
combinedArray[array1.length + i2] = array2[i2];
|
|
3015
|
+
}
|
|
3016
|
+
return combinedArray;
|
|
3017
|
+
};
|
|
3018
|
+
const createClassValidatorObject = (classGroupId, validator) => ({
|
|
3019
|
+
classGroupId,
|
|
3020
|
+
validator
|
|
3021
|
+
});
|
|
3022
|
+
const createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators = null, classGroupId) => ({
|
|
3023
|
+
nextPart,
|
|
3024
|
+
validators,
|
|
3025
|
+
classGroupId
|
|
3026
|
+
});
|
|
3031
3027
|
const CLASS_PART_SEPARATOR = "-";
|
|
3028
|
+
const EMPTY_CONFLICTS = [];
|
|
3029
|
+
const ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
|
|
3032
3030
|
const createClassGroupUtils = (config) => {
|
|
3033
3031
|
const classMap = createClassMap(config);
|
|
3034
3032
|
const {
|
|
@@ -3036,104 +3034,135 @@ const createClassGroupUtils = (config) => {
|
|
|
3036
3034
|
conflictingClassGroupModifiers
|
|
3037
3035
|
} = config;
|
|
3038
3036
|
const getClassGroupId = (className) => {
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
classParts.shift();
|
|
3037
|
+
if (className.startsWith("[") && className.endsWith("]")) {
|
|
3038
|
+
return getGroupIdForArbitraryProperty(className);
|
|
3042
3039
|
}
|
|
3043
|
-
|
|
3040
|
+
const classParts = className.split(CLASS_PART_SEPARATOR);
|
|
3041
|
+
const startIndex = classParts[0] === "" && classParts.length > 1 ? 1 : 0;
|
|
3042
|
+
return getGroupRecursive(classParts, startIndex, classMap);
|
|
3044
3043
|
};
|
|
3045
3044
|
const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3045
|
+
if (hasPostfixModifier) {
|
|
3046
|
+
const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
|
|
3047
|
+
const baseConflicts = conflictingClassGroups[classGroupId];
|
|
3048
|
+
if (modifierConflicts) {
|
|
3049
|
+
if (baseConflicts) {
|
|
3050
|
+
return concatArrays(baseConflicts, modifierConflicts);
|
|
3051
|
+
}
|
|
3052
|
+
return modifierConflicts;
|
|
3053
|
+
}
|
|
3054
|
+
return baseConflicts || EMPTY_CONFLICTS;
|
|
3049
3055
|
}
|
|
3050
|
-
return
|
|
3056
|
+
return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
|
|
3051
3057
|
};
|
|
3052
3058
|
return {
|
|
3053
3059
|
getClassGroupId,
|
|
3054
3060
|
getConflictingClassGroupIds
|
|
3055
3061
|
};
|
|
3056
3062
|
};
|
|
3057
|
-
const getGroupRecursive = (classParts, classPartObject) => {
|
|
3058
|
-
|
|
3059
|
-
if (
|
|
3063
|
+
const getGroupRecursive = (classParts, startIndex, classPartObject) => {
|
|
3064
|
+
const classPathsLength = classParts.length - startIndex;
|
|
3065
|
+
if (classPathsLength === 0) {
|
|
3060
3066
|
return classPartObject.classGroupId;
|
|
3061
3067
|
}
|
|
3062
|
-
const currentClassPart = classParts[
|
|
3068
|
+
const currentClassPart = classParts[startIndex];
|
|
3063
3069
|
const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3070
|
+
if (nextClassPartObject) {
|
|
3071
|
+
const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
|
|
3072
|
+
if (result)
|
|
3073
|
+
return result;
|
|
3067
3074
|
}
|
|
3068
|
-
|
|
3075
|
+
const validators = classPartObject.validators;
|
|
3076
|
+
if (validators === null) {
|
|
3069
3077
|
return void 0;
|
|
3070
3078
|
}
|
|
3071
|
-
const classRest = classParts.join(CLASS_PART_SEPARATOR);
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
const getGroupIdForArbitraryProperty = (className) => {
|
|
3078
|
-
if (arbitraryPropertyRegex.test(className)) {
|
|
3079
|
-
const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
|
|
3080
|
-
const property = arbitraryPropertyClassName == null ? void 0 : arbitraryPropertyClassName.substring(0, arbitraryPropertyClassName.indexOf(":"));
|
|
3081
|
-
if (property) {
|
|
3082
|
-
return "arbitrary.." + property;
|
|
3079
|
+
const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
|
|
3080
|
+
const validatorsLength = validators.length;
|
|
3081
|
+
for (let i2 = 0; i2 < validatorsLength; i2++) {
|
|
3082
|
+
const validatorObj = validators[i2];
|
|
3083
|
+
if (validatorObj.validator(classRest)) {
|
|
3084
|
+
return validatorObj.classGroupId;
|
|
3083
3085
|
}
|
|
3084
3086
|
}
|
|
3087
|
+
return void 0;
|
|
3085
3088
|
};
|
|
3089
|
+
const getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
3090
|
+
const content = className.slice(1, -1);
|
|
3091
|
+
const colonIndex = content.indexOf(":");
|
|
3092
|
+
const property = content.slice(0, colonIndex);
|
|
3093
|
+
return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
|
|
3094
|
+
})();
|
|
3086
3095
|
const createClassMap = (config) => {
|
|
3087
3096
|
const {
|
|
3088
3097
|
theme: theme2,
|
|
3089
3098
|
classGroups
|
|
3090
3099
|
} = config;
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3100
|
+
return processClassGroups(classGroups, theme2);
|
|
3101
|
+
};
|
|
3102
|
+
const processClassGroups = (classGroups, theme2) => {
|
|
3103
|
+
const classMap = createClassPartObject();
|
|
3095
3104
|
for (const classGroupId in classGroups) {
|
|
3096
|
-
|
|
3105
|
+
const group = classGroups[classGroupId];
|
|
3106
|
+
processClassesRecursively(group, classMap, classGroupId, theme2);
|
|
3097
3107
|
}
|
|
3098
3108
|
return classMap;
|
|
3099
3109
|
};
|
|
3100
3110
|
const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme2) => {
|
|
3101
|
-
classGroup.
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3111
|
+
const len = classGroup.length;
|
|
3112
|
+
for (let i2 = 0; i2 < len; i2++) {
|
|
3113
|
+
const classDefinition = classGroup[i2];
|
|
3114
|
+
processClassDefinition(classDefinition, classPartObject, classGroupId, theme2);
|
|
3115
|
+
}
|
|
3116
|
+
};
|
|
3117
|
+
const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme2) => {
|
|
3118
|
+
if (typeof classDefinition === "string") {
|
|
3119
|
+
processStringDefinition(classDefinition, classPartObject, classGroupId);
|
|
3120
|
+
return;
|
|
3121
|
+
}
|
|
3122
|
+
if (typeof classDefinition === "function") {
|
|
3123
|
+
processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme2);
|
|
3124
|
+
return;
|
|
3125
|
+
}
|
|
3126
|
+
processObjectDefinition(classDefinition, classPartObject, classGroupId, theme2);
|
|
3127
|
+
};
|
|
3128
|
+
const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
|
|
3129
|
+
const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
|
|
3130
|
+
classPartObjectToEdit.classGroupId = classGroupId;
|
|
3131
|
+
};
|
|
3132
|
+
const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme2) => {
|
|
3133
|
+
if (isThemeGetter(classDefinition)) {
|
|
3134
|
+
processClassesRecursively(classDefinition(theme2), classPartObject, classGroupId, theme2);
|
|
3135
|
+
return;
|
|
3136
|
+
}
|
|
3137
|
+
if (classPartObject.validators === null) {
|
|
3138
|
+
classPartObject.validators = [];
|
|
3139
|
+
}
|
|
3140
|
+
classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
|
|
3141
|
+
};
|
|
3142
|
+
const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme2) => {
|
|
3143
|
+
const entries = Object.entries(classDefinition);
|
|
3144
|
+
const len = entries.length;
|
|
3145
|
+
for (let i2 = 0; i2 < len; i2++) {
|
|
3146
|
+
const [key, value] = entries[i2];
|
|
3147
|
+
processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme2);
|
|
3148
|
+
}
|
|
3122
3149
|
};
|
|
3123
3150
|
const getPart = (classPartObject, path) => {
|
|
3124
|
-
let
|
|
3125
|
-
path.split(CLASS_PART_SEPARATOR)
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3151
|
+
let current = classPartObject;
|
|
3152
|
+
const parts = path.split(CLASS_PART_SEPARATOR);
|
|
3153
|
+
const len = parts.length;
|
|
3154
|
+
for (let i2 = 0; i2 < len; i2++) {
|
|
3155
|
+
const part = parts[i2];
|
|
3156
|
+
let next = current.nextPart.get(part);
|
|
3157
|
+
if (!next) {
|
|
3158
|
+
next = createClassPartObject();
|
|
3159
|
+
current.nextPart.set(part, next);
|
|
3160
|
+
}
|
|
3161
|
+
current = next;
|
|
3162
|
+
}
|
|
3163
|
+
return current;
|
|
3135
3164
|
};
|
|
3136
|
-
const isThemeGetter = (func) => func.isThemeGetter;
|
|
3165
|
+
const isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
|
|
3137
3166
|
const createLruCache = (maxCacheSize) => {
|
|
3138
3167
|
if (maxCacheSize < 1) {
|
|
3139
3168
|
return {
|
|
@@ -3143,31 +3172,31 @@ const createLruCache = (maxCacheSize) => {
|
|
|
3143
3172
|
};
|
|
3144
3173
|
}
|
|
3145
3174
|
let cacheSize = 0;
|
|
3146
|
-
let cache = /* @__PURE__ */
|
|
3147
|
-
let previousCache = /* @__PURE__ */
|
|
3175
|
+
let cache = /* @__PURE__ */ Object.create(null);
|
|
3176
|
+
let previousCache = /* @__PURE__ */ Object.create(null);
|
|
3148
3177
|
const update = (key, value) => {
|
|
3149
|
-
cache
|
|
3178
|
+
cache[key] = value;
|
|
3150
3179
|
cacheSize++;
|
|
3151
3180
|
if (cacheSize > maxCacheSize) {
|
|
3152
3181
|
cacheSize = 0;
|
|
3153
3182
|
previousCache = cache;
|
|
3154
|
-
cache = /* @__PURE__ */
|
|
3183
|
+
cache = /* @__PURE__ */ Object.create(null);
|
|
3155
3184
|
}
|
|
3156
3185
|
};
|
|
3157
3186
|
return {
|
|
3158
3187
|
get(key) {
|
|
3159
|
-
let value = cache
|
|
3188
|
+
let value = cache[key];
|
|
3160
3189
|
if (value !== void 0) {
|
|
3161
3190
|
return value;
|
|
3162
3191
|
}
|
|
3163
|
-
if ((value = previousCache
|
|
3192
|
+
if ((value = previousCache[key]) !== void 0) {
|
|
3164
3193
|
update(key, value);
|
|
3165
3194
|
return value;
|
|
3166
3195
|
}
|
|
3167
3196
|
},
|
|
3168
3197
|
set(key, value) {
|
|
3169
|
-
if (cache
|
|
3170
|
-
cache
|
|
3198
|
+
if (key in cache) {
|
|
3199
|
+
cache[key] = value;
|
|
3171
3200
|
} else {
|
|
3172
3201
|
update(key, value);
|
|
3173
3202
|
}
|
|
@@ -3176,7 +3205,14 @@ const createLruCache = (maxCacheSize) => {
|
|
|
3176
3205
|
};
|
|
3177
3206
|
const IMPORTANT_MODIFIER = "!";
|
|
3178
3207
|
const MODIFIER_SEPARATOR = ":";
|
|
3179
|
-
const
|
|
3208
|
+
const EMPTY_MODIFIERS = [];
|
|
3209
|
+
const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
|
|
3210
|
+
modifiers,
|
|
3211
|
+
hasImportantModifier,
|
|
3212
|
+
baseClassName,
|
|
3213
|
+
maybePostfixModifierPosition,
|
|
3214
|
+
isExternal
|
|
3215
|
+
});
|
|
3180
3216
|
const createParseClassName = (config) => {
|
|
3181
3217
|
const {
|
|
3182
3218
|
prefix,
|
|
@@ -3188,12 +3224,13 @@ const createParseClassName = (config) => {
|
|
|
3188
3224
|
let parenDepth = 0;
|
|
3189
3225
|
let modifierStart = 0;
|
|
3190
3226
|
let postfixModifierPosition;
|
|
3191
|
-
|
|
3192
|
-
|
|
3227
|
+
const len = className.length;
|
|
3228
|
+
for (let index2 = 0; index2 < len; index2++) {
|
|
3229
|
+
const currentCharacter = className[index2];
|
|
3193
3230
|
if (bracketDepth === 0 && parenDepth === 0) {
|
|
3194
3231
|
if (currentCharacter === MODIFIER_SEPARATOR) {
|
|
3195
3232
|
modifiers.push(className.slice(modifierStart, index2));
|
|
3196
|
-
modifierStart = index2 +
|
|
3233
|
+
modifierStart = index2 + 1;
|
|
3197
3234
|
continue;
|
|
3198
3235
|
}
|
|
3199
3236
|
if (currentCharacter === "/") {
|
|
@@ -3201,37 +3238,38 @@ const createParseClassName = (config) => {
|
|
|
3201
3238
|
continue;
|
|
3202
3239
|
}
|
|
3203
3240
|
}
|
|
3204
|
-
if (currentCharacter === "[")
|
|
3241
|
+
if (currentCharacter === "[")
|
|
3205
3242
|
bracketDepth++;
|
|
3206
|
-
|
|
3243
|
+
else if (currentCharacter === "]")
|
|
3207
3244
|
bracketDepth--;
|
|
3208
|
-
|
|
3245
|
+
else if (currentCharacter === "(")
|
|
3209
3246
|
parenDepth++;
|
|
3210
|
-
|
|
3247
|
+
else if (currentCharacter === ")")
|
|
3211
3248
|
parenDepth--;
|
|
3212
|
-
}
|
|
3213
3249
|
}
|
|
3214
|
-
const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.
|
|
3215
|
-
|
|
3216
|
-
|
|
3250
|
+
const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
|
|
3251
|
+
let baseClassName = baseClassNameWithImportantModifier;
|
|
3252
|
+
let hasImportantModifier = false;
|
|
3253
|
+
if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
|
|
3254
|
+
baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
|
|
3255
|
+
hasImportantModifier = true;
|
|
3256
|
+
} else if (
|
|
3257
|
+
/**
|
|
3258
|
+
* In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
|
|
3259
|
+
* @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
|
|
3260
|
+
*/
|
|
3261
|
+
baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)
|
|
3262
|
+
) {
|
|
3263
|
+
baseClassName = baseClassNameWithImportantModifier.slice(1);
|
|
3264
|
+
hasImportantModifier = true;
|
|
3265
|
+
}
|
|
3217
3266
|
const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
|
|
3218
|
-
return
|
|
3219
|
-
modifiers,
|
|
3220
|
-
hasImportantModifier,
|
|
3221
|
-
baseClassName,
|
|
3222
|
-
maybePostfixModifierPosition
|
|
3223
|
-
};
|
|
3267
|
+
return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
|
|
3224
3268
|
};
|
|
3225
3269
|
if (prefix) {
|
|
3226
3270
|
const fullPrefix = prefix + MODIFIER_SEPARATOR;
|
|
3227
3271
|
const parseClassNameOriginal = parseClassName;
|
|
3228
|
-
parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.
|
|
3229
|
-
isExternal: true,
|
|
3230
|
-
modifiers: [],
|
|
3231
|
-
hasImportantModifier: false,
|
|
3232
|
-
baseClassName: className,
|
|
3233
|
-
maybePostfixModifierPosition: void 0
|
|
3234
|
-
};
|
|
3272
|
+
parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, void 0, true);
|
|
3235
3273
|
}
|
|
3236
3274
|
if (experimentalParseClassName) {
|
|
3237
3275
|
const parseClassNameOriginal = parseClassName;
|
|
@@ -3242,36 +3280,35 @@ const createParseClassName = (config) => {
|
|
|
3242
3280
|
}
|
|
3243
3281
|
return parseClassName;
|
|
3244
3282
|
};
|
|
3245
|
-
const stripImportantModifier = (baseClassName) => {
|
|
3246
|
-
if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {
|
|
3247
|
-
return baseClassName.substring(0, baseClassName.length - 1);
|
|
3248
|
-
}
|
|
3249
|
-
if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {
|
|
3250
|
-
return baseClassName.substring(1);
|
|
3251
|
-
}
|
|
3252
|
-
return baseClassName;
|
|
3253
|
-
};
|
|
3254
3283
|
const createSortModifiers = (config) => {
|
|
3255
|
-
const
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
const
|
|
3261
|
-
let
|
|
3262
|
-
modifiers.
|
|
3263
|
-
const
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3284
|
+
const modifierWeights = /* @__PURE__ */ new Map();
|
|
3285
|
+
config.orderSensitiveModifiers.forEach((mod, index2) => {
|
|
3286
|
+
modifierWeights.set(mod, 1e6 + index2);
|
|
3287
|
+
});
|
|
3288
|
+
return (modifiers) => {
|
|
3289
|
+
const result = [];
|
|
3290
|
+
let currentSegment = [];
|
|
3291
|
+
for (let i2 = 0; i2 < modifiers.length; i2++) {
|
|
3292
|
+
const modifier = modifiers[i2];
|
|
3293
|
+
const isArbitrary = modifier[0] === "[";
|
|
3294
|
+
const isOrderSensitive = modifierWeights.has(modifier);
|
|
3295
|
+
if (isArbitrary || isOrderSensitive) {
|
|
3296
|
+
if (currentSegment.length > 0) {
|
|
3297
|
+
currentSegment.sort();
|
|
3298
|
+
result.push(...currentSegment);
|
|
3299
|
+
currentSegment = [];
|
|
3300
|
+
}
|
|
3301
|
+
result.push(modifier);
|
|
3267
3302
|
} else {
|
|
3268
|
-
|
|
3303
|
+
currentSegment.push(modifier);
|
|
3269
3304
|
}
|
|
3270
|
-
}
|
|
3271
|
-
|
|
3272
|
-
|
|
3305
|
+
}
|
|
3306
|
+
if (currentSegment.length > 0) {
|
|
3307
|
+
currentSegment.sort();
|
|
3308
|
+
result.push(...currentSegment);
|
|
3309
|
+
}
|
|
3310
|
+
return result;
|
|
3273
3311
|
};
|
|
3274
|
-
return sortModifiers;
|
|
3275
3312
|
};
|
|
3276
3313
|
const createConfigUtils = (config) => ({
|
|
3277
3314
|
cache: createLruCache(config.cacheSize),
|
|
@@ -3317,10 +3354,10 @@ const mergeClassList = (classList, configUtils) => {
|
|
|
3317
3354
|
}
|
|
3318
3355
|
hasPostfixModifier = false;
|
|
3319
3356
|
}
|
|
3320
|
-
const variantModifier = sortModifiers(modifiers).join(":");
|
|
3357
|
+
const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
|
|
3321
3358
|
const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
|
|
3322
3359
|
const classId = modifierId + classGroupId;
|
|
3323
|
-
if (classGroupsInConflict.
|
|
3360
|
+
if (classGroupsInConflict.indexOf(classId) > -1) {
|
|
3324
3361
|
continue;
|
|
3325
3362
|
}
|
|
3326
3363
|
classGroupsInConflict.push(classId);
|
|
@@ -3333,13 +3370,13 @@ const mergeClassList = (classList, configUtils) => {
|
|
|
3333
3370
|
}
|
|
3334
3371
|
return result;
|
|
3335
3372
|
};
|
|
3336
|
-
|
|
3373
|
+
const twJoin = (...classLists) => {
|
|
3337
3374
|
let index2 = 0;
|
|
3338
3375
|
let argument;
|
|
3339
3376
|
let resolvedValue;
|
|
3340
3377
|
let string = "";
|
|
3341
|
-
while (index2 <
|
|
3342
|
-
if (argument =
|
|
3378
|
+
while (index2 < classLists.length) {
|
|
3379
|
+
if (argument = classLists[index2++]) {
|
|
3343
3380
|
if (resolvedValue = toValue(argument)) {
|
|
3344
3381
|
string && (string += " ");
|
|
3345
3382
|
string += resolvedValue;
|
|
@@ -3347,7 +3384,7 @@ function twJoin() {
|
|
|
3347
3384
|
}
|
|
3348
3385
|
}
|
|
3349
3386
|
return string;
|
|
3350
|
-
}
|
|
3387
|
+
};
|
|
3351
3388
|
const toValue = (mix) => {
|
|
3352
3389
|
if (typeof mix === "string") {
|
|
3353
3390
|
return mix;
|
|
@@ -3364,20 +3401,20 @@ const toValue = (mix) => {
|
|
|
3364
3401
|
}
|
|
3365
3402
|
return string;
|
|
3366
3403
|
};
|
|
3367
|
-
|
|
3404
|
+
const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
|
|
3368
3405
|
let configUtils;
|
|
3369
3406
|
let cacheGet;
|
|
3370
3407
|
let cacheSet;
|
|
3371
|
-
let functionToCall
|
|
3372
|
-
|
|
3408
|
+
let functionToCall;
|
|
3409
|
+
const initTailwindMerge = (classList) => {
|
|
3373
3410
|
const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
|
|
3374
3411
|
configUtils = createConfigUtils(config);
|
|
3375
3412
|
cacheGet = configUtils.cache.get;
|
|
3376
3413
|
cacheSet = configUtils.cache.set;
|
|
3377
3414
|
functionToCall = tailwindMerge;
|
|
3378
3415
|
return tailwindMerge(classList);
|
|
3379
|
-
}
|
|
3380
|
-
|
|
3416
|
+
};
|
|
3417
|
+
const tailwindMerge = (classList) => {
|
|
3381
3418
|
const cachedResult = cacheGet(classList);
|
|
3382
3419
|
if (cachedResult) {
|
|
3383
3420
|
return cachedResult;
|
|
@@ -3385,13 +3422,13 @@ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
|
|
|
3385
3422
|
const result = mergeClassList(classList, configUtils);
|
|
3386
3423
|
cacheSet(classList, result);
|
|
3387
3424
|
return result;
|
|
3388
|
-
}
|
|
3389
|
-
return function callTailwindMerge() {
|
|
3390
|
-
return functionToCall(twJoin.apply(null, arguments));
|
|
3391
3425
|
};
|
|
3392
|
-
|
|
3426
|
+
functionToCall = initTailwindMerge;
|
|
3427
|
+
return (...args) => functionToCall(twJoin(...args));
|
|
3428
|
+
};
|
|
3429
|
+
const fallbackThemeArr = [];
|
|
3393
3430
|
const fromTheme = (key) => {
|
|
3394
|
-
const themeGetter = (theme2) => theme2[key] ||
|
|
3431
|
+
const themeGetter = (theme2) => theme2[key] || fallbackThemeArr;
|
|
3395
3432
|
themeGetter.isThemeGetter = true;
|
|
3396
3433
|
return themeGetter;
|
|
3397
3434
|
};
|
|
@@ -6013,7 +6050,7 @@ const DialogContent = React$1.forwardRef(({ className, children, ...props }, ref
|
|
|
6013
6050
|
/* @__PURE__ */ jsxs(
|
|
6014
6051
|
Close,
|
|
6015
6052
|
{
|
|
6016
|
-
className: "cteditor-absolute cteditor-right-4 cteditor-top-4 cteditor-rounded-full cteditor-bg-secondary cteditor-p-1 cteditor-opacity-70 cteditor-transition-opacity focus:cteditor-outline-none cteditor-disabled:pointer-events-none data-[state=open]:cteditor-bg-accent data-[state=open]:cteditor-text-muted-foreground hover:cteditor-opacity-100\
|
|
6053
|
+
className: "cteditor-absolute cteditor-right-4 cteditor-top-4 cteditor-rounded-full cteditor-bg-secondary cteditor-p-1 cteditor-opacity-70 cteditor-transition-opacity focus:cteditor-outline-none cteditor-disabled:pointer-events-none data-[state=open]:cteditor-bg-accent data-[state=open]:cteditor-text-muted-foreground hover:cteditor-opacity-100\n",
|
|
6017
6054
|
children: [
|
|
6018
6055
|
/* @__PURE__ */ jsx(X$1, { className: "cteditor-h-4 cteditor-w-4" }),
|
|
6019
6056
|
/* @__PURE__ */ jsx("span", { className: "!cteditor-sr-only", children: "Close" })
|
|
@@ -6074,6 +6111,105 @@ const DialogDescription = React$1.forwardRef(({ className, ...props }, ref) => /
|
|
|
6074
6111
|
}
|
|
6075
6112
|
));
|
|
6076
6113
|
DialogDescription.displayName = Description.displayName;
|
|
6114
|
+
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
6115
|
+
var use = React$1[" use ".trim().toString()];
|
|
6116
|
+
function isPromiseLike(value) {
|
|
6117
|
+
return typeof value === "object" && value !== null && "then" in value;
|
|
6118
|
+
}
|
|
6119
|
+
function isLazyComponent(element) {
|
|
6120
|
+
return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
|
|
6121
|
+
}
|
|
6122
|
+
// @__NO_SIDE_EFFECTS__
|
|
6123
|
+
function createSlot(ownerName) {
|
|
6124
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
6125
|
+
const Slot2 = React$1.forwardRef((props, forwardedRef) => {
|
|
6126
|
+
let { children, ...slotProps } = props;
|
|
6127
|
+
if (isLazyComponent(children) && typeof use === "function") {
|
|
6128
|
+
children = use(children._payload);
|
|
6129
|
+
}
|
|
6130
|
+
const childrenArray = React$1.Children.toArray(children);
|
|
6131
|
+
const slottable = childrenArray.find(isSlottable);
|
|
6132
|
+
if (slottable) {
|
|
6133
|
+
const newElement = slottable.props.children;
|
|
6134
|
+
const newChildren = childrenArray.map((child) => {
|
|
6135
|
+
if (child === slottable) {
|
|
6136
|
+
if (React$1.Children.count(newElement) > 1)
|
|
6137
|
+
return React$1.Children.only(null);
|
|
6138
|
+
return React$1.isValidElement(newElement) ? newElement.props.children : null;
|
|
6139
|
+
} else {
|
|
6140
|
+
return child;
|
|
6141
|
+
}
|
|
6142
|
+
});
|
|
6143
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React$1.isValidElement(newElement) ? React$1.cloneElement(newElement, void 0, newChildren) : null });
|
|
6144
|
+
}
|
|
6145
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
6146
|
+
});
|
|
6147
|
+
Slot2.displayName = `${ownerName}.Slot`;
|
|
6148
|
+
return Slot2;
|
|
6149
|
+
}
|
|
6150
|
+
var Slot$3 = /* @__PURE__ */ createSlot("Slot");
|
|
6151
|
+
// @__NO_SIDE_EFFECTS__
|
|
6152
|
+
function createSlotClone(ownerName) {
|
|
6153
|
+
const SlotClone = React$1.forwardRef((props, forwardedRef) => {
|
|
6154
|
+
let { children, ...slotProps } = props;
|
|
6155
|
+
if (isLazyComponent(children) && typeof use === "function") {
|
|
6156
|
+
children = use(children._payload);
|
|
6157
|
+
}
|
|
6158
|
+
if (React$1.isValidElement(children)) {
|
|
6159
|
+
const childrenRef = getElementRef(children);
|
|
6160
|
+
const props2 = mergeProps(slotProps, children.props);
|
|
6161
|
+
if (children.type !== React$1.Fragment) {
|
|
6162
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
6163
|
+
}
|
|
6164
|
+
return React$1.cloneElement(children, props2);
|
|
6165
|
+
}
|
|
6166
|
+
return React$1.Children.count(children) > 1 ? React$1.Children.only(null) : null;
|
|
6167
|
+
});
|
|
6168
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
6169
|
+
return SlotClone;
|
|
6170
|
+
}
|
|
6171
|
+
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
6172
|
+
function isSlottable(child) {
|
|
6173
|
+
return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
6174
|
+
}
|
|
6175
|
+
function mergeProps(slotProps, childProps) {
|
|
6176
|
+
const overrideProps = { ...childProps };
|
|
6177
|
+
for (const propName in childProps) {
|
|
6178
|
+
const slotPropValue = slotProps[propName];
|
|
6179
|
+
const childPropValue = childProps[propName];
|
|
6180
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
6181
|
+
if (isHandler) {
|
|
6182
|
+
if (slotPropValue && childPropValue) {
|
|
6183
|
+
overrideProps[propName] = (...args) => {
|
|
6184
|
+
const result = childPropValue(...args);
|
|
6185
|
+
slotPropValue(...args);
|
|
6186
|
+
return result;
|
|
6187
|
+
};
|
|
6188
|
+
} else if (slotPropValue) {
|
|
6189
|
+
overrideProps[propName] = slotPropValue;
|
|
6190
|
+
}
|
|
6191
|
+
} else if (propName === "style") {
|
|
6192
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
6193
|
+
} else if (propName === "className") {
|
|
6194
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
6195
|
+
}
|
|
6196
|
+
}
|
|
6197
|
+
return { ...slotProps, ...overrideProps };
|
|
6198
|
+
}
|
|
6199
|
+
function getElementRef(element) {
|
|
6200
|
+
var _a, _b;
|
|
6201
|
+
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
6202
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
6203
|
+
if (mayWarn) {
|
|
6204
|
+
return element.ref;
|
|
6205
|
+
}
|
|
6206
|
+
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
6207
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
6208
|
+
if (mayWarn) {
|
|
6209
|
+
return element.props.ref;
|
|
6210
|
+
}
|
|
6211
|
+
return element.props.ref || element.ref;
|
|
6212
|
+
}
|
|
6077
6213
|
const falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
6078
6214
|
const cx = clsx;
|
|
6079
6215
|
const cva = (base, config) => (props) => {
|
|
@@ -6146,7 +6282,7 @@ const buttonVariants = cva(
|
|
|
6146
6282
|
);
|
|
6147
6283
|
const Button = React$1.forwardRef(
|
|
6148
6284
|
({ className, variant, size: size2, asChild = false, ...props }, ref) => {
|
|
6149
|
-
const Comp = asChild ? Slot$
|
|
6285
|
+
const Comp = asChild ? Slot$3 : "button";
|
|
6150
6286
|
return /* @__PURE__ */ jsx(
|
|
6151
6287
|
Comp,
|
|
6152
6288
|
{
|
|
@@ -6175,6 +6311,38 @@ const Input$1 = React$1.forwardRef(
|
|
|
6175
6311
|
}
|
|
6176
6312
|
);
|
|
6177
6313
|
Input$1.displayName = "Input";
|
|
6314
|
+
var NODES = [
|
|
6315
|
+
"a",
|
|
6316
|
+
"button",
|
|
6317
|
+
"div",
|
|
6318
|
+
"form",
|
|
6319
|
+
"h2",
|
|
6320
|
+
"h3",
|
|
6321
|
+
"img",
|
|
6322
|
+
"input",
|
|
6323
|
+
"label",
|
|
6324
|
+
"li",
|
|
6325
|
+
"nav",
|
|
6326
|
+
"ol",
|
|
6327
|
+
"p",
|
|
6328
|
+
"select",
|
|
6329
|
+
"span",
|
|
6330
|
+
"svg",
|
|
6331
|
+
"ul"
|
|
6332
|
+
];
|
|
6333
|
+
var Primitive = NODES.reduce((primitive, node) => {
|
|
6334
|
+
const Slot2 = /* @__PURE__ */ createSlot(`Primitive.${node}`);
|
|
6335
|
+
const Node2 = React$1.forwardRef((props, forwardedRef) => {
|
|
6336
|
+
const { asChild, ...primitiveProps } = props;
|
|
6337
|
+
const Comp = asChild ? Slot2 : node;
|
|
6338
|
+
if (typeof window !== "undefined") {
|
|
6339
|
+
window[Symbol.for("radix-ui")] = true;
|
|
6340
|
+
}
|
|
6341
|
+
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
6342
|
+
});
|
|
6343
|
+
Node2.displayName = `Primitive.${node}`;
|
|
6344
|
+
return { ...primitive, [node]: Node2 };
|
|
6345
|
+
}, {});
|
|
6178
6346
|
var NAME$4 = "Label";
|
|
6179
6347
|
var Label$3 = React$1.forwardRef((props, forwardedRef) => {
|
|
6180
6348
|
return /* @__PURE__ */ jsx(
|
|
@@ -8300,6 +8468,69 @@ function $createCommentedTextNode(text, commentId, commentText, commentAuthor, c
|
|
|
8300
8468
|
function $isCommentedTextNode(node) {
|
|
8301
8469
|
return node instanceof CommentedTextNode;
|
|
8302
8470
|
}
|
|
8471
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
8472
|
+
let defaultContexts = [];
|
|
8473
|
+
function createContext3(rootComponentName, defaultContext) {
|
|
8474
|
+
const BaseContext = React$1.createContext(defaultContext);
|
|
8475
|
+
BaseContext.displayName = rootComponentName + "Context";
|
|
8476
|
+
const index2 = defaultContexts.length;
|
|
8477
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
8478
|
+
const Provider2 = (props) => {
|
|
8479
|
+
var _a;
|
|
8480
|
+
const { scope, children, ...context } = props;
|
|
8481
|
+
const Context2 = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index2]) || BaseContext;
|
|
8482
|
+
const value = React$1.useMemo(() => context, Object.values(context));
|
|
8483
|
+
return /* @__PURE__ */ jsx(Context2.Provider, { value, children });
|
|
8484
|
+
};
|
|
8485
|
+
Provider2.displayName = rootComponentName + "Provider";
|
|
8486
|
+
function useContext2(consumerName, scope) {
|
|
8487
|
+
var _a;
|
|
8488
|
+
const Context2 = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index2]) || BaseContext;
|
|
8489
|
+
const context = React$1.useContext(Context2);
|
|
8490
|
+
if (context)
|
|
8491
|
+
return context;
|
|
8492
|
+
if (defaultContext !== void 0)
|
|
8493
|
+
return defaultContext;
|
|
8494
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
8495
|
+
}
|
|
8496
|
+
return [Provider2, useContext2];
|
|
8497
|
+
}
|
|
8498
|
+
const createScope = () => {
|
|
8499
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
8500
|
+
return React$1.createContext(defaultContext);
|
|
8501
|
+
});
|
|
8502
|
+
return function useScope(scope) {
|
|
8503
|
+
const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
|
8504
|
+
return React$1.useMemo(
|
|
8505
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
8506
|
+
[scope, contexts]
|
|
8507
|
+
);
|
|
8508
|
+
};
|
|
8509
|
+
};
|
|
8510
|
+
createScope.scopeName = scopeName;
|
|
8511
|
+
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
8512
|
+
}
|
|
8513
|
+
function composeContextScopes(...scopes) {
|
|
8514
|
+
const baseScope = scopes[0];
|
|
8515
|
+
if (scopes.length === 1)
|
|
8516
|
+
return baseScope;
|
|
8517
|
+
const createScope = () => {
|
|
8518
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
8519
|
+
useScope: createScope2(),
|
|
8520
|
+
scopeName: createScope2.scopeName
|
|
8521
|
+
}));
|
|
8522
|
+
return function useComposedScopes(overrideScopes) {
|
|
8523
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
8524
|
+
const scopeProps = useScope(overrideScopes);
|
|
8525
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
8526
|
+
return { ...nextScopes2, ...currentScope };
|
|
8527
|
+
}, {});
|
|
8528
|
+
return React$1.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
8529
|
+
};
|
|
8530
|
+
};
|
|
8531
|
+
createScope.scopeName = baseScope.scopeName;
|
|
8532
|
+
return createScope;
|
|
8533
|
+
}
|
|
8303
8534
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
8304
8535
|
function getDefaultExportFromCjs(x2) {
|
|
8305
8536
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
@@ -8713,7 +8944,7 @@ const SheetDescription = React$1.forwardRef(({ className, ...props }, ref) => /*
|
|
|
8713
8944
|
SheetDescription.displayName = Description.displayName;
|
|
8714
8945
|
function createCollection(name) {
|
|
8715
8946
|
const PROVIDER_NAME2 = name + "CollectionProvider";
|
|
8716
|
-
const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME2);
|
|
8947
|
+
const [createCollectionContext, createCollectionScope2] = createContextScope$1(PROVIDER_NAME2);
|
|
8717
8948
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
|
8718
8949
|
PROVIDER_NAME2,
|
|
8719
8950
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
@@ -8726,7 +8957,7 @@ function createCollection(name) {
|
|
|
8726
8957
|
};
|
|
8727
8958
|
CollectionProvider.displayName = PROVIDER_NAME2;
|
|
8728
8959
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
8729
|
-
const CollectionSlotImpl = /* @__PURE__ */ createSlot(COLLECTION_SLOT_NAME);
|
|
8960
|
+
const CollectionSlotImpl = /* @__PURE__ */ createSlot$1(COLLECTION_SLOT_NAME);
|
|
8730
8961
|
const CollectionSlot = React__default.forwardRef(
|
|
8731
8962
|
(props, forwardedRef) => {
|
|
8732
8963
|
const { scope, children } = props;
|
|
@@ -8738,7 +8969,7 @@ function createCollection(name) {
|
|
|
8738
8969
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
8739
8970
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
8740
8971
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
8741
|
-
const CollectionItemSlotImpl = /* @__PURE__ */ createSlot(ITEM_SLOT_NAME);
|
|
8972
|
+
const CollectionItemSlotImpl = /* @__PURE__ */ createSlot$1(ITEM_SLOT_NAME);
|
|
8742
8973
|
const CollectionItemSlot = React__default.forwardRef(
|
|
8743
8974
|
(props, forwardedRef) => {
|
|
8744
8975
|
const { scope, children, ...itemData } = props;
|
|
@@ -8783,7 +9014,7 @@ var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
|
8783
9014
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
8784
9015
|
var GROUP_NAME$3 = "RovingFocusGroup";
|
|
8785
9016
|
var [Collection$2, useCollection$2, createCollectionScope$2] = createCollection(GROUP_NAME$3);
|
|
8786
|
-
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
|
|
9017
|
+
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope$1(
|
|
8787
9018
|
GROUP_NAME$3,
|
|
8788
9019
|
[createCollectionScope$2]
|
|
8789
9020
|
);
|
|
@@ -8850,7 +9081,7 @@ var RovingFocusGroupImpl = React$1.forwardRef((props, forwardedRef) => {
|
|
|
8850
9081
|
[]
|
|
8851
9082
|
),
|
|
8852
9083
|
children: /* @__PURE__ */ jsx(
|
|
8853
|
-
Primitive.div,
|
|
9084
|
+
Primitive$1.div,
|
|
8854
9085
|
{
|
|
8855
9086
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
8856
9087
|
"data-orientation": orientation,
|
|
@@ -8915,7 +9146,7 @@ var RovingFocusGroupItem = React$1.forwardRef(
|
|
|
8915
9146
|
focusable,
|
|
8916
9147
|
active,
|
|
8917
9148
|
children: /* @__PURE__ */ jsx(
|
|
8918
|
-
Primitive.span,
|
|
9149
|
+
Primitive$1.span,
|
|
8919
9150
|
{
|
|
8920
9151
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
8921
9152
|
"data-orientation": context.orientation,
|
|
@@ -9000,7 +9231,7 @@ function wrapArray$2(array, startIndex) {
|
|
|
9000
9231
|
var Root$2 = RovingFocusGroup;
|
|
9001
9232
|
var Item$1 = RovingFocusGroupItem;
|
|
9002
9233
|
var TABS_NAME = "Tabs";
|
|
9003
|
-
var [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [
|
|
9234
|
+
var [createTabsContext, createTabsScope] = createContextScope$1(TABS_NAME, [
|
|
9004
9235
|
createRovingFocusGroupScope
|
|
9005
9236
|
]);
|
|
9006
9237
|
var useRovingFocusGroupScope$1 = createRovingFocusGroupScope();
|
|
@@ -9035,7 +9266,7 @@ var Tabs$1 = React$1.forwardRef(
|
|
|
9035
9266
|
dir: direction,
|
|
9036
9267
|
activationMode,
|
|
9037
9268
|
children: /* @__PURE__ */ jsx(
|
|
9038
|
-
Primitive.div,
|
|
9269
|
+
Primitive$1.div,
|
|
9039
9270
|
{
|
|
9040
9271
|
dir: direction,
|
|
9041
9272
|
"data-orientation": orientation,
|
|
@@ -9063,7 +9294,7 @@ var TabsList$1 = React$1.forwardRef(
|
|
|
9063
9294
|
dir: context.dir,
|
|
9064
9295
|
loop,
|
|
9065
9296
|
children: /* @__PURE__ */ jsx(
|
|
9066
|
-
Primitive.div,
|
|
9297
|
+
Primitive$1.div,
|
|
9067
9298
|
{
|
|
9068
9299
|
role: "tablist",
|
|
9069
9300
|
"aria-orientation": context.orientation,
|
|
@@ -9093,7 +9324,7 @@ var TabsTrigger$1 = React$1.forwardRef(
|
|
|
9093
9324
|
focusable: !disabled,
|
|
9094
9325
|
active: isSelected,
|
|
9095
9326
|
children: /* @__PURE__ */ jsx(
|
|
9096
|
-
Primitive.button,
|
|
9327
|
+
Primitive$1.button,
|
|
9097
9328
|
{
|
|
9098
9329
|
type: "button",
|
|
9099
9330
|
role: "tab",
|
|
@@ -9143,7 +9374,7 @@ var TabsContent$1 = React$1.forwardRef(
|
|
|
9143
9374
|
return () => cancelAnimationFrame(rAF);
|
|
9144
9375
|
}, []);
|
|
9145
9376
|
return /* @__PURE__ */ jsx(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx(
|
|
9146
|
-
Primitive.div,
|
|
9377
|
+
Primitive$1.div,
|
|
9147
9378
|
{
|
|
9148
9379
|
"data-state": isSelected ? "active" : "inactive",
|
|
9149
9380
|
"data-orientation": context.orientation,
|
|
@@ -11523,7 +11754,7 @@ var NAME$2 = "Arrow";
|
|
|
11523
11754
|
var Arrow$1 = React$1.forwardRef((props, forwardedRef) => {
|
|
11524
11755
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
11525
11756
|
return /* @__PURE__ */ jsx(
|
|
11526
|
-
Primitive.svg,
|
|
11757
|
+
Primitive$1.svg,
|
|
11527
11758
|
{
|
|
11528
11759
|
...arrowProps,
|
|
11529
11760
|
ref: forwardedRef,
|
|
@@ -11572,7 +11803,7 @@ function useSize(element) {
|
|
|
11572
11803
|
return size2;
|
|
11573
11804
|
}
|
|
11574
11805
|
var POPPER_NAME = "Popper";
|
|
11575
|
-
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
11806
|
+
var [createPopperContext, createPopperScope] = createContextScope$1(POPPER_NAME);
|
|
11576
11807
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
11577
11808
|
var Popper = (props) => {
|
|
11578
11809
|
const { __scopePopper, children } = props;
|
|
@@ -11595,7 +11826,7 @@ var PopperAnchor = React$1.forwardRef(
|
|
|
11595
11826
|
context.onAnchorChange(anchorRef.current);
|
|
11596
11827
|
}
|
|
11597
11828
|
});
|
|
11598
|
-
return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
11829
|
+
return virtualRef ? null : /* @__PURE__ */ jsx(Primitive$1.div, { ...anchorProps, ref: composedRefs });
|
|
11599
11830
|
}
|
|
11600
11831
|
);
|
|
11601
11832
|
PopperAnchor.displayName = ANCHOR_NAME$2;
|
|
@@ -11724,7 +11955,7 @@ var PopperContent = React$1.forwardRef(
|
|
|
11724
11955
|
arrowY,
|
|
11725
11956
|
shouldHideArrow: cannotCenterArrow,
|
|
11726
11957
|
children: /* @__PURE__ */ jsx(
|
|
11727
|
-
Primitive.div,
|
|
11958
|
+
Primitive$1.div,
|
|
11728
11959
|
{
|
|
11729
11960
|
"data-side": placedSide,
|
|
11730
11961
|
"data-align": placedAlign,
|
|
@@ -11860,7 +12091,7 @@ var NAME$1 = "VisuallyHidden";
|
|
|
11860
12091
|
var VisuallyHidden = React$1.forwardRef(
|
|
11861
12092
|
(props, forwardedRef) => {
|
|
11862
12093
|
return /* @__PURE__ */ jsx(
|
|
11863
|
-
Primitive.span,
|
|
12094
|
+
Primitive$1.span,
|
|
11864
12095
|
{
|
|
11865
12096
|
...props,
|
|
11866
12097
|
ref: forwardedRef,
|
|
@@ -11871,7 +12102,7 @@ var VisuallyHidden = React$1.forwardRef(
|
|
|
11871
12102
|
);
|
|
11872
12103
|
VisuallyHidden.displayName = NAME$1;
|
|
11873
12104
|
var Root = VisuallyHidden;
|
|
11874
|
-
var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
|
|
12105
|
+
var [createTooltipContext, createTooltipScope] = createContextScope$1("Tooltip", [
|
|
11875
12106
|
createPopperScope
|
|
11876
12107
|
]);
|
|
11877
12108
|
var usePopperScope$3 = createPopperScope();
|
|
@@ -12032,7 +12263,7 @@ var TooltipTrigger$1 = React$1.forwardRef(
|
|
|
12032
12263
|
return () => document.removeEventListener("pointerup", handlePointerUp);
|
|
12033
12264
|
}, [handlePointerUp]);
|
|
12034
12265
|
return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
|
|
12035
|
-
Primitive.button,
|
|
12266
|
+
Primitive$1.button,
|
|
12036
12267
|
{
|
|
12037
12268
|
"aria-describedby": context.open ? context.contentId : void 0,
|
|
12038
12269
|
"data-state": context.stateAttribute,
|
|
@@ -12384,7 +12615,7 @@ const CommentToggle = ({
|
|
|
12384
12615
|
return /* @__PURE__ */ jsx(
|
|
12385
12616
|
"div",
|
|
12386
12617
|
{
|
|
12387
|
-
className: "cteditor-flex cteditor-bg-background cteditor-text-foreground cteditor-px-2.5 cteditor-py-[7px] cteditor-rounded-lg cteditor-h-11 cteditor-items-center cteditor-justify-center cteditor-ml-2\
|
|
12618
|
+
className: "cteditor-flex cteditor-bg-background cteditor-text-foreground cteditor-px-2.5 cteditor-py-[7px] cteditor-rounded-lg cteditor-h-11 cteditor-items-center cteditor-justify-center cteditor-ml-2\n",
|
|
12388
12619
|
children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
12389
12620
|
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
12390
12621
|
Button,
|
|
@@ -12717,10 +12948,10 @@ const PDF_CONFIG = {
|
|
|
12717
12948
|
};
|
|
12718
12949
|
const loadHtml2Pdf = async () => {
|
|
12719
12950
|
try {
|
|
12720
|
-
const mod = await import("./html2pdf.bundle.min-
|
|
12951
|
+
const mod = await import("./html2pdf.bundle.min-8fcf4f01.js").then((n) => n.h);
|
|
12721
12952
|
return (mod == null ? void 0 : mod.default) || mod;
|
|
12722
12953
|
} catch {
|
|
12723
|
-
const mod2 = await import("./html2pdf.bundle-
|
|
12954
|
+
const mod2 = await import("./html2pdf.bundle-5c5747c7.js").then((n) => n.h);
|
|
12724
12955
|
return (mod2 == null ? void 0 : mod2.default) || mod2;
|
|
12725
12956
|
}
|
|
12726
12957
|
};
|
|
@@ -13927,7 +14158,7 @@ const EmbedComponent = ({ url, displayType, alignment, nodeKey }) => {
|
|
|
13927
14158
|
}
|
|
13928
14159
|
);
|
|
13929
14160
|
};
|
|
13930
|
-
const ImageView = React__default.lazy(() => import("./index-
|
|
14161
|
+
const ImageView = React__default.lazy(() => import("./index-48519641.js"));
|
|
13931
14162
|
function isGoogleDocCheckboxImg(img) {
|
|
13932
14163
|
return img.parentElement != null && img.parentElement.tagName === "LI" && img.previousSibling === null && img.getAttribute("aria-roledescription") === "checkbox";
|
|
13933
14164
|
}
|
|
@@ -15361,63 +15592,35 @@ const NumberListIcon = () => /* @__PURE__ */ jsxs(
|
|
|
15361
15592
|
"path",
|
|
15362
15593
|
{
|
|
15363
15594
|
d: "M20.946 16H6.66602V17.3333H20.946C21.1228 17.3333 21.2924 17.2631 21.4174 17.1381C21.5424 17.013 21.6127 16.8435 21.6127 16.6667C21.6127 16.4899 21.5424 16.3203 21.4174 16.1953C21.2924 16.0702 21.1228 16 20.946 16Z",
|
|
15364
|
-
fill: "currentColor"
|
|
15365
|
-
}
|
|
15366
|
-
)
|
|
15367
|
-
] }),
|
|
15368
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "clip0_2262_1319", children: /* @__PURE__ */ jsx("rect", { width: "24", height: "24", fill: "currentColor" }) }) })
|
|
15369
|
-
]
|
|
15370
|
-
}
|
|
15371
|
-
);
|
|
15372
|
-
const BulletListIcon = () => /* @__PURE__ */ jsx(
|
|
15373
|
-
"svg",
|
|
15374
|
-
{
|
|
15375
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
15376
|
-
width: "24",
|
|
15377
|
-
height: "24",
|
|
15378
|
-
viewBox: "0 0 24 24",
|
|
15379
|
-
fill: "none",
|
|
15380
|
-
children: /* @__PURE__ */ jsx(
|
|
15381
|
-
"path",
|
|
15382
|
-
{
|
|
15383
|
-
d: "M3.49941 15.5004C4.32752 15.5004 4.99883 16.1717 4.99883 16.9998C4.99883 17.8279 4.32752 18.4992 3.49941 18.4992C2.67131 18.4992 2 17.8279 2 16.9998C2 16.1717 2.67131 15.5004 3.49941 15.5004ZM7.50034 15.9998H21.0035C21.5558 15.9998 22.0035 16.4475 22.0035 16.9998C22.0035 17.5126 21.6174 17.9353 21.1201 17.993L21.0035 17.9998H7.50034C6.94805 17.9998 6.50034 17.5521 6.50034 16.9998C6.50034 16.4869 6.88638 16.0643 7.38371 16.0065L7.50034 15.9998ZM3.49941 10.5004C4.32752 10.5004 4.99883 11.1717 4.99883 11.9998C4.99883 12.8279 4.32752 13.4992 3.49941 13.4992C2.67131 13.4992 2 12.8279 2 11.9998C2 11.1717 2.67131 10.5004 3.49941 10.5004ZM7.50034 10.9998H21.0035C21.5558 10.9998 22.0035 11.4475 22.0035 11.9998C22.0035 12.5126 21.6174 12.9353 21.1201 12.9931L21.0035 12.9998H7.50034C6.94805 12.9998 6.50034 12.5521 6.50034 11.9998C6.50034 11.487 6.88638 11.0643 7.38371 11.0065L7.50034 10.9998ZM3.49941 5.50684C4.32752 5.50684 4.99883 6.17815 4.99883 7.00625C4.99883 7.83435 4.32752 8.50567 3.49941 8.50567C2.67131 8.50567 2 7.83435 2 7.00625C2 6.17815 2.67131 5.50684 3.49941 5.50684ZM7.50034 5.99985H21.0035C21.5558 5.99985 22.0035 6.44756 22.0035 6.99985C22.0035 7.51268 21.6174 7.93535 21.1201 7.99312L21.0035 7.99985H7.50034C6.94805 7.99985 6.50034 7.55213 6.50034 6.99985C6.50034 6.48701 6.88638 6.06434 7.38371 6.00657L7.50034 5.99985Z",
|
|
15384
|
-
fill: "currentColor"
|
|
15385
|
-
}
|
|
15386
|
-
)
|
|
15387
|
-
}
|
|
15388
|
-
);
|
|
15389
|
-
const CheckBoxIcon = () => /* @__PURE__ */ jsxs(
|
|
15390
|
-
"svg",
|
|
15391
|
-
{
|
|
15392
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
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
|
-
)
|
|
15595
|
+
fill: "currentColor"
|
|
15596
|
+
}
|
|
15597
|
+
)
|
|
15598
|
+
] }),
|
|
15599
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "clip0_2262_1319", children: /* @__PURE__ */ jsx("rect", { width: "24", height: "24", fill: "currentColor" }) }) })
|
|
15418
15600
|
]
|
|
15419
15601
|
}
|
|
15420
15602
|
);
|
|
15603
|
+
const BulletListIcon = () => /* @__PURE__ */ jsx(
|
|
15604
|
+
"svg",
|
|
15605
|
+
{
|
|
15606
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15607
|
+
width: "24",
|
|
15608
|
+
height: "24",
|
|
15609
|
+
viewBox: "0 0 24 24",
|
|
15610
|
+
fill: "none",
|
|
15611
|
+
children: /* @__PURE__ */ jsx(
|
|
15612
|
+
"path",
|
|
15613
|
+
{
|
|
15614
|
+
d: "M3.49941 15.5004C4.32752 15.5004 4.99883 16.1717 4.99883 16.9998C4.99883 17.8279 4.32752 18.4992 3.49941 18.4992C2.67131 18.4992 2 17.8279 2 16.9998C2 16.1717 2.67131 15.5004 3.49941 15.5004ZM7.50034 15.9998H21.0035C21.5558 15.9998 22.0035 16.4475 22.0035 16.9998C22.0035 17.5126 21.6174 17.9353 21.1201 17.993L21.0035 17.9998H7.50034C6.94805 17.9998 6.50034 17.5521 6.50034 16.9998C6.50034 16.4869 6.88638 16.0643 7.38371 16.0065L7.50034 15.9998ZM3.49941 10.5004C4.32752 10.5004 4.99883 11.1717 4.99883 11.9998C4.99883 12.8279 4.32752 13.4992 3.49941 13.4992C2.67131 13.4992 2 12.8279 2 11.9998C2 11.1717 2.67131 10.5004 3.49941 10.5004ZM7.50034 10.9998H21.0035C21.5558 10.9998 22.0035 11.4475 22.0035 11.9998C22.0035 12.5126 21.6174 12.9353 21.1201 12.9931L21.0035 12.9998H7.50034C6.94805 12.9998 6.50034 12.5521 6.50034 11.9998C6.50034 11.487 6.88638 11.0643 7.38371 11.0065L7.50034 10.9998ZM3.49941 5.50684C4.32752 5.50684 4.99883 6.17815 4.99883 7.00625C4.99883 7.83435 4.32752 8.50567 3.49941 8.50567C2.67131 8.50567 2 7.83435 2 7.00625C2 6.17815 2.67131 5.50684 3.49941 5.50684ZM7.50034 5.99985H21.0035C21.5558 5.99985 22.0035 6.44756 22.0035 6.99985C22.0035 7.51268 21.6174 7.93535 21.1201 7.99312L21.0035 7.99985H7.50034C6.94805 7.99985 6.50034 7.55213 6.50034 6.99985C6.50034 6.48701 6.88638 6.06434 7.38371 6.00657L7.50034 5.99985Z",
|
|
15615
|
+
fill: "currentColor"
|
|
15616
|
+
}
|
|
15617
|
+
)
|
|
15618
|
+
}
|
|
15619
|
+
);
|
|
15620
|
+
const CheckBoxIcon = () => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: [
|
|
15621
|
+
/* @__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" }),
|
|
15622
|
+
/* @__PURE__ */ jsx("path", { d: "M7.55566 12.8886L10.2223 15.5552L16.4446 9.33301", stroke: "currentColor" })
|
|
15623
|
+
] });
|
|
15421
15624
|
const SearchTextIcon = () => /* @__PURE__ */ jsx(
|
|
15422
15625
|
"svg",
|
|
15423
15626
|
{
|
|
@@ -15601,6 +15804,10 @@ const RecordingIcon = () => /* @__PURE__ */ jsx(
|
|
|
15601
15804
|
);
|
|
15602
15805
|
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
15806
|
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" }) });
|
|
15807
|
+
const QuoteIcon = () => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: [
|
|
15808
|
+
/* @__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" }),
|
|
15809
|
+
/* @__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" })
|
|
15810
|
+
] });
|
|
15604
15811
|
const EDITOR_NODES = [
|
|
15605
15812
|
CodeNode,
|
|
15606
15813
|
CodeHighlightNode,
|
|
@@ -15736,7 +15943,7 @@ const formatMenuItems = [
|
|
|
15736
15943
|
},
|
|
15737
15944
|
{
|
|
15738
15945
|
name: "Quote",
|
|
15739
|
-
icon: /* @__PURE__ */ jsx(
|
|
15946
|
+
icon: /* @__PURE__ */ jsx(QuoteIcon, {}),
|
|
15740
15947
|
payload: "quote"
|
|
15741
15948
|
}
|
|
15742
15949
|
];
|
|
@@ -16635,7 +16842,7 @@ function TableOptionPlugin() {
|
|
|
16635
16842
|
setColumnHeadings([]);
|
|
16636
16843
|
}
|
|
16637
16844
|
},
|
|
16638
|
-
className: "\
|
|
16845
|
+
className: "\n cteditor-peer\n cteditor-appearance-none\n cteditor-w-5 cteditor-h-5\n cteditor-border cteditor-border-gray-400 cteditor-rounded\n cteditor-transition-all cteditor-duration-200\n checked:cteditor-bg-blue-600 checked:cteditor-border-blue-600\n hover:cteditor-border-blue-500 [&>span]:checked:cteditor-opacity-100\n \n "
|
|
16639
16846
|
}
|
|
16640
16847
|
),
|
|
16641
16848
|
/* @__PURE__ */ jsx("span", { className: "cteditor-absolute cteditor-top-1/2 cteditor-left-1/2 [&>svg]:cteditor-size-4 -cteditor-translate-x-1/2 -cteditor-translate-y-1/2 cteditor-opacity-0 peer-checked:cteditor-opacity-100", children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
@@ -17170,7 +17377,7 @@ var SUB_CLOSE_KEYS = {
|
|
|
17170
17377
|
};
|
|
17171
17378
|
var MENU_NAME = "Menu";
|
|
17172
17379
|
var [Collection$1, useCollection$1, createCollectionScope$1] = createCollection(MENU_NAME);
|
|
17173
|
-
var [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [
|
|
17380
|
+
var [createMenuContext, createMenuScope] = createContextScope$1(MENU_NAME, [
|
|
17174
17381
|
createCollectionScope$1,
|
|
17175
17382
|
createPopperScope,
|
|
17176
17383
|
createRovingFocusGroupScope
|
|
@@ -17295,7 +17502,7 @@ var MenuRootContentNonModal = React$1.forwardRef((props, forwardedRef) => {
|
|
|
17295
17502
|
}
|
|
17296
17503
|
);
|
|
17297
17504
|
});
|
|
17298
|
-
var Slot$2 = /* @__PURE__ */ createSlot("MenuContent.ScrollLock");
|
|
17505
|
+
var Slot$2 = /* @__PURE__ */ createSlot$1("MenuContent.ScrollLock");
|
|
17299
17506
|
var MenuContentImpl = React$1.forwardRef(
|
|
17300
17507
|
(props, forwardedRef) => {
|
|
17301
17508
|
const {
|
|
@@ -17497,7 +17704,7 @@ var GROUP_NAME$2 = "MenuGroup";
|
|
|
17497
17704
|
var MenuGroup = React$1.forwardRef(
|
|
17498
17705
|
(props, forwardedRef) => {
|
|
17499
17706
|
const { __scopeMenu, ...groupProps } = props;
|
|
17500
|
-
return /* @__PURE__ */ jsx(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
|
|
17707
|
+
return /* @__PURE__ */ jsx(Primitive$1.div, { role: "group", ...groupProps, ref: forwardedRef });
|
|
17501
17708
|
}
|
|
17502
17709
|
);
|
|
17503
17710
|
MenuGroup.displayName = GROUP_NAME$2;
|
|
@@ -17505,7 +17712,7 @@ var LABEL_NAME$2 = "MenuLabel";
|
|
|
17505
17712
|
var MenuLabel = React$1.forwardRef(
|
|
17506
17713
|
(props, forwardedRef) => {
|
|
17507
17714
|
const { __scopeMenu, ...labelProps } = props;
|
|
17508
|
-
return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });
|
|
17715
|
+
return /* @__PURE__ */ jsx(Primitive$1.div, { ...labelProps, ref: forwardedRef });
|
|
17509
17716
|
}
|
|
17510
17717
|
);
|
|
17511
17718
|
MenuLabel.displayName = LABEL_NAME$2;
|
|
@@ -17585,7 +17792,7 @@ var MenuItemImpl = React$1.forwardRef(
|
|
|
17585
17792
|
disabled,
|
|
17586
17793
|
textValue: textValue ?? textContent,
|
|
17587
17794
|
children: /* @__PURE__ */ jsx(Item$1, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(
|
|
17588
|
-
Primitive.div,
|
|
17795
|
+
Primitive$1.div,
|
|
17589
17796
|
{
|
|
17590
17797
|
role: "menuitem",
|
|
17591
17798
|
"data-highlighted": isFocused ? "" : void 0,
|
|
@@ -17696,7 +17903,7 @@ var MenuItemIndicator = React$1.forwardRef(
|
|
|
17696
17903
|
{
|
|
17697
17904
|
present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,
|
|
17698
17905
|
children: /* @__PURE__ */ jsx(
|
|
17699
|
-
Primitive.span,
|
|
17906
|
+
Primitive$1.span,
|
|
17700
17907
|
{
|
|
17701
17908
|
...itemIndicatorProps,
|
|
17702
17909
|
ref: forwardedRef,
|
|
@@ -17713,7 +17920,7 @@ var MenuSeparator = React$1.forwardRef(
|
|
|
17713
17920
|
(props, forwardedRef) => {
|
|
17714
17921
|
const { __scopeMenu, ...separatorProps } = props;
|
|
17715
17922
|
return /* @__PURE__ */ jsx(
|
|
17716
|
-
Primitive.div,
|
|
17923
|
+
Primitive$1.div,
|
|
17717
17924
|
{
|
|
17718
17925
|
role: "separator",
|
|
17719
17926
|
"aria-orientation": "horizontal",
|
|
@@ -17973,7 +18180,7 @@ var Arrow2 = MenuArrow;
|
|
|
17973
18180
|
var SubTrigger = MenuSubTrigger;
|
|
17974
18181
|
var SubContent = MenuSubContent;
|
|
17975
18182
|
var DROPDOWN_MENU_NAME = "DropdownMenu";
|
|
17976
|
-
var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(
|
|
18183
|
+
var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope$1(
|
|
17977
18184
|
DROPDOWN_MENU_NAME,
|
|
17978
18185
|
[createMenuScope]
|
|
17979
18186
|
);
|
|
@@ -18020,7 +18227,7 @@ var DropdownMenuTrigger$1 = React$1.forwardRef(
|
|
|
18020
18227
|
const context = useDropdownMenuContext(TRIGGER_NAME$2, __scopeDropdownMenu);
|
|
18021
18228
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
18022
18229
|
return /* @__PURE__ */ jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(
|
|
18023
|
-
Primitive.button,
|
|
18230
|
+
Primitive$1.button,
|
|
18024
18231
|
{
|
|
18025
18232
|
type: "button",
|
|
18026
18233
|
id: context.triggerId,
|
|
@@ -18357,14 +18564,14 @@ const AlignMenu = () => {
|
|
|
18357
18564
|
{
|
|
18358
18565
|
variant: "ghost",
|
|
18359
18566
|
size: "sm",
|
|
18360
|
-
className: "cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-h-7 cteditor-rounded-sm cteditor-px-2\
|
|
18567
|
+
className: "cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-h-7 cteditor-rounded-sm cteditor-px-2\n",
|
|
18361
18568
|
children: [
|
|
18362
18569
|
/* @__PURE__ */ jsx(AlignLeft, { className: "!cteditor-size-4" }),
|
|
18363
18570
|
"Align",
|
|
18364
18571
|
/* @__PURE__ */ jsx(
|
|
18365
18572
|
ChevronDown,
|
|
18366
18573
|
{
|
|
18367
|
-
className: "!cteditor-size-4 cteditor-opacity-50\
|
|
18574
|
+
className: "!cteditor-size-4 cteditor-opacity-50\n"
|
|
18368
18575
|
}
|
|
18369
18576
|
)
|
|
18370
18577
|
]
|
|
@@ -18762,7 +18969,7 @@ var V = "undefined" != typeof window ? useLayoutEffect$1 : useEffect$1, $ = func
|
|
|
18762
18969
|
return React__default.createElement(U, u({}, r2, { colorModel: W }));
|
|
18763
18970
|
};
|
|
18764
18971
|
var POPOVER_NAME = "Popover";
|
|
18765
|
-
var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [
|
|
18972
|
+
var [createPopoverContext, createPopoverScope] = createContextScope$1(POPOVER_NAME, [
|
|
18766
18973
|
createPopperScope
|
|
18767
18974
|
]);
|
|
18768
18975
|
var usePopperScope$1 = createPopperScope();
|
|
@@ -18826,7 +19033,7 @@ var PopoverTrigger$1 = React$1.forwardRef(
|
|
|
18826
19033
|
const popperScope = usePopperScope$1(__scopePopover);
|
|
18827
19034
|
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
18828
19035
|
const trigger = /* @__PURE__ */ jsx(
|
|
18829
|
-
Primitive.button,
|
|
19036
|
+
Primitive$1.button,
|
|
18830
19037
|
{
|
|
18831
19038
|
type: "button",
|
|
18832
19039
|
"aria-haspopup": "dialog",
|
|
@@ -18862,7 +19069,7 @@ var PopoverContent$1 = React$1.forwardRef(
|
|
|
18862
19069
|
}
|
|
18863
19070
|
);
|
|
18864
19071
|
PopoverContent$1.displayName = CONTENT_NAME$1;
|
|
18865
|
-
var Slot$1 = /* @__PURE__ */ createSlot("PopoverContent.RemoveScroll");
|
|
19072
|
+
var Slot$1 = /* @__PURE__ */ createSlot$1("PopoverContent.RemoveScroll");
|
|
18866
19073
|
var PopoverContentModal = React$1.forwardRef(
|
|
18867
19074
|
(props, forwardedRef) => {
|
|
18868
19075
|
const context = usePopoverContext(CONTENT_NAME$1, props.__scopePopover);
|
|
@@ -19019,7 +19226,7 @@ var PopoverClose = React$1.forwardRef(
|
|
|
19019
19226
|
const { __scopePopover, ...closeProps } = props;
|
|
19020
19227
|
const context = usePopoverContext(CLOSE_NAME, __scopePopover);
|
|
19021
19228
|
return /* @__PURE__ */ jsx(
|
|
19022
|
-
Primitive.button,
|
|
19229
|
+
Primitive$1.button,
|
|
19023
19230
|
{
|
|
19024
19231
|
type: "button",
|
|
19025
19232
|
...closeProps,
|
|
@@ -19255,7 +19462,7 @@ const ColorPicker$2 = ({
|
|
|
19255
19462
|
"button",
|
|
19256
19463
|
{
|
|
19257
19464
|
onClick: () => setShowAdvanced(!showAdvanced),
|
|
19258
|
-
className: "cteditor-text-xs cteditor-text-primary/90 hover:cteditor-text-primary cteditor-transition-colors cteditor-flex cteditor-items-center cteditor-gap-2\
|
|
19465
|
+
className: "cteditor-text-xs cteditor-text-primary/90 hover:cteditor-text-primary cteditor-transition-colors cteditor-flex cteditor-items-center cteditor-gap-2\n",
|
|
19259
19466
|
children: [
|
|
19260
19467
|
/* @__PURE__ */ jsx("span", { className: "cteditor-text-xs", children: showAdvanced ? "▼" : "▶" }),
|
|
19261
19468
|
showAdvanced ? "Hide Advanced" : "Show Advanced"
|
|
@@ -19384,7 +19591,7 @@ var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
|
|
|
19384
19591
|
var SELECTION_KEYS = [" ", "Enter"];
|
|
19385
19592
|
var SELECT_NAME = "Select";
|
|
19386
19593
|
var [Collection, useCollection, createCollectionScope] = createCollection(SELECT_NAME);
|
|
19387
|
-
var [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [
|
|
19594
|
+
var [createSelectContext, createSelectScope] = createContextScope$1(SELECT_NAME, [
|
|
19388
19595
|
createCollectionScope,
|
|
19389
19596
|
createPopperScope
|
|
19390
19597
|
]);
|
|
@@ -19521,7 +19728,7 @@ var SelectTrigger$1 = React$1.forwardRef(
|
|
|
19521
19728
|
}
|
|
19522
19729
|
};
|
|
19523
19730
|
return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
|
|
19524
|
-
Primitive.button,
|
|
19731
|
+
Primitive$1.button,
|
|
19525
19732
|
{
|
|
19526
19733
|
type: "button",
|
|
19527
19734
|
role: "combobox",
|
|
@@ -19582,7 +19789,7 @@ var SelectValue$1 = React$1.forwardRef(
|
|
|
19582
19789
|
onValueNodeHasChildrenChange(hasChildren);
|
|
19583
19790
|
}, [onValueNodeHasChildrenChange, hasChildren]);
|
|
19584
19791
|
return /* @__PURE__ */ jsx(
|
|
19585
|
-
Primitive.span,
|
|
19792
|
+
Primitive$1.span,
|
|
19586
19793
|
{
|
|
19587
19794
|
...valueProps,
|
|
19588
19795
|
ref: composedRefs,
|
|
@@ -19597,7 +19804,7 @@ var ICON_NAME = "SelectIcon";
|
|
|
19597
19804
|
var SelectIcon = React$1.forwardRef(
|
|
19598
19805
|
(props, forwardedRef) => {
|
|
19599
19806
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
19600
|
-
return /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
19807
|
+
return /* @__PURE__ */ jsx(Primitive$1.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
19601
19808
|
}
|
|
19602
19809
|
);
|
|
19603
19810
|
SelectIcon.displayName = ICON_NAME;
|
|
@@ -19628,7 +19835,7 @@ SelectContent$1.displayName = CONTENT_NAME;
|
|
|
19628
19835
|
var CONTENT_MARGIN = 10;
|
|
19629
19836
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME);
|
|
19630
19837
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
19631
|
-
var Slot = /* @__PURE__ */ createSlot("SelectContent.RemoveScroll");
|
|
19838
|
+
var Slot = /* @__PURE__ */ createSlot$1("SelectContent.RemoveScroll");
|
|
19632
19839
|
var SelectContentImpl = React$1.forwardRef(
|
|
19633
19840
|
(props, forwardedRef) => {
|
|
19634
19841
|
const {
|
|
@@ -20017,7 +20224,7 @@ var SelectItemAlignedPosition = React$1.forwardRef((props, forwardedRef) => {
|
|
|
20017
20224
|
zIndex: contentZIndex
|
|
20018
20225
|
},
|
|
20019
20226
|
children: /* @__PURE__ */ jsx(
|
|
20020
|
-
Primitive.div,
|
|
20227
|
+
Primitive$1.div,
|
|
20021
20228
|
{
|
|
20022
20229
|
...popperProps,
|
|
20023
20230
|
ref: composedRefs,
|
|
@@ -20091,7 +20298,7 @@ var SelectViewport = React$1.forwardRef(
|
|
|
20091
20298
|
}
|
|
20092
20299
|
),
|
|
20093
20300
|
/* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx(
|
|
20094
|
-
Primitive.div,
|
|
20301
|
+
Primitive$1.div,
|
|
20095
20302
|
{
|
|
20096
20303
|
"data-radix-select-viewport": "",
|
|
20097
20304
|
role: "presentation",
|
|
@@ -20146,7 +20353,7 @@ var SelectGroup = React$1.forwardRef(
|
|
|
20146
20353
|
(props, forwardedRef) => {
|
|
20147
20354
|
const { __scopeSelect, ...groupProps } = props;
|
|
20148
20355
|
const groupId = useId();
|
|
20149
|
-
return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
20356
|
+
return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive$1.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
20150
20357
|
}
|
|
20151
20358
|
);
|
|
20152
20359
|
SelectGroup.displayName = GROUP_NAME;
|
|
@@ -20155,7 +20362,7 @@ var SelectLabel$1 = React$1.forwardRef(
|
|
|
20155
20362
|
(props, forwardedRef) => {
|
|
20156
20363
|
const { __scopeSelect, ...labelProps } = props;
|
|
20157
20364
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
20158
|
-
return /* @__PURE__ */ jsx(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
20365
|
+
return /* @__PURE__ */ jsx(Primitive$1.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
20159
20366
|
}
|
|
20160
20367
|
);
|
|
20161
20368
|
SelectLabel$1.displayName = LABEL_NAME;
|
|
@@ -20214,7 +20421,7 @@ var SelectItem$1 = React$1.forwardRef(
|
|
|
20214
20421
|
disabled,
|
|
20215
20422
|
textValue,
|
|
20216
20423
|
children: /* @__PURE__ */ jsx(
|
|
20217
|
-
Primitive.div,
|
|
20424
|
+
Primitive$1.div,
|
|
20218
20425
|
{
|
|
20219
20426
|
role: "option",
|
|
20220
20427
|
"aria-labelledby": textId,
|
|
@@ -20302,7 +20509,7 @@ var SelectItemText = React$1.forwardRef(
|
|
|
20302
20509
|
return () => onNativeOptionRemove(nativeOption);
|
|
20303
20510
|
}, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
|
|
20304
20511
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20305
|
-
/* @__PURE__ */ jsx(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
|
|
20512
|
+
/* @__PURE__ */ jsx(Primitive$1.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
|
|
20306
20513
|
itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM.createPortal(itemTextProps.children, context.valueNode) : null
|
|
20307
20514
|
] });
|
|
20308
20515
|
}
|
|
@@ -20313,7 +20520,7 @@ var SelectItemIndicator = React$1.forwardRef(
|
|
|
20313
20520
|
(props, forwardedRef) => {
|
|
20314
20521
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
20315
20522
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
20316
|
-
return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
20523
|
+
return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive$1.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
20317
20524
|
}
|
|
20318
20525
|
);
|
|
20319
20526
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
@@ -20404,7 +20611,7 @@ var SelectScrollButtonImpl = React$1.forwardRef((props, forwardedRef) => {
|
|
|
20404
20611
|
(_a = activeItem == null ? void 0 : activeItem.ref.current) == null ? void 0 : _a.scrollIntoView({ block: "nearest" });
|
|
20405
20612
|
}, [getItems]);
|
|
20406
20613
|
return /* @__PURE__ */ jsx(
|
|
20407
|
-
Primitive.div,
|
|
20614
|
+
Primitive$1.div,
|
|
20408
20615
|
{
|
|
20409
20616
|
"aria-hidden": true,
|
|
20410
20617
|
...scrollIndicatorProps,
|
|
@@ -20432,7 +20639,7 @@ var SEPARATOR_NAME = "SelectSeparator";
|
|
|
20432
20639
|
var SelectSeparator$1 = React$1.forwardRef(
|
|
20433
20640
|
(props, forwardedRef) => {
|
|
20434
20641
|
const { __scopeSelect, ...separatorProps } = props;
|
|
20435
|
-
return /* @__PURE__ */ jsx(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
20642
|
+
return /* @__PURE__ */ jsx(Primitive$1.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
20436
20643
|
}
|
|
20437
20644
|
);
|
|
20438
20645
|
SelectSeparator$1.displayName = SEPARATOR_NAME;
|
|
@@ -20470,7 +20677,7 @@ var SelectBubbleInput = React$1.forwardRef(
|
|
|
20470
20677
|
}
|
|
20471
20678
|
}, [prevValue, value]);
|
|
20472
20679
|
return /* @__PURE__ */ jsx(
|
|
20473
|
-
Primitive.select,
|
|
20680
|
+
Primitive$1.select,
|
|
20474
20681
|
{
|
|
20475
20682
|
...props,
|
|
20476
20683
|
style: { ...VISUALLY_HIDDEN_STYLES, ...props.style },
|
|
@@ -20697,7 +20904,7 @@ const FontFamilyMenu = ({
|
|
|
20697
20904
|
applyFontFamily(value);
|
|
20698
20905
|
};
|
|
20699
20906
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Select, { value: selectedFont, onValueChange: handleFontChange, children: [
|
|
20700
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "!cteditor-h-7
|
|
20907
|
+
/* @__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
20908
|
/* @__PURE__ */ jsx(SelectContent, { children: fonts.map((font) => /* @__PURE__ */ jsx(SelectItem, { value: font, style: { fontFamily: font }, children: font }, font)) })
|
|
20702
20909
|
] }) });
|
|
20703
20910
|
};
|
|
@@ -20890,7 +21097,7 @@ const FormatTextMenu = ({ hasFormat, blockType }) => {
|
|
|
20890
21097
|
},
|
|
20891
21098
|
index2
|
|
20892
21099
|
)),
|
|
20893
|
-
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
21100
|
+
/* @__PURE__ */ jsx(DropdownMenuSeparator, { className: "!cteditor-bg-foreground/10" }),
|
|
20894
21101
|
listQuoteFormattingItems.map((option, index2) => /* @__PURE__ */ jsxs(
|
|
20895
21102
|
DropdownMenuItem$1,
|
|
20896
21103
|
{
|
|
@@ -21208,7 +21415,7 @@ const InsertFileUploadedDialogBody = ({ onClick }) => {
|
|
|
21208
21415
|
Input$1,
|
|
21209
21416
|
{
|
|
21210
21417
|
type: "file",
|
|
21211
|
-
className: "cteditor-w-full",
|
|
21418
|
+
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
21419
|
accept: ALLOWED_MIME_TYPES.join(","),
|
|
21213
21420
|
onChange: onChangeFile
|
|
21214
21421
|
}
|
|
@@ -21225,7 +21432,7 @@ const InsertFileUploadedDialogBody = ({ onClick }) => {
|
|
|
21225
21432
|
{
|
|
21226
21433
|
disabled: !fileToUpload || uploading,
|
|
21227
21434
|
onClick: handleConfirmUpload,
|
|
21228
|
-
className: "cteditor-mt-2",
|
|
21435
|
+
className: "cteditor-mt-2 cteditor-w-full",
|
|
21229
21436
|
children: uploading ? `Uploading... ${progress}%` : "Confirm Upload"
|
|
21230
21437
|
}
|
|
21231
21438
|
)
|
|
@@ -21241,8 +21448,7 @@ const InsertFileDialog = ({
|
|
|
21241
21448
|
};
|
|
21242
21449
|
return /* @__PURE__ */ jsx(Dialog, { open: true, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsxs(DialogContent, { className: "sm:cteditor-max-w-md", children: [
|
|
21243
21450
|
/* @__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" }) })
|
|
21451
|
+
/* @__PURE__ */ jsx("div", { className: "cteditor-py-2", children: /* @__PURE__ */ jsx(InsertFileUploadedDialogBody, { onClick }) })
|
|
21246
21452
|
] }) });
|
|
21247
21453
|
};
|
|
21248
21454
|
const INSERT_IMAGE_COMMAND = createCommand("INSERT_IMAGE_COMMAND");
|
|
@@ -21322,49 +21528,28 @@ const InsertImageUploadedDialogBody = ({
|
|
|
21322
21528
|
}
|
|
21323
21529
|
};
|
|
21324
21530
|
return /* @__PURE__ */ jsxs("div", { className: "cteditor-space-y-4", children: [
|
|
21325
|
-
tempSrc && /* @__PURE__ */ jsx("div", { className: "cteditor-mb-4", children: /* @__PURE__ */ jsx(
|
|
21531
|
+
tempSrc && /* @__PURE__ */ jsx("div", { className: "cteditor-mb-4 cteditor-flex cteditor-justify-center", children: /* @__PURE__ */ jsx(
|
|
21326
21532
|
"img",
|
|
21327
21533
|
{
|
|
21328
21534
|
src: tempSrc,
|
|
21329
21535
|
alt: "Preview",
|
|
21330
|
-
className: "cteditor-max-w-full cteditor-max-h-
|
|
21536
|
+
className: "cteditor-max-w-full cteditor-max-h-44 cteditor-object-contain"
|
|
21331
21537
|
}
|
|
21332
21538
|
) }),
|
|
21333
|
-
/* @__PURE__ */
|
|
21334
|
-
/* @__PURE__ */ jsx("
|
|
21335
|
-
|
|
21539
|
+
/* @__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: [
|
|
21540
|
+
/* @__PURE__ */ jsx(Label$2, { htmlFor: "image-upload", className: "!cteditor-sr-only", children: "Upload Image" }),
|
|
21541
|
+
/* @__PURE__ */ jsx(
|
|
21542
|
+
Input$1,
|
|
21336
21543
|
{
|
|
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
|
-
]
|
|
21544
|
+
id: "image-upload",
|
|
21545
|
+
type: "file",
|
|
21546
|
+
accept: "image/*",
|
|
21547
|
+
onChange: onChangeImage,
|
|
21548
|
+
"data-test-id": "image-modal-file-upload",
|
|
21549
|
+
className: "cteditor-w-full !cteditor-py-3 !cteditor-h-auto !cteditor-border-none"
|
|
21351
21550
|
}
|
|
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
|
-
] }),
|
|
21551
|
+
)
|
|
21552
|
+
] }) }),
|
|
21368
21553
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
21369
21554
|
/* @__PURE__ */ jsx(Label$2, { htmlFor: "alt-text", className: "cteditor-mb-2 cteditor-block", children: "Alt Text" }),
|
|
21370
21555
|
/* @__PURE__ */ jsx(
|
|
@@ -21375,7 +21560,7 @@ const InsertImageUploadedDialogBody = ({
|
|
|
21375
21560
|
value: altText,
|
|
21376
21561
|
onChange: (e) => setAltText(e.target.value),
|
|
21377
21562
|
"data-test-id": "image-modal-alt-text-input",
|
|
21378
|
-
className: "cteditor-w-full"
|
|
21563
|
+
className: "cteditor-w-full cteditor-cursor-pointer"
|
|
21379
21564
|
}
|
|
21380
21565
|
)
|
|
21381
21566
|
] }),
|
|
@@ -21566,8 +21751,7 @@ const InsertImageDialog = ({ activeEditor, onClose }) => {
|
|
|
21566
21751
|
]
|
|
21567
21752
|
}
|
|
21568
21753
|
)
|
|
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" }) })
|
|
21754
|
+
] }) : mode === "file" ? /* @__PURE__ */ jsx(InsertImageUploadedDialogBody, { onClick }) : /* @__PURE__ */ jsx(InsertImageUrlDialogBody, { onClick })
|
|
21571
21755
|
] }) });
|
|
21572
21756
|
};
|
|
21573
21757
|
function _extends() {
|
|
@@ -22497,30 +22681,33 @@ const SignatureCanvasDialog = ({
|
|
|
22497
22681
|
return /* @__PURE__ */ jsx(Dialog, { open: true, onOpenChange: () => onClose(), children: /* @__PURE__ */ jsxs(DialogContent, { className: "!cteditor-max-w-3xl", children: [
|
|
22498
22682
|
/* @__PURE__ */ jsxs("div", { className: "cteditor-space-y-4", children: [
|
|
22499
22683
|
/* @__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
|
-
|
|
22684
|
+
/* @__PURE__ */ jsxs("div", { className: "cteditor-flex cteditor-justify-between cteditor-gap-3 cteditor-items-center", children: [
|
|
22685
|
+
/* @__PURE__ */ jsxs("div", { className: "cteditor-flex cteditor-gap-2 cteditor-items-center", children: [
|
|
22686
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "penColor", children: "Choose Color:" }),
|
|
22687
|
+
/* @__PURE__ */ jsx("div", { className: "cteditor-size-8 cteditor-overflow-hidden cteditor-relative cteditor-rounded-md cteditor-border cteditor-border-foreground/5", children: /* @__PURE__ */ jsx(
|
|
22688
|
+
"input",
|
|
22689
|
+
{
|
|
22690
|
+
type: "color",
|
|
22691
|
+
id: "penColor",
|
|
22692
|
+
value: penColor,
|
|
22693
|
+
onChange: handleColorChange,
|
|
22694
|
+
className: "cteditor-scale-[5] cteditor-absolute cteditor-inset-0 cteditor-cursor-pointer"
|
|
22695
|
+
}
|
|
22696
|
+
) })
|
|
22697
|
+
] }),
|
|
22698
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
22699
|
+
/* @__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" }),
|
|
22700
|
+
/* @__PURE__ */ jsx(
|
|
22701
|
+
"input",
|
|
22702
|
+
{
|
|
22703
|
+
type: "file",
|
|
22704
|
+
id: "uploadSignature",
|
|
22705
|
+
accept: "image/*",
|
|
22706
|
+
onChange: handleUpload,
|
|
22707
|
+
className: "cteditor-hidden"
|
|
22708
|
+
}
|
|
22709
|
+
)
|
|
22710
|
+
] })
|
|
22524
22711
|
] }),
|
|
22525
22712
|
/* @__PURE__ */ jsx("div", { className: "cteditor-border cteditor-border-gray-300 cteditor-rounded-sm cteditor-bg-white", children: /* @__PURE__ */ jsx(
|
|
22526
22713
|
SignatureCanvas,
|
|
@@ -22782,14 +22969,14 @@ const InsertMenuDrop = () => {
|
|
|
22782
22969
|
}
|
|
22783
22970
|
];
|
|
22784
22971
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22785
|
-
/* @__PURE__ */ jsx("div", { className: "cteditor-flex cteditor-flex-col
|
|
22972
|
+
/* @__PURE__ */ jsx("div", { className: "cteditor-flex cteditor-flex-col", children: insertMenuItems.map((option, index2) => /* @__PURE__ */ jsxs(
|
|
22786
22973
|
"button",
|
|
22787
22974
|
{
|
|
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
|
|
22975
|
+
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
22976
|
onClick: option.onClick,
|
|
22790
22977
|
title: option.name,
|
|
22791
22978
|
children: [
|
|
22792
|
-
/* @__PURE__ */ jsx("span", { className: "[&>svg]:cteditor-size-4", children: option.icon }),
|
|
22979
|
+
/* @__PURE__ */ jsx("span", { className: "cteditor-size-6 [&>svg]:cteditor-size-4 cteditor-flex cteditor-justify-center cteditor-items-center", children: option.icon }),
|
|
22793
22980
|
/* @__PURE__ */ jsx("span", { children: option.name })
|
|
22794
22981
|
]
|
|
22795
22982
|
},
|
|
@@ -22806,7 +22993,7 @@ const AlignMenuDrop = () => {
|
|
|
22806
22993
|
onClick: () => {
|
|
22807
22994
|
editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, option.payload);
|
|
22808
22995
|
},
|
|
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",
|
|
22996
|
+
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
22997
|
title: option.name,
|
|
22811
22998
|
children: [
|
|
22812
22999
|
/* @__PURE__ */ jsx("span", { className: "[&>svg]:cteditor-size-4", children: option.icon }),
|
|
@@ -22816,6 +23003,99 @@ const AlignMenuDrop = () => {
|
|
|
22816
23003
|
index2
|
|
22817
23004
|
)) });
|
|
22818
23005
|
};
|
|
23006
|
+
const FormatTextMenuDrop = ({ hasFormat, blockType }) => {
|
|
23007
|
+
const [editor] = useLexicalComposerContext();
|
|
23008
|
+
const textFormats = [
|
|
23009
|
+
"bold",
|
|
23010
|
+
"italic",
|
|
23011
|
+
"strikethrough",
|
|
23012
|
+
"underline",
|
|
23013
|
+
"code",
|
|
23014
|
+
"subscript",
|
|
23015
|
+
"superscript"
|
|
23016
|
+
];
|
|
23017
|
+
const handleFormatClick = (payload) => {
|
|
23018
|
+
if (textFormats.includes(payload)) {
|
|
23019
|
+
editor.dispatchCommand(FORMAT_TEXT_COMMAND, payload);
|
|
23020
|
+
return;
|
|
23021
|
+
}
|
|
23022
|
+
editor.update(() => {
|
|
23023
|
+
const selection = $getSelection();
|
|
23024
|
+
if (!$isRangeSelection(selection))
|
|
23025
|
+
return;
|
|
23026
|
+
switch (payload) {
|
|
23027
|
+
case "bullet":
|
|
23028
|
+
if (blockType !== "bullet") {
|
|
23029
|
+
editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, void 0);
|
|
23030
|
+
} else {
|
|
23031
|
+
editor.dispatchCommand(REMOVE_LIST_COMMAND, void 0);
|
|
23032
|
+
}
|
|
23033
|
+
break;
|
|
23034
|
+
case "number":
|
|
23035
|
+
if (blockType !== "number") {
|
|
23036
|
+
editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, void 0);
|
|
23037
|
+
} else {
|
|
23038
|
+
editor.dispatchCommand(REMOVE_LIST_COMMAND, void 0);
|
|
23039
|
+
}
|
|
23040
|
+
break;
|
|
23041
|
+
case "check":
|
|
23042
|
+
if (blockType !== "check") {
|
|
23043
|
+
editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, void 0);
|
|
23044
|
+
} else {
|
|
23045
|
+
editor.dispatchCommand(REMOVE_LIST_COMMAND, void 0);
|
|
23046
|
+
}
|
|
23047
|
+
break;
|
|
23048
|
+
case "quote":
|
|
23049
|
+
$setBlocksType(selection, () => $createQuoteNode());
|
|
23050
|
+
break;
|
|
23051
|
+
}
|
|
23052
|
+
});
|
|
23053
|
+
};
|
|
23054
|
+
const textFormattingItems = formatMenuItems.filter(
|
|
23055
|
+
(item) => textFormats.includes(item.payload)
|
|
23056
|
+
);
|
|
23057
|
+
const listQuoteFormattingItems = formatMenuItems.filter(
|
|
23058
|
+
(item) => !textFormats.includes(item.payload)
|
|
23059
|
+
);
|
|
23060
|
+
return /* @__PURE__ */ jsxs("div", { className: "cteditor-flex cteditor-flex-col cteditor-w-full", children: [
|
|
23061
|
+
textFormattingItems.map((option, index2) => /* @__PURE__ */ jsxs(
|
|
23062
|
+
Button,
|
|
23063
|
+
{
|
|
23064
|
+
variant: "ghost",
|
|
23065
|
+
size: "sm",
|
|
23066
|
+
className: cn$1(
|
|
23067
|
+
"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 ",
|
|
23068
|
+
hasFormat[option.payload] && "cteditor-bg-accent"
|
|
23069
|
+
),
|
|
23070
|
+
onClick: () => handleFormatClick(option.payload),
|
|
23071
|
+
title: option.name,
|
|
23072
|
+
children: [
|
|
23073
|
+
/* @__PURE__ */ jsx("span", { className: "[&>svg]:cteditor-size-4", children: option.icon }),
|
|
23074
|
+
/* @__PURE__ */ jsx("span", { children: option.name })
|
|
23075
|
+
]
|
|
23076
|
+
},
|
|
23077
|
+
index2
|
|
23078
|
+
)),
|
|
23079
|
+
listQuoteFormattingItems.map((option, index2) => /* @__PURE__ */ jsxs(
|
|
23080
|
+
Button,
|
|
23081
|
+
{
|
|
23082
|
+
variant: "ghost",
|
|
23083
|
+
size: "sm",
|
|
23084
|
+
className: cn$1(
|
|
23085
|
+
"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",
|
|
23086
|
+
blockType === option.payload && "cteditor-bg-accent"
|
|
23087
|
+
),
|
|
23088
|
+
onClick: () => handleFormatClick(option.payload),
|
|
23089
|
+
title: option.name,
|
|
23090
|
+
children: [
|
|
23091
|
+
/* @__PURE__ */ jsx("span", { className: "[&>svg]:cteditor-size-4", children: option.icon }),
|
|
23092
|
+
/* @__PURE__ */ jsx("span", { children: option.name })
|
|
23093
|
+
]
|
|
23094
|
+
},
|
|
23095
|
+
`list-quote-${index2}`
|
|
23096
|
+
))
|
|
23097
|
+
] });
|
|
23098
|
+
};
|
|
22819
23099
|
const Toolbar = ({
|
|
22820
23100
|
editable,
|
|
22821
23101
|
enableUndoRedo = true,
|
|
@@ -23246,7 +23526,7 @@ const Toolbar = ({
|
|
|
23246
23526
|
"div",
|
|
23247
23527
|
{
|
|
23248
23528
|
ref: contentRef,
|
|
23249
|
-
className: "cteditor-flex cteditor-items-center cteditor-gap-1.5
|
|
23529
|
+
className: "cteditor-flex cteditor-items-center cteditor-gap-1.5 cteditor-overflow-x-auto cteditor-overflow-y-hidden cteditor-flex-nowrap no-scrollbar",
|
|
23250
23530
|
style: {
|
|
23251
23531
|
scrollBehavior: "smooth",
|
|
23252
23532
|
WebkitOverflowScrolling: "touch"
|
|
@@ -23420,8 +23700,10 @@ const Toolbar = ({
|
|
|
23420
23700
|
) }),
|
|
23421
23701
|
/* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsx("p", { children: "Insert code block" }) })
|
|
23422
23702
|
] }) }),
|
|
23423
|
-
enableFormatTextMenu && activeEditor === editor && /* @__PURE__ */
|
|
23424
|
-
|
|
23703
|
+
enableFormatTextMenu && activeEditor === editor && /* @__PURE__ */ jsxs("div", { "data-toolbar-item": "formatTextMenu", className: "cteditor-size-6", children: [
|
|
23704
|
+
/* @__PURE__ */ jsx(FormatTextMenu, { hasFormat, blockType }),
|
|
23705
|
+
/* @__PURE__ */ jsx(Separator$2, { orientation: "vertical", className: "!cteditor-h-7" })
|
|
23706
|
+
] }),
|
|
23425
23707
|
enableColorPicker && activeEditor === editor && /* @__PURE__ */ jsxs(
|
|
23426
23708
|
"div",
|
|
23427
23709
|
{
|
|
@@ -23458,8 +23740,7 @@ const Toolbar = ({
|
|
|
23458
23740
|
}
|
|
23459
23741
|
},
|
|
23460
23742
|
"bg-color-picker"
|
|
23461
|
-
) })
|
|
23462
|
-
/* @__PURE__ */ jsx(Separator$2, { orientation: "vertical", className: "!cteditor-h-7" })
|
|
23743
|
+
) })
|
|
23463
23744
|
]
|
|
23464
23745
|
}
|
|
23465
23746
|
),
|
|
@@ -23472,7 +23753,7 @@ const Toolbar = ({
|
|
|
23472
23753
|
size: "icon-sm",
|
|
23473
23754
|
onClick: insertLink,
|
|
23474
23755
|
className: cn$1(
|
|
23475
|
-
isLinkActive ? "
|
|
23756
|
+
isLinkActive ? "cteditor-bg-accent" : "cteditor-text-foreground"
|
|
23476
23757
|
),
|
|
23477
23758
|
children: /* @__PURE__ */ jsx(LinkIcon, {})
|
|
23478
23759
|
}
|
|
@@ -23548,8 +23829,8 @@ const Toolbar = ({
|
|
|
23548
23829
|
disabled: !editable,
|
|
23549
23830
|
className: cn$1(
|
|
23550
23831
|
classes.toolbarButton,
|
|
23551
|
-
toolbarState.isAutocompleteEnabled && "
|
|
23552
|
-
"[&>svg]:!cteditor-size-4"
|
|
23832
|
+
toolbarState.isAutocompleteEnabled && "",
|
|
23833
|
+
"[&>svg]:!cteditor-size-4 p-1"
|
|
23553
23834
|
),
|
|
23554
23835
|
children: /* @__PURE__ */ jsx(SearchTextIcon2, {})
|
|
23555
23836
|
}
|
|
@@ -23588,7 +23869,7 @@ const Toolbar = ({
|
|
|
23588
23869
|
className: "cteditor-relative",
|
|
23589
23870
|
children: [
|
|
23590
23871
|
isExportingPDF ? /* @__PURE__ */ jsx(Loader2, { className: "!cteditor-size-4 cteditor-animate-spin" }) : /* @__PURE__ */ jsx(Download, { className: "!cteditor-size-4" }),
|
|
23591
|
-
/* @__PURE__ */ jsx("span", {
|
|
23872
|
+
/* @__PURE__ */ jsx("span", { children: isExportingPDF ? `Exporting... ${exportProgress}%` : "Export" })
|
|
23592
23873
|
]
|
|
23593
23874
|
}
|
|
23594
23875
|
) }),
|
|
@@ -23600,7 +23881,7 @@ const Toolbar = ({
|
|
|
23600
23881
|
{
|
|
23601
23882
|
variant: "outline",
|
|
23602
23883
|
size: "sm",
|
|
23603
|
-
className: "cteditor-px-4 cteditor-gap-
|
|
23884
|
+
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
23885
|
children: [
|
|
23605
23886
|
/* @__PURE__ */ jsx(MagicoonIcon, {}),
|
|
23606
23887
|
" Go with AI"
|
|
@@ -23705,7 +23986,7 @@ const Toolbar = ({
|
|
|
23705
23986
|
open: isMoreMenuOpen,
|
|
23706
23987
|
onOpenChange: setIsMoreMenuOpen,
|
|
23707
23988
|
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: [
|
|
23989
|
+
/* @__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
23990
|
/* @__PURE__ */ jsx(Plus, { className: "!cteditor-size-5" }),
|
|
23710
23991
|
/* @__PURE__ */ jsx(ChevronDown, { className: "!cteditor-size-3.5" })
|
|
23711
23992
|
] }) }),
|
|
@@ -23776,33 +24057,32 @@ const Toolbar = ({
|
|
|
23776
24057
|
children: /* @__PURE__ */ jsx(
|
|
23777
24058
|
"div",
|
|
23778
24059
|
{
|
|
23779
|
-
className: "cteditor-w-full",
|
|
24060
|
+
className: "cteditor-w-full ",
|
|
23780
24061
|
onClick: (e) => e.stopPropagation(),
|
|
23781
24062
|
children: /* @__PURE__ */ jsx(FontSizeControl, {})
|
|
23782
24063
|
}
|
|
23783
24064
|
)
|
|
23784
24065
|
}
|
|
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, {})
|
|
24066
|
+
)
|
|
23805
24067
|
] }),
|
|
24068
|
+
enableTableOptions && activeEditor === editor && hiddenItemIds.has("tableOptions") && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
24069
|
+
DropdownMenuItem$1,
|
|
24070
|
+
{
|
|
24071
|
+
asChild: true,
|
|
24072
|
+
onSelect: (e) => e.preventDefault(),
|
|
24073
|
+
children: /* @__PURE__ */ jsxs(
|
|
24074
|
+
"div",
|
|
24075
|
+
{
|
|
24076
|
+
className: "cteditor-w-full",
|
|
24077
|
+
onClick: (e) => e.stopPropagation(),
|
|
24078
|
+
children: [
|
|
24079
|
+
/* @__PURE__ */ jsx(TableOptionPlugin, {}),
|
|
24080
|
+
"Table"
|
|
24081
|
+
]
|
|
24082
|
+
}
|
|
24083
|
+
)
|
|
24084
|
+
}
|
|
24085
|
+
) }),
|
|
23806
24086
|
enableTextFormatting && hiddenItemIds.has("inlineFormats") && /* @__PURE__ */ jsxs(
|
|
23807
24087
|
DropdownMenuItem$1,
|
|
23808
24088
|
{
|
|
@@ -23811,33 +24091,22 @@ const Toolbar = ({
|
|
|
23811
24091
|
"strikethrough"
|
|
23812
24092
|
),
|
|
23813
24093
|
children: [
|
|
23814
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
24094
|
+
/* @__PURE__ */ jsx("div", { className: "[&>svg]:!cteditor-size-6", children: /* @__PURE__ */ jsx(StrikethroughIcon, {}) }),
|
|
23815
24095
|
"Strikethrough"
|
|
23816
24096
|
]
|
|
23817
24097
|
}
|
|
23818
24098
|
),
|
|
23819
24099
|
enableCodeFormat && activeEditor === editor && hiddenItemIds.has("codeBlock") && /* @__PURE__ */ jsxs(DropdownMenuItem$1, { onClick: formatCodeBlock, children: [
|
|
23820
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
24100
|
+
/* @__PURE__ */ jsx("div", { className: " [&>svg]:!cteditor-size-6", children: /* @__PURE__ */ jsx(CodeIcon, {}) }),
|
|
23821
24101
|
"Code Block"
|
|
23822
24102
|
] }),
|
|
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
|
-
),
|
|
24103
|
+
enableFormatTextMenu && activeEditor === editor && hiddenItemIds.has("formatTextMenu") && /* @__PURE__ */ jsxs("div", { className: "cteditor-w-full cteditor-pt-1", children: [
|
|
24104
|
+
/* @__PURE__ */ jsx("div", { className: "cteditor-text-xs cteditor-font-medium cteditor-mb-1 cteditor-opacity-60 cteditor-px-2", children: "Format" }),
|
|
24105
|
+
/* @__PURE__ */ jsx(FormatTextMenuDrop, { hasFormat, blockType }),
|
|
24106
|
+
/* @__PURE__ */ jsx(DropdownMenuSeparator, { className: "!cteditor-bg-foreground/10" })
|
|
24107
|
+
] }),
|
|
23838
24108
|
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: [
|
|
24109
|
+
/* @__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
24110
|
/* @__PURE__ */ jsx(
|
|
23842
24111
|
ColorPicker$2,
|
|
23843
24112
|
{
|
|
@@ -23864,7 +24133,7 @@ const Toolbar = ({
|
|
|
23864
24133
|
),
|
|
23865
24134
|
/* @__PURE__ */ jsx("span", { className: "cteditor-flex-1 cteditor-text-xs", children: "Font Color" })
|
|
23866
24135
|
] }),
|
|
23867
|
-
/* @__PURE__ */ jsxs("div", { className: "cteditor-w-full cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-px-2 cteditor-py-1.5", children: [
|
|
24136
|
+
/* @__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
24137
|
/* @__PURE__ */ jsx(
|
|
23869
24138
|
ColorPicker$2,
|
|
23870
24139
|
{
|
|
@@ -23926,7 +24195,7 @@ const Toolbar = ({
|
|
|
23926
24195
|
)
|
|
23927
24196
|
}
|
|
23928
24197
|
),
|
|
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: [
|
|
24198
|
+
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
24199
|
/* @__PURE__ */ jsx(
|
|
23931
24200
|
HighlightColorPicker,
|
|
23932
24201
|
{
|
|
@@ -23939,108 +24208,119 @@ const Toolbar = ({
|
|
|
23939
24208
|
),
|
|
23940
24209
|
/* @__PURE__ */ jsx("span", { className: "cteditor-flex-1 cteditor-text-sm", children: "Highlight" })
|
|
23941
24210
|
] }) }),
|
|
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" }),
|
|
24211
|
+
enableAlignment && activeEditor === editor && hiddenItemIds.has("alignMenu") && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "cteditor-w-full cteditor-pt-2", children: [
|
|
24212
|
+
/* @__PURE__ */ jsx("div", { className: "cteditor-text-xs cteditor-font-medium cteditor-mb-1 cteditor-opacity-60 cteditor-px-2", children: "Align Menu" }),
|
|
23944
24213
|
/* @__PURE__ */ jsx(AlignMenuDrop, {})
|
|
23945
24214
|
] }) }),
|
|
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" })
|
|
24215
|
+
hiddenItemIds.has("aiOptions") && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "cteditor-w-full", children: [
|
|
24216
|
+
/* @__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" }),
|
|
24217
|
+
/* @__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: [
|
|
24218
|
+
/* @__PURE__ */ jsxs(
|
|
24219
|
+
"button",
|
|
24220
|
+
{
|
|
24221
|
+
onClick: () => editor.dispatchCommand(AI_ACTION_COMMAND, {
|
|
24222
|
+
type: "SPELLING_GRAMMAR"
|
|
24223
|
+
}),
|
|
24224
|
+
className: "cteditor-w-full cteditor-justify-start cteditor-gap-2",
|
|
24225
|
+
children: [
|
|
24226
|
+
/* @__PURE__ */ jsx("div", { className: "[&>svg]:cteditor-size-5 cteditor-size-6 cteditor-flex cteditor-justify-center cteditor-items-center", children: /* @__PURE__ */ jsx(SearchTextIcon, {}) }),
|
|
24227
|
+
"Fix Grammar"
|
|
24228
|
+
]
|
|
24229
|
+
}
|
|
24230
|
+
),
|
|
24231
|
+
/* @__PURE__ */ jsxs(
|
|
24232
|
+
"button",
|
|
24233
|
+
{
|
|
24234
|
+
onClick: () => editor.dispatchCommand(AI_ACTION_COMMAND, {
|
|
24235
|
+
type: "SIMPLIFY"
|
|
24236
|
+
}),
|
|
24237
|
+
className: "cteditor-w-full cteditor-justify-start cteditor-gap-2",
|
|
24238
|
+
children: [
|
|
24239
|
+
/* @__PURE__ */ jsx("div", { className: "[&>svg]:cteditor-size-5 cteditor-size-6 cteditor-flex cteditor-justify-center cteditor-items-center", children: /* @__PURE__ */ jsx(PenLineIcon, {}) }),
|
|
24240
|
+
"Simplify"
|
|
24241
|
+
]
|
|
24242
|
+
}
|
|
24243
|
+
),
|
|
24244
|
+
/* @__PURE__ */ jsxs(
|
|
24245
|
+
"button",
|
|
24246
|
+
{
|
|
24247
|
+
onClick: () => editor.dispatchCommand(AI_ACTION_COMMAND, {
|
|
24248
|
+
type: "COMPLETE_SENTENCE"
|
|
24249
|
+
}),
|
|
24250
|
+
className: "cteditor-w-full cteditor-justify-start cteditor-gap-2",
|
|
24251
|
+
children: [
|
|
24252
|
+
/* @__PURE__ */ jsx("div", { className: "[&>svg]:cteditor-size-5 cteditor-size-6 cteditor-flex cteditor-justify-center cteditor-items-center", children: /* @__PURE__ */ jsx(MenuAltIcon, {}) }),
|
|
24253
|
+
"Complete Sentence"
|
|
24254
|
+
]
|
|
24255
|
+
}
|
|
24256
|
+
),
|
|
24257
|
+
/* @__PURE__ */ jsxs(
|
|
24258
|
+
"button",
|
|
24259
|
+
{
|
|
24260
|
+
onClick: () => editor.dispatchCommand(AI_ACTION_COMMAND, {
|
|
24261
|
+
type: "EMOJIFY"
|
|
24262
|
+
}),
|
|
24263
|
+
className: "cteditor-w-full cteditor-justify-start cteditor-gap-2",
|
|
24264
|
+
children: [
|
|
24265
|
+
/* @__PURE__ */ jsx("div", { className: "[&>svg]:cteditor-size-5 cteditor-size-6 cteditor-flex cteditor-justify-center cteditor-items-center", children: /* @__PURE__ */ jsx(FaceSmileIcon2, {}) }),
|
|
24266
|
+
"Emojify"
|
|
24267
|
+
]
|
|
24268
|
+
}
|
|
24269
|
+
),
|
|
24270
|
+
/* @__PURE__ */ jsxs(
|
|
24271
|
+
"button",
|
|
24272
|
+
{
|
|
24273
|
+
onClick: () => editor.dispatchCommand(AI_ACTION_COMMAND, {
|
|
24274
|
+
type: "TRANSLATE"
|
|
24275
|
+
}),
|
|
24276
|
+
className: "cteditor-w-full cteditor-justify-start cteditor-gap-2",
|
|
24277
|
+
children: [
|
|
24278
|
+
/* @__PURE__ */ jsx("div", { className: "[&>svg]:cteditor-size-5 cteditor-size-6 cteditor-flex cteditor-justify-center cteditor-items-center", children: /* @__PURE__ */ jsx(TranslateIcon, {}) }),
|
|
24279
|
+
"Translate"
|
|
24280
|
+
]
|
|
24281
|
+
}
|
|
24282
|
+
),
|
|
24283
|
+
/* @__PURE__ */ jsxs(
|
|
24284
|
+
"button",
|
|
24285
|
+
{
|
|
24286
|
+
onClick: () => editor.dispatchCommand(AI_ACTION_COMMAND, {
|
|
24287
|
+
type: "AI_RESPONSE"
|
|
24288
|
+
}),
|
|
24289
|
+
className: "cteditor-w-full cteditor-justify-start cteditor-gap-2",
|
|
24290
|
+
children: [
|
|
24291
|
+
/* @__PURE__ */ jsx("div", { className: "[&>svg]:cteditor-size-5 cteditor-size-6 cteditor-flex cteditor-justify-center cteditor-items-center", children: /* @__PURE__ */ jsx(SparkleIcon, {}) }),
|
|
24292
|
+
"AI"
|
|
24293
|
+
]
|
|
24294
|
+
}
|
|
24295
|
+
),
|
|
24296
|
+
/* @__PURE__ */ jsxs(
|
|
24297
|
+
"button",
|
|
24298
|
+
{
|
|
24299
|
+
onClick: () => editor.dispatchCommand(AI_IMAGE_COMMAND, {
|
|
24300
|
+
type: "CREATE_IMAGE"
|
|
24301
|
+
}),
|
|
24302
|
+
className: "cteditor-w-full cteditor-justify-start cteditor-gap-2",
|
|
24303
|
+
children: [
|
|
24304
|
+
/* @__PURE__ */ jsx("div", { className: "[&>svg]:cteditor-size-5 cteditor-size-6 cteditor-flex cteditor-justify-center cteditor-items-center", children: /* @__PURE__ */ jsx(ImageIcon, {}) }),
|
|
24305
|
+
"Generate Image"
|
|
24306
|
+
]
|
|
24307
|
+
}
|
|
24308
|
+
)
|
|
24309
|
+
] })
|
|
24310
|
+
] }) }),
|
|
24311
|
+
(enableHtmlViewToggle || enableHtmlView) && hiddenItemIds.has("htmlView") && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24312
|
+
/* @__PURE__ */ jsx(DropdownMenuSeparator, { className: "!cteditor-bg-foreground/10" }),
|
|
24313
|
+
/* @__PURE__ */ jsxs(
|
|
24314
|
+
DropdownMenuItem$1,
|
|
24315
|
+
{
|
|
24316
|
+
onClick: toggleHtmlView,
|
|
24317
|
+
disabled: !editable,
|
|
24318
|
+
children: [
|
|
24319
|
+
/* @__PURE__ */ jsx("div", { className: "[&>svg]:!cteditor-size-4 cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center", children: /* @__PURE__ */ jsx(FileCode2, {}) }),
|
|
24320
|
+
isHtmlView ? "Switch to Editor View" : "Switch to HTML View"
|
|
24321
|
+
]
|
|
24322
|
+
}
|
|
24323
|
+
)
|
|
24044
24324
|
] }),
|
|
24045
24325
|
enableAutocompleteToggle && hiddenItemIds.has("autocomplete") && /* @__PURE__ */ jsxs(
|
|
24046
24326
|
DropdownMenuItem$1,
|
|
@@ -24052,17 +24332,6 @@ const Toolbar = ({
|
|
|
24052
24332
|
toolbarState.isAutocompleteEnabled ? "Disable Autocorrection" : "Enable Autocorrection"
|
|
24053
24333
|
]
|
|
24054
24334
|
}
|
|
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
24335
|
)
|
|
24067
24336
|
]
|
|
24068
24337
|
}
|
|
@@ -24980,7 +25249,7 @@ function CombinedAutocompleteGrammarPlugin({
|
|
|
24980
25249
|
Card,
|
|
24981
25250
|
{
|
|
24982
25251
|
ref: menuRef,
|
|
24983
|
-
className: "cteditor-w-
|
|
25252
|
+
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
25253
|
children: [
|
|
24985
25254
|
/* @__PURE__ */ jsxs("div", { className: "cteditor-flex cteditor-border-b cteditor-bg-muted/30", children: [
|
|
24986
25255
|
/* @__PURE__ */ jsxs(
|
|
@@ -26260,19 +26529,15 @@ function FloatingLinkEditor({
|
|
|
26260
26529
|
"div",
|
|
26261
26530
|
{
|
|
26262
26531
|
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
|
-
},
|
|
26532
|
+
className: "link-editor cteditor-border cteditor-border-background/20 cteditor-rounded-md cteditor-shadow-2xl cteditor-overflow-hidden cteditor-backdrop-blur-sm",
|
|
26268
26533
|
children: shouldShowEditMode ? (
|
|
26269
26534
|
// EDIT MODE - Input to edit URL
|
|
26270
|
-
/* @__PURE__ */ jsxs("div", { className: "cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-p-
|
|
26535
|
+
/* @__PURE__ */ jsxs("div", { className: "cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-p-1 cteditor-w-full", children: [
|
|
26271
26536
|
/* @__PURE__ */ jsx("div", { className: "cteditor-flex-1", children: /* @__PURE__ */ jsx(
|
|
26272
26537
|
"input",
|
|
26273
26538
|
{
|
|
26274
26539
|
ref: inputRef,
|
|
26275
|
-
className: "link-input cteditor-w-full cteditor-px-4 cteditor-py-2.5 cteditor-text-sm cteditor-border cteditor-border-
|
|
26540
|
+
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
26541
|
value: editedLinkUrl,
|
|
26277
26542
|
placeholder: "Enter URL (e.g., https://example.com)",
|
|
26278
26543
|
onChange: (event) => setEditedLinkUrl(event.target.value),
|
|
@@ -26291,7 +26556,7 @@ function FloatingLinkEditor({
|
|
|
26291
26556
|
/* @__PURE__ */ jsx(
|
|
26292
26557
|
"button",
|
|
26293
26558
|
{
|
|
26294
|
-
className: "cteditor-p-2.5 cteditor-rounded-lg cteditor-bg-
|
|
26559
|
+
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
26560
|
onClick: handleLinkSubmission,
|
|
26296
26561
|
title: "Save link",
|
|
26297
26562
|
children: /* @__PURE__ */ jsx(Check, { className: "cteditor-size-4" })
|
|
@@ -26300,7 +26565,7 @@ function FloatingLinkEditor({
|
|
|
26300
26565
|
/* @__PURE__ */ jsx(
|
|
26301
26566
|
"button",
|
|
26302
26567
|
{
|
|
26303
|
-
className: "cteditor-p-2.5 cteditor-rounded-lg cteditor-bg-
|
|
26568
|
+
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
26569
|
onClick: () => {
|
|
26305
26570
|
setIsLinkEditMode(false);
|
|
26306
26571
|
setShowUrlView(true);
|
|
@@ -29710,7 +29975,7 @@ const useStyles = () => ({
|
|
|
29710
29975
|
contentEditable: cn$1(
|
|
29711
29976
|
"cteditor-relative cteditor-min-h-[150px] !cteditor-h-auto cteditor-resize-none cteditor-outline-0",
|
|
29712
29977
|
// Ensure strong contrast in both themes
|
|
29713
|
-
"cteditor-text-black dark:cteditor-text-white
|
|
29978
|
+
"cteditor-text-black dark:cteditor-text-white ",
|
|
29714
29979
|
// Caret and spacing
|
|
29715
29980
|
"cteditor-caret-[#3b82f6] cteditor-p-0 cteditor-transition-all cteditor-duration-200",
|
|
29716
29981
|
"cteditor-w-full ",
|
|
@@ -29881,7 +30146,7 @@ const ConfigurableEditor = ({
|
|
|
29881
30146
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(CommentProvider, { children: /* @__PURE__ */ jsxs(LexicalComposer, { initialConfig: editorInitialConfig, children: [
|
|
29882
30147
|
/* @__PURE__ */ jsx(HtmlViewProvider, { children: /* @__PURE__ */ jsxs(ToolbarContext, { children: [
|
|
29883
30148
|
/* @__PURE__ */ jsxs(Stack, { children: [
|
|
29884
|
-
config.enableToolbar && /* @__PURE__ */ jsxs("div", { className: "cteditor-flex cteditor-justify-between cteditor-items-center cteditor-mb-4", children: [
|
|
30149
|
+
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
30150
|
/* @__PURE__ */ jsx(
|
|
29886
30151
|
ToolbarWithEditor,
|
|
29887
30152
|
{
|
|
@@ -30000,7 +30265,7 @@ const ScopedEditorWrapper = ({
|
|
|
30000
30265
|
className = "",
|
|
30001
30266
|
darkMode = false
|
|
30002
30267
|
}) => {
|
|
30003
|
-
return /* @__PURE__ */ jsx("div", { id: "ct-editor-f47ac10b", className: "cteditor-max-w-full
|
|
30268
|
+
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
30269
|
};
|
|
30005
30270
|
const MessageContainer = styled.div`
|
|
30006
30271
|
display: flex;
|
|
@@ -30124,4 +30389,4 @@ export {
|
|
|
30124
30389
|
useHtmlView as u,
|
|
30125
30390
|
verifyApiKey as v
|
|
30126
30391
|
};
|
|
30127
|
-
//# sourceMappingURL=index-
|
|
30392
|
+
//# sourceMappingURL=index-db43388d.js.map
|