Function bodies 443 total
slugify function · javascript · L64-L70 (7 LOC)scripts/merge-user-export.cjs
function slugify(name) {
return name
.toLowerCase()
.replace(/[^a-z0-9]+/g, '-')
.replace(/-+/g, '-')
.replace(/^-|-$/g, '');
}mergeArrayById function · javascript · L83-L139 (57 LOC)scripts/merge-user-export.cjs
function mergeArrayById(bundled, exported) {
const bundledMap = new Map(bundled.map(item => [item.id, item]));
const remaps = [];
let updated = 0;
let added = 0;
// Build remap table for user-created IDs
const userIdRemap = {};
for (const item of exported) {
if (isUserCreatedId(item.id)) {
const newId = slugify(item.name);
userIdRemap[item.id] = newId;
remaps.push({ name: item.name, oldId: item.id, newId });
}
}
// Process exported items
for (const item of exported) {
let id = item.id;
// Remap user IDs to proper slugified IDs
if (userIdRemap[id]) {
id = userIdRemap[id];
}
const merged = { ...item, id };
if (bundledMap.has(id)) {
bundledMap.set(id, merged);
updated++;
} else {
bundledMap.set(id, merged);
added++;
}
}
// Convert back to array, preserving original order
const result = [];
const seen = new Set();
// First: existing items in original order (with updamergeKeyedObject function · javascript · L145-L161 (17 LOC)scripts/merge-user-export.cjs
function mergeKeyedObject(bundled, exported) {
const result = { ...bundled };
let updated = 0;
let added = 0;
for (const [key, value] of Object.entries(exported)) {
if (key in bundled) {
result[key] = value;
updated++;
} else {
result[key] = value;
added++;
}
}
return { result, updated, added };
}main function · javascript · L167-L296 (130 LOC)scripts/merge-user-export.cjs
function main() {
const args = process.argv.slice(2);
if (args.length !== 1) {
console.error('Usage: just merge-export <export-file>');
console.error('');
console.error('Example:');
console.error(' just merge-export history/ao-user-data-1769744278621.json');
process.exit(1);
}
const exportPath = args[0];
// Validate export file exists
if (!fs.existsSync(exportPath)) {
console.error(`Error: Export file not found: ${exportPath}`);
process.exit(1);
}
// Validate we're in project root
if (!fs.existsSync(DATA_DIR)) {
console.error(`Error: Data directory not found: ${DATA_DIR}`);
console.error('Are you running this from the project root?');
process.exit(1);
}
// Load export file
console.log(`Loading export from ${exportPath}...`);
const exported = JSON.parse(fs.readFileSync(exportPath, 'utf8'));
const stats = {
equipment: { updated: 0, added: 0 },
enchantments: { updated: 0, added: 0 },
modifiers: { updateApp function · typescript · L6-L15 (10 LOC)src/App.tsx
export function App(): React.JSX.Element {
const { showConflict, setShowConflict } = useVersionCheck();
return (
<ErrorBoundary>
<AppShell />
<VersionConflictDialog open={showConflict} onOpenChange={setShowConflict} />
</ErrorBoundary>
);
}AccordionItem function · typescript · L13-L24 (12 LOC)src/components/ui/accordion.tsx
function AccordionItem({
className,
...props
}: React.ComponentProps<typeof AccordionPrimitive.Item>): React.JSX.Element {
return (
<AccordionPrimitive.Item
data-slot="accordion-item"
className={cn("border-b last:border-b-0", className)}
{...props}
/>
);
}AccordionTrigger function · typescript · L26-L46 (21 LOC)src/components/ui/accordion.tsx
function AccordionTrigger({
className,
children,
...props
}: React.ComponentProps<typeof AccordionPrimitive.Trigger>): React.JSX.Element {
return (
<AccordionPrimitive.Header className="flex">
<AccordionPrimitive.Trigger
data-slot="accordion-trigger"
className={cn(
"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
className
)}
{...props}
>
{children}
<ChevronDownIcon className="text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" />
</AccordionPrimitive.Trigger>
</AccordionPrimitive.Header>
);
}Repobility analyzer · published findings · https://repobility.com
AccordionContent function · typescript · L48-L62 (15 LOC)src/components/ui/accordion.tsx
function AccordionContent({
className,
children,
...props
}: React.ComponentProps<typeof AccordionPrimitive.Content>): React.JSX.Element {
return (
<AccordionPrimitive.Content
data-slot="accordion-content"
className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"
{...props}
>
<div className={cn("pt-0 pb-4", className)}>{children}</div>
</AccordionPrimitive.Content>
);
}Badge function · typescript · L29-L46 (18 LOC)src/components/ui/badge.tsx
function Badge({
className,
variant = "default",
asChild = false,
...props
}: React.ComponentProps<"span"> &
VariantProps<typeof badgeVariants> & { asChild?: boolean }): React.JSX.Element {
const Comp = asChild ? Slot : "span"
return (
<Comp
data-slot="badge"
data-variant={variant}
className={cn(badgeVariants({ variant }), className)}
{...props}
/>
)
}Button function · typescript · L41-L62 (22 LOC)src/components/ui/button.tsx
function Button({
className,
variant = "default",
size = "default",
asChild = false,
...props
}: React.ComponentProps<"button"> &
VariantProps<typeof buttonVariants> & {
asChild?: boolean
}): React.JSX.Element {
const Comp = asChild ? Slot : "button"
return (
<Comp
data-slot="button"
data-variant={variant}
data-size={size}
className={cn(buttonVariants({ variant, size, className }))}
{...props}
/>
)
}Card function · typescript · L5-L16 (12 LOC)src/components/ui/card.tsx
function Card({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element {
return (
<div
data-slot="card"
className={cn(
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
className
)}
{...props}
/>
)
}CardHeader function · typescript · L18-L29 (12 LOC)src/components/ui/card.tsx
function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element {
return (
<div
data-slot="card-header"
className={cn(
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
className
)}
{...props}
/>
)
}CardTitle function · typescript · L31-L39 (9 LOC)src/components/ui/card.tsx
function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element {
return (
<div
data-slot="card-title"
className={cn("leading-none font-semibold", className)}
{...props}
/>
)
}CardDescription function · typescript · L41-L49 (9 LOC)src/components/ui/card.tsx
function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element {
return (
<div
data-slot="card-description"
className={cn("text-muted-foreground text-sm", className)}
{...props}
/>
)
}CardAction function · typescript · L51-L62 (12 LOC)src/components/ui/card.tsx
function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element {
return (
<div
data-slot="card-action"
className={cn(
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
className
)}
{...props}
/>
)
}Same scanner, your repo: https://repobility.com — Repobility
CardContent function · typescript · L64-L72 (9 LOC)src/components/ui/card.tsx
function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element {
return (
<div
data-slot="card-content"
className={cn("px-6", className)}
{...props}
/>
)
}CardFooter function · typescript · L74-L82 (9 LOC)src/components/ui/card.tsx
function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element {
return (
<div
data-slot="card-footer"
className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
{...props}
/>
)
}Checkbox function · typescript · L7-L28 (22 LOC)src/components/ui/checkbox.tsx
function Checkbox({
className,
...props
}: React.ComponentProps<typeof CheckboxPrimitive.Root>): React.JSX.Element {
return (
<CheckboxPrimitive.Root
data-slot="checkbox"
className={cn(
"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
className
)}
{...props}
>
<CheckboxPrimitive.Indicator
data-slot="checkbox-indicator"
className="grid place-content-center text-current transition-none"
>
<CheckIcon className="size-3.5" />
</CheckboxPrimitive.Indicator>
CollapsibleTrigger function · typescript · L9-L18 (10 LOC)src/components/ui/collapsible.tsx
function CollapsibleTrigger({
...props
}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): React.JSX.Element {
return (
<CollapsiblePrimitive.CollapsibleTrigger
data-slot="collapsible-trigger"
{...props}
/>
);
}CollapsibleContent function · typescript · L20-L29 (10 LOC)src/components/ui/collapsible.tsx
function CollapsibleContent({
...props
}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): React.JSX.Element {
return (
<CollapsiblePrimitive.CollapsibleContent
data-slot="collapsible-content"
{...props}
/>
);
}DialogOverlay function · typescript · L32-L46 (15 LOC)src/components/ui/dialog.tsx
function DialogOverlay({
className,
...props
}: React.ComponentProps<typeof DialogPrimitive.Overlay>): React.JSX.Element {
return (
<DialogPrimitive.Overlay
data-slot="dialog-overlay"
className={cn(
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
className
)}
{...props}
/>
)
}DialogContent function · typescript · L48-L80 (33 LOC)src/components/ui/dialog.tsx
function DialogContent({
className,
children,
showCloseButton = true,
...props
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
showCloseButton?: boolean
}): React.JSX.Element {
return (
<DialogPortal data-slot="dialog-portal">
<DialogOverlay />
<DialogPrimitive.Content
data-slot="dialog-content"
className={cn(
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",
className
)}
{...props}
>
{children}
{showCloseButton && (
<DialogPrimitive.Close
data-slot="dialog-close"
className="ring-offset-background focus:ring-ring datDialogHeader function · typescript · L82-L90 (9 LOC)src/components/ui/dialog.tsx
function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element {
return (
<div
data-slot="dialog-header"
className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
{...props}
/>
)
}Repobility — the code-quality scanner for AI-generated software · https://repobility.com
DialogFooter function · typescript · L92-L117 (26 LOC)src/components/ui/dialog.tsx
function DialogFooter({
className,
showCloseButton = false,
children,
...props
}: React.ComponentProps<"div"> & {
showCloseButton?: boolean
}): React.JSX.Element {
return (
<div
data-slot="dialog-footer"
className={cn(
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
className
)}
{...props}
>
{children}
{showCloseButton && (
<DialogPrimitive.Close asChild>
<Button variant="outline">Close</Button>
</DialogPrimitive.Close>
)}
</div>
)
}DialogTitle function · typescript · L119-L130 (12 LOC)src/components/ui/dialog.tsx
function DialogTitle({
className,
...props
}: React.ComponentProps<typeof DialogPrimitive.Title>): React.JSX.Element {
return (
<DialogPrimitive.Title
data-slot="dialog-title"
className={cn("text-lg leading-none font-semibold", className)}
{...props}
/>
)
}DialogDescription function · typescript · L132-L143 (12 LOC)src/components/ui/dialog.tsx
function DialogDescription({
className,
...props
}: React.ComponentProps<typeof DialogPrimitive.Description>): React.JSX.Element {
return (
<DialogPrimitive.Description
data-slot="dialog-description"
className={cn("text-muted-foreground text-sm", className)}
{...props}
/>
)
}Input function · typescript · L5-L19 (15 LOC)src/components/ui/input.tsx
function Input({ className, type, ...props }: React.ComponentProps<"input">): React.JSX.Element {
return (
<input
type={type}
data-slot="input"
className={cn(
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
className
)}
{...props}
/>
)
}Label function · typescript · L6-L20 (15 LOC)src/components/ui/label.tsx
function Label({
className,
...props
}: React.ComponentProps<typeof LabelPrimitive.Root>): React.JSX.Element {
return (
<LabelPrimitive.Root
data-slot="label"
className={cn(
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
className
)}
{...props}
/>
)
}RadioGroup function · typescript · L16-L27 (12 LOC)src/components/ui/radio-group.tsx
function RadioGroup({
className,
...props
}: RadioGroupProps): React.JSX.Element {
return (
<RadioGroupPrimitive.Root
data-slot="radio-group"
className={cn("grid gap-3", className)}
{...props}
/>
);
}RadioGroupItem function · typescript · L29-L50 (22 LOC)src/components/ui/radio-group.tsx
function RadioGroupItem({
className,
...props
}: RadioGroupItemProps): React.JSX.Element {
return (
<RadioGroupPrimitive.Item
data-slot="radio-group-item"
className={cn(
"border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
className
)}
{...props}
>
<RadioGroupPrimitive.Indicator
data-slot="radio-group-indicator"
className="relative flex items-center justify-center"
>
<CircleIcon className="fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" />
</RadioGroupPrimitive.Indicator>
</RadioGroupPrimitive.Item>
);
}SelectTrigger function · typescript · L25-L49 (25 LOC)src/components/ui/select.tsx
function SelectTrigger({
className,
size = "default",
children,
...props
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
size?: "sm" | "default"
}): React.JSX.Element {
return (
<SelectPrimitive.Trigger
data-slot="select-trigger"
data-size={size}
className={cn(
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-valueRepobility · MCP-ready · https://repobility.com
SelectContent function · typescript · L51-L86 (36 LOC)src/components/ui/select.tsx
function SelectContent({
className,
children,
position = "item-aligned",
align = "center",
...props
}: React.ComponentProps<typeof SelectPrimitive.Content>): React.JSX.Element {
return (
<SelectPrimitive.Portal>
<SelectPrimitive.Content
data-slot="select-content"
className={cn(
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
position === "popper" &&
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1SelectLabel function · typescript · L88-L99 (12 LOC)src/components/ui/select.tsx
function SelectLabel({
className,
...props
}: React.ComponentProps<typeof SelectPrimitive.Label>): React.JSX.Element {
return (
<SelectPrimitive.Label
data-slot="select-label"
className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
{...props}
/>
)
}SelectItem function · typescript · L101-L126 (26 LOC)src/components/ui/select.tsx
function SelectItem({
className,
children,
...props
}: React.ComponentProps<typeof SelectPrimitive.Item>): React.JSX.Element {
return (
<SelectPrimitive.Item
data-slot="select-item"
className={cn(
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
className
)}
{...props}
>
<span
data-slot="select-item-indicator"
className="absolute right-2 flex size-3.5 items-center justify-center"
>
<SelectPrimitive.ItemIndicator>
<CheckIcon className="size-4" />
</SelectPrimitive.ItemIndicator>
</span>
<SelectSelectSeparator function · typescript · L128-L139 (12 LOC)src/components/ui/select.tsx
function SelectSeparator({
className,
...props
}: React.ComponentProps<typeof SelectPrimitive.Separator>): React.JSX.Element {
return (
<SelectPrimitive.Separator
data-slot="select-separator"
className={cn("bg-border pointer-events-none -mx-1 my-1 h-px", className)}
{...props}
/>
)
}SelectScrollUpButton function · typescript · L141-L157 (17 LOC)src/components/ui/select.tsx
function SelectScrollUpButton({
className,
...props
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): React.JSX.Element {
return (
<SelectPrimitive.ScrollUpButton
data-slot="select-scroll-up-button"
className={cn(
"flex cursor-default items-center justify-center py-1",
className
)}
{...props}
>
<ChevronUpIcon className="size-4" />
</SelectPrimitive.ScrollUpButton>
)
}SelectScrollDownButton function · typescript · L159-L175 (17 LOC)src/components/ui/select.tsx
function SelectScrollDownButton({
className,
...props
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): React.JSX.Element {
return (
<SelectPrimitive.ScrollDownButton
data-slot="select-scroll-down-button"
className={cn(
"flex cursor-default items-center justify-center py-1",
className
)}
{...props}
>
<ChevronDownIcon className="size-4" />
</SelectPrimitive.ScrollDownButton>
)
}Separator function · typescript · L6-L24 (19 LOC)src/components/ui/separator.tsx
function Separator({
className,
orientation = "horizontal",
decorative = true,
...props
}: React.ComponentProps<typeof SeparatorPrimitive.Root>): React.JSX.Element {
return (
<SeparatorPrimitive.Root
data-slot="separator"
decorative={decorative}
orientation={orientation}
className={cn(
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
className
)}
{...props}
/>
)
}Slider function · typescript · L6-L59 (54 LOC)src/components/ui/slider.tsx
function Slider({
className,
defaultValue,
value,
min = 0,
max = 100,
...props
}: React.ComponentProps<typeof SliderPrimitive.Root>): React.JSX.Element {
const _values = React.useMemo(
() =>
Array.isArray(value)
? value
: Array.isArray(defaultValue)
? defaultValue
: [min, max],
[value, defaultValue, min, max]
)
return (
<SliderPrimitive.Root
data-slot="slider"
{...(defaultValue !== undefined ? { defaultValue } : {})}
{...(value !== undefined ? { value } : {})}
min={min}
max={max}
className={cn(
"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
className
)}
{...props}
>
<SliderPrimitive.Track
data-slot="slider-track"
className={cn(
"bg-mutRepobility analyzer · published findings · https://repobility.com
Tabs function · typescript · L7-L24 (18 LOC)src/components/ui/tabs.tsx
function Tabs({
className,
orientation = "horizontal",
...props
}: React.ComponentProps<typeof TabsPrimitive.Root>): React.JSX.Element {
return (
<TabsPrimitive.Root
data-slot="tabs"
data-orientation={orientation}
orientation={orientation}
className={cn(
"group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",
className
)}
{...props}
/>
)
}TabsList function · typescript · L41-L55 (15 LOC)src/components/ui/tabs.tsx
function TabsList({
className,
variant = "default",
...props
}: React.ComponentProps<typeof TabsPrimitive.List> &
VariantProps<typeof tabsListVariants>): React.JSX.Element {
return (
<TabsPrimitive.List
data-slot="tabs-list"
data-variant={variant}
className={cn(tabsListVariants({ variant }), className)}
{...props}
/>
)
}TabsTrigger function · typescript · L57-L74 (18 LOC)src/components/ui/tabs.tsx
function TabsTrigger({
className,
...props
}: React.ComponentProps<typeof TabsPrimitive.Trigger>): React.JSX.Element {
return (
<TabsPrimitive.Trigger
data-slot="tabs-trigger"
className={cn(
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
TabsContent function · typescript · L76-L87 (12 LOC)src/components/ui/tabs.tsx
function TabsContent({
className,
...props
}: React.ComponentProps<typeof TabsPrimitive.Content>): React.JSX.Element {
return (
<TabsPrimitive.Content
data-slot="tabs-content"
className={cn("flex-1 outline-none", className)}
{...props}
/>
)
}Textarea function · typescript · L5-L16 (12 LOC)src/components/ui/textarea.tsx
function Textarea({ className, ...props }: React.ComponentProps<"textarea">): React.JSX.Element {
return (
<textarea
data-slot="textarea"
className={cn(
"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
className
)}
{...props}
/>
)
}Toggle function · typescript · L29-L43 (15 LOC)src/components/ui/toggle.tsx
function Toggle({
className,
variant,
size,
...props
}: React.ComponentProps<typeof TogglePrimitive.Root> &
VariantProps<typeof toggleVariants>): React.JSX.Element {
return (
<TogglePrimitive.Root
data-slot="toggle"
className={cn(toggleVariants({ variant, size, className }))}
{...props}
/>
)
}TooltipProvider function · typescript · L6-L17 (12 LOC)src/components/ui/tooltip.tsx
function TooltipProvider({
delayDuration = 0,
...props
}: React.ComponentProps<typeof TooltipPrimitive.Provider>): React.JSX.Element {
return (
<TooltipPrimitive.Provider
data-slot="tooltip-provider"
delayDuration={delayDuration}
{...props}
/>
)
}Tooltip function · typescript · L19-L27 (9 LOC)src/components/ui/tooltip.tsx
function Tooltip({
...props
}: React.ComponentProps<typeof TooltipPrimitive.Root>): React.JSX.Element {
return (
<TooltipProvider>
<TooltipPrimitive.Root data-slot="tooltip" {...props} />
</TooltipProvider>
)
}Same scanner, your repo: https://repobility.com — Repobility
TooltipContent function · typescript · L35-L57 (23 LOC)src/components/ui/tooltip.tsx
function TooltipContent({
className,
sideOffset = 0,
children,
...props
}: React.ComponentProps<typeof TooltipPrimitive.Content>): React.JSX.Element {
return (
<TooltipPrimitive.Portal>
<TooltipPrimitive.Content
data-slot="tooltip-content"
sideOffset={sideOffset}
className={cn(
"bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
className
)}
{...props}
>
{children}
<TooltipPrimitive.Arrow className="bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
</TooltipPrimitivloadGearPool function · typescript · L74-L89 (16 LOC)src/data/loaders.ts
export function loadGearPool(): GearPool {
const equipment = loadEquipment();
return {
chestplates: equipment.filter((e) => e.slot === "chestplate"),
leggings: equipment.filter((e) => e.slot === "leggings"),
accessories: equipment.filter((e) =>
e.slot === "accessory" ||
e.slot === "accessory-H" ||
e.slot === "accessory-A",
),
enchantments: loadEnchantments(),
modifiers: loadModifiers(),
gems: loadGems(),
};
}extractItems function · typescript · L26-L34 (9 LOC)src/data/merged-loaders.ts
function extractItems<T extends { readonly id: string }>(
merged: readonly MergedItem<T>[],
enabledIds: ReadonlySet<string>,
): readonly T[] {
return merged
.filter((m) => !m.isDeleted)
.filter((m) => m.source === "user" || enabledIds.has(m.item.id))
.map((m) => m.item);
}page 1 / 9next ›