@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/LICENSE +21 -0
- package/dist/blocks/index.d.cts +1 -1
- package/dist/blocks/index.d.ts +1 -1
- package/dist/extensions/index.cjs +5637 -3157
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.d.cts +10 -10
- package/dist/extensions/index.d.ts +10 -10
- package/dist/extensions/index.mjs +5670 -3190
- package/dist/extensions/index.mjs.map +1 -1
- package/dist/index.cjs +2716 -196
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +47 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +2727 -207
- package/dist/index.mjs.map +1 -1
- package/package.json +41 -42
package/dist/index.mjs
CHANGED
|
@@ -53,7 +53,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
53
53
|
|
|
54
54
|
// src/editor/index.tsx
|
|
55
55
|
import { EditorContent, useEditor } from "@tiptap/react";
|
|
56
|
-
import { useMemo as
|
|
56
|
+
import { useMemo as useMemo13, useRef as useRef13 } from "react";
|
|
57
57
|
|
|
58
58
|
// src/editor/components/column-menu/columns-bubble-menu.tsx
|
|
59
59
|
import { BubbleMenu } from "@tiptap/react";
|
|
@@ -108,7 +108,7 @@ function isTextSelected(editor) {
|
|
|
108
108
|
// src/editor/utils/columns.ts
|
|
109
109
|
import { Fragment } from "@tiptap/pm/model";
|
|
110
110
|
import { TextSelection } from "@tiptap/pm/state";
|
|
111
|
-
import { v4 as
|
|
111
|
+
import { v4 as uuidv42 } from "uuid";
|
|
112
112
|
import { findParentNode } from "@tiptap/core";
|
|
113
113
|
|
|
114
114
|
// src/editor/utils/update-attribute.ts
|
|
@@ -147,7 +147,7 @@ function updateAttributes(type, attrs) {
|
|
|
147
147
|
|
|
148
148
|
// src/editor/nodes/columns/column.ts
|
|
149
149
|
import { Node, mergeAttributes } from "@tiptap/core";
|
|
150
|
-
import { v4 as
|
|
150
|
+
import { v4 as uuidv4 } from "uuid";
|
|
151
151
|
var DEFAULT_COLUMN_WIDTH = "auto";
|
|
152
152
|
var DEFAULT_COLUMN_VERTICAL_ALIGN = "top";
|
|
153
153
|
var ColumnExtension = Node.create({
|
|
@@ -158,11 +158,11 @@ var ColumnExtension = Node.create({
|
|
|
158
158
|
return {
|
|
159
159
|
columnId: {
|
|
160
160
|
default: null,
|
|
161
|
-
parseHTML: (element) => element.getAttribute("data-column-id") ||
|
|
161
|
+
parseHTML: (element) => element.getAttribute("data-column-id") || uuidv4(),
|
|
162
162
|
renderHTML: (attributes) => {
|
|
163
163
|
if (!attributes.columnId) {
|
|
164
164
|
return {
|
|
165
|
-
"data-column-id":
|
|
165
|
+
"data-column-id": uuidv4()
|
|
166
166
|
};
|
|
167
167
|
}
|
|
168
168
|
return {
|
|
@@ -319,7 +319,7 @@ function addColumnByIndex(editor, index = -1) {
|
|
|
319
319
|
const newColumn = state.schema.nodes.column.create(
|
|
320
320
|
{
|
|
321
321
|
width: DEFAULT_COLUMN_WIDTH,
|
|
322
|
-
columnId:
|
|
322
|
+
columnId: uuidv42()
|
|
323
323
|
},
|
|
324
324
|
state.schema.nodes.paragraph.create(null)
|
|
325
325
|
);
|
|
@@ -416,7 +416,2510 @@ var useColumnsState = (editor) => {
|
|
|
416
416
|
|
|
417
417
|
// src/editor/utils/classname.ts
|
|
418
418
|
import { clsx } from "clsx";
|
|
419
|
-
|
|
419
|
+
|
|
420
|
+
// ../../node_modules/.pnpm/tailwind-merge@2.5.4/node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
421
|
+
var CLASS_PART_SEPARATOR = "-";
|
|
422
|
+
var createClassGroupUtils = (config) => {
|
|
423
|
+
const classMap = createClassMap(config);
|
|
424
|
+
const {
|
|
425
|
+
conflictingClassGroups,
|
|
426
|
+
conflictingClassGroupModifiers
|
|
427
|
+
} = config;
|
|
428
|
+
const getClassGroupId = (className) => {
|
|
429
|
+
const classParts = className.split(CLASS_PART_SEPARATOR);
|
|
430
|
+
if (classParts[0] === "" && classParts.length !== 1) {
|
|
431
|
+
classParts.shift();
|
|
432
|
+
}
|
|
433
|
+
return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
|
|
434
|
+
};
|
|
435
|
+
const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
|
|
436
|
+
const conflicts = conflictingClassGroups[classGroupId] || [];
|
|
437
|
+
if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
|
|
438
|
+
return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
|
|
439
|
+
}
|
|
440
|
+
return conflicts;
|
|
441
|
+
};
|
|
442
|
+
return {
|
|
443
|
+
getClassGroupId,
|
|
444
|
+
getConflictingClassGroupIds
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
var getGroupRecursive = (classParts, classPartObject) => {
|
|
448
|
+
var _a;
|
|
449
|
+
if (classParts.length === 0) {
|
|
450
|
+
return classPartObject.classGroupId;
|
|
451
|
+
}
|
|
452
|
+
const currentClassPart = classParts[0];
|
|
453
|
+
const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
|
|
454
|
+
const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
|
|
455
|
+
if (classGroupFromNextClassPart) {
|
|
456
|
+
return classGroupFromNextClassPart;
|
|
457
|
+
}
|
|
458
|
+
if (classPartObject.validators.length === 0) {
|
|
459
|
+
return void 0;
|
|
460
|
+
}
|
|
461
|
+
const classRest = classParts.join(CLASS_PART_SEPARATOR);
|
|
462
|
+
return (_a = classPartObject.validators.find(({
|
|
463
|
+
validator
|
|
464
|
+
}) => validator(classRest))) == null ? void 0 : _a.classGroupId;
|
|
465
|
+
};
|
|
466
|
+
var arbitraryPropertyRegex = /^\[(.+)\]$/;
|
|
467
|
+
var getGroupIdForArbitraryProperty = (className) => {
|
|
468
|
+
if (arbitraryPropertyRegex.test(className)) {
|
|
469
|
+
const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
|
|
470
|
+
const property = arbitraryPropertyClassName == null ? void 0 : arbitraryPropertyClassName.substring(0, arbitraryPropertyClassName.indexOf(":"));
|
|
471
|
+
if (property) {
|
|
472
|
+
return "arbitrary.." + property;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
var createClassMap = (config) => {
|
|
477
|
+
const {
|
|
478
|
+
theme,
|
|
479
|
+
prefix
|
|
480
|
+
} = config;
|
|
481
|
+
const classMap = {
|
|
482
|
+
nextPart: /* @__PURE__ */ new Map(),
|
|
483
|
+
validators: []
|
|
484
|
+
};
|
|
485
|
+
const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix);
|
|
486
|
+
prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {
|
|
487
|
+
processClassesRecursively(classGroup, classMap, classGroupId, theme);
|
|
488
|
+
});
|
|
489
|
+
return classMap;
|
|
490
|
+
};
|
|
491
|
+
var processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
|
|
492
|
+
classGroup.forEach((classDefinition) => {
|
|
493
|
+
if (typeof classDefinition === "string") {
|
|
494
|
+
const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
|
|
495
|
+
classPartObjectToEdit.classGroupId = classGroupId;
|
|
496
|
+
return;
|
|
497
|
+
}
|
|
498
|
+
if (typeof classDefinition === "function") {
|
|
499
|
+
if (isThemeGetter(classDefinition)) {
|
|
500
|
+
processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
classPartObject.validators.push({
|
|
504
|
+
validator: classDefinition,
|
|
505
|
+
classGroupId
|
|
506
|
+
});
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
509
|
+
Object.entries(classDefinition).forEach(([key, classGroup2]) => {
|
|
510
|
+
processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme);
|
|
511
|
+
});
|
|
512
|
+
});
|
|
513
|
+
};
|
|
514
|
+
var getPart = (classPartObject, path) => {
|
|
515
|
+
let currentClassPartObject = classPartObject;
|
|
516
|
+
path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
|
|
517
|
+
if (!currentClassPartObject.nextPart.has(pathPart)) {
|
|
518
|
+
currentClassPartObject.nextPart.set(pathPart, {
|
|
519
|
+
nextPart: /* @__PURE__ */ new Map(),
|
|
520
|
+
validators: []
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
|
|
524
|
+
});
|
|
525
|
+
return currentClassPartObject;
|
|
526
|
+
};
|
|
527
|
+
var isThemeGetter = (func) => func.isThemeGetter;
|
|
528
|
+
var getPrefixedClassGroupEntries = (classGroupEntries, prefix) => {
|
|
529
|
+
if (!prefix) {
|
|
530
|
+
return classGroupEntries;
|
|
531
|
+
}
|
|
532
|
+
return classGroupEntries.map(([classGroupId, classGroup]) => {
|
|
533
|
+
const prefixedClassGroup = classGroup.map((classDefinition) => {
|
|
534
|
+
if (typeof classDefinition === "string") {
|
|
535
|
+
return prefix + classDefinition;
|
|
536
|
+
}
|
|
537
|
+
if (typeof classDefinition === "object") {
|
|
538
|
+
return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]));
|
|
539
|
+
}
|
|
540
|
+
return classDefinition;
|
|
541
|
+
});
|
|
542
|
+
return [classGroupId, prefixedClassGroup];
|
|
543
|
+
});
|
|
544
|
+
};
|
|
545
|
+
var createLruCache = (maxCacheSize) => {
|
|
546
|
+
if (maxCacheSize < 1) {
|
|
547
|
+
return {
|
|
548
|
+
get: () => void 0,
|
|
549
|
+
set: () => {
|
|
550
|
+
}
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
let cacheSize = 0;
|
|
554
|
+
let cache = /* @__PURE__ */ new Map();
|
|
555
|
+
let previousCache = /* @__PURE__ */ new Map();
|
|
556
|
+
const update = (key, value) => {
|
|
557
|
+
cache.set(key, value);
|
|
558
|
+
cacheSize++;
|
|
559
|
+
if (cacheSize > maxCacheSize) {
|
|
560
|
+
cacheSize = 0;
|
|
561
|
+
previousCache = cache;
|
|
562
|
+
cache = /* @__PURE__ */ new Map();
|
|
563
|
+
}
|
|
564
|
+
};
|
|
565
|
+
return {
|
|
566
|
+
get(key) {
|
|
567
|
+
let value = cache.get(key);
|
|
568
|
+
if (value !== void 0) {
|
|
569
|
+
return value;
|
|
570
|
+
}
|
|
571
|
+
if ((value = previousCache.get(key)) !== void 0) {
|
|
572
|
+
update(key, value);
|
|
573
|
+
return value;
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
set(key, value) {
|
|
577
|
+
if (cache.has(key)) {
|
|
578
|
+
cache.set(key, value);
|
|
579
|
+
} else {
|
|
580
|
+
update(key, value);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
var IMPORTANT_MODIFIER = "!";
|
|
586
|
+
var createParseClassName = (config) => {
|
|
587
|
+
const {
|
|
588
|
+
separator,
|
|
589
|
+
experimentalParseClassName
|
|
590
|
+
} = config;
|
|
591
|
+
const isSeparatorSingleCharacter = separator.length === 1;
|
|
592
|
+
const firstSeparatorCharacter = separator[0];
|
|
593
|
+
const separatorLength = separator.length;
|
|
594
|
+
const parseClassName = (className) => {
|
|
595
|
+
const modifiers = [];
|
|
596
|
+
let bracketDepth = 0;
|
|
597
|
+
let modifierStart = 0;
|
|
598
|
+
let postfixModifierPosition;
|
|
599
|
+
for (let index = 0; index < className.length; index++) {
|
|
600
|
+
let currentCharacter = className[index];
|
|
601
|
+
if (bracketDepth === 0) {
|
|
602
|
+
if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {
|
|
603
|
+
modifiers.push(className.slice(modifierStart, index));
|
|
604
|
+
modifierStart = index + separatorLength;
|
|
605
|
+
continue;
|
|
606
|
+
}
|
|
607
|
+
if (currentCharacter === "/") {
|
|
608
|
+
postfixModifierPosition = index;
|
|
609
|
+
continue;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
if (currentCharacter === "[") {
|
|
613
|
+
bracketDepth++;
|
|
614
|
+
} else if (currentCharacter === "]") {
|
|
615
|
+
bracketDepth--;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
|
|
619
|
+
const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);
|
|
620
|
+
const baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;
|
|
621
|
+
const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
|
|
622
|
+
return {
|
|
623
|
+
modifiers,
|
|
624
|
+
hasImportantModifier,
|
|
625
|
+
baseClassName,
|
|
626
|
+
maybePostfixModifierPosition
|
|
627
|
+
};
|
|
628
|
+
};
|
|
629
|
+
if (experimentalParseClassName) {
|
|
630
|
+
return (className) => experimentalParseClassName({
|
|
631
|
+
className,
|
|
632
|
+
parseClassName
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
return parseClassName;
|
|
636
|
+
};
|
|
637
|
+
var sortModifiers = (modifiers) => {
|
|
638
|
+
if (modifiers.length <= 1) {
|
|
639
|
+
return modifiers;
|
|
640
|
+
}
|
|
641
|
+
const sortedModifiers = [];
|
|
642
|
+
let unsortedModifiers = [];
|
|
643
|
+
modifiers.forEach((modifier) => {
|
|
644
|
+
const isArbitraryVariant = modifier[0] === "[";
|
|
645
|
+
if (isArbitraryVariant) {
|
|
646
|
+
sortedModifiers.push(...unsortedModifiers.sort(), modifier);
|
|
647
|
+
unsortedModifiers = [];
|
|
648
|
+
} else {
|
|
649
|
+
unsortedModifiers.push(modifier);
|
|
650
|
+
}
|
|
651
|
+
});
|
|
652
|
+
sortedModifiers.push(...unsortedModifiers.sort());
|
|
653
|
+
return sortedModifiers;
|
|
654
|
+
};
|
|
655
|
+
var createConfigUtils = (config) => __spreadValues({
|
|
656
|
+
cache: createLruCache(config.cacheSize),
|
|
657
|
+
parseClassName: createParseClassName(config)
|
|
658
|
+
}, createClassGroupUtils(config));
|
|
659
|
+
var SPLIT_CLASSES_REGEX = /\s+/;
|
|
660
|
+
var mergeClassList = (classList, configUtils) => {
|
|
661
|
+
const {
|
|
662
|
+
parseClassName,
|
|
663
|
+
getClassGroupId,
|
|
664
|
+
getConflictingClassGroupIds
|
|
665
|
+
} = configUtils;
|
|
666
|
+
const classGroupsInConflict = [];
|
|
667
|
+
const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
|
|
668
|
+
let result = "";
|
|
669
|
+
for (let index = classNames.length - 1; index >= 0; index -= 1) {
|
|
670
|
+
const originalClassName = classNames[index];
|
|
671
|
+
const {
|
|
672
|
+
modifiers,
|
|
673
|
+
hasImportantModifier,
|
|
674
|
+
baseClassName,
|
|
675
|
+
maybePostfixModifierPosition
|
|
676
|
+
} = parseClassName(originalClassName);
|
|
677
|
+
let hasPostfixModifier = Boolean(maybePostfixModifierPosition);
|
|
678
|
+
let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
|
|
679
|
+
if (!classGroupId) {
|
|
680
|
+
if (!hasPostfixModifier) {
|
|
681
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
682
|
+
continue;
|
|
683
|
+
}
|
|
684
|
+
classGroupId = getClassGroupId(baseClassName);
|
|
685
|
+
if (!classGroupId) {
|
|
686
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
687
|
+
continue;
|
|
688
|
+
}
|
|
689
|
+
hasPostfixModifier = false;
|
|
690
|
+
}
|
|
691
|
+
const variantModifier = sortModifiers(modifiers).join(":");
|
|
692
|
+
const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
|
|
693
|
+
const classId = modifierId + classGroupId;
|
|
694
|
+
if (classGroupsInConflict.includes(classId)) {
|
|
695
|
+
continue;
|
|
696
|
+
}
|
|
697
|
+
classGroupsInConflict.push(classId);
|
|
698
|
+
const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
|
|
699
|
+
for (let i = 0; i < conflictGroups.length; ++i) {
|
|
700
|
+
const group = conflictGroups[i];
|
|
701
|
+
classGroupsInConflict.push(modifierId + group);
|
|
702
|
+
}
|
|
703
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
704
|
+
}
|
|
705
|
+
return result;
|
|
706
|
+
};
|
|
707
|
+
function twJoin() {
|
|
708
|
+
let index = 0;
|
|
709
|
+
let argument;
|
|
710
|
+
let resolvedValue;
|
|
711
|
+
let string = "";
|
|
712
|
+
while (index < arguments.length) {
|
|
713
|
+
if (argument = arguments[index++]) {
|
|
714
|
+
if (resolvedValue = toValue(argument)) {
|
|
715
|
+
string && (string += " ");
|
|
716
|
+
string += resolvedValue;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
return string;
|
|
721
|
+
}
|
|
722
|
+
var toValue = (mix) => {
|
|
723
|
+
if (typeof mix === "string") {
|
|
724
|
+
return mix;
|
|
725
|
+
}
|
|
726
|
+
let resolvedValue;
|
|
727
|
+
let string = "";
|
|
728
|
+
for (let k = 0; k < mix.length; k++) {
|
|
729
|
+
if (mix[k]) {
|
|
730
|
+
if (resolvedValue = toValue(mix[k])) {
|
|
731
|
+
string && (string += " ");
|
|
732
|
+
string += resolvedValue;
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
return string;
|
|
737
|
+
};
|
|
738
|
+
function createTailwindMerge(createConfigFirst, ...createConfigRest) {
|
|
739
|
+
let configUtils;
|
|
740
|
+
let cacheGet;
|
|
741
|
+
let cacheSet;
|
|
742
|
+
let functionToCall = initTailwindMerge;
|
|
743
|
+
function initTailwindMerge(classList) {
|
|
744
|
+
const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
|
|
745
|
+
configUtils = createConfigUtils(config);
|
|
746
|
+
cacheGet = configUtils.cache.get;
|
|
747
|
+
cacheSet = configUtils.cache.set;
|
|
748
|
+
functionToCall = tailwindMerge;
|
|
749
|
+
return tailwindMerge(classList);
|
|
750
|
+
}
|
|
751
|
+
function tailwindMerge(classList) {
|
|
752
|
+
const cachedResult = cacheGet(classList);
|
|
753
|
+
if (cachedResult) {
|
|
754
|
+
return cachedResult;
|
|
755
|
+
}
|
|
756
|
+
const result = mergeClassList(classList, configUtils);
|
|
757
|
+
cacheSet(classList, result);
|
|
758
|
+
return result;
|
|
759
|
+
}
|
|
760
|
+
return function callTailwindMerge() {
|
|
761
|
+
return functionToCall(twJoin.apply(null, arguments));
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
var fromTheme = (key) => {
|
|
765
|
+
const themeGetter = (theme) => theme[key] || [];
|
|
766
|
+
themeGetter.isThemeGetter = true;
|
|
767
|
+
return themeGetter;
|
|
768
|
+
};
|
|
769
|
+
var arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
|
|
770
|
+
var fractionRegex = /^\d+\/\d+$/;
|
|
771
|
+
var stringLengths = /* @__PURE__ */ new Set(["px", "full", "screen"]);
|
|
772
|
+
var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
|
|
773
|
+
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$/;
|
|
774
|
+
var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
|
|
775
|
+
var shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
|
|
776
|
+
var imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
|
|
777
|
+
var isLength = (value) => isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);
|
|
778
|
+
var isArbitraryLength = (value) => getIsArbitraryValue(value, "length", isLengthOnly);
|
|
779
|
+
var isNumber = (value) => Boolean(value) && !Number.isNaN(Number(value));
|
|
780
|
+
var isArbitraryNumber = (value) => getIsArbitraryValue(value, "number", isNumber);
|
|
781
|
+
var isInteger = (value) => Boolean(value) && Number.isInteger(Number(value));
|
|
782
|
+
var isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
|
|
783
|
+
var isArbitraryValue = (value) => arbitraryValueRegex.test(value);
|
|
784
|
+
var isTshirtSize = (value) => tshirtUnitRegex.test(value);
|
|
785
|
+
var sizeLabels = /* @__PURE__ */ new Set(["length", "size", "percentage"]);
|
|
786
|
+
var isArbitrarySize = (value) => getIsArbitraryValue(value, sizeLabels, isNever);
|
|
787
|
+
var isArbitraryPosition = (value) => getIsArbitraryValue(value, "position", isNever);
|
|
788
|
+
var imageLabels = /* @__PURE__ */ new Set(["image", "url"]);
|
|
789
|
+
var isArbitraryImage = (value) => getIsArbitraryValue(value, imageLabels, isImage);
|
|
790
|
+
var isArbitraryShadow = (value) => getIsArbitraryValue(value, "", isShadow);
|
|
791
|
+
var isAny = () => true;
|
|
792
|
+
var getIsArbitraryValue = (value, label, testValue) => {
|
|
793
|
+
const result = arbitraryValueRegex.exec(value);
|
|
794
|
+
if (result) {
|
|
795
|
+
if (result[1]) {
|
|
796
|
+
return typeof label === "string" ? result[1] === label : label.has(result[1]);
|
|
797
|
+
}
|
|
798
|
+
return testValue(result[2]);
|
|
799
|
+
}
|
|
800
|
+
return false;
|
|
801
|
+
};
|
|
802
|
+
var isLengthOnly = (value) => (
|
|
803
|
+
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
804
|
+
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
805
|
+
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
806
|
+
lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)
|
|
807
|
+
);
|
|
808
|
+
var isNever = () => false;
|
|
809
|
+
var isShadow = (value) => shadowRegex.test(value);
|
|
810
|
+
var isImage = (value) => imageRegex.test(value);
|
|
811
|
+
var getDefaultConfig = () => {
|
|
812
|
+
const colors = fromTheme("colors");
|
|
813
|
+
const spacing2 = fromTheme("spacing");
|
|
814
|
+
const blur = fromTheme("blur");
|
|
815
|
+
const brightness = fromTheme("brightness");
|
|
816
|
+
const borderColor = fromTheme("borderColor");
|
|
817
|
+
const borderRadius2 = fromTheme("borderRadius");
|
|
818
|
+
const borderSpacing = fromTheme("borderSpacing");
|
|
819
|
+
const borderWidth = fromTheme("borderWidth");
|
|
820
|
+
const contrast = fromTheme("contrast");
|
|
821
|
+
const grayscale = fromTheme("grayscale");
|
|
822
|
+
const hueRotate = fromTheme("hueRotate");
|
|
823
|
+
const invert = fromTheme("invert");
|
|
824
|
+
const gap = fromTheme("gap");
|
|
825
|
+
const gradientColorStops = fromTheme("gradientColorStops");
|
|
826
|
+
const gradientColorStopPositions = fromTheme("gradientColorStopPositions");
|
|
827
|
+
const inset = fromTheme("inset");
|
|
828
|
+
const margin = fromTheme("margin");
|
|
829
|
+
const opacity = fromTheme("opacity");
|
|
830
|
+
const padding = fromTheme("padding");
|
|
831
|
+
const saturate = fromTheme("saturate");
|
|
832
|
+
const scale = fromTheme("scale");
|
|
833
|
+
const sepia = fromTheme("sepia");
|
|
834
|
+
const skew = fromTheme("skew");
|
|
835
|
+
const space = fromTheme("space");
|
|
836
|
+
const translate = fromTheme("translate");
|
|
837
|
+
const getOverscroll = () => ["auto", "contain", "none"];
|
|
838
|
+
const getOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
|
|
839
|
+
const getSpacingWithAutoAndArbitrary = () => ["auto", isArbitraryValue, spacing2];
|
|
840
|
+
const getSpacingWithArbitrary = () => [isArbitraryValue, spacing2];
|
|
841
|
+
const getLengthWithEmptyAndArbitrary = () => ["", isLength, isArbitraryLength];
|
|
842
|
+
const getNumberWithAutoAndArbitrary = () => ["auto", isNumber, isArbitraryValue];
|
|
843
|
+
const getPositions = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"];
|
|
844
|
+
const getLineStyles = () => ["solid", "dashed", "dotted", "double", "none"];
|
|
845
|
+
const getBlendModes = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
|
|
846
|
+
const getAlign = () => ["start", "end", "center", "between", "around", "evenly", "stretch"];
|
|
847
|
+
const getZeroAndEmpty = () => ["", "0", isArbitraryValue];
|
|
848
|
+
const getBreaks = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
|
|
849
|
+
const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];
|
|
850
|
+
return {
|
|
851
|
+
cacheSize: 500,
|
|
852
|
+
separator: ":",
|
|
853
|
+
theme: {
|
|
854
|
+
colors: [isAny],
|
|
855
|
+
spacing: [isLength, isArbitraryLength],
|
|
856
|
+
blur: ["none", "", isTshirtSize, isArbitraryValue],
|
|
857
|
+
brightness: getNumberAndArbitrary(),
|
|
858
|
+
borderColor: [colors],
|
|
859
|
+
borderRadius: ["none", "", "full", isTshirtSize, isArbitraryValue],
|
|
860
|
+
borderSpacing: getSpacingWithArbitrary(),
|
|
861
|
+
borderWidth: getLengthWithEmptyAndArbitrary(),
|
|
862
|
+
contrast: getNumberAndArbitrary(),
|
|
863
|
+
grayscale: getZeroAndEmpty(),
|
|
864
|
+
hueRotate: getNumberAndArbitrary(),
|
|
865
|
+
invert: getZeroAndEmpty(),
|
|
866
|
+
gap: getSpacingWithArbitrary(),
|
|
867
|
+
gradientColorStops: [colors],
|
|
868
|
+
gradientColorStopPositions: [isPercent, isArbitraryLength],
|
|
869
|
+
inset: getSpacingWithAutoAndArbitrary(),
|
|
870
|
+
margin: getSpacingWithAutoAndArbitrary(),
|
|
871
|
+
opacity: getNumberAndArbitrary(),
|
|
872
|
+
padding: getSpacingWithArbitrary(),
|
|
873
|
+
saturate: getNumberAndArbitrary(),
|
|
874
|
+
scale: getNumberAndArbitrary(),
|
|
875
|
+
sepia: getZeroAndEmpty(),
|
|
876
|
+
skew: getNumberAndArbitrary(),
|
|
877
|
+
space: getSpacingWithArbitrary(),
|
|
878
|
+
translate: getSpacingWithArbitrary()
|
|
879
|
+
},
|
|
880
|
+
classGroups: {
|
|
881
|
+
// Layout
|
|
882
|
+
/**
|
|
883
|
+
* Aspect Ratio
|
|
884
|
+
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
885
|
+
*/
|
|
886
|
+
aspect: [{
|
|
887
|
+
aspect: ["auto", "square", "video", isArbitraryValue]
|
|
888
|
+
}],
|
|
889
|
+
/**
|
|
890
|
+
* Container
|
|
891
|
+
* @see https://tailwindcss.com/docs/container
|
|
892
|
+
*/
|
|
893
|
+
container: ["container"],
|
|
894
|
+
/**
|
|
895
|
+
* Columns
|
|
896
|
+
* @see https://tailwindcss.com/docs/columns
|
|
897
|
+
*/
|
|
898
|
+
columns: [{
|
|
899
|
+
columns: [isTshirtSize]
|
|
900
|
+
}],
|
|
901
|
+
/**
|
|
902
|
+
* Break After
|
|
903
|
+
* @see https://tailwindcss.com/docs/break-after
|
|
904
|
+
*/
|
|
905
|
+
"break-after": [{
|
|
906
|
+
"break-after": getBreaks()
|
|
907
|
+
}],
|
|
908
|
+
/**
|
|
909
|
+
* Break Before
|
|
910
|
+
* @see https://tailwindcss.com/docs/break-before
|
|
911
|
+
*/
|
|
912
|
+
"break-before": [{
|
|
913
|
+
"break-before": getBreaks()
|
|
914
|
+
}],
|
|
915
|
+
/**
|
|
916
|
+
* Break Inside
|
|
917
|
+
* @see https://tailwindcss.com/docs/break-inside
|
|
918
|
+
*/
|
|
919
|
+
"break-inside": [{
|
|
920
|
+
"break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
|
|
921
|
+
}],
|
|
922
|
+
/**
|
|
923
|
+
* Box Decoration Break
|
|
924
|
+
* @see https://tailwindcss.com/docs/box-decoration-break
|
|
925
|
+
*/
|
|
926
|
+
"box-decoration": [{
|
|
927
|
+
"box-decoration": ["slice", "clone"]
|
|
928
|
+
}],
|
|
929
|
+
/**
|
|
930
|
+
* Box Sizing
|
|
931
|
+
* @see https://tailwindcss.com/docs/box-sizing
|
|
932
|
+
*/
|
|
933
|
+
box: [{
|
|
934
|
+
box: ["border", "content"]
|
|
935
|
+
}],
|
|
936
|
+
/**
|
|
937
|
+
* Display
|
|
938
|
+
* @see https://tailwindcss.com/docs/display
|
|
939
|
+
*/
|
|
940
|
+
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"],
|
|
941
|
+
/**
|
|
942
|
+
* Floats
|
|
943
|
+
* @see https://tailwindcss.com/docs/float
|
|
944
|
+
*/
|
|
945
|
+
float: [{
|
|
946
|
+
float: ["right", "left", "none", "start", "end"]
|
|
947
|
+
}],
|
|
948
|
+
/**
|
|
949
|
+
* Clear
|
|
950
|
+
* @see https://tailwindcss.com/docs/clear
|
|
951
|
+
*/
|
|
952
|
+
clear: [{
|
|
953
|
+
clear: ["left", "right", "both", "none", "start", "end"]
|
|
954
|
+
}],
|
|
955
|
+
/**
|
|
956
|
+
* Isolation
|
|
957
|
+
* @see https://tailwindcss.com/docs/isolation
|
|
958
|
+
*/
|
|
959
|
+
isolation: ["isolate", "isolation-auto"],
|
|
960
|
+
/**
|
|
961
|
+
* Object Fit
|
|
962
|
+
* @see https://tailwindcss.com/docs/object-fit
|
|
963
|
+
*/
|
|
964
|
+
"object-fit": [{
|
|
965
|
+
object: ["contain", "cover", "fill", "none", "scale-down"]
|
|
966
|
+
}],
|
|
967
|
+
/**
|
|
968
|
+
* Object Position
|
|
969
|
+
* @see https://tailwindcss.com/docs/object-position
|
|
970
|
+
*/
|
|
971
|
+
"object-position": [{
|
|
972
|
+
object: [...getPositions(), isArbitraryValue]
|
|
973
|
+
}],
|
|
974
|
+
/**
|
|
975
|
+
* Overflow
|
|
976
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
977
|
+
*/
|
|
978
|
+
overflow: [{
|
|
979
|
+
overflow: getOverflow()
|
|
980
|
+
}],
|
|
981
|
+
/**
|
|
982
|
+
* Overflow X
|
|
983
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
984
|
+
*/
|
|
985
|
+
"overflow-x": [{
|
|
986
|
+
"overflow-x": getOverflow()
|
|
987
|
+
}],
|
|
988
|
+
/**
|
|
989
|
+
* Overflow Y
|
|
990
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
991
|
+
*/
|
|
992
|
+
"overflow-y": [{
|
|
993
|
+
"overflow-y": getOverflow()
|
|
994
|
+
}],
|
|
995
|
+
/**
|
|
996
|
+
* Overscroll Behavior
|
|
997
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
998
|
+
*/
|
|
999
|
+
overscroll: [{
|
|
1000
|
+
overscroll: getOverscroll()
|
|
1001
|
+
}],
|
|
1002
|
+
/**
|
|
1003
|
+
* Overscroll Behavior X
|
|
1004
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
1005
|
+
*/
|
|
1006
|
+
"overscroll-x": [{
|
|
1007
|
+
"overscroll-x": getOverscroll()
|
|
1008
|
+
}],
|
|
1009
|
+
/**
|
|
1010
|
+
* Overscroll Behavior Y
|
|
1011
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
1012
|
+
*/
|
|
1013
|
+
"overscroll-y": [{
|
|
1014
|
+
"overscroll-y": getOverscroll()
|
|
1015
|
+
}],
|
|
1016
|
+
/**
|
|
1017
|
+
* Position
|
|
1018
|
+
* @see https://tailwindcss.com/docs/position
|
|
1019
|
+
*/
|
|
1020
|
+
position: ["static", "fixed", "absolute", "relative", "sticky"],
|
|
1021
|
+
/**
|
|
1022
|
+
* Top / Right / Bottom / Left
|
|
1023
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1024
|
+
*/
|
|
1025
|
+
inset: [{
|
|
1026
|
+
inset: [inset]
|
|
1027
|
+
}],
|
|
1028
|
+
/**
|
|
1029
|
+
* Right / Left
|
|
1030
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1031
|
+
*/
|
|
1032
|
+
"inset-x": [{
|
|
1033
|
+
"inset-x": [inset]
|
|
1034
|
+
}],
|
|
1035
|
+
/**
|
|
1036
|
+
* Top / Bottom
|
|
1037
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1038
|
+
*/
|
|
1039
|
+
"inset-y": [{
|
|
1040
|
+
"inset-y": [inset]
|
|
1041
|
+
}],
|
|
1042
|
+
/**
|
|
1043
|
+
* Start
|
|
1044
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1045
|
+
*/
|
|
1046
|
+
start: [{
|
|
1047
|
+
start: [inset]
|
|
1048
|
+
}],
|
|
1049
|
+
/**
|
|
1050
|
+
* End
|
|
1051
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1052
|
+
*/
|
|
1053
|
+
end: [{
|
|
1054
|
+
end: [inset]
|
|
1055
|
+
}],
|
|
1056
|
+
/**
|
|
1057
|
+
* Top
|
|
1058
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1059
|
+
*/
|
|
1060
|
+
top: [{
|
|
1061
|
+
top: [inset]
|
|
1062
|
+
}],
|
|
1063
|
+
/**
|
|
1064
|
+
* Right
|
|
1065
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1066
|
+
*/
|
|
1067
|
+
right: [{
|
|
1068
|
+
right: [inset]
|
|
1069
|
+
}],
|
|
1070
|
+
/**
|
|
1071
|
+
* Bottom
|
|
1072
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1073
|
+
*/
|
|
1074
|
+
bottom: [{
|
|
1075
|
+
bottom: [inset]
|
|
1076
|
+
}],
|
|
1077
|
+
/**
|
|
1078
|
+
* Left
|
|
1079
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1080
|
+
*/
|
|
1081
|
+
left: [{
|
|
1082
|
+
left: [inset]
|
|
1083
|
+
}],
|
|
1084
|
+
/**
|
|
1085
|
+
* Visibility
|
|
1086
|
+
* @see https://tailwindcss.com/docs/visibility
|
|
1087
|
+
*/
|
|
1088
|
+
visibility: ["visible", "invisible", "collapse"],
|
|
1089
|
+
/**
|
|
1090
|
+
* Z-Index
|
|
1091
|
+
* @see https://tailwindcss.com/docs/z-index
|
|
1092
|
+
*/
|
|
1093
|
+
z: [{
|
|
1094
|
+
z: ["auto", isInteger, isArbitraryValue]
|
|
1095
|
+
}],
|
|
1096
|
+
// Flexbox and Grid
|
|
1097
|
+
/**
|
|
1098
|
+
* Flex Basis
|
|
1099
|
+
* @see https://tailwindcss.com/docs/flex-basis
|
|
1100
|
+
*/
|
|
1101
|
+
basis: [{
|
|
1102
|
+
basis: getSpacingWithAutoAndArbitrary()
|
|
1103
|
+
}],
|
|
1104
|
+
/**
|
|
1105
|
+
* Flex Direction
|
|
1106
|
+
* @see https://tailwindcss.com/docs/flex-direction
|
|
1107
|
+
*/
|
|
1108
|
+
"flex-direction": [{
|
|
1109
|
+
flex: ["row", "row-reverse", "col", "col-reverse"]
|
|
1110
|
+
}],
|
|
1111
|
+
/**
|
|
1112
|
+
* Flex Wrap
|
|
1113
|
+
* @see https://tailwindcss.com/docs/flex-wrap
|
|
1114
|
+
*/
|
|
1115
|
+
"flex-wrap": [{
|
|
1116
|
+
flex: ["wrap", "wrap-reverse", "nowrap"]
|
|
1117
|
+
}],
|
|
1118
|
+
/**
|
|
1119
|
+
* Flex
|
|
1120
|
+
* @see https://tailwindcss.com/docs/flex
|
|
1121
|
+
*/
|
|
1122
|
+
flex: [{
|
|
1123
|
+
flex: ["1", "auto", "initial", "none", isArbitraryValue]
|
|
1124
|
+
}],
|
|
1125
|
+
/**
|
|
1126
|
+
* Flex Grow
|
|
1127
|
+
* @see https://tailwindcss.com/docs/flex-grow
|
|
1128
|
+
*/
|
|
1129
|
+
grow: [{
|
|
1130
|
+
grow: getZeroAndEmpty()
|
|
1131
|
+
}],
|
|
1132
|
+
/**
|
|
1133
|
+
* Flex Shrink
|
|
1134
|
+
* @see https://tailwindcss.com/docs/flex-shrink
|
|
1135
|
+
*/
|
|
1136
|
+
shrink: [{
|
|
1137
|
+
shrink: getZeroAndEmpty()
|
|
1138
|
+
}],
|
|
1139
|
+
/**
|
|
1140
|
+
* Order
|
|
1141
|
+
* @see https://tailwindcss.com/docs/order
|
|
1142
|
+
*/
|
|
1143
|
+
order: [{
|
|
1144
|
+
order: ["first", "last", "none", isInteger, isArbitraryValue]
|
|
1145
|
+
}],
|
|
1146
|
+
/**
|
|
1147
|
+
* Grid Template Columns
|
|
1148
|
+
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
1149
|
+
*/
|
|
1150
|
+
"grid-cols": [{
|
|
1151
|
+
"grid-cols": [isAny]
|
|
1152
|
+
}],
|
|
1153
|
+
/**
|
|
1154
|
+
* Grid Column Start / End
|
|
1155
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
1156
|
+
*/
|
|
1157
|
+
"col-start-end": [{
|
|
1158
|
+
col: ["auto", {
|
|
1159
|
+
span: ["full", isInteger, isArbitraryValue]
|
|
1160
|
+
}, isArbitraryValue]
|
|
1161
|
+
}],
|
|
1162
|
+
/**
|
|
1163
|
+
* Grid Column Start
|
|
1164
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
1165
|
+
*/
|
|
1166
|
+
"col-start": [{
|
|
1167
|
+
"col-start": getNumberWithAutoAndArbitrary()
|
|
1168
|
+
}],
|
|
1169
|
+
/**
|
|
1170
|
+
* Grid Column End
|
|
1171
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
1172
|
+
*/
|
|
1173
|
+
"col-end": [{
|
|
1174
|
+
"col-end": getNumberWithAutoAndArbitrary()
|
|
1175
|
+
}],
|
|
1176
|
+
/**
|
|
1177
|
+
* Grid Template Rows
|
|
1178
|
+
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
1179
|
+
*/
|
|
1180
|
+
"grid-rows": [{
|
|
1181
|
+
"grid-rows": [isAny]
|
|
1182
|
+
}],
|
|
1183
|
+
/**
|
|
1184
|
+
* Grid Row Start / End
|
|
1185
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
1186
|
+
*/
|
|
1187
|
+
"row-start-end": [{
|
|
1188
|
+
row: ["auto", {
|
|
1189
|
+
span: [isInteger, isArbitraryValue]
|
|
1190
|
+
}, isArbitraryValue]
|
|
1191
|
+
}],
|
|
1192
|
+
/**
|
|
1193
|
+
* Grid Row Start
|
|
1194
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
1195
|
+
*/
|
|
1196
|
+
"row-start": [{
|
|
1197
|
+
"row-start": getNumberWithAutoAndArbitrary()
|
|
1198
|
+
}],
|
|
1199
|
+
/**
|
|
1200
|
+
* Grid Row End
|
|
1201
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
1202
|
+
*/
|
|
1203
|
+
"row-end": [{
|
|
1204
|
+
"row-end": getNumberWithAutoAndArbitrary()
|
|
1205
|
+
}],
|
|
1206
|
+
/**
|
|
1207
|
+
* Grid Auto Flow
|
|
1208
|
+
* @see https://tailwindcss.com/docs/grid-auto-flow
|
|
1209
|
+
*/
|
|
1210
|
+
"grid-flow": [{
|
|
1211
|
+
"grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
|
|
1212
|
+
}],
|
|
1213
|
+
/**
|
|
1214
|
+
* Grid Auto Columns
|
|
1215
|
+
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
1216
|
+
*/
|
|
1217
|
+
"auto-cols": [{
|
|
1218
|
+
"auto-cols": ["auto", "min", "max", "fr", isArbitraryValue]
|
|
1219
|
+
}],
|
|
1220
|
+
/**
|
|
1221
|
+
* Grid Auto Rows
|
|
1222
|
+
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
1223
|
+
*/
|
|
1224
|
+
"auto-rows": [{
|
|
1225
|
+
"auto-rows": ["auto", "min", "max", "fr", isArbitraryValue]
|
|
1226
|
+
}],
|
|
1227
|
+
/**
|
|
1228
|
+
* Gap
|
|
1229
|
+
* @see https://tailwindcss.com/docs/gap
|
|
1230
|
+
*/
|
|
1231
|
+
gap: [{
|
|
1232
|
+
gap: [gap]
|
|
1233
|
+
}],
|
|
1234
|
+
/**
|
|
1235
|
+
* Gap X
|
|
1236
|
+
* @see https://tailwindcss.com/docs/gap
|
|
1237
|
+
*/
|
|
1238
|
+
"gap-x": [{
|
|
1239
|
+
"gap-x": [gap]
|
|
1240
|
+
}],
|
|
1241
|
+
/**
|
|
1242
|
+
* Gap Y
|
|
1243
|
+
* @see https://tailwindcss.com/docs/gap
|
|
1244
|
+
*/
|
|
1245
|
+
"gap-y": [{
|
|
1246
|
+
"gap-y": [gap]
|
|
1247
|
+
}],
|
|
1248
|
+
/**
|
|
1249
|
+
* Justify Content
|
|
1250
|
+
* @see https://tailwindcss.com/docs/justify-content
|
|
1251
|
+
*/
|
|
1252
|
+
"justify-content": [{
|
|
1253
|
+
justify: ["normal", ...getAlign()]
|
|
1254
|
+
}],
|
|
1255
|
+
/**
|
|
1256
|
+
* Justify Items
|
|
1257
|
+
* @see https://tailwindcss.com/docs/justify-items
|
|
1258
|
+
*/
|
|
1259
|
+
"justify-items": [{
|
|
1260
|
+
"justify-items": ["start", "end", "center", "stretch"]
|
|
1261
|
+
}],
|
|
1262
|
+
/**
|
|
1263
|
+
* Justify Self
|
|
1264
|
+
* @see https://tailwindcss.com/docs/justify-self
|
|
1265
|
+
*/
|
|
1266
|
+
"justify-self": [{
|
|
1267
|
+
"justify-self": ["auto", "start", "end", "center", "stretch"]
|
|
1268
|
+
}],
|
|
1269
|
+
/**
|
|
1270
|
+
* Align Content
|
|
1271
|
+
* @see https://tailwindcss.com/docs/align-content
|
|
1272
|
+
*/
|
|
1273
|
+
"align-content": [{
|
|
1274
|
+
content: ["normal", ...getAlign(), "baseline"]
|
|
1275
|
+
}],
|
|
1276
|
+
/**
|
|
1277
|
+
* Align Items
|
|
1278
|
+
* @see https://tailwindcss.com/docs/align-items
|
|
1279
|
+
*/
|
|
1280
|
+
"align-items": [{
|
|
1281
|
+
items: ["start", "end", "center", "baseline", "stretch"]
|
|
1282
|
+
}],
|
|
1283
|
+
/**
|
|
1284
|
+
* Align Self
|
|
1285
|
+
* @see https://tailwindcss.com/docs/align-self
|
|
1286
|
+
*/
|
|
1287
|
+
"align-self": [{
|
|
1288
|
+
self: ["auto", "start", "end", "center", "stretch", "baseline"]
|
|
1289
|
+
}],
|
|
1290
|
+
/**
|
|
1291
|
+
* Place Content
|
|
1292
|
+
* @see https://tailwindcss.com/docs/place-content
|
|
1293
|
+
*/
|
|
1294
|
+
"place-content": [{
|
|
1295
|
+
"place-content": [...getAlign(), "baseline"]
|
|
1296
|
+
}],
|
|
1297
|
+
/**
|
|
1298
|
+
* Place Items
|
|
1299
|
+
* @see https://tailwindcss.com/docs/place-items
|
|
1300
|
+
*/
|
|
1301
|
+
"place-items": [{
|
|
1302
|
+
"place-items": ["start", "end", "center", "baseline", "stretch"]
|
|
1303
|
+
}],
|
|
1304
|
+
/**
|
|
1305
|
+
* Place Self
|
|
1306
|
+
* @see https://tailwindcss.com/docs/place-self
|
|
1307
|
+
*/
|
|
1308
|
+
"place-self": [{
|
|
1309
|
+
"place-self": ["auto", "start", "end", "center", "stretch"]
|
|
1310
|
+
}],
|
|
1311
|
+
// Spacing
|
|
1312
|
+
/**
|
|
1313
|
+
* Padding
|
|
1314
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1315
|
+
*/
|
|
1316
|
+
p: [{
|
|
1317
|
+
p: [padding]
|
|
1318
|
+
}],
|
|
1319
|
+
/**
|
|
1320
|
+
* Padding X
|
|
1321
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1322
|
+
*/
|
|
1323
|
+
px: [{
|
|
1324
|
+
px: [padding]
|
|
1325
|
+
}],
|
|
1326
|
+
/**
|
|
1327
|
+
* Padding Y
|
|
1328
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1329
|
+
*/
|
|
1330
|
+
py: [{
|
|
1331
|
+
py: [padding]
|
|
1332
|
+
}],
|
|
1333
|
+
/**
|
|
1334
|
+
* Padding Start
|
|
1335
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1336
|
+
*/
|
|
1337
|
+
ps: [{
|
|
1338
|
+
ps: [padding]
|
|
1339
|
+
}],
|
|
1340
|
+
/**
|
|
1341
|
+
* Padding End
|
|
1342
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1343
|
+
*/
|
|
1344
|
+
pe: [{
|
|
1345
|
+
pe: [padding]
|
|
1346
|
+
}],
|
|
1347
|
+
/**
|
|
1348
|
+
* Padding Top
|
|
1349
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1350
|
+
*/
|
|
1351
|
+
pt: [{
|
|
1352
|
+
pt: [padding]
|
|
1353
|
+
}],
|
|
1354
|
+
/**
|
|
1355
|
+
* Padding Right
|
|
1356
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1357
|
+
*/
|
|
1358
|
+
pr: [{
|
|
1359
|
+
pr: [padding]
|
|
1360
|
+
}],
|
|
1361
|
+
/**
|
|
1362
|
+
* Padding Bottom
|
|
1363
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1364
|
+
*/
|
|
1365
|
+
pb: [{
|
|
1366
|
+
pb: [padding]
|
|
1367
|
+
}],
|
|
1368
|
+
/**
|
|
1369
|
+
* Padding Left
|
|
1370
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1371
|
+
*/
|
|
1372
|
+
pl: [{
|
|
1373
|
+
pl: [padding]
|
|
1374
|
+
}],
|
|
1375
|
+
/**
|
|
1376
|
+
* Margin
|
|
1377
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1378
|
+
*/
|
|
1379
|
+
m: [{
|
|
1380
|
+
m: [margin]
|
|
1381
|
+
}],
|
|
1382
|
+
/**
|
|
1383
|
+
* Margin X
|
|
1384
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1385
|
+
*/
|
|
1386
|
+
mx: [{
|
|
1387
|
+
mx: [margin]
|
|
1388
|
+
}],
|
|
1389
|
+
/**
|
|
1390
|
+
* Margin Y
|
|
1391
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1392
|
+
*/
|
|
1393
|
+
my: [{
|
|
1394
|
+
my: [margin]
|
|
1395
|
+
}],
|
|
1396
|
+
/**
|
|
1397
|
+
* Margin Start
|
|
1398
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1399
|
+
*/
|
|
1400
|
+
ms: [{
|
|
1401
|
+
ms: [margin]
|
|
1402
|
+
}],
|
|
1403
|
+
/**
|
|
1404
|
+
* Margin End
|
|
1405
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1406
|
+
*/
|
|
1407
|
+
me: [{
|
|
1408
|
+
me: [margin]
|
|
1409
|
+
}],
|
|
1410
|
+
/**
|
|
1411
|
+
* Margin Top
|
|
1412
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1413
|
+
*/
|
|
1414
|
+
mt: [{
|
|
1415
|
+
mt: [margin]
|
|
1416
|
+
}],
|
|
1417
|
+
/**
|
|
1418
|
+
* Margin Right
|
|
1419
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1420
|
+
*/
|
|
1421
|
+
mr: [{
|
|
1422
|
+
mr: [margin]
|
|
1423
|
+
}],
|
|
1424
|
+
/**
|
|
1425
|
+
* Margin Bottom
|
|
1426
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1427
|
+
*/
|
|
1428
|
+
mb: [{
|
|
1429
|
+
mb: [margin]
|
|
1430
|
+
}],
|
|
1431
|
+
/**
|
|
1432
|
+
* Margin Left
|
|
1433
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1434
|
+
*/
|
|
1435
|
+
ml: [{
|
|
1436
|
+
ml: [margin]
|
|
1437
|
+
}],
|
|
1438
|
+
/**
|
|
1439
|
+
* Space Between X
|
|
1440
|
+
* @see https://tailwindcss.com/docs/space
|
|
1441
|
+
*/
|
|
1442
|
+
"space-x": [{
|
|
1443
|
+
"space-x": [space]
|
|
1444
|
+
}],
|
|
1445
|
+
/**
|
|
1446
|
+
* Space Between X Reverse
|
|
1447
|
+
* @see https://tailwindcss.com/docs/space
|
|
1448
|
+
*/
|
|
1449
|
+
"space-x-reverse": ["space-x-reverse"],
|
|
1450
|
+
/**
|
|
1451
|
+
* Space Between Y
|
|
1452
|
+
* @see https://tailwindcss.com/docs/space
|
|
1453
|
+
*/
|
|
1454
|
+
"space-y": [{
|
|
1455
|
+
"space-y": [space]
|
|
1456
|
+
}],
|
|
1457
|
+
/**
|
|
1458
|
+
* Space Between Y Reverse
|
|
1459
|
+
* @see https://tailwindcss.com/docs/space
|
|
1460
|
+
*/
|
|
1461
|
+
"space-y-reverse": ["space-y-reverse"],
|
|
1462
|
+
// Sizing
|
|
1463
|
+
/**
|
|
1464
|
+
* Width
|
|
1465
|
+
* @see https://tailwindcss.com/docs/width
|
|
1466
|
+
*/
|
|
1467
|
+
w: [{
|
|
1468
|
+
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", isArbitraryValue, spacing2]
|
|
1469
|
+
}],
|
|
1470
|
+
/**
|
|
1471
|
+
* Min-Width
|
|
1472
|
+
* @see https://tailwindcss.com/docs/min-width
|
|
1473
|
+
*/
|
|
1474
|
+
"min-w": [{
|
|
1475
|
+
"min-w": [isArbitraryValue, spacing2, "min", "max", "fit"]
|
|
1476
|
+
}],
|
|
1477
|
+
/**
|
|
1478
|
+
* Max-Width
|
|
1479
|
+
* @see https://tailwindcss.com/docs/max-width
|
|
1480
|
+
*/
|
|
1481
|
+
"max-w": [{
|
|
1482
|
+
"max-w": [isArbitraryValue, spacing2, "none", "full", "min", "max", "fit", "prose", {
|
|
1483
|
+
screen: [isTshirtSize]
|
|
1484
|
+
}, isTshirtSize]
|
|
1485
|
+
}],
|
|
1486
|
+
/**
|
|
1487
|
+
* Height
|
|
1488
|
+
* @see https://tailwindcss.com/docs/height
|
|
1489
|
+
*/
|
|
1490
|
+
h: [{
|
|
1491
|
+
h: [isArbitraryValue, spacing2, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
1492
|
+
}],
|
|
1493
|
+
/**
|
|
1494
|
+
* Min-Height
|
|
1495
|
+
* @see https://tailwindcss.com/docs/min-height
|
|
1496
|
+
*/
|
|
1497
|
+
"min-h": [{
|
|
1498
|
+
"min-h": [isArbitraryValue, spacing2, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
1499
|
+
}],
|
|
1500
|
+
/**
|
|
1501
|
+
* Max-Height
|
|
1502
|
+
* @see https://tailwindcss.com/docs/max-height
|
|
1503
|
+
*/
|
|
1504
|
+
"max-h": [{
|
|
1505
|
+
"max-h": [isArbitraryValue, spacing2, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
1506
|
+
}],
|
|
1507
|
+
/**
|
|
1508
|
+
* Size
|
|
1509
|
+
* @see https://tailwindcss.com/docs/size
|
|
1510
|
+
*/
|
|
1511
|
+
size: [{
|
|
1512
|
+
size: [isArbitraryValue, spacing2, "auto", "min", "max", "fit"]
|
|
1513
|
+
}],
|
|
1514
|
+
// Typography
|
|
1515
|
+
/**
|
|
1516
|
+
* Font Size
|
|
1517
|
+
* @see https://tailwindcss.com/docs/font-size
|
|
1518
|
+
*/
|
|
1519
|
+
"font-size": [{
|
|
1520
|
+
text: ["base", isTshirtSize, isArbitraryLength]
|
|
1521
|
+
}],
|
|
1522
|
+
/**
|
|
1523
|
+
* Font Smoothing
|
|
1524
|
+
* @see https://tailwindcss.com/docs/font-smoothing
|
|
1525
|
+
*/
|
|
1526
|
+
"font-smoothing": ["antialiased", "subpixel-antialiased"],
|
|
1527
|
+
/**
|
|
1528
|
+
* Font Style
|
|
1529
|
+
* @see https://tailwindcss.com/docs/font-style
|
|
1530
|
+
*/
|
|
1531
|
+
"font-style": ["italic", "not-italic"],
|
|
1532
|
+
/**
|
|
1533
|
+
* Font Weight
|
|
1534
|
+
* @see https://tailwindcss.com/docs/font-weight
|
|
1535
|
+
*/
|
|
1536
|
+
"font-weight": [{
|
|
1537
|
+
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", isArbitraryNumber]
|
|
1538
|
+
}],
|
|
1539
|
+
/**
|
|
1540
|
+
* Font Family
|
|
1541
|
+
* @see https://tailwindcss.com/docs/font-family
|
|
1542
|
+
*/
|
|
1543
|
+
"font-family": [{
|
|
1544
|
+
font: [isAny]
|
|
1545
|
+
}],
|
|
1546
|
+
/**
|
|
1547
|
+
* Font Variant Numeric
|
|
1548
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1549
|
+
*/
|
|
1550
|
+
"fvn-normal": ["normal-nums"],
|
|
1551
|
+
/**
|
|
1552
|
+
* Font Variant Numeric
|
|
1553
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1554
|
+
*/
|
|
1555
|
+
"fvn-ordinal": ["ordinal"],
|
|
1556
|
+
/**
|
|
1557
|
+
* Font Variant Numeric
|
|
1558
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1559
|
+
*/
|
|
1560
|
+
"fvn-slashed-zero": ["slashed-zero"],
|
|
1561
|
+
/**
|
|
1562
|
+
* Font Variant Numeric
|
|
1563
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1564
|
+
*/
|
|
1565
|
+
"fvn-figure": ["lining-nums", "oldstyle-nums"],
|
|
1566
|
+
/**
|
|
1567
|
+
* Font Variant Numeric
|
|
1568
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1569
|
+
*/
|
|
1570
|
+
"fvn-spacing": ["proportional-nums", "tabular-nums"],
|
|
1571
|
+
/**
|
|
1572
|
+
* Font Variant Numeric
|
|
1573
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1574
|
+
*/
|
|
1575
|
+
"fvn-fraction": ["diagonal-fractions", "stacked-fractons"],
|
|
1576
|
+
/**
|
|
1577
|
+
* Letter Spacing
|
|
1578
|
+
* @see https://tailwindcss.com/docs/letter-spacing
|
|
1579
|
+
*/
|
|
1580
|
+
tracking: [{
|
|
1581
|
+
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", isArbitraryValue]
|
|
1582
|
+
}],
|
|
1583
|
+
/**
|
|
1584
|
+
* Line Clamp
|
|
1585
|
+
* @see https://tailwindcss.com/docs/line-clamp
|
|
1586
|
+
*/
|
|
1587
|
+
"line-clamp": [{
|
|
1588
|
+
"line-clamp": ["none", isNumber, isArbitraryNumber]
|
|
1589
|
+
}],
|
|
1590
|
+
/**
|
|
1591
|
+
* Line Height
|
|
1592
|
+
* @see https://tailwindcss.com/docs/line-height
|
|
1593
|
+
*/
|
|
1594
|
+
leading: [{
|
|
1595
|
+
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", isLength, isArbitraryValue]
|
|
1596
|
+
}],
|
|
1597
|
+
/**
|
|
1598
|
+
* List Style Image
|
|
1599
|
+
* @see https://tailwindcss.com/docs/list-style-image
|
|
1600
|
+
*/
|
|
1601
|
+
"list-image": [{
|
|
1602
|
+
"list-image": ["none", isArbitraryValue]
|
|
1603
|
+
}],
|
|
1604
|
+
/**
|
|
1605
|
+
* List Style Type
|
|
1606
|
+
* @see https://tailwindcss.com/docs/list-style-type
|
|
1607
|
+
*/
|
|
1608
|
+
"list-style-type": [{
|
|
1609
|
+
list: ["none", "disc", "decimal", isArbitraryValue]
|
|
1610
|
+
}],
|
|
1611
|
+
/**
|
|
1612
|
+
* List Style Position
|
|
1613
|
+
* @see https://tailwindcss.com/docs/list-style-position
|
|
1614
|
+
*/
|
|
1615
|
+
"list-style-position": [{
|
|
1616
|
+
list: ["inside", "outside"]
|
|
1617
|
+
}],
|
|
1618
|
+
/**
|
|
1619
|
+
* Placeholder Color
|
|
1620
|
+
* @deprecated since Tailwind CSS v3.0.0
|
|
1621
|
+
* @see https://tailwindcss.com/docs/placeholder-color
|
|
1622
|
+
*/
|
|
1623
|
+
"placeholder-color": [{
|
|
1624
|
+
placeholder: [colors]
|
|
1625
|
+
}],
|
|
1626
|
+
/**
|
|
1627
|
+
* Placeholder Opacity
|
|
1628
|
+
* @see https://tailwindcss.com/docs/placeholder-opacity
|
|
1629
|
+
*/
|
|
1630
|
+
"placeholder-opacity": [{
|
|
1631
|
+
"placeholder-opacity": [opacity]
|
|
1632
|
+
}],
|
|
1633
|
+
/**
|
|
1634
|
+
* Text Alignment
|
|
1635
|
+
* @see https://tailwindcss.com/docs/text-align
|
|
1636
|
+
*/
|
|
1637
|
+
"text-alignment": [{
|
|
1638
|
+
text: ["left", "center", "right", "justify", "start", "end"]
|
|
1639
|
+
}],
|
|
1640
|
+
/**
|
|
1641
|
+
* Text Color
|
|
1642
|
+
* @see https://tailwindcss.com/docs/text-color
|
|
1643
|
+
*/
|
|
1644
|
+
"text-color": [{
|
|
1645
|
+
text: [colors]
|
|
1646
|
+
}],
|
|
1647
|
+
/**
|
|
1648
|
+
* Text Opacity
|
|
1649
|
+
* @see https://tailwindcss.com/docs/text-opacity
|
|
1650
|
+
*/
|
|
1651
|
+
"text-opacity": [{
|
|
1652
|
+
"text-opacity": [opacity]
|
|
1653
|
+
}],
|
|
1654
|
+
/**
|
|
1655
|
+
* Text Decoration
|
|
1656
|
+
* @see https://tailwindcss.com/docs/text-decoration
|
|
1657
|
+
*/
|
|
1658
|
+
"text-decoration": ["underline", "overline", "line-through", "no-underline"],
|
|
1659
|
+
/**
|
|
1660
|
+
* Text Decoration Style
|
|
1661
|
+
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
1662
|
+
*/
|
|
1663
|
+
"text-decoration-style": [{
|
|
1664
|
+
decoration: [...getLineStyles(), "wavy"]
|
|
1665
|
+
}],
|
|
1666
|
+
/**
|
|
1667
|
+
* Text Decoration Thickness
|
|
1668
|
+
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
1669
|
+
*/
|
|
1670
|
+
"text-decoration-thickness": [{
|
|
1671
|
+
decoration: ["auto", "from-font", isLength, isArbitraryLength]
|
|
1672
|
+
}],
|
|
1673
|
+
/**
|
|
1674
|
+
* Text Underline Offset
|
|
1675
|
+
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
1676
|
+
*/
|
|
1677
|
+
"underline-offset": [{
|
|
1678
|
+
"underline-offset": ["auto", isLength, isArbitraryValue]
|
|
1679
|
+
}],
|
|
1680
|
+
/**
|
|
1681
|
+
* Text Decoration Color
|
|
1682
|
+
* @see https://tailwindcss.com/docs/text-decoration-color
|
|
1683
|
+
*/
|
|
1684
|
+
"text-decoration-color": [{
|
|
1685
|
+
decoration: [colors]
|
|
1686
|
+
}],
|
|
1687
|
+
/**
|
|
1688
|
+
* Text Transform
|
|
1689
|
+
* @see https://tailwindcss.com/docs/text-transform
|
|
1690
|
+
*/
|
|
1691
|
+
"text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
|
|
1692
|
+
/**
|
|
1693
|
+
* Text Overflow
|
|
1694
|
+
* @see https://tailwindcss.com/docs/text-overflow
|
|
1695
|
+
*/
|
|
1696
|
+
"text-overflow": ["truncate", "text-ellipsis", "text-clip"],
|
|
1697
|
+
/**
|
|
1698
|
+
* Text Wrap
|
|
1699
|
+
* @see https://tailwindcss.com/docs/text-wrap
|
|
1700
|
+
*/
|
|
1701
|
+
"text-wrap": [{
|
|
1702
|
+
text: ["wrap", "nowrap", "balance", "pretty"]
|
|
1703
|
+
}],
|
|
1704
|
+
/**
|
|
1705
|
+
* Text Indent
|
|
1706
|
+
* @see https://tailwindcss.com/docs/text-indent
|
|
1707
|
+
*/
|
|
1708
|
+
indent: [{
|
|
1709
|
+
indent: getSpacingWithArbitrary()
|
|
1710
|
+
}],
|
|
1711
|
+
/**
|
|
1712
|
+
* Vertical Alignment
|
|
1713
|
+
* @see https://tailwindcss.com/docs/vertical-align
|
|
1714
|
+
*/
|
|
1715
|
+
"vertical-align": [{
|
|
1716
|
+
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryValue]
|
|
1717
|
+
}],
|
|
1718
|
+
/**
|
|
1719
|
+
* Whitespace
|
|
1720
|
+
* @see https://tailwindcss.com/docs/whitespace
|
|
1721
|
+
*/
|
|
1722
|
+
whitespace: [{
|
|
1723
|
+
whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
|
|
1724
|
+
}],
|
|
1725
|
+
/**
|
|
1726
|
+
* Word Break
|
|
1727
|
+
* @see https://tailwindcss.com/docs/word-break
|
|
1728
|
+
*/
|
|
1729
|
+
break: [{
|
|
1730
|
+
break: ["normal", "words", "all", "keep"]
|
|
1731
|
+
}],
|
|
1732
|
+
/**
|
|
1733
|
+
* Hyphens
|
|
1734
|
+
* @see https://tailwindcss.com/docs/hyphens
|
|
1735
|
+
*/
|
|
1736
|
+
hyphens: [{
|
|
1737
|
+
hyphens: ["none", "manual", "auto"]
|
|
1738
|
+
}],
|
|
1739
|
+
/**
|
|
1740
|
+
* Content
|
|
1741
|
+
* @see https://tailwindcss.com/docs/content
|
|
1742
|
+
*/
|
|
1743
|
+
content: [{
|
|
1744
|
+
content: ["none", isArbitraryValue]
|
|
1745
|
+
}],
|
|
1746
|
+
// Backgrounds
|
|
1747
|
+
/**
|
|
1748
|
+
* Background Attachment
|
|
1749
|
+
* @see https://tailwindcss.com/docs/background-attachment
|
|
1750
|
+
*/
|
|
1751
|
+
"bg-attachment": [{
|
|
1752
|
+
bg: ["fixed", "local", "scroll"]
|
|
1753
|
+
}],
|
|
1754
|
+
/**
|
|
1755
|
+
* Background Clip
|
|
1756
|
+
* @see https://tailwindcss.com/docs/background-clip
|
|
1757
|
+
*/
|
|
1758
|
+
"bg-clip": [{
|
|
1759
|
+
"bg-clip": ["border", "padding", "content", "text"]
|
|
1760
|
+
}],
|
|
1761
|
+
/**
|
|
1762
|
+
* Background Opacity
|
|
1763
|
+
* @deprecated since Tailwind CSS v3.0.0
|
|
1764
|
+
* @see https://tailwindcss.com/docs/background-opacity
|
|
1765
|
+
*/
|
|
1766
|
+
"bg-opacity": [{
|
|
1767
|
+
"bg-opacity": [opacity]
|
|
1768
|
+
}],
|
|
1769
|
+
/**
|
|
1770
|
+
* Background Origin
|
|
1771
|
+
* @see https://tailwindcss.com/docs/background-origin
|
|
1772
|
+
*/
|
|
1773
|
+
"bg-origin": [{
|
|
1774
|
+
"bg-origin": ["border", "padding", "content"]
|
|
1775
|
+
}],
|
|
1776
|
+
/**
|
|
1777
|
+
* Background Position
|
|
1778
|
+
* @see https://tailwindcss.com/docs/background-position
|
|
1779
|
+
*/
|
|
1780
|
+
"bg-position": [{
|
|
1781
|
+
bg: [...getPositions(), isArbitraryPosition]
|
|
1782
|
+
}],
|
|
1783
|
+
/**
|
|
1784
|
+
* Background Repeat
|
|
1785
|
+
* @see https://tailwindcss.com/docs/background-repeat
|
|
1786
|
+
*/
|
|
1787
|
+
"bg-repeat": [{
|
|
1788
|
+
bg: ["no-repeat", {
|
|
1789
|
+
repeat: ["", "x", "y", "round", "space"]
|
|
1790
|
+
}]
|
|
1791
|
+
}],
|
|
1792
|
+
/**
|
|
1793
|
+
* Background Size
|
|
1794
|
+
* @see https://tailwindcss.com/docs/background-size
|
|
1795
|
+
*/
|
|
1796
|
+
"bg-size": [{
|
|
1797
|
+
bg: ["auto", "cover", "contain", isArbitrarySize]
|
|
1798
|
+
}],
|
|
1799
|
+
/**
|
|
1800
|
+
* Background Image
|
|
1801
|
+
* @see https://tailwindcss.com/docs/background-image
|
|
1802
|
+
*/
|
|
1803
|
+
"bg-image": [{
|
|
1804
|
+
bg: ["none", {
|
|
1805
|
+
"gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
1806
|
+
}, isArbitraryImage]
|
|
1807
|
+
}],
|
|
1808
|
+
/**
|
|
1809
|
+
* Background Color
|
|
1810
|
+
* @see https://tailwindcss.com/docs/background-color
|
|
1811
|
+
*/
|
|
1812
|
+
"bg-color": [{
|
|
1813
|
+
bg: [colors]
|
|
1814
|
+
}],
|
|
1815
|
+
/**
|
|
1816
|
+
* Gradient Color Stops From Position
|
|
1817
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1818
|
+
*/
|
|
1819
|
+
"gradient-from-pos": [{
|
|
1820
|
+
from: [gradientColorStopPositions]
|
|
1821
|
+
}],
|
|
1822
|
+
/**
|
|
1823
|
+
* Gradient Color Stops Via Position
|
|
1824
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1825
|
+
*/
|
|
1826
|
+
"gradient-via-pos": [{
|
|
1827
|
+
via: [gradientColorStopPositions]
|
|
1828
|
+
}],
|
|
1829
|
+
/**
|
|
1830
|
+
* Gradient Color Stops To Position
|
|
1831
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1832
|
+
*/
|
|
1833
|
+
"gradient-to-pos": [{
|
|
1834
|
+
to: [gradientColorStopPositions]
|
|
1835
|
+
}],
|
|
1836
|
+
/**
|
|
1837
|
+
* Gradient Color Stops From
|
|
1838
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1839
|
+
*/
|
|
1840
|
+
"gradient-from": [{
|
|
1841
|
+
from: [gradientColorStops]
|
|
1842
|
+
}],
|
|
1843
|
+
/**
|
|
1844
|
+
* Gradient Color Stops Via
|
|
1845
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1846
|
+
*/
|
|
1847
|
+
"gradient-via": [{
|
|
1848
|
+
via: [gradientColorStops]
|
|
1849
|
+
}],
|
|
1850
|
+
/**
|
|
1851
|
+
* Gradient Color Stops To
|
|
1852
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1853
|
+
*/
|
|
1854
|
+
"gradient-to": [{
|
|
1855
|
+
to: [gradientColorStops]
|
|
1856
|
+
}],
|
|
1857
|
+
// Borders
|
|
1858
|
+
/**
|
|
1859
|
+
* Border Radius
|
|
1860
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1861
|
+
*/
|
|
1862
|
+
rounded: [{
|
|
1863
|
+
rounded: [borderRadius2]
|
|
1864
|
+
}],
|
|
1865
|
+
/**
|
|
1866
|
+
* Border Radius Start
|
|
1867
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1868
|
+
*/
|
|
1869
|
+
"rounded-s": [{
|
|
1870
|
+
"rounded-s": [borderRadius2]
|
|
1871
|
+
}],
|
|
1872
|
+
/**
|
|
1873
|
+
* Border Radius End
|
|
1874
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1875
|
+
*/
|
|
1876
|
+
"rounded-e": [{
|
|
1877
|
+
"rounded-e": [borderRadius2]
|
|
1878
|
+
}],
|
|
1879
|
+
/**
|
|
1880
|
+
* Border Radius Top
|
|
1881
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1882
|
+
*/
|
|
1883
|
+
"rounded-t": [{
|
|
1884
|
+
"rounded-t": [borderRadius2]
|
|
1885
|
+
}],
|
|
1886
|
+
/**
|
|
1887
|
+
* Border Radius Right
|
|
1888
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1889
|
+
*/
|
|
1890
|
+
"rounded-r": [{
|
|
1891
|
+
"rounded-r": [borderRadius2]
|
|
1892
|
+
}],
|
|
1893
|
+
/**
|
|
1894
|
+
* Border Radius Bottom
|
|
1895
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1896
|
+
*/
|
|
1897
|
+
"rounded-b": [{
|
|
1898
|
+
"rounded-b": [borderRadius2]
|
|
1899
|
+
}],
|
|
1900
|
+
/**
|
|
1901
|
+
* Border Radius Left
|
|
1902
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1903
|
+
*/
|
|
1904
|
+
"rounded-l": [{
|
|
1905
|
+
"rounded-l": [borderRadius2]
|
|
1906
|
+
}],
|
|
1907
|
+
/**
|
|
1908
|
+
* Border Radius Start Start
|
|
1909
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1910
|
+
*/
|
|
1911
|
+
"rounded-ss": [{
|
|
1912
|
+
"rounded-ss": [borderRadius2]
|
|
1913
|
+
}],
|
|
1914
|
+
/**
|
|
1915
|
+
* Border Radius Start End
|
|
1916
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1917
|
+
*/
|
|
1918
|
+
"rounded-se": [{
|
|
1919
|
+
"rounded-se": [borderRadius2]
|
|
1920
|
+
}],
|
|
1921
|
+
/**
|
|
1922
|
+
* Border Radius End End
|
|
1923
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1924
|
+
*/
|
|
1925
|
+
"rounded-ee": [{
|
|
1926
|
+
"rounded-ee": [borderRadius2]
|
|
1927
|
+
}],
|
|
1928
|
+
/**
|
|
1929
|
+
* Border Radius End Start
|
|
1930
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1931
|
+
*/
|
|
1932
|
+
"rounded-es": [{
|
|
1933
|
+
"rounded-es": [borderRadius2]
|
|
1934
|
+
}],
|
|
1935
|
+
/**
|
|
1936
|
+
* Border Radius Top Left
|
|
1937
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1938
|
+
*/
|
|
1939
|
+
"rounded-tl": [{
|
|
1940
|
+
"rounded-tl": [borderRadius2]
|
|
1941
|
+
}],
|
|
1942
|
+
/**
|
|
1943
|
+
* Border Radius Top Right
|
|
1944
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1945
|
+
*/
|
|
1946
|
+
"rounded-tr": [{
|
|
1947
|
+
"rounded-tr": [borderRadius2]
|
|
1948
|
+
}],
|
|
1949
|
+
/**
|
|
1950
|
+
* Border Radius Bottom Right
|
|
1951
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1952
|
+
*/
|
|
1953
|
+
"rounded-br": [{
|
|
1954
|
+
"rounded-br": [borderRadius2]
|
|
1955
|
+
}],
|
|
1956
|
+
/**
|
|
1957
|
+
* Border Radius Bottom Left
|
|
1958
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1959
|
+
*/
|
|
1960
|
+
"rounded-bl": [{
|
|
1961
|
+
"rounded-bl": [borderRadius2]
|
|
1962
|
+
}],
|
|
1963
|
+
/**
|
|
1964
|
+
* Border Width
|
|
1965
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1966
|
+
*/
|
|
1967
|
+
"border-w": [{
|
|
1968
|
+
border: [borderWidth]
|
|
1969
|
+
}],
|
|
1970
|
+
/**
|
|
1971
|
+
* Border Width X
|
|
1972
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1973
|
+
*/
|
|
1974
|
+
"border-w-x": [{
|
|
1975
|
+
"border-x": [borderWidth]
|
|
1976
|
+
}],
|
|
1977
|
+
/**
|
|
1978
|
+
* Border Width Y
|
|
1979
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1980
|
+
*/
|
|
1981
|
+
"border-w-y": [{
|
|
1982
|
+
"border-y": [borderWidth]
|
|
1983
|
+
}],
|
|
1984
|
+
/**
|
|
1985
|
+
* Border Width Start
|
|
1986
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1987
|
+
*/
|
|
1988
|
+
"border-w-s": [{
|
|
1989
|
+
"border-s": [borderWidth]
|
|
1990
|
+
}],
|
|
1991
|
+
/**
|
|
1992
|
+
* Border Width End
|
|
1993
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1994
|
+
*/
|
|
1995
|
+
"border-w-e": [{
|
|
1996
|
+
"border-e": [borderWidth]
|
|
1997
|
+
}],
|
|
1998
|
+
/**
|
|
1999
|
+
* Border Width Top
|
|
2000
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2001
|
+
*/
|
|
2002
|
+
"border-w-t": [{
|
|
2003
|
+
"border-t": [borderWidth]
|
|
2004
|
+
}],
|
|
2005
|
+
/**
|
|
2006
|
+
* Border Width Right
|
|
2007
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2008
|
+
*/
|
|
2009
|
+
"border-w-r": [{
|
|
2010
|
+
"border-r": [borderWidth]
|
|
2011
|
+
}],
|
|
2012
|
+
/**
|
|
2013
|
+
* Border Width Bottom
|
|
2014
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2015
|
+
*/
|
|
2016
|
+
"border-w-b": [{
|
|
2017
|
+
"border-b": [borderWidth]
|
|
2018
|
+
}],
|
|
2019
|
+
/**
|
|
2020
|
+
* Border Width Left
|
|
2021
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
2022
|
+
*/
|
|
2023
|
+
"border-w-l": [{
|
|
2024
|
+
"border-l": [borderWidth]
|
|
2025
|
+
}],
|
|
2026
|
+
/**
|
|
2027
|
+
* Border Opacity
|
|
2028
|
+
* @see https://tailwindcss.com/docs/border-opacity
|
|
2029
|
+
*/
|
|
2030
|
+
"border-opacity": [{
|
|
2031
|
+
"border-opacity": [opacity]
|
|
2032
|
+
}],
|
|
2033
|
+
/**
|
|
2034
|
+
* Border Style
|
|
2035
|
+
* @see https://tailwindcss.com/docs/border-style
|
|
2036
|
+
*/
|
|
2037
|
+
"border-style": [{
|
|
2038
|
+
border: [...getLineStyles(), "hidden"]
|
|
2039
|
+
}],
|
|
2040
|
+
/**
|
|
2041
|
+
* Divide Width X
|
|
2042
|
+
* @see https://tailwindcss.com/docs/divide-width
|
|
2043
|
+
*/
|
|
2044
|
+
"divide-x": [{
|
|
2045
|
+
"divide-x": [borderWidth]
|
|
2046
|
+
}],
|
|
2047
|
+
/**
|
|
2048
|
+
* Divide Width X Reverse
|
|
2049
|
+
* @see https://tailwindcss.com/docs/divide-width
|
|
2050
|
+
*/
|
|
2051
|
+
"divide-x-reverse": ["divide-x-reverse"],
|
|
2052
|
+
/**
|
|
2053
|
+
* Divide Width Y
|
|
2054
|
+
* @see https://tailwindcss.com/docs/divide-width
|
|
2055
|
+
*/
|
|
2056
|
+
"divide-y": [{
|
|
2057
|
+
"divide-y": [borderWidth]
|
|
2058
|
+
}],
|
|
2059
|
+
/**
|
|
2060
|
+
* Divide Width Y Reverse
|
|
2061
|
+
* @see https://tailwindcss.com/docs/divide-width
|
|
2062
|
+
*/
|
|
2063
|
+
"divide-y-reverse": ["divide-y-reverse"],
|
|
2064
|
+
/**
|
|
2065
|
+
* Divide Opacity
|
|
2066
|
+
* @see https://tailwindcss.com/docs/divide-opacity
|
|
2067
|
+
*/
|
|
2068
|
+
"divide-opacity": [{
|
|
2069
|
+
"divide-opacity": [opacity]
|
|
2070
|
+
}],
|
|
2071
|
+
/**
|
|
2072
|
+
* Divide Style
|
|
2073
|
+
* @see https://tailwindcss.com/docs/divide-style
|
|
2074
|
+
*/
|
|
2075
|
+
"divide-style": [{
|
|
2076
|
+
divide: getLineStyles()
|
|
2077
|
+
}],
|
|
2078
|
+
/**
|
|
2079
|
+
* Border Color
|
|
2080
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2081
|
+
*/
|
|
2082
|
+
"border-color": [{
|
|
2083
|
+
border: [borderColor]
|
|
2084
|
+
}],
|
|
2085
|
+
/**
|
|
2086
|
+
* Border Color X
|
|
2087
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2088
|
+
*/
|
|
2089
|
+
"border-color-x": [{
|
|
2090
|
+
"border-x": [borderColor]
|
|
2091
|
+
}],
|
|
2092
|
+
/**
|
|
2093
|
+
* Border Color Y
|
|
2094
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2095
|
+
*/
|
|
2096
|
+
"border-color-y": [{
|
|
2097
|
+
"border-y": [borderColor]
|
|
2098
|
+
}],
|
|
2099
|
+
/**
|
|
2100
|
+
* Border Color S
|
|
2101
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2102
|
+
*/
|
|
2103
|
+
"border-color-s": [{
|
|
2104
|
+
"border-s": [borderColor]
|
|
2105
|
+
}],
|
|
2106
|
+
/**
|
|
2107
|
+
* Border Color E
|
|
2108
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2109
|
+
*/
|
|
2110
|
+
"border-color-e": [{
|
|
2111
|
+
"border-e": [borderColor]
|
|
2112
|
+
}],
|
|
2113
|
+
/**
|
|
2114
|
+
* Border Color Top
|
|
2115
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2116
|
+
*/
|
|
2117
|
+
"border-color-t": [{
|
|
2118
|
+
"border-t": [borderColor]
|
|
2119
|
+
}],
|
|
2120
|
+
/**
|
|
2121
|
+
* Border Color Right
|
|
2122
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2123
|
+
*/
|
|
2124
|
+
"border-color-r": [{
|
|
2125
|
+
"border-r": [borderColor]
|
|
2126
|
+
}],
|
|
2127
|
+
/**
|
|
2128
|
+
* Border Color Bottom
|
|
2129
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2130
|
+
*/
|
|
2131
|
+
"border-color-b": [{
|
|
2132
|
+
"border-b": [borderColor]
|
|
2133
|
+
}],
|
|
2134
|
+
/**
|
|
2135
|
+
* Border Color Left
|
|
2136
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
2137
|
+
*/
|
|
2138
|
+
"border-color-l": [{
|
|
2139
|
+
"border-l": [borderColor]
|
|
2140
|
+
}],
|
|
2141
|
+
/**
|
|
2142
|
+
* Divide Color
|
|
2143
|
+
* @see https://tailwindcss.com/docs/divide-color
|
|
2144
|
+
*/
|
|
2145
|
+
"divide-color": [{
|
|
2146
|
+
divide: [borderColor]
|
|
2147
|
+
}],
|
|
2148
|
+
/**
|
|
2149
|
+
* Outline Style
|
|
2150
|
+
* @see https://tailwindcss.com/docs/outline-style
|
|
2151
|
+
*/
|
|
2152
|
+
"outline-style": [{
|
|
2153
|
+
outline: ["", ...getLineStyles()]
|
|
2154
|
+
}],
|
|
2155
|
+
/**
|
|
2156
|
+
* Outline Offset
|
|
2157
|
+
* @see https://tailwindcss.com/docs/outline-offset
|
|
2158
|
+
*/
|
|
2159
|
+
"outline-offset": [{
|
|
2160
|
+
"outline-offset": [isLength, isArbitraryValue]
|
|
2161
|
+
}],
|
|
2162
|
+
/**
|
|
2163
|
+
* Outline Width
|
|
2164
|
+
* @see https://tailwindcss.com/docs/outline-width
|
|
2165
|
+
*/
|
|
2166
|
+
"outline-w": [{
|
|
2167
|
+
outline: [isLength, isArbitraryLength]
|
|
2168
|
+
}],
|
|
2169
|
+
/**
|
|
2170
|
+
* Outline Color
|
|
2171
|
+
* @see https://tailwindcss.com/docs/outline-color
|
|
2172
|
+
*/
|
|
2173
|
+
"outline-color": [{
|
|
2174
|
+
outline: [colors]
|
|
2175
|
+
}],
|
|
2176
|
+
/**
|
|
2177
|
+
* Ring Width
|
|
2178
|
+
* @see https://tailwindcss.com/docs/ring-width
|
|
2179
|
+
*/
|
|
2180
|
+
"ring-w": [{
|
|
2181
|
+
ring: getLengthWithEmptyAndArbitrary()
|
|
2182
|
+
}],
|
|
2183
|
+
/**
|
|
2184
|
+
* Ring Width Inset
|
|
2185
|
+
* @see https://tailwindcss.com/docs/ring-width
|
|
2186
|
+
*/
|
|
2187
|
+
"ring-w-inset": ["ring-inset"],
|
|
2188
|
+
/**
|
|
2189
|
+
* Ring Color
|
|
2190
|
+
* @see https://tailwindcss.com/docs/ring-color
|
|
2191
|
+
*/
|
|
2192
|
+
"ring-color": [{
|
|
2193
|
+
ring: [colors]
|
|
2194
|
+
}],
|
|
2195
|
+
/**
|
|
2196
|
+
* Ring Opacity
|
|
2197
|
+
* @see https://tailwindcss.com/docs/ring-opacity
|
|
2198
|
+
*/
|
|
2199
|
+
"ring-opacity": [{
|
|
2200
|
+
"ring-opacity": [opacity]
|
|
2201
|
+
}],
|
|
2202
|
+
/**
|
|
2203
|
+
* Ring Offset Width
|
|
2204
|
+
* @see https://tailwindcss.com/docs/ring-offset-width
|
|
2205
|
+
*/
|
|
2206
|
+
"ring-offset-w": [{
|
|
2207
|
+
"ring-offset": [isLength, isArbitraryLength]
|
|
2208
|
+
}],
|
|
2209
|
+
/**
|
|
2210
|
+
* Ring Offset Color
|
|
2211
|
+
* @see https://tailwindcss.com/docs/ring-offset-color
|
|
2212
|
+
*/
|
|
2213
|
+
"ring-offset-color": [{
|
|
2214
|
+
"ring-offset": [colors]
|
|
2215
|
+
}],
|
|
2216
|
+
// Effects
|
|
2217
|
+
/**
|
|
2218
|
+
* Box Shadow
|
|
2219
|
+
* @see https://tailwindcss.com/docs/box-shadow
|
|
2220
|
+
*/
|
|
2221
|
+
shadow: [{
|
|
2222
|
+
shadow: ["", "inner", "none", isTshirtSize, isArbitraryShadow]
|
|
2223
|
+
}],
|
|
2224
|
+
/**
|
|
2225
|
+
* Box Shadow Color
|
|
2226
|
+
* @see https://tailwindcss.com/docs/box-shadow-color
|
|
2227
|
+
*/
|
|
2228
|
+
"shadow-color": [{
|
|
2229
|
+
shadow: [isAny]
|
|
2230
|
+
}],
|
|
2231
|
+
/**
|
|
2232
|
+
* Opacity
|
|
2233
|
+
* @see https://tailwindcss.com/docs/opacity
|
|
2234
|
+
*/
|
|
2235
|
+
opacity: [{
|
|
2236
|
+
opacity: [opacity]
|
|
2237
|
+
}],
|
|
2238
|
+
/**
|
|
2239
|
+
* Mix Blend Mode
|
|
2240
|
+
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
2241
|
+
*/
|
|
2242
|
+
"mix-blend": [{
|
|
2243
|
+
"mix-blend": [...getBlendModes(), "plus-lighter", "plus-darker"]
|
|
2244
|
+
}],
|
|
2245
|
+
/**
|
|
2246
|
+
* Background Blend Mode
|
|
2247
|
+
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
2248
|
+
*/
|
|
2249
|
+
"bg-blend": [{
|
|
2250
|
+
"bg-blend": getBlendModes()
|
|
2251
|
+
}],
|
|
2252
|
+
// Filters
|
|
2253
|
+
/**
|
|
2254
|
+
* Filter
|
|
2255
|
+
* @deprecated since Tailwind CSS v3.0.0
|
|
2256
|
+
* @see https://tailwindcss.com/docs/filter
|
|
2257
|
+
*/
|
|
2258
|
+
filter: [{
|
|
2259
|
+
filter: ["", "none"]
|
|
2260
|
+
}],
|
|
2261
|
+
/**
|
|
2262
|
+
* Blur
|
|
2263
|
+
* @see https://tailwindcss.com/docs/blur
|
|
2264
|
+
*/
|
|
2265
|
+
blur: [{
|
|
2266
|
+
blur: [blur]
|
|
2267
|
+
}],
|
|
2268
|
+
/**
|
|
2269
|
+
* Brightness
|
|
2270
|
+
* @see https://tailwindcss.com/docs/brightness
|
|
2271
|
+
*/
|
|
2272
|
+
brightness: [{
|
|
2273
|
+
brightness: [brightness]
|
|
2274
|
+
}],
|
|
2275
|
+
/**
|
|
2276
|
+
* Contrast
|
|
2277
|
+
* @see https://tailwindcss.com/docs/contrast
|
|
2278
|
+
*/
|
|
2279
|
+
contrast: [{
|
|
2280
|
+
contrast: [contrast]
|
|
2281
|
+
}],
|
|
2282
|
+
/**
|
|
2283
|
+
* Drop Shadow
|
|
2284
|
+
* @see https://tailwindcss.com/docs/drop-shadow
|
|
2285
|
+
*/
|
|
2286
|
+
"drop-shadow": [{
|
|
2287
|
+
"drop-shadow": ["", "none", isTshirtSize, isArbitraryValue]
|
|
2288
|
+
}],
|
|
2289
|
+
/**
|
|
2290
|
+
* Grayscale
|
|
2291
|
+
* @see https://tailwindcss.com/docs/grayscale
|
|
2292
|
+
*/
|
|
2293
|
+
grayscale: [{
|
|
2294
|
+
grayscale: [grayscale]
|
|
2295
|
+
}],
|
|
2296
|
+
/**
|
|
2297
|
+
* Hue Rotate
|
|
2298
|
+
* @see https://tailwindcss.com/docs/hue-rotate
|
|
2299
|
+
*/
|
|
2300
|
+
"hue-rotate": [{
|
|
2301
|
+
"hue-rotate": [hueRotate]
|
|
2302
|
+
}],
|
|
2303
|
+
/**
|
|
2304
|
+
* Invert
|
|
2305
|
+
* @see https://tailwindcss.com/docs/invert
|
|
2306
|
+
*/
|
|
2307
|
+
invert: [{
|
|
2308
|
+
invert: [invert]
|
|
2309
|
+
}],
|
|
2310
|
+
/**
|
|
2311
|
+
* Saturate
|
|
2312
|
+
* @see https://tailwindcss.com/docs/saturate
|
|
2313
|
+
*/
|
|
2314
|
+
saturate: [{
|
|
2315
|
+
saturate: [saturate]
|
|
2316
|
+
}],
|
|
2317
|
+
/**
|
|
2318
|
+
* Sepia
|
|
2319
|
+
* @see https://tailwindcss.com/docs/sepia
|
|
2320
|
+
*/
|
|
2321
|
+
sepia: [{
|
|
2322
|
+
sepia: [sepia]
|
|
2323
|
+
}],
|
|
2324
|
+
/**
|
|
2325
|
+
* Backdrop Filter
|
|
2326
|
+
* @deprecated since Tailwind CSS v3.0.0
|
|
2327
|
+
* @see https://tailwindcss.com/docs/backdrop-filter
|
|
2328
|
+
*/
|
|
2329
|
+
"backdrop-filter": [{
|
|
2330
|
+
"backdrop-filter": ["", "none"]
|
|
2331
|
+
}],
|
|
2332
|
+
/**
|
|
2333
|
+
* Backdrop Blur
|
|
2334
|
+
* @see https://tailwindcss.com/docs/backdrop-blur
|
|
2335
|
+
*/
|
|
2336
|
+
"backdrop-blur": [{
|
|
2337
|
+
"backdrop-blur": [blur]
|
|
2338
|
+
}],
|
|
2339
|
+
/**
|
|
2340
|
+
* Backdrop Brightness
|
|
2341
|
+
* @see https://tailwindcss.com/docs/backdrop-brightness
|
|
2342
|
+
*/
|
|
2343
|
+
"backdrop-brightness": [{
|
|
2344
|
+
"backdrop-brightness": [brightness]
|
|
2345
|
+
}],
|
|
2346
|
+
/**
|
|
2347
|
+
* Backdrop Contrast
|
|
2348
|
+
* @see https://tailwindcss.com/docs/backdrop-contrast
|
|
2349
|
+
*/
|
|
2350
|
+
"backdrop-contrast": [{
|
|
2351
|
+
"backdrop-contrast": [contrast]
|
|
2352
|
+
}],
|
|
2353
|
+
/**
|
|
2354
|
+
* Backdrop Grayscale
|
|
2355
|
+
* @see https://tailwindcss.com/docs/backdrop-grayscale
|
|
2356
|
+
*/
|
|
2357
|
+
"backdrop-grayscale": [{
|
|
2358
|
+
"backdrop-grayscale": [grayscale]
|
|
2359
|
+
}],
|
|
2360
|
+
/**
|
|
2361
|
+
* Backdrop Hue Rotate
|
|
2362
|
+
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
2363
|
+
*/
|
|
2364
|
+
"backdrop-hue-rotate": [{
|
|
2365
|
+
"backdrop-hue-rotate": [hueRotate]
|
|
2366
|
+
}],
|
|
2367
|
+
/**
|
|
2368
|
+
* Backdrop Invert
|
|
2369
|
+
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
2370
|
+
*/
|
|
2371
|
+
"backdrop-invert": [{
|
|
2372
|
+
"backdrop-invert": [invert]
|
|
2373
|
+
}],
|
|
2374
|
+
/**
|
|
2375
|
+
* Backdrop Opacity
|
|
2376
|
+
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
2377
|
+
*/
|
|
2378
|
+
"backdrop-opacity": [{
|
|
2379
|
+
"backdrop-opacity": [opacity]
|
|
2380
|
+
}],
|
|
2381
|
+
/**
|
|
2382
|
+
* Backdrop Saturate
|
|
2383
|
+
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
2384
|
+
*/
|
|
2385
|
+
"backdrop-saturate": [{
|
|
2386
|
+
"backdrop-saturate": [saturate]
|
|
2387
|
+
}],
|
|
2388
|
+
/**
|
|
2389
|
+
* Backdrop Sepia
|
|
2390
|
+
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
2391
|
+
*/
|
|
2392
|
+
"backdrop-sepia": [{
|
|
2393
|
+
"backdrop-sepia": [sepia]
|
|
2394
|
+
}],
|
|
2395
|
+
// Tables
|
|
2396
|
+
/**
|
|
2397
|
+
* Border Collapse
|
|
2398
|
+
* @see https://tailwindcss.com/docs/border-collapse
|
|
2399
|
+
*/
|
|
2400
|
+
"border-collapse": [{
|
|
2401
|
+
border: ["collapse", "separate"]
|
|
2402
|
+
}],
|
|
2403
|
+
/**
|
|
2404
|
+
* Border Spacing
|
|
2405
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
2406
|
+
*/
|
|
2407
|
+
"border-spacing": [{
|
|
2408
|
+
"border-spacing": [borderSpacing]
|
|
2409
|
+
}],
|
|
2410
|
+
/**
|
|
2411
|
+
* Border Spacing X
|
|
2412
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
2413
|
+
*/
|
|
2414
|
+
"border-spacing-x": [{
|
|
2415
|
+
"border-spacing-x": [borderSpacing]
|
|
2416
|
+
}],
|
|
2417
|
+
/**
|
|
2418
|
+
* Border Spacing Y
|
|
2419
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
2420
|
+
*/
|
|
2421
|
+
"border-spacing-y": [{
|
|
2422
|
+
"border-spacing-y": [borderSpacing]
|
|
2423
|
+
}],
|
|
2424
|
+
/**
|
|
2425
|
+
* Table Layout
|
|
2426
|
+
* @see https://tailwindcss.com/docs/table-layout
|
|
2427
|
+
*/
|
|
2428
|
+
"table-layout": [{
|
|
2429
|
+
table: ["auto", "fixed"]
|
|
2430
|
+
}],
|
|
2431
|
+
/**
|
|
2432
|
+
* Caption Side
|
|
2433
|
+
* @see https://tailwindcss.com/docs/caption-side
|
|
2434
|
+
*/
|
|
2435
|
+
caption: [{
|
|
2436
|
+
caption: ["top", "bottom"]
|
|
2437
|
+
}],
|
|
2438
|
+
// Transitions and Animation
|
|
2439
|
+
/**
|
|
2440
|
+
* Tranisition Property
|
|
2441
|
+
* @see https://tailwindcss.com/docs/transition-property
|
|
2442
|
+
*/
|
|
2443
|
+
transition: [{
|
|
2444
|
+
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", isArbitraryValue]
|
|
2445
|
+
}],
|
|
2446
|
+
/**
|
|
2447
|
+
* Transition Duration
|
|
2448
|
+
* @see https://tailwindcss.com/docs/transition-duration
|
|
2449
|
+
*/
|
|
2450
|
+
duration: [{
|
|
2451
|
+
duration: getNumberAndArbitrary()
|
|
2452
|
+
}],
|
|
2453
|
+
/**
|
|
2454
|
+
* Transition Timing Function
|
|
2455
|
+
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
2456
|
+
*/
|
|
2457
|
+
ease: [{
|
|
2458
|
+
ease: ["linear", "in", "out", "in-out", isArbitraryValue]
|
|
2459
|
+
}],
|
|
2460
|
+
/**
|
|
2461
|
+
* Transition Delay
|
|
2462
|
+
* @see https://tailwindcss.com/docs/transition-delay
|
|
2463
|
+
*/
|
|
2464
|
+
delay: [{
|
|
2465
|
+
delay: getNumberAndArbitrary()
|
|
2466
|
+
}],
|
|
2467
|
+
/**
|
|
2468
|
+
* Animation
|
|
2469
|
+
* @see https://tailwindcss.com/docs/animation
|
|
2470
|
+
*/
|
|
2471
|
+
animate: [{
|
|
2472
|
+
animate: ["none", "spin", "ping", "pulse", "bounce", isArbitraryValue]
|
|
2473
|
+
}],
|
|
2474
|
+
// Transforms
|
|
2475
|
+
/**
|
|
2476
|
+
* Transform
|
|
2477
|
+
* @see https://tailwindcss.com/docs/transform
|
|
2478
|
+
*/
|
|
2479
|
+
transform: [{
|
|
2480
|
+
transform: ["", "gpu", "none"]
|
|
2481
|
+
}],
|
|
2482
|
+
/**
|
|
2483
|
+
* Scale
|
|
2484
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2485
|
+
*/
|
|
2486
|
+
scale: [{
|
|
2487
|
+
scale: [scale]
|
|
2488
|
+
}],
|
|
2489
|
+
/**
|
|
2490
|
+
* Scale X
|
|
2491
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2492
|
+
*/
|
|
2493
|
+
"scale-x": [{
|
|
2494
|
+
"scale-x": [scale]
|
|
2495
|
+
}],
|
|
2496
|
+
/**
|
|
2497
|
+
* Scale Y
|
|
2498
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2499
|
+
*/
|
|
2500
|
+
"scale-y": [{
|
|
2501
|
+
"scale-y": [scale]
|
|
2502
|
+
}],
|
|
2503
|
+
/**
|
|
2504
|
+
* Rotate
|
|
2505
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
2506
|
+
*/
|
|
2507
|
+
rotate: [{
|
|
2508
|
+
rotate: [isInteger, isArbitraryValue]
|
|
2509
|
+
}],
|
|
2510
|
+
/**
|
|
2511
|
+
* Translate X
|
|
2512
|
+
* @see https://tailwindcss.com/docs/translate
|
|
2513
|
+
*/
|
|
2514
|
+
"translate-x": [{
|
|
2515
|
+
"translate-x": [translate]
|
|
2516
|
+
}],
|
|
2517
|
+
/**
|
|
2518
|
+
* Translate Y
|
|
2519
|
+
* @see https://tailwindcss.com/docs/translate
|
|
2520
|
+
*/
|
|
2521
|
+
"translate-y": [{
|
|
2522
|
+
"translate-y": [translate]
|
|
2523
|
+
}],
|
|
2524
|
+
/**
|
|
2525
|
+
* Skew X
|
|
2526
|
+
* @see https://tailwindcss.com/docs/skew
|
|
2527
|
+
*/
|
|
2528
|
+
"skew-x": [{
|
|
2529
|
+
"skew-x": [skew]
|
|
2530
|
+
}],
|
|
2531
|
+
/**
|
|
2532
|
+
* Skew Y
|
|
2533
|
+
* @see https://tailwindcss.com/docs/skew
|
|
2534
|
+
*/
|
|
2535
|
+
"skew-y": [{
|
|
2536
|
+
"skew-y": [skew]
|
|
2537
|
+
}],
|
|
2538
|
+
/**
|
|
2539
|
+
* Transform Origin
|
|
2540
|
+
* @see https://tailwindcss.com/docs/transform-origin
|
|
2541
|
+
*/
|
|
2542
|
+
"transform-origin": [{
|
|
2543
|
+
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", isArbitraryValue]
|
|
2544
|
+
}],
|
|
2545
|
+
// Interactivity
|
|
2546
|
+
/**
|
|
2547
|
+
* Accent Color
|
|
2548
|
+
* @see https://tailwindcss.com/docs/accent-color
|
|
2549
|
+
*/
|
|
2550
|
+
accent: [{
|
|
2551
|
+
accent: ["auto", colors]
|
|
2552
|
+
}],
|
|
2553
|
+
/**
|
|
2554
|
+
* Appearance
|
|
2555
|
+
* @see https://tailwindcss.com/docs/appearance
|
|
2556
|
+
*/
|
|
2557
|
+
appearance: [{
|
|
2558
|
+
appearance: ["none", "auto"]
|
|
2559
|
+
}],
|
|
2560
|
+
/**
|
|
2561
|
+
* Cursor
|
|
2562
|
+
* @see https://tailwindcss.com/docs/cursor
|
|
2563
|
+
*/
|
|
2564
|
+
cursor: [{
|
|
2565
|
+
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]
|
|
2566
|
+
}],
|
|
2567
|
+
/**
|
|
2568
|
+
* Caret Color
|
|
2569
|
+
* @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
|
|
2570
|
+
*/
|
|
2571
|
+
"caret-color": [{
|
|
2572
|
+
caret: [colors]
|
|
2573
|
+
}],
|
|
2574
|
+
/**
|
|
2575
|
+
* Pointer Events
|
|
2576
|
+
* @see https://tailwindcss.com/docs/pointer-events
|
|
2577
|
+
*/
|
|
2578
|
+
"pointer-events": [{
|
|
2579
|
+
"pointer-events": ["none", "auto"]
|
|
2580
|
+
}],
|
|
2581
|
+
/**
|
|
2582
|
+
* Resize
|
|
2583
|
+
* @see https://tailwindcss.com/docs/resize
|
|
2584
|
+
*/
|
|
2585
|
+
resize: [{
|
|
2586
|
+
resize: ["none", "y", "x", ""]
|
|
2587
|
+
}],
|
|
2588
|
+
/**
|
|
2589
|
+
* Scroll Behavior
|
|
2590
|
+
* @see https://tailwindcss.com/docs/scroll-behavior
|
|
2591
|
+
*/
|
|
2592
|
+
"scroll-behavior": [{
|
|
2593
|
+
scroll: ["auto", "smooth"]
|
|
2594
|
+
}],
|
|
2595
|
+
/**
|
|
2596
|
+
* Scroll Margin
|
|
2597
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2598
|
+
*/
|
|
2599
|
+
"scroll-m": [{
|
|
2600
|
+
"scroll-m": getSpacingWithArbitrary()
|
|
2601
|
+
}],
|
|
2602
|
+
/**
|
|
2603
|
+
* Scroll Margin X
|
|
2604
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2605
|
+
*/
|
|
2606
|
+
"scroll-mx": [{
|
|
2607
|
+
"scroll-mx": getSpacingWithArbitrary()
|
|
2608
|
+
}],
|
|
2609
|
+
/**
|
|
2610
|
+
* Scroll Margin Y
|
|
2611
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2612
|
+
*/
|
|
2613
|
+
"scroll-my": [{
|
|
2614
|
+
"scroll-my": getSpacingWithArbitrary()
|
|
2615
|
+
}],
|
|
2616
|
+
/**
|
|
2617
|
+
* Scroll Margin Start
|
|
2618
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2619
|
+
*/
|
|
2620
|
+
"scroll-ms": [{
|
|
2621
|
+
"scroll-ms": getSpacingWithArbitrary()
|
|
2622
|
+
}],
|
|
2623
|
+
/**
|
|
2624
|
+
* Scroll Margin End
|
|
2625
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2626
|
+
*/
|
|
2627
|
+
"scroll-me": [{
|
|
2628
|
+
"scroll-me": getSpacingWithArbitrary()
|
|
2629
|
+
}],
|
|
2630
|
+
/**
|
|
2631
|
+
* Scroll Margin Top
|
|
2632
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2633
|
+
*/
|
|
2634
|
+
"scroll-mt": [{
|
|
2635
|
+
"scroll-mt": getSpacingWithArbitrary()
|
|
2636
|
+
}],
|
|
2637
|
+
/**
|
|
2638
|
+
* Scroll Margin Right
|
|
2639
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2640
|
+
*/
|
|
2641
|
+
"scroll-mr": [{
|
|
2642
|
+
"scroll-mr": getSpacingWithArbitrary()
|
|
2643
|
+
}],
|
|
2644
|
+
/**
|
|
2645
|
+
* Scroll Margin Bottom
|
|
2646
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2647
|
+
*/
|
|
2648
|
+
"scroll-mb": [{
|
|
2649
|
+
"scroll-mb": getSpacingWithArbitrary()
|
|
2650
|
+
}],
|
|
2651
|
+
/**
|
|
2652
|
+
* Scroll Margin Left
|
|
2653
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2654
|
+
*/
|
|
2655
|
+
"scroll-ml": [{
|
|
2656
|
+
"scroll-ml": getSpacingWithArbitrary()
|
|
2657
|
+
}],
|
|
2658
|
+
/**
|
|
2659
|
+
* Scroll Padding
|
|
2660
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2661
|
+
*/
|
|
2662
|
+
"scroll-p": [{
|
|
2663
|
+
"scroll-p": getSpacingWithArbitrary()
|
|
2664
|
+
}],
|
|
2665
|
+
/**
|
|
2666
|
+
* Scroll Padding X
|
|
2667
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2668
|
+
*/
|
|
2669
|
+
"scroll-px": [{
|
|
2670
|
+
"scroll-px": getSpacingWithArbitrary()
|
|
2671
|
+
}],
|
|
2672
|
+
/**
|
|
2673
|
+
* Scroll Padding Y
|
|
2674
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2675
|
+
*/
|
|
2676
|
+
"scroll-py": [{
|
|
2677
|
+
"scroll-py": getSpacingWithArbitrary()
|
|
2678
|
+
}],
|
|
2679
|
+
/**
|
|
2680
|
+
* Scroll Padding Start
|
|
2681
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2682
|
+
*/
|
|
2683
|
+
"scroll-ps": [{
|
|
2684
|
+
"scroll-ps": getSpacingWithArbitrary()
|
|
2685
|
+
}],
|
|
2686
|
+
/**
|
|
2687
|
+
* Scroll Padding End
|
|
2688
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2689
|
+
*/
|
|
2690
|
+
"scroll-pe": [{
|
|
2691
|
+
"scroll-pe": getSpacingWithArbitrary()
|
|
2692
|
+
}],
|
|
2693
|
+
/**
|
|
2694
|
+
* Scroll Padding Top
|
|
2695
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2696
|
+
*/
|
|
2697
|
+
"scroll-pt": [{
|
|
2698
|
+
"scroll-pt": getSpacingWithArbitrary()
|
|
2699
|
+
}],
|
|
2700
|
+
/**
|
|
2701
|
+
* Scroll Padding Right
|
|
2702
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2703
|
+
*/
|
|
2704
|
+
"scroll-pr": [{
|
|
2705
|
+
"scroll-pr": getSpacingWithArbitrary()
|
|
2706
|
+
}],
|
|
2707
|
+
/**
|
|
2708
|
+
* Scroll Padding Bottom
|
|
2709
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2710
|
+
*/
|
|
2711
|
+
"scroll-pb": [{
|
|
2712
|
+
"scroll-pb": getSpacingWithArbitrary()
|
|
2713
|
+
}],
|
|
2714
|
+
/**
|
|
2715
|
+
* Scroll Padding Left
|
|
2716
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2717
|
+
*/
|
|
2718
|
+
"scroll-pl": [{
|
|
2719
|
+
"scroll-pl": getSpacingWithArbitrary()
|
|
2720
|
+
}],
|
|
2721
|
+
/**
|
|
2722
|
+
* Scroll Snap Align
|
|
2723
|
+
* @see https://tailwindcss.com/docs/scroll-snap-align
|
|
2724
|
+
*/
|
|
2725
|
+
"snap-align": [{
|
|
2726
|
+
snap: ["start", "end", "center", "align-none"]
|
|
2727
|
+
}],
|
|
2728
|
+
/**
|
|
2729
|
+
* Scroll Snap Stop
|
|
2730
|
+
* @see https://tailwindcss.com/docs/scroll-snap-stop
|
|
2731
|
+
*/
|
|
2732
|
+
"snap-stop": [{
|
|
2733
|
+
snap: ["normal", "always"]
|
|
2734
|
+
}],
|
|
2735
|
+
/**
|
|
2736
|
+
* Scroll Snap Type
|
|
2737
|
+
* @see https://tailwindcss.com/docs/scroll-snap-type
|
|
2738
|
+
*/
|
|
2739
|
+
"snap-type": [{
|
|
2740
|
+
snap: ["none", "x", "y", "both"]
|
|
2741
|
+
}],
|
|
2742
|
+
/**
|
|
2743
|
+
* Scroll Snap Type Strictness
|
|
2744
|
+
* @see https://tailwindcss.com/docs/scroll-snap-type
|
|
2745
|
+
*/
|
|
2746
|
+
"snap-strictness": [{
|
|
2747
|
+
snap: ["mandatory", "proximity"]
|
|
2748
|
+
}],
|
|
2749
|
+
/**
|
|
2750
|
+
* Touch Action
|
|
2751
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
2752
|
+
*/
|
|
2753
|
+
touch: [{
|
|
2754
|
+
touch: ["auto", "none", "manipulation"]
|
|
2755
|
+
}],
|
|
2756
|
+
/**
|
|
2757
|
+
* Touch Action X
|
|
2758
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
2759
|
+
*/
|
|
2760
|
+
"touch-x": [{
|
|
2761
|
+
"touch-pan": ["x", "left", "right"]
|
|
2762
|
+
}],
|
|
2763
|
+
/**
|
|
2764
|
+
* Touch Action Y
|
|
2765
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
2766
|
+
*/
|
|
2767
|
+
"touch-y": [{
|
|
2768
|
+
"touch-pan": ["y", "up", "down"]
|
|
2769
|
+
}],
|
|
2770
|
+
/**
|
|
2771
|
+
* Touch Action Pinch Zoom
|
|
2772
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
2773
|
+
*/
|
|
2774
|
+
"touch-pz": ["touch-pinch-zoom"],
|
|
2775
|
+
/**
|
|
2776
|
+
* User Select
|
|
2777
|
+
* @see https://tailwindcss.com/docs/user-select
|
|
2778
|
+
*/
|
|
2779
|
+
select: [{
|
|
2780
|
+
select: ["none", "text", "all", "auto"]
|
|
2781
|
+
}],
|
|
2782
|
+
/**
|
|
2783
|
+
* Will Change
|
|
2784
|
+
* @see https://tailwindcss.com/docs/will-change
|
|
2785
|
+
*/
|
|
2786
|
+
"will-change": [{
|
|
2787
|
+
"will-change": ["auto", "scroll", "contents", "transform", isArbitraryValue]
|
|
2788
|
+
}],
|
|
2789
|
+
// SVG
|
|
2790
|
+
/**
|
|
2791
|
+
* Fill
|
|
2792
|
+
* @see https://tailwindcss.com/docs/fill
|
|
2793
|
+
*/
|
|
2794
|
+
fill: [{
|
|
2795
|
+
fill: [colors, "none"]
|
|
2796
|
+
}],
|
|
2797
|
+
/**
|
|
2798
|
+
* Stroke Width
|
|
2799
|
+
* @see https://tailwindcss.com/docs/stroke-width
|
|
2800
|
+
*/
|
|
2801
|
+
"stroke-w": [{
|
|
2802
|
+
stroke: [isLength, isArbitraryLength, isArbitraryNumber]
|
|
2803
|
+
}],
|
|
2804
|
+
/**
|
|
2805
|
+
* Stroke
|
|
2806
|
+
* @see https://tailwindcss.com/docs/stroke
|
|
2807
|
+
*/
|
|
2808
|
+
stroke: [{
|
|
2809
|
+
stroke: [colors, "none"]
|
|
2810
|
+
}],
|
|
2811
|
+
// Accessibility
|
|
2812
|
+
/**
|
|
2813
|
+
* Screen Readers
|
|
2814
|
+
* @see https://tailwindcss.com/docs/screen-readers
|
|
2815
|
+
*/
|
|
2816
|
+
sr: ["sr-only", "not-sr-only"],
|
|
2817
|
+
/**
|
|
2818
|
+
* Forced Color Adjust
|
|
2819
|
+
* @see https://tailwindcss.com/docs/forced-color-adjust
|
|
2820
|
+
*/
|
|
2821
|
+
"forced-color-adjust": [{
|
|
2822
|
+
"forced-color-adjust": ["auto", "none"]
|
|
2823
|
+
}]
|
|
2824
|
+
},
|
|
2825
|
+
conflictingClassGroups: {
|
|
2826
|
+
overflow: ["overflow-x", "overflow-y"],
|
|
2827
|
+
overscroll: ["overscroll-x", "overscroll-y"],
|
|
2828
|
+
inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
|
|
2829
|
+
"inset-x": ["right", "left"],
|
|
2830
|
+
"inset-y": ["top", "bottom"],
|
|
2831
|
+
flex: ["basis", "grow", "shrink"],
|
|
2832
|
+
gap: ["gap-x", "gap-y"],
|
|
2833
|
+
p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
|
|
2834
|
+
px: ["pr", "pl"],
|
|
2835
|
+
py: ["pt", "pb"],
|
|
2836
|
+
m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
|
|
2837
|
+
mx: ["mr", "ml"],
|
|
2838
|
+
my: ["mt", "mb"],
|
|
2839
|
+
size: ["w", "h"],
|
|
2840
|
+
"font-size": ["leading"],
|
|
2841
|
+
"fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
|
|
2842
|
+
"fvn-ordinal": ["fvn-normal"],
|
|
2843
|
+
"fvn-slashed-zero": ["fvn-normal"],
|
|
2844
|
+
"fvn-figure": ["fvn-normal"],
|
|
2845
|
+
"fvn-spacing": ["fvn-normal"],
|
|
2846
|
+
"fvn-fraction": ["fvn-normal"],
|
|
2847
|
+
"line-clamp": ["display", "overflow"],
|
|
2848
|
+
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"],
|
|
2849
|
+
"rounded-s": ["rounded-ss", "rounded-es"],
|
|
2850
|
+
"rounded-e": ["rounded-se", "rounded-ee"],
|
|
2851
|
+
"rounded-t": ["rounded-tl", "rounded-tr"],
|
|
2852
|
+
"rounded-r": ["rounded-tr", "rounded-br"],
|
|
2853
|
+
"rounded-b": ["rounded-br", "rounded-bl"],
|
|
2854
|
+
"rounded-l": ["rounded-tl", "rounded-bl"],
|
|
2855
|
+
"border-spacing": ["border-spacing-x", "border-spacing-y"],
|
|
2856
|
+
"border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
|
|
2857
|
+
"border-w-x": ["border-w-r", "border-w-l"],
|
|
2858
|
+
"border-w-y": ["border-w-t", "border-w-b"],
|
|
2859
|
+
"border-color": ["border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
|
|
2860
|
+
"border-color-x": ["border-color-r", "border-color-l"],
|
|
2861
|
+
"border-color-y": ["border-color-t", "border-color-b"],
|
|
2862
|
+
"scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
|
|
2863
|
+
"scroll-mx": ["scroll-mr", "scroll-ml"],
|
|
2864
|
+
"scroll-my": ["scroll-mt", "scroll-mb"],
|
|
2865
|
+
"scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
|
|
2866
|
+
"scroll-px": ["scroll-pr", "scroll-pl"],
|
|
2867
|
+
"scroll-py": ["scroll-pt", "scroll-pb"],
|
|
2868
|
+
touch: ["touch-x", "touch-y", "touch-pz"],
|
|
2869
|
+
"touch-x": ["touch"],
|
|
2870
|
+
"touch-y": ["touch"],
|
|
2871
|
+
"touch-pz": ["touch"]
|
|
2872
|
+
},
|
|
2873
|
+
conflictingClassGroupModifiers: {
|
|
2874
|
+
"font-size": ["leading"]
|
|
2875
|
+
}
|
|
2876
|
+
};
|
|
2877
|
+
};
|
|
2878
|
+
var mergeConfigs = (baseConfig, {
|
|
2879
|
+
cacheSize,
|
|
2880
|
+
prefix,
|
|
2881
|
+
separator,
|
|
2882
|
+
experimentalParseClassName,
|
|
2883
|
+
extend = {},
|
|
2884
|
+
override = {}
|
|
2885
|
+
}) => {
|
|
2886
|
+
overrideProperty(baseConfig, "cacheSize", cacheSize);
|
|
2887
|
+
overrideProperty(baseConfig, "prefix", prefix);
|
|
2888
|
+
overrideProperty(baseConfig, "separator", separator);
|
|
2889
|
+
overrideProperty(baseConfig, "experimentalParseClassName", experimentalParseClassName);
|
|
2890
|
+
for (const configKey in override) {
|
|
2891
|
+
overrideConfigProperties(baseConfig[configKey], override[configKey]);
|
|
2892
|
+
}
|
|
2893
|
+
for (const key in extend) {
|
|
2894
|
+
mergeConfigProperties(baseConfig[key], extend[key]);
|
|
2895
|
+
}
|
|
2896
|
+
return baseConfig;
|
|
2897
|
+
};
|
|
2898
|
+
var overrideProperty = (baseObject, overrideKey, overrideValue) => {
|
|
2899
|
+
if (overrideValue !== void 0) {
|
|
2900
|
+
baseObject[overrideKey] = overrideValue;
|
|
2901
|
+
}
|
|
2902
|
+
};
|
|
2903
|
+
var overrideConfigProperties = (baseObject, overrideObject) => {
|
|
2904
|
+
if (overrideObject) {
|
|
2905
|
+
for (const key in overrideObject) {
|
|
2906
|
+
overrideProperty(baseObject, key, overrideObject[key]);
|
|
2907
|
+
}
|
|
2908
|
+
}
|
|
2909
|
+
};
|
|
2910
|
+
var mergeConfigProperties = (baseObject, mergeObject) => {
|
|
2911
|
+
if (mergeObject) {
|
|
2912
|
+
for (const key in mergeObject) {
|
|
2913
|
+
const mergeValue = mergeObject[key];
|
|
2914
|
+
if (mergeValue !== void 0) {
|
|
2915
|
+
baseObject[key] = (baseObject[key] || []).concat(mergeValue);
|
|
2916
|
+
}
|
|
2917
|
+
}
|
|
2918
|
+
}
|
|
2919
|
+
};
|
|
2920
|
+
var extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === "function" ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);
|
|
2921
|
+
|
|
2922
|
+
// src/editor/utils/classname.ts
|
|
420
2923
|
var twMerge = extendTailwindMerge({
|
|
421
2924
|
prefix: "mly-"
|
|
422
2925
|
});
|
|
@@ -1039,13 +3542,14 @@ function Select(props) {
|
|
|
1039
3542
|
tooltip,
|
|
1040
3543
|
className,
|
|
1041
3544
|
icon: Icon,
|
|
1042
|
-
iconClassName
|
|
3545
|
+
iconClassName,
|
|
3546
|
+
placeholder
|
|
1043
3547
|
} = props;
|
|
1044
3548
|
const selectId = `mly${useId()}`;
|
|
1045
3549
|
const content = /* @__PURE__ */ jsxs5("div", { className: "mly-relative", children: [
|
|
1046
3550
|
/* @__PURE__ */ jsx10("label", { htmlFor: selectId, className: "mly-sr-only", children: label }),
|
|
1047
3551
|
Icon && /* @__PURE__ */ jsx10("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__ */ jsx10(Icon, { className: cn("mly-size-3", iconClassName) }) }),
|
|
1048
|
-
/* @__PURE__ */
|
|
3552
|
+
/* @__PURE__ */ jsxs5(
|
|
1049
3553
|
"select",
|
|
1050
3554
|
{
|
|
1051
3555
|
id: selectId,
|
|
@@ -1054,9 +3558,12 @@ function Select(props) {
|
|
|
1054
3558
|
!!Icon && "mly-pl-7",
|
|
1055
3559
|
className
|
|
1056
3560
|
),
|
|
1057
|
-
value,
|
|
3561
|
+
value: value || "",
|
|
1058
3562
|
onChange: (event) => onValueChange(event.target.value),
|
|
1059
|
-
children:
|
|
3563
|
+
children: [
|
|
3564
|
+
placeholder && /* @__PURE__ */ jsx10("option", { value: "", disabled: true, hidden: true, children: placeholder }),
|
|
3565
|
+
options.map((option) => /* @__PURE__ */ jsx10("option", { value: option.value, children: option.label }, option.value))
|
|
3566
|
+
]
|
|
1060
3567
|
}
|
|
1061
3568
|
),
|
|
1062
3569
|
/* @__PURE__ */ jsx10("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__ */ jsx10(
|
|
@@ -2106,10 +4613,10 @@ var DEFAULT_SECTION_MARGIN_TOP = 0;
|
|
|
2106
4613
|
var DEFAULT_SECTION_MARGIN_RIGHT = 0;
|
|
2107
4614
|
var DEFAULT_SECTION_MARGIN_BOTTOM = 0;
|
|
2108
4615
|
var DEFAULT_SECTION_MARGIN_LEFT = 0;
|
|
2109
|
-
var DEFAULT_SECTION_PADDING_TOP =
|
|
2110
|
-
var DEFAULT_SECTION_PADDING_RIGHT =
|
|
2111
|
-
var DEFAULT_SECTION_PADDING_BOTTOM =
|
|
2112
|
-
var DEFAULT_SECTION_PADDING_LEFT =
|
|
4616
|
+
var DEFAULT_SECTION_PADDING_TOP = 0;
|
|
4617
|
+
var DEFAULT_SECTION_PADDING_RIGHT = 0;
|
|
4618
|
+
var DEFAULT_SECTION_PADDING_BOTTOM = 0;
|
|
4619
|
+
var DEFAULT_SECTION_PADDING_LEFT = 0;
|
|
2113
4620
|
var DEFAULT_SECTION_SHOW_IF_KEY = null;
|
|
2114
4621
|
var SectionExtension = Node3.create({
|
|
2115
4622
|
name: "section",
|
|
@@ -2577,6 +5084,7 @@ function getNewWidth(height, aspectRatio) {
|
|
|
2577
5084
|
import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2578
5085
|
var MIN_WIDTH = 20;
|
|
2579
5086
|
var IMAGE_MAX_WIDTH = 600;
|
|
5087
|
+
var IMAGE_MAX_HEIGHT = 400;
|
|
2580
5088
|
function ImageView(props) {
|
|
2581
5089
|
const { node, updateAttributes: updateAttributes2, selected, editor } = props;
|
|
2582
5090
|
const [status, setStatus] = useState4("idle");
|
|
@@ -2601,11 +5109,13 @@ function ImageView(props) {
|
|
|
2601
5109
|
event.preventDefault();
|
|
2602
5110
|
const direction = event.currentTarget.dataset.direction || "--";
|
|
2603
5111
|
const initialXPosition = event.clientX;
|
|
5112
|
+
const initialYPosition = event.clientY;
|
|
2604
5113
|
const currentWidth = imgRef.current.width;
|
|
2605
5114
|
const currentHeight = imgRef.current.height;
|
|
2606
5115
|
let newWidth = currentWidth;
|
|
2607
5116
|
let newHeight = currentHeight;
|
|
2608
|
-
const
|
|
5117
|
+
const transformX = direction[1] === "w" ? -1 : 1;
|
|
5118
|
+
const transformY = direction[0] === "n" ? -1 : 1;
|
|
2609
5119
|
const removeListeners = () => {
|
|
2610
5120
|
window.removeEventListener("mousemove", mouseMoveHandler);
|
|
2611
5121
|
window.removeEventListener("mouseup", removeListeners);
|
|
@@ -2615,13 +5125,22 @@ function ImageView(props) {
|
|
|
2615
5125
|
};
|
|
2616
5126
|
const mouseMoveHandler = (event2) => {
|
|
2617
5127
|
newWidth = Math.max(
|
|
2618
|
-
currentWidth +
|
|
5128
|
+
currentWidth + transformX * (event2.clientX - initialXPosition),
|
|
5129
|
+
MIN_WIDTH
|
|
5130
|
+
);
|
|
5131
|
+
newHeight = Math.max(
|
|
5132
|
+
currentHeight + transformY * (event2.clientY - initialYPosition),
|
|
2619
5133
|
MIN_WIDTH
|
|
2620
5134
|
);
|
|
2621
5135
|
if (newWidth > imageParentWidth) {
|
|
2622
5136
|
newWidth = imageParentWidth;
|
|
2623
5137
|
}
|
|
2624
|
-
newHeight
|
|
5138
|
+
if (newHeight > IMAGE_MAX_HEIGHT) {
|
|
5139
|
+
newHeight = IMAGE_MAX_HEIGHT;
|
|
5140
|
+
}
|
|
5141
|
+
if (node.attrs.lockAspectRatio) {
|
|
5142
|
+
newHeight = getNewHeight(newWidth, node.attrs.aspectRatio);
|
|
5143
|
+
}
|
|
2625
5144
|
setResizingStyle({ width: newWidth, height: newHeight });
|
|
2626
5145
|
if (!event2.buttons) {
|
|
2627
5146
|
return removeListeners();
|
|
@@ -2846,8 +5365,11 @@ function ImageView(props) {
|
|
|
2846
5365
|
ref: imgRef,
|
|
2847
5366
|
style: __spreadProps(__spreadValues({}, resizingStyle), {
|
|
2848
5367
|
cursor: "default",
|
|
5368
|
+
objectFit: "fill",
|
|
2849
5369
|
marginBottom: 0,
|
|
2850
|
-
borderRadius: borderRadius2
|
|
5370
|
+
borderRadius: borderRadius2,
|
|
5371
|
+
width: (resizingStyle == null ? void 0 : resizingStyle.width) ? `${resizingStyle.width}px` : width ? `${width}px` : "auto",
|
|
5372
|
+
height: (resizingStyle == null ? void 0 : resizingStyle.height) ? `${resizingStyle.height}px` : height ? `${height}px` : "auto"
|
|
2851
5373
|
}),
|
|
2852
5374
|
draggable: editor.isEditable,
|
|
2853
5375
|
className: cn(
|
|
@@ -3097,6 +5619,7 @@ function LogoView(props) {
|
|
|
3097
5619
|
|
|
3098
5620
|
// src/editor/nodes/logo/logo.ts
|
|
3099
5621
|
var allowedLogoSize = ["sm", "md", "lg"];
|
|
5622
|
+
var allowedLogoAlignment = ["left", "center", "right"];
|
|
3100
5623
|
var DEFAULT_ALIGNMENT = "left";
|
|
3101
5624
|
var DEFAULT_LOGO_SIZE = "sm";
|
|
3102
5625
|
var logoSizes = {
|
|
@@ -3230,7 +5753,10 @@ import { sticky as sticky3 } from "tippy.js";
|
|
|
3230
5753
|
import { AlignCenter as AlignCenter2, AlignLeft as AlignLeft2, AlignRight as AlignRight2 } from "lucide-react";
|
|
3231
5754
|
import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3232
5755
|
function AlignmentSwitch(props) {
|
|
3233
|
-
const { alignment
|
|
5756
|
+
const { alignment: rawAlignment, onAlignmentChange } = props;
|
|
5757
|
+
const alignment = allowedLogoAlignment.includes(
|
|
5758
|
+
rawAlignment
|
|
5759
|
+
) ? rawAlignment : "left";
|
|
3234
5760
|
const alignments = {
|
|
3235
5761
|
left: {
|
|
3236
5762
|
icon: AlignLeft2,
|
|
@@ -4450,7 +6976,7 @@ var DefaultRenderVariable = (props) => {
|
|
|
4450
6976
|
const { variable, fallback, from } = props;
|
|
4451
6977
|
const { name, required, valid } = variable;
|
|
4452
6978
|
if (from === "button-variable") {
|
|
4453
|
-
return /* @__PURE__ */ jsxs16("div", { className: "mly-inline-grid mly-
|
|
6979
|
+
return /* @__PURE__ */ jsxs16("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: [
|
|
4454
6980
|
/* @__PURE__ */ jsx34(Braces2, { className: "mly-h-3 mly-w-3 mly-shrink-0 mly-stroke-[2.5]" }),
|
|
4455
6981
|
/* @__PURE__ */ jsx34("span", { className: "mly-min-w-0 mly-truncate mly-text-left", children: name })
|
|
4456
6982
|
] });
|
|
@@ -4460,7 +6986,7 @@ var DefaultRenderVariable = (props) => {
|
|
|
4460
6986
|
"div",
|
|
4461
6987
|
{
|
|
4462
6988
|
className: cn(
|
|
4463
|
-
"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",
|
|
6989
|
+
"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",
|
|
4464
6990
|
!valid && "mly-border-rose-400 mly-bg-rose-50 mly-text-rose-600 hover:mly-bg-rose-100"
|
|
4465
6991
|
),
|
|
4466
6992
|
children: [
|
|
@@ -4691,7 +7217,7 @@ function LinkInputPopover(props) {
|
|
|
4691
7217
|
variant: "ghost",
|
|
4692
7218
|
size: "sm",
|
|
4693
7219
|
type: "button",
|
|
4694
|
-
className: "mly-size-7",
|
|
7220
|
+
className: "!mly-size-7",
|
|
4695
7221
|
"data-state": !!defaultValue,
|
|
4696
7222
|
children: /* @__PURE__ */ jsx35(Icon, { className: "mly-h-3 mly-w-3 mly-shrink-0 mly-stroke-[2.5] mly-text-midnight-gray" })
|
|
4697
7223
|
}
|
|
@@ -4973,11 +7499,14 @@ function ImageBubbleMenu(props) {
|
|
|
4973
7499
|
value: (_c = state == null ? void 0 : state.width) != null ? _c : "",
|
|
4974
7500
|
onValueChange: (value) => {
|
|
4975
7501
|
const width = Math.min(Number(value) || 0, IMAGE_MAX_WIDTH);
|
|
7502
|
+
const currentHeight = Number(state.height) || 0;
|
|
7503
|
+
const currentWidth = Number(state.width) || 0;
|
|
7504
|
+
const currentAspectRatio = state.aspectRatio || currentWidth / currentHeight || 1;
|
|
4976
7505
|
editor == null ? void 0 : editor.chain().updateAttributes("image", __spreadValues({
|
|
4977
7506
|
width: String(width)
|
|
4978
7507
|
}, lockAspectRatio && value ? {
|
|
4979
7508
|
height: String(
|
|
4980
|
-
getNewHeight(width,
|
|
7509
|
+
getNewHeight(width, currentAspectRatio)
|
|
4981
7510
|
)
|
|
4982
7511
|
} : {})).run();
|
|
4983
7512
|
}
|
|
@@ -4990,11 +7519,14 @@ function ImageBubbleMenu(props) {
|
|
|
4990
7519
|
value: (_d = state == null ? void 0 : state.height) != null ? _d : "",
|
|
4991
7520
|
onValueChange: (value) => {
|
|
4992
7521
|
const height = Number(value) || 0;
|
|
7522
|
+
const currentHeight = Number(state.height) || 0;
|
|
7523
|
+
const currentWidth = Number(state.width) || 0;
|
|
7524
|
+
const currentAspectRatio = state.aspectRatio || currentWidth / currentHeight || 1;
|
|
4993
7525
|
editor == null ? void 0 : editor.chain().updateAttributes("image", __spreadValues({
|
|
4994
7526
|
height: String(height)
|
|
4995
7527
|
}, lockAspectRatio && value ? {
|
|
4996
7528
|
width: String(
|
|
4997
|
-
getNewWidth(height,
|
|
7529
|
+
getNewWidth(height, currentAspectRatio)
|
|
4998
7530
|
)
|
|
4999
7531
|
} : {})).run();
|
|
5000
7532
|
}
|
|
@@ -6016,7 +8548,7 @@ function SpacerBubbleMenu(props) {
|
|
|
6016
8548
|
// src/editor/nodes/columns/columns.ts
|
|
6017
8549
|
import { mergeAttributes as mergeAttributes5 } from "@tiptap/core";
|
|
6018
8550
|
import { Node as Node6 } from "@tiptap/core";
|
|
6019
|
-
import { v4 as
|
|
8551
|
+
import { v4 as uuidv43 } from "uuid";
|
|
6020
8552
|
var DEFAULT_COLUMNS_GAP = 8;
|
|
6021
8553
|
var ColumnsExtension = Node6.create({
|
|
6022
8554
|
name: "columns",
|
|
@@ -6066,7 +8598,7 @@ var ColumnsExtension = Node6.create({
|
|
|
6066
8598
|
{
|
|
6067
8599
|
type: "column",
|
|
6068
8600
|
attrs: {
|
|
6069
|
-
columnId:
|
|
8601
|
+
columnId: uuidv43()
|
|
6070
8602
|
},
|
|
6071
8603
|
content: [
|
|
6072
8604
|
{
|
|
@@ -6077,7 +8609,7 @@ var ColumnsExtension = Node6.create({
|
|
|
6077
8609
|
{
|
|
6078
8610
|
type: "column",
|
|
6079
8611
|
attrs: {
|
|
6080
|
-
columnId:
|
|
8612
|
+
columnId: uuidv43()
|
|
6081
8613
|
},
|
|
6082
8614
|
content: [
|
|
6083
8615
|
{
|
|
@@ -6676,18 +9208,18 @@ function ButtonView(props) {
|
|
|
6676
9208
|
),
|
|
6677
9209
|
tabIndex: -1,
|
|
6678
9210
|
style: {
|
|
6679
|
-
backgroundColor: variant === "filled" ? buttonColor : "transparent",
|
|
6680
|
-
color: textColor,
|
|
9211
|
+
backgroundColor: variant === "filled" ? buttonColor || "var(--mly-button-background-color)" : "transparent",
|
|
9212
|
+
color: textColor || "var(--mly-button-text-color)",
|
|
6681
9213
|
borderWidth: 2,
|
|
6682
9214
|
borderStyle: "solid",
|
|
6683
|
-
borderColor: buttonColor,
|
|
9215
|
+
borderColor: buttonColor || "var(--mly-button-background-color)",
|
|
6684
9216
|
// decrease the border color opacity to 80%
|
|
6685
9217
|
// so that it's not too prominent
|
|
6686
|
-
"--button-var-border-color": `${textColor}80
|
|
6687
|
-
paddingTop,
|
|
6688
|
-
paddingRight,
|
|
6689
|
-
paddingBottom,
|
|
6690
|
-
paddingLeft
|
|
9218
|
+
"--button-var-border-color": textColor ? `${textColor}80` : "color-mix(in srgb, var(--mly-button-text-color) 80%, transparent)",
|
|
9219
|
+
paddingTop: paddingTop || "var(--mly-button-padding-top)",
|
|
9220
|
+
paddingRight: paddingRight || "var(--mly-button-padding-right)",
|
|
9221
|
+
paddingBottom: paddingBottom || "var(--mly-button-padding-bottom)",
|
|
9222
|
+
paddingLeft: paddingLeft || "var(--mly-button-padding-left)"
|
|
6691
9223
|
},
|
|
6692
9224
|
onClick: (e) => {
|
|
6693
9225
|
e.preventDefault();
|
|
@@ -6786,7 +9318,8 @@ function ButtonView(props) {
|
|
|
6786
9318
|
paddingLeft: paddingX
|
|
6787
9319
|
});
|
|
6788
9320
|
},
|
|
6789
|
-
tooltip: "Size"
|
|
9321
|
+
tooltip: "Size",
|
|
9322
|
+
placeholder: "Size"
|
|
6790
9323
|
}
|
|
6791
9324
|
)
|
|
6792
9325
|
] }),
|
|
@@ -6825,7 +9358,7 @@ function ButtonView(props) {
|
|
|
6825
9358
|
BackgroundColorPickerPopup,
|
|
6826
9359
|
{
|
|
6827
9360
|
variant,
|
|
6828
|
-
color: buttonColor,
|
|
9361
|
+
color: buttonColor || "transparent",
|
|
6829
9362
|
onChange: (color) => {
|
|
6830
9363
|
updateAttributes2({
|
|
6831
9364
|
buttonColor: color
|
|
@@ -6836,7 +9369,7 @@ function ButtonView(props) {
|
|
|
6836
9369
|
/* @__PURE__ */ jsx50(
|
|
6837
9370
|
TextColorPickerPopup,
|
|
6838
9371
|
{
|
|
6839
|
-
color: textColor,
|
|
9372
|
+
color: textColor || "transparent",
|
|
6840
9373
|
onChange: (color) => {
|
|
6841
9374
|
updateAttributes2({
|
|
6842
9375
|
textColor: color
|
|
@@ -6924,12 +9457,12 @@ function TextColorPickerPopup(props) {
|
|
|
6924
9457
|
var DEFAULT_BUTTON_ALIGNMENT = "left";
|
|
6925
9458
|
var DEFAULT_BUTTON_VARIANT = "filled";
|
|
6926
9459
|
var DEFAULT_BUTTON_BORDER_RADIUS = "smooth";
|
|
6927
|
-
var DEFAULT_BUTTON_BACKGROUND_COLOR =
|
|
6928
|
-
var DEFAULT_BUTTON_TEXT_COLOR =
|
|
6929
|
-
var DEFAULT_BUTTON_PADDING_TOP =
|
|
6930
|
-
var DEFAULT_BUTTON_PADDING_RIGHT =
|
|
6931
|
-
var DEFAULT_BUTTON_PADDING_BOTTOM =
|
|
6932
|
-
var DEFAULT_BUTTON_PADDING_LEFT =
|
|
9460
|
+
var DEFAULT_BUTTON_BACKGROUND_COLOR = null;
|
|
9461
|
+
var DEFAULT_BUTTON_TEXT_COLOR = null;
|
|
9462
|
+
var DEFAULT_BUTTON_PADDING_TOP = null;
|
|
9463
|
+
var DEFAULT_BUTTON_PADDING_RIGHT = null;
|
|
9464
|
+
var DEFAULT_BUTTON_PADDING_BOTTOM = null;
|
|
9465
|
+
var DEFAULT_BUTTON_PADDING_LEFT = null;
|
|
6933
9466
|
var allowedButtonVariant = ["filled", "outline"];
|
|
6934
9467
|
var allowedButtonBorderRadius = ["sharp", "smooth", "round"];
|
|
6935
9468
|
var ButtonExtension = Node9.create({
|
|
@@ -7025,28 +9558,6 @@ var ButtonExtension = Node9.create({
|
|
|
7025
9558
|
};
|
|
7026
9559
|
}
|
|
7027
9560
|
},
|
|
7028
|
-
buttonColor: {
|
|
7029
|
-
default: DEFAULT_BUTTON_BACKGROUND_COLOR,
|
|
7030
|
-
parseHTML: (element) => {
|
|
7031
|
-
return element.getAttribute("data-button-color") || DEFAULT_BUTTON_BACKGROUND_COLOR;
|
|
7032
|
-
},
|
|
7033
|
-
renderHTML: (attributes) => {
|
|
7034
|
-
return {
|
|
7035
|
-
"data-button-color": attributes.buttonColor
|
|
7036
|
-
};
|
|
7037
|
-
}
|
|
7038
|
-
},
|
|
7039
|
-
textColor: {
|
|
7040
|
-
default: DEFAULT_BUTTON_TEXT_COLOR,
|
|
7041
|
-
parseHTML: (element) => {
|
|
7042
|
-
return element.getAttribute("data-text-color") || DEFAULT_BUTTON_TEXT_COLOR;
|
|
7043
|
-
},
|
|
7044
|
-
renderHTML: (attributes) => {
|
|
7045
|
-
return {
|
|
7046
|
-
"data-text-color": attributes.textColor
|
|
7047
|
-
};
|
|
7048
|
-
}
|
|
7049
|
-
},
|
|
7050
9561
|
showIfKey: {
|
|
7051
9562
|
default: DEFAULT_SECTION_SHOW_IF_KEY,
|
|
7052
9563
|
parseHTML: (element) => {
|
|
@@ -7061,62 +9572,12 @@ var ButtonExtension = Node9.create({
|
|
|
7061
9572
|
};
|
|
7062
9573
|
}
|
|
7063
9574
|
},
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
);
|
|
7071
|
-
},
|
|
7072
|
-
renderHTML: (attributes) => {
|
|
7073
|
-
return {
|
|
7074
|
-
"data-padding-top": attributes.paddingTop
|
|
7075
|
-
};
|
|
7076
|
-
}
|
|
7077
|
-
},
|
|
7078
|
-
paddingRight: {
|
|
7079
|
-
default: DEFAULT_BUTTON_PADDING_RIGHT,
|
|
7080
|
-
parseHTML: (element) => {
|
|
7081
|
-
return parseInt(
|
|
7082
|
-
element.getAttribute("data-padding-right") || DEFAULT_BUTTON_PADDING_RIGHT.toString(),
|
|
7083
|
-
10
|
|
7084
|
-
);
|
|
7085
|
-
},
|
|
7086
|
-
renderHTML: (attributes) => {
|
|
7087
|
-
return {
|
|
7088
|
-
"data-padding-right": attributes.paddingRight
|
|
7089
|
-
};
|
|
7090
|
-
}
|
|
7091
|
-
},
|
|
7092
|
-
paddingBottom: {
|
|
7093
|
-
default: DEFAULT_BUTTON_PADDING_BOTTOM,
|
|
7094
|
-
parseHTML: (element) => {
|
|
7095
|
-
return parseInt(
|
|
7096
|
-
element.getAttribute("data-padding-bottom") || DEFAULT_BUTTON_PADDING_BOTTOM.toString(),
|
|
7097
|
-
10
|
|
7098
|
-
);
|
|
7099
|
-
},
|
|
7100
|
-
renderHTML: (attributes) => {
|
|
7101
|
-
return {
|
|
7102
|
-
"data-padding-bottom": attributes.paddingBottom
|
|
7103
|
-
};
|
|
7104
|
-
}
|
|
7105
|
-
},
|
|
7106
|
-
paddingLeft: {
|
|
7107
|
-
default: DEFAULT_BUTTON_PADDING_LEFT,
|
|
7108
|
-
parseHTML: (element) => {
|
|
7109
|
-
return parseInt(
|
|
7110
|
-
element.getAttribute("data-padding-left") || DEFAULT_BUTTON_PADDING_LEFT.toString(),
|
|
7111
|
-
10
|
|
7112
|
-
);
|
|
7113
|
-
},
|
|
7114
|
-
renderHTML: (attributes) => {
|
|
7115
|
-
return {
|
|
7116
|
-
"data-padding-left": attributes.paddingLeft
|
|
7117
|
-
};
|
|
7118
|
-
}
|
|
7119
|
-
}
|
|
9575
|
+
buttonColor: DEFAULT_BUTTON_BACKGROUND_COLOR,
|
|
9576
|
+
textColor: DEFAULT_BUTTON_TEXT_COLOR,
|
|
9577
|
+
paddingTop: DEFAULT_BUTTON_PADDING_TOP,
|
|
9578
|
+
paddingRight: DEFAULT_BUTTON_PADDING_RIGHT,
|
|
9579
|
+
paddingBottom: DEFAULT_BUTTON_PADDING_BOTTOM,
|
|
9580
|
+
paddingLeft: DEFAULT_BUTTON_PADDING_LEFT
|
|
7120
9581
|
};
|
|
7121
9582
|
},
|
|
7122
9583
|
parseHTML() {
|
|
@@ -7823,13 +10284,16 @@ function SlashCommandItem(props) {
|
|
|
7823
10284
|
selectedCommandIndex,
|
|
7824
10285
|
editor,
|
|
7825
10286
|
activeCommandRef,
|
|
7826
|
-
selectItem
|
|
10287
|
+
selectItem,
|
|
10288
|
+
hoveredItemKey,
|
|
10289
|
+
onHover
|
|
7827
10290
|
} = props;
|
|
7828
10291
|
const [open, setOpen] = useState10(false);
|
|
7829
|
-
const [isHovered, setIsHovered] = useState10(false);
|
|
7830
10292
|
const isActive = groupIndex === selectedGroupIndex && commandIndex === selectedCommandIndex;
|
|
7831
|
-
const
|
|
7832
|
-
const
|
|
10293
|
+
const itemKey = `${groupIndex}-${commandIndex}`;
|
|
10294
|
+
const isHovered = hoveredItemKey === itemKey;
|
|
10295
|
+
const isSubCommand2 = item && "commands" in item;
|
|
10296
|
+
const shouldOpenTooltip = !!(item == null ? void 0 : item.preview) && (isHovered || isActive && !hoveredItemKey);
|
|
7833
10297
|
const hasRenderFunction = typeof item.render === "function";
|
|
7834
10298
|
const renderFunctionValue = hasRenderFunction ? (_a = item.render) == null ? void 0 : _a.call(item, editor) : null;
|
|
7835
10299
|
let value = /* @__PURE__ */ jsxs31(Fragment6, { children: [
|
|
@@ -7838,7 +10302,7 @@ function SlashCommandItem(props) {
|
|
|
7838
10302
|
/* @__PURE__ */ jsx53("p", { className: "mly-font-medium", children: item.title }),
|
|
7839
10303
|
/* @__PURE__ */ jsx53("p", { className: "mly-text-xs mly-text-gray-400", children: item.description })
|
|
7840
10304
|
] }),
|
|
7841
|
-
|
|
10305
|
+
isSubCommand2 && /* @__PURE__ */ jsx53("span", { className: "mly-block mly-px-1 mly-text-gray-400", children: /* @__PURE__ */ jsx53(ChevronRightIcon, { className: "mly-size-3.5 mly-stroke-[2.5]" }) })
|
|
7842
10306
|
] });
|
|
7843
10307
|
if (renderFunctionValue !== null && renderFunctionValue !== true) {
|
|
7844
10308
|
value = renderFunctionValue;
|
|
@@ -7878,8 +10342,8 @@ function SlashCommandItem(props) {
|
|
|
7878
10342
|
isActive ? "mly-bg-gray-100 mly-text-gray-900" : "mly-bg-transparent"
|
|
7879
10343
|
),
|
|
7880
10344
|
onClick: () => selectItem(groupIndex, commandIndex),
|
|
7881
|
-
onMouseEnter: () =>
|
|
7882
|
-
onMouseLeave: () =>
|
|
10345
|
+
onMouseEnter: () => onHover(true),
|
|
10346
|
+
onMouseLeave: () => onHover(false),
|
|
7883
10347
|
type: "button",
|
|
7884
10348
|
ref: isActive ? activeCommandRef : null,
|
|
7885
10349
|
children: value
|
|
@@ -7907,12 +10371,94 @@ function SlashCommandItem(props) {
|
|
|
7907
10371
|
] }, `${groupIndex}-${commandIndex}`);
|
|
7908
10372
|
}
|
|
7909
10373
|
|
|
10374
|
+
// src/editor/extensions/slash-command/slash-command-search.tsx
|
|
10375
|
+
function filterSlashCommands(options) {
|
|
10376
|
+
const { groups, query, editor } = options;
|
|
10377
|
+
const newGroups = [...groups];
|
|
10378
|
+
let searchQuery = query == null ? void 0 : query.toLowerCase();
|
|
10379
|
+
const subCommandMatch = searchQuery.match(/^([^.]+)\./);
|
|
10380
|
+
if (subCommandMatch) {
|
|
10381
|
+
const [match, subCommandId] = subCommandMatch;
|
|
10382
|
+
const subCommandGroup = findSubCommandGroup(groups, subCommandId);
|
|
10383
|
+
if (subCommandGroup) {
|
|
10384
|
+
const remainingSearch = searchQuery.slice(match.length);
|
|
10385
|
+
const filteredCommands = subCommandGroup.commands.filter(
|
|
10386
|
+
(item) => !remainingSearch || isCommandMatch(item, remainingSearch)
|
|
10387
|
+
);
|
|
10388
|
+
return filteredCommands.length ? [
|
|
10389
|
+
__spreadProps(__spreadValues({}, subCommandGroup), {
|
|
10390
|
+
commands: filteredCommands
|
|
10391
|
+
})
|
|
10392
|
+
] : [];
|
|
10393
|
+
}
|
|
10394
|
+
}
|
|
10395
|
+
const filteredGroups = newGroups.map((group) => {
|
|
10396
|
+
return __spreadProps(__spreadValues({}, group), {
|
|
10397
|
+
commands: group.commands.flatMap(
|
|
10398
|
+
(item) => processCommand({ item, search: searchQuery, editor })
|
|
10399
|
+
)
|
|
10400
|
+
});
|
|
10401
|
+
}).filter((group) => group.commands.length > 0);
|
|
10402
|
+
return filteredGroups;
|
|
10403
|
+
}
|
|
10404
|
+
function findSubCommandGroup(groups, subCommandId) {
|
|
10405
|
+
return groups.flatMap((group) => group.commands).find(
|
|
10406
|
+
(item) => {
|
|
10407
|
+
var _a;
|
|
10408
|
+
return "commands" in item && ((_a = item.id) == null ? void 0 : _a.toLowerCase()) === subCommandId.toLowerCase();
|
|
10409
|
+
}
|
|
10410
|
+
);
|
|
10411
|
+
}
|
|
10412
|
+
function containsText(text2, search) {
|
|
10413
|
+
if (!text2) {
|
|
10414
|
+
return false;
|
|
10415
|
+
}
|
|
10416
|
+
return text2.toLowerCase().includes(search.toLowerCase());
|
|
10417
|
+
}
|
|
10418
|
+
function isCommandMatch(item, search) {
|
|
10419
|
+
var _a, _b;
|
|
10420
|
+
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);
|
|
10421
|
+
}
|
|
10422
|
+
function isSubCommand(item) {
|
|
10423
|
+
return "commands" in item && Array.isArray(item.commands) && !!item.id;
|
|
10424
|
+
}
|
|
10425
|
+
function processCommand(options) {
|
|
10426
|
+
var _a, _b, _c, _d;
|
|
10427
|
+
const { item, search, editor } = options;
|
|
10428
|
+
const show = (_a = item == null ? void 0 : item.render) == null ? void 0 : _a.call(item, editor);
|
|
10429
|
+
if (show === null) {
|
|
10430
|
+
return [];
|
|
10431
|
+
}
|
|
10432
|
+
const isSearching = search.length > 0;
|
|
10433
|
+
if (isSubCommand(item)) {
|
|
10434
|
+
const navigableCommand = __spreadProps(__spreadValues({}, item), {
|
|
10435
|
+
command: (options2) => {
|
|
10436
|
+
const { editor: editor2, range } = options2;
|
|
10437
|
+
editor2.chain().focus().insertContentAt(range, `/${item.id}.`).run();
|
|
10438
|
+
}
|
|
10439
|
+
});
|
|
10440
|
+
const matched = isCommandMatch(navigableCommand, search);
|
|
10441
|
+
if (matched) {
|
|
10442
|
+
return [navigableCommand];
|
|
10443
|
+
}
|
|
10444
|
+
const hasMatchingCommands = (_c = (_b = navigableCommand == null ? void 0 : navigableCommand.commands) == null ? void 0 : _b.some(
|
|
10445
|
+
(command) => isCommandMatch(command, search)
|
|
10446
|
+
)) != null ? _c : false;
|
|
10447
|
+
if (!hasMatchingCommands) {
|
|
10448
|
+
return [];
|
|
10449
|
+
}
|
|
10450
|
+
return (_d = navigableCommand == null ? void 0 : navigableCommand.commands) != null ? _d : [];
|
|
10451
|
+
}
|
|
10452
|
+
return !isSearching || isCommandMatch(item, search) ? [item] : [];
|
|
10453
|
+
}
|
|
10454
|
+
|
|
7910
10455
|
// src/editor/extensions/slash-command/slash-command-view.tsx
|
|
7911
10456
|
import { jsx as jsx54, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
7912
|
-
var CommandList = forwardRef8(
|
|
10457
|
+
var CommandList = forwardRef8((props, ref) => {
|
|
7913
10458
|
const { items: groups, command, editor, range, query } = props;
|
|
7914
10459
|
const [selectedGroupIndex, setSelectedGroupIndex] = useState11(0);
|
|
7915
10460
|
const [selectedCommandIndex, setSelectedCommandIndex] = useState11(0);
|
|
10461
|
+
const [hoveredItemKey, setHoveredItemKey] = useState11(null);
|
|
7916
10462
|
const prevQuery = useRef11("");
|
|
7917
10463
|
const prevSelectedGroupIndex = useRef11(0);
|
|
7918
10464
|
const prevSelectedCommandIndex = useRef11(0);
|
|
@@ -8042,7 +10588,10 @@ var CommandList = forwardRef8(function CommandList2(props, ref) {
|
|
|
8042
10588
|
prevSelectedCommandIndex.current = 0;
|
|
8043
10589
|
};
|
|
8044
10590
|
}, []);
|
|
8045
|
-
|
|
10591
|
+
if (!groups || groups.length === 0) {
|
|
10592
|
+
return null;
|
|
10593
|
+
}
|
|
10594
|
+
return /* @__PURE__ */ jsx54(TooltipProvider, { children: /* @__PURE__ */ jsxs32("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: [
|
|
8046
10595
|
/* @__PURE__ */ jsx54(
|
|
8047
10596
|
"div",
|
|
8048
10597
|
{
|
|
@@ -8061,6 +10610,7 @@ var CommandList = forwardRef8(function CommandList2(props, ref) {
|
|
|
8061
10610
|
}
|
|
8062
10611
|
),
|
|
8063
10612
|
/* @__PURE__ */ jsx54("div", { className: "mly-space-y-0.5 mly-p-1", children: group.commands.map((item, commandIndex) => {
|
|
10613
|
+
const itemKey = `${groupIndex}-${commandIndex}`;
|
|
8064
10614
|
return /* @__PURE__ */ jsx54(
|
|
8065
10615
|
SlashCommandItem,
|
|
8066
10616
|
{
|
|
@@ -8071,9 +10621,11 @@ var CommandList = forwardRef8(function CommandList2(props, ref) {
|
|
|
8071
10621
|
selectedCommandIndex,
|
|
8072
10622
|
selectItem: () => selectItem(groupIndex, commandIndex),
|
|
8073
10623
|
editor,
|
|
8074
|
-
activeCommandRef
|
|
10624
|
+
activeCommandRef,
|
|
10625
|
+
hoveredItemKey,
|
|
10626
|
+
onHover: (isHovered) => setHoveredItemKey(isHovered ? itemKey : null)
|
|
8075
10627
|
},
|
|
8076
|
-
|
|
10628
|
+
itemKey
|
|
8077
10629
|
);
|
|
8078
10630
|
}) })
|
|
8079
10631
|
] }, groupIndex))
|
|
@@ -8093,77 +10645,12 @@ var CommandList = forwardRef8(function CommandList2(props, ref) {
|
|
|
8093
10645
|
"to select"
|
|
8094
10646
|
] })
|
|
8095
10647
|
] }) })
|
|
8096
|
-
] }) })
|
|
10648
|
+
] }) });
|
|
8097
10649
|
});
|
|
8098
10650
|
function getSlashCommandSuggestions(groups = DEFAULT_SLASH_COMMANDS) {
|
|
8099
10651
|
return {
|
|
8100
10652
|
items: ({ query, editor }) => {
|
|
8101
|
-
|
|
8102
|
-
let newGroups = groups;
|
|
8103
|
-
let search = query.toLowerCase();
|
|
8104
|
-
const subCommandIds = newGroups.map((group) => {
|
|
8105
|
-
return group.commands.filter((item) => "commands" in item).map((item) => item == null ? void 0 : item.id.toLowerCase());
|
|
8106
|
-
}).flat().map((id) => `${id}.`);
|
|
8107
|
-
const shouldEnterSubCommand = subCommandIds.some(
|
|
8108
|
-
(id) => search.startsWith(id)
|
|
8109
|
-
);
|
|
8110
|
-
if (shouldEnterSubCommand) {
|
|
8111
|
-
const subCommandId = subCommandIds.find((id) => search.startsWith(id));
|
|
8112
|
-
const sanitizedSubCommandId = subCommandId == null ? void 0 : subCommandId.slice(0, -1);
|
|
8113
|
-
const group = (_a = newGroups.find((group2) => {
|
|
8114
|
-
return group2.commands.some(
|
|
8115
|
-
// @ts-ignore
|
|
8116
|
-
(item) => {
|
|
8117
|
-
var _a2;
|
|
8118
|
-
return ((_a2 = item == null ? void 0 : item.id) == null ? void 0 : _a2.toLowerCase()) === sanitizedSubCommandId;
|
|
8119
|
-
}
|
|
8120
|
-
);
|
|
8121
|
-
})) == null ? void 0 : _a.commands.find(
|
|
8122
|
-
// @ts-ignore
|
|
8123
|
-
(item) => {
|
|
8124
|
-
var _a2;
|
|
8125
|
-
return ((_a2 = item == null ? void 0 : item.id) == null ? void 0 : _a2.toLowerCase()) === sanitizedSubCommandId;
|
|
8126
|
-
}
|
|
8127
|
-
);
|
|
8128
|
-
if (!group) {
|
|
8129
|
-
return groups;
|
|
8130
|
-
}
|
|
8131
|
-
search = search.replace(subCommandId || "", "");
|
|
8132
|
-
newGroups = [
|
|
8133
|
-
__spreadProps(__spreadValues({}, group), {
|
|
8134
|
-
commands: (group == null ? void 0 : group.commands) || []
|
|
8135
|
-
})
|
|
8136
|
-
];
|
|
8137
|
-
}
|
|
8138
|
-
const filteredGroups = newGroups.map((group) => {
|
|
8139
|
-
return __spreadProps(__spreadValues({}, group), {
|
|
8140
|
-
commands: group.commands.filter((item) => {
|
|
8141
|
-
var _a2;
|
|
8142
|
-
if (typeof query === "string" && query.length > 0) {
|
|
8143
|
-
const show = (_a2 = item == null ? void 0 : item.render) == null ? void 0 : _a2.call(item, editor);
|
|
8144
|
-
if (show === null) {
|
|
8145
|
-
return false;
|
|
8146
|
-
}
|
|
8147
|
-
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(
|
|
8148
|
-
(term) => term.includes(search)
|
|
8149
|
-
);
|
|
8150
|
-
}
|
|
8151
|
-
return true;
|
|
8152
|
-
}).map((item) => {
|
|
8153
|
-
const isSubCommandItem = "commands" in item;
|
|
8154
|
-
if (isSubCommandItem) {
|
|
8155
|
-
item = __spreadProps(__spreadValues({}, item), {
|
|
8156
|
-
command: (options) => {
|
|
8157
|
-
const { editor: editor2, range } = options;
|
|
8158
|
-
editor2.chain().focus().insertContentAt(range, `/${item.id}.`).run();
|
|
8159
|
-
}
|
|
8160
|
-
});
|
|
8161
|
-
}
|
|
8162
|
-
return item;
|
|
8163
|
-
})
|
|
8164
|
-
});
|
|
8165
|
-
}).filter((group) => group.commands.length > 0);
|
|
8166
|
-
return filteredGroups;
|
|
10653
|
+
return filterSlashCommands({ query, editor, groups });
|
|
8167
10654
|
},
|
|
8168
10655
|
allow: ({ editor }) => {
|
|
8169
10656
|
const isInsideHTMLCodeBlock = editor.isActive("htmlCodeBlock");
|
|
@@ -8613,13 +11100,13 @@ function TextBubbleContent(props) {
|
|
|
8613
11100
|
|
|
8614
11101
|
// src/editor/components/text-menu/turn-into-block.tsx
|
|
8615
11102
|
import { ChevronDownIcon as ChevronDownIcon2, PilcrowIcon } from "lucide-react";
|
|
8616
|
-
import { useMemo as
|
|
11103
|
+
import { useMemo as useMemo12 } from "react";
|
|
8617
11104
|
import { jsx as jsx57, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
8618
11105
|
var isOption = (option) => option.type === "option";
|
|
8619
11106
|
var isCategory = (option) => option.type === "category";
|
|
8620
11107
|
function TurnIntoBlock(props) {
|
|
8621
11108
|
const { options } = props;
|
|
8622
|
-
const activeItem =
|
|
11109
|
+
const activeItem = useMemo12(
|
|
8623
11110
|
() => options.find((option) => option.type === "option" && option.isActive()),
|
|
8624
11111
|
[options]
|
|
8625
11112
|
);
|
|
@@ -8654,7 +11141,7 @@ function TurnIntoBlock(props) {
|
|
|
8654
11141
|
{
|
|
8655
11142
|
onClick: option.onClick,
|
|
8656
11143
|
variant: "ghost",
|
|
8657
|
-
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",
|
|
11144
|
+
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",
|
|
8658
11145
|
children: [
|
|
8659
11146
|
/* @__PURE__ */ jsx57(option.icon, { className: "mly-size-[15px] mly-shrink-0" }),
|
|
8660
11147
|
option.label
|
|
@@ -8875,6 +11362,37 @@ function VariableBubbleMenu(props) {
|
|
|
8875
11362
|
);
|
|
8876
11363
|
}
|
|
8877
11364
|
|
|
11365
|
+
// src/editor/extensions/selection/selection.ts
|
|
11366
|
+
import { Extension as Extension4 } from "@tiptap/core";
|
|
11367
|
+
import { Plugin as Plugin4, PluginKey as PluginKey5 } from "@tiptap/pm/state";
|
|
11368
|
+
import { Decoration, DecorationSet } from "@tiptap/pm/view";
|
|
11369
|
+
var SelectionExtension = Extension4.create({
|
|
11370
|
+
name: "selection",
|
|
11371
|
+
addProseMirrorPlugins() {
|
|
11372
|
+
const { editor } = this;
|
|
11373
|
+
return [
|
|
11374
|
+
new Plugin4({
|
|
11375
|
+
key: new PluginKey5("selection"),
|
|
11376
|
+
props: {
|
|
11377
|
+
decorations(state) {
|
|
11378
|
+
if (state.selection.empty) {
|
|
11379
|
+
return null;
|
|
11380
|
+
}
|
|
11381
|
+
if (editor.isFocused === true) {
|
|
11382
|
+
return null;
|
|
11383
|
+
}
|
|
11384
|
+
return DecorationSet.create(state.doc, [
|
|
11385
|
+
Decoration.inline(state.selection.from, state.selection.to, {
|
|
11386
|
+
class: "selection mly-bg-blue-200 mly-inline mly-py-1"
|
|
11387
|
+
})
|
|
11388
|
+
]);
|
|
11389
|
+
}
|
|
11390
|
+
}
|
|
11391
|
+
})
|
|
11392
|
+
];
|
|
11393
|
+
}
|
|
11394
|
+
});
|
|
11395
|
+
|
|
8878
11396
|
// src/editor/extensions/index.tsx
|
|
8879
11397
|
function extensions(props) {
|
|
8880
11398
|
const { blocks, extensions: extensions2 = [] } = props;
|
|
@@ -8888,7 +11406,8 @@ function extensions(props) {
|
|
|
8888
11406
|
}),
|
|
8889
11407
|
HTMLCodeBlockExtension,
|
|
8890
11408
|
InlineImageExtension,
|
|
8891
|
-
PlaceholderExtension
|
|
11409
|
+
PlaceholderExtension,
|
|
11410
|
+
SelectionExtension
|
|
8892
11411
|
].filter((ext) => {
|
|
8893
11412
|
return !extensions2.some((e) => e.name === ext.name);
|
|
8894
11413
|
});
|
|
@@ -8932,6 +11451,7 @@ function Editor13(props) {
|
|
|
8932
11451
|
contentClassName = "",
|
|
8933
11452
|
bodyClassName = "",
|
|
8934
11453
|
hasMenuBar = true,
|
|
11454
|
+
hideContextMenu = false,
|
|
8935
11455
|
spellCheck = false,
|
|
8936
11456
|
autofocus = "end",
|
|
8937
11457
|
immediatelyRender = false
|
|
@@ -8945,7 +11465,7 @@ function Editor13(props) {
|
|
|
8945
11465
|
editable = true,
|
|
8946
11466
|
placeholderUrl = DEFAULT_PLACEHOLDER_URL
|
|
8947
11467
|
} = props;
|
|
8948
|
-
const formattedContent =
|
|
11468
|
+
const formattedContent = useMemo13(() => {
|
|
8949
11469
|
if (contentJson) {
|
|
8950
11470
|
const json = (contentJson == null ? void 0 : contentJson.type) === "doc" ? contentJson : {
|
|
8951
11471
|
type: "doc",
|
|
@@ -9017,7 +11537,7 @@ function Editor13(props) {
|
|
|
9017
11537
|
/* @__PURE__ */ jsx60(EditorContent, { editor }),
|
|
9018
11538
|
/* @__PURE__ */ jsx60(SectionBubbleMenu, { editor, appendTo: menuContainerRef }),
|
|
9019
11539
|
/* @__PURE__ */ jsx60(ColumnsBubbleMenu, { editor, appendTo: menuContainerRef }),
|
|
9020
|
-
/* @__PURE__ */ jsx60(ContentMenu, { editor }),
|
|
11540
|
+
!hideContextMenu && /* @__PURE__ */ jsx60(ContentMenu, { editor }),
|
|
9021
11541
|
/* @__PURE__ */ jsx60(VariableBubbleMenu, { editor, appendTo: menuContainerRef }),
|
|
9022
11542
|
/* @__PURE__ */ jsx60(RepeatBubbleMenu, { editor, appendTo: menuContainerRef }),
|
|
9023
11543
|
/* @__PURE__ */ jsx60(HTMLBubbleMenu, { editor, appendTo: menuContainerRef }),
|