Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions apps/loopover-miner-ui/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
dist
.output
.vinxi
package-lock.json
routeTree.gen.ts
3 changes: 2 additions & 1 deletion apps/loopover-miner-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"typecheck": "tsc --noEmit",
"lint": "eslint .",
"test": "vitest run --coverage",
"format": "prettier --write ."
"format": "prettier --write .",
"format:check": "prettier --check ."
},
"dependencies": {
"@loopover/ui-kit": ">=0.1.0 <2.0.0",
Expand Down
6 changes: 6 additions & 0 deletions apps/loopover-ui/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ pnpm-lock.yaml
package-lock.json
bun.lock
routeTree.gen.ts
# Generated -- regenerated by npm run ui:openapi; formatting churn only creates drift-check noise.
public/openapi.json
# Hand-authored docs content: prettier's mdx pass reformats the template-literal code inside
# <CodeBlock code={`...`}> attributes, destroying embedded YAML/compose indentation (#8182 fallout,
# repaired once already). Docs mdx is deliberately formatter-free.
content/docs
3 changes: 2 additions & 1 deletion apps/loopover-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"typecheck": "tsc --noEmit",
"lint": "eslint .",
"test": "vitest run",
"format": "prettier --write ."
"format": "prettier --write .",
"format:check": "prettier --check ."
},
"dependencies": {
"@loopover/ui-kit": ">=0.1.0 <2.0.0",
Expand Down
6 changes: 3 additions & 3 deletions apps/loopover-ui/src/chat-ui-primitives-audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ against the four primitives #6230 will eventually need. No code changes accompan
- **`apps/loopover-ui/src/components/site/command-palette.tsx`** (`CommandPalette`) has the only
bare `<input>` + live-filtered scrollable `<ul>` combination in the app (⌘K-triggered, `Escape`
closes it, results navigate on click). It's close to "text input driving a list," but it is a
*search-and-navigate* palette, not a composer: there's no `onKeyDown` handling for `Enter` at all
_search-and-navigate_ palette, not a composer: there's no `onKeyDown` handling for `Enter` at all
(results are selected by click, not by keyboard submit), no multi-line/auto-grow textarea, and no
concept of "submit this text as a message." A submit-on-Enter composer would need to be built new,
informed by this file's open/close and keyboard-listener patterns rather than by reusing its input.
Expand All @@ -61,11 +61,11 @@ against the four primitives #6230 will eventually need. No code changes accompan
- **A live streaming-text consumer.** Grepping `apps/loopover-ui/src` for
`EventSource|ReadableStream|text/event-stream|streaming` returns exactly one hit outside this
audit: a comment in `apps/loopover-ui/src/lib/analytics-proxy.ts` explaining that the analytics
proxy buffers its (tiny) request body specifically so it does *not* need a streaming/duplex
proxy buffers its (tiny) request body specifically so it does _not_ need a streaming/duplex
request — i.e. the one file that mentions "streaming" is explicitly the case of avoiding it. There
is no code anywhere in the app that consumes an `EventSource`, a `fetch` response's `ReadableStream`
body, or a `text/event-stream` response today. `animated-terminal.tsx` (above) is the closest
*rendering* precedent, but it has no real stream to consume from.
_rendering_ precedent, but it has no real stream to consume from.
- **A chat-bubble / message-list component.** Nothing pairs an avatar, a role-colored bubble, and a
timestamp into a reusable per-message unit. `audit-feed.tsx`'s table rows are the nearest list
pattern, but as noted above they're tabular, not conversational.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"ui:kit:build": "npm run build --workspace @loopover/ui-kit",
"ui:build": "npm run ui:kit:build && turbo run build --filter=@loopover/engine && npm run ui:openapi && npm run extension:build && npm run miner-extension:build && npm --workspace @loopover/ui run build && npm --workspace @loopover/ui-miner run build",
"ui:preview": "npm run ui:build && wrangler dev --config apps/loopover-ui/dist/server/wrangler.json --ip 127.0.0.1 --port 4173 --local",
"ui:lint": "npm run ui:kit:build && npm --workspace @loopover/ui run lint && npm --workspace @loopover/ui-miner run lint",
"ui:lint": "npm run ui:kit:build && npm --workspace @loopover/ui-kit run format:check && npm --workspace @loopover/ui run format:check && npm --workspace @loopover/ui run lint && npm --workspace @loopover/ui-miner run format:check && npm --workspace @loopover/ui-miner run lint",
"ui:typecheck": "npm run ui:kit:build && npm --workspace @loopover/ui run typecheck && npm --workspace @loopover/ui-miner run typecheck",
"preui:test": "npm run check-node-version",
"ui:test": "npm run ui:kit:build && npm --workspace @loopover/ui run test && npm --workspace @loopover/ui-miner run test && npm --workspace @loopover/miner-extension run test",
Expand Down
3 changes: 3 additions & 0 deletions packages/loopover-ui-kit/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
CHANGELOG.md
4 changes: 3 additions & 1 deletion packages/loopover-ui-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
"scripts": {
"build": "tsc -p tsconfig.json",
"typecheck": "tsc -p tsconfig.json --noEmit",
"test": "vitest run"
"test": "vitest run",
"format": "prettier --write .",
"format:check": "prettier --check ."
},
"peerDependencies": {
"react": "^19.2.7",
Expand Down
6 changes: 5 additions & 1 deletion packages/loopover-ui-kit/src/components/accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ const AccordionItem = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
>(({ className, ...props }, ref) => (
<AccordionPrimitive.Item ref={ref} className={cn("border-b", className)} {...props} />
<AccordionPrimitive.Item
ref={ref}
className={cn("border-b", className)}
{...props}
/>
));
AccordionItem.displayName = "AccordionItem";

Expand Down
38 changes: 31 additions & 7 deletions packages/loopover-ui-kit/src/components/alert-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,29 @@ const AlertDialogContent = React.forwardRef<
));
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;

const AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
<div className={cn("flex flex-col space-y-2 text-center sm:text-left", className)} {...props} />
const AlertDialogHeader = ({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) => (
<div
className={cn(
"flex flex-col space-y-2 text-center sm:text-left",
className,
)}
{...props}
/>
);
AlertDialogHeader.displayName = "AlertDialogHeader";

const AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
const AlertDialogFooter = ({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) => (
<div
className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)}
className={cn(
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
className,
)}
{...props}
/>
);
Expand Down Expand Up @@ -78,13 +93,18 @@ const AlertDialogDescription = React.forwardRef<
{...props}
/>
));
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
AlertDialogDescription.displayName =
AlertDialogPrimitive.Description.displayName;

const AlertDialogAction = React.forwardRef<
React.ElementRef<typeof AlertDialogPrimitive.Action>,
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
>(({ className, ...props }, ref) => (
<AlertDialogPrimitive.Action ref={ref} className={cn(buttonVariants(), className)} {...props} />
<AlertDialogPrimitive.Action
ref={ref}
className={cn(buttonVariants(), className)}
{...props}
/>
));
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;

Expand All @@ -94,7 +114,11 @@ const AlertDialogCancel = React.forwardRef<
>(({ className, ...props }, ref) => (
<AlertDialogPrimitive.Cancel
ref={ref}
className={cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className)}
className={cn(
buttonVariants({ variant: "outline" }),
"mt-2 sm:mt-0",
className,
)}
{...props}
/>
));
Expand Down
32 changes: 21 additions & 11 deletions packages/loopover-ui-kit/src/components/alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,36 @@ const Alert = React.forwardRef<
HTMLDivElement,
React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
>(({ className, variant, ...props }, ref) => (
<div ref={ref} role="alert" className={cn(alertVariants({ variant }), className)} {...props} />
<div
ref={ref}
role="alert"
className={cn(alertVariants({ variant }), className)}
{...props}
/>
));
Alert.displayName = "Alert";

const AlertTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(
({ className, ...props }, ref) => (
<h5
ref={ref}
className={cn("mb-1 font-medium leading-none tracking-tight", className)}
{...props}
/>
),
);
const AlertTitle = React.forwardRef<
HTMLParagraphElement,
React.HTMLAttributes<HTMLHeadingElement>
>(({ className, ...props }, ref) => (
<h5
ref={ref}
className={cn("mb-1 font-medium leading-none tracking-tight", className)}
{...props}
/>
));
AlertTitle.displayName = "AlertTitle";

const AlertDescription = React.forwardRef<
HTMLParagraphElement,
React.HTMLAttributes<HTMLParagraphElement>
>(({ className, ...props }, ref) => (
<div ref={ref} className={cn("text-sm [&_p]:leading-relaxed", className)} {...props} />
<div
ref={ref}
className={cn("text-sm [&_p]:leading-relaxed", className)}
{...props}
/>
));
AlertDescription.displayName = "AlertDescription";

Expand Down
5 changes: 4 additions & 1 deletion packages/loopover-ui-kit/src/components/avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ const Avatar = React.forwardRef<
>(({ className, ...props }, ref) => (
<AvatarPrimitive.Root
ref={ref}
className={cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className)}
className={cn(
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
className,
)}
{...props}
/>
));
Expand Down
14 changes: 10 additions & 4 deletions packages/loopover-ui-kit/src/components/badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ const badgeVariants = cva(
{
variants: {
variant: {
default: "border-transparent bg-primary text-primary-foreground hover:brightness-110",
secondary: "border-transparent bg-muted text-foreground hover:bg-muted/70",
default:
"border-transparent bg-primary text-primary-foreground hover:brightness-110",
secondary:
"border-transparent bg-muted text-foreground hover:bg-muted/70",
destructive:
"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/90",
outline: "text-foreground bg-transparent",
Expand All @@ -22,10 +24,14 @@ const badgeVariants = cva(
);

export interface BadgeProps
extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}
extends
React.HTMLAttributes<HTMLDivElement>,
VariantProps<typeof badgeVariants> {}

function Badge({ className, variant, ...props }: BadgeProps) {
return <div className={cn(badgeVariants({ variant }), className)} {...props} />;
return (
<div className={cn(badgeVariants({ variant }), className)} {...props} />
);
}

export { Badge, badgeVariants };
76 changes: 45 additions & 31 deletions packages/loopover-ui-kit/src/components/breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,31 @@ const Breadcrumb = React.forwardRef<
>(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />);
Breadcrumb.displayName = "Breadcrumb";

const BreadcrumbList = React.forwardRef<HTMLOListElement, React.ComponentPropsWithoutRef<"ol">>(
({ className, ...props }, ref) => (
<ol
ref={ref}
className={cn(
"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
className,
)}
{...props}
/>
),
);
const BreadcrumbList = React.forwardRef<
HTMLOListElement,
React.ComponentPropsWithoutRef<"ol">
>(({ className, ...props }, ref) => (
<ol
ref={ref}
className={cn(
"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
className,
)}
{...props}
/>
));
BreadcrumbList.displayName = "BreadcrumbList";

const BreadcrumbItem = React.forwardRef<HTMLLIElement, React.ComponentPropsWithoutRef<"li">>(
({ className, ...props }, ref) => (
<li ref={ref} className={cn("inline-flex items-center gap-1.5", className)} {...props} />
),
);
const BreadcrumbItem = React.forwardRef<
HTMLLIElement,
React.ComponentPropsWithoutRef<"li">
>(({ className, ...props }, ref) => (
<li
ref={ref}
className={cn("inline-flex items-center gap-1.5", className)}
{...props}
/>
));
BreadcrumbItem.displayName = "BreadcrumbItem";

const BreadcrumbLink = React.forwardRef<
Expand All @@ -51,21 +57,26 @@ const BreadcrumbLink = React.forwardRef<
});
BreadcrumbLink.displayName = "BreadcrumbLink";

const BreadcrumbPage = React.forwardRef<HTMLSpanElement, React.ComponentPropsWithoutRef<"span">>(
({ className, ...props }, ref) => (
<span
ref={ref}
role="link"
aria-disabled="true"
aria-current="page"
className={cn("font-normal text-foreground", className)}
{...props}
/>
),
);
const BreadcrumbPage = React.forwardRef<
HTMLSpanElement,
React.ComponentPropsWithoutRef<"span">
>(({ className, ...props }, ref) => (
<span
ref={ref}
role="link"
aria-disabled="true"
aria-current="page"
className={cn("font-normal text-foreground", className)}
{...props}
/>
));
BreadcrumbPage.displayName = "BreadcrumbPage";

const BreadcrumbSeparator = ({ children, className, ...props }: React.ComponentProps<"li">) => (
const BreadcrumbSeparator = ({
children,
className,
...props
}: React.ComponentProps<"li">) => (
<li
role="presentation"
aria-hidden="true"
Expand All @@ -77,7 +88,10 @@ const BreadcrumbSeparator = ({ children, className, ...props }: React.ComponentP
);
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";

const BreadcrumbEllipsis = ({ className, ...props }: React.ComponentProps<"span">) => (
const BreadcrumbEllipsis = ({
className,
...props
}: React.ComponentProps<"span">) => (
<span
role="presentation"
aria-hidden="true"
Expand Down
13 changes: 10 additions & 3 deletions packages/loopover-ui-kit/src/components/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const buttonVariants = cva(
variant: {
default: "bg-primary text-primary-foreground hover:bg-primary/90",
accent: "bg-primary text-primary-foreground hover:brightness-110",
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
destructive:
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
outline:
"border-hairline bg-transparent text-foreground hover:bg-muted hover:border-strong",
secondary: "bg-muted text-foreground hover:bg-muted/70 border-hairline",
Expand All @@ -33,15 +34,21 @@ const buttonVariants = cva(
);

export interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
extends
React.ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof buttonVariants> {
asChild?: boolean;
}

const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : "button";
return (
<Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />
<Comp
className={cn(buttonVariants({ variant, size, className }))}
ref={ref}
{...props}
/>
);
},
);
Expand Down
Loading
Loading