UNPKG

based-auth

Version:

A Next.js/Node.js authentication and wallet API kit for Ethereum and Solana, with utilities for serialization and contract interaction, designed for serverless and API route usage.

1,765 lines 149 kB
import * as D from "react"; import Yt, { createContext as Jt, useContext as wt, useState as ue, useRef as ze, useMemo as Qe, useEffect as I } from "react"; import { WalletAdapterNetwork as Ke, WalletReadyState as Be } from "@solana/wallet-adapter-base"; import { WalletProvider as Qt, useWallet as Xt } from "@solana/wallet-adapter-react"; import { WalletConnectWalletAdapter as Zt, CoinbaseWalletAdapter as en, PhantomWalletAdapter as tn, SafePalWalletAdapter as nn, SolflareWalletAdapter as on, TrustWalletAdapter as rn } from "@solana/wallet-adapter-wallets"; import { walletConnect as sn, coinbaseWallet as an, safe as cn } from "@wagmi/connectors"; import { createConfig as ln, createStorage as dn, injected as un, http as wn, cookieStorage as bn, getClient as fn, signMessage as bt, signTypedData as mn, disconnect as kn, writeContract as pn, getConnectors as gn, connect as hn, switchChain as xn } from "@wagmi/core"; import { N as C, M as Oe, j as yn, m as vn, b as Cn, T as Xe, H as ft, n as jn, u as Nn, c as Sn, e as En, r as An } from "./index-ChpwqF0V.mjs"; import { X as Rn, RotateCcw as Ae, CheckIcon as Tn, CopyIcon as In, QrCodeIcon as Pn, ChevronLeft as Wn } from "lucide-react"; import * as Y from "@radix-ui/react-dialog"; import { Drawer as J } from "vaul"; import * as we from "@radix-ui/react-scroll-area"; import { useQuery as $e, useMutation as G, useQueryClient as zn, QueryClientProvider as On } from "@tanstack/react-query"; import { JsonRpcProvider as be, FallbackProvider as Re, Contract as Ve, formatUnits as qe, parseUnits as Ze } from "ethers"; import { erc20Abi as mt } from "viem"; import { toast as fe } from "sonner"; import { Connection as Te, PublicKey as de, Keypair as Ue, TransactionMessage as kt, VersionedTransaction as pt, ComputeBudgetProgram as Ie, AddressLookupTableProgram as et, Transaction as Mn, clusterApiUrl as _n } from "@solana/web3.js"; import * as Me from "@coral-xyz/anchor"; import { i as Dn, g as $n } from "./get-user-profile-BApNPXZg.mjs"; import { useSession as Fn, signOut as _e, getProviders as Bn, signIn as gt } from "next-auth/react"; import { s as De, d as We } from "./serialize-QLwKYaJT.mjs"; import { motion as U } from "framer-motion"; import { QRCodeSVG as Ln } from "qrcode.react"; import { Slot as Kn } from "@radix-ui/react-slot"; import { chainSol as qn, chainSolDevnet as Un, isMainnet as Gn, AllChains as Vn } from "./chains.js"; var Pe = { exports: {} }, je = {}; /** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var tt; function Hn() { if (tt) return je; tt = 1; var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment"); function n(o, r, i) { var c = null; if (i !== void 0 && (c = "" + i), r.key !== void 0 && (c = "" + r.key), "key" in r) { i = {}; for (var a in r) a !== "key" && (i[a] = r[a]); } else i = r; return r = i.ref, { $$typeof: e, type: o, key: c, ref: r !== void 0 ? r : null, props: i }; } return je.Fragment = t, je.jsx = n, je.jsxs = n, je; } var Ne = {}; /** * @license React * react-jsx-runtime.development.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var nt; function Yn() { return nt || (nt = 1, process.env.NODE_ENV !== "production" && function() { function e(w) { if (w == null) return null; if (typeof w == "function") return w.$$typeof === K ? null : w.displayName || w.name || null; if (typeof w == "string") return w; switch (w) { case y: return "Fragment"; case m: return "Profiler"; case k: return "StrictMode"; case F: return "Suspense"; case B: return "SuspenseList"; case X: return "Activity"; } if (typeof w == "object") switch (typeof w.tag == "number" && console.error( "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." ), w.$$typeof) { case p: return "Portal"; case W: return (w.displayName || "Context") + ".Provider"; case v: return (w._context.displayName || "Context") + ".Consumer"; case z: var g = w.render; return w = w.displayName, w || (w = g.displayName || g.name || "", w = w !== "" ? "ForwardRef(" + w + ")" : "ForwardRef"), w; case ne: return g = w.displayName || null, g !== null ? g : e(w.type) || "Memo"; case L: g = w._payload, w = w._init; try { return e(w(g)); } catch { } } return null; } function t(w) { return "" + w; } function n(w) { try { t(w); var g = !1; } catch { g = !0; } if (g) { g = console; var A = g.error, P = typeof Symbol == "function" && Symbol.toStringTag && w[Symbol.toStringTag] || w.constructor.name || "Object"; return A.call( g, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", P ), t(w); } } function o(w) { if (w === y) return "<>"; if (typeof w == "object" && w !== null && w.$$typeof === L) return "<...>"; try { var g = e(w); return g ? "<" + g + ">" : "<...>"; } catch { return "<...>"; } } function r() { var w = $.A; return w === null ? null : w.getOwner(); } function i() { return Error("react-stack-top-frame"); } function c(w) { if (N.call(w, "key")) { var g = Object.getOwnPropertyDescriptor(w, "key").get; if (g && g.isReactWarning) return !1; } return w.key !== void 0; } function a(w, g) { function A() { ae || (ae = !0, console.error( "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", g )); } A.isReactWarning = !0, Object.defineProperty(w, "key", { get: A, configurable: !0 }); } function d() { var w = e(this.type); return V[w] || (V[w] = !0, console.error( "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release." )), w = this.props.ref, w !== void 0 ? w : null; } function l(w, g, A, P, te, H, q, Ce) { return A = H.ref, w = { $$typeof: x, type: w, key: g, props: H, _owner: te }, (A !== void 0 ? A : null) !== null ? Object.defineProperty(w, "ref", { enumerable: !1, get: d }) : Object.defineProperty(w, "ref", { enumerable: !1, value: null }), w._store = {}, Object.defineProperty(w._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: 0 }), Object.defineProperty(w, "_debugInfo", { configurable: !1, enumerable: !1, writable: !0, value: null }), Object.defineProperty(w, "_debugStack", { configurable: !1, enumerable: !1, writable: !0, value: q }), Object.defineProperty(w, "_debugTask", { configurable: !1, enumerable: !1, writable: !0, value: Ce }), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w; } function u(w, g, A, P, te, H, q, Ce) { var M = g.children; if (M !== void 0) if (P) if (_(M)) { for (P = 0; P < M.length; P++) b(M[P]); Object.freeze && Object.freeze(M); } else console.error( "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead." ); else b(M); if (N.call(g, "key")) { M = e(w); var ke = Object.keys(g).filter(function(Ht) { return Ht !== "key"; }); P = 0 < ke.length ? "{key: someKey, " + ke.join(": ..., ") + ": ...}" : "{key: someKey}", ee[M + P] || (ke = 0 < ke.length ? "{" + ke.join(": ..., ") + ": ...}" : "{}", console.error( `A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`, P, M, ke, M ), ee[M + P] = !0); } if (M = null, A !== void 0 && (n(A), M = "" + A), c(g) && (n(g.key), M = "" + g.key), "key" in g) { A = {}; for (var Fe in g) Fe !== "key" && (A[Fe] = g[Fe]); } else A = g; return M && a( A, typeof w == "function" ? w.displayName || w.name || "Unknown" : w ), l( w, M, H, te, r(), A, q, Ce ); } function b(w) { typeof w == "object" && w !== null && w.$$typeof === x && w._store && (w._store.validated = 1); } var f = Yt, x = Symbol.for("react.transitional.element"), p = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), m = Symbol.for("react.profiler"), v = Symbol.for("react.consumer"), W = Symbol.for("react.context"), z = Symbol.for("react.forward_ref"), F = Symbol.for("react.suspense"), B = Symbol.for("react.suspense_list"), ne = Symbol.for("react.memo"), L = Symbol.for("react.lazy"), X = Symbol.for("react.activity"), K = Symbol.for("react.client.reference"), $ = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, N = Object.prototype.hasOwnProperty, _ = Array.isArray, O = console.createTask ? console.createTask : function() { return null; }; f = { "react-stack-bottom-frame": function(w) { return w(); } }; var ae, V = {}, oe = f["react-stack-bottom-frame"].bind( f, i )(), Z = O(o(i)), ee = {}; Ne.Fragment = y, Ne.jsx = function(w, g, A, P, te) { var H = 1e4 > $.recentlyCreatedOwnerStacks++; return u( w, g, A, !1, P, te, H ? Error("react-stack-top-frame") : oe, H ? O(o(w)) : Z ); }, Ne.jsxs = function(w, g, A, P, te) { var H = 1e4 > $.recentlyCreatedOwnerStacks++; return u( w, g, A, !0, P, te, H ? Error("react-stack-top-frame") : oe, H ? O(o(w)) : Z ); }; }()), Ne; } var ot; function Jn() { return ot || (ot = 1, process.env.NODE_ENV === "production" ? Pe.exports = Hn() : Pe.exports = Yn()), Pe.exports; } var s = Jn(); const rt = { home: "Connect", account: "Account", walletConnecting: "Wallet Connecting", selectETHWallet: "Select ETH Wallet", selectSolanaWallet: "Select Solana Wallet", walletqr: "Wallet QR", switchAccount: "Switch Account", switchingAccount: "Switching Account", switchChain: "Switch Chain", switchingChain: "Switching Chain", withdrawFunds: "Withdraw Funds", withdrawingFunds: "Withdrawing Funds", accountSigning: "Account Signing" }, h = { home: "home", account: "account", accountSigning: "accountSigning", socialConnecting: "socialConnecting", walletConnecting: "walletConnecting", selectETHWallet: "selectETHWallet", selectSolanaWallet: "selectSolanaWallet", walletqr: "walletqr", switchAccount: "switchAccount", switchingAccount: "switchingAccount", switchChain: "switchChain", switchingChain: "switchingChain", withdrawFunds: "withdrawFunds", withdrawingFunds: "withdrawingFunds" }, He = Jt({ chains: [], wagmiConfig: null, signMessage: "based.bid welcomes you!!!", pendingItem: null, setPendingItem: () => { }, open: !1, setOpen: () => { }, router: h.home, setRouter: () => { } }), S = () => wt(He), Ur = () => { const { open: e, setOpen: t, ...n } = wt(He); return { isOpen: e, openModal: () => { t(!0); }, closeModal: () => { t(!1); }, ...n }; }, Qn = ({ children: e, chains: t, signMessage: n, metadata: o, projectId: r }) => { const [i, c] = ue(!1), [a, d] = ue(null), [l, u] = ue(null), b = ze(null), f = ze(null); b.current || (b.current = sn({ projectId: r, metadata: o })), f.current || (f.current = new Zt({ network: Ke.Mainnet, options: { projectId: r, metadata: o } })); const x = Qe(() => { const y = t.filter( (m) => m.network.symbol === C.eth ), k = !(typeof window > "u") && (window == null ? void 0 : window.parent) !== window; return ln({ chains: y, connectors: [ un({ target: "metaMask" }), b.current, an({ appName: o.name, appLogoUrl: o.icons[0], overrideIsMetaMask: !1, preference: "all" }), ...k ? [ cn({ allowedDomains: [/gnosis-safe.io$/, /app.safe.global$/] }) ] : [] ], storage: dn({ storage: bn }), transports: Object.fromEntries( y.map((m) => [m.id, wn()]) ) }); }, [t]), p = Qe( () => [ new en(), new tn(), new nn(), new on(), new rn(), f.current ], [] ); return /* @__PURE__ */ s.jsx( He.Provider, { value: { chains: t, wagmiConfig: x, signMessage: n, open: i, setOpen: c, router: a, setRouter: d, pendingItem: l, setPendingItem: u }, children: /* @__PURE__ */ s.jsx(Qt, { wallets: p, autoConnect: !0, children: e }) } ); }; function ht(e) { var t, n, o = ""; if (typeof e == "string" || typeof e == "number") o += e; else if (typeof e == "object") if (Array.isArray(e)) { var r = e.length; for (t = 0; t < r; t++) e[t] && (n = ht(e[t])) && (o && (o += " "), o += n); } else for (n in e) e[n] && (o && (o += " "), o += n); return o; } function xt() { for (var e, t, n = 0, o = "", r = arguments.length; n < r; n++) (e = arguments[n]) && (t = ht(e)) && (o && (o += " "), o += t); return o; } const Ye = "-", Xn = (e) => { const t = eo(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: o } = e; return { getClassGroupId: (c) => { const a = c.split(Ye); return a[0] === "" && a.length !== 1 && a.shift(), yt(a, t) || Zn(c); }, getConflictingClassGroupIds: (c, a) => { const d = n[c] || []; return a && o[c] ? [...d, ...o[c]] : d; } }; }, yt = (e, t) => { var c; if (e.length === 0) return t.classGroupId; const n = e[0], o = t.nextPart.get(n), r = o ? yt(e.slice(1), o) : void 0; if (r) return r; if (t.validators.length === 0) return; const i = e.join(Ye); return (c = t.validators.find(({ validator: a }) => a(i))) == null ? void 0 : c.classGroupId; }, it = /^\[(.+)\]$/, Zn = (e) => { if (it.test(e)) { const t = it.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":")); if (n) return "arbitrary.." + n; } }, eo = (e) => { const { theme: t, prefix: n } = e, o = { nextPart: /* @__PURE__ */ new Map(), validators: [] }; return no(Object.entries(e.classGroups), n).forEach(([i, c]) => { Ge(c, o, i, t); }), o; }, Ge = (e, t, n, o) => { e.forEach((r) => { if (typeof r == "string") { const i = r === "" ? t : st(t, r); i.classGroupId = n; return; } if (typeof r == "function") { if (to(r)) { Ge(r(o), t, n, o); return; } t.validators.push({ validator: r, classGroupId: n }); return; } Object.entries(r).forEach(([i, c]) => { Ge(c, st(t, i), n, o); }); }); }, st = (e, t) => { let n = e; return t.split(Ye).forEach((o) => { n.nextPart.has(o) || n.nextPart.set(o, { nextPart: /* @__PURE__ */ new Map(), validators: [] }), n = n.nextPart.get(o); }), n; }, to = (e) => e.isThemeGetter, no = (e, t) => t ? e.map(([n, o]) => { const r = o.map((i) => typeof i == "string" ? t + i : typeof i == "object" ? Object.fromEntries(Object.entries(i).map(([c, a]) => [t + c, a])) : i); return [n, r]; }) : e, oo = (e) => { if (e < 1) return { get: () => { }, set: () => { } }; let t = 0, n = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(); const r = (i, c) => { n.set(i, c), t++, t > e && (t = 0, o = n, n = /* @__PURE__ */ new Map()); }; return { get(i) { let c = n.get(i); if (c !== void 0) return c; if ((c = o.get(i)) !== void 0) return r(i, c), c; }, set(i, c) { n.has(i) ? n.set(i, c) : r(i, c); } }; }, vt = "!", ro = (e) => { const { separator: t, experimentalParseClassName: n } = e, o = t.length === 1, r = t[0], i = t.length, c = (a) => { const d = []; let l = 0, u = 0, b; for (let k = 0; k < a.length; k++) { let m = a[k]; if (l === 0) { if (m === r && (o || a.slice(k, k + i) === t)) { d.push(a.slice(u, k)), u = k + i; continue; } if (m === "/") { b = k; continue; } } m === "[" ? l++ : m === "]" && l--; } const f = d.length === 0 ? a : a.substring(u), x = f.startsWith(vt), p = x ? f.substring(1) : f, y = b && b > u ? b - u : void 0; return { modifiers: d, hasImportantModifier: x, baseClassName: p, maybePostfixModifierPosition: y }; }; return n ? (a) => n({ className: a, parseClassName: c }) : c; }, io = (e) => { if (e.length <= 1) return e; const t = []; let n = []; return e.forEach((o) => { o[0] === "[" ? (t.push(...n.sort(), o), n = []) : n.push(o); }), t.push(...n.sort()), t; }, so = (e) => ({ cache: oo(e.cacheSize), parseClassName: ro(e), ...Xn(e) }), ao = /\s+/, co = (e, t) => { const { parseClassName: n, getClassGroupId: o, getConflictingClassGroupIds: r } = t, i = [], c = e.trim().split(ao); let a = ""; for (let d = c.length - 1; d >= 0; d -= 1) { const l = c[d], { modifiers: u, hasImportantModifier: b, baseClassName: f, maybePostfixModifierPosition: x } = n(l); let p = !!x, y = o(p ? f.substring(0, x) : f); if (!y) { if (!p) { a = l + (a.length > 0 ? " " + a : a); continue; } if (y = o(f), !y) { a = l + (a.length > 0 ? " " + a : a); continue; } p = !1; } const k = io(u).join(":"), m = b ? k + vt : k, v = m + y; if (i.includes(v)) continue; i.push(v); const W = r(y, p); for (let z = 0; z < W.length; ++z) { const F = W[z]; i.push(m + F); } a = l + (a.length > 0 ? " " + a : a); } return a; }; function lo() { let e = 0, t, n, o = ""; for (; e < arguments.length; ) (t = arguments[e++]) && (n = Ct(t)) && (o && (o += " "), o += n); return o; } const Ct = (e) => { if (typeof e == "string") return e; let t, n = ""; for (let o = 0; o < e.length; o++) e[o] && (t = Ct(e[o])) && (n && (n += " "), n += t); return n; }; function uo(e, ...t) { let n, o, r, i = c; function c(d) { const l = t.reduce((u, b) => b(u), e()); return n = so(l), o = n.cache.get, r = n.cache.set, i = a, a(d); } function a(d) { const l = o(d); if (l) return l; const u = co(d, n); return r(d, u), u; } return function() { return i(lo.apply(null, arguments)); }; } const R = (e) => { const t = (n) => n[e] || []; return t.isThemeGetter = !0, t; }, jt = /^\[(?:([a-z-]+):)?(.+)\]$/i, wo = /^\d+\/\d+$/, bo = /* @__PURE__ */ new Set(["px", "full", "screen"]), fo = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, mo = /\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$/, ko = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, po = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, go = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, re = (e) => pe(e) || bo.has(e) || wo.test(e), ce = (e) => ge(e, "length", So), pe = (e) => !!e && !Number.isNaN(Number(e)), Le = (e) => ge(e, "number", pe), Se = (e) => !!e && Number.isInteger(Number(e)), ho = (e) => e.endsWith("%") && pe(e.slice(0, -1)), j = (e) => jt.test(e), le = (e) => fo.test(e), xo = /* @__PURE__ */ new Set(["length", "size", "percentage"]), yo = (e) => ge(e, xo, Nt), vo = (e) => ge(e, "position", Nt), Co = /* @__PURE__ */ new Set(["image", "url"]), jo = (e) => ge(e, Co, Ao), No = (e) => ge(e, "", Eo), Ee = () => !0, ge = (e, t, n) => { const o = jt.exec(e); return o ? o[1] ? typeof t == "string" ? o[1] === t : t.has(o[1]) : n(o[2]) : !1; }, So = (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. mo.test(e) && !ko.test(e) ), Nt = () => !1, Eo = (e) => po.test(e), Ao = (e) => go.test(e), Ro = () => { const e = R("colors"), t = R("spacing"), n = R("blur"), o = R("brightness"), r = R("borderColor"), i = R("borderRadius"), c = R("borderSpacing"), a = R("borderWidth"), d = R("contrast"), l = R("grayscale"), u = R("hueRotate"), b = R("invert"), f = R("gap"), x = R("gradientColorStops"), p = R("gradientColorStopPositions"), y = R("inset"), k = R("margin"), m = R("opacity"), v = R("padding"), W = R("saturate"), z = R("scale"), F = R("sepia"), B = R("skew"), ne = R("space"), L = R("translate"), X = () => ["auto", "contain", "none"], K = () => ["auto", "hidden", "clip", "visible", "scroll"], $ = () => ["auto", j, t], N = () => [j, t], _ = () => ["", re, ce], O = () => ["auto", pe, j], ae = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], V = () => ["solid", "dashed", "dotted", "double", "none"], oe = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], Z = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], ee = () => ["", "0", j], w = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], g = () => [pe, j]; return { cacheSize: 500, separator: ":", theme: { colors: [Ee], spacing: [re, ce], blur: ["none", "", le, j], brightness: g(), borderColor: [e], borderRadius: ["none", "", "full", le, j], borderSpacing: N(), borderWidth: _(), contrast: g(), grayscale: ee(), hueRotate: g(), invert: ee(), gap: N(), gradientColorStops: [e], gradientColorStopPositions: [ho, ce], inset: $(), margin: $(), opacity: g(), padding: N(), saturate: g(), scale: g(), sepia: ee(), skew: g(), space: N(), translate: N() }, classGroups: { // Layout /** * Aspect Ratio * @see https://tailwindcss.com/docs/aspect-ratio */ aspect: [{ aspect: ["auto", "square", "video", j] }], /** * Container * @see https://tailwindcss.com/docs/container */ container: ["container"], /** * Columns * @see https://tailwindcss.com/docs/columns */ columns: [{ columns: [le] }], /** * Break After * @see https://tailwindcss.com/docs/break-after */ "break-after": [{ "break-after": w() }], /** * Break Before * @see https://tailwindcss.com/docs/break-before */ "break-before": [{ "break-before": w() }], /** * 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: [...ae(), j] }], /** * Overflow * @see https://tailwindcss.com/docs/overflow */ overflow: [{ overflow: K() }], /** * Overflow X * @see https://tailwindcss.com/docs/overflow */ "overflow-x": [{ "overflow-x": K() }], /** * Overflow Y * @see https://tailwindcss.com/docs/overflow */ "overflow-y": [{ "overflow-y": K() }], /** * Overscroll Behavior * @see https://tailwindcss.com/docs/overscroll-behavior */ overscroll: [{ overscroll: X() }], /** * Overscroll Behavior X * @see https://tailwindcss.com/docs/overscroll-behavior */ "overscroll-x": [{ "overscroll-x": X() }], /** * Overscroll Behavior Y * @see https://tailwindcss.com/docs/overscroll-behavior */ "overscroll-y": [{ "overscroll-y": X() }], /** * 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: [y] }], /** * Right / Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ "inset-x": [{ "inset-x": [y] }], /** * Top / Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ "inset-y": [{ "inset-y": [y] }], /** * Start * @see https://tailwindcss.com/docs/top-right-bottom-left */ start: [{ start: [y] }], /** * End * @see https://tailwindcss.com/docs/top-right-bottom-left */ end: [{ end: [y] }], /** * Top * @see https://tailwindcss.com/docs/top-right-bottom-left */ top: [{ top: [y] }], /** * Right * @see https://tailwindcss.com/docs/top-right-bottom-left */ right: [{ right: [y] }], /** * Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ bottom: [{ bottom: [y] }], /** * Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ left: [{ left: [y] }], /** * Visibility * @see https://tailwindcss.com/docs/visibility */ visibility: ["visible", "invisible", "collapse"], /** * Z-Index * @see https://tailwindcss.com/docs/z-index */ z: [{ z: ["auto", Se, j] }], // Flexbox and Grid /** * Flex Basis * @see https://tailwindcss.com/docs/flex-basis */ basis: [{ basis: $() }], /** * 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", j] }], /** * Flex Grow * @see https://tailwindcss.com/docs/flex-grow */ grow: [{ grow: ee() }], /** * Flex Shrink * @see https://tailwindcss.com/docs/flex-shrink */ shrink: [{ shrink: ee() }], /** * Order * @see https://tailwindcss.com/docs/order */ order: [{ order: ["first", "last", "none", Se, j] }], /** * Grid Template Columns * @see https://tailwindcss.com/docs/grid-template-columns */ "grid-cols": [{ "grid-cols": [Ee] }], /** * Grid Column Start / End * @see https://tailwindcss.com/docs/grid-column */ "col-start-end": [{ col: ["auto", { span: ["full", Se, j] }, j] }], /** * Grid Column Start * @see https://tailwindcss.com/docs/grid-column */ "col-start": [{ "col-start": O() }], /** * Grid Column End * @see https://tailwindcss.com/docs/grid-column */ "col-end": [{ "col-end": O() }], /** * Grid Template Rows * @see https://tailwindcss.com/docs/grid-template-rows */ "grid-rows": [{ "grid-rows": [Ee] }], /** * Grid Row Start / End * @see https://tailwindcss.com/docs/grid-row */ "row-start-end": [{ row: ["auto", { span: [Se, j] }, j] }], /** * Grid Row Start * @see https://tailwindcss.com/docs/grid-row */ "row-start": [{ "row-start": O() }], /** * Grid Row End * @see https://tailwindcss.com/docs/grid-row */ "row-end": [{ "row-end": O() }], /** * 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", j] }], /** * Grid Auto Rows * @see https://tailwindcss.com/docs/grid-auto-rows */ "auto-rows": [{ "auto-rows": ["auto", "min", "max", "fr", j] }], /** * Gap * @see https://tailwindcss.com/docs/gap */ gap: [{ gap: [f] }], /** * Gap X * @see https://tailwindcss.com/docs/gap */ "gap-x": [{ "gap-x": [f] }], /** * Gap Y * @see https://tailwindcss.com/docs/gap */ "gap-y": [{ "gap-y": [f] }], /** * Justify Content * @see https://tailwindcss.com/docs/justify-content */ "justify-content": [{ justify: ["normal", ...Z()] }], /** * 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", ...Z(), "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": [...Z(), "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: [v] }], /** * Padding X * @see https://tailwindcss.com/docs/padding */ px: [{ px: [v] }], /** * Padding Y * @see https://tailwindcss.com/docs/padding */ py: [{ py: [v] }], /** * Padding Start * @see https://tailwindcss.com/docs/padding */ ps: [{ ps: [v] }], /** * Padding End * @see https://tailwindcss.com/docs/padding */ pe: [{ pe: [v] }], /** * Padding Top * @see https://tailwindcss.com/docs/padding */ pt: [{ pt: [v] }], /** * Padding Right * @see https://tailwindcss.com/docs/padding */ pr: [{ pr: [v] }], /** * Padding Bottom * @see https://tailwindcss.com/docs/padding */ pb: [{ pb: [v] }], /** * Padding Left * @see https://tailwindcss.com/docs/padding */ pl: [{ pl: [v] }], /** * Margin * @see https://tailwindcss.com/docs/margin */ m: [{ m: [k] }], /** * Margin X * @see https://tailwindcss.com/docs/margin */ mx: [{ mx: [k] }], /** * Margin Y * @see https://tailwindcss.com/docs/margin */ my: [{ my: [k] }], /** * Margin Start * @see https://tailwindcss.com/docs/margin */ ms: [{ ms: [k] }], /** * Margin End * @see https://tailwindcss.com/docs/margin */ me: [{ me: [k] }], /** * Margin Top * @see https://tailwindcss.com/docs/margin */ mt: [{ mt: [k] }], /** * Margin Right * @see https://tailwindcss.com/docs/margin */ mr: [{ mr: [k] }], /** * Margin Bottom * @see https://tailwindcss.com/docs/margin */ mb: [{ mb: [k] }], /** * Margin Left * @see https://tailwindcss.com/docs/margin */ ml: [{ ml: [k] }], /** * Space Between X * @see https://tailwindcss.com/docs/space */ "space-x": [{ "space-x": [ne] }], /** * 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": [ne] }], /** * 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", j, t] }], /** * Min-Width * @see https://tailwindcss.com/docs/min-width */ "min-w": [{ "min-w": [j, t, "min", "max", "fit"] }], /** * Max-Width * @see https://tailwindcss.com/docs/max-width */ "max-w": [{ "max-w": [j, t, "none", "full", "min", "max", "fit", "prose", { screen: [le] }, le] }], /** * Height * @see https://tailwindcss.com/docs/height */ h: [{ h: [j, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Min-Height * @see https://tailwindcss.com/docs/min-height */ "min-h": [{ "min-h": [j, t, "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Max-Height * @see https://tailwindcss.com/docs/max-height */ "max-h": [{ "max-h": [j, t, "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Size * @see https://tailwindcss.com/docs/size */ size: [{ size: [j, t, "auto", "min", "max", "fit"] }], // Typography /** * Font Size * @see https://tailwindcss.com/docs/font-size */ "font-size": [{ text: ["base", le, ce] }], /** * 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: [Ee] }], /** * 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", j] }], /** * Line Clamp * @see https://tailwindcss.com/docs/line-clamp */ "line-clamp": [{ "line-clamp": ["none", pe, Le] }], /** * Line Height * @see https://tailwindcss.com/docs/line-height */ leading: [{ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", re, j] }], /** * List Style Image * @see https://tailwindcss.com/docs/list-style-image */ "list-image": [{ "list-image": ["none", j] }], /** * List Style Type * @see https://tailwindcss.com/docs/list-style-type */ "list-style-type": [{ list: ["none", "disc", "decimal", j] }], /** * 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": [m] }], /** * 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": [m] }], /** * 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: [...V(), "wavy"] }], /** * Text Decoration Thickness * @see https://tailwindcss.com/docs/text-decoration-thickness */ "text-decoration-thickness": [{ decoration: ["auto", "from-font", re, ce] }], /** * Text Underline Offset * @see https://tailwindcss.com/docs/text-underline-offset */ "underline-offset": [{ "underline-offset": ["auto", re, j] }], /** * 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: N() }], /** * Vertical Alignment * @see https://tailwindcss.com/docs/vertical-align */ "vertical-align": [{ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", j] }], /** * 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", j] }], // 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": [m] }], /** * 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: [...ae(), vo] }], /** * 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", yo] }], /** * Background Image * @see https://tailwindcss.com/docs/background-image */ "bg-image": [{ bg: ["none", { "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"] }, jo] }], /** * 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: [p] }], /** * Gradient Color Stops Via Position * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-via-pos": [{ via: [p] }], /** * Gradient Color Stops To Position * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-to-pos": [{ to: [p] }], /** * Gradient Color Stops From * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-from": [{ from: [x] }], /** * Gradient Color Stops Via * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-via": [{ via: [x] }], /** * Gradient Color Stops To * @see https://tailwindcss.com/docs/gradient-color-stops */ "gradient-to": [{ to: [x] }], // Borders /** * Border Radius * @see https://tailwindcss.com/docs/border-radius */ rounded: [{ rounded: [i] }], /** * Border Radius Start * @see https://tailwindcss.com/docs/border-radius */ "rounded-s": [{ "rounded-s": [i] }], /** * Border Radius End * @see https://tailwindcss.com/docs/border-radius */ "rounded-e": [{ "rounded-e": [i] }], /** * Border Radius Top * @see https://tailwindcss.com/docs/border-radius */ "rounded-t": [{ "rounded-t": [i] }], /** * Border Radius Right * @see https://tailwindcss.com/docs/border-radius */ "rounded-r": [{ "rounded-r": [i] }], /** * Border Radius Bottom * @see https://tailwindcss.com/docs/border-radius */ "rounded-b": [{ "rounded-b": [i] }], /** * Border Radius Left * @see https://tailwindcss.com/docs/border-radius */ "rounded-l": [{ "rounded-l": [i] }], /** * Border Radius Start Start * @see https://tailwindcss.com/docs/border-radius */ "rounded-ss": [{ "rounded-ss": [i] }], /** * Border Radius Start End * @see https://tailwindcss.com/docs/border-radius */ "rounded-se": [{ "rounded-se": [i] }], /** * Border Radius End End * @see https://tailwindcss.com/docs/border-radius */ "rounded-ee": [{ "rounded-ee": [i] }], /** * Border Radius End Start * @see https://tailwindcss.com/docs/border-radius */ "rounded-es": [{ "rounded-es": [i] }], /** * Border Radius Top Left * @see https://tailwindcss.com/doc