@maily-to/core 0.2.7 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -449,8 +449,2511 @@ var useColumnsState = (editor) => {
449
449
 
450
450
  // src/editor/utils/classname.ts
451
451
  var import_clsx = require("clsx");
452
- var import_tailwind_merge = require("tailwind-merge");
453
- var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
452
+
453
+ // ../../node_modules/.pnpm/tailwind-merge@2.5.4/node_modules/tailwind-merge/dist/bundle-mjs.mjs
454
+ var CLASS_PART_SEPARATOR = "-";
455
+ var createClassGroupUtils = (config) => {
456
+ const classMap = createClassMap(config);
457
+ const {
458
+ conflictingClassGroups,
459
+ conflictingClassGroupModifiers
460
+ } = config;
461
+ const getClassGroupId = (className) => {
462
+ const classParts = className.split(CLASS_PART_SEPARATOR);
463
+ if (classParts[0] === "" && classParts.length !== 1) {
464
+ classParts.shift();
465
+ }
466
+ return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
467
+ };
468
+ const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
469
+ const conflicts = conflictingClassGroups[classGroupId] || [];
470
+ if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
471
+ return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
472
+ }
473
+ return conflicts;
474
+ };
475
+ return {
476
+ getClassGroupId,
477
+ getConflictingClassGroupIds
478
+ };
479
+ };
480
+ var getGroupRecursive = (classParts, classPartObject) => {
481
+ var _a;
482
+ if (classParts.length === 0) {
483
+ return classPartObject.classGroupId;
484
+ }
485
+ const currentClassPart = classParts[0];
486
+ const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
487
+ const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
488
+ if (classGroupFromNextClassPart) {
489
+ return classGroupFromNextClassPart;
490
+ }
491
+ if (classPartObject.validators.length === 0) {
492
+ return void 0;
493
+ }
494
+ const classRest = classParts.join(CLASS_PART_SEPARATOR);
495
+ return (_a = classPartObject.validators.find(({
496
+ validator
497
+ }) => validator(classRest))) == null ? void 0 : _a.classGroupId;
498
+ };
499
+ var arbitraryPropertyRegex = /^\[(.+)\]$/;
500
+ var getGroupIdForArbitraryProperty = (className) => {
501
+ if (arbitraryPropertyRegex.test(className)) {
502
+ const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
503
+ const property = arbitraryPropertyClassName == null ? void 0 : arbitraryPropertyClassName.substring(0, arbitraryPropertyClassName.indexOf(":"));
504
+ if (property) {
505
+ return "arbitrary.." + property;
506
+ }
507
+ }
508
+ };
509
+ var createClassMap = (config) => {
510
+ const {
511
+ theme,
512
+ prefix
513
+ } = config;
514
+ const classMap = {
515
+ nextPart: /* @__PURE__ */ new Map(),
516
+ validators: []
517
+ };
518
+ const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix);
519
+ prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {
520
+ processClassesRecursively(classGroup, classMap, classGroupId, theme);
521
+ });
522
+ return classMap;
523
+ };
524
+ var processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
525
+ classGroup.forEach((classDefinition) => {
526
+ if (typeof classDefinition === "string") {
527
+ const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
528
+ classPartObjectToEdit.classGroupId = classGroupId;
529
+ return;
530
+ }
531
+ if (typeof classDefinition === "function") {
532
+ if (isThemeGetter(classDefinition)) {
533
+ processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
534
+ return;
535
+ }
536
+ classPartObject.validators.push({
537
+ validator: classDefinition,
538
+ classGroupId
539
+ });
540
+ return;
541
+ }
542
+ Object.entries(classDefinition).forEach(([key, classGroup2]) => {
543
+ processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme);
544
+ });
545
+ });
546
+ };
547
+ var getPart = (classPartObject, path) => {
548
+ let currentClassPartObject = classPartObject;
549
+ path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
550
+ if (!currentClassPartObject.nextPart.has(pathPart)) {
551
+ currentClassPartObject.nextPart.set(pathPart, {
552
+ nextPart: /* @__PURE__ */ new Map(),
553
+ validators: []
554
+ });
555
+ }
556
+ currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
557
+ });
558
+ return currentClassPartObject;
559
+ };
560
+ var isThemeGetter = (func) => func.isThemeGetter;
561
+ var getPrefixedClassGroupEntries = (classGroupEntries, prefix) => {
562
+ if (!prefix) {
563
+ return classGroupEntries;
564
+ }
565
+ return classGroupEntries.map(([classGroupId, classGroup]) => {
566
+ const prefixedClassGroup = classGroup.map((classDefinition) => {
567
+ if (typeof classDefinition === "string") {
568
+ return prefix + classDefinition;
569
+ }
570
+ if (typeof classDefinition === "object") {
571
+ return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]));
572
+ }
573
+ return classDefinition;
574
+ });
575
+ return [classGroupId, prefixedClassGroup];
576
+ });
577
+ };
578
+ var createLruCache = (maxCacheSize) => {
579
+ if (maxCacheSize < 1) {
580
+ return {
581
+ get: () => void 0,
582
+ set: () => {
583
+ }
584
+ };
585
+ }
586
+ let cacheSize = 0;
587
+ let cache = /* @__PURE__ */ new Map();
588
+ let previousCache = /* @__PURE__ */ new Map();
589
+ const update = (key, value) => {
590
+ cache.set(key, value);
591
+ cacheSize++;
592
+ if (cacheSize > maxCacheSize) {
593
+ cacheSize = 0;
594
+ previousCache = cache;
595
+ cache = /* @__PURE__ */ new Map();
596
+ }
597
+ };
598
+ return {
599
+ get(key) {
600
+ let value = cache.get(key);
601
+ if (value !== void 0) {
602
+ return value;
603
+ }
604
+ if ((value = previousCache.get(key)) !== void 0) {
605
+ update(key, value);
606
+ return value;
607
+ }
608
+ },
609
+ set(key, value) {
610
+ if (cache.has(key)) {
611
+ cache.set(key, value);
612
+ } else {
613
+ update(key, value);
614
+ }
615
+ }
616
+ };
617
+ };
618
+ var IMPORTANT_MODIFIER = "!";
619
+ var createParseClassName = (config) => {
620
+ const {
621
+ separator,
622
+ experimentalParseClassName
623
+ } = config;
624
+ const isSeparatorSingleCharacter = separator.length === 1;
625
+ const firstSeparatorCharacter = separator[0];
626
+ const separatorLength = separator.length;
627
+ const parseClassName = (className) => {
628
+ const modifiers = [];
629
+ let bracketDepth = 0;
630
+ let modifierStart = 0;
631
+ let postfixModifierPosition;
632
+ for (let index = 0; index < className.length; index++) {
633
+ let currentCharacter = className[index];
634
+ if (bracketDepth === 0) {
635
+ if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {
636
+ modifiers.push(className.slice(modifierStart, index));
637
+ modifierStart = index + separatorLength;
638
+ continue;
639
+ }
640
+ if (currentCharacter === "/") {
641
+ postfixModifierPosition = index;
642
+ continue;
643
+ }
644
+ }
645
+ if (currentCharacter === "[") {
646
+ bracketDepth++;
647
+ } else if (currentCharacter === "]") {
648
+ bracketDepth--;
649
+ }
650
+ }
651
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
652
+ const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);
653
+ const baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;
654
+ const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
655
+ return {
656
+ modifiers,
657
+ hasImportantModifier,
658
+ baseClassName,
659
+ maybePostfixModifierPosition
660
+ };
661
+ };
662
+ if (experimentalParseClassName) {
663
+ return (className) => experimentalParseClassName({
664
+ className,
665
+ parseClassName
666
+ });
667
+ }
668
+ return parseClassName;
669
+ };
670
+ var sortModifiers = (modifiers) => {
671
+ if (modifiers.length <= 1) {
672
+ return modifiers;
673
+ }
674
+ const sortedModifiers = [];
675
+ let unsortedModifiers = [];
676
+ modifiers.forEach((modifier) => {
677
+ const isArbitraryVariant = modifier[0] === "[";
678
+ if (isArbitraryVariant) {
679
+ sortedModifiers.push(...unsortedModifiers.sort(), modifier);
680
+ unsortedModifiers = [];
681
+ } else {
682
+ unsortedModifiers.push(modifier);
683
+ }
684
+ });
685
+ sortedModifiers.push(...unsortedModifiers.sort());
686
+ return sortedModifiers;
687
+ };
688
+ var createConfigUtils = (config) => __spreadValues({
689
+ cache: createLruCache(config.cacheSize),
690
+ parseClassName: createParseClassName(config)
691
+ }, createClassGroupUtils(config));
692
+ var SPLIT_CLASSES_REGEX = /\s+/;
693
+ var mergeClassList = (classList, configUtils) => {
694
+ const {
695
+ parseClassName,
696
+ getClassGroupId,
697
+ getConflictingClassGroupIds
698
+ } = configUtils;
699
+ const classGroupsInConflict = [];
700
+ const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
701
+ let result = "";
702
+ for (let index = classNames.length - 1; index >= 0; index -= 1) {
703
+ const originalClassName = classNames[index];
704
+ const {
705
+ modifiers,
706
+ hasImportantModifier,
707
+ baseClassName,
708
+ maybePostfixModifierPosition
709
+ } = parseClassName(originalClassName);
710
+ let hasPostfixModifier = Boolean(maybePostfixModifierPosition);
711
+ let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
712
+ if (!classGroupId) {
713
+ if (!hasPostfixModifier) {
714
+ result = originalClassName + (result.length > 0 ? " " + result : result);
715
+ continue;
716
+ }
717
+ classGroupId = getClassGroupId(baseClassName);
718
+ if (!classGroupId) {
719
+ result = originalClassName + (result.length > 0 ? " " + result : result);
720
+ continue;
721
+ }
722
+ hasPostfixModifier = false;
723
+ }
724
+ const variantModifier = sortModifiers(modifiers).join(":");
725
+ const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
726
+ const classId = modifierId + classGroupId;
727
+ if (classGroupsInConflict.includes(classId)) {
728
+ continue;
729
+ }
730
+ classGroupsInConflict.push(classId);
731
+ const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
732
+ for (let i = 0; i < conflictGroups.length; ++i) {
733
+ const group = conflictGroups[i];
734
+ classGroupsInConflict.push(modifierId + group);
735
+ }
736
+ result = originalClassName + (result.length > 0 ? " " + result : result);
737
+ }
738
+ return result;
739
+ };
740
+ function twJoin() {
741
+ let index = 0;
742
+ let argument;
743
+ let resolvedValue;
744
+ let string = "";
745
+ while (index < arguments.length) {
746
+ if (argument = arguments[index++]) {
747
+ if (resolvedValue = toValue(argument)) {
748
+ string && (string += " ");
749
+ string += resolvedValue;
750
+ }
751
+ }
752
+ }
753
+ return string;
754
+ }
755
+ var toValue = (mix) => {
756
+ if (typeof mix === "string") {
757
+ return mix;
758
+ }
759
+ let resolvedValue;
760
+ let string = "";
761
+ for (let k = 0; k < mix.length; k++) {
762
+ if (mix[k]) {
763
+ if (resolvedValue = toValue(mix[k])) {
764
+ string && (string += " ");
765
+ string += resolvedValue;
766
+ }
767
+ }
768
+ }
769
+ return string;
770
+ };
771
+ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
772
+ let configUtils;
773
+ let cacheGet;
774
+ let cacheSet;
775
+ let functionToCall = initTailwindMerge;
776
+ function initTailwindMerge(classList) {
777
+ const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
778
+ configUtils = createConfigUtils(config);
779
+ cacheGet = configUtils.cache.get;
780
+ cacheSet = configUtils.cache.set;
781
+ functionToCall = tailwindMerge;
782
+ return tailwindMerge(classList);
783
+ }
784
+ function tailwindMerge(classList) {
785
+ const cachedResult = cacheGet(classList);
786
+ if (cachedResult) {
787
+ return cachedResult;
788
+ }
789
+ const result = mergeClassList(classList, configUtils);
790
+ cacheSet(classList, result);
791
+ return result;
792
+ }
793
+ return function callTailwindMerge() {
794
+ return functionToCall(twJoin.apply(null, arguments));
795
+ };
796
+ }
797
+ var fromTheme = (key) => {
798
+ const themeGetter = (theme) => theme[key] || [];
799
+ themeGetter.isThemeGetter = true;
800
+ return themeGetter;
801
+ };
802
+ var arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
803
+ var fractionRegex = /^\d+\/\d+$/;
804
+ var stringLengths = /* @__PURE__ */ new Set(["px", "full", "screen"]);
805
+ var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
806
+ var lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
807
+ var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
808
+ var shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
809
+ var imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
810
+ var isLength = (value) => isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);
811
+ var isArbitraryLength = (value) => getIsArbitraryValue(value, "length", isLengthOnly);
812
+ var isNumber = (value) => Boolean(value) && !Number.isNaN(Number(value));
813
+ var isArbitraryNumber = (value) => getIsArbitraryValue(value, "number", isNumber);
814
+ var isInteger = (value) => Boolean(value) && Number.isInteger(Number(value));
815
+ var isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
816
+ var isArbitraryValue = (value) => arbitraryValueRegex.test(value);
817
+ var isTshirtSize = (value) => tshirtUnitRegex.test(value);
818
+ var sizeLabels = /* @__PURE__ */ new Set(["length", "size", "percentage"]);
819
+ var isArbitrarySize = (value) => getIsArbitraryValue(value, sizeLabels, isNever);
820
+ var isArbitraryPosition = (value) => getIsArbitraryValue(value, "position", isNever);
821
+ var imageLabels = /* @__PURE__ */ new Set(["image", "url"]);
822
+ var isArbitraryImage = (value) => getIsArbitraryValue(value, imageLabels, isImage);
823
+ var isArbitraryShadow = (value) => getIsArbitraryValue(value, "", isShadow);
824
+ var isAny = () => true;
825
+ var getIsArbitraryValue = (value, label, testValue) => {
826
+ const result = arbitraryValueRegex.exec(value);
827
+ if (result) {
828
+ if (result[1]) {
829
+ return typeof label === "string" ? result[1] === label : label.has(result[1]);
830
+ }
831
+ return testValue(result[2]);
832
+ }
833
+ return false;
834
+ };
835
+ var isLengthOnly = (value) => (
836
+ // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
837
+ // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
838
+ // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
839
+ lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)
840
+ );
841
+ var isNever = () => false;
842
+ var isShadow = (value) => shadowRegex.test(value);
843
+ var isImage = (value) => imageRegex.test(value);
844
+ var getDefaultConfig = () => {
845
+ const colors = fromTheme("colors");
846
+ const spacing2 = fromTheme("spacing");
847
+ const blur = fromTheme("blur");
848
+ const brightness = fromTheme("brightness");
849
+ const borderColor = fromTheme("borderColor");
850
+ const borderRadius2 = fromTheme("borderRadius");
851
+ const borderSpacing = fromTheme("borderSpacing");
852
+ const borderWidth = fromTheme("borderWidth");
853
+ const contrast = fromTheme("contrast");
854
+ const grayscale = fromTheme("grayscale");
855
+ const hueRotate = fromTheme("hueRotate");
856
+ const invert = fromTheme("invert");
857
+ const gap = fromTheme("gap");
858
+ const gradientColorStops = fromTheme("gradientColorStops");
859
+ const gradientColorStopPositions = fromTheme("gradientColorStopPositions");
860
+ const inset = fromTheme("inset");
861
+ const margin = fromTheme("margin");
862
+ const opacity = fromTheme("opacity");
863
+ const padding = fromTheme("padding");
864
+ const saturate = fromTheme("saturate");
865
+ const scale = fromTheme("scale");
866
+ const sepia = fromTheme("sepia");
867
+ const skew = fromTheme("skew");
868
+ const space = fromTheme("space");
869
+ const translate = fromTheme("translate");
870
+ const getOverscroll = () => ["auto", "contain", "none"];
871
+ const getOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
872
+ const getSpacingWithAutoAndArbitrary = () => ["auto", isArbitraryValue, spacing2];
873
+ const getSpacingWithArbitrary = () => [isArbitraryValue, spacing2];
874
+ const getLengthWithEmptyAndArbitrary = () => ["", isLength, isArbitraryLength];
875
+ const getNumberWithAutoAndArbitrary = () => ["auto", isNumber, isArbitraryValue];
876
+ const getPositions = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"];
877
+ const getLineStyles = () => ["solid", "dashed", "dotted", "double", "none"];
878
+ const getBlendModes = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
879
+ const getAlign = () => ["start", "end", "center", "between", "around", "evenly", "stretch"];
880
+ const getZeroAndEmpty = () => ["", "0", isArbitraryValue];
881
+ const getBreaks = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
882
+ const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];
883
+ return {
884
+ cacheSize: 500,
885
+ separator: ":",
886
+ theme: {
887
+ colors: [isAny],
888
+ spacing: [isLength, isArbitraryLength],
889
+ blur: ["none", "", isTshirtSize, isArbitraryValue],
890
+ brightness: getNumberAndArbitrary(),
891
+ borderColor: [colors],
892
+ borderRadius: ["none", "", "full", isTshirtSize, isArbitraryValue],
893
+ borderSpacing: getSpacingWithArbitrary(),
894
+ borderWidth: getLengthWithEmptyAndArbitrary(),
895
+ contrast: getNumberAndArbitrary(),
896
+ grayscale: getZeroAndEmpty(),
897
+ hueRotate: getNumberAndArbitrary(),
898
+ invert: getZeroAndEmpty(),
899
+ gap: getSpacingWithArbitrary(),
900
+ gradientColorStops: [colors],
901
+ gradientColorStopPositions: [isPercent, isArbitraryLength],
902
+ inset: getSpacingWithAutoAndArbitrary(),
903
+ margin: getSpacingWithAutoAndArbitrary(),
904
+ opacity: getNumberAndArbitrary(),
905
+ padding: getSpacingWithArbitrary(),
906
+ saturate: getNumberAndArbitrary(),
907
+ scale: getNumberAndArbitrary(),
908
+ sepia: getZeroAndEmpty(),
909
+ skew: getNumberAndArbitrary(),
910
+ space: getSpacingWithArbitrary(),
911
+ translate: getSpacingWithArbitrary()
912
+ },
913
+ classGroups: {
914
+ // Layout
915
+ /**
916
+ * Aspect Ratio
917
+ * @see https://tailwindcss.com/docs/aspect-ratio
918
+ */
919
+ aspect: [{
920
+ aspect: ["auto", "square", "video", isArbitraryValue]
921
+ }],
922
+ /**
923
+ * Container
924
+ * @see https://tailwindcss.com/docs/container
925
+ */
926
+ container: ["container"],
927
+ /**
928
+ * Columns
929
+ * @see https://tailwindcss.com/docs/columns
930
+ */
931
+ columns: [{
932
+ columns: [isTshirtSize]
933
+ }],
934
+ /**
935
+ * Break After
936
+ * @see https://tailwindcss.com/docs/break-after
937
+ */
938
+ "break-after": [{
939
+ "break-after": getBreaks()
940
+ }],
941
+ /**
942
+ * Break Before
943
+ * @see https://tailwindcss.com/docs/break-before
944
+ */
945
+ "break-before": [{
946
+ "break-before": getBreaks()
947
+ }],
948
+ /**
949
+ * Break Inside
950
+ * @see https://tailwindcss.com/docs/break-inside
951
+ */
952
+ "break-inside": [{
953
+ "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
954
+ }],
955
+ /**
956
+ * Box Decoration Break
957
+ * @see https://tailwindcss.com/docs/box-decoration-break
958
+ */
959
+ "box-decoration": [{
960
+ "box-decoration": ["slice", "clone"]
961
+ }],
962
+ /**
963
+ * Box Sizing
964
+ * @see https://tailwindcss.com/docs/box-sizing
965
+ */
966
+ box: [{
967
+ box: ["border", "content"]
968
+ }],
969
+ /**
970
+ * Display
971
+ * @see https://tailwindcss.com/docs/display
972
+ */
973
+ display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
974
+ /**
975
+ * Floats
976
+ * @see https://tailwindcss.com/docs/float
977
+ */
978
+ float: [{
979
+ float: ["right", "left", "none", "start", "end"]
980
+ }],
981
+ /**
982
+ * Clear
983
+ * @see https://tailwindcss.com/docs/clear
984
+ */
985
+ clear: [{
986
+ clear: ["left", "right", "both", "none", "start", "end"]
987
+ }],
988
+ /**
989
+ * Isolation
990
+ * @see https://tailwindcss.com/docs/isolation
991
+ */
992
+ isolation: ["isolate", "isolation-auto"],
993
+ /**
994
+ * Object Fit
995
+ * @see https://tailwindcss.com/docs/object-fit
996
+ */
997
+ "object-fit": [{
998
+ object: ["contain", "cover", "fill", "none", "scale-down"]
999
+ }],
1000
+ /**
1001
+ * Object Position
1002
+ * @see https://tailwindcss.com/docs/object-position
1003
+ */
1004
+ "object-position": [{
1005
+ object: [...getPositions(), isArbitraryValue]
1006
+ }],
1007
+ /**
1008
+ * Overflow
1009
+ * @see https://tailwindcss.com/docs/overflow
1010
+ */
1011
+ overflow: [{
1012
+ overflow: getOverflow()
1013
+ }],
1014
+ /**
1015
+ * Overflow X
1016
+ * @see https://tailwindcss.com/docs/overflow
1017
+ */
1018
+ "overflow-x": [{
1019
+ "overflow-x": getOverflow()
1020
+ }],
1021
+ /**
1022
+ * Overflow Y
1023
+ * @see https://tailwindcss.com/docs/overflow
1024
+ */
1025
+ "overflow-y": [{
1026
+ "overflow-y": getOverflow()
1027
+ }],
1028
+ /**
1029
+ * Overscroll Behavior
1030
+ * @see https://tailwindcss.com/docs/overscroll-behavior
1031
+ */
1032
+ overscroll: [{
1033
+ overscroll: getOverscroll()
1034
+ }],
1035
+ /**
1036
+ * Overscroll Behavior X
1037
+ * @see https://tailwindcss.com/docs/overscroll-behavior
1038
+ */
1039
+ "overscroll-x": [{
1040
+ "overscroll-x": getOverscroll()
1041
+ }],
1042
+ /**
1043
+ * Overscroll Behavior Y
1044
+ * @see https://tailwindcss.com/docs/overscroll-behavior
1045
+ */
1046
+ "overscroll-y": [{
1047
+ "overscroll-y": getOverscroll()
1048
+ }],
1049
+ /**
1050
+ * Position
1051
+ * @see https://tailwindcss.com/docs/position
1052
+ */
1053
+ position: ["static", "fixed", "absolute", "relative", "sticky"],
1054
+ /**
1055
+ * Top / Right / Bottom / Left
1056
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1057
+ */
1058
+ inset: [{
1059
+ inset: [inset]
1060
+ }],
1061
+ /**
1062
+ * Right / Left
1063
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1064
+ */
1065
+ "inset-x": [{
1066
+ "inset-x": [inset]
1067
+ }],
1068
+ /**
1069
+ * Top / Bottom
1070
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1071
+ */
1072
+ "inset-y": [{
1073
+ "inset-y": [inset]
1074
+ }],
1075
+ /**
1076
+ * Start
1077
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1078
+ */
1079
+ start: [{
1080
+ start: [inset]
1081
+ }],
1082
+ /**
1083
+ * End
1084
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1085
+ */
1086
+ end: [{
1087
+ end: [inset]
1088
+ }],
1089
+ /**
1090
+ * Top
1091
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1092
+ */
1093
+ top: [{
1094
+ top: [inset]
1095
+ }],
1096
+ /**
1097
+ * Right
1098
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1099
+ */
1100
+ right: [{
1101
+ right: [inset]
1102
+ }],
1103
+ /**
1104
+ * Bottom
1105
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1106
+ */
1107
+ bottom: [{
1108
+ bottom: [inset]
1109
+ }],
1110
+ /**
1111
+ * Left
1112
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1113
+ */
1114
+ left: [{
1115
+ left: [inset]
1116
+ }],
1117
+ /**
1118
+ * Visibility
1119
+ * @see https://tailwindcss.com/docs/visibility
1120
+ */
1121
+ visibility: ["visible", "invisible", "collapse"],
1122
+ /**
1123
+ * Z-Index
1124
+ * @see https://tailwindcss.com/docs/z-index
1125
+ */
1126
+ z: [{
1127
+ z: ["auto", isInteger, isArbitraryValue]
1128
+ }],
1129
+ // Flexbox and Grid
1130
+ /**
1131
+ * Flex Basis
1132
+ * @see https://tailwindcss.com/docs/flex-basis
1133
+ */
1134
+ basis: [{
1135
+ basis: getSpacingWithAutoAndArbitrary()
1136
+ }],
1137
+ /**
1138
+ * Flex Direction
1139
+ * @see https://tailwindcss.com/docs/flex-direction
1140
+ */
1141
+ "flex-direction": [{
1142
+ flex: ["row", "row-reverse", "col", "col-reverse"]
1143
+ }],
1144
+ /**
1145
+ * Flex Wrap
1146
+ * @see https://tailwindcss.com/docs/flex-wrap
1147
+ */
1148
+ "flex-wrap": [{
1149
+ flex: ["wrap", "wrap-reverse", "nowrap"]
1150
+ }],
1151
+ /**
1152
+ * Flex
1153
+ * @see https://tailwindcss.com/docs/flex
1154
+ */
1155
+ flex: [{
1156
+ flex: ["1", "auto", "initial", "none", isArbitraryValue]
1157
+ }],
1158
+ /**
1159
+ * Flex Grow
1160
+ * @see https://tailwindcss.com/docs/flex-grow
1161
+ */
1162
+ grow: [{
1163
+ grow: getZeroAndEmpty()
1164
+ }],
1165
+ /**
1166
+ * Flex Shrink
1167
+ * @see https://tailwindcss.com/docs/flex-shrink
1168
+ */
1169
+ shrink: [{
1170
+ shrink: getZeroAndEmpty()
1171
+ }],
1172
+ /**
1173
+ * Order
1174
+ * @see https://tailwindcss.com/docs/order
1175
+ */
1176
+ order: [{
1177
+ order: ["first", "last", "none", isInteger, isArbitraryValue]
1178
+ }],
1179
+ /**
1180
+ * Grid Template Columns
1181
+ * @see https://tailwindcss.com/docs/grid-template-columns
1182
+ */
1183
+ "grid-cols": [{
1184
+ "grid-cols": [isAny]
1185
+ }],
1186
+ /**
1187
+ * Grid Column Start / End
1188
+ * @see https://tailwindcss.com/docs/grid-column
1189
+ */
1190
+ "col-start-end": [{
1191
+ col: ["auto", {
1192
+ span: ["full", isInteger, isArbitraryValue]
1193
+ }, isArbitraryValue]
1194
+ }],
1195
+ /**
1196
+ * Grid Column Start
1197
+ * @see https://tailwindcss.com/docs/grid-column
1198
+ */
1199
+ "col-start": [{
1200
+ "col-start": getNumberWithAutoAndArbitrary()
1201
+ }],
1202
+ /**
1203
+ * Grid Column End
1204
+ * @see https://tailwindcss.com/docs/grid-column
1205
+ */
1206
+ "col-end": [{
1207
+ "col-end": getNumberWithAutoAndArbitrary()
1208
+ }],
1209
+ /**
1210
+ * Grid Template Rows
1211
+ * @see https://tailwindcss.com/docs/grid-template-rows
1212
+ */
1213
+ "grid-rows": [{
1214
+ "grid-rows": [isAny]
1215
+ }],
1216
+ /**
1217
+ * Grid Row Start / End
1218
+ * @see https://tailwindcss.com/docs/grid-row
1219
+ */
1220
+ "row-start-end": [{
1221
+ row: ["auto", {
1222
+ span: [isInteger, isArbitraryValue]
1223
+ }, isArbitraryValue]
1224
+ }],
1225
+ /**
1226
+ * Grid Row Start
1227
+ * @see https://tailwindcss.com/docs/grid-row
1228
+ */
1229
+ "row-start": [{
1230
+ "row-start": getNumberWithAutoAndArbitrary()
1231
+ }],
1232
+ /**
1233
+ * Grid Row End
1234
+ * @see https://tailwindcss.com/docs/grid-row
1235
+ */
1236
+ "row-end": [{
1237
+ "row-end": getNumberWithAutoAndArbitrary()
1238
+ }],
1239
+ /**
1240
+ * Grid Auto Flow
1241
+ * @see https://tailwindcss.com/docs/grid-auto-flow
1242
+ */
1243
+ "grid-flow": [{
1244
+ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
1245
+ }],
1246
+ /**
1247
+ * Grid Auto Columns
1248
+ * @see https://tailwindcss.com/docs/grid-auto-columns
1249
+ */
1250
+ "auto-cols": [{
1251
+ "auto-cols": ["auto", "min", "max", "fr", isArbitraryValue]
1252
+ }],
1253
+ /**
1254
+ * Grid Auto Rows
1255
+ * @see https://tailwindcss.com/docs/grid-auto-rows
1256
+ */
1257
+ "auto-rows": [{
1258
+ "auto-rows": ["auto", "min", "max", "fr", isArbitraryValue]
1259
+ }],
1260
+ /**
1261
+ * Gap
1262
+ * @see https://tailwindcss.com/docs/gap
1263
+ */
1264
+ gap: [{
1265
+ gap: [gap]
1266
+ }],
1267
+ /**
1268
+ * Gap X
1269
+ * @see https://tailwindcss.com/docs/gap
1270
+ */
1271
+ "gap-x": [{
1272
+ "gap-x": [gap]
1273
+ }],
1274
+ /**
1275
+ * Gap Y
1276
+ * @see https://tailwindcss.com/docs/gap
1277
+ */
1278
+ "gap-y": [{
1279
+ "gap-y": [gap]
1280
+ }],
1281
+ /**
1282
+ * Justify Content
1283
+ * @see https://tailwindcss.com/docs/justify-content
1284
+ */
1285
+ "justify-content": [{
1286
+ justify: ["normal", ...getAlign()]
1287
+ }],
1288
+ /**
1289
+ * Justify Items
1290
+ * @see https://tailwindcss.com/docs/justify-items
1291
+ */
1292
+ "justify-items": [{
1293
+ "justify-items": ["start", "end", "center", "stretch"]
1294
+ }],
1295
+ /**
1296
+ * Justify Self
1297
+ * @see https://tailwindcss.com/docs/justify-self
1298
+ */
1299
+ "justify-self": [{
1300
+ "justify-self": ["auto", "start", "end", "center", "stretch"]
1301
+ }],
1302
+ /**
1303
+ * Align Content
1304
+ * @see https://tailwindcss.com/docs/align-content
1305
+ */
1306
+ "align-content": [{
1307
+ content: ["normal", ...getAlign(), "baseline"]
1308
+ }],
1309
+ /**
1310
+ * Align Items
1311
+ * @see https://tailwindcss.com/docs/align-items
1312
+ */
1313
+ "align-items": [{
1314
+ items: ["start", "end", "center", "baseline", "stretch"]
1315
+ }],
1316
+ /**
1317
+ * Align Self
1318
+ * @see https://tailwindcss.com/docs/align-self
1319
+ */
1320
+ "align-self": [{
1321
+ self: ["auto", "start", "end", "center", "stretch", "baseline"]
1322
+ }],
1323
+ /**
1324
+ * Place Content
1325
+ * @see https://tailwindcss.com/docs/place-content
1326
+ */
1327
+ "place-content": [{
1328
+ "place-content": [...getAlign(), "baseline"]
1329
+ }],
1330
+ /**
1331
+ * Place Items
1332
+ * @see https://tailwindcss.com/docs/place-items
1333
+ */
1334
+ "place-items": [{
1335
+ "place-items": ["start", "end", "center", "baseline", "stretch"]
1336
+ }],
1337
+ /**
1338
+ * Place Self
1339
+ * @see https://tailwindcss.com/docs/place-self
1340
+ */
1341
+ "place-self": [{
1342
+ "place-self": ["auto", "start", "end", "center", "stretch"]
1343
+ }],
1344
+ // Spacing
1345
+ /**
1346
+ * Padding
1347
+ * @see https://tailwindcss.com/docs/padding
1348
+ */
1349
+ p: [{
1350
+ p: [padding]
1351
+ }],
1352
+ /**
1353
+ * Padding X
1354
+ * @see https://tailwindcss.com/docs/padding
1355
+ */
1356
+ px: [{
1357
+ px: [padding]
1358
+ }],
1359
+ /**
1360
+ * Padding Y
1361
+ * @see https://tailwindcss.com/docs/padding
1362
+ */
1363
+ py: [{
1364
+ py: [padding]
1365
+ }],
1366
+ /**
1367
+ * Padding Start
1368
+ * @see https://tailwindcss.com/docs/padding
1369
+ */
1370
+ ps: [{
1371
+ ps: [padding]
1372
+ }],
1373
+ /**
1374
+ * Padding End
1375
+ * @see https://tailwindcss.com/docs/padding
1376
+ */
1377
+ pe: [{
1378
+ pe: [padding]
1379
+ }],
1380
+ /**
1381
+ * Padding Top
1382
+ * @see https://tailwindcss.com/docs/padding
1383
+ */
1384
+ pt: [{
1385
+ pt: [padding]
1386
+ }],
1387
+ /**
1388
+ * Padding Right
1389
+ * @see https://tailwindcss.com/docs/padding
1390
+ */
1391
+ pr: [{
1392
+ pr: [padding]
1393
+ }],
1394
+ /**
1395
+ * Padding Bottom
1396
+ * @see https://tailwindcss.com/docs/padding
1397
+ */
1398
+ pb: [{
1399
+ pb: [padding]
1400
+ }],
1401
+ /**
1402
+ * Padding Left
1403
+ * @see https://tailwindcss.com/docs/padding
1404
+ */
1405
+ pl: [{
1406
+ pl: [padding]
1407
+ }],
1408
+ /**
1409
+ * Margin
1410
+ * @see https://tailwindcss.com/docs/margin
1411
+ */
1412
+ m: [{
1413
+ m: [margin]
1414
+ }],
1415
+ /**
1416
+ * Margin X
1417
+ * @see https://tailwindcss.com/docs/margin
1418
+ */
1419
+ mx: [{
1420
+ mx: [margin]
1421
+ }],
1422
+ /**
1423
+ * Margin Y
1424
+ * @see https://tailwindcss.com/docs/margin
1425
+ */
1426
+ my: [{
1427
+ my: [margin]
1428
+ }],
1429
+ /**
1430
+ * Margin Start
1431
+ * @see https://tailwindcss.com/docs/margin
1432
+ */
1433
+ ms: [{
1434
+ ms: [margin]
1435
+ }],
1436
+ /**
1437
+ * Margin End
1438
+ * @see https://tailwindcss.com/docs/margin
1439
+ */
1440
+ me: [{
1441
+ me: [margin]
1442
+ }],
1443
+ /**
1444
+ * Margin Top
1445
+ * @see https://tailwindcss.com/docs/margin
1446
+ */
1447
+ mt: [{
1448
+ mt: [margin]
1449
+ }],
1450
+ /**
1451
+ * Margin Right
1452
+ * @see https://tailwindcss.com/docs/margin
1453
+ */
1454
+ mr: [{
1455
+ mr: [margin]
1456
+ }],
1457
+ /**
1458
+ * Margin Bottom
1459
+ * @see https://tailwindcss.com/docs/margin
1460
+ */
1461
+ mb: [{
1462
+ mb: [margin]
1463
+ }],
1464
+ /**
1465
+ * Margin Left
1466
+ * @see https://tailwindcss.com/docs/margin
1467
+ */
1468
+ ml: [{
1469
+ ml: [margin]
1470
+ }],
1471
+ /**
1472
+ * Space Between X
1473
+ * @see https://tailwindcss.com/docs/space
1474
+ */
1475
+ "space-x": [{
1476
+ "space-x": [space]
1477
+ }],
1478
+ /**
1479
+ * Space Between X Reverse
1480
+ * @see https://tailwindcss.com/docs/space
1481
+ */
1482
+ "space-x-reverse": ["space-x-reverse"],
1483
+ /**
1484
+ * Space Between Y
1485
+ * @see https://tailwindcss.com/docs/space
1486
+ */
1487
+ "space-y": [{
1488
+ "space-y": [space]
1489
+ }],
1490
+ /**
1491
+ * Space Between Y Reverse
1492
+ * @see https://tailwindcss.com/docs/space
1493
+ */
1494
+ "space-y-reverse": ["space-y-reverse"],
1495
+ // Sizing
1496
+ /**
1497
+ * Width
1498
+ * @see https://tailwindcss.com/docs/width
1499
+ */
1500
+ w: [{
1501
+ w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", isArbitraryValue, spacing2]
1502
+ }],
1503
+ /**
1504
+ * Min-Width
1505
+ * @see https://tailwindcss.com/docs/min-width
1506
+ */
1507
+ "min-w": [{
1508
+ "min-w": [isArbitraryValue, spacing2, "min", "max", "fit"]
1509
+ }],
1510
+ /**
1511
+ * Max-Width
1512
+ * @see https://tailwindcss.com/docs/max-width
1513
+ */
1514
+ "max-w": [{
1515
+ "max-w": [isArbitraryValue, spacing2, "none", "full", "min", "max", "fit", "prose", {
1516
+ screen: [isTshirtSize]
1517
+ }, isTshirtSize]
1518
+ }],
1519
+ /**
1520
+ * Height
1521
+ * @see https://tailwindcss.com/docs/height
1522
+ */
1523
+ h: [{
1524
+ h: [isArbitraryValue, spacing2, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
1525
+ }],
1526
+ /**
1527
+ * Min-Height
1528
+ * @see https://tailwindcss.com/docs/min-height
1529
+ */
1530
+ "min-h": [{
1531
+ "min-h": [isArbitraryValue, spacing2, "min", "max", "fit", "svh", "lvh", "dvh"]
1532
+ }],
1533
+ /**
1534
+ * Max-Height
1535
+ * @see https://tailwindcss.com/docs/max-height
1536
+ */
1537
+ "max-h": [{
1538
+ "max-h": [isArbitraryValue, spacing2, "min", "max", "fit", "svh", "lvh", "dvh"]
1539
+ }],
1540
+ /**
1541
+ * Size
1542
+ * @see https://tailwindcss.com/docs/size
1543
+ */
1544
+ size: [{
1545
+ size: [isArbitraryValue, spacing2, "auto", "min", "max", "fit"]
1546
+ }],
1547
+ // Typography
1548
+ /**
1549
+ * Font Size
1550
+ * @see https://tailwindcss.com/docs/font-size
1551
+ */
1552
+ "font-size": [{
1553
+ text: ["base", isTshirtSize, isArbitraryLength]
1554
+ }],
1555
+ /**
1556
+ * Font Smoothing
1557
+ * @see https://tailwindcss.com/docs/font-smoothing
1558
+ */
1559
+ "font-smoothing": ["antialiased", "subpixel-antialiased"],
1560
+ /**
1561
+ * Font Style
1562
+ * @see https://tailwindcss.com/docs/font-style
1563
+ */
1564
+ "font-style": ["italic", "not-italic"],
1565
+ /**
1566
+ * Font Weight
1567
+ * @see https://tailwindcss.com/docs/font-weight
1568
+ */
1569
+ "font-weight": [{
1570
+ font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", isArbitraryNumber]
1571
+ }],
1572
+ /**
1573
+ * Font Family
1574
+ * @see https://tailwindcss.com/docs/font-family
1575
+ */
1576
+ "font-family": [{
1577
+ font: [isAny]
1578
+ }],
1579
+ /**
1580
+ * Font Variant Numeric
1581
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1582
+ */
1583
+ "fvn-normal": ["normal-nums"],
1584
+ /**
1585
+ * Font Variant Numeric
1586
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1587
+ */
1588
+ "fvn-ordinal": ["ordinal"],
1589
+ /**
1590
+ * Font Variant Numeric
1591
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1592
+ */
1593
+ "fvn-slashed-zero": ["slashed-zero"],
1594
+ /**
1595
+ * Font Variant Numeric
1596
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1597
+ */
1598
+ "fvn-figure": ["lining-nums", "oldstyle-nums"],
1599
+ /**
1600
+ * Font Variant Numeric
1601
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1602
+ */
1603
+ "fvn-spacing": ["proportional-nums", "tabular-nums"],
1604
+ /**
1605
+ * Font Variant Numeric
1606
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1607
+ */
1608
+ "fvn-fraction": ["diagonal-fractions", "stacked-fractons"],
1609
+ /**
1610
+ * Letter Spacing
1611
+ * @see https://tailwindcss.com/docs/letter-spacing
1612
+ */
1613
+ tracking: [{
1614
+ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", isArbitraryValue]
1615
+ }],
1616
+ /**
1617
+ * Line Clamp
1618
+ * @see https://tailwindcss.com/docs/line-clamp
1619
+ */
1620
+ "line-clamp": [{
1621
+ "line-clamp": ["none", isNumber, isArbitraryNumber]
1622
+ }],
1623
+ /**
1624
+ * Line Height
1625
+ * @see https://tailwindcss.com/docs/line-height
1626
+ */
1627
+ leading: [{
1628
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", isLength, isArbitraryValue]
1629
+ }],
1630
+ /**
1631
+ * List Style Image
1632
+ * @see https://tailwindcss.com/docs/list-style-image
1633
+ */
1634
+ "list-image": [{
1635
+ "list-image": ["none", isArbitraryValue]
1636
+ }],
1637
+ /**
1638
+ * List Style Type
1639
+ * @see https://tailwindcss.com/docs/list-style-type
1640
+ */
1641
+ "list-style-type": [{
1642
+ list: ["none", "disc", "decimal", isArbitraryValue]
1643
+ }],
1644
+ /**
1645
+ * List Style Position
1646
+ * @see https://tailwindcss.com/docs/list-style-position
1647
+ */
1648
+ "list-style-position": [{
1649
+ list: ["inside", "outside"]
1650
+ }],
1651
+ /**
1652
+ * Placeholder Color
1653
+ * @deprecated since Tailwind CSS v3.0.0
1654
+ * @see https://tailwindcss.com/docs/placeholder-color
1655
+ */
1656
+ "placeholder-color": [{
1657
+ placeholder: [colors]
1658
+ }],
1659
+ /**
1660
+ * Placeholder Opacity
1661
+ * @see https://tailwindcss.com/docs/placeholder-opacity
1662
+ */
1663
+ "placeholder-opacity": [{
1664
+ "placeholder-opacity": [opacity]
1665
+ }],
1666
+ /**
1667
+ * Text Alignment
1668
+ * @see https://tailwindcss.com/docs/text-align
1669
+ */
1670
+ "text-alignment": [{
1671
+ text: ["left", "center", "right", "justify", "start", "end"]
1672
+ }],
1673
+ /**
1674
+ * Text Color
1675
+ * @see https://tailwindcss.com/docs/text-color
1676
+ */
1677
+ "text-color": [{
1678
+ text: [colors]
1679
+ }],
1680
+ /**
1681
+ * Text Opacity
1682
+ * @see https://tailwindcss.com/docs/text-opacity
1683
+ */
1684
+ "text-opacity": [{
1685
+ "text-opacity": [opacity]
1686
+ }],
1687
+ /**
1688
+ * Text Decoration
1689
+ * @see https://tailwindcss.com/docs/text-decoration
1690
+ */
1691
+ "text-decoration": ["underline", "overline", "line-through", "no-underline"],
1692
+ /**
1693
+ * Text Decoration Style
1694
+ * @see https://tailwindcss.com/docs/text-decoration-style
1695
+ */
1696
+ "text-decoration-style": [{
1697
+ decoration: [...getLineStyles(), "wavy"]
1698
+ }],
1699
+ /**
1700
+ * Text Decoration Thickness
1701
+ * @see https://tailwindcss.com/docs/text-decoration-thickness
1702
+ */
1703
+ "text-decoration-thickness": [{
1704
+ decoration: ["auto", "from-font", isLength, isArbitraryLength]
1705
+ }],
1706
+ /**
1707
+ * Text Underline Offset
1708
+ * @see https://tailwindcss.com/docs/text-underline-offset
1709
+ */
1710
+ "underline-offset": [{
1711
+ "underline-offset": ["auto", isLength, isArbitraryValue]
1712
+ }],
1713
+ /**
1714
+ * Text Decoration Color
1715
+ * @see https://tailwindcss.com/docs/text-decoration-color
1716
+ */
1717
+ "text-decoration-color": [{
1718
+ decoration: [colors]
1719
+ }],
1720
+ /**
1721
+ * Text Transform
1722
+ * @see https://tailwindcss.com/docs/text-transform
1723
+ */
1724
+ "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
1725
+ /**
1726
+ * Text Overflow
1727
+ * @see https://tailwindcss.com/docs/text-overflow
1728
+ */
1729
+ "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
1730
+ /**
1731
+ * Text Wrap
1732
+ * @see https://tailwindcss.com/docs/text-wrap
1733
+ */
1734
+ "text-wrap": [{
1735
+ text: ["wrap", "nowrap", "balance", "pretty"]
1736
+ }],
1737
+ /**
1738
+ * Text Indent
1739
+ * @see https://tailwindcss.com/docs/text-indent
1740
+ */
1741
+ indent: [{
1742
+ indent: getSpacingWithArbitrary()
1743
+ }],
1744
+ /**
1745
+ * Vertical Alignment
1746
+ * @see https://tailwindcss.com/docs/vertical-align
1747
+ */
1748
+ "vertical-align": [{
1749
+ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryValue]
1750
+ }],
1751
+ /**
1752
+ * Whitespace
1753
+ * @see https://tailwindcss.com/docs/whitespace
1754
+ */
1755
+ whitespace: [{
1756
+ whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
1757
+ }],
1758
+ /**
1759
+ * Word Break
1760
+ * @see https://tailwindcss.com/docs/word-break
1761
+ */
1762
+ break: [{
1763
+ break: ["normal", "words", "all", "keep"]
1764
+ }],
1765
+ /**
1766
+ * Hyphens
1767
+ * @see https://tailwindcss.com/docs/hyphens
1768
+ */
1769
+ hyphens: [{
1770
+ hyphens: ["none", "manual", "auto"]
1771
+ }],
1772
+ /**
1773
+ * Content
1774
+ * @see https://tailwindcss.com/docs/content
1775
+ */
1776
+ content: [{
1777
+ content: ["none", isArbitraryValue]
1778
+ }],
1779
+ // Backgrounds
1780
+ /**
1781
+ * Background Attachment
1782
+ * @see https://tailwindcss.com/docs/background-attachment
1783
+ */
1784
+ "bg-attachment": [{
1785
+ bg: ["fixed", "local", "scroll"]
1786
+ }],
1787
+ /**
1788
+ * Background Clip
1789
+ * @see https://tailwindcss.com/docs/background-clip
1790
+ */
1791
+ "bg-clip": [{
1792
+ "bg-clip": ["border", "padding", "content", "text"]
1793
+ }],
1794
+ /**
1795
+ * Background Opacity
1796
+ * @deprecated since Tailwind CSS v3.0.0
1797
+ * @see https://tailwindcss.com/docs/background-opacity
1798
+ */
1799
+ "bg-opacity": [{
1800
+ "bg-opacity": [opacity]
1801
+ }],
1802
+ /**
1803
+ * Background Origin
1804
+ * @see https://tailwindcss.com/docs/background-origin
1805
+ */
1806
+ "bg-origin": [{
1807
+ "bg-origin": ["border", "padding", "content"]
1808
+ }],
1809
+ /**
1810
+ * Background Position
1811
+ * @see https://tailwindcss.com/docs/background-position
1812
+ */
1813
+ "bg-position": [{
1814
+ bg: [...getPositions(), isArbitraryPosition]
1815
+ }],
1816
+ /**
1817
+ * Background Repeat
1818
+ * @see https://tailwindcss.com/docs/background-repeat
1819
+ */
1820
+ "bg-repeat": [{
1821
+ bg: ["no-repeat", {
1822
+ repeat: ["", "x", "y", "round", "space"]
1823
+ }]
1824
+ }],
1825
+ /**
1826
+ * Background Size
1827
+ * @see https://tailwindcss.com/docs/background-size
1828
+ */
1829
+ "bg-size": [{
1830
+ bg: ["auto", "cover", "contain", isArbitrarySize]
1831
+ }],
1832
+ /**
1833
+ * Background Image
1834
+ * @see https://tailwindcss.com/docs/background-image
1835
+ */
1836
+ "bg-image": [{
1837
+ bg: ["none", {
1838
+ "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1839
+ }, isArbitraryImage]
1840
+ }],
1841
+ /**
1842
+ * Background Color
1843
+ * @see https://tailwindcss.com/docs/background-color
1844
+ */
1845
+ "bg-color": [{
1846
+ bg: [colors]
1847
+ }],
1848
+ /**
1849
+ * Gradient Color Stops From Position
1850
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1851
+ */
1852
+ "gradient-from-pos": [{
1853
+ from: [gradientColorStopPositions]
1854
+ }],
1855
+ /**
1856
+ * Gradient Color Stops Via Position
1857
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1858
+ */
1859
+ "gradient-via-pos": [{
1860
+ via: [gradientColorStopPositions]
1861
+ }],
1862
+ /**
1863
+ * Gradient Color Stops To Position
1864
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1865
+ */
1866
+ "gradient-to-pos": [{
1867
+ to: [gradientColorStopPositions]
1868
+ }],
1869
+ /**
1870
+ * Gradient Color Stops From
1871
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1872
+ */
1873
+ "gradient-from": [{
1874
+ from: [gradientColorStops]
1875
+ }],
1876
+ /**
1877
+ * Gradient Color Stops Via
1878
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1879
+ */
1880
+ "gradient-via": [{
1881
+ via: [gradientColorStops]
1882
+ }],
1883
+ /**
1884
+ * Gradient Color Stops To
1885
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1886
+ */
1887
+ "gradient-to": [{
1888
+ to: [gradientColorStops]
1889
+ }],
1890
+ // Borders
1891
+ /**
1892
+ * Border Radius
1893
+ * @see https://tailwindcss.com/docs/border-radius
1894
+ */
1895
+ rounded: [{
1896
+ rounded: [borderRadius2]
1897
+ }],
1898
+ /**
1899
+ * Border Radius Start
1900
+ * @see https://tailwindcss.com/docs/border-radius
1901
+ */
1902
+ "rounded-s": [{
1903
+ "rounded-s": [borderRadius2]
1904
+ }],
1905
+ /**
1906
+ * Border Radius End
1907
+ * @see https://tailwindcss.com/docs/border-radius
1908
+ */
1909
+ "rounded-e": [{
1910
+ "rounded-e": [borderRadius2]
1911
+ }],
1912
+ /**
1913
+ * Border Radius Top
1914
+ * @see https://tailwindcss.com/docs/border-radius
1915
+ */
1916
+ "rounded-t": [{
1917
+ "rounded-t": [borderRadius2]
1918
+ }],
1919
+ /**
1920
+ * Border Radius Right
1921
+ * @see https://tailwindcss.com/docs/border-radius
1922
+ */
1923
+ "rounded-r": [{
1924
+ "rounded-r": [borderRadius2]
1925
+ }],
1926
+ /**
1927
+ * Border Radius Bottom
1928
+ * @see https://tailwindcss.com/docs/border-radius
1929
+ */
1930
+ "rounded-b": [{
1931
+ "rounded-b": [borderRadius2]
1932
+ }],
1933
+ /**
1934
+ * Border Radius Left
1935
+ * @see https://tailwindcss.com/docs/border-radius
1936
+ */
1937
+ "rounded-l": [{
1938
+ "rounded-l": [borderRadius2]
1939
+ }],
1940
+ /**
1941
+ * Border Radius Start Start
1942
+ * @see https://tailwindcss.com/docs/border-radius
1943
+ */
1944
+ "rounded-ss": [{
1945
+ "rounded-ss": [borderRadius2]
1946
+ }],
1947
+ /**
1948
+ * Border Radius Start End
1949
+ * @see https://tailwindcss.com/docs/border-radius
1950
+ */
1951
+ "rounded-se": [{
1952
+ "rounded-se": [borderRadius2]
1953
+ }],
1954
+ /**
1955
+ * Border Radius End End
1956
+ * @see https://tailwindcss.com/docs/border-radius
1957
+ */
1958
+ "rounded-ee": [{
1959
+ "rounded-ee": [borderRadius2]
1960
+ }],
1961
+ /**
1962
+ * Border Radius End Start
1963
+ * @see https://tailwindcss.com/docs/border-radius
1964
+ */
1965
+ "rounded-es": [{
1966
+ "rounded-es": [borderRadius2]
1967
+ }],
1968
+ /**
1969
+ * Border Radius Top Left
1970
+ * @see https://tailwindcss.com/docs/border-radius
1971
+ */
1972
+ "rounded-tl": [{
1973
+ "rounded-tl": [borderRadius2]
1974
+ }],
1975
+ /**
1976
+ * Border Radius Top Right
1977
+ * @see https://tailwindcss.com/docs/border-radius
1978
+ */
1979
+ "rounded-tr": [{
1980
+ "rounded-tr": [borderRadius2]
1981
+ }],
1982
+ /**
1983
+ * Border Radius Bottom Right
1984
+ * @see https://tailwindcss.com/docs/border-radius
1985
+ */
1986
+ "rounded-br": [{
1987
+ "rounded-br": [borderRadius2]
1988
+ }],
1989
+ /**
1990
+ * Border Radius Bottom Left
1991
+ * @see https://tailwindcss.com/docs/border-radius
1992
+ */
1993
+ "rounded-bl": [{
1994
+ "rounded-bl": [borderRadius2]
1995
+ }],
1996
+ /**
1997
+ * Border Width
1998
+ * @see https://tailwindcss.com/docs/border-width
1999
+ */
2000
+ "border-w": [{
2001
+ border: [borderWidth]
2002
+ }],
2003
+ /**
2004
+ * Border Width X
2005
+ * @see https://tailwindcss.com/docs/border-width
2006
+ */
2007
+ "border-w-x": [{
2008
+ "border-x": [borderWidth]
2009
+ }],
2010
+ /**
2011
+ * Border Width Y
2012
+ * @see https://tailwindcss.com/docs/border-width
2013
+ */
2014
+ "border-w-y": [{
2015
+ "border-y": [borderWidth]
2016
+ }],
2017
+ /**
2018
+ * Border Width Start
2019
+ * @see https://tailwindcss.com/docs/border-width
2020
+ */
2021
+ "border-w-s": [{
2022
+ "border-s": [borderWidth]
2023
+ }],
2024
+ /**
2025
+ * Border Width End
2026
+ * @see https://tailwindcss.com/docs/border-width
2027
+ */
2028
+ "border-w-e": [{
2029
+ "border-e": [borderWidth]
2030
+ }],
2031
+ /**
2032
+ * Border Width Top
2033
+ * @see https://tailwindcss.com/docs/border-width
2034
+ */
2035
+ "border-w-t": [{
2036
+ "border-t": [borderWidth]
2037
+ }],
2038
+ /**
2039
+ * Border Width Right
2040
+ * @see https://tailwindcss.com/docs/border-width
2041
+ */
2042
+ "border-w-r": [{
2043
+ "border-r": [borderWidth]
2044
+ }],
2045
+ /**
2046
+ * Border Width Bottom
2047
+ * @see https://tailwindcss.com/docs/border-width
2048
+ */
2049
+ "border-w-b": [{
2050
+ "border-b": [borderWidth]
2051
+ }],
2052
+ /**
2053
+ * Border Width Left
2054
+ * @see https://tailwindcss.com/docs/border-width
2055
+ */
2056
+ "border-w-l": [{
2057
+ "border-l": [borderWidth]
2058
+ }],
2059
+ /**
2060
+ * Border Opacity
2061
+ * @see https://tailwindcss.com/docs/border-opacity
2062
+ */
2063
+ "border-opacity": [{
2064
+ "border-opacity": [opacity]
2065
+ }],
2066
+ /**
2067
+ * Border Style
2068
+ * @see https://tailwindcss.com/docs/border-style
2069
+ */
2070
+ "border-style": [{
2071
+ border: [...getLineStyles(), "hidden"]
2072
+ }],
2073
+ /**
2074
+ * Divide Width X
2075
+ * @see https://tailwindcss.com/docs/divide-width
2076
+ */
2077
+ "divide-x": [{
2078
+ "divide-x": [borderWidth]
2079
+ }],
2080
+ /**
2081
+ * Divide Width X Reverse
2082
+ * @see https://tailwindcss.com/docs/divide-width
2083
+ */
2084
+ "divide-x-reverse": ["divide-x-reverse"],
2085
+ /**
2086
+ * Divide Width Y
2087
+ * @see https://tailwindcss.com/docs/divide-width
2088
+ */
2089
+ "divide-y": [{
2090
+ "divide-y": [borderWidth]
2091
+ }],
2092
+ /**
2093
+ * Divide Width Y Reverse
2094
+ * @see https://tailwindcss.com/docs/divide-width
2095
+ */
2096
+ "divide-y-reverse": ["divide-y-reverse"],
2097
+ /**
2098
+ * Divide Opacity
2099
+ * @see https://tailwindcss.com/docs/divide-opacity
2100
+ */
2101
+ "divide-opacity": [{
2102
+ "divide-opacity": [opacity]
2103
+ }],
2104
+ /**
2105
+ * Divide Style
2106
+ * @see https://tailwindcss.com/docs/divide-style
2107
+ */
2108
+ "divide-style": [{
2109
+ divide: getLineStyles()
2110
+ }],
2111
+ /**
2112
+ * Border Color
2113
+ * @see https://tailwindcss.com/docs/border-color
2114
+ */
2115
+ "border-color": [{
2116
+ border: [borderColor]
2117
+ }],
2118
+ /**
2119
+ * Border Color X
2120
+ * @see https://tailwindcss.com/docs/border-color
2121
+ */
2122
+ "border-color-x": [{
2123
+ "border-x": [borderColor]
2124
+ }],
2125
+ /**
2126
+ * Border Color Y
2127
+ * @see https://tailwindcss.com/docs/border-color
2128
+ */
2129
+ "border-color-y": [{
2130
+ "border-y": [borderColor]
2131
+ }],
2132
+ /**
2133
+ * Border Color S
2134
+ * @see https://tailwindcss.com/docs/border-color
2135
+ */
2136
+ "border-color-s": [{
2137
+ "border-s": [borderColor]
2138
+ }],
2139
+ /**
2140
+ * Border Color E
2141
+ * @see https://tailwindcss.com/docs/border-color
2142
+ */
2143
+ "border-color-e": [{
2144
+ "border-e": [borderColor]
2145
+ }],
2146
+ /**
2147
+ * Border Color Top
2148
+ * @see https://tailwindcss.com/docs/border-color
2149
+ */
2150
+ "border-color-t": [{
2151
+ "border-t": [borderColor]
2152
+ }],
2153
+ /**
2154
+ * Border Color Right
2155
+ * @see https://tailwindcss.com/docs/border-color
2156
+ */
2157
+ "border-color-r": [{
2158
+ "border-r": [borderColor]
2159
+ }],
2160
+ /**
2161
+ * Border Color Bottom
2162
+ * @see https://tailwindcss.com/docs/border-color
2163
+ */
2164
+ "border-color-b": [{
2165
+ "border-b": [borderColor]
2166
+ }],
2167
+ /**
2168
+ * Border Color Left
2169
+ * @see https://tailwindcss.com/docs/border-color
2170
+ */
2171
+ "border-color-l": [{
2172
+ "border-l": [borderColor]
2173
+ }],
2174
+ /**
2175
+ * Divide Color
2176
+ * @see https://tailwindcss.com/docs/divide-color
2177
+ */
2178
+ "divide-color": [{
2179
+ divide: [borderColor]
2180
+ }],
2181
+ /**
2182
+ * Outline Style
2183
+ * @see https://tailwindcss.com/docs/outline-style
2184
+ */
2185
+ "outline-style": [{
2186
+ outline: ["", ...getLineStyles()]
2187
+ }],
2188
+ /**
2189
+ * Outline Offset
2190
+ * @see https://tailwindcss.com/docs/outline-offset
2191
+ */
2192
+ "outline-offset": [{
2193
+ "outline-offset": [isLength, isArbitraryValue]
2194
+ }],
2195
+ /**
2196
+ * Outline Width
2197
+ * @see https://tailwindcss.com/docs/outline-width
2198
+ */
2199
+ "outline-w": [{
2200
+ outline: [isLength, isArbitraryLength]
2201
+ }],
2202
+ /**
2203
+ * Outline Color
2204
+ * @see https://tailwindcss.com/docs/outline-color
2205
+ */
2206
+ "outline-color": [{
2207
+ outline: [colors]
2208
+ }],
2209
+ /**
2210
+ * Ring Width
2211
+ * @see https://tailwindcss.com/docs/ring-width
2212
+ */
2213
+ "ring-w": [{
2214
+ ring: getLengthWithEmptyAndArbitrary()
2215
+ }],
2216
+ /**
2217
+ * Ring Width Inset
2218
+ * @see https://tailwindcss.com/docs/ring-width
2219
+ */
2220
+ "ring-w-inset": ["ring-inset"],
2221
+ /**
2222
+ * Ring Color
2223
+ * @see https://tailwindcss.com/docs/ring-color
2224
+ */
2225
+ "ring-color": [{
2226
+ ring: [colors]
2227
+ }],
2228
+ /**
2229
+ * Ring Opacity
2230
+ * @see https://tailwindcss.com/docs/ring-opacity
2231
+ */
2232
+ "ring-opacity": [{
2233
+ "ring-opacity": [opacity]
2234
+ }],
2235
+ /**
2236
+ * Ring Offset Width
2237
+ * @see https://tailwindcss.com/docs/ring-offset-width
2238
+ */
2239
+ "ring-offset-w": [{
2240
+ "ring-offset": [isLength, isArbitraryLength]
2241
+ }],
2242
+ /**
2243
+ * Ring Offset Color
2244
+ * @see https://tailwindcss.com/docs/ring-offset-color
2245
+ */
2246
+ "ring-offset-color": [{
2247
+ "ring-offset": [colors]
2248
+ }],
2249
+ // Effects
2250
+ /**
2251
+ * Box Shadow
2252
+ * @see https://tailwindcss.com/docs/box-shadow
2253
+ */
2254
+ shadow: [{
2255
+ shadow: ["", "inner", "none", isTshirtSize, isArbitraryShadow]
2256
+ }],
2257
+ /**
2258
+ * Box Shadow Color
2259
+ * @see https://tailwindcss.com/docs/box-shadow-color
2260
+ */
2261
+ "shadow-color": [{
2262
+ shadow: [isAny]
2263
+ }],
2264
+ /**
2265
+ * Opacity
2266
+ * @see https://tailwindcss.com/docs/opacity
2267
+ */
2268
+ opacity: [{
2269
+ opacity: [opacity]
2270
+ }],
2271
+ /**
2272
+ * Mix Blend Mode
2273
+ * @see https://tailwindcss.com/docs/mix-blend-mode
2274
+ */
2275
+ "mix-blend": [{
2276
+ "mix-blend": [...getBlendModes(), "plus-lighter", "plus-darker"]
2277
+ }],
2278
+ /**
2279
+ * Background Blend Mode
2280
+ * @see https://tailwindcss.com/docs/background-blend-mode
2281
+ */
2282
+ "bg-blend": [{
2283
+ "bg-blend": getBlendModes()
2284
+ }],
2285
+ // Filters
2286
+ /**
2287
+ * Filter
2288
+ * @deprecated since Tailwind CSS v3.0.0
2289
+ * @see https://tailwindcss.com/docs/filter
2290
+ */
2291
+ filter: [{
2292
+ filter: ["", "none"]
2293
+ }],
2294
+ /**
2295
+ * Blur
2296
+ * @see https://tailwindcss.com/docs/blur
2297
+ */
2298
+ blur: [{
2299
+ blur: [blur]
2300
+ }],
2301
+ /**
2302
+ * Brightness
2303
+ * @see https://tailwindcss.com/docs/brightness
2304
+ */
2305
+ brightness: [{
2306
+ brightness: [brightness]
2307
+ }],
2308
+ /**
2309
+ * Contrast
2310
+ * @see https://tailwindcss.com/docs/contrast
2311
+ */
2312
+ contrast: [{
2313
+ contrast: [contrast]
2314
+ }],
2315
+ /**
2316
+ * Drop Shadow
2317
+ * @see https://tailwindcss.com/docs/drop-shadow
2318
+ */
2319
+ "drop-shadow": [{
2320
+ "drop-shadow": ["", "none", isTshirtSize, isArbitraryValue]
2321
+ }],
2322
+ /**
2323
+ * Grayscale
2324
+ * @see https://tailwindcss.com/docs/grayscale
2325
+ */
2326
+ grayscale: [{
2327
+ grayscale: [grayscale]
2328
+ }],
2329
+ /**
2330
+ * Hue Rotate
2331
+ * @see https://tailwindcss.com/docs/hue-rotate
2332
+ */
2333
+ "hue-rotate": [{
2334
+ "hue-rotate": [hueRotate]
2335
+ }],
2336
+ /**
2337
+ * Invert
2338
+ * @see https://tailwindcss.com/docs/invert
2339
+ */
2340
+ invert: [{
2341
+ invert: [invert]
2342
+ }],
2343
+ /**
2344
+ * Saturate
2345
+ * @see https://tailwindcss.com/docs/saturate
2346
+ */
2347
+ saturate: [{
2348
+ saturate: [saturate]
2349
+ }],
2350
+ /**
2351
+ * Sepia
2352
+ * @see https://tailwindcss.com/docs/sepia
2353
+ */
2354
+ sepia: [{
2355
+ sepia: [sepia]
2356
+ }],
2357
+ /**
2358
+ * Backdrop Filter
2359
+ * @deprecated since Tailwind CSS v3.0.0
2360
+ * @see https://tailwindcss.com/docs/backdrop-filter
2361
+ */
2362
+ "backdrop-filter": [{
2363
+ "backdrop-filter": ["", "none"]
2364
+ }],
2365
+ /**
2366
+ * Backdrop Blur
2367
+ * @see https://tailwindcss.com/docs/backdrop-blur
2368
+ */
2369
+ "backdrop-blur": [{
2370
+ "backdrop-blur": [blur]
2371
+ }],
2372
+ /**
2373
+ * Backdrop Brightness
2374
+ * @see https://tailwindcss.com/docs/backdrop-brightness
2375
+ */
2376
+ "backdrop-brightness": [{
2377
+ "backdrop-brightness": [brightness]
2378
+ }],
2379
+ /**
2380
+ * Backdrop Contrast
2381
+ * @see https://tailwindcss.com/docs/backdrop-contrast
2382
+ */
2383
+ "backdrop-contrast": [{
2384
+ "backdrop-contrast": [contrast]
2385
+ }],
2386
+ /**
2387
+ * Backdrop Grayscale
2388
+ * @see https://tailwindcss.com/docs/backdrop-grayscale
2389
+ */
2390
+ "backdrop-grayscale": [{
2391
+ "backdrop-grayscale": [grayscale]
2392
+ }],
2393
+ /**
2394
+ * Backdrop Hue Rotate
2395
+ * @see https://tailwindcss.com/docs/backdrop-hue-rotate
2396
+ */
2397
+ "backdrop-hue-rotate": [{
2398
+ "backdrop-hue-rotate": [hueRotate]
2399
+ }],
2400
+ /**
2401
+ * Backdrop Invert
2402
+ * @see https://tailwindcss.com/docs/backdrop-invert
2403
+ */
2404
+ "backdrop-invert": [{
2405
+ "backdrop-invert": [invert]
2406
+ }],
2407
+ /**
2408
+ * Backdrop Opacity
2409
+ * @see https://tailwindcss.com/docs/backdrop-opacity
2410
+ */
2411
+ "backdrop-opacity": [{
2412
+ "backdrop-opacity": [opacity]
2413
+ }],
2414
+ /**
2415
+ * Backdrop Saturate
2416
+ * @see https://tailwindcss.com/docs/backdrop-saturate
2417
+ */
2418
+ "backdrop-saturate": [{
2419
+ "backdrop-saturate": [saturate]
2420
+ }],
2421
+ /**
2422
+ * Backdrop Sepia
2423
+ * @see https://tailwindcss.com/docs/backdrop-sepia
2424
+ */
2425
+ "backdrop-sepia": [{
2426
+ "backdrop-sepia": [sepia]
2427
+ }],
2428
+ // Tables
2429
+ /**
2430
+ * Border Collapse
2431
+ * @see https://tailwindcss.com/docs/border-collapse
2432
+ */
2433
+ "border-collapse": [{
2434
+ border: ["collapse", "separate"]
2435
+ }],
2436
+ /**
2437
+ * Border Spacing
2438
+ * @see https://tailwindcss.com/docs/border-spacing
2439
+ */
2440
+ "border-spacing": [{
2441
+ "border-spacing": [borderSpacing]
2442
+ }],
2443
+ /**
2444
+ * Border Spacing X
2445
+ * @see https://tailwindcss.com/docs/border-spacing
2446
+ */
2447
+ "border-spacing-x": [{
2448
+ "border-spacing-x": [borderSpacing]
2449
+ }],
2450
+ /**
2451
+ * Border Spacing Y
2452
+ * @see https://tailwindcss.com/docs/border-spacing
2453
+ */
2454
+ "border-spacing-y": [{
2455
+ "border-spacing-y": [borderSpacing]
2456
+ }],
2457
+ /**
2458
+ * Table Layout
2459
+ * @see https://tailwindcss.com/docs/table-layout
2460
+ */
2461
+ "table-layout": [{
2462
+ table: ["auto", "fixed"]
2463
+ }],
2464
+ /**
2465
+ * Caption Side
2466
+ * @see https://tailwindcss.com/docs/caption-side
2467
+ */
2468
+ caption: [{
2469
+ caption: ["top", "bottom"]
2470
+ }],
2471
+ // Transitions and Animation
2472
+ /**
2473
+ * Tranisition Property
2474
+ * @see https://tailwindcss.com/docs/transition-property
2475
+ */
2476
+ transition: [{
2477
+ transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", isArbitraryValue]
2478
+ }],
2479
+ /**
2480
+ * Transition Duration
2481
+ * @see https://tailwindcss.com/docs/transition-duration
2482
+ */
2483
+ duration: [{
2484
+ duration: getNumberAndArbitrary()
2485
+ }],
2486
+ /**
2487
+ * Transition Timing Function
2488
+ * @see https://tailwindcss.com/docs/transition-timing-function
2489
+ */
2490
+ ease: [{
2491
+ ease: ["linear", "in", "out", "in-out", isArbitraryValue]
2492
+ }],
2493
+ /**
2494
+ * Transition Delay
2495
+ * @see https://tailwindcss.com/docs/transition-delay
2496
+ */
2497
+ delay: [{
2498
+ delay: getNumberAndArbitrary()
2499
+ }],
2500
+ /**
2501
+ * Animation
2502
+ * @see https://tailwindcss.com/docs/animation
2503
+ */
2504
+ animate: [{
2505
+ animate: ["none", "spin", "ping", "pulse", "bounce", isArbitraryValue]
2506
+ }],
2507
+ // Transforms
2508
+ /**
2509
+ * Transform
2510
+ * @see https://tailwindcss.com/docs/transform
2511
+ */
2512
+ transform: [{
2513
+ transform: ["", "gpu", "none"]
2514
+ }],
2515
+ /**
2516
+ * Scale
2517
+ * @see https://tailwindcss.com/docs/scale
2518
+ */
2519
+ scale: [{
2520
+ scale: [scale]
2521
+ }],
2522
+ /**
2523
+ * Scale X
2524
+ * @see https://tailwindcss.com/docs/scale
2525
+ */
2526
+ "scale-x": [{
2527
+ "scale-x": [scale]
2528
+ }],
2529
+ /**
2530
+ * Scale Y
2531
+ * @see https://tailwindcss.com/docs/scale
2532
+ */
2533
+ "scale-y": [{
2534
+ "scale-y": [scale]
2535
+ }],
2536
+ /**
2537
+ * Rotate
2538
+ * @see https://tailwindcss.com/docs/rotate
2539
+ */
2540
+ rotate: [{
2541
+ rotate: [isInteger, isArbitraryValue]
2542
+ }],
2543
+ /**
2544
+ * Translate X
2545
+ * @see https://tailwindcss.com/docs/translate
2546
+ */
2547
+ "translate-x": [{
2548
+ "translate-x": [translate]
2549
+ }],
2550
+ /**
2551
+ * Translate Y
2552
+ * @see https://tailwindcss.com/docs/translate
2553
+ */
2554
+ "translate-y": [{
2555
+ "translate-y": [translate]
2556
+ }],
2557
+ /**
2558
+ * Skew X
2559
+ * @see https://tailwindcss.com/docs/skew
2560
+ */
2561
+ "skew-x": [{
2562
+ "skew-x": [skew]
2563
+ }],
2564
+ /**
2565
+ * Skew Y
2566
+ * @see https://tailwindcss.com/docs/skew
2567
+ */
2568
+ "skew-y": [{
2569
+ "skew-y": [skew]
2570
+ }],
2571
+ /**
2572
+ * Transform Origin
2573
+ * @see https://tailwindcss.com/docs/transform-origin
2574
+ */
2575
+ "transform-origin": [{
2576
+ origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", isArbitraryValue]
2577
+ }],
2578
+ // Interactivity
2579
+ /**
2580
+ * Accent Color
2581
+ * @see https://tailwindcss.com/docs/accent-color
2582
+ */
2583
+ accent: [{
2584
+ accent: ["auto", colors]
2585
+ }],
2586
+ /**
2587
+ * Appearance
2588
+ * @see https://tailwindcss.com/docs/appearance
2589
+ */
2590
+ appearance: [{
2591
+ appearance: ["none", "auto"]
2592
+ }],
2593
+ /**
2594
+ * Cursor
2595
+ * @see https://tailwindcss.com/docs/cursor
2596
+ */
2597
+ cursor: [{
2598
+ cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", isArbitraryValue]
2599
+ }],
2600
+ /**
2601
+ * Caret Color
2602
+ * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
2603
+ */
2604
+ "caret-color": [{
2605
+ caret: [colors]
2606
+ }],
2607
+ /**
2608
+ * Pointer Events
2609
+ * @see https://tailwindcss.com/docs/pointer-events
2610
+ */
2611
+ "pointer-events": [{
2612
+ "pointer-events": ["none", "auto"]
2613
+ }],
2614
+ /**
2615
+ * Resize
2616
+ * @see https://tailwindcss.com/docs/resize
2617
+ */
2618
+ resize: [{
2619
+ resize: ["none", "y", "x", ""]
2620
+ }],
2621
+ /**
2622
+ * Scroll Behavior
2623
+ * @see https://tailwindcss.com/docs/scroll-behavior
2624
+ */
2625
+ "scroll-behavior": [{
2626
+ scroll: ["auto", "smooth"]
2627
+ }],
2628
+ /**
2629
+ * Scroll Margin
2630
+ * @see https://tailwindcss.com/docs/scroll-margin
2631
+ */
2632
+ "scroll-m": [{
2633
+ "scroll-m": getSpacingWithArbitrary()
2634
+ }],
2635
+ /**
2636
+ * Scroll Margin X
2637
+ * @see https://tailwindcss.com/docs/scroll-margin
2638
+ */
2639
+ "scroll-mx": [{
2640
+ "scroll-mx": getSpacingWithArbitrary()
2641
+ }],
2642
+ /**
2643
+ * Scroll Margin Y
2644
+ * @see https://tailwindcss.com/docs/scroll-margin
2645
+ */
2646
+ "scroll-my": [{
2647
+ "scroll-my": getSpacingWithArbitrary()
2648
+ }],
2649
+ /**
2650
+ * Scroll Margin Start
2651
+ * @see https://tailwindcss.com/docs/scroll-margin
2652
+ */
2653
+ "scroll-ms": [{
2654
+ "scroll-ms": getSpacingWithArbitrary()
2655
+ }],
2656
+ /**
2657
+ * Scroll Margin End
2658
+ * @see https://tailwindcss.com/docs/scroll-margin
2659
+ */
2660
+ "scroll-me": [{
2661
+ "scroll-me": getSpacingWithArbitrary()
2662
+ }],
2663
+ /**
2664
+ * Scroll Margin Top
2665
+ * @see https://tailwindcss.com/docs/scroll-margin
2666
+ */
2667
+ "scroll-mt": [{
2668
+ "scroll-mt": getSpacingWithArbitrary()
2669
+ }],
2670
+ /**
2671
+ * Scroll Margin Right
2672
+ * @see https://tailwindcss.com/docs/scroll-margin
2673
+ */
2674
+ "scroll-mr": [{
2675
+ "scroll-mr": getSpacingWithArbitrary()
2676
+ }],
2677
+ /**
2678
+ * Scroll Margin Bottom
2679
+ * @see https://tailwindcss.com/docs/scroll-margin
2680
+ */
2681
+ "scroll-mb": [{
2682
+ "scroll-mb": getSpacingWithArbitrary()
2683
+ }],
2684
+ /**
2685
+ * Scroll Margin Left
2686
+ * @see https://tailwindcss.com/docs/scroll-margin
2687
+ */
2688
+ "scroll-ml": [{
2689
+ "scroll-ml": getSpacingWithArbitrary()
2690
+ }],
2691
+ /**
2692
+ * Scroll Padding
2693
+ * @see https://tailwindcss.com/docs/scroll-padding
2694
+ */
2695
+ "scroll-p": [{
2696
+ "scroll-p": getSpacingWithArbitrary()
2697
+ }],
2698
+ /**
2699
+ * Scroll Padding X
2700
+ * @see https://tailwindcss.com/docs/scroll-padding
2701
+ */
2702
+ "scroll-px": [{
2703
+ "scroll-px": getSpacingWithArbitrary()
2704
+ }],
2705
+ /**
2706
+ * Scroll Padding Y
2707
+ * @see https://tailwindcss.com/docs/scroll-padding
2708
+ */
2709
+ "scroll-py": [{
2710
+ "scroll-py": getSpacingWithArbitrary()
2711
+ }],
2712
+ /**
2713
+ * Scroll Padding Start
2714
+ * @see https://tailwindcss.com/docs/scroll-padding
2715
+ */
2716
+ "scroll-ps": [{
2717
+ "scroll-ps": getSpacingWithArbitrary()
2718
+ }],
2719
+ /**
2720
+ * Scroll Padding End
2721
+ * @see https://tailwindcss.com/docs/scroll-padding
2722
+ */
2723
+ "scroll-pe": [{
2724
+ "scroll-pe": getSpacingWithArbitrary()
2725
+ }],
2726
+ /**
2727
+ * Scroll Padding Top
2728
+ * @see https://tailwindcss.com/docs/scroll-padding
2729
+ */
2730
+ "scroll-pt": [{
2731
+ "scroll-pt": getSpacingWithArbitrary()
2732
+ }],
2733
+ /**
2734
+ * Scroll Padding Right
2735
+ * @see https://tailwindcss.com/docs/scroll-padding
2736
+ */
2737
+ "scroll-pr": [{
2738
+ "scroll-pr": getSpacingWithArbitrary()
2739
+ }],
2740
+ /**
2741
+ * Scroll Padding Bottom
2742
+ * @see https://tailwindcss.com/docs/scroll-padding
2743
+ */
2744
+ "scroll-pb": [{
2745
+ "scroll-pb": getSpacingWithArbitrary()
2746
+ }],
2747
+ /**
2748
+ * Scroll Padding Left
2749
+ * @see https://tailwindcss.com/docs/scroll-padding
2750
+ */
2751
+ "scroll-pl": [{
2752
+ "scroll-pl": getSpacingWithArbitrary()
2753
+ }],
2754
+ /**
2755
+ * Scroll Snap Align
2756
+ * @see https://tailwindcss.com/docs/scroll-snap-align
2757
+ */
2758
+ "snap-align": [{
2759
+ snap: ["start", "end", "center", "align-none"]
2760
+ }],
2761
+ /**
2762
+ * Scroll Snap Stop
2763
+ * @see https://tailwindcss.com/docs/scroll-snap-stop
2764
+ */
2765
+ "snap-stop": [{
2766
+ snap: ["normal", "always"]
2767
+ }],
2768
+ /**
2769
+ * Scroll Snap Type
2770
+ * @see https://tailwindcss.com/docs/scroll-snap-type
2771
+ */
2772
+ "snap-type": [{
2773
+ snap: ["none", "x", "y", "both"]
2774
+ }],
2775
+ /**
2776
+ * Scroll Snap Type Strictness
2777
+ * @see https://tailwindcss.com/docs/scroll-snap-type
2778
+ */
2779
+ "snap-strictness": [{
2780
+ snap: ["mandatory", "proximity"]
2781
+ }],
2782
+ /**
2783
+ * Touch Action
2784
+ * @see https://tailwindcss.com/docs/touch-action
2785
+ */
2786
+ touch: [{
2787
+ touch: ["auto", "none", "manipulation"]
2788
+ }],
2789
+ /**
2790
+ * Touch Action X
2791
+ * @see https://tailwindcss.com/docs/touch-action
2792
+ */
2793
+ "touch-x": [{
2794
+ "touch-pan": ["x", "left", "right"]
2795
+ }],
2796
+ /**
2797
+ * Touch Action Y
2798
+ * @see https://tailwindcss.com/docs/touch-action
2799
+ */
2800
+ "touch-y": [{
2801
+ "touch-pan": ["y", "up", "down"]
2802
+ }],
2803
+ /**
2804
+ * Touch Action Pinch Zoom
2805
+ * @see https://tailwindcss.com/docs/touch-action
2806
+ */
2807
+ "touch-pz": ["touch-pinch-zoom"],
2808
+ /**
2809
+ * User Select
2810
+ * @see https://tailwindcss.com/docs/user-select
2811
+ */
2812
+ select: [{
2813
+ select: ["none", "text", "all", "auto"]
2814
+ }],
2815
+ /**
2816
+ * Will Change
2817
+ * @see https://tailwindcss.com/docs/will-change
2818
+ */
2819
+ "will-change": [{
2820
+ "will-change": ["auto", "scroll", "contents", "transform", isArbitraryValue]
2821
+ }],
2822
+ // SVG
2823
+ /**
2824
+ * Fill
2825
+ * @see https://tailwindcss.com/docs/fill
2826
+ */
2827
+ fill: [{
2828
+ fill: [colors, "none"]
2829
+ }],
2830
+ /**
2831
+ * Stroke Width
2832
+ * @see https://tailwindcss.com/docs/stroke-width
2833
+ */
2834
+ "stroke-w": [{
2835
+ stroke: [isLength, isArbitraryLength, isArbitraryNumber]
2836
+ }],
2837
+ /**
2838
+ * Stroke
2839
+ * @see https://tailwindcss.com/docs/stroke
2840
+ */
2841
+ stroke: [{
2842
+ stroke: [colors, "none"]
2843
+ }],
2844
+ // Accessibility
2845
+ /**
2846
+ * Screen Readers
2847
+ * @see https://tailwindcss.com/docs/screen-readers
2848
+ */
2849
+ sr: ["sr-only", "not-sr-only"],
2850
+ /**
2851
+ * Forced Color Adjust
2852
+ * @see https://tailwindcss.com/docs/forced-color-adjust
2853
+ */
2854
+ "forced-color-adjust": [{
2855
+ "forced-color-adjust": ["auto", "none"]
2856
+ }]
2857
+ },
2858
+ conflictingClassGroups: {
2859
+ overflow: ["overflow-x", "overflow-y"],
2860
+ overscroll: ["overscroll-x", "overscroll-y"],
2861
+ inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
2862
+ "inset-x": ["right", "left"],
2863
+ "inset-y": ["top", "bottom"],
2864
+ flex: ["basis", "grow", "shrink"],
2865
+ gap: ["gap-x", "gap-y"],
2866
+ p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
2867
+ px: ["pr", "pl"],
2868
+ py: ["pt", "pb"],
2869
+ m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
2870
+ mx: ["mr", "ml"],
2871
+ my: ["mt", "mb"],
2872
+ size: ["w", "h"],
2873
+ "font-size": ["leading"],
2874
+ "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
2875
+ "fvn-ordinal": ["fvn-normal"],
2876
+ "fvn-slashed-zero": ["fvn-normal"],
2877
+ "fvn-figure": ["fvn-normal"],
2878
+ "fvn-spacing": ["fvn-normal"],
2879
+ "fvn-fraction": ["fvn-normal"],
2880
+ "line-clamp": ["display", "overflow"],
2881
+ rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"],
2882
+ "rounded-s": ["rounded-ss", "rounded-es"],
2883
+ "rounded-e": ["rounded-se", "rounded-ee"],
2884
+ "rounded-t": ["rounded-tl", "rounded-tr"],
2885
+ "rounded-r": ["rounded-tr", "rounded-br"],
2886
+ "rounded-b": ["rounded-br", "rounded-bl"],
2887
+ "rounded-l": ["rounded-tl", "rounded-bl"],
2888
+ "border-spacing": ["border-spacing-x", "border-spacing-y"],
2889
+ "border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
2890
+ "border-w-x": ["border-w-r", "border-w-l"],
2891
+ "border-w-y": ["border-w-t", "border-w-b"],
2892
+ "border-color": ["border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
2893
+ "border-color-x": ["border-color-r", "border-color-l"],
2894
+ "border-color-y": ["border-color-t", "border-color-b"],
2895
+ "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
2896
+ "scroll-mx": ["scroll-mr", "scroll-ml"],
2897
+ "scroll-my": ["scroll-mt", "scroll-mb"],
2898
+ "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
2899
+ "scroll-px": ["scroll-pr", "scroll-pl"],
2900
+ "scroll-py": ["scroll-pt", "scroll-pb"],
2901
+ touch: ["touch-x", "touch-y", "touch-pz"],
2902
+ "touch-x": ["touch"],
2903
+ "touch-y": ["touch"],
2904
+ "touch-pz": ["touch"]
2905
+ },
2906
+ conflictingClassGroupModifiers: {
2907
+ "font-size": ["leading"]
2908
+ }
2909
+ };
2910
+ };
2911
+ var mergeConfigs = (baseConfig, {
2912
+ cacheSize,
2913
+ prefix,
2914
+ separator,
2915
+ experimentalParseClassName,
2916
+ extend = {},
2917
+ override = {}
2918
+ }) => {
2919
+ overrideProperty(baseConfig, "cacheSize", cacheSize);
2920
+ overrideProperty(baseConfig, "prefix", prefix);
2921
+ overrideProperty(baseConfig, "separator", separator);
2922
+ overrideProperty(baseConfig, "experimentalParseClassName", experimentalParseClassName);
2923
+ for (const configKey in override) {
2924
+ overrideConfigProperties(baseConfig[configKey], override[configKey]);
2925
+ }
2926
+ for (const key in extend) {
2927
+ mergeConfigProperties(baseConfig[key], extend[key]);
2928
+ }
2929
+ return baseConfig;
2930
+ };
2931
+ var overrideProperty = (baseObject, overrideKey, overrideValue) => {
2932
+ if (overrideValue !== void 0) {
2933
+ baseObject[overrideKey] = overrideValue;
2934
+ }
2935
+ };
2936
+ var overrideConfigProperties = (baseObject, overrideObject) => {
2937
+ if (overrideObject) {
2938
+ for (const key in overrideObject) {
2939
+ overrideProperty(baseObject, key, overrideObject[key]);
2940
+ }
2941
+ }
2942
+ };
2943
+ var mergeConfigProperties = (baseObject, mergeObject) => {
2944
+ if (mergeObject) {
2945
+ for (const key in mergeObject) {
2946
+ const mergeValue = mergeObject[key];
2947
+ if (mergeValue !== void 0) {
2948
+ baseObject[key] = (baseObject[key] || []).concat(mergeValue);
2949
+ }
2950
+ }
2951
+ }
2952
+ };
2953
+ var extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === "function" ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);
2954
+
2955
+ // src/editor/utils/classname.ts
2956
+ var twMerge = extendTailwindMerge({
454
2957
  prefix: "mly-"
455
2958
  });
456
2959
  function cn(...inputs) {
@@ -1068,13 +3571,14 @@ function Select(props) {
1068
3571
  tooltip,
1069
3572
  className,
1070
3573
  icon: Icon,
1071
- iconClassName
3574
+ iconClassName,
3575
+ placeholder
1072
3576
  } = props;
1073
3577
  const selectId = `mly${(0, import_react7.useId)()}`;
1074
3578
  const content = /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "mly-relative", children: [
1075
3579
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("label", { htmlFor: selectId, className: "mly-sr-only", children: label }),
1076
3580
  Icon && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "mly-pointer-events-none mly-absolute mly-inset-y-0 mly-left-2 mly-z-20 mly-flex mly-items-center", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { className: cn("mly-size-3", iconClassName) }) }),
1077
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3581
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1078
3582
  "select",
1079
3583
  {
1080
3584
  id: selectId,
@@ -1083,9 +3587,12 @@ function Select(props) {
1083
3587
  !!Icon && "mly-pl-7",
1084
3588
  className
1085
3589
  ),
1086
- value,
3590
+ value: value || "",
1087
3591
  onChange: (event) => onValueChange(event.target.value),
1088
- children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: option.value, children: option.label }, option.value))
3592
+ children: [
3593
+ placeholder && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: "", disabled: true, hidden: true, children: placeholder }),
3594
+ options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: option.value, children: option.label }, option.value))
3595
+ ]
1089
3596
  }
1090
3597
  ),
1091
3598
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "mly-pointer-events-none mly-absolute mly-inset-y-0 mly-right-0 mly-z-10 mly-flex mly-h-full mly-w-7 mly-items-center mly-justify-center mly-text-gray-600 peer-disabled:mly-opacity-50", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
@@ -2116,10 +4623,10 @@ var DEFAULT_SECTION_MARGIN_TOP = 0;
2116
4623
  var DEFAULT_SECTION_MARGIN_RIGHT = 0;
2117
4624
  var DEFAULT_SECTION_MARGIN_BOTTOM = 0;
2118
4625
  var DEFAULT_SECTION_MARGIN_LEFT = 0;
2119
- var DEFAULT_SECTION_PADDING_TOP = 5;
2120
- var DEFAULT_SECTION_PADDING_RIGHT = 5;
2121
- var DEFAULT_SECTION_PADDING_BOTTOM = 5;
2122
- var DEFAULT_SECTION_PADDING_LEFT = 5;
4626
+ var DEFAULT_SECTION_PADDING_TOP = 0;
4627
+ var DEFAULT_SECTION_PADDING_RIGHT = 0;
4628
+ var DEFAULT_SECTION_PADDING_BOTTOM = 0;
4629
+ var DEFAULT_SECTION_PADDING_LEFT = 0;
2123
4630
  var DEFAULT_SECTION_SHOW_IF_KEY = null;
2124
4631
  var SectionExtension = import_core5.Node.create({
2125
4632
  name: "section",
@@ -2582,6 +5089,7 @@ function getNewWidth(height, aspectRatio) {
2582
5089
  var import_jsx_runtime17 = require("react/jsx-runtime");
2583
5090
  var MIN_WIDTH = 20;
2584
5091
  var IMAGE_MAX_WIDTH = 600;
5092
+ var IMAGE_MAX_HEIGHT = 400;
2585
5093
  function ImageView(props) {
2586
5094
  const { node, updateAttributes: updateAttributes2, selected, editor } = props;
2587
5095
  const [status, setStatus] = (0, import_react18.useState)("idle");
@@ -2606,11 +5114,13 @@ function ImageView(props) {
2606
5114
  event.preventDefault();
2607
5115
  const direction = event.currentTarget.dataset.direction || "--";
2608
5116
  const initialXPosition = event.clientX;
5117
+ const initialYPosition = event.clientY;
2609
5118
  const currentWidth = imgRef.current.width;
2610
5119
  const currentHeight = imgRef.current.height;
2611
5120
  let newWidth = currentWidth;
2612
5121
  let newHeight = currentHeight;
2613
- const transform = direction[1] === "w" ? -1 : 1;
5122
+ const transformX = direction[1] === "w" ? -1 : 1;
5123
+ const transformY = direction[0] === "n" ? -1 : 1;
2614
5124
  const removeListeners = () => {
2615
5125
  window.removeEventListener("mousemove", mouseMoveHandler);
2616
5126
  window.removeEventListener("mouseup", removeListeners);
@@ -2620,13 +5130,22 @@ function ImageView(props) {
2620
5130
  };
2621
5131
  const mouseMoveHandler = (event2) => {
2622
5132
  newWidth = Math.max(
2623
- currentWidth + transform * (event2.clientX - initialXPosition),
5133
+ currentWidth + transformX * (event2.clientX - initialXPosition),
5134
+ MIN_WIDTH
5135
+ );
5136
+ newHeight = Math.max(
5137
+ currentHeight + transformY * (event2.clientY - initialYPosition),
2624
5138
  MIN_WIDTH
2625
5139
  );
2626
5140
  if (newWidth > imageParentWidth) {
2627
5141
  newWidth = imageParentWidth;
2628
5142
  }
2629
- newHeight = newWidth / currentWidth * currentHeight;
5143
+ if (newHeight > IMAGE_MAX_HEIGHT) {
5144
+ newHeight = IMAGE_MAX_HEIGHT;
5145
+ }
5146
+ if (node.attrs.lockAspectRatio) {
5147
+ newHeight = getNewHeight(newWidth, node.attrs.aspectRatio);
5148
+ }
2630
5149
  setResizingStyle({ width: newWidth, height: newHeight });
2631
5150
  if (!event2.buttons) {
2632
5151
  return removeListeners();
@@ -2851,8 +5370,11 @@ function ImageView(props) {
2851
5370
  ref: imgRef,
2852
5371
  style: __spreadProps(__spreadValues({}, resizingStyle), {
2853
5372
  cursor: "default",
5373
+ objectFit: "fill",
2854
5374
  marginBottom: 0,
2855
- borderRadius: borderRadius2
5375
+ borderRadius: borderRadius2,
5376
+ width: (resizingStyle == null ? void 0 : resizingStyle.width) ? `${resizingStyle.width}px` : width ? `${width}px` : "auto",
5377
+ height: (resizingStyle == null ? void 0 : resizingStyle.height) ? `${resizingStyle.height}px` : height ? `${height}px` : "auto"
2856
5378
  }),
2857
5379
  draggable: editor.isEditable,
2858
5380
  className: cn(
@@ -3102,6 +5624,7 @@ function LogoView(props) {
3102
5624
 
3103
5625
  // src/editor/nodes/logo/logo.ts
3104
5626
  var allowedLogoSize = ["sm", "md", "lg"];
5627
+ var allowedLogoAlignment = ["left", "center", "right"];
3105
5628
  var DEFAULT_ALIGNMENT = "left";
3106
5629
  var DEFAULT_LOGO_SIZE = "sm";
3107
5630
  var logoSizes = {
@@ -3235,7 +5758,10 @@ var import_tippy4 = require("tippy.js");
3235
5758
  var import_lucide_react11 = require("lucide-react");
3236
5759
  var import_jsx_runtime19 = require("react/jsx-runtime");
3237
5760
  function AlignmentSwitch(props) {
3238
- const { alignment = "left", onAlignmentChange } = props;
5761
+ const { alignment: rawAlignment, onAlignmentChange } = props;
5762
+ const alignment = allowedLogoAlignment.includes(
5763
+ rawAlignment
5764
+ ) ? rawAlignment : "left";
3239
5765
  const alignments = {
3240
5766
  left: {
3241
5767
  icon: import_lucide_react11.AlignLeft,
@@ -4425,7 +6951,7 @@ var DefaultRenderVariable = (props) => {
4425
6951
  const { variable, fallback, from } = props;
4426
6952
  const { name, required, valid } = variable;
4427
6953
  if (from === "button-variable") {
4428
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "mly-inline-grid mly-h-7 mly-max-w-xs mly-grid-cols-[12px_1fr] mly-items-center mly-gap-1.5 mly-rounded-md mly-border mly-border-[var(--button-var-border-color)] mly-px-2 mly-font-mono mly-text-sm", children: [
6954
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "mly-inline-grid mly-max-w-xs mly-grid-cols-[12px_1fr] mly-items-center mly-gap-1.5 mly-rounded-md mly-border mly-border-[var(--button-var-border-color)] mly-px-2 mly-py-px mly-font-mono mly-text-xs", children: [
4429
6955
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react21.Braces, { className: "mly-h-3 mly-w-3 mly-shrink-0 mly-stroke-[2.5]" }),
4430
6956
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "mly-min-w-0 mly-truncate mly-text-left", children: name })
4431
6957
  ] });
@@ -4435,7 +6961,7 @@ var DefaultRenderVariable = (props) => {
4435
6961
  "div",
4436
6962
  {
4437
6963
  className: cn(
4438
- "mly-inline-grid mly-h-7 mly-min-w-28 mly-max-w-xs mly-grid-cols-[12px_1fr] mly-items-center mly-gap-1.5 mly-rounded-md mly-border mly-px-2 mly-font-mono mly-text-sm hover:mly-bg-soft-gray",
6964
+ "mly-inline-grid mly-h-7 mly-min-w-28 mly-max-w-xs mly-grid-cols-[12px_1fr] mly-items-center mly-gap-1.5 mly-rounded-md mly-border mly-border-gray-200 mly-px-2 mly-font-mono mly-text-sm hover:mly-bg-soft-gray",
4439
6965
  !valid && "mly-border-rose-400 mly-bg-rose-50 mly-text-rose-600 hover:mly-bg-rose-100"
4440
6966
  ),
4441
6967
  children: [
@@ -4666,7 +7192,7 @@ function LinkInputPopover(props) {
4666
7192
  variant: "ghost",
4667
7193
  size: "sm",
4668
7194
  type: "button",
4669
- className: "mly-size-7",
7195
+ className: "!mly-size-7",
4670
7196
  "data-state": !!defaultValue,
4671
7197
  children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon, { className: "mly-h-3 mly-w-3 mly-shrink-0 mly-stroke-[2.5] mly-text-midnight-gray" })
4672
7198
  }
@@ -4948,11 +7474,14 @@ function ImageBubbleMenu(props) {
4948
7474
  value: (_c = state == null ? void 0 : state.width) != null ? _c : "",
4949
7475
  onValueChange: (value) => {
4950
7476
  const width = Math.min(Number(value) || 0, IMAGE_MAX_WIDTH);
7477
+ const currentHeight = Number(state.height) || 0;
7478
+ const currentWidth = Number(state.width) || 0;
7479
+ const currentAspectRatio = state.aspectRatio || currentWidth / currentHeight || 1;
4951
7480
  editor == null ? void 0 : editor.chain().updateAttributes("image", __spreadValues({
4952
7481
  width: String(width)
4953
7482
  }, lockAspectRatio && value ? {
4954
7483
  height: String(
4955
- getNewHeight(width, state.aspectRatio)
7484
+ getNewHeight(width, currentAspectRatio)
4956
7485
  )
4957
7486
  } : {})).run();
4958
7487
  }
@@ -4965,11 +7494,14 @@ function ImageBubbleMenu(props) {
4965
7494
  value: (_d = state == null ? void 0 : state.height) != null ? _d : "",
4966
7495
  onValueChange: (value) => {
4967
7496
  const height = Number(value) || 0;
7497
+ const currentHeight = Number(state.height) || 0;
7498
+ const currentWidth = Number(state.width) || 0;
7499
+ const currentAspectRatio = state.aspectRatio || currentWidth / currentHeight || 1;
4968
7500
  editor == null ? void 0 : editor.chain().updateAttributes("image", __spreadValues({
4969
7501
  height: String(height)
4970
7502
  }, lockAspectRatio && value ? {
4971
7503
  width: String(
4972
- getNewWidth(height, state.aspectRatio)
7504
+ getNewWidth(height, currentAspectRatio)
4973
7505
  )
4974
7506
  } : {})).run();
4975
7507
  }
@@ -6651,18 +9183,18 @@ function ButtonView(props) {
6651
9183
  ),
6652
9184
  tabIndex: -1,
6653
9185
  style: {
6654
- backgroundColor: variant === "filled" ? buttonColor : "transparent",
6655
- color: textColor,
9186
+ backgroundColor: variant === "filled" ? buttonColor || "var(--mly-button-background-color)" : "transparent",
9187
+ color: textColor || "var(--mly-button-text-color)",
6656
9188
  borderWidth: 2,
6657
9189
  borderStyle: "solid",
6658
- borderColor: buttonColor,
9190
+ borderColor: buttonColor || "var(--mly-button-background-color)",
6659
9191
  // decrease the border color opacity to 80%
6660
9192
  // so that it's not too prominent
6661
- "--button-var-border-color": `${textColor}80`,
6662
- paddingTop,
6663
- paddingRight,
6664
- paddingBottom,
6665
- paddingLeft
9193
+ "--button-var-border-color": textColor ? `${textColor}80` : "color-mix(in srgb, var(--mly-button-text-color) 80%, transparent)",
9194
+ paddingTop: paddingTop || "var(--mly-button-padding-top)",
9195
+ paddingRight: paddingRight || "var(--mly-button-padding-right)",
9196
+ paddingBottom: paddingBottom || "var(--mly-button-padding-bottom)",
9197
+ paddingLeft: paddingLeft || "var(--mly-button-padding-left)"
6666
9198
  },
6667
9199
  onClick: (e) => {
6668
9200
  e.preventDefault();
@@ -6761,7 +9293,8 @@ function ButtonView(props) {
6761
9293
  paddingLeft: paddingX
6762
9294
  });
6763
9295
  },
6764
- tooltip: "Size"
9296
+ tooltip: "Size",
9297
+ placeholder: "Size"
6765
9298
  }
6766
9299
  )
6767
9300
  ] }),
@@ -6800,7 +9333,7 @@ function ButtonView(props) {
6800
9333
  BackgroundColorPickerPopup,
6801
9334
  {
6802
9335
  variant,
6803
- color: buttonColor,
9336
+ color: buttonColor || "transparent",
6804
9337
  onChange: (color) => {
6805
9338
  updateAttributes2({
6806
9339
  buttonColor: color
@@ -6811,7 +9344,7 @@ function ButtonView(props) {
6811
9344
  /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6812
9345
  TextColorPickerPopup,
6813
9346
  {
6814
- color: textColor,
9347
+ color: textColor || "transparent",
6815
9348
  onChange: (color) => {
6816
9349
  updateAttributes2({
6817
9350
  textColor: color
@@ -6899,12 +9432,12 @@ function TextColorPickerPopup(props) {
6899
9432
  var DEFAULT_BUTTON_ALIGNMENT = "left";
6900
9433
  var DEFAULT_BUTTON_VARIANT = "filled";
6901
9434
  var DEFAULT_BUTTON_BORDER_RADIUS = "smooth";
6902
- var DEFAULT_BUTTON_BACKGROUND_COLOR = "#000000";
6903
- var DEFAULT_BUTTON_TEXT_COLOR = "#ffffff";
6904
- var DEFAULT_BUTTON_PADDING_TOP = 10;
6905
- var DEFAULT_BUTTON_PADDING_RIGHT = 32;
6906
- var DEFAULT_BUTTON_PADDING_BOTTOM = 10;
6907
- var DEFAULT_BUTTON_PADDING_LEFT = 32;
9435
+ var DEFAULT_BUTTON_BACKGROUND_COLOR = null;
9436
+ var DEFAULT_BUTTON_TEXT_COLOR = null;
9437
+ var DEFAULT_BUTTON_PADDING_TOP = null;
9438
+ var DEFAULT_BUTTON_PADDING_RIGHT = null;
9439
+ var DEFAULT_BUTTON_PADDING_BOTTOM = null;
9440
+ var DEFAULT_BUTTON_PADDING_LEFT = null;
6908
9441
  var allowedButtonVariant = ["filled", "outline"];
6909
9442
  var allowedButtonBorderRadius = ["sharp", "smooth", "round"];
6910
9443
  var ButtonExtension = import_core14.Node.create({
@@ -7000,28 +9533,6 @@ var ButtonExtension = import_core14.Node.create({
7000
9533
  };
7001
9534
  }
7002
9535
  },
7003
- buttonColor: {
7004
- default: DEFAULT_BUTTON_BACKGROUND_COLOR,
7005
- parseHTML: (element) => {
7006
- return element.getAttribute("data-button-color") || DEFAULT_BUTTON_BACKGROUND_COLOR;
7007
- },
7008
- renderHTML: (attributes) => {
7009
- return {
7010
- "data-button-color": attributes.buttonColor
7011
- };
7012
- }
7013
- },
7014
- textColor: {
7015
- default: DEFAULT_BUTTON_TEXT_COLOR,
7016
- parseHTML: (element) => {
7017
- return element.getAttribute("data-text-color") || DEFAULT_BUTTON_TEXT_COLOR;
7018
- },
7019
- renderHTML: (attributes) => {
7020
- return {
7021
- "data-text-color": attributes.textColor
7022
- };
7023
- }
7024
- },
7025
9536
  showIfKey: {
7026
9537
  default: DEFAULT_SECTION_SHOW_IF_KEY,
7027
9538
  parseHTML: (element) => {
@@ -7036,62 +9547,12 @@ var ButtonExtension = import_core14.Node.create({
7036
9547
  };
7037
9548
  }
7038
9549
  },
7039
- paddingTop: {
7040
- default: DEFAULT_BUTTON_PADDING_TOP,
7041
- parseHTML: (element) => {
7042
- return parseInt(
7043
- element.getAttribute("data-padding-top") || DEFAULT_BUTTON_PADDING_TOP.toString(),
7044
- 10
7045
- );
7046
- },
7047
- renderHTML: (attributes) => {
7048
- return {
7049
- "data-padding-top": attributes.paddingTop
7050
- };
7051
- }
7052
- },
7053
- paddingRight: {
7054
- default: DEFAULT_BUTTON_PADDING_RIGHT,
7055
- parseHTML: (element) => {
7056
- return parseInt(
7057
- element.getAttribute("data-padding-right") || DEFAULT_BUTTON_PADDING_RIGHT.toString(),
7058
- 10
7059
- );
7060
- },
7061
- renderHTML: (attributes) => {
7062
- return {
7063
- "data-padding-right": attributes.paddingRight
7064
- };
7065
- }
7066
- },
7067
- paddingBottom: {
7068
- default: DEFAULT_BUTTON_PADDING_BOTTOM,
7069
- parseHTML: (element) => {
7070
- return parseInt(
7071
- element.getAttribute("data-padding-bottom") || DEFAULT_BUTTON_PADDING_BOTTOM.toString(),
7072
- 10
7073
- );
7074
- },
7075
- renderHTML: (attributes) => {
7076
- return {
7077
- "data-padding-bottom": attributes.paddingBottom
7078
- };
7079
- }
7080
- },
7081
- paddingLeft: {
7082
- default: DEFAULT_BUTTON_PADDING_LEFT,
7083
- parseHTML: (element) => {
7084
- return parseInt(
7085
- element.getAttribute("data-padding-left") || DEFAULT_BUTTON_PADDING_LEFT.toString(),
7086
- 10
7087
- );
7088
- },
7089
- renderHTML: (attributes) => {
7090
- return {
7091
- "data-padding-left": attributes.paddingLeft
7092
- };
7093
- }
7094
- }
9550
+ buttonColor: DEFAULT_BUTTON_BACKGROUND_COLOR,
9551
+ textColor: DEFAULT_BUTTON_TEXT_COLOR,
9552
+ paddingTop: DEFAULT_BUTTON_PADDING_TOP,
9553
+ paddingRight: DEFAULT_BUTTON_PADDING_RIGHT,
9554
+ paddingBottom: DEFAULT_BUTTON_PADDING_BOTTOM,
9555
+ paddingLeft: DEFAULT_BUTTON_PADDING_LEFT
7095
9556
  };
7096
9557
  },
7097
9558
  parseHTML() {
@@ -7787,13 +10248,16 @@ function SlashCommandItem(props) {
7787
10248
  selectedCommandIndex,
7788
10249
  editor,
7789
10250
  activeCommandRef,
7790
- selectItem
10251
+ selectItem,
10252
+ hoveredItemKey,
10253
+ onHover
7791
10254
  } = props;
7792
10255
  const [open, setOpen] = (0, import_react55.useState)(false);
7793
- const [isHovered, setIsHovered] = (0, import_react55.useState)(false);
7794
10256
  const isActive = groupIndex === selectedGroupIndex && commandIndex === selectedCommandIndex;
7795
- const isSubCommand = item && "commands" in item;
7796
- const shouldOpenTooltip = !!(item == null ? void 0 : item.preview) && (isActive || isHovered);
10257
+ const itemKey = `${groupIndex}-${commandIndex}`;
10258
+ const isHovered = hoveredItemKey === itemKey;
10259
+ const isSubCommand2 = item && "commands" in item;
10260
+ const shouldOpenTooltip = !!(item == null ? void 0 : item.preview) && (isHovered || isActive && !hoveredItemKey);
7797
10261
  const hasRenderFunction = typeof item.render === "function";
7798
10262
  const renderFunctionValue = hasRenderFunction ? (_a = item.render) == null ? void 0 : _a.call(item, editor) : null;
7799
10263
  let value = /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
@@ -7802,7 +10266,7 @@ function SlashCommandItem(props) {
7802
10266
  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "mly-font-medium", children: item.title }),
7803
10267
  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "mly-text-xs mly-text-gray-400", children: item.description })
7804
10268
  ] }),
7805
- isSubCommand && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "mly-block mly-px-1 mly-text-gray-400", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react28.ChevronRightIcon, { className: "mly-size-3.5 mly-stroke-[2.5]" }) })
10269
+ isSubCommand2 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "mly-block mly-px-1 mly-text-gray-400", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react28.ChevronRightIcon, { className: "mly-size-3.5 mly-stroke-[2.5]" }) })
7806
10270
  ] });
7807
10271
  if (renderFunctionValue !== null && renderFunctionValue !== true) {
7808
10272
  value = renderFunctionValue;
@@ -7842,8 +10306,8 @@ function SlashCommandItem(props) {
7842
10306
  isActive ? "mly-bg-gray-100 mly-text-gray-900" : "mly-bg-transparent"
7843
10307
  ),
7844
10308
  onClick: () => selectItem(groupIndex, commandIndex),
7845
- onMouseEnter: () => setIsHovered(true),
7846
- onMouseLeave: () => setIsHovered(false),
10309
+ onMouseEnter: () => onHover(true),
10310
+ onMouseLeave: () => onHover(false),
7847
10311
  type: "button",
7848
10312
  ref: isActive ? activeCommandRef : null,
7849
10313
  children: value
@@ -7871,12 +10335,94 @@ function SlashCommandItem(props) {
7871
10335
  ] }, `${groupIndex}-${commandIndex}`);
7872
10336
  }
7873
10337
 
10338
+ // src/editor/extensions/slash-command/slash-command-search.tsx
10339
+ function filterSlashCommands(options) {
10340
+ const { groups, query, editor } = options;
10341
+ const newGroups = [...groups];
10342
+ let searchQuery = query == null ? void 0 : query.toLowerCase();
10343
+ const subCommandMatch = searchQuery.match(/^([^.]+)\./);
10344
+ if (subCommandMatch) {
10345
+ const [match, subCommandId] = subCommandMatch;
10346
+ const subCommandGroup = findSubCommandGroup(groups, subCommandId);
10347
+ if (subCommandGroup) {
10348
+ const remainingSearch = searchQuery.slice(match.length);
10349
+ const filteredCommands = subCommandGroup.commands.filter(
10350
+ (item) => !remainingSearch || isCommandMatch(item, remainingSearch)
10351
+ );
10352
+ return filteredCommands.length ? [
10353
+ __spreadProps(__spreadValues({}, subCommandGroup), {
10354
+ commands: filteredCommands
10355
+ })
10356
+ ] : [];
10357
+ }
10358
+ }
10359
+ const filteredGroups = newGroups.map((group) => {
10360
+ return __spreadProps(__spreadValues({}, group), {
10361
+ commands: group.commands.flatMap(
10362
+ (item) => processCommand({ item, search: searchQuery, editor })
10363
+ )
10364
+ });
10365
+ }).filter((group) => group.commands.length > 0);
10366
+ return filteredGroups;
10367
+ }
10368
+ function findSubCommandGroup(groups, subCommandId) {
10369
+ return groups.flatMap((group) => group.commands).find(
10370
+ (item) => {
10371
+ var _a;
10372
+ return "commands" in item && ((_a = item.id) == null ? void 0 : _a.toLowerCase()) === subCommandId.toLowerCase();
10373
+ }
10374
+ );
10375
+ }
10376
+ function containsText(text2, search) {
10377
+ if (!text2) {
10378
+ return false;
10379
+ }
10380
+ return text2.toLowerCase().includes(search.toLowerCase());
10381
+ }
10382
+ function isCommandMatch(item, search) {
10383
+ var _a, _b;
10384
+ return containsText(item.title, search) || containsText(item.description, search) || ((_b = (_a = item.searchTerms) == null ? void 0 : _a.some((term) => containsText(term, search))) != null ? _b : false);
10385
+ }
10386
+ function isSubCommand(item) {
10387
+ return "commands" in item && Array.isArray(item.commands) && !!item.id;
10388
+ }
10389
+ function processCommand(options) {
10390
+ var _a, _b, _c, _d;
10391
+ const { item, search, editor } = options;
10392
+ const show = (_a = item == null ? void 0 : item.render) == null ? void 0 : _a.call(item, editor);
10393
+ if (show === null) {
10394
+ return [];
10395
+ }
10396
+ const isSearching = search.length > 0;
10397
+ if (isSubCommand(item)) {
10398
+ const navigableCommand = __spreadProps(__spreadValues({}, item), {
10399
+ command: (options2) => {
10400
+ const { editor: editor2, range } = options2;
10401
+ editor2.chain().focus().insertContentAt(range, `/${item.id}.`).run();
10402
+ }
10403
+ });
10404
+ const matched = isCommandMatch(navigableCommand, search);
10405
+ if (matched) {
10406
+ return [navigableCommand];
10407
+ }
10408
+ const hasMatchingCommands = (_c = (_b = navigableCommand == null ? void 0 : navigableCommand.commands) == null ? void 0 : _b.some(
10409
+ (command) => isCommandMatch(command, search)
10410
+ )) != null ? _c : false;
10411
+ if (!hasMatchingCommands) {
10412
+ return [];
10413
+ }
10414
+ return (_d = navigableCommand == null ? void 0 : navigableCommand.commands) != null ? _d : [];
10415
+ }
10416
+ return !isSearching || isCommandMatch(item, search) ? [item] : [];
10417
+ }
10418
+
7874
10419
  // src/editor/extensions/slash-command/slash-command-view.tsx
7875
10420
  var import_jsx_runtime54 = require("react/jsx-runtime");
7876
- var CommandList = (0, import_react57.forwardRef)(function CommandList2(props, ref) {
10421
+ var CommandList = (0, import_react57.forwardRef)((props, ref) => {
7877
10422
  const { items: groups, command, editor, range, query } = props;
7878
10423
  const [selectedGroupIndex, setSelectedGroupIndex] = (0, import_react57.useState)(0);
7879
10424
  const [selectedCommandIndex, setSelectedCommandIndex] = (0, import_react57.useState)(0);
10425
+ const [hoveredItemKey, setHoveredItemKey] = (0, import_react57.useState)(null);
7880
10426
  const prevQuery = (0, import_react57.useRef)("");
7881
10427
  const prevSelectedGroupIndex = (0, import_react57.useRef)(0);
7882
10428
  const prevSelectedCommandIndex = (0, import_react57.useRef)(0);
@@ -8006,7 +10552,10 @@ var CommandList = (0, import_react57.forwardRef)(function CommandList2(props, re
8006
10552
  prevSelectedCommandIndex.current = 0;
8007
10553
  };
8008
10554
  }, []);
8009
- return groups.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "mly-z-50 mly-w-72 mly-overflow-hidden mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-shadow-md mly-transition-all", children: [
10555
+ if (!groups || groups.length === 0) {
10556
+ return null;
10557
+ }
10558
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "mly-z-50 mly-w-72 mly-overflow-hidden mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-shadow-md mly-transition-all", children: [
8010
10559
  /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
8011
10560
  "div",
8012
10561
  {
@@ -8025,6 +10574,7 @@ var CommandList = (0, import_react57.forwardRef)(function CommandList2(props, re
8025
10574
  }
8026
10575
  ),
8027
10576
  /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "mly-space-y-0.5 mly-p-1", children: group.commands.map((item, commandIndex) => {
10577
+ const itemKey = `${groupIndex}-${commandIndex}`;
8028
10578
  return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
8029
10579
  SlashCommandItem,
8030
10580
  {
@@ -8035,9 +10585,11 @@ var CommandList = (0, import_react57.forwardRef)(function CommandList2(props, re
8035
10585
  selectedCommandIndex,
8036
10586
  selectItem: () => selectItem(groupIndex, commandIndex),
8037
10587
  editor,
8038
- activeCommandRef
10588
+ activeCommandRef,
10589
+ hoveredItemKey,
10590
+ onHover: (isHovered) => setHoveredItemKey(isHovered ? itemKey : null)
8039
10591
  },
8040
- commandIndex
10592
+ itemKey
8041
10593
  );
8042
10594
  }) })
8043
10595
  ] }, groupIndex))
@@ -8057,77 +10609,12 @@ var CommandList = (0, import_react57.forwardRef)(function CommandList2(props, re
8057
10609
  "to select"
8058
10610
  ] })
8059
10611
  ] }) })
8060
- ] }) }) : null;
10612
+ ] }) });
8061
10613
  });
8062
10614
  function getSlashCommandSuggestions(groups = DEFAULT_SLASH_COMMANDS) {
8063
10615
  return {
8064
10616
  items: ({ query, editor }) => {
8065
- var _a;
8066
- let newGroups = groups;
8067
- let search = query.toLowerCase();
8068
- const subCommandIds = newGroups.map((group) => {
8069
- return group.commands.filter((item) => "commands" in item).map((item) => item == null ? void 0 : item.id.toLowerCase());
8070
- }).flat().map((id) => `${id}.`);
8071
- const shouldEnterSubCommand = subCommandIds.some(
8072
- (id) => search.startsWith(id)
8073
- );
8074
- if (shouldEnterSubCommand) {
8075
- const subCommandId = subCommandIds.find((id) => search.startsWith(id));
8076
- const sanitizedSubCommandId = subCommandId == null ? void 0 : subCommandId.slice(0, -1);
8077
- const group = (_a = newGroups.find((group2) => {
8078
- return group2.commands.some(
8079
- // @ts-ignore
8080
- (item) => {
8081
- var _a2;
8082
- return ((_a2 = item == null ? void 0 : item.id) == null ? void 0 : _a2.toLowerCase()) === sanitizedSubCommandId;
8083
- }
8084
- );
8085
- })) == null ? void 0 : _a.commands.find(
8086
- // @ts-ignore
8087
- (item) => {
8088
- var _a2;
8089
- return ((_a2 = item == null ? void 0 : item.id) == null ? void 0 : _a2.toLowerCase()) === sanitizedSubCommandId;
8090
- }
8091
- );
8092
- if (!group) {
8093
- return groups;
8094
- }
8095
- search = search.replace(subCommandId || "", "");
8096
- newGroups = [
8097
- __spreadProps(__spreadValues({}, group), {
8098
- commands: (group == null ? void 0 : group.commands) || []
8099
- })
8100
- ];
8101
- }
8102
- const filteredGroups = newGroups.map((group) => {
8103
- return __spreadProps(__spreadValues({}, group), {
8104
- commands: group.commands.filter((item) => {
8105
- var _a2;
8106
- if (typeof query === "string" && query.length > 0) {
8107
- const show = (_a2 = item == null ? void 0 : item.render) == null ? void 0 : _a2.call(item, editor);
8108
- if (show === null) {
8109
- return false;
8110
- }
8111
- return item.title.toLowerCase().includes(search) || (item == null ? void 0 : item.description) && (item == null ? void 0 : item.description.toLowerCase().includes(search)) || item.searchTerms && item.searchTerms.some(
8112
- (term) => term.includes(search)
8113
- );
8114
- }
8115
- return true;
8116
- }).map((item) => {
8117
- const isSubCommandItem = "commands" in item;
8118
- if (isSubCommandItem) {
8119
- item = __spreadProps(__spreadValues({}, item), {
8120
- command: (options) => {
8121
- const { editor: editor2, range } = options;
8122
- editor2.chain().focus().insertContentAt(range, `/${item.id}.`).run();
8123
- }
8124
- });
8125
- }
8126
- return item;
8127
- })
8128
- });
8129
- }).filter((group) => group.commands.length > 0);
8130
- return filteredGroups;
10617
+ return filterSlashCommands({ query, editor, groups });
8131
10618
  },
8132
10619
  allow: ({ editor }) => {
8133
10620
  const isInsideHTMLCodeBlock = editor.isActive("htmlCodeBlock");
@@ -8610,7 +11097,7 @@ function TurnIntoBlock(props) {
8610
11097
  {
8611
11098
  onClick: option.onClick,
8612
11099
  variant: "ghost",
8613
- className: "mly-h-auto mly-justify-start mly-gap-2 !mly-rounded mly-px-2 mly-py-1 mly-text-sm mly-font-normal mly-text-midnight-gray",
11100
+ className: "mly-mb-0.5 mly-h-auto mly-justify-start mly-gap-2 !mly-rounded mly-px-2 mly-py-1 mly-text-sm mly-font-normal mly-text-midnight-gray",
8614
11101
  children: [
8615
11102
  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(option.icon, { className: "mly-size-[15px] mly-shrink-0" }),
8616
11103
  option.label
@@ -8823,6 +11310,37 @@ function VariableBubbleMenu(props) {
8823
11310
  );
8824
11311
  }
8825
11312
 
11313
+ // src/editor/extensions/selection/selection.ts
11314
+ var import_core19 = require("@tiptap/core");
11315
+ var import_state8 = require("@tiptap/pm/state");
11316
+ var import_view = require("@tiptap/pm/view");
11317
+ var SelectionExtension = import_core19.Extension.create({
11318
+ name: "selection",
11319
+ addProseMirrorPlugins() {
11320
+ const { editor } = this;
11321
+ return [
11322
+ new import_state8.Plugin({
11323
+ key: new import_state8.PluginKey("selection"),
11324
+ props: {
11325
+ decorations(state) {
11326
+ if (state.selection.empty) {
11327
+ return null;
11328
+ }
11329
+ if (editor.isFocused === true) {
11330
+ return null;
11331
+ }
11332
+ return import_view.DecorationSet.create(state.doc, [
11333
+ import_view.Decoration.inline(state.selection.from, state.selection.to, {
11334
+ class: "selection mly-bg-blue-200 mly-inline mly-py-1"
11335
+ })
11336
+ ]);
11337
+ }
11338
+ }
11339
+ })
11340
+ ];
11341
+ }
11342
+ });
11343
+
8826
11344
  // src/editor/extensions/index.tsx
8827
11345
  function extensions(props) {
8828
11346
  const { blocks, extensions: extensions2 = [] } = props;
@@ -8836,7 +11354,8 @@ function extensions(props) {
8836
11354
  }),
8837
11355
  HTMLCodeBlockExtension,
8838
11356
  InlineImageExtension,
8839
- PlaceholderExtension
11357
+ PlaceholderExtension,
11358
+ SelectionExtension
8840
11359
  ].filter((ext) => {
8841
11360
  return !extensions2.some((e) => e.name === ext.name);
8842
11361
  });
@@ -8880,6 +11399,7 @@ function Editor13(props) {
8880
11399
  contentClassName = "",
8881
11400
  bodyClassName = "",
8882
11401
  hasMenuBar = true,
11402
+ hideContextMenu = false,
8883
11403
  spellCheck = false,
8884
11404
  autofocus = "end",
8885
11405
  immediatelyRender = false
@@ -8965,7 +11485,7 @@ function Editor13(props) {
8965
11485
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react66.EditorContent, { editor }),
8966
11486
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SectionBubbleMenu, { editor, appendTo: menuContainerRef }),
8967
11487
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ColumnsBubbleMenu, { editor, appendTo: menuContainerRef }),
8968
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ContentMenu, { editor }),
11488
+ !hideContextMenu && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ContentMenu, { editor }),
8969
11489
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(VariableBubbleMenu, { editor, appendTo: menuContainerRef }),
8970
11490
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(RepeatBubbleMenu, { editor, appendTo: menuContainerRef }),
8971
11491
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(HTMLBubbleMenu, { editor, appendTo: menuContainerRef }),