ct-rich-text-editor 1.3.2 → 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 +4109 -4090
- package/dist/{babel-d155920e.js → babel-d3085146.js} +3565 -3292
- package/dist/babel-d3085146.js.map +1 -0
- package/dist/{estree-b1fff53b.js → estree-164983f6.js} +1763 -1778
- package/dist/estree-164983f6.js.map +1 -0
- package/dist/hooks/useModal.d.ts +0 -1
- package/dist/{html-f95ee5dc.js → html-5586dbf6.js} +701 -656
- package/dist/html-5586dbf6.js.map +1 -0
- package/dist/{html2pdf.bundle-7d125fec.js → html2pdf.bundle-5c5747c7.js} +2 -2
- package/dist/html2pdf.bundle-5c5747c7.js.map +1 -0
- package/dist/{html2pdf.bundle.min-96e9ee6a.js → html2pdf.bundle.min-8fcf4f01.js} +2 -2
- package/dist/html2pdf.bundle.min-8fcf4f01.js.map +1 -0
- package/dist/{index-91e0322d.js → index-48519641.js} +2 -2
- package/dist/index-48519641.js.map +1 -0
- package/dist/{index-413952d9.js → index-db43388d.js} +378 -254
- package/dist/index-db43388d.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/{markdown-1d9e6c3f.js → markdown-d513479b.js} +1836 -1789
- package/dist/markdown-d513479b.js.map +1 -0
- 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-c2592f3f.js → postcss-f084f74d.js} +1378 -1357
- package/dist/postcss-f084f74d.js.map +1 -0
- package/dist/standalone-5a8c6b7e.js +2518 -0
- package/dist/standalone-5a8c6b7e.js.map +1 -0
- package/dist/typescript-b1005db4.js +13705 -0
- package/dist/typescript-b1005db4.js.map +1 -0
- package/package.json +126 -126
- package/dist/babel-d155920e.js.map +0 -1
- package/dist/estree-b1fff53b.js.map +0 -1
- package/dist/html-f95ee5dc.js.map +0 -1
- package/dist/html2pdf.bundle-7d125fec.js.map +0 -1
- package/dist/html2pdf.bundle.min-96e9ee6a.js.map +0 -1
- package/dist/index-413952d9.js.map +0 -1
- package/dist/index-91e0322d.js.map +0 -1
- package/dist/markdown-1d9e6c3f.js.map +0 -1
- package/dist/postcss-c2592f3f.js.map +0 -1
- package/dist/standalone-bcc7f37a.js +0 -2649
- package/dist/standalone-bcc7f37a.js.map +0 -1
- package/dist/typescript-48c10f50.js +0 -13601
- package/dist/typescript-48c10f50.js.map +0 -1
|
@@ -343,18 +343,18 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
343
343
|
}
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
|
-
function setRef
|
|
346
|
+
function setRef(ref, value) {
|
|
347
347
|
if (typeof ref === "function") {
|
|
348
348
|
return ref(value);
|
|
349
349
|
} else if (ref !== null && ref !== void 0) {
|
|
350
350
|
ref.current = value;
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
-
function composeRefs
|
|
353
|
+
function composeRefs(...refs) {
|
|
354
354
|
return (node) => {
|
|
355
355
|
let hasCleanup = false;
|
|
356
356
|
const cleanups = refs.map((ref) => {
|
|
357
|
-
const cleanup = setRef
|
|
357
|
+
const cleanup = setRef(ref, node);
|
|
358
358
|
if (!hasCleanup && typeof cleanup == "function") {
|
|
359
359
|
hasCleanup = true;
|
|
360
360
|
}
|
|
@@ -367,7 +367,7 @@ function composeRefs$1(...refs) {
|
|
|
367
367
|
if (typeof cleanup == "function") {
|
|
368
368
|
cleanup();
|
|
369
369
|
} else {
|
|
370
|
-
setRef
|
|
370
|
+
setRef(refs[i2], null);
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
};
|
|
@@ -375,7 +375,7 @@ function composeRefs$1(...refs) {
|
|
|
375
375
|
};
|
|
376
376
|
}
|
|
377
377
|
function useComposedRefs(...refs) {
|
|
378
|
-
return React$1.useCallback(composeRefs
|
|
378
|
+
return React$1.useCallback(composeRefs(...refs), refs);
|
|
379
379
|
}
|
|
380
380
|
function createContext2(rootComponentName, defaultContext) {
|
|
381
381
|
const Context2 = React$1.createContext(defaultContext);
|
|
@@ -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;
|
|
@@ -568,7 +568,7 @@ function createSlotClone$1(ownerName) {
|
|
|
568
568
|
const childrenRef = getElementRef$2(children);
|
|
569
569
|
const props2 = mergeProps$1(slotProps, children.props);
|
|
570
570
|
if (children.type !== React$1.Fragment) {
|
|
571
|
-
props2.ref = forwardedRef ? composeRefs
|
|
571
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
572
572
|
}
|
|
573
573
|
return React$1.cloneElement(children, props2);
|
|
574
574
|
}
|
|
@@ -628,7 +628,7 @@ function getElementRef$2(element) {
|
|
|
628
628
|
}
|
|
629
629
|
return element.props.ref || element.ref;
|
|
630
630
|
}
|
|
631
|
-
var NODES = [
|
|
631
|
+
var NODES$1 = [
|
|
632
632
|
"a",
|
|
633
633
|
"button",
|
|
634
634
|
"div",
|
|
@@ -647,7 +647,7 @@ var NODES = [
|
|
|
647
647
|
"svg",
|
|
648
648
|
"ul"
|
|
649
649
|
];
|
|
650
|
-
var Primitive = NODES.reduce((primitive, node) => {
|
|
650
|
+
var Primitive$1 = NODES$1.reduce((primitive, node) => {
|
|
651
651
|
const Slot2 = /* @__PURE__ */ createSlot$1(`Primitive.${node}`);
|
|
652
652
|
const Node2 = React$1.forwardRef((props, forwardedRef) => {
|
|
653
653
|
const { asChild, ...primitiveProps } = props;
|
|
@@ -781,7 +781,7 @@ var DismissableLayer = React$1.forwardRef(
|
|
|
781
781
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
782
782
|
}, []);
|
|
783
783
|
return /* @__PURE__ */ jsx(
|
|
784
|
-
Primitive.div,
|
|
784
|
+
Primitive$1.div,
|
|
785
785
|
{
|
|
786
786
|
...layerProps,
|
|
787
787
|
ref: composedRefs,
|
|
@@ -814,7 +814,7 @@ var DismissableLayerBranch = React$1.forwardRef((props, forwardedRef) => {
|
|
|
814
814
|
};
|
|
815
815
|
}
|
|
816
816
|
}, [context.branches]);
|
|
817
|
-
return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });
|
|
817
|
+
return /* @__PURE__ */ jsx(Primitive$1.div, { ...props, ref: composedRefs });
|
|
818
818
|
});
|
|
819
819
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
820
820
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
@@ -1023,7 +1023,7 @@ var FocusScope = React$1.forwardRef((props, forwardedRef) => {
|
|
|
1023
1023
|
},
|
|
1024
1024
|
[loop, trapped, focusScope.paused]
|
|
1025
1025
|
);
|
|
1026
|
-
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 });
|
|
1027
1027
|
});
|
|
1028
1028
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
1029
1029
|
function focusFirst$2(candidates, { select = false } = {}) {
|
|
@@ -1120,7 +1120,7 @@ var Portal$5 = React$1.forwardRef((props, forwardedRef) => {
|
|
|
1120
1120
|
const [mounted, setMounted] = React$1.useState(false);
|
|
1121
1121
|
useLayoutEffect2(() => setMounted(true), []);
|
|
1122
1122
|
const container = containerProp || mounted && ((_a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _a.body);
|
|
1123
|
-
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;
|
|
1124
1124
|
});
|
|
1125
1125
|
Portal$5.displayName = PORTAL_NAME$6;
|
|
1126
1126
|
function useStateMachine(initialState, machine) {
|
|
@@ -2055,7 +2055,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
|
2055
2055
|
return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
|
|
2056
2056
|
};
|
|
2057
2057
|
var DIALOG_NAME = "Dialog";
|
|
2058
|
-
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
2058
|
+
var [createDialogContext, createDialogScope] = createContextScope$1(DIALOG_NAME);
|
|
2059
2059
|
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
2060
2060
|
var Dialog$1 = (props) => {
|
|
2061
2061
|
const {
|
|
@@ -2099,7 +2099,7 @@ var DialogTrigger = React$1.forwardRef(
|
|
|
2099
2099
|
const context = useDialogContext(TRIGGER_NAME$5, __scopeDialog);
|
|
2100
2100
|
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
2101
2101
|
return /* @__PURE__ */ jsx(
|
|
2102
|
-
Primitive.button,
|
|
2102
|
+
Primitive$1.button,
|
|
2103
2103
|
{
|
|
2104
2104
|
type: "button",
|
|
2105
2105
|
"aria-haspopup": "dialog",
|
|
@@ -2143,7 +2143,7 @@ var DialogOverlayImpl = React$1.forwardRef(
|
|
|
2143
2143
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2144
2144
|
// ie. when `Overlay` and `Content` are siblings
|
|
2145
2145
|
/* @__PURE__ */ jsx(RemoveScroll, { as: Slot$4, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(
|
|
2146
|
-
Primitive.div,
|
|
2146
|
+
Primitive$1.div,
|
|
2147
2147
|
{
|
|
2148
2148
|
"data-state": getState$1(context.open),
|
|
2149
2149
|
...overlayProps,
|
|
@@ -2288,7 +2288,7 @@ var DialogTitle$1 = React$1.forwardRef(
|
|
|
2288
2288
|
(props, forwardedRef) => {
|
|
2289
2289
|
const { __scopeDialog, ...titleProps } = props;
|
|
2290
2290
|
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
2291
|
-
return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
2291
|
+
return /* @__PURE__ */ jsx(Primitive$1.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
2292
2292
|
}
|
|
2293
2293
|
);
|
|
2294
2294
|
DialogTitle$1.displayName = TITLE_NAME;
|
|
@@ -2297,7 +2297,7 @@ var DialogDescription$1 = React$1.forwardRef(
|
|
|
2297
2297
|
(props, forwardedRef) => {
|
|
2298
2298
|
const { __scopeDialog, ...descriptionProps } = props;
|
|
2299
2299
|
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
2300
|
-
return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
2300
|
+
return /* @__PURE__ */ jsx(Primitive$1.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
2301
2301
|
}
|
|
2302
2302
|
);
|
|
2303
2303
|
DialogDescription$1.displayName = DESCRIPTION_NAME;
|
|
@@ -2307,7 +2307,7 @@ var DialogClose = React$1.forwardRef(
|
|
|
2307
2307
|
const { __scopeDialog, ...closeProps } = props;
|
|
2308
2308
|
const context = useDialogContext(CLOSE_NAME$1, __scopeDialog);
|
|
2309
2309
|
return /* @__PURE__ */ jsx(
|
|
2310
|
-
Primitive.button,
|
|
2310
|
+
Primitive$1.button,
|
|
2311
2311
|
{
|
|
2312
2312
|
type: "button",
|
|
2313
2313
|
...closeProps,
|
|
@@ -3005,7 +3005,28 @@ function clsx() {
|
|
|
3005
3005
|
(e = arguments[f2]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
3006
3006
|
return n;
|
|
3007
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
|
+
});
|
|
3008
3027
|
const CLASS_PART_SEPARATOR = "-";
|
|
3028
|
+
const EMPTY_CONFLICTS = [];
|
|
3029
|
+
const ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
|
|
3009
3030
|
const createClassGroupUtils = (config) => {
|
|
3010
3031
|
const classMap = createClassMap(config);
|
|
3011
3032
|
const {
|
|
@@ -3013,104 +3034,135 @@ const createClassGroupUtils = (config) => {
|
|
|
3013
3034
|
conflictingClassGroupModifiers
|
|
3014
3035
|
} = config;
|
|
3015
3036
|
const getClassGroupId = (className) => {
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
classParts.shift();
|
|
3037
|
+
if (className.startsWith("[") && className.endsWith("]")) {
|
|
3038
|
+
return getGroupIdForArbitraryProperty(className);
|
|
3019
3039
|
}
|
|
3020
|
-
|
|
3040
|
+
const classParts = className.split(CLASS_PART_SEPARATOR);
|
|
3041
|
+
const startIndex = classParts[0] === "" && classParts.length > 1 ? 1 : 0;
|
|
3042
|
+
return getGroupRecursive(classParts, startIndex, classMap);
|
|
3021
3043
|
};
|
|
3022
3044
|
const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
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;
|
|
3026
3055
|
}
|
|
3027
|
-
return
|
|
3056
|
+
return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
|
|
3028
3057
|
};
|
|
3029
3058
|
return {
|
|
3030
3059
|
getClassGroupId,
|
|
3031
3060
|
getConflictingClassGroupIds
|
|
3032
3061
|
};
|
|
3033
3062
|
};
|
|
3034
|
-
const getGroupRecursive = (classParts, classPartObject) => {
|
|
3035
|
-
|
|
3036
|
-
if (
|
|
3063
|
+
const getGroupRecursive = (classParts, startIndex, classPartObject) => {
|
|
3064
|
+
const classPathsLength = classParts.length - startIndex;
|
|
3065
|
+
if (classPathsLength === 0) {
|
|
3037
3066
|
return classPartObject.classGroupId;
|
|
3038
3067
|
}
|
|
3039
|
-
const currentClassPart = classParts[
|
|
3068
|
+
const currentClassPart = classParts[startIndex];
|
|
3040
3069
|
const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3070
|
+
if (nextClassPartObject) {
|
|
3071
|
+
const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
|
|
3072
|
+
if (result)
|
|
3073
|
+
return result;
|
|
3044
3074
|
}
|
|
3045
|
-
|
|
3075
|
+
const validators = classPartObject.validators;
|
|
3076
|
+
if (validators === null) {
|
|
3046
3077
|
return void 0;
|
|
3047
3078
|
}
|
|
3048
|
-
const classRest = classParts.join(CLASS_PART_SEPARATOR);
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
const getGroupIdForArbitraryProperty = (className) => {
|
|
3055
|
-
if (arbitraryPropertyRegex.test(className)) {
|
|
3056
|
-
const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
|
|
3057
|
-
const property = arbitraryPropertyClassName == null ? void 0 : arbitraryPropertyClassName.substring(0, arbitraryPropertyClassName.indexOf(":"));
|
|
3058
|
-
if (property) {
|
|
3059
|
-
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;
|
|
3060
3085
|
}
|
|
3061
3086
|
}
|
|
3087
|
+
return void 0;
|
|
3062
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
|
+
})();
|
|
3063
3095
|
const createClassMap = (config) => {
|
|
3064
3096
|
const {
|
|
3065
3097
|
theme: theme2,
|
|
3066
3098
|
classGroups
|
|
3067
3099
|
} = config;
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3100
|
+
return processClassGroups(classGroups, theme2);
|
|
3101
|
+
};
|
|
3102
|
+
const processClassGroups = (classGroups, theme2) => {
|
|
3103
|
+
const classMap = createClassPartObject();
|
|
3072
3104
|
for (const classGroupId in classGroups) {
|
|
3073
|
-
|
|
3105
|
+
const group = classGroups[classGroupId];
|
|
3106
|
+
processClassesRecursively(group, classMap, classGroupId, theme2);
|
|
3074
3107
|
}
|
|
3075
3108
|
return classMap;
|
|
3076
3109
|
};
|
|
3077
3110
|
const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme2) => {
|
|
3078
|
-
classGroup.
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
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
|
+
}
|
|
3099
3149
|
};
|
|
3100
3150
|
const getPart = (classPartObject, path) => {
|
|
3101
|
-
let
|
|
3102
|
-
path.split(CLASS_PART_SEPARATOR)
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
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;
|
|
3112
3164
|
};
|
|
3113
|
-
const isThemeGetter = (func) => func.isThemeGetter;
|
|
3165
|
+
const isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
|
|
3114
3166
|
const createLruCache = (maxCacheSize) => {
|
|
3115
3167
|
if (maxCacheSize < 1) {
|
|
3116
3168
|
return {
|
|
@@ -3120,31 +3172,31 @@ const createLruCache = (maxCacheSize) => {
|
|
|
3120
3172
|
};
|
|
3121
3173
|
}
|
|
3122
3174
|
let cacheSize = 0;
|
|
3123
|
-
let cache = /* @__PURE__ */
|
|
3124
|
-
let previousCache = /* @__PURE__ */
|
|
3175
|
+
let cache = /* @__PURE__ */ Object.create(null);
|
|
3176
|
+
let previousCache = /* @__PURE__ */ Object.create(null);
|
|
3125
3177
|
const update = (key, value) => {
|
|
3126
|
-
cache
|
|
3178
|
+
cache[key] = value;
|
|
3127
3179
|
cacheSize++;
|
|
3128
3180
|
if (cacheSize > maxCacheSize) {
|
|
3129
3181
|
cacheSize = 0;
|
|
3130
3182
|
previousCache = cache;
|
|
3131
|
-
cache = /* @__PURE__ */
|
|
3183
|
+
cache = /* @__PURE__ */ Object.create(null);
|
|
3132
3184
|
}
|
|
3133
3185
|
};
|
|
3134
3186
|
return {
|
|
3135
3187
|
get(key) {
|
|
3136
|
-
let value = cache
|
|
3188
|
+
let value = cache[key];
|
|
3137
3189
|
if (value !== void 0) {
|
|
3138
3190
|
return value;
|
|
3139
3191
|
}
|
|
3140
|
-
if ((value = previousCache
|
|
3192
|
+
if ((value = previousCache[key]) !== void 0) {
|
|
3141
3193
|
update(key, value);
|
|
3142
3194
|
return value;
|
|
3143
3195
|
}
|
|
3144
3196
|
},
|
|
3145
3197
|
set(key, value) {
|
|
3146
|
-
if (cache
|
|
3147
|
-
cache
|
|
3198
|
+
if (key in cache) {
|
|
3199
|
+
cache[key] = value;
|
|
3148
3200
|
} else {
|
|
3149
3201
|
update(key, value);
|
|
3150
3202
|
}
|
|
@@ -3153,7 +3205,14 @@ const createLruCache = (maxCacheSize) => {
|
|
|
3153
3205
|
};
|
|
3154
3206
|
const IMPORTANT_MODIFIER = "!";
|
|
3155
3207
|
const MODIFIER_SEPARATOR = ":";
|
|
3156
|
-
const
|
|
3208
|
+
const EMPTY_MODIFIERS = [];
|
|
3209
|
+
const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
|
|
3210
|
+
modifiers,
|
|
3211
|
+
hasImportantModifier,
|
|
3212
|
+
baseClassName,
|
|
3213
|
+
maybePostfixModifierPosition,
|
|
3214
|
+
isExternal
|
|
3215
|
+
});
|
|
3157
3216
|
const createParseClassName = (config) => {
|
|
3158
3217
|
const {
|
|
3159
3218
|
prefix,
|
|
@@ -3165,12 +3224,13 @@ const createParseClassName = (config) => {
|
|
|
3165
3224
|
let parenDepth = 0;
|
|
3166
3225
|
let modifierStart = 0;
|
|
3167
3226
|
let postfixModifierPosition;
|
|
3168
|
-
|
|
3169
|
-
|
|
3227
|
+
const len = className.length;
|
|
3228
|
+
for (let index2 = 0; index2 < len; index2++) {
|
|
3229
|
+
const currentCharacter = className[index2];
|
|
3170
3230
|
if (bracketDepth === 0 && parenDepth === 0) {
|
|
3171
3231
|
if (currentCharacter === MODIFIER_SEPARATOR) {
|
|
3172
3232
|
modifiers.push(className.slice(modifierStart, index2));
|
|
3173
|
-
modifierStart = index2 +
|
|
3233
|
+
modifierStart = index2 + 1;
|
|
3174
3234
|
continue;
|
|
3175
3235
|
}
|
|
3176
3236
|
if (currentCharacter === "/") {
|
|
@@ -3178,37 +3238,38 @@ const createParseClassName = (config) => {
|
|
|
3178
3238
|
continue;
|
|
3179
3239
|
}
|
|
3180
3240
|
}
|
|
3181
|
-
if (currentCharacter === "[")
|
|
3241
|
+
if (currentCharacter === "[")
|
|
3182
3242
|
bracketDepth++;
|
|
3183
|
-
|
|
3243
|
+
else if (currentCharacter === "]")
|
|
3184
3244
|
bracketDepth--;
|
|
3185
|
-
|
|
3245
|
+
else if (currentCharacter === "(")
|
|
3186
3246
|
parenDepth++;
|
|
3187
|
-
|
|
3247
|
+
else if (currentCharacter === ")")
|
|
3188
3248
|
parenDepth--;
|
|
3189
|
-
}
|
|
3190
3249
|
}
|
|
3191
|
-
const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.
|
|
3192
|
-
|
|
3193
|
-
|
|
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
|
+
}
|
|
3194
3266
|
const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
|
|
3195
|
-
return
|
|
3196
|
-
modifiers,
|
|
3197
|
-
hasImportantModifier,
|
|
3198
|
-
baseClassName,
|
|
3199
|
-
maybePostfixModifierPosition
|
|
3200
|
-
};
|
|
3267
|
+
return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
|
|
3201
3268
|
};
|
|
3202
3269
|
if (prefix) {
|
|
3203
3270
|
const fullPrefix = prefix + MODIFIER_SEPARATOR;
|
|
3204
3271
|
const parseClassNameOriginal = parseClassName;
|
|
3205
|
-
parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.
|
|
3206
|
-
isExternal: true,
|
|
3207
|
-
modifiers: [],
|
|
3208
|
-
hasImportantModifier: false,
|
|
3209
|
-
baseClassName: className,
|
|
3210
|
-
maybePostfixModifierPosition: void 0
|
|
3211
|
-
};
|
|
3272
|
+
parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, void 0, true);
|
|
3212
3273
|
}
|
|
3213
3274
|
if (experimentalParseClassName) {
|
|
3214
3275
|
const parseClassNameOriginal = parseClassName;
|
|
@@ -3219,36 +3280,35 @@ const createParseClassName = (config) => {
|
|
|
3219
3280
|
}
|
|
3220
3281
|
return parseClassName;
|
|
3221
3282
|
};
|
|
3222
|
-
const stripImportantModifier = (baseClassName) => {
|
|
3223
|
-
if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {
|
|
3224
|
-
return baseClassName.substring(0, baseClassName.length - 1);
|
|
3225
|
-
}
|
|
3226
|
-
if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {
|
|
3227
|
-
return baseClassName.substring(1);
|
|
3228
|
-
}
|
|
3229
|
-
return baseClassName;
|
|
3230
|
-
};
|
|
3231
3283
|
const createSortModifiers = (config) => {
|
|
3232
|
-
const
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
const
|
|
3238
|
-
let
|
|
3239
|
-
modifiers.
|
|
3240
|
-
const
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
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);
|
|
3244
3302
|
} else {
|
|
3245
|
-
|
|
3303
|
+
currentSegment.push(modifier);
|
|
3246
3304
|
}
|
|
3247
|
-
}
|
|
3248
|
-
|
|
3249
|
-
|
|
3305
|
+
}
|
|
3306
|
+
if (currentSegment.length > 0) {
|
|
3307
|
+
currentSegment.sort();
|
|
3308
|
+
result.push(...currentSegment);
|
|
3309
|
+
}
|
|
3310
|
+
return result;
|
|
3250
3311
|
};
|
|
3251
|
-
return sortModifiers;
|
|
3252
3312
|
};
|
|
3253
3313
|
const createConfigUtils = (config) => ({
|
|
3254
3314
|
cache: createLruCache(config.cacheSize),
|
|
@@ -3294,10 +3354,10 @@ const mergeClassList = (classList, configUtils) => {
|
|
|
3294
3354
|
}
|
|
3295
3355
|
hasPostfixModifier = false;
|
|
3296
3356
|
}
|
|
3297
|
-
const variantModifier = sortModifiers(modifiers).join(":");
|
|
3357
|
+
const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
|
|
3298
3358
|
const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
|
|
3299
3359
|
const classId = modifierId + classGroupId;
|
|
3300
|
-
if (classGroupsInConflict.
|
|
3360
|
+
if (classGroupsInConflict.indexOf(classId) > -1) {
|
|
3301
3361
|
continue;
|
|
3302
3362
|
}
|
|
3303
3363
|
classGroupsInConflict.push(classId);
|
|
@@ -3310,13 +3370,13 @@ const mergeClassList = (classList, configUtils) => {
|
|
|
3310
3370
|
}
|
|
3311
3371
|
return result;
|
|
3312
3372
|
};
|
|
3313
|
-
|
|
3373
|
+
const twJoin = (...classLists) => {
|
|
3314
3374
|
let index2 = 0;
|
|
3315
3375
|
let argument;
|
|
3316
3376
|
let resolvedValue;
|
|
3317
3377
|
let string = "";
|
|
3318
|
-
while (index2 <
|
|
3319
|
-
if (argument =
|
|
3378
|
+
while (index2 < classLists.length) {
|
|
3379
|
+
if (argument = classLists[index2++]) {
|
|
3320
3380
|
if (resolvedValue = toValue(argument)) {
|
|
3321
3381
|
string && (string += " ");
|
|
3322
3382
|
string += resolvedValue;
|
|
@@ -3324,7 +3384,7 @@ function twJoin() {
|
|
|
3324
3384
|
}
|
|
3325
3385
|
}
|
|
3326
3386
|
return string;
|
|
3327
|
-
}
|
|
3387
|
+
};
|
|
3328
3388
|
const toValue = (mix) => {
|
|
3329
3389
|
if (typeof mix === "string") {
|
|
3330
3390
|
return mix;
|
|
@@ -3341,20 +3401,20 @@ const toValue = (mix) => {
|
|
|
3341
3401
|
}
|
|
3342
3402
|
return string;
|
|
3343
3403
|
};
|
|
3344
|
-
|
|
3404
|
+
const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
|
|
3345
3405
|
let configUtils;
|
|
3346
3406
|
let cacheGet;
|
|
3347
3407
|
let cacheSet;
|
|
3348
|
-
let functionToCall
|
|
3349
|
-
|
|
3408
|
+
let functionToCall;
|
|
3409
|
+
const initTailwindMerge = (classList) => {
|
|
3350
3410
|
const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
|
|
3351
3411
|
configUtils = createConfigUtils(config);
|
|
3352
3412
|
cacheGet = configUtils.cache.get;
|
|
3353
3413
|
cacheSet = configUtils.cache.set;
|
|
3354
3414
|
functionToCall = tailwindMerge;
|
|
3355
3415
|
return tailwindMerge(classList);
|
|
3356
|
-
}
|
|
3357
|
-
|
|
3416
|
+
};
|
|
3417
|
+
const tailwindMerge = (classList) => {
|
|
3358
3418
|
const cachedResult = cacheGet(classList);
|
|
3359
3419
|
if (cachedResult) {
|
|
3360
3420
|
return cachedResult;
|
|
@@ -3362,13 +3422,13 @@ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
|
|
|
3362
3422
|
const result = mergeClassList(classList, configUtils);
|
|
3363
3423
|
cacheSet(classList, result);
|
|
3364
3424
|
return result;
|
|
3365
|
-
}
|
|
3366
|
-
return function callTailwindMerge() {
|
|
3367
|
-
return functionToCall(twJoin.apply(null, arguments));
|
|
3368
3425
|
};
|
|
3369
|
-
|
|
3426
|
+
functionToCall = initTailwindMerge;
|
|
3427
|
+
return (...args) => functionToCall(twJoin(...args));
|
|
3428
|
+
};
|
|
3429
|
+
const fallbackThemeArr = [];
|
|
3370
3430
|
const fromTheme = (key) => {
|
|
3371
|
-
const themeGetter = (theme2) => theme2[key] ||
|
|
3431
|
+
const themeGetter = (theme2) => theme2[key] || fallbackThemeArr;
|
|
3372
3432
|
themeGetter.isThemeGetter = true;
|
|
3373
3433
|
return themeGetter;
|
|
3374
3434
|
};
|
|
@@ -5990,7 +6050,7 @@ const DialogContent = React$1.forwardRef(({ className, children, ...props }, ref
|
|
|
5990
6050
|
/* @__PURE__ */ jsxs(
|
|
5991
6051
|
Close,
|
|
5992
6052
|
{
|
|
5993
|
-
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",
|
|
5994
6054
|
children: [
|
|
5995
6055
|
/* @__PURE__ */ jsx(X$1, { className: "cteditor-h-4 cteditor-w-4" }),
|
|
5996
6056
|
/* @__PURE__ */ jsx("span", { className: "!cteditor-sr-only", children: "Close" })
|
|
@@ -6051,37 +6111,6 @@ const DialogDescription = React$1.forwardRef(({ className, ...props }, ref) => /
|
|
|
6051
6111
|
}
|
|
6052
6112
|
));
|
|
6053
6113
|
DialogDescription.displayName = Description.displayName;
|
|
6054
|
-
function setRef(ref, value) {
|
|
6055
|
-
if (typeof ref === "function") {
|
|
6056
|
-
return ref(value);
|
|
6057
|
-
} else if (ref !== null && ref !== void 0) {
|
|
6058
|
-
ref.current = value;
|
|
6059
|
-
}
|
|
6060
|
-
}
|
|
6061
|
-
function composeRefs(...refs) {
|
|
6062
|
-
return (node) => {
|
|
6063
|
-
let hasCleanup = false;
|
|
6064
|
-
const cleanups = refs.map((ref) => {
|
|
6065
|
-
const cleanup = setRef(ref, node);
|
|
6066
|
-
if (!hasCleanup && typeof cleanup == "function") {
|
|
6067
|
-
hasCleanup = true;
|
|
6068
|
-
}
|
|
6069
|
-
return cleanup;
|
|
6070
|
-
});
|
|
6071
|
-
if (hasCleanup) {
|
|
6072
|
-
return () => {
|
|
6073
|
-
for (let i2 = 0; i2 < cleanups.length; i2++) {
|
|
6074
|
-
const cleanup = cleanups[i2];
|
|
6075
|
-
if (typeof cleanup == "function") {
|
|
6076
|
-
cleanup();
|
|
6077
|
-
} else {
|
|
6078
|
-
setRef(refs[i2], null);
|
|
6079
|
-
}
|
|
6080
|
-
}
|
|
6081
|
-
};
|
|
6082
|
-
}
|
|
6083
|
-
};
|
|
6084
|
-
}
|
|
6085
6114
|
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
6086
6115
|
var use = React$1[" use ".trim().toString()];
|
|
6087
6116
|
function isPromiseLike(value) {
|
|
@@ -6282,6 +6311,38 @@ const Input$1 = React$1.forwardRef(
|
|
|
6282
6311
|
}
|
|
6283
6312
|
);
|
|
6284
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
|
+
}, {});
|
|
6285
6346
|
var NAME$4 = "Label";
|
|
6286
6347
|
var Label$3 = React$1.forwardRef((props, forwardedRef) => {
|
|
6287
6348
|
return /* @__PURE__ */ jsx(
|
|
@@ -7929,16 +7990,16 @@ function CopyButton({ editor, getCodeDOMNode }) {
|
|
|
7929
7990
|
}
|
|
7930
7991
|
const index$4 = "";
|
|
7931
7992
|
const PRETTIER_PARSER_MODULES = {
|
|
7932
|
-
css: [() => import("./postcss-
|
|
7933
|
-
html: [() => import("./html-
|
|
7993
|
+
css: [() => import("./postcss-f084f74d.js")],
|
|
7994
|
+
html: [() => import("./html-5586dbf6.js")],
|
|
7934
7995
|
js: [
|
|
7935
|
-
() => import("./babel-
|
|
7936
|
-
() => import("./estree-
|
|
7996
|
+
() => import("./babel-d3085146.js"),
|
|
7997
|
+
() => import("./estree-164983f6.js")
|
|
7937
7998
|
],
|
|
7938
|
-
markdown: [() => import("./markdown-
|
|
7999
|
+
markdown: [() => import("./markdown-d513479b.js")],
|
|
7939
8000
|
typescript: [
|
|
7940
|
-
() => import("./typescript-
|
|
7941
|
-
() => import("./estree-
|
|
8001
|
+
() => import("./typescript-b1005db4.js"),
|
|
8002
|
+
() => import("./estree-164983f6.js")
|
|
7942
8003
|
]
|
|
7943
8004
|
};
|
|
7944
8005
|
async function loadPrettierParserByLang(lang) {
|
|
@@ -7949,7 +8010,7 @@ async function loadPrettierParserByLang(lang) {
|
|
|
7949
8010
|
return modules;
|
|
7950
8011
|
}
|
|
7951
8012
|
async function loadPrettierFormat() {
|
|
7952
|
-
const { format } = await import("./standalone-
|
|
8013
|
+
const { format } = await import("./standalone-5a8c6b7e.js");
|
|
7953
8014
|
return format;
|
|
7954
8015
|
}
|
|
7955
8016
|
const PRETTIER_OPTIONS_BY_LANG = {
|
|
@@ -8407,6 +8468,69 @@ function $createCommentedTextNode(text, commentId, commentText, commentAuthor, c
|
|
|
8407
8468
|
function $isCommentedTextNode(node) {
|
|
8408
8469
|
return node instanceof CommentedTextNode;
|
|
8409
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
|
+
}
|
|
8410
8534
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
8411
8535
|
function getDefaultExportFromCjs(x2) {
|
|
8412
8536
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
@@ -8820,7 +8944,7 @@ const SheetDescription = React$1.forwardRef(({ className, ...props }, ref) => /*
|
|
|
8820
8944
|
SheetDescription.displayName = Description.displayName;
|
|
8821
8945
|
function createCollection(name) {
|
|
8822
8946
|
const PROVIDER_NAME2 = name + "CollectionProvider";
|
|
8823
|
-
const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME2);
|
|
8947
|
+
const [createCollectionContext, createCollectionScope2] = createContextScope$1(PROVIDER_NAME2);
|
|
8824
8948
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
|
8825
8949
|
PROVIDER_NAME2,
|
|
8826
8950
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
@@ -8890,7 +9014,7 @@ var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
|
8890
9014
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
8891
9015
|
var GROUP_NAME$3 = "RovingFocusGroup";
|
|
8892
9016
|
var [Collection$2, useCollection$2, createCollectionScope$2] = createCollection(GROUP_NAME$3);
|
|
8893
|
-
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
|
|
9017
|
+
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope$1(
|
|
8894
9018
|
GROUP_NAME$3,
|
|
8895
9019
|
[createCollectionScope$2]
|
|
8896
9020
|
);
|
|
@@ -8957,7 +9081,7 @@ var RovingFocusGroupImpl = React$1.forwardRef((props, forwardedRef) => {
|
|
|
8957
9081
|
[]
|
|
8958
9082
|
),
|
|
8959
9083
|
children: /* @__PURE__ */ jsx(
|
|
8960
|
-
Primitive.div,
|
|
9084
|
+
Primitive$1.div,
|
|
8961
9085
|
{
|
|
8962
9086
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
8963
9087
|
"data-orientation": orientation,
|
|
@@ -9022,7 +9146,7 @@ var RovingFocusGroupItem = React$1.forwardRef(
|
|
|
9022
9146
|
focusable,
|
|
9023
9147
|
active,
|
|
9024
9148
|
children: /* @__PURE__ */ jsx(
|
|
9025
|
-
Primitive.span,
|
|
9149
|
+
Primitive$1.span,
|
|
9026
9150
|
{
|
|
9027
9151
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
9028
9152
|
"data-orientation": context.orientation,
|
|
@@ -9107,7 +9231,7 @@ function wrapArray$2(array, startIndex) {
|
|
|
9107
9231
|
var Root$2 = RovingFocusGroup;
|
|
9108
9232
|
var Item$1 = RovingFocusGroupItem;
|
|
9109
9233
|
var TABS_NAME = "Tabs";
|
|
9110
|
-
var [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [
|
|
9234
|
+
var [createTabsContext, createTabsScope] = createContextScope$1(TABS_NAME, [
|
|
9111
9235
|
createRovingFocusGroupScope
|
|
9112
9236
|
]);
|
|
9113
9237
|
var useRovingFocusGroupScope$1 = createRovingFocusGroupScope();
|
|
@@ -9142,7 +9266,7 @@ var Tabs$1 = React$1.forwardRef(
|
|
|
9142
9266
|
dir: direction,
|
|
9143
9267
|
activationMode,
|
|
9144
9268
|
children: /* @__PURE__ */ jsx(
|
|
9145
|
-
Primitive.div,
|
|
9269
|
+
Primitive$1.div,
|
|
9146
9270
|
{
|
|
9147
9271
|
dir: direction,
|
|
9148
9272
|
"data-orientation": orientation,
|
|
@@ -9170,7 +9294,7 @@ var TabsList$1 = React$1.forwardRef(
|
|
|
9170
9294
|
dir: context.dir,
|
|
9171
9295
|
loop,
|
|
9172
9296
|
children: /* @__PURE__ */ jsx(
|
|
9173
|
-
Primitive.div,
|
|
9297
|
+
Primitive$1.div,
|
|
9174
9298
|
{
|
|
9175
9299
|
role: "tablist",
|
|
9176
9300
|
"aria-orientation": context.orientation,
|
|
@@ -9200,7 +9324,7 @@ var TabsTrigger$1 = React$1.forwardRef(
|
|
|
9200
9324
|
focusable: !disabled,
|
|
9201
9325
|
active: isSelected,
|
|
9202
9326
|
children: /* @__PURE__ */ jsx(
|
|
9203
|
-
Primitive.button,
|
|
9327
|
+
Primitive$1.button,
|
|
9204
9328
|
{
|
|
9205
9329
|
type: "button",
|
|
9206
9330
|
role: "tab",
|
|
@@ -9250,7 +9374,7 @@ var TabsContent$1 = React$1.forwardRef(
|
|
|
9250
9374
|
return () => cancelAnimationFrame(rAF);
|
|
9251
9375
|
}, []);
|
|
9252
9376
|
return /* @__PURE__ */ jsx(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx(
|
|
9253
|
-
Primitive.div,
|
|
9377
|
+
Primitive$1.div,
|
|
9254
9378
|
{
|
|
9255
9379
|
"data-state": isSelected ? "active" : "inactive",
|
|
9256
9380
|
"data-orientation": context.orientation,
|
|
@@ -11630,7 +11754,7 @@ var NAME$2 = "Arrow";
|
|
|
11630
11754
|
var Arrow$1 = React$1.forwardRef((props, forwardedRef) => {
|
|
11631
11755
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
11632
11756
|
return /* @__PURE__ */ jsx(
|
|
11633
|
-
Primitive.svg,
|
|
11757
|
+
Primitive$1.svg,
|
|
11634
11758
|
{
|
|
11635
11759
|
...arrowProps,
|
|
11636
11760
|
ref: forwardedRef,
|
|
@@ -11679,7 +11803,7 @@ function useSize(element) {
|
|
|
11679
11803
|
return size2;
|
|
11680
11804
|
}
|
|
11681
11805
|
var POPPER_NAME = "Popper";
|
|
11682
|
-
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
11806
|
+
var [createPopperContext, createPopperScope] = createContextScope$1(POPPER_NAME);
|
|
11683
11807
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
11684
11808
|
var Popper = (props) => {
|
|
11685
11809
|
const { __scopePopper, children } = props;
|
|
@@ -11702,7 +11826,7 @@ var PopperAnchor = React$1.forwardRef(
|
|
|
11702
11826
|
context.onAnchorChange(anchorRef.current);
|
|
11703
11827
|
}
|
|
11704
11828
|
});
|
|
11705
|
-
return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
11829
|
+
return virtualRef ? null : /* @__PURE__ */ jsx(Primitive$1.div, { ...anchorProps, ref: composedRefs });
|
|
11706
11830
|
}
|
|
11707
11831
|
);
|
|
11708
11832
|
PopperAnchor.displayName = ANCHOR_NAME$2;
|
|
@@ -11831,7 +11955,7 @@ var PopperContent = React$1.forwardRef(
|
|
|
11831
11955
|
arrowY,
|
|
11832
11956
|
shouldHideArrow: cannotCenterArrow,
|
|
11833
11957
|
children: /* @__PURE__ */ jsx(
|
|
11834
|
-
Primitive.div,
|
|
11958
|
+
Primitive$1.div,
|
|
11835
11959
|
{
|
|
11836
11960
|
"data-side": placedSide,
|
|
11837
11961
|
"data-align": placedAlign,
|
|
@@ -11967,7 +12091,7 @@ var NAME$1 = "VisuallyHidden";
|
|
|
11967
12091
|
var VisuallyHidden = React$1.forwardRef(
|
|
11968
12092
|
(props, forwardedRef) => {
|
|
11969
12093
|
return /* @__PURE__ */ jsx(
|
|
11970
|
-
Primitive.span,
|
|
12094
|
+
Primitive$1.span,
|
|
11971
12095
|
{
|
|
11972
12096
|
...props,
|
|
11973
12097
|
ref: forwardedRef,
|
|
@@ -11978,7 +12102,7 @@ var VisuallyHidden = React$1.forwardRef(
|
|
|
11978
12102
|
);
|
|
11979
12103
|
VisuallyHidden.displayName = NAME$1;
|
|
11980
12104
|
var Root = VisuallyHidden;
|
|
11981
|
-
var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
|
|
12105
|
+
var [createTooltipContext, createTooltipScope] = createContextScope$1("Tooltip", [
|
|
11982
12106
|
createPopperScope
|
|
11983
12107
|
]);
|
|
11984
12108
|
var usePopperScope$3 = createPopperScope();
|
|
@@ -12139,7 +12263,7 @@ var TooltipTrigger$1 = React$1.forwardRef(
|
|
|
12139
12263
|
return () => document.removeEventListener("pointerup", handlePointerUp);
|
|
12140
12264
|
}, [handlePointerUp]);
|
|
12141
12265
|
return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
|
|
12142
|
-
Primitive.button,
|
|
12266
|
+
Primitive$1.button,
|
|
12143
12267
|
{
|
|
12144
12268
|
"aria-describedby": context.open ? context.contentId : void 0,
|
|
12145
12269
|
"data-state": context.stateAttribute,
|
|
@@ -12491,7 +12615,7 @@ const CommentToggle = ({
|
|
|
12491
12615
|
return /* @__PURE__ */ jsx(
|
|
12492
12616
|
"div",
|
|
12493
12617
|
{
|
|
12494
|
-
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",
|
|
12495
12619
|
children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
12496
12620
|
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
12497
12621
|
Button,
|
|
@@ -12824,10 +12948,10 @@ const PDF_CONFIG = {
|
|
|
12824
12948
|
};
|
|
12825
12949
|
const loadHtml2Pdf = async () => {
|
|
12826
12950
|
try {
|
|
12827
|
-
const mod = await import("./html2pdf.bundle.min-
|
|
12951
|
+
const mod = await import("./html2pdf.bundle.min-8fcf4f01.js").then((n) => n.h);
|
|
12828
12952
|
return (mod == null ? void 0 : mod.default) || mod;
|
|
12829
12953
|
} catch {
|
|
12830
|
-
const mod2 = await import("./html2pdf.bundle-
|
|
12954
|
+
const mod2 = await import("./html2pdf.bundle-5c5747c7.js").then((n) => n.h);
|
|
12831
12955
|
return (mod2 == null ? void 0 : mod2.default) || mod2;
|
|
12832
12956
|
}
|
|
12833
12957
|
};
|
|
@@ -14034,7 +14158,7 @@ const EmbedComponent = ({ url, displayType, alignment, nodeKey }) => {
|
|
|
14034
14158
|
}
|
|
14035
14159
|
);
|
|
14036
14160
|
};
|
|
14037
|
-
const ImageView = React__default.lazy(() => import("./index-
|
|
14161
|
+
const ImageView = React__default.lazy(() => import("./index-48519641.js"));
|
|
14038
14162
|
function isGoogleDocCheckboxImg(img) {
|
|
14039
14163
|
return img.parentElement != null && img.parentElement.tagName === "LI" && img.previousSibling === null && img.getAttribute("aria-roledescription") === "checkbox";
|
|
14040
14164
|
}
|
|
@@ -16718,7 +16842,7 @@ function TableOptionPlugin() {
|
|
|
16718
16842
|
setColumnHeadings([]);
|
|
16719
16843
|
}
|
|
16720
16844
|
},
|
|
16721
|
-
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 "
|
|
16722
16846
|
}
|
|
16723
16847
|
),
|
|
16724
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, {}) })
|
|
@@ -17253,7 +17377,7 @@ var SUB_CLOSE_KEYS = {
|
|
|
17253
17377
|
};
|
|
17254
17378
|
var MENU_NAME = "Menu";
|
|
17255
17379
|
var [Collection$1, useCollection$1, createCollectionScope$1] = createCollection(MENU_NAME);
|
|
17256
|
-
var [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [
|
|
17380
|
+
var [createMenuContext, createMenuScope] = createContextScope$1(MENU_NAME, [
|
|
17257
17381
|
createCollectionScope$1,
|
|
17258
17382
|
createPopperScope,
|
|
17259
17383
|
createRovingFocusGroupScope
|
|
@@ -17580,7 +17704,7 @@ var GROUP_NAME$2 = "MenuGroup";
|
|
|
17580
17704
|
var MenuGroup = React$1.forwardRef(
|
|
17581
17705
|
(props, forwardedRef) => {
|
|
17582
17706
|
const { __scopeMenu, ...groupProps } = props;
|
|
17583
|
-
return /* @__PURE__ */ jsx(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
|
|
17707
|
+
return /* @__PURE__ */ jsx(Primitive$1.div, { role: "group", ...groupProps, ref: forwardedRef });
|
|
17584
17708
|
}
|
|
17585
17709
|
);
|
|
17586
17710
|
MenuGroup.displayName = GROUP_NAME$2;
|
|
@@ -17588,7 +17712,7 @@ var LABEL_NAME$2 = "MenuLabel";
|
|
|
17588
17712
|
var MenuLabel = React$1.forwardRef(
|
|
17589
17713
|
(props, forwardedRef) => {
|
|
17590
17714
|
const { __scopeMenu, ...labelProps } = props;
|
|
17591
|
-
return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });
|
|
17715
|
+
return /* @__PURE__ */ jsx(Primitive$1.div, { ...labelProps, ref: forwardedRef });
|
|
17592
17716
|
}
|
|
17593
17717
|
);
|
|
17594
17718
|
MenuLabel.displayName = LABEL_NAME$2;
|
|
@@ -17668,7 +17792,7 @@ var MenuItemImpl = React$1.forwardRef(
|
|
|
17668
17792
|
disabled,
|
|
17669
17793
|
textValue: textValue ?? textContent,
|
|
17670
17794
|
children: /* @__PURE__ */ jsx(Item$1, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(
|
|
17671
|
-
Primitive.div,
|
|
17795
|
+
Primitive$1.div,
|
|
17672
17796
|
{
|
|
17673
17797
|
role: "menuitem",
|
|
17674
17798
|
"data-highlighted": isFocused ? "" : void 0,
|
|
@@ -17779,7 +17903,7 @@ var MenuItemIndicator = React$1.forwardRef(
|
|
|
17779
17903
|
{
|
|
17780
17904
|
present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,
|
|
17781
17905
|
children: /* @__PURE__ */ jsx(
|
|
17782
|
-
Primitive.span,
|
|
17906
|
+
Primitive$1.span,
|
|
17783
17907
|
{
|
|
17784
17908
|
...itemIndicatorProps,
|
|
17785
17909
|
ref: forwardedRef,
|
|
@@ -17796,7 +17920,7 @@ var MenuSeparator = React$1.forwardRef(
|
|
|
17796
17920
|
(props, forwardedRef) => {
|
|
17797
17921
|
const { __scopeMenu, ...separatorProps } = props;
|
|
17798
17922
|
return /* @__PURE__ */ jsx(
|
|
17799
|
-
Primitive.div,
|
|
17923
|
+
Primitive$1.div,
|
|
17800
17924
|
{
|
|
17801
17925
|
role: "separator",
|
|
17802
17926
|
"aria-orientation": "horizontal",
|
|
@@ -17850,7 +17974,7 @@ var MenuSubTrigger = React$1.forwardRef(
|
|
|
17850
17974
|
"aria-controls": subContext.contentId,
|
|
17851
17975
|
"data-state": getOpenState(context.open),
|
|
17852
17976
|
...props,
|
|
17853
|
-
ref: composeRefs
|
|
17977
|
+
ref: composeRefs(forwardedRef, subContext.onTriggerChange),
|
|
17854
17978
|
onClick: (event) => {
|
|
17855
17979
|
var _a;
|
|
17856
17980
|
(_a = props.onClick) == null ? void 0 : _a.call(props, event);
|
|
@@ -18056,7 +18180,7 @@ var Arrow2 = MenuArrow;
|
|
|
18056
18180
|
var SubTrigger = MenuSubTrigger;
|
|
18057
18181
|
var SubContent = MenuSubContent;
|
|
18058
18182
|
var DROPDOWN_MENU_NAME = "DropdownMenu";
|
|
18059
|
-
var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(
|
|
18183
|
+
var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope$1(
|
|
18060
18184
|
DROPDOWN_MENU_NAME,
|
|
18061
18185
|
[createMenuScope]
|
|
18062
18186
|
);
|
|
@@ -18103,7 +18227,7 @@ var DropdownMenuTrigger$1 = React$1.forwardRef(
|
|
|
18103
18227
|
const context = useDropdownMenuContext(TRIGGER_NAME$2, __scopeDropdownMenu);
|
|
18104
18228
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
18105
18229
|
return /* @__PURE__ */ jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(
|
|
18106
|
-
Primitive.button,
|
|
18230
|
+
Primitive$1.button,
|
|
18107
18231
|
{
|
|
18108
18232
|
type: "button",
|
|
18109
18233
|
id: context.triggerId,
|
|
@@ -18114,7 +18238,7 @@ var DropdownMenuTrigger$1 = React$1.forwardRef(
|
|
|
18114
18238
|
"data-disabled": disabled ? "" : void 0,
|
|
18115
18239
|
disabled,
|
|
18116
18240
|
...triggerProps,
|
|
18117
|
-
ref: composeRefs
|
|
18241
|
+
ref: composeRefs(forwardedRef, context.triggerRef),
|
|
18118
18242
|
onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {
|
|
18119
18243
|
if (!disabled && event.button === 0 && event.ctrlKey === false) {
|
|
18120
18244
|
context.onOpenToggle();
|
|
@@ -18440,14 +18564,14 @@ const AlignMenu = () => {
|
|
|
18440
18564
|
{
|
|
18441
18565
|
variant: "ghost",
|
|
18442
18566
|
size: "sm",
|
|
18443
|
-
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",
|
|
18444
18568
|
children: [
|
|
18445
18569
|
/* @__PURE__ */ jsx(AlignLeft, { className: "!cteditor-size-4" }),
|
|
18446
18570
|
"Align",
|
|
18447
18571
|
/* @__PURE__ */ jsx(
|
|
18448
18572
|
ChevronDown,
|
|
18449
18573
|
{
|
|
18450
|
-
className: "!cteditor-size-4 cteditor-opacity-50\
|
|
18574
|
+
className: "!cteditor-size-4 cteditor-opacity-50\n"
|
|
18451
18575
|
}
|
|
18452
18576
|
)
|
|
18453
18577
|
]
|
|
@@ -18845,7 +18969,7 @@ var V = "undefined" != typeof window ? useLayoutEffect$1 : useEffect$1, $ = func
|
|
|
18845
18969
|
return React__default.createElement(U, u({}, r2, { colorModel: W }));
|
|
18846
18970
|
};
|
|
18847
18971
|
var POPOVER_NAME = "Popover";
|
|
18848
|
-
var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [
|
|
18972
|
+
var [createPopoverContext, createPopoverScope] = createContextScope$1(POPOVER_NAME, [
|
|
18849
18973
|
createPopperScope
|
|
18850
18974
|
]);
|
|
18851
18975
|
var usePopperScope$1 = createPopperScope();
|
|
@@ -18909,7 +19033,7 @@ var PopoverTrigger$1 = React$1.forwardRef(
|
|
|
18909
19033
|
const popperScope = usePopperScope$1(__scopePopover);
|
|
18910
19034
|
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
18911
19035
|
const trigger = /* @__PURE__ */ jsx(
|
|
18912
|
-
Primitive.button,
|
|
19036
|
+
Primitive$1.button,
|
|
18913
19037
|
{
|
|
18914
19038
|
type: "button",
|
|
18915
19039
|
"aria-haspopup": "dialog",
|
|
@@ -19102,7 +19226,7 @@ var PopoverClose = React$1.forwardRef(
|
|
|
19102
19226
|
const { __scopePopover, ...closeProps } = props;
|
|
19103
19227
|
const context = usePopoverContext(CLOSE_NAME, __scopePopover);
|
|
19104
19228
|
return /* @__PURE__ */ jsx(
|
|
19105
|
-
Primitive.button,
|
|
19229
|
+
Primitive$1.button,
|
|
19106
19230
|
{
|
|
19107
19231
|
type: "button",
|
|
19108
19232
|
...closeProps,
|
|
@@ -19338,7 +19462,7 @@ const ColorPicker$2 = ({
|
|
|
19338
19462
|
"button",
|
|
19339
19463
|
{
|
|
19340
19464
|
onClick: () => setShowAdvanced(!showAdvanced),
|
|
19341
|
-
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",
|
|
19342
19466
|
children: [
|
|
19343
19467
|
/* @__PURE__ */ jsx("span", { className: "cteditor-text-xs", children: showAdvanced ? "▼" : "▶" }),
|
|
19344
19468
|
showAdvanced ? "Hide Advanced" : "Show Advanced"
|
|
@@ -19467,7 +19591,7 @@ var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
|
|
|
19467
19591
|
var SELECTION_KEYS = [" ", "Enter"];
|
|
19468
19592
|
var SELECT_NAME = "Select";
|
|
19469
19593
|
var [Collection, useCollection, createCollectionScope] = createCollection(SELECT_NAME);
|
|
19470
|
-
var [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [
|
|
19594
|
+
var [createSelectContext, createSelectScope] = createContextScope$1(SELECT_NAME, [
|
|
19471
19595
|
createCollectionScope,
|
|
19472
19596
|
createPopperScope
|
|
19473
19597
|
]);
|
|
@@ -19604,7 +19728,7 @@ var SelectTrigger$1 = React$1.forwardRef(
|
|
|
19604
19728
|
}
|
|
19605
19729
|
};
|
|
19606
19730
|
return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
|
|
19607
|
-
Primitive.button,
|
|
19731
|
+
Primitive$1.button,
|
|
19608
19732
|
{
|
|
19609
19733
|
type: "button",
|
|
19610
19734
|
role: "combobox",
|
|
@@ -19665,7 +19789,7 @@ var SelectValue$1 = React$1.forwardRef(
|
|
|
19665
19789
|
onValueNodeHasChildrenChange(hasChildren);
|
|
19666
19790
|
}, [onValueNodeHasChildrenChange, hasChildren]);
|
|
19667
19791
|
return /* @__PURE__ */ jsx(
|
|
19668
|
-
Primitive.span,
|
|
19792
|
+
Primitive$1.span,
|
|
19669
19793
|
{
|
|
19670
19794
|
...valueProps,
|
|
19671
19795
|
ref: composedRefs,
|
|
@@ -19680,7 +19804,7 @@ var ICON_NAME = "SelectIcon";
|
|
|
19680
19804
|
var SelectIcon = React$1.forwardRef(
|
|
19681
19805
|
(props, forwardedRef) => {
|
|
19682
19806
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
19683
|
-
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 || "▼" });
|
|
19684
19808
|
}
|
|
19685
19809
|
);
|
|
19686
19810
|
SelectIcon.displayName = ICON_NAME;
|
|
@@ -20100,7 +20224,7 @@ var SelectItemAlignedPosition = React$1.forwardRef((props, forwardedRef) => {
|
|
|
20100
20224
|
zIndex: contentZIndex
|
|
20101
20225
|
},
|
|
20102
20226
|
children: /* @__PURE__ */ jsx(
|
|
20103
|
-
Primitive.div,
|
|
20227
|
+
Primitive$1.div,
|
|
20104
20228
|
{
|
|
20105
20229
|
...popperProps,
|
|
20106
20230
|
ref: composedRefs,
|
|
@@ -20174,7 +20298,7 @@ var SelectViewport = React$1.forwardRef(
|
|
|
20174
20298
|
}
|
|
20175
20299
|
),
|
|
20176
20300
|
/* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx(
|
|
20177
|
-
Primitive.div,
|
|
20301
|
+
Primitive$1.div,
|
|
20178
20302
|
{
|
|
20179
20303
|
"data-radix-select-viewport": "",
|
|
20180
20304
|
role: "presentation",
|
|
@@ -20229,7 +20353,7 @@ var SelectGroup = React$1.forwardRef(
|
|
|
20229
20353
|
(props, forwardedRef) => {
|
|
20230
20354
|
const { __scopeSelect, ...groupProps } = props;
|
|
20231
20355
|
const groupId = useId();
|
|
20232
|
-
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 }) });
|
|
20233
20357
|
}
|
|
20234
20358
|
);
|
|
20235
20359
|
SelectGroup.displayName = GROUP_NAME;
|
|
@@ -20238,7 +20362,7 @@ var SelectLabel$1 = React$1.forwardRef(
|
|
|
20238
20362
|
(props, forwardedRef) => {
|
|
20239
20363
|
const { __scopeSelect, ...labelProps } = props;
|
|
20240
20364
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
20241
|
-
return /* @__PURE__ */ jsx(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
20365
|
+
return /* @__PURE__ */ jsx(Primitive$1.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
20242
20366
|
}
|
|
20243
20367
|
);
|
|
20244
20368
|
SelectLabel$1.displayName = LABEL_NAME;
|
|
@@ -20297,7 +20421,7 @@ var SelectItem$1 = React$1.forwardRef(
|
|
|
20297
20421
|
disabled,
|
|
20298
20422
|
textValue,
|
|
20299
20423
|
children: /* @__PURE__ */ jsx(
|
|
20300
|
-
Primitive.div,
|
|
20424
|
+
Primitive$1.div,
|
|
20301
20425
|
{
|
|
20302
20426
|
role: "option",
|
|
20303
20427
|
"aria-labelledby": textId,
|
|
@@ -20385,7 +20509,7 @@ var SelectItemText = React$1.forwardRef(
|
|
|
20385
20509
|
return () => onNativeOptionRemove(nativeOption);
|
|
20386
20510
|
}, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
|
|
20387
20511
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20388
|
-
/* @__PURE__ */ jsx(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
|
|
20512
|
+
/* @__PURE__ */ jsx(Primitive$1.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
|
|
20389
20513
|
itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM.createPortal(itemTextProps.children, context.valueNode) : null
|
|
20390
20514
|
] });
|
|
20391
20515
|
}
|
|
@@ -20396,7 +20520,7 @@ var SelectItemIndicator = React$1.forwardRef(
|
|
|
20396
20520
|
(props, forwardedRef) => {
|
|
20397
20521
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
20398
20522
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
20399
|
-
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;
|
|
20400
20524
|
}
|
|
20401
20525
|
);
|
|
20402
20526
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
@@ -20487,7 +20611,7 @@ var SelectScrollButtonImpl = React$1.forwardRef((props, forwardedRef) => {
|
|
|
20487
20611
|
(_a = activeItem == null ? void 0 : activeItem.ref.current) == null ? void 0 : _a.scrollIntoView({ block: "nearest" });
|
|
20488
20612
|
}, [getItems]);
|
|
20489
20613
|
return /* @__PURE__ */ jsx(
|
|
20490
|
-
Primitive.div,
|
|
20614
|
+
Primitive$1.div,
|
|
20491
20615
|
{
|
|
20492
20616
|
"aria-hidden": true,
|
|
20493
20617
|
...scrollIndicatorProps,
|
|
@@ -20515,7 +20639,7 @@ var SEPARATOR_NAME = "SelectSeparator";
|
|
|
20515
20639
|
var SelectSeparator$1 = React$1.forwardRef(
|
|
20516
20640
|
(props, forwardedRef) => {
|
|
20517
20641
|
const { __scopeSelect, ...separatorProps } = props;
|
|
20518
|
-
return /* @__PURE__ */ jsx(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
20642
|
+
return /* @__PURE__ */ jsx(Primitive$1.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
20519
20643
|
}
|
|
20520
20644
|
);
|
|
20521
20645
|
SelectSeparator$1.displayName = SEPARATOR_NAME;
|
|
@@ -20553,7 +20677,7 @@ var SelectBubbleInput = React$1.forwardRef(
|
|
|
20553
20677
|
}
|
|
20554
20678
|
}, [prevValue, value]);
|
|
20555
20679
|
return /* @__PURE__ */ jsx(
|
|
20556
|
-
Primitive.select,
|
|
20680
|
+
Primitive$1.select,
|
|
20557
20681
|
{
|
|
20558
20682
|
...props,
|
|
20559
20683
|
style: { ...VISUALLY_HIDDEN_STYLES, ...props.style },
|
|
@@ -30265,4 +30389,4 @@ export {
|
|
|
30265
30389
|
useHtmlView as u,
|
|
30266
30390
|
verifyApiKey as v
|
|
30267
30391
|
};
|
|
30268
|
-
//# sourceMappingURL=index-
|
|
30392
|
+
//# sourceMappingURL=index-db43388d.js.map
|