diff --git a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/CLAUDE.md b/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/CLAUDE.md index d584e0b8e2..b3c32fe33f 100644 --- a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/CLAUDE.md +++ b/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/CLAUDE.md @@ -38,7 +38,7 @@ export const querySchemas = { ```typescript // client/src/App.tsx -import { BarChart } from '@databricks/app-kit-ui/react'; +import { BarChart } from '@databricks/appkit-ui/react'; ``` @@ -73,7 +73,7 @@ See the databricks experimental apps-mcp tools validate instead of running these **IMPORTANT**: Read the relevant docs below before implementing features. They contain critical information about common pitfalls (e.g., SQL numeric type handling, schema definitions, Radix UI constraints). - [SQL Queries](docs/sql-queries.md) - query files, schemas, type handling, parameterization -- [App Kit SDK](docs/app-kit-sdk.md) - TypeScript imports, server setup, useAnalyticsQuery hook +- [App Kit SDK](docs/appkit-sdk.md) - TypeScript imports, server setup, useAnalyticsQuery hook - [Frontend](docs/frontend.md) - visualization components, styling, layout, Radix constraints - [tRPC](docs/trpc.md) - custom endpoints for non-SQL operations (mutations, Databricks APIs) - [Testing](docs/testing.md) - vitest unit tests, Playwright smoke/E2E tests diff --git a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/App.tsx b/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/App.tsx index 293b719ec1..3701eafcd7 100644 --- a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/App.tsx +++ b/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/App.tsx @@ -1,10 +1,22 @@ -import { useAnalyticsQuery, AreaChart, LineChart, RadarChart } from '@databricks/app-kit-ui/react'; -import { sql } from "@databricks/app-kit-ui/js"; +import { + useAnalyticsQuery, + AreaChart, + LineChart, + RadarChart, + Card, + CardContent, + CardHeader, + CardTitle, + Skeleton, + Label, + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from '@databricks/appkit-ui/react'; +import { sql } from "@databricks/appkit-ui/js"; import { Line, XAxis, YAxis, CartesianGrid, Tooltip } from 'recharts'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; -import { Skeleton } from '@/components/ui/skeleton'; -import { Label } from '@/components/ui/label'; -import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; import { trpc } from './lib/trpc'; import { useState, useEffect } from 'react'; @@ -98,8 +110,8 @@ function App() { {health && (
-
-
{health.status.toUpperCase()}
+
+
{health.status.toUpperCase()}
Last checked: {new Date(health.timestamp).toLocaleString()} diff --git a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/ErrorBoundary.tsx b/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/ErrorBoundary.tsx index 2e6927270f..6a73c26ce4 100644 --- a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/ErrorBoundary.tsx +++ b/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/ErrorBoundary.tsx @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import type { ReactNode } from 'react'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { Card, CardContent, CardHeader, CardTitle } from '@databricks/appkit-ui/react'; interface Props { children: ReactNode; diff --git a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/appKitTypes.d.ts b/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/appKitTypes.d.ts index c59743c3ea..21846292cf 100644 --- a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/appKitTypes.d.ts +++ b/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/appKitTypes.d.ts @@ -1,7 +1,7 @@ // Auto-generated by AppKit - DO NOT EDIT -import "@databricks/app-kit-ui/react"; +import "@databricks/appkit-ui/react"; -declare module "@databricks/app-kit-ui/react" { +declare module "@databricks/appkit-ui/react" { interface PluginRegistry { "analytics": { "/users/me/query/:query_key": { diff --git a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/accordion.tsx b/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/accordion.tsx deleted file mode 100644 index 94326cf017..0000000000 --- a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/accordion.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import * as React from 'react'; -import * as AccordionPrimitive from '@radix-ui/react-accordion'; -import { ChevronDownIcon } from 'lucide-react'; - -import { cn } from '@/lib/utils'; - -function Accordion({ ...props }: React.ComponentProps) { - return ; -} - -function AccordionItem({ className, ...props }: React.ComponentProps) { - return ( - - ); -} - -function AccordionTrigger({ className, children, ...props }: React.ComponentProps) { - return ( - - svg]:rotate-180', - className - )} - {...props} - > - {children} - - - - ); -} - -function AccordionContent({ className, children, ...props }: React.ComponentProps) { - return ( - -
{children}
-
- ); -} - -export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }; diff --git a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/alert-dialog.tsx b/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/alert-dialog.tsx deleted file mode 100644 index cd2513fd09..0000000000 --- a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/alert-dialog.tsx +++ /dev/null @@ -1,111 +0,0 @@ -import * as React from 'react'; -import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'; - -import { cn } from '@/lib/utils'; -import { buttonVariants } from '@/components/ui/button'; - -function AlertDialog({ ...props }: React.ComponentProps) { - return ; -} - -function AlertDialogTrigger({ ...props }: React.ComponentProps) { - return ; -} - -function AlertDialogPortal({ ...props }: React.ComponentProps) { - return ; -} - -function AlertDialogOverlay({ className, ...props }: React.ComponentProps) { - return ( - - ); -} - -function AlertDialogContent({ className, ...props }: React.ComponentProps) { - return ( - - - - - ); -} - -function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>) { - return ( -
- ); -} - -function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>) { - return ( -
- ); -} - -function AlertDialogTitle({ className, ...props }: React.ComponentProps) { - return ( - - ); -} - -function AlertDialogDescription({ - className, - ...props -}: React.ComponentProps) { - return ( - - ); -} - -function AlertDialogAction({ className, ...props }: React.ComponentProps) { - return ; -} - -function AlertDialogCancel({ className, ...props }: React.ComponentProps) { - return ; -} - -export { - AlertDialog, - AlertDialogPortal, - AlertDialogOverlay, - AlertDialogTrigger, - AlertDialogContent, - AlertDialogHeader, - AlertDialogFooter, - AlertDialogTitle, - AlertDialogDescription, - AlertDialogAction, - AlertDialogCancel, -}; diff --git a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/alert.tsx b/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/alert.tsx deleted file mode 100644 index 2b3ea01b1e..0000000000 --- a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/alert.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import * as React from 'react'; -import { cva, type VariantProps } from 'class-variance-authority'; - -import { cn } from '@/lib/utils'; - -const alertVariants = cva( - 'relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current', - { - variants: { - variant: { - default: 'bg-card text-card-foreground', - destructive: - 'text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90', - }, - }, - defaultVariants: { - variant: 'default', - }, - } -); - -function Alert({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps) { - return
; -} - -function AlertTitle({ className, ...props }: React.ComponentProps<'div'>) { - return ( -
- ); -} - -function AlertDescription({ className, ...props }: React.ComponentProps<'div'>) { - return ( -
- ); -} - -export { Alert, AlertTitle, AlertDescription }; diff --git a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/aspect-ratio.tsx b/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/aspect-ratio.tsx deleted file mode 100644 index 862b3bcd7c..0000000000 --- a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/aspect-ratio.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio'; - -function AspectRatio({ ...props }: React.ComponentProps) { - return ; -} - -export { AspectRatio }; diff --git a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/avatar.tsx b/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/avatar.tsx deleted file mode 100644 index d98f028d8a..0000000000 --- a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/avatar.tsx +++ /dev/null @@ -1,34 +0,0 @@ -'use client'; - -import * as React from 'react'; -import * as AvatarPrimitive from '@radix-ui/react-avatar'; - -import { cn } from '@/lib/utils'; - -function Avatar({ className, ...props }: React.ComponentProps) { - return ( - - ); -} - -function AvatarImage({ className, ...props }: React.ComponentProps) { - return ( - - ); -} - -function AvatarFallback({ className, ...props }: React.ComponentProps) { - return ( - - ); -} - -export { Avatar, AvatarImage, AvatarFallback }; diff --git a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/badge.tsx b/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/badge.tsx deleted file mode 100644 index 0338a5ab18..0000000000 --- a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/badge.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import * as React from 'react'; -import { Slot } from '@radix-ui/react-slot'; -import { cva, type VariantProps } from 'class-variance-authority'; - -import { cn } from '@/lib/utils'; - -const badgeVariants = cva( - 'inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none 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 transition-[color,box-shadow] overflow-hidden', - { - variants: { - variant: { - default: 'border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90', - secondary: 'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90', - destructive: - 'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/70', - outline: 'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground', - }, - }, - defaultVariants: { - variant: 'default', - }, - } -); - -function Badge({ - className, - variant, - asChild = false, - ...props -}: React.ComponentProps<'span'> & VariantProps & { asChild?: boolean }) { - const Comp = asChild ? Slot : 'span'; - - return ; -} - -export { Badge, badgeVariants }; diff --git a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/breadcrumb.tsx b/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/breadcrumb.tsx deleted file mode 100644 index d3bbf08483..0000000000 --- a/experimental/apps-mcp/templates/appkit/template/{{.project_name}}/client/src/components/ui/breadcrumb.tsx +++ /dev/null @@ -1,92 +0,0 @@ -import * as React from 'react'; -import { Slot } from '@radix-ui/react-slot'; -import { ChevronRight, MoreHorizontal } from 'lucide-react'; - -import { cn } from '@/lib/utils'; - -function Breadcrumb({ ...props }: React.ComponentProps<'nav'>) { - return