@dub/ui 0.0.44 → 0.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/badge.d.ts +1 -1
- package/dist/chunk-RB4WRVF5.mjs +2 -0
- package/dist/index.mjs +1 -1
- package/dist/link-preview.mjs +1 -1
- package/package.json +1 -1
package/dist/badge.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as class_variance_authority_dist_types from 'class-variance-authority/d
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const badgeVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "default" | "violet" | "blue" | "sky" | "black" | "gray" | "neutral" | "rainbow" | null | undefined;
|
|
7
7
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
8
8
|
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
9
9
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{e as y}from"./chunk-HYYV36TO.mjs";import{a as p}from"./chunk-2TGXECZQ.mjs";import{a as o}from"./chunk-22Q4RG25.mjs";import{f as g,g as f,h as b}from"./chunk-3YWKTNW4.mjs";import{Link2 as v}from"lucide-react";import{useRouter as k,useSearchParams as R}from"next/navigation";import{useEffect as E,useMemo as P,useRef as W}from"react";import M from"swr";import{useDebounce as j}from"use-debounce";import{Fragment as h,jsx as e,jsxs as r}from"react/jsx-runtime";function I({defaultUrl:t}){let x=k(),l=R(),i=t||(l==null?void 0:l.get("url"))||"https://github.com/dubinc/dub",[a]=j(g(i),500),d=P(()=>f(a||""),[a]),{data:N,isValidating:w}=M(a&&`/api/metatags?url=${a}`,b,{revalidateOnFocus:!1}),{title:n,description:u,image:c}=N||{},s=W(null);E(()=>{!t&&s.current&&s.current.select()},[t]);let{isMobile:L}=y();return r(h,{children:[!t&&r("div",{className:"relative flex items-center",children:[e(v,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-gray-400"}),e("input",{ref:s,name:"url",id:"url",type:"url",autoFocus:!L,className:"block w-full rounded-md border-gray-200 pl-10 text-sm text-gray-900 placeholder-gray-400 shadow-lg focus:border-gray-500 focus:outline-none focus:ring-gray-500",placeholder:"Enter your URL",defaultValue:i,onChange:m=>x.replace(`/tools/metatags${m.target.value.length>0?`?url=${m.target.value}`:""}`),"aria-invalid":"true"})]}),r("div",{className:"relative overflow-hidden rounded-md border border-gray-300 bg-gray-50",children:[w&&e("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-gray-300 bg-gray-50",children:e(o,{})}),c?e("img",{src:c,alt:"Preview",className:"h-[250px] w-full border-b border-gray-300 object-cover"}):r("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-gray-300",children:[e(p,{className:"h-8 w-8 text-gray-400"}),e("p",{className:"text-sm text-gray-400",children:"Enter a link to generate a preview."})]}),r("div",{className:"grid gap-1 bg-white p-3 text-left",children:[d?e("p",{className:"text-sm text-[#536471]",children:d}):e("div",{className:"mb-1 h-4 w-24 rounded-md bg-gray-100"}),n?e("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:n}):e("div",{className:"mb-1 h-4 w-full rounded-md bg-gray-100"}),u?e("p",{className:"line-clamp-2 text-sm text-[#536471]",children:u}):r("div",{className:"grid gap-2",children:[e("div",{className:"h-4 w-full rounded-md bg-gray-100"}),e("div",{className:"h-4 w-48 rounded-md bg-gray-100"})]})]})]})]})}function O({defaultUrl:t}){return r(h,{children:[r("div",{className:"relative flex items-center",children:[e(v,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-gray-400"}),e("input",{name:"url",id:"url",type:"url",disabled:!0,className:"block w-full rounded-md border-gray-200 pl-10 text-sm text-gray-900 placeholder-gray-400 shadow-lg focus:border-gray-500 focus:outline-none focus:ring-gray-500",placeholder:"Enter your URL",defaultValue:t||"https://github.com/dubinc/dub"})]}),e("div",{className:"relative overflow-hidden rounded-md border border-gray-300 bg-gray-50",children:e("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-gray-300 bg-gray-50",children:e(o,{})})})]})}export{I as a,O as b};
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
import{a as mo}from"./chunk-I7VMZACE.mjs";import{a as oo,b as ro}from"./chunk-UY2LYO26.mjs";import{a as Y}from"./chunk-SJTRMSUR.mjs";import{a as Z,b as _}from"./chunk-UFWDN3MB.mjs";import{a as $}from"./chunk-A64WVPGU.mjs";import{a as fo}from"./chunk-W5YDWGPP.mjs";import{a as M}from"./chunk-T5RFGDQC.mjs";import{a as N}from"./chunk-Z4MSMGYC.mjs";import{a as po}from"./chunk-O5BHK57C.mjs";import{a as O}from"./chunk-XLJT273L.mjs";import{a as to,b as eo}from"./chunk-
|
|
2
|
+
import{a as mo}from"./chunk-I7VMZACE.mjs";import{a as oo,b as ro}from"./chunk-UY2LYO26.mjs";import{a as Y}from"./chunk-SJTRMSUR.mjs";import{a as Z,b as _}from"./chunk-UFWDN3MB.mjs";import{a as $}from"./chunk-A64WVPGU.mjs";import{a as fo}from"./chunk-W5YDWGPP.mjs";import{a as M}from"./chunk-T5RFGDQC.mjs";import{a as N}from"./chunk-Z4MSMGYC.mjs";import{a as po}from"./chunk-O5BHK57C.mjs";import{a as O}from"./chunk-XLJT273L.mjs";import{a as to,b as eo}from"./chunk-RB4WRVF5.mjs";import{a as X}from"./chunk-IYM4YMPD.mjs";import{a as P,b as Q,c as R,d as S,e as T,f as U,g as V}from"./chunk-HYYV36TO.mjs";import{a as W}from"./chunk-XDXOOSPE.mjs";import{a as o,b as r,c as m,d as p}from"./chunk-JVEG66WT.mjs";import{a as t,b as e}from"./chunk-PVBVTUMW.mjs";import{a as f}from"./chunk-QDF6KFCS.mjs";import{a as x,b as i}from"./chunk-2IBF3SWD.mjs";import{a as G}from"./chunk-7B6GEHI6.mjs";import{a as A,b as B,c as C,d as D,e as E,f as F}from"./chunk-2UCND3ZA.mjs";import{a as H}from"./chunk-GSZJGTMD.mjs";import{a as I}from"./chunk-RGF75DA5.mjs";import{a as L}from"./chunk-LKOSZSO7.mjs";import{a as J}from"./chunk-A75RGEGE.mjs";import{a as K}from"./chunk-3EC4P73R.mjs";import"./chunk-KONPNG2A.mjs";import{a as y}from"./chunk-OY2A77RB.mjs";import{a as z}from"./chunk-GSQUGPJ2.mjs";import{a as k}from"./chunk-QA2KCGIR.mjs";import{a as l}from"./chunk-JQZF43TW.mjs";import{a as n}from"./chunk-62XRBJQN.mjs";import{a as q}from"./chunk-4O5C2RDY.mjs";import{a as c}from"./chunk-YURUGH4S.mjs";import{a as d}from"./chunk-2TGXECZQ.mjs";import{a as h}from"./chunk-EHYVEIOL.mjs";import{a}from"./chunk-Z5P2KHPP.mjs";import{a as b}from"./chunk-3PBCZKAW.mjs";import{a as s}from"./chunk-MURAUI3W.mjs";import{a as u}from"./chunk-T4YFARK5.mjs";import{a as v}from"./chunk-OYEGFR5W.mjs";import{a as w}from"./chunk-5EWSH7PD.mjs";import{a as j}from"./chunk-22Q4RG25.mjs";import{a as g}from"./chunk-XSZV33MB.mjs";import"./chunk-3YWKTNW4.mjs";import"./chunk-AUBFB4SI.mjs";export{o as Accordion,p as AccordionContent,r as AccordionItem,m as AccordionTrigger,t as Avatar,f as Background,i as Badge,G as Button,H as Checkbox,a as Copy,I as CopyButton,b as ExpandingArrow,J as FEATURES_LIST,s as Facebook,L as Footer,M as Form,u as Github,v as Google,N as IconMenu,E as InfoTooltip,po as InlineSnippet,O as Label,to as LinkPreview,eo as LinkPreviewPlaceholder,w as LinkedIn,j as LoadingCircle,k as LoadingDots,l as LoadingSpinner,n as Logo,q as LogoType,c as Magic,K as MaxWidthWrapper,X as Modal,ro as Nav,mo as NavMobile,F as NumberTooltip,d as Photo,Y as Popover,Z as RadioGroup,_ as RadioGroupItem,D as SimpleTooltipContent,g as Success,$ as Switch,fo as TabSelect,h as Tick,e as TokenAvatar,B as Tooltip,C as TooltipContent,A as TooltipProvider,y as Twitter,z as Unsplash,x as badgeVariants,oo as navItems,P as useCookies,Q as useCurrentAnchor,R as useIntersectionObserver,S as useLocalStorage,T as useMediaQuery,U as useRouterStuff,V as useScroll,W as useToastWithUndo};
|
package/dist/link-preview.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
import{a,b}from"./chunk-
|
|
2
|
+
import{a,b}from"./chunk-RB4WRVF5.mjs";import"./chunk-HYYV36TO.mjs";import"./chunk-XDXOOSPE.mjs";import"./chunk-KONPNG2A.mjs";import"./chunk-OY2A77RB.mjs";import"./chunk-GSQUGPJ2.mjs";import"./chunk-QA2KCGIR.mjs";import"./chunk-JQZF43TW.mjs";import"./chunk-62XRBJQN.mjs";import"./chunk-4O5C2RDY.mjs";import"./chunk-YURUGH4S.mjs";import"./chunk-2TGXECZQ.mjs";import"./chunk-EHYVEIOL.mjs";import"./chunk-Z5P2KHPP.mjs";import"./chunk-3PBCZKAW.mjs";import"./chunk-MURAUI3W.mjs";import"./chunk-T4YFARK5.mjs";import"./chunk-OYEGFR5W.mjs";import"./chunk-5EWSH7PD.mjs";import"./chunk-22Q4RG25.mjs";import"./chunk-XSZV33MB.mjs";import"./chunk-3YWKTNW4.mjs";import"./chunk-AUBFB4SI.mjs";export{a as LinkPreview,b as LinkPreviewPlaceholder};
|