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
36 changes: 34 additions & 2 deletions apps/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,39 @@
"@hookform/resolvers": "^3.3.4",
"@monaco-editor/react": "4.7.0",
"@phosphor-icons/react": "^2.1.10",
"@radix-ui/react-accordion": "^1.2.1",
"@radix-ui/react-alert-dialog": "^1.1.2",
"@radix-ui/react-aspect-ratio": "^1.1.0",
"@radix-ui/react-avatar": "^1.1.1",
"@radix-ui/react-checkbox": "^1.1.2",
"@radix-ui/react-collapsible": "^1.1.1",
"@radix-ui/react-context": "^1.1.1",
"@radix-ui/react-context-menu": "^2.2.2",
"@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-dropdown-menu": "^2.1.2",
"@radix-ui/react-hover-card": "^1.1.2",
"@radix-ui/react-icons": "^1.3.1",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-menubar": "^1.1.2",
"@radix-ui/react-navigation-menu": "^1.2.1",
"@radix-ui/react-popover": "^1.1.2",
"@radix-ui/react-progress": "^1.1.0",
"@radix-ui/react-radio-group": "^1.2.1",
"@radix-ui/react-scroll-area": "^1.2.0",
"@radix-ui/react-select": "^2.1.2",
"@radix-ui/react-separator": "^1.1.0",
"@radix-ui/react-slider": "^1.2.1",
"@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-switch": "^1.1.1",
"@radix-ui/react-tabs": "^1.1.1",
"@radix-ui/react-toast": "^1.2.2",
"@radix-ui/react-toggle": "^1.1.0",
"@radix-ui/react-toggle-group": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.3",
"@react-hook/resize-observer": "^2.0.2",
"@sentry/nextjs": "^10.11.0",
"@stackframe/stack": "workspace:*",
"@stackframe/stack-shared": "workspace:*",
"@stackframe/stack-ui": "workspace:*",
"@stripe/connect-js": "^3.3.27",
"@stripe/react-connect-js": "^3.3.24",
"@stripe/react-stripe-js": "^3.8.1",
Expand All @@ -42,10 +68,14 @@
"@vercel/speed-insights": "^1.0.12",
"browser-image-compression": "^2.0.2",
"canvas-confetti": "^1.9.2",
"clsx": "^2.0.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"cmdk": "^1.0.4",
"date-fns": "^3.6.0",
"dotenv-cli": "^7.3.0",
"export-to-csv": "^1.4.0",
"geist": "^1",
"input-otp": "^1.4.1",
"jose": "^5.2.2",
"lodash": "^4.17.21",
"lucide-react": "^0.508.0",
Expand All @@ -55,8 +85,10 @@
"react": "19.2.1",
"react-dom": "19.2.1",
"react-globe.gl": "^2.28.2",
"react-day-picker": "^9.6.7",
"react-hook-form": "^7.53.1",
"react-icons": "^5.0.1",
"react-resizable-panels": "^2.1.6",
"react-markdown": "^9.0.1",
"react-syntax-highlighter": "^15.6.1",
"recharts": "^2.14.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { yupResolver } from "@hookform/resolvers/yup";
import { AuthPage, TeamSwitcher, useUser } from "@stackframe/stack";
import { allProviders } from "@stackframe/stack-shared/dist/utils/oauth";
import { runAsynchronouslyWithAlert, wait } from "@stackframe/stack-shared/dist/utils/promises";
import { BrowserFrame, Button, Form, FormControl, FormField, FormItem, FormMessage, Separator, Typography } from "@stackframe/stack-ui";
import { BrowserFrame, Button, Form, FormControl, FormField, FormItem, FormMessage, Separator, Typography } from "@/components/ui";
import { useSearchParams } from "next/navigation";
import { useState } from "react";
import { useForm } from "react-hook-form";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Link } from "@/components/link";
import { Separator, Typography } from "@stackframe/stack-ui";
import { Separator, Typography } from "@/components/ui";
import { FaDiscord, FaGithub, FaLinkedin } from "react-icons/fa";

export default function Footer () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { strictEmailSchema, yupObject } from "@stackframe/stack-shared/dist/sche
import { groupBy } from "@stackframe/stack-shared/dist/utils/arrays";
import { runAsynchronously, wait } from "@stackframe/stack-shared/dist/utils/promises";
import { stringCompare } from "@stackframe/stack-shared/dist/utils/strings";
import { Button, Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, Input, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Skeleton, Typography, toast } from "@stackframe/stack-ui";
import { Button, Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, Input, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Skeleton, Typography, toast } from "@/components/ui";
import { Settings } from "lucide-react";
import { Suspense, useCallback, useEffect, useMemo, useState } from "react";
import * as yup from "yup";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
SelectItem,
SelectTrigger,
SelectValue
} from "@stackframe/stack-ui";
} from "@/components/ui";
import { PlusIcon } from "lucide-react";
import { useEffect, useState } from "react";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
CardHeader,
CardTitle,
Typography,
} from "@stackframe/stack-ui";
} from "@/components/ui";
import { useAdminApp, useProjectId } from '../use-admin-app';
import { DonutChartDisplay, LineChartDisplay, LineChartDisplayConfig } from './line-chart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { fromNow, isWeekend } from '@stackframe/stack-shared/dist/utils/dates';
import {
cn,
Typography
} from "@stackframe/stack-ui";
} from "@/components/ui";
import { useState } from "react";
import { Bar, BarChart, CartesianGrid, Cell, Pie, PieChart, TooltipProps, XAxis, YAxis } from "recharts";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import { Card, CardContent, cn } from '@stackframe/stack-ui';
import { Card, CardContent, cn } from '@/components/ui';
import { Loader2 } from 'lucide-react';

export function MetricsLoadingFallback({ className }: { className?: string }) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import useResizeObserver from '@react-hook/resize-observer';
import { useUser } from '@stackframe/stack';
import { ALL_APPS, type AppId } from "@stackframe/stack-shared/dist/apps/apps-config";
import { typedEntries } from "@stackframe/stack-shared/dist/utils/objects";
import { cn, Typography } from '@stackframe/stack-ui';
import { cn, Typography } from '@/components/ui';
import { ChevronUp, Compass, Globe2, LayoutGrid, MoreHorizontal } from "lucide-react";
import { Suspense, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
import { PageLayout } from "../page-layout";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { StyledLink } from '@/components/link';
import { useThemeWatcher } from '@/lib/theme';
import { use } from "@stackframe/stack-shared/dist/utils/react";
import { deindent } from '@stackframe/stack-shared/dist/utils/strings';
import { Button, Tabs, TabsContent, TabsList, TabsTrigger, Typography, cn } from "@stackframe/stack-ui";
import { Button, Tabs, TabsContent, TabsList, TabsTrigger, Typography, cn } from "@/components/ui";
import { Book, X } from "lucide-react";
import dynamic from "next/dynamic";
import Image from 'next/image';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useRouter } from "@/components/router";
import { ALL_APPS_FRONTEND, getAppPath } from "@/lib/apps-frontend";
import { AppId } from "@stackframe/stack-shared/dist/apps/apps-config";
import { wait } from "@stackframe/stack-shared/dist/utils/promises";
import { Dialog, DialogContent, DialogTitle } from "@stackframe/stack-ui";
import { Dialog, DialogContent, DialogTitle } from "@/components/ui";

export default function AppDetailsModalPageClient({ appId }: { appId: AppId }) {
const router = useRouter();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";
import { StyledLink } from "@/components/link";
import { SettingCard, SettingSwitch } from "@/components/settings";
import { Typography } from "@stackframe/stack-ui";
import { Typography } from "@/components/ui";
import { AppEnabledGuard } from "../app-enabled-guard";
import { PageLayout } from "../page-layout";
import { useAdminApp } from "../use-admin-app";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { useRouter } from "@/components/router";
import { AppId } from "@stackframe/stack-shared/dist/apps/apps-config";
import { Typography } from "@stackframe/stack-ui";
import { Typography } from "@/components/ui";
import type { ReactNode } from "react";
import { useEffect } from "react";
import { PageLayout } from "./page-layout";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AppSquare } from "@/components/app-square";
import { type AppId } from "@/lib/apps-frontend";
import { ALL_APPS } from "@stackframe/stack-shared/dist/apps/apps-config";
import { stringCompare } from "@stackframe/stack-shared/dist/utils/strings";
import { cn } from "@stackframe/stack-ui";
import { cn } from "@/components/ui";
import { CheckCircle2, LayoutGrid, Search } from "lucide-react";
import { useMemo, useState } from "react";
import { PageLayout } from "../page-layout";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { SettingCard, SettingSelect, SettingSwitch } from "@/components/settings";
import { AdminOAuthProviderConfig, AuthPage, OAuthProviderConfig } from "@stackframe/stack";
import { allProviders } from "@stackframe/stack-shared/dist/utils/oauth";
import { ActionDialog, Badge, BrandIcons, BrowserFrame, Button, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, Input, SelectItem, SimpleTooltip, Typography } from "@stackframe/stack-ui";
import { ActionDialog, Badge, BrandIcons, BrowserFrame, Button, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, Input, SelectItem, SimpleTooltip, Typography } from "@/components/ui";
import { AsteriskSquare, CirclePlus, Key, Link2, MoreHorizontal } from "lucide-react";
import { useState } from "react";
import { CardSubtitle } from "../../../../../../../../../packages/stack-ui/dist/components/ui/card";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { getPublicEnvVar } from '@/lib/env';
import { AdminProject } from "@stackframe/stack";
import { yupBoolean, yupObject, yupString } from "@stackframe/stack-shared/dist/schema-fields";
import { sharedProviders } from "@stackframe/stack-shared/dist/utils/oauth";
import { ActionDialog, Badge, BrandIcons, InlineCode, Label, SimpleTooltip, Typography, buttonVariants, cn } from "@stackframe/stack-ui";
import { ActionDialog, Badge, BrandIcons, InlineCode, Label, SimpleTooltip, Typography, buttonVariants, cn } from "@/components/ui";
import clsx from "clsx";
import { ArrowRight } from "lucide-react";
import { useState } from "react";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { CodeBlock } from "@/components/code-block";
import { deindent } from "@stackframe/stack-shared/dist/utils/strings";
import { Button, Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, Input, Label, toast } from "@stackframe/stack-ui";
import { Button, Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, Input, Label, toast } from "@/components/ui";
import { ArrowLeft, Check, Copy, Edit2, Trash2, X } from "lucide-react";
import { useState } from "react";
import { useRouter } from "../../../../../../../../components/router";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"use client";

import { getUserSpecifiedIdErrorMessage, isValidUserSpecifiedId, sanitizeUserSpecifiedId } from "@stackframe/stack-shared/dist/schema-fields";
import { typedEntries } from "@stackframe/stack-shared/dist/utils/objects";
import { Button, Card, CardContent, CardHeader, Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, Input, Label, toast } from "@stackframe/stack-ui";
import { Button, Card, CardContent, CardHeader, Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, Input, Label, toast } from "@/components/ui";
import { Database, Plus } from "lucide-react";
import { useState } from "react";
import { useRouter } from "../../../../../../../components/router";
Expand All @@ -28,8 +29,8 @@ export default function PageClient() {
return;
}

if (!newStoreId.match(/^[a-z0-9-]+$/)) {
alert("Store ID can only contain lowercase letters, numbers, and hyphens");
if (!isValidUserSpecifiedId(newStoreId)) {
alert(getUserSpecifiedIdErrorMessage("storeId"));
return;
}

Expand Down Expand Up @@ -132,11 +133,10 @@ export default function PageClient() {
id="storeId"
placeholder="e.g., user-secrets, api-keys"
value={newStoreId}
onChange={(e) => setNewStoreId(e.target.value)}
pattern="[a-z0-9-]+"
onChange={(e) => setNewStoreId(sanitizeUserSpecifiedId(e.target.value))}
/>
<p className="text-xs text-muted-foreground">
Lowercase letters, numbers, and hyphens only
Letters, numbers, underscores, and hyphens only (cannot start with a hyphen)
</p>
</div>
<div className="space-y-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { AdminDomainConfig, AdminProject } from "@stackframe/stack";
import { yupString } from "@stackframe/stack-shared/dist/schema-fields";
import { StackAssertionError } from "@stackframe/stack-shared/dist/utils/errors";
import { isValidHostnameWithWildcards, isValidUrl } from "@stackframe/stack-shared/dist/utils/urls";
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionCell, ActionDialog, Alert, Button, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Typography } from "@stackframe/stack-ui";
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionCell, ActionDialog, Alert, Button, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Typography } from "@/components/ui";
import React from "react";
import * as yup from "yup";
import { AppEnabledGuard } from "../app-enabled-guard";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { AssistantChat, CodeEditor, VibeCodeLayout } from "@/components/vibe-cod
import { ToolCallContent, createChatAdapter, createHistoryAdapter } from "@/components/vibe-coding/chat-adapters";
import { EmailDraftUI } from "@/components/vibe-coding/draft-tool-components";
import { KnownErrors } from "@stackframe/stack-shared/dist/known-errors";
import { Badge, Button, Card, CardContent, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Skeleton, Typography, toast, useToast } from "@stackframe/stack-ui";
import { Badge, Button, Card, CardContent, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Skeleton, Typography, toast, useToast } from "@/components/ui";
import { Suspense, useEffect, useMemo, useState } from "react";
import { AppEnabledGuard } from "../../app-enabled-guard";
import { useAdminApp } from "../../use-admin-app";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { FormDialog } from "@/components/form-dialog";
import { InputField } from "@/components/form-fields";
import { useRouter } from "@/components/router";
import { ActionDialog, Alert, AlertDescription, AlertTitle, Button, Card, Typography } from "@stackframe/stack-ui";
import { ActionDialog, Alert, AlertDescription, AlertTitle, Button, Card, Typography } from "@/components/ui";
import { AlertCircle } from "lucide-react";
import { useState } from "react";
import * as yup from "yup";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from "@/components/vibe-coding";
import { ToolCallContent } from "@/components/vibe-coding/chat-adapters";
import { KnownErrors } from "@stackframe/stack-shared/dist/known-errors";
import { Button, toast } from "@stackframe/stack-ui";
import { Button, toast } from "@/components/ui";
import { useEffect, useState } from "react";
import { AppEnabledGuard } from "../../app-enabled-guard";
import { PageLayout } from "../../page-layout";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { FormDialog } from "@/components/form-dialog";
import { InputField } from "@/components/form-fields";
import { useRouter } from "@/components/router";
import { ActionDialog, Alert, AlertDescription, AlertTitle, Button, Card, Typography } from "@stackframe/stack-ui";
import { ActionDialog, Alert, AlertDescription, AlertTitle, Button, Card, Typography } from "@/components/ui";
import { AlertCircle } from "lucide-react";
import { useState } from "react";
import * as yup from "yup";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from "@/components/vibe-coding/chat-adapters";
import { previewTemplateSource } from "@stackframe/stack-shared/dist/helpers/emails";
import { KnownErrors } from "@stackframe/stack-shared/dist/known-errors";
import { Button, toast } from "@stackframe/stack-ui";
import { Button, toast } from "@/components/ui";
import { useEffect, useState } from "react";
import { AppEnabledGuard } from "../../app-enabled-guard";
import { useAdminApp } from "../../use-admin-app";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { useRouter } from "@/components/router";
import { SettingCard } from "@/components/settings";
import { previewTemplateSource } from "@stackframe/stack-shared/dist/helpers/emails";
import { throwErr } from "@stackframe/stack-shared/dist/utils/errors";
import { ActionDialog, Button, Typography } from "@stackframe/stack-ui";
import { ActionDialog, Button, Typography } from "@/components/ui";
import { Check, Pencil } from "lucide-react";
import { useState } from "react";
import * as yup from "yup";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { strictEmailSchema } from "@stackframe/stack-shared/dist/schema-fields";
import { throwErr } from "@stackframe/stack-shared/dist/utils/errors";
import { deepPlainEquals } from "@stackframe/stack-shared/dist/utils/objects";
import { runAsynchronously } from "@stackframe/stack-shared/dist/utils/promises";
import { ActionDialog, Alert, AlertDescription, AlertTitle, Button, DataTable, SimpleTooltip, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typography, useToast } from "@stackframe/stack-ui";
import { ActionDialog, Alert, AlertDescription, AlertTitle, Button, DataTable, SimpleTooltip, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typography, useToast } from "@/components/ui";
import { ColumnDef } from "@tanstack/react-table";
import { AlertCircle, X } from "lucide-react";
import { useEffect, useMemo, useState } from "react";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { Alert, Button, Card, CardContent, CardHeader, CardTitle, Input, Textarea, Typography } from "@stackframe/stack-ui";
import { Alert, Button, Card, CardContent, CardHeader, CardTitle, Input, Textarea, Typography } from "@/components/ui";
import React from "react";
import { PageLayout } from "../page-layout";
import { useAdminApp } from "../use-admin-app";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
TabsTrigger,
Typography,
cn
} from "@stackframe/stack-ui";
} from "@/components/ui";
import * as confetti from "canvas-confetti";
import { CheckCircle2, ChevronDown, ChevronUp, Circle, Clock } from "lucide-react";
import { useEffect, useRef, useState } from "react";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cn, Typography } from "@stackframe/stack-ui";
import { cn, Typography } from "@/components/ui";
import React from "react";

export function PageLayout(props: {
Expand Down
Loading
Loading