UNPKG

reactjs-tiptap-editor

Version:

A modern WYSIWYG rich text editor based on tiptap and shadcn ui for React

1,867 lines (1,866 loc) 156 kB
import { jsxs as C, jsx as n, Fragment as Y } from "react/jsx-runtime"; import * as U from "react"; import Q, { useState as L, useMemo as B, useCallback as ce, useEffect as ze, useRef as xe } from "react"; import { Slot as st } from "@radix-ui/react-slot"; import { y as jt, b as Pt, S as _t } from "./index-BG0kQamI.js"; import "./theme.js"; import * as F from "@radix-ui/react-dialog"; import { NotebookPen as Ut, ExternalLink as Bt, X as lt, Loader2 as $t, WrapText as Ft, PencilRuler as Wt, FlipHorizontal as Gt, FlipVertical as Xt, CropIcon as Yt, ChevronUp as qt, Paperclip as Zt, Eye as Kt, Settings as Jt, ZoomOut as Qt, ZoomIn as er, BookMarked as tr, Sigma as rr, SmilePlusIcon as ir, Replace as Ye, SmilePlus as nr, Frame as or, Columns2 as qe, PanelRight as ar, PanelLeft as sr, Clipboard as lr, Copy as cr, GripVertical as dr, Plus as ur, Columns4 as hr, Columns3 as fr, Heading6 as mr, Heading5 as gr, Heading4 as pr, Heading3 as xr, Heading2 as br, Heading1 as vr, Pilcrow as wr, ChevronsUpDown as yr, Trash as Cr, Trash2 as kr, TableCellsSplit as Mr, TableCellsMerge as zr, BetweenVerticalEnd as Tr, BetweenVerticalStart as Ir, BetweenHorizonalStart as Sr, BetweenHorizonalEnd as Nr, Unlink as Ar, Pencil as Lr, Sparkles as Er, Table as Rr, Minimize as Vr, Maximize as Dr, Video as Hr, ImageUp as Or, Link as jr, ListTodo as Pr, ListOrdered as _r, List as Ur, IndentDecrease as Br, IndentIncrease as $r, Type as Fr, CodeXml as Wr, Code as Gr, Superscript as Xr, Subscript as Yr, ChevronDown as qr, Undo2 as Zr, Redo2 as Kr, PaintRoller as Jr, Eraser as Qr, Minus as ei, Strikethrough as ti, Quote as ri, Underline as ii, Italic as ni, LoaderCircle as oi, Bold as ai, Check as si } from "lucide-react"; import { j as ct, N as dt, n as li, aa as ci, m as ut, h as di, a3 as ui, ab as hi, k as fi } from "./clsx-DaPvp9ji.js"; import { I as Ze, i as Ke, j as mi, u as ne, V as gi } from "./index-C07N8gA1.js"; import * as re from "@radix-ui/react-tabs"; import * as be from "@radix-ui/react-tooltip"; import * as ht from "@radix-ui/react-toggle"; import { TextAlignRightIcon as pi, TextAlignLeftIcon as xi, TextAlignJustifyIcon as bi, TextAlignCenterIcon as vi } from "@radix-ui/react-icons"; import wi from "react-image-crop"; import * as Oe from "@radix-ui/react-checkbox"; import * as ft from "@radix-ui/react-label"; const _e = "-", yi = (e) => { const t = ki(e), { conflictingClassGroups: r, conflictingClassGroupModifiers: i } = e; return { getClassGroupId: (l) => { const s = l.split(_e); return s[0] === "" && s.length !== 1 && s.shift(), mt(s, t) || Ci(l); }, getConflictingClassGroupIds: (l, s) => { const c = r[l] || []; return s && i[l] ? [...c, ...i[l]] : c; } }; }, mt = (e, t) => { var l; if (e.length === 0) return t.classGroupId; const r = e[0], i = t.nextPart.get(r), o = i ? mt(e.slice(1), i) : void 0; if (o) return o; if (t.validators.length === 0) return; const a = e.join(_e); return (l = t.validators.find(({ validator: s }) => s(a))) == null ? void 0 : l.classGroupId; }, Je = /^\[(.+)\]$/, Ci = (e) => { if (Je.test(e)) { const t = Je.exec(e)[1], r = t == null ? void 0 : t.substring(0, t.indexOf(":")); if (r) return "arbitrary.." + r; } }, ki = (e) => { const { theme: t, prefix: r } = e, i = { nextPart: /* @__PURE__ */ new Map(), validators: [] }; return zi(Object.entries(e.classGroups), r).forEach(([a, l]) => { je(l, i, a, t); }), i; }, je = (e, t, r, i) => { e.forEach((o) => { if (typeof o == "string") { const a = o === "" ? t : Qe(t, o); a.classGroupId = r; return; } if (typeof o == "function") { if (Mi(o)) { je(o(i), t, r, i); return; } t.validators.push({ validator: o, classGroupId: r }); return; } Object.entries(o).forEach(([a, l]) => { je(l, Qe(t, a), r, i); }); }); }, Qe = (e, t) => { let r = e; return t.split(_e).forEach((i) => { r.nextPart.has(i) || r.nextPart.set(i, { nextPart: /* @__PURE__ */ new Map(), validators: [] }), r = r.nextPart.get(i); }), r; }, Mi = (e) => e.isThemeGetter, zi = (e, t) => t ? e.map(([r, i]) => { const o = i.map((a) => typeof a == "string" ? t + a : typeof a == "object" ? Object.fromEntries(Object.entries(a).map(([l, s]) => [t + l, s])) : a); return [r, o]; }) : e, Ti = (e) => { if (e < 1) return { get: () => { }, set: () => { } }; let t = 0, r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(); const o = (a, l) => { r.set(a, l), t++, t > e && (t = 0, i = r, r = /* @__PURE__ */ new Map()); }; return { get(a) { let l = r.get(a); if (l !== void 0) return l; if ((l = i.get(a)) !== void 0) return o(a, l), l; }, set(a, l) { r.has(a) ? r.set(a, l) : o(a, l); } }; }, gt = "!", Ii = (e) => { const { separator: t, experimentalParseClassName: r } = e, i = t.length === 1, o = t[0], a = t.length, l = (s) => { const c = []; let d = 0, g = 0, p; for (let f = 0; f < s.length; f++) { let x = s[f]; if (d === 0) { if (x === o && (i || s.slice(f, f + a) === t)) { c.push(s.slice(g, f)), g = f + a; continue; } if (x === "/") { p = f; continue; } } x === "[" ? d++ : x === "]" && d--; } const u = c.length === 0 ? s : s.substring(g), k = u.startsWith(gt), b = k ? u.substring(1) : u, z = p && p > g ? p - g : void 0; return { modifiers: c, hasImportantModifier: k, baseClassName: b, maybePostfixModifierPosition: z }; }; return r ? (s) => r({ className: s, parseClassName: l }) : l; }, Si = (e) => { if (e.length <= 1) return e; const t = []; let r = []; return e.forEach((i) => { i[0] === "[" ? (t.push(...r.sort(), i), r = []) : r.push(i); }), t.push(...r.sort()), t; }, Ni = (e) => ({ cache: Ti(e.cacheSize), parseClassName: Ii(e), ...yi(e) }), Ai = /\s+/, Li = (e, t) => { const { parseClassName: r, getClassGroupId: i, getConflictingClassGroupIds: o } = t, a = [], l = e.trim().split(Ai); let s = ""; for (let c = l.length - 1; c >= 0; c -= 1) { const d = l[c], { modifiers: g, hasImportantModifier: p, baseClassName: u, maybePostfixModifierPosition: k } = r(d); let b = !!k, z = i(b ? u.substring(0, k) : u); if (!z) { if (!b) { s = d + (s.length > 0 ? " " + s : s); continue; } if (z = i(u), !z) { s = d + (s.length > 0 ? " " + s : s); continue; } b = !1; } const f = Si(g).join(":"), x = p ? f + gt : f, h = x + z; if (a.includes(h)) continue; a.push(h); const S = o(z, b); for (let m = 0; m < S.length; ++m) { const D = S[m]; a.push(x + D); } s = d + (s.length > 0 ? " " + s : s); } return s; }; function Ei() { let e = 0, t, r, i = ""; for (; e < arguments.length; ) (t = arguments[e++]) && (r = pt(t)) && (i && (i += " "), i += r); return i; } const pt = (e) => { if (typeof e == "string") return e; let t, r = ""; for (let i = 0; i < e.length; i++) e[i] && (t = pt(e[i])) && (r && (r += " "), r += t); return r; }; function Ri(e, ...t) { let r, i, o, a = l; function l(c) { const d = t.reduce((g, p) => p(g), e()); return r = Ni(d), i = r.cache.get, o = r.cache.set, a = s, s(c); } function s(c) { const d = i(c); if (d) return d; const g = Li(c, r); return o(c, g), g; } return function() { return a(Ei.apply(null, arguments)); }; } const V = (e) => { const t = (r) => r[e] || []; return t.isThemeGetter = !0, t; }, xt = /^\[(?:([a-z-]+):)?(.+)\]$/i, Vi = /^\d+\/\d+$/, Di = /* @__PURE__ */ new Set(["px", "full", "screen"]), Hi = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Oi = /\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$/, ji = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Pi = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, _i = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, X = (e) => ie(e) || Di.has(e) || Vi.test(e), K = (e) => oe(e, "length", Yi), ie = (e) => !!e && !Number.isNaN(Number(e)), Le = (e) => oe(e, "number", ie), de = (e) => !!e && Number.isInteger(Number(e)), Ui = (e) => e.endsWith("%") && ie(e.slice(0, -1)), T = (e) => xt.test(e), J = (e) => Hi.test(e), Bi = /* @__PURE__ */ new Set(["length", "size", "percentage"]), $i = (e) => oe(e, Bi, bt), Fi = (e) => oe(e, "position", bt), Wi = /* @__PURE__ */ new Set(["image", "url"]), Gi = (e) => oe(e, Wi, Zi), Xi = (e) => oe(e, "", qi), ue = () => !0, oe = (e, t, r) => { const i = xt.exec(e); return i ? i[1] ? typeof t == "string" ? i[1] === t : t.has(i[1]) : r(i[2]) : !1; }, Yi = (e) => ( // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths. // For example, `hsl(0 0% 0%)` would be classified as a length without this check. // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough. Oi.test(e) && !ji.test(e) ), bt = () => !1, qi = (e) => Pi.test(e), Zi = (e) => _i.test(e), Ki = () => { const e = V("colors"), t = V("spacing"), r = V("blur"), i = V("brightness"), o = V("borderColor"), a = V("borderRadius"), l = V("borderSpacing"), s = V("borderWidth"), c = V("contrast"), d = V("grayscale"), g = V("hueRotate"), p = V("invert"), u = V("gap"), k = V("gradientColorStops"), b = V("gradientColorStopPositions"), z = V("inset"), f = V("margin"), x = V("opacity"), h = V("padding"), S = V("saturate"), m = V("scale"), D = V("sepia"), v = V("skew"), R = V("space"), N = V("translate"), j = () => ["auto", "contain", "none"], H = () => ["auto", "hidden", "clip", "visible", "scroll"], M = () => ["auto", T, t], w = () => [T, t], y = () => ["", X, K], I = () => ["auto", ie, T], E = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], A = () => ["solid", "dashed", "dotted", "double", "none"], P = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], O = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], G = () => ["", "0", T], ye = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], W = () => [ie, T]; return { cacheSize: 500, separator: ":", theme: { colors: [ue], spacing: [X, K], blur: ["none", "", J, T], brightness: W(), borderColor: [e], borderRadius: ["none", "", "full", J, T], borderSpacing: w(), borderWidth: y(), contrast: W(), grayscale: G(), hueRotate: W(), invert: G(), gap: w(), gradientColorStops: [e], gradientColorStopPositions: [Ui, K], inset: M(), margin: M(), opacity: W(), padding: w(), saturate: W(), scale: W(), sepia: G(), skew: W(), space: w(), translate: w() }, classGroups: { // Layout /** * Aspect Ratio * @see https://tailwindcss.com/docs/aspect-ratio */ aspect: [{ aspect: ["auto", "square", "video", T] }], /** * Container * @see https://tailwindcss.com/docs/container */ container: ["container"], /** * Columns * @see https://tailwindcss.com/docs/columns */ columns: [{ columns: [J] }], /** * Break After * @see https://tailwindcss.com/docs/break-after */ "break-after": [{ "break-after": ye() }], /** * Break Before * @see https://tailwindcss.com/docs/break-before */ "break-before": [{ "break-before": ye() }], /** * Break Inside * @see https://tailwindcss.com/docs/break-inside */ "break-inside": [{ "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"] }], /** * Box Decoration Break * @see https://tailwindcss.com/docs/box-decoration-break */ "box-decoration": [{ "box-decoration": ["slice", "clone"] }], /** * Box Sizing * @see https://tailwindcss.com/docs/box-sizing */ box: [{ box: ["border", "content"] }], /** * Display * @see https://tailwindcss.com/docs/display */ 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"], /** * Floats * @see https://tailwindcss.com/docs/float */ float: [{ float: ["right", "left", "none", "start", "end"] }], /** * Clear * @see https://tailwindcss.com/docs/clear */ clear: [{ clear: ["left", "right", "both", "none", "start", "end"] }], /** * Isolation * @see https://tailwindcss.com/docs/isolation */ isolation: ["isolate", "isolation-auto"], /** * Object Fit * @see https://tailwindcss.com/docs/object-fit */ "object-fit": [{ object: ["contain", "cover", "fill", "none", "scale-down"] }], /** * Object Position * @see https://tailwindcss.com/docs/object-position */ "object-position": [{ object: [...E(), T] }], /** * Overflow * @see https://tailwindcss.com/docs/overflow */ overflow: [{ overflow: H() }], /** * Overflow X * @see https://tailwindcss.com/docs/overflow */ "overflow-x": [{ "overflow-x": H() }], /** * Overflow Y * @see https://tailwindcss.com/docs/overflow */ "overflow-y": [{ "overflow-y": H() }], /** * Overscroll Behavior * @see https://tailwindcss.com/docs/overscroll-behavior */ overscroll: [{ overscroll: j() }], /** * Overscroll Behavior X * @see https://tailwindcss.com/docs/overscroll-behavior */ "overscroll-x": [{ "overscroll-x": j() }], /** * Overscroll Behavior Y * @see https://tailwindcss.com/docs/overscroll-behavior */ "overscroll-y": [{ "overscroll-y": j() }], /** * Position * @see https://tailwindcss.com/docs/position */ position: ["static", "fixed", "absolute", "relative", "sticky"], /** * Top / Right / Bottom / Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ inset: [{ inset: [z] }], /** * Right / Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ "inset-x": [{ "inset-x": [z] }], /** * Top / Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ "inset-y": [{ "inset-y": [z] }], /** * Start * @see https://tailwindcss.com/docs/top-right-bottom-left */ start: [{ start: [z] }], /** * End * @see https://tailwindcss.com/docs/top-right-bottom-left */ end: [{ end: [z] }], /** * Top * @see https://tailwindcss.com/docs/top-right-bottom-left */ top: [{ top: [z] }], /** * Right * @see https://tailwindcss.com/docs/top-right-bottom-left */ right: [{ right: [z] }], /** * Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ bottom: [{ bottom: [z] }], /** * Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ left: [{ left: [z] }], /** * Visibility * @see https://tailwindcss.com/docs/visibility */ visibility: ["visible", "invisible", "collapse"], /** * Z-Index * @see https://tailwindcss.com/docs/z-index */ z: [{ z: ["auto", de, T] }], // Flexbox and Grid /** * Flex Basis * @see https://tailwindcss.com/docs/flex-basis */ basis: [{ basis: M() }], /** * Flex Direction * @see https://tailwindcss.com/docs/flex-direction */ "flex-direction": [{ flex: ["row", "row-reverse", "col", "col-reverse"] }], /** * Flex Wrap * @see https://tailwindcss.com/docs/flex-wrap */ "flex-wrap": [{ flex: ["wrap", "wrap-reverse", "nowrap"] }], /** * Flex * @see https://tailwindcss.com/docs/flex */ flex: [{ flex: ["1", "auto", "initial", "none", T] }], /** * Flex Grow * @see https://tailwindcss.com/docs/flex-grow */ grow: [{ grow: G() }], /** * Flex Shrink * @see https://tailwindcss.com/docs/flex-shrink */ shrink: [{ shrink: G() }], /** * Order * @see https://tailwindcss.com/docs/order */ order: [{ order: ["first", "last", "none", de, T] }], /** * Grid Template Columns * @see https://tailwindcss.com/docs/grid-template-columns */ "grid-cols": [{ "grid-cols": [ue] }], /** * Grid Column Start / End * @see https://tailwindcss.com/docs/grid-column */ "col-start-end": [{ col: ["auto", { span: ["full", de, T] }, T] }], /** * Grid Column Start * @see https://tailwindcss.com/docs/grid-column */ "col-start": [{ "col-start": I() }], /** * Grid Column End * @see https://tailwindcss.com/docs/grid-column */ "col-end": [{ "col-end": I() }], /** * Grid Template Rows * @see https://tailwindcss.com/docs/grid-template-rows */ "grid-rows": [{ "grid-rows": [ue] }], /** * Grid Row Start / End * @see https://tailwindcss.com/docs/grid-row */ "row-start-end": [{ row: ["auto", { span: [de, T] }, T] }], /** * Grid Row Start * @see https://tailwindcss.com/docs/grid-row */ "row-start": [{ "row-start": I() }], /** * Grid Row End * @see https://tailwindcss.com/docs/grid-row */ "row-end": [{ "row-end": I() }], /** * Grid Auto Flow * @see https://tailwindcss.com/docs/grid-auto-flow */ "grid-flow": [{ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"] }], /** * Grid Auto Columns * @see https://tailwindcss.com/docs/grid-auto-columns */ "auto-cols": [{ "auto-cols": ["auto", "min", "max", "fr", T] }], /** * Grid Auto Rows * @see https://tailwindcss.com/docs/grid-auto-rows */ "auto-rows": [{ "auto-rows": ["auto", "min", "max", "fr", T] }], /** * Gap * @see https://tailwindcss.com/docs/gap */ gap: [{ gap: [u] }], /** * Gap X * @see https://tailwindcss.com/docs/gap */ "gap-x": [{ "gap-x": [u] }], /** * Gap Y * @see https://tailwindcss.com/docs/gap */ "gap-y": [{ "gap-y": [u] }], /** * Justify Content * @see https://tailwindcss.com/docs/justify-content */ "justify-content": [{ justify: ["normal", ...O()] }], /** * Justify Items * @see https://tailwindcss.com/docs/justify-items */ "justify-items": [{ "justify-items": ["start", "end", "center", "stretch"] }], /** * Justify Self * @see https://tailwindcss.com/docs/justify-self */ "justify-self": [{ "justify-self": ["auto", "start", "end", "center", "stretch"] }], /** * Align Content * @see https://tailwindcss.com/docs/align-content */ "align-content": [{ content: ["normal", ...O(), "baseline"] }], /** * Align Items * @see https://tailwindcss.com/docs/align-items */ "align-items": [{ items: ["start", "end", "center", "baseline", "stretch"] }], /** * Align Self * @see https://tailwindcss.com/docs/align-self */ "align-self": [{ self: ["auto", "start", "end", "center", "stretch", "baseline"] }], /** * Place Content * @see https://tailwindcss.com/docs/place-content */ "place-content": [{ "place-content": [...O(), "baseline"] }], /** * Place Items * @see https://tailwindcss.com/docs/place-items */ "place-items": [{ "place-items": ["start", "end", "center", "baseline", "stretch"] }], /** * Place Self * @see https://tailwindcss.com/docs/place-self */ "place-self": [{ "place-self": ["auto", "start", "end", "center", "stretch"] }], // Spacing /** * Padding * @see https://tailwindcss.com/docs/padding */ p: [{ p: [h] }], /** * Padding X * @see https://tailwindcss.com/docs/padding */ px: [{ px: [h] }], /** * Padding Y * @see https://tailwindcss.com/docs/padding */ py: [{ py: [h] }], /** * Padding Start * @see https://tailwindcss.com/docs/padding */ ps: [{ ps: [h] }], /** * Padding End * @see https://tailwindcss.com/docs/padding */ pe: [{ pe: [h] }], /** * Padding Top * @see https://tailwindcss.com/docs/padding */ pt: [{ pt: [h] }], /** * Padding Right * @see https://tailwindcss.com/docs/padding */ pr: [{ pr: [h] }], /** * Padding Bottom * @see https://tailwindcss.com/docs/padding */ pb: [{ pb: [h] }], /** * Padding Left * @see https://tailwindcss.com/docs/padding */ pl: [{ pl: [h] }], /** * Margin * @see https://tailwindcss.com/docs/margin */ m: [{ m: [f] }], /** * Margin X * @see https://tailwindcss.com/docs/margin */ mx: [{ mx: [f] }], /** * Margin Y * @see https://tailwindcss.com/docs/margin */ my: [{ my: [f] }], /** * Margin Start * @see https://tailwindcss.com/docs/margin */ ms: [{ ms: [f] }], /** * Margin End * @see https://tailwindcss.com/docs/margin */ me: [{ me: [f] }], /** * Margin Top * @see https://tailwindcss.com/docs/margin */ mt: [{ mt: [f] }], /** * Margin Right * @see https://tailwindcss.com/docs/margin */ mr: [{ mr: [f] }], /** * Margin Bottom * @see https://tailwindcss.com/docs/margin */ mb: [{ mb: [f] }], /** * Margin Left * @see https://tailwindcss.com/docs/margin */ ml: [{ ml: [f] }], /** * Space Between X * @see https://tailwindcss.com/docs/space */ "space-x": [{ "space-x": [R] }], /** * Space Between X Reverse * @see https://tailwindcss.com/docs/space */ "space-x-reverse": ["space-x-reverse"], /** * Space Between Y * @see https://tailwindcss.com/docs/space */ "space-y": [{ "space-y": [R] }], /** * Space Between Y Reverse * @see https://tailwindcss.com/docs/space */ "space-y-reverse": ["space-y-reverse"], // Sizing /** * Width * @see https://tailwindcss.com/docs/width */ w: [{ w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", T, t] }], /** * Min-Width * @see https://tailwindcss.com/docs/min-width */ "min-w": [{ "min-w": [T, t, "min", "max", "fit"] }], /** * Max-Width * @see https://tailwindcss.com/docs/max-width */ "max-w": [{ "max-w": [T, t, "none", "full", "min", "max", "fit", "prose", { screen: [J] }, J] }], /** * Height * @see https://tailwindcss.com/docs/height */ h: [{ h: [T, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Min-Height * @see https://tailwindcss.com/docs/min-height */ "min-h": [{ "min-h": [T, t, "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Max-Height * @see https://tailwindcss.com/docs/max-height */ "max-h": [{ "max-h": [T, t, "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Size * @see https://tailwindcss.com/docs/size */ size: [{ size: [T, t, "auto", "min", "max", "fit"] }], // Typography /** * Font Size * @see https://tailwindcss.com/docs/font-size */ "font-size": [{ text: ["base", J, K] }], /** * Font Smoothing * @see https://tailwindcss.com/docs/font-smoothing */ "font-smoothing": ["antialiased", "subpixel-antialiased"], /** * Font Style * @see https://tailwindcss.com/docs/font-style */ "font-style": ["italic", "not-italic"], /** * Font Weight * @see https://tailwindcss.com/docs/font-weight */ "font-weight": [{ font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", Le] }], /** * Font Family * @see https://tailwindcss.com/docs/font-family */ "font-family": [{ font: [ue] }], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-normal": ["normal-nums"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-ordinal": ["ordinal"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-slashed-zero": ["slashed-zero"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-figure": ["lining-nums", "oldstyle-nums"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-spacing": ["proportional-nums", "tabular-nums"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-fraction": ["diagonal-fractions", "stacked-fractions"], /** * Letter Spacing * @see https://tailwindcss.com/docs/letter-spacing */ tracking: [{ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", T] }], /** * Line Clamp * @see https://tailwindcss.com/docs/line-clamp */ "line-clamp": [{ "line-clamp": ["none", ie, Le] }], /** * Line Height * @see https://tailwindcss.com/docs/line-height */ leading: [{ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", X, T] }], /** * List Style Image * @see https://tailwindcss.com/docs/list-style-image */ "list-image": [{ "list-image": ["none", T] }], /** * List Style Type * @see https://tailwindcss.com/docs/list-style-type */ "list-style-type": [{ list: ["none", "disc", "decimal", T] }], /** * List Style Position * @see https://tailwindcss.com/docs/list-style-position */ "list-style-position": [{ list: ["inside", "outside"] }], /** * Placeholder Color * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/placeholder-color */ "placeholder-color": [{ placeholder: [e] }], /** * Placeholder Opacity * @see https://tailwindcss.com/docs/placeholder-opacity */ "placeholder-opacity": [{ "placeholder-opacity": [x] }], /** * Text Alignment * @see https://tailwindcss.com/docs/text-align */ "text-alignment": [{ text: ["left", "center", "right", "justify", "start", "end"] }], /** * Text Color * @see https://tailwindcss.com/docs/text-color */ "text-color": [{ text: [e] }], /** * Text Opacity * @see https://tailwindcss.com/docs/text-opacity */ "text-opacity": [{ "text-opacity": [x] }], /** * Text Decoration * @see https://tailwindcss.com/docs/text-decoration */ "text-decoration": ["underline", "overline", "line-through", "no-underline"], /** * Text Decoration Style * @see https://tailwindcss.com/docs/text-decoration-style */ "text-decoration-style": [{ decoration: [...A(), "wavy"] }], /** * Text Decoration Thickness * @see https://tailwindcss.com/docs/text-decoration-thickness */ "text-decoration-thickness": [{ decoration: ["auto", "from-font", X, K] }], /** * Text Underline Offset * @see https://tailwindcss.com/docs/text-underline-offset */ "underline-offset": [{ "underline-offset": ["auto", X, T] }], /** * Text Decoration Color * @see https://tailwindcss.com/docs/text-decoration-color */ "text-decoration-color": [{ decoration: [e] }], /** * Text Transform * @see https://tailwindcss.com/docs/text-transform */ "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"], /** * Text Overflow * @see https://tailwindcss.com/docs/text-overflow */ "text-overflow": ["truncate", "text-ellipsis", "text-clip"], /** * Text Wrap * @see https://tailwindcss.com/docs/text-wrap */ "text-wrap": [{ text: ["wrap", "nowrap", "balance", "pretty"] }], /** * Text Indent * @see https://tailwindcss.com/docs/text-indent */ indent: [{ indent: w() }], /** * Vertical Alignment * @see https://tailwindcss.com/docs/vertical-align */ "vertical-align": [{ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", T] }], /** * Whitespace * @see https://tailwindcss.com/docs/whitespace */ whitespace: [{ whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"] }], /** * Word Break * @see https://tailwindcss.com/docs/word-break */ break: [{ break: ["normal", "words", "all", "keep"] }], /** * Hyphens * @see https://tailwindcss.com/docs/hyphens */ hyphens: [{ hyphens: ["none", "manual", "auto"] }], /** * Content * @see https://tailwindcss.com/docs/content */ content: [{ content: ["none", T] }], // Backgrounds /** * Background Attachment * @see https://tailwindcss.com/docs/background-attachment */ "bg-attachment": [{ bg: ["fixed", "local", "scroll"] }], /** * Background Clip * @see https://tailwindcss.com/docs/background-clip */ "bg-clip": [{ "bg-clip": ["border", "padding", "content", "text"] }], /** * Background Opacity * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/background-opacity */ "bg-opacity": [{ "bg-opacity": [x] }], /** * Background Origin * @see https://tailwindcss.com/docs/background-origin */ "bg-origin": [{ "bg-origin": ["border", "padding", "content"] }], /** * Background Position * @see https://tailwindcss.com/docs/background-position */ "bg-position": [{ bg: [...E(), Fi] }], /** * Background Repeat * @see https://tailwindcss.com/docs/background-repeat */ "bg-repeat": [{ bg: ["no-repeat", { repeat: ["", "x", "y", "round", "space"] }] }], /** * Background Size * @see https://tailwindcss.com/docs/background-size */ "bg-size": [{ bg: ["auto", "cover", "contain", $i] }], /** * Background Image * @see https://tailwindcss.com/docs/background-image */ "bg-image": [{ bg: ["none", { "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"] }, Gi] }], /** * Background Color * @see https://tailwindcss.com/docs/background-color */ "bg-color": [{ bg: [e] }], /** * Gradient Color Stops From Position * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-from-pos": [{ from: [b] }], /** * Gradient Color Stops Via Position * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-via-pos": [{ via: [b] }], /** * Gradient Color Stops To Position * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-to-pos": [{ to: [b] }], /** * Gradient Color Stops From * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-from": [{ from: [k] }], /** * Gradient Color Stops Via * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-via": [{ via: [k] }], /** * Gradient Color Stops To * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-to": [{ to: [k] }], // Borders /** * Border Radius * @see https://tailwindcss.com/docs/border-radius */ rounded: [{ rounded: [a] }], /** * Border Radius Start * @see https://tailwindcss.com/docs/border-radius */ "rounded-s": [{ "rounded-s": [a] }], /** * Border Radius End * @see https://tailwindcss.com/docs/border-radius */ "rounded-e": [{ "rounded-e": [a] }], /** * Border Radius Top * @see https://tailwindcss.com/docs/border-radius */ "rounded-t": [{ "rounded-t": [a] }], /** * Border Radius Right * @see https://tailwindcss.com/docs/border-radius */ "rounded-r": [{ "rounded-r": [a] }], /** * Border Radius Bottom * @see https://tailwindcss.com/docs/border-radius */ "rounded-b": [{ "rounded-b": [a] }], /** * Border Radius Left * @see https://tailwindcss.com/docs/border-radius */ "rounded-l": [{ "rounded-l": [a] }], /** * Border Radius Start Start * @see https://tailwindcss.com/docs/border-radius */ "rounded-ss": [{ "rounded-ss": [a] }], /** * Border Radius Start End * @see https://tailwindcss.com/docs/border-radius */ "rounded-se": [{ "rounded-se": [a] }], /** * Border Radius End End * @see https://tailwindcss.com/docs/border-radius */ "rounded-ee": [{ "rounded-ee": [a] }], /** * Border Radius End Start * @see https://tailwindcss.com/docs/border-radius */ "rounded-es": [{ "rounded-es": [a] }], /** * Border Radius Top Left * @see https://tailwindcss.com/docs/border-radius */ "rounded-tl": [{ "rounded-tl": [a] }], /** * Border Radius Top Right * @see https://tailwindcss.com/docs/border-radius */ "rounded-tr": [{ "rounded-tr": [a] }], /** * Border Radius Bottom Right * @see https://tailwindcss.com/docs/border-radius */ "rounded-br": [{ "rounded-br": [a] }], /** * Border Radius Bottom Left * @see https://tailwindcss.com/docs/border-radius */ "rounded-bl": [{ "rounded-bl": [a] }], /** * Border Width * @see https://tailwindcss.com/docs/border-width */ "border-w": [{ border: [s] }], /** * Border Width X * @see https://tailwindcss.com/docs/border-width */ "border-w-x": [{ "border-x": [s] }], /** * Border Width Y * @see https://tailwindcss.com/docs/border-width */ "border-w-y": [{ "border-y": [s] }], /** * Border Width Start * @see https://tailwindcss.com/docs/border-width */ "border-w-s": [{ "border-s": [s] }], /** * Border Width End * @see https://tailwindcss.com/docs/border-width */ "border-w-e": [{ "border-e": [s] }], /** * Border Width Top * @see https://tailwindcss.com/docs/border-width */ "border-w-t": [{ "border-t": [s] }], /** * Border Width Right * @see https://tailwindcss.com/docs/border-width */ "border-w-r": [{ "border-r": [s] }], /** * Border Width Bottom * @see https://tailwindcss.com/docs/border-width */ "border-w-b": [{ "border-b": [s] }], /** * Border Width Left * @see https://tailwindcss.com/docs/border-width */ "border-w-l": [{ "border-l": [s] }], /** * Border Opacity * @see https://tailwindcss.com/docs/border-opacity */ "border-opacity": [{ "border-opacity": [x] }], /** * Border Style * @see https://tailwindcss.com/docs/border-style */ "border-style": [{ border: [...A(), "hidden"] }], /** * Divide Width X * @see https://tailwindcss.com/docs/divide-width */ "divide-x": [{ "divide-x": [s] }], /** * Divide Width X Reverse * @see https://tailwindcss.com/docs/divide-width */ "divide-x-reverse": ["divide-x-reverse"], /** * Divide Width Y * @see https://tailwindcss.com/docs/divide-width */ "divide-y": [{ "divide-y": [s] }], /** * Divide Width Y Reverse * @see https://tailwindcss.com/docs/divide-width */ "divide-y-reverse": ["divide-y-reverse"], /** * Divide Opacity * @see https://tailwindcss.com/docs/divide-opacity */ "divide-opacity": [{ "divide-opacity": [x] }], /** * Divide Style * @see https://tailwindcss.com/docs/divide-style */ "divide-style": [{ divide: A() }], /** * Border Color * @see https://tailwindcss.com/docs/border-color */ "border-color": [{ border: [o] }], /** * Border Color X * @see https://tailwindcss.com/docs/border-color */ "border-color-x": [{ "border-x": [o] }], /** * Border Color Y * @see https://tailwindcss.com/docs/border-color */ "border-color-y": [{ "border-y": [o] }], /** * Border Color S * @see https://tailwindcss.com/docs/border-color */ "border-color-s": [{ "border-s": [o] }], /** * Border Color E * @see https://tailwindcss.com/docs/border-color */ "border-color-e": [{ "border-e": [o] }], /** * Border Color Top * @see https://tailwindcss.com/docs/border-color */ "border-color-t": [{ "border-t": [o] }], /** * Border Color Right * @see https://tailwindcss.com/docs/border-color */ "border-color-r": [{ "border-r": [o] }], /** * Border Color Bottom * @see https://tailwindcss.com/docs/border-color */ "border-color-b": [{ "border-b": [o] }], /** * Border Color Left * @see https://tailwindcss.com/docs/border-color */ "border-color-l": [{ "border-l": [o] }], /** * Divide Color * @see https://tailwindcss.com/docs/divide-color */ "divide-color": [{ divide: [o] }], /** * Outline Style * @see https://tailwindcss.com/docs/outline-style */ "outline-style": [{ outline: ["", ...A()] }], /** * Outline Offset * @see https://tailwindcss.com/docs/outline-offset */ "outline-offset": [{ "outline-offset": [X, T] }], /** * Outline Width * @see https://tailwindcss.com/docs/outline-width */ "outline-w": [{ outline: [X, K] }], /** * Outline Color * @see https://tailwindcss.com/docs/outline-color */ "outline-color": [{ outline: [e] }], /** * Ring Width * @see https://tailwindcss.com/docs/ring-width */ "ring-w": [{ ring: y() }], /** * Ring Width Inset * @see https://tailwindcss.com/docs/ring-width */ "ring-w-inset": ["ring-inset"], /** * Ring Color * @see https://tailwindcss.com/docs/ring-color */ "ring-color": [{ ring: [e] }], /** * Ring Opacity * @see https://tailwindcss.com/docs/ring-opacity */ "ring-opacity": [{ "ring-opacity": [x] }], /** * Ring Offset Width * @see https://tailwindcss.com/docs/ring-offset-width */ "ring-offset-w": [{ "ring-offset": [X, K] }], /** * Ring Offset Color * @see https://tailwindcss.com/docs/ring-offset-color */ "ring-offset-color": [{ "ring-offset": [e] }], // Effects /** * Box Shadow * @see https://tailwindcss.com/docs/box-shadow */ shadow: [{ shadow: ["", "inner", "none", J, Xi] }], /** * Box Shadow Color * @see https://tailwindcss.com/docs/box-shadow-color */ "shadow-color": [{ shadow: [ue] }], /** * Opacity * @see https://tailwindcss.com/docs/opacity */ opacity: [{ opacity: [x] }], /** * Mix Blend Mode * @see https://tailwindcss.com/docs/mix-blend-mode */ "mix-blend": [{ "mix-blend": [...P(), "plus-lighter", "plus-darker"] }], /** * Background Blend Mode * @see https://tailwindcss.com/docs/background-blend-mode */ "bg-blend": [{ "bg-blend": P() }], // Filters /** * Filter * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/filter */ filter: [{ filter: ["", "none"] }], /** * Blur * @see https://tailwindcss.com/docs/blur */ blur: [{ blur: [r] }], /** * Brightness * @see https://tailwindcss.com/docs/brightness */ brightness: [{ brightness: [i] }], /** * Contrast * @see https://tailwindcss.com/docs/contrast */ contrast: [{ contrast: [c] }], /** * Drop Shadow * @see https://tailwindcss.com/docs/drop-shadow */ "drop-shadow": [{ "drop-shadow": ["", "none", J, T] }], /** * Grayscale * @see https://tailwindcss.com/docs/grayscale */ grayscale: [{ grayscale: [d] }], /** * Hue Rotate * @see https://tailwindcss.com/docs/hue-rotate */ "hue-rotate": [{ "hue-rotate": [g] }], /** * Invert * @see https://tailwindcss.com/docs/invert */ invert: [{ invert: [p] }], /** * Saturate * @see https://tailwindcss.com/docs/saturate */ saturate: [{ saturate: [S] }], /** * Sepia * @see https://tailwindcss.com/docs/sepia */ sepia: [{ sepia: [D] }], /** * Backdrop Filter * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/backdrop-filter */ "backdrop-filter": [{ "backdrop-filter": ["", "none"] }], /** * Backdrop Blur * @see https://tailwindcss.com/docs/backdrop-blur */ "backdrop-blur": [{ "backdrop-blur": [r] }], /** * Backdrop Brightness * @see https://tailwindcss.com/docs/backdrop-brightness */ "backdrop-brightness": [{ "backdrop-brightness": [i] }], /** * Backdrop Contrast * @see https://tailwindcss.com/docs/backdrop-contrast */ "backdrop-contrast": [{ "backdrop-contrast": [c] }], /** * Backdrop Grayscale * @see https://tailwindcss.com/docs/backdrop-grayscale */ "backdrop-grayscale": [{ "backdrop-grayscale": [d] }], /** * Backdrop Hue Rotate * @see https://tailwindcss.com/docs/backdrop-hue-rotate */ "backdrop-hue-rotate": [{ "backdrop-hue-rotate": [g] }], /** * Backdrop Invert * @see https://tailwindcss.com/docs/backdrop-invert */ "backdrop-invert": [{ "backdrop-invert": [p] }], /** * Backdrop Opacity * @see https://tailwindcss.com/docs/backdrop-opacity */ "backdrop-opacity": [{ "backdrop-opacity": [x] }], /** * Backdrop Saturate * @see https://tailwindcss.com/docs/backdrop-saturate */ "backdrop-saturate": [{ "backdrop-saturate": [S] }], /** * Backdrop Sepia * @see https://tailwindcss.com/docs/backdrop-sepia */ "backdrop-sepia": [{ "backdrop-sepia": [D] }], // Tables /** * Border Collapse * @see https://tailwindcss.com/docs/border-collapse */ "border-collapse": [{ border: ["collapse", "separate"] }], /** * Border Spacing * @see https://tailwindcss.com/docs/border-spacing */ "border-spacing": [{ "border-spacing": [l] }], /** * Border Spacing X * @see https://tailwindcss.com/docs/border-spacing */ "border-spacing-x": [{ "border-spacing-x": [l] }], /** * Border Spacing Y * @see https://tailwindcss.com/docs/border-spacing */ "border-spacing-y": [{ "border-spacing-y": [l] }], /** * Table Layout * @see https://tailwindcss.com/docs/table-layout */ "table-layout": [{ table: ["auto", "fixed"] }], /** * Caption Side * @see https://tailwindcss.com/docs/caption-side */ caption: [{ caption: ["top", "bottom"] }], // Transitions and Animation /** * Tranisition Property * @see https://tailwindcss.com/docs/transition-property */ transition: [{ transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", T] }], /** * Transition Duration * @see https://tailwindcss.com/docs/transition-duration */ duration: [{ duration: W() }], /** * Transition Timing Function * @see https://tailwindcss.com/docs/transition-timing-function */ ease: [{ ease: ["linear", "in", "out", "in-out", T] }], /** * Transition Delay * @see https://tailwindcss.com/docs/transition-delay */ delay: [{ delay: W() }], /** * Animation