@bahulam/code 0.1.6 → 0.1.8
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/LICENSE +1 -1
- package/NOTICE +6 -6
- package/README.md +11 -18
- package/package.json +11 -11
- package/src/agents/loader.mjs +1 -1
- package/src/agents/workflow_loader.mjs +2 -2
- package/src/auth/{tarang-auth.mjs → bahulam-auth.mjs} +4 -3
- package/src/commands/agent.mjs +3 -3
- package/src/commands/device.mjs +2 -2
- package/src/commands/pair.mjs +2 -2
- package/src/commands/remote.mjs +3 -3
- package/src/commands/workflow.mjs +5 -5
- package/src/config/env.mjs +9 -2
- package/src/config/memory-loader.mjs +1 -1
- package/src/config/model-catalog-default.json +4 -3
- package/src/config/model-catalog.mjs +2 -0
- package/src/config/settings.mjs +2 -2
- package/src/context/prose-chunker.mjs +162 -5
- package/src/core/agent-loop.mjs +17 -0
- package/src/core/attachments.mjs +66 -4
- package/src/core/backend-url.mjs +11 -12
- package/src/core/bundled-runtime.mjs +1 -1
- package/src/core/callback-client.mjs +1 -1
- package/src/core/headless.mjs +18 -4
- package/src/core/jsonl-writer.mjs +18 -18
- package/src/core/lint-resolver.mjs +472 -0
- package/src/core/local-agent.mjs +40 -8
- package/src/core/local-store.mjs +5 -1
- package/src/core/mode-selector.mjs +1 -1
- package/src/core/output-filter.mjs +22 -26
- package/src/core/pricing.mjs +10 -3
- package/src/core/project-artifacts.mjs +3 -3
- package/src/core/project-context-loader.mjs +9 -9
- package/src/core/settings-sync.mjs +1 -1
- package/src/core/stagnation.mjs +61 -1
- package/src/core/stream-client.mjs +13 -8
- package/src/core/system-prompt.mjs +2 -2
- package/src/core/tool-executor.mjs +178 -84
- package/src/daemon/http-dashboard.mjs +400 -0
- package/src/daemon/session-core.mjs +1 -0
- package/src/local-service/agent-relay.mjs +868 -0
- package/src/local-service/approval-bridge.mjs +222 -0
- package/src/local-service/browser.mjs +24 -0
- package/src/local-service/command.mjs +155 -0
- package/src/local-service/file-access.mjs +393 -0
- package/src/local-service/machine.mjs +86 -0
- package/src/local-service/paths.mjs +29 -0
- package/src/local-service/preview-converters.mjs +260 -0
- package/src/local-service/server.mjs +2644 -0
- package/src/local-service/session-store.mjs +221 -0
- package/src/mcp/client.mjs +4 -4
- package/src/onboarding/preflight.mjs +2 -2
- package/src/terminal/agents.mjs +2 -2
- package/src/terminal/analytics.mjs +2 -6
- package/src/terminal/ansi.mjs +11 -3
- package/src/terminal/main.mjs +43 -17
- package/src/terminal/model-catalog-display.mjs +111 -0
- package/src/terminal/repl-format.mjs +4 -1
- package/src/terminal/repl-model-form.mjs +81 -14
- package/src/terminal/repl-render.mjs +37 -7
- package/src/terminal/repl-resume.mjs +2 -2
- package/src/terminal/repl-state.mjs +12 -0
- package/src/terminal/repl.mjs +248 -70
- package/src/terminal/tool-display.mjs +32 -0
- package/src/terminal/watch-state.mjs +118 -0
- package/src/tools/agent.mjs +2 -2
- package/src/tools/analyze-image.mjs +158 -0
- package/src/tools/bash.mjs +11 -9
- package/src/tools/generate-image.mjs +411 -0
- package/src/tools/lint.mjs +24 -43
- package/src/tools/project-overview.mjs +12 -12
- package/src/tools/registry.mjs +4 -0
- package/src/ui/formatter.mjs +2 -2
- package/src/ui/icons.mjs +2 -0
- package/src/ui/input-dock.mjs +7 -7
- package/src/ui/palette.mjs +1 -1
- package/src/ui/slash-commands.mjs +4 -6
- package/src/ui/spinner.mjs +1 -1
- package/src/ui/term.mjs +2 -6
- package/src/ui/tool-card.mjs +81 -6
- package/pulse/app/activity/page.tsx +0 -190
- package/pulse/app/api/activity/route.ts +0 -138
- package/pulse/app/api/benchmark/route.ts +0 -113
- package/pulse/app/api/benchmarks/route.ts +0 -195
- package/pulse/app/api/costs/route.ts +0 -88
- package/pulse/app/api/export/route.ts +0 -77
- package/pulse/app/api/history/route.ts +0 -11
- package/pulse/app/api/import/route.ts +0 -31
- package/pulse/app/api/memory/route.ts +0 -50
- package/pulse/app/api/plans/route.ts +0 -9
- package/pulse/app/api/projects/[slug]/route.ts +0 -96
- package/pulse/app/api/projects/route.ts +0 -121
- package/pulse/app/api/sessions/[id]/replay/route.ts +0 -20
- package/pulse/app/api/sessions/[id]/route.ts +0 -31
- package/pulse/app/api/sessions/route.ts +0 -112
- package/pulse/app/api/settings/route.ts +0 -14
- package/pulse/app/api/stats/route.ts +0 -143
- package/pulse/app/api/todos/route.ts +0 -9
- package/pulse/app/api/tools/route.ts +0 -160
- package/pulse/app/benchmarks/page.tsx +0 -224
- package/pulse/app/costs/page.tsx +0 -179
- package/pulse/app/export/page.tsx +0 -465
- package/pulse/app/favicon.ico +0 -0
- package/pulse/app/globals.css +0 -263
- package/pulse/app/help/page.tsx +0 -143
- package/pulse/app/history/page.tsx +0 -157
- package/pulse/app/layout.tsx +0 -46
- package/pulse/app/memory/page.tsx +0 -365
- package/pulse/app/overview-client.tsx +0 -393
- package/pulse/app/page.tsx +0 -14
- package/pulse/app/plans/page.tsx +0 -308
- package/pulse/app/projects/[slug]/page.tsx +0 -390
- package/pulse/app/projects/page.tsx +0 -110
- package/pulse/app/sessions/[id]/page.tsx +0 -243
- package/pulse/app/sessions/page.tsx +0 -39
- package/pulse/app/settings/page.tsx +0 -188
- package/pulse/app/todos/page.tsx +0 -211
- package/pulse/app/tools/page.tsx +0 -249
- package/pulse/cli.js +0 -164
- package/pulse/components/activity/day-of-week-chart.tsx +0 -35
- package/pulse/components/activity/streak-card.tsx +0 -36
- package/pulse/components/costs/cache-efficiency-panel.tsx +0 -76
- package/pulse/components/costs/cost-by-project-chart.tsx +0 -48
- package/pulse/components/costs/cost-over-time-chart.tsx +0 -95
- package/pulse/components/costs/model-token-table.tsx +0 -60
- package/pulse/components/global-search.tsx +0 -193
- package/pulse/components/keyboard-nav-provider.tsx +0 -23
- package/pulse/components/layout/bottom-nav.tsx +0 -53
- package/pulse/components/layout/client-layout.tsx +0 -31
- package/pulse/components/layout/sidebar-context.tsx +0 -50
- package/pulse/components/layout/sidebar.tsx +0 -183
- package/pulse/components/layout/top-bar.tsx +0 -121
- package/pulse/components/overview/activity-heatmap.tsx +0 -107
- package/pulse/components/overview/conversation-table.tsx +0 -148
- package/pulse/components/overview/model-breakdown-donut.tsx +0 -95
- package/pulse/components/overview/peak-hours-chart.tsx +0 -87
- package/pulse/components/overview/project-activity-donut.tsx +0 -96
- package/pulse/components/overview/stat-card.tsx +0 -102
- package/pulse/components/overview/usage-over-time-chart.tsx +0 -166
- package/pulse/components/projects/project-card.tsx +0 -175
- package/pulse/components/sessions/replay/assistant-markdown.tsx +0 -94
- package/pulse/components/sessions/replay/compaction-card.tsx +0 -25
- package/pulse/components/sessions/replay/session-sidebar.tsx +0 -231
- package/pulse/components/sessions/replay/token-accumulation-chart.tsx +0 -98
- package/pulse/components/sessions/replay/tool-call-badge.tsx +0 -127
- package/pulse/components/sessions/replay/turn-cards.tsx +0 -220
- package/pulse/components/sessions/replay/user-tool-result.tsx +0 -158
- package/pulse/components/sessions/session-badges.tsx +0 -49
- package/pulse/components/sessions/session-table.tsx +0 -299
- package/pulse/components/theme-provider.tsx +0 -44
- package/pulse/components/tools/feature-adoption-table.tsx +0 -58
- package/pulse/components/tools/mcp-server-panel.tsx +0 -45
- package/pulse/components/tools/tool-ranking-chart.tsx +0 -57
- package/pulse/components/tools/version-history-table.tsx +0 -32
- package/pulse/components/ui/alert.tsx +0 -66
- package/pulse/components/ui/badge.tsx +0 -48
- package/pulse/components/ui/breadcrumb.tsx +0 -109
- package/pulse/components/ui/button.tsx +0 -64
- package/pulse/components/ui/calendar.tsx +0 -220
- package/pulse/components/ui/card.tsx +0 -92
- package/pulse/components/ui/command.tsx +0 -158
- package/pulse/components/ui/dialog.tsx +0 -158
- package/pulse/components/ui/input.tsx +0 -21
- package/pulse/components/ui/popover.tsx +0 -89
- package/pulse/components/ui/progress.tsx +0 -31
- package/pulse/components/ui/select.tsx +0 -190
- package/pulse/components/ui/separator.tsx +0 -28
- package/pulse/components/ui/sheet.tsx +0 -143
- package/pulse/components/ui/skeleton.tsx +0 -13
- package/pulse/components/ui/table.tsx +0 -116
- package/pulse/components/ui/tabs.tsx +0 -91
- package/pulse/components/ui/tooltip.tsx +0 -57
- package/pulse/components/use-global-keyboard-nav.ts +0 -79
- package/pulse/components.json +0 -23
- package/pulse/eslint.config.mjs +0 -18
- package/pulse/lib/bahulam-paths.ts +0 -23
- package/pulse/lib/claude-reader.ts +0 -592
- package/pulse/lib/decode.ts +0 -129
- package/pulse/lib/pricing.ts +0 -102
- package/pulse/lib/replay-parser.ts +0 -165
- package/pulse/lib/tool-categories.ts +0 -140
- package/pulse/lib/utils.ts +0 -6
- package/pulse/next-env.d.ts +0 -6
- package/pulse/next.config.ts +0 -16
- package/pulse/package.json +0 -45
- package/pulse/postcss.config.mjs +0 -7
- package/pulse/public/activity.png +0 -0
- package/pulse/public/cc-lens.png +0 -0
- package/pulse/public/command-k.png +0 -0
- package/pulse/public/costs.png +0 -0
- package/pulse/public/dashboard-dark.png +0 -0
- package/pulse/public/dashboard-white.png +0 -0
- package/pulse/public/export.png +0 -0
- package/pulse/public/file.svg +0 -1
- package/pulse/public/globe.svg +0 -1
- package/pulse/public/next.svg +0 -1
- package/pulse/public/projects.png +0 -0
- package/pulse/public/session-chat.png +0 -0
- package/pulse/public/todos.png +0 -0
- package/pulse/public/tools.png +0 -0
- package/pulse/public/vercel.svg +0 -1
- package/pulse/public/window.svg +0 -1
- package/pulse/tsconfig.json +0 -34
- package/pulse/types/claude.ts +0 -294
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { ChevronRight, MoreHorizontal } from "lucide-react"
|
|
3
|
-
import { Slot } from "radix-ui"
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
6
|
-
|
|
7
|
-
function Breadcrumb({ ...props }: React.ComponentProps<"nav">) {
|
|
8
|
-
return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
|
|
12
|
-
return (
|
|
13
|
-
<ol
|
|
14
|
-
data-slot="breadcrumb-list"
|
|
15
|
-
className={cn(
|
|
16
|
-
"flex flex-wrap items-center gap-1.5 text-sm break-words text-muted-foreground sm:gap-2.5",
|
|
17
|
-
className
|
|
18
|
-
)}
|
|
19
|
-
{...props}
|
|
20
|
-
/>
|
|
21
|
-
)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
|
|
25
|
-
return (
|
|
26
|
-
<li
|
|
27
|
-
data-slot="breadcrumb-item"
|
|
28
|
-
className={cn("inline-flex items-center gap-1.5", className)}
|
|
29
|
-
{...props}
|
|
30
|
-
/>
|
|
31
|
-
)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function BreadcrumbLink({
|
|
35
|
-
asChild,
|
|
36
|
-
className,
|
|
37
|
-
...props
|
|
38
|
-
}: React.ComponentProps<"a"> & {
|
|
39
|
-
asChild?: boolean
|
|
40
|
-
}) {
|
|
41
|
-
const Comp = asChild ? Slot.Root : "a"
|
|
42
|
-
|
|
43
|
-
return (
|
|
44
|
-
<Comp
|
|
45
|
-
data-slot="breadcrumb-link"
|
|
46
|
-
className={cn("transition-colors hover:text-foreground", className)}
|
|
47
|
-
{...props}
|
|
48
|
-
/>
|
|
49
|
-
)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
|
|
53
|
-
return (
|
|
54
|
-
<span
|
|
55
|
-
data-slot="breadcrumb-page"
|
|
56
|
-
role="link"
|
|
57
|
-
aria-disabled="true"
|
|
58
|
-
aria-current="page"
|
|
59
|
-
className={cn("font-normal text-foreground", className)}
|
|
60
|
-
{...props}
|
|
61
|
-
/>
|
|
62
|
-
)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function BreadcrumbSeparator({
|
|
66
|
-
children,
|
|
67
|
-
className,
|
|
68
|
-
...props
|
|
69
|
-
}: React.ComponentProps<"li">) {
|
|
70
|
-
return (
|
|
71
|
-
<li
|
|
72
|
-
data-slot="breadcrumb-separator"
|
|
73
|
-
role="presentation"
|
|
74
|
-
aria-hidden="true"
|
|
75
|
-
className={cn("[&>svg]:size-3.5", className)}
|
|
76
|
-
{...props}
|
|
77
|
-
>
|
|
78
|
-
{children ?? <ChevronRight />}
|
|
79
|
-
</li>
|
|
80
|
-
)
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function BreadcrumbEllipsis({
|
|
84
|
-
className,
|
|
85
|
-
...props
|
|
86
|
-
}: React.ComponentProps<"span">) {
|
|
87
|
-
return (
|
|
88
|
-
<span
|
|
89
|
-
data-slot="breadcrumb-ellipsis"
|
|
90
|
-
role="presentation"
|
|
91
|
-
aria-hidden="true"
|
|
92
|
-
className={cn("flex size-9 items-center justify-center", className)}
|
|
93
|
-
{...props}
|
|
94
|
-
>
|
|
95
|
-
<MoreHorizontal className="size-4" />
|
|
96
|
-
<span className="sr-only">More</span>
|
|
97
|
-
</span>
|
|
98
|
-
)
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export {
|
|
102
|
-
Breadcrumb,
|
|
103
|
-
BreadcrumbList,
|
|
104
|
-
BreadcrumbItem,
|
|
105
|
-
BreadcrumbLink,
|
|
106
|
-
BreadcrumbPage,
|
|
107
|
-
BreadcrumbSeparator,
|
|
108
|
-
BreadcrumbEllipsis,
|
|
109
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
3
|
-
import { Slot } from "radix-ui"
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
6
|
-
|
|
7
|
-
const buttonVariants = cva(
|
|
8
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-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",
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
13
|
-
destructive:
|
|
14
|
-
"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
15
|
-
outline:
|
|
16
|
-
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
17
|
-
secondary:
|
|
18
|
-
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
19
|
-
ghost:
|
|
20
|
-
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
21
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
22
|
-
},
|
|
23
|
-
size: {
|
|
24
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
25
|
-
xs: "h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
26
|
-
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
27
|
-
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
28
|
-
icon: "size-9",
|
|
29
|
-
"icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
30
|
-
"icon-sm": "size-8",
|
|
31
|
-
"icon-lg": "size-10",
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
defaultVariants: {
|
|
35
|
-
variant: "default",
|
|
36
|
-
size: "default",
|
|
37
|
-
},
|
|
38
|
-
}
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
function Button({
|
|
42
|
-
className,
|
|
43
|
-
variant = "default",
|
|
44
|
-
size = "default",
|
|
45
|
-
asChild = false,
|
|
46
|
-
...props
|
|
47
|
-
}: React.ComponentProps<"button"> &
|
|
48
|
-
VariantProps<typeof buttonVariants> & {
|
|
49
|
-
asChild?: boolean
|
|
50
|
-
}) {
|
|
51
|
-
const Comp = asChild ? Slot.Root : "button"
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<Comp
|
|
55
|
-
data-slot="button"
|
|
56
|
-
data-variant={variant}
|
|
57
|
-
data-size={size}
|
|
58
|
-
className={cn(buttonVariants({ variant, size, className }))}
|
|
59
|
-
{...props}
|
|
60
|
-
/>
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export { Button, buttonVariants }
|
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import {
|
|
5
|
-
ChevronDownIcon,
|
|
6
|
-
ChevronLeftIcon,
|
|
7
|
-
ChevronRightIcon,
|
|
8
|
-
} from "lucide-react"
|
|
9
|
-
import {
|
|
10
|
-
DayPicker,
|
|
11
|
-
getDefaultClassNames,
|
|
12
|
-
type DayButton,
|
|
13
|
-
} from "react-day-picker"
|
|
14
|
-
|
|
15
|
-
import { cn } from "@/lib/utils"
|
|
16
|
-
import { Button, buttonVariants } from "@/components/ui/button"
|
|
17
|
-
|
|
18
|
-
function Calendar({
|
|
19
|
-
className,
|
|
20
|
-
classNames,
|
|
21
|
-
showOutsideDays = true,
|
|
22
|
-
captionLayout = "label",
|
|
23
|
-
buttonVariant = "ghost",
|
|
24
|
-
formatters,
|
|
25
|
-
components,
|
|
26
|
-
...props
|
|
27
|
-
}: React.ComponentProps<typeof DayPicker> & {
|
|
28
|
-
buttonVariant?: React.ComponentProps<typeof Button>["variant"]
|
|
29
|
-
}) {
|
|
30
|
-
const defaultClassNames = getDefaultClassNames()
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<DayPicker
|
|
34
|
-
showOutsideDays={showOutsideDays}
|
|
35
|
-
className={cn(
|
|
36
|
-
"group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
37
|
-
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
38
|
-
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
39
|
-
className
|
|
40
|
-
)}
|
|
41
|
-
captionLayout={captionLayout}
|
|
42
|
-
formatters={{
|
|
43
|
-
formatMonthDropdown: (date) =>
|
|
44
|
-
date.toLocaleString("default", { month: "short" }),
|
|
45
|
-
...formatters,
|
|
46
|
-
}}
|
|
47
|
-
classNames={{
|
|
48
|
-
root: cn("w-fit", defaultClassNames.root),
|
|
49
|
-
months: cn(
|
|
50
|
-
"relative flex flex-col gap-4 md:flex-row",
|
|
51
|
-
defaultClassNames.months
|
|
52
|
-
),
|
|
53
|
-
month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
54
|
-
nav: cn(
|
|
55
|
-
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
56
|
-
defaultClassNames.nav
|
|
57
|
-
),
|
|
58
|
-
button_previous: cn(
|
|
59
|
-
buttonVariants({ variant: buttonVariant }),
|
|
60
|
-
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
61
|
-
defaultClassNames.button_previous
|
|
62
|
-
),
|
|
63
|
-
button_next: cn(
|
|
64
|
-
buttonVariants({ variant: buttonVariant }),
|
|
65
|
-
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
66
|
-
defaultClassNames.button_next
|
|
67
|
-
),
|
|
68
|
-
month_caption: cn(
|
|
69
|
-
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
|
|
70
|
-
defaultClassNames.month_caption
|
|
71
|
-
),
|
|
72
|
-
dropdowns: cn(
|
|
73
|
-
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
74
|
-
defaultClassNames.dropdowns
|
|
75
|
-
),
|
|
76
|
-
dropdown_root: cn(
|
|
77
|
-
"relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",
|
|
78
|
-
defaultClassNames.dropdown_root
|
|
79
|
-
),
|
|
80
|
-
dropdown: cn(
|
|
81
|
-
"absolute inset-0 bg-popover opacity-0",
|
|
82
|
-
defaultClassNames.dropdown
|
|
83
|
-
),
|
|
84
|
-
caption_label: cn(
|
|
85
|
-
"font-medium select-none",
|
|
86
|
-
captionLayout === "label"
|
|
87
|
-
? "text-sm"
|
|
88
|
-
: "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
|
|
89
|
-
defaultClassNames.caption_label
|
|
90
|
-
),
|
|
91
|
-
table: "w-full border-collapse",
|
|
92
|
-
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
93
|
-
weekday: cn(
|
|
94
|
-
"flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none",
|
|
95
|
-
defaultClassNames.weekday
|
|
96
|
-
),
|
|
97
|
-
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
98
|
-
week_number_header: cn(
|
|
99
|
-
"w-(--cell-size) select-none",
|
|
100
|
-
defaultClassNames.week_number_header
|
|
101
|
-
),
|
|
102
|
-
week_number: cn(
|
|
103
|
-
"text-[0.8rem] text-muted-foreground select-none",
|
|
104
|
-
defaultClassNames.week_number
|
|
105
|
-
),
|
|
106
|
-
day: cn(
|
|
107
|
-
"group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md",
|
|
108
|
-
props.showWeekNumber
|
|
109
|
-
? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md"
|
|
110
|
-
: "[&:first-child[data-selected=true]_button]:rounded-l-md",
|
|
111
|
-
defaultClassNames.day
|
|
112
|
-
),
|
|
113
|
-
range_start: cn(
|
|
114
|
-
"rounded-l-md bg-accent",
|
|
115
|
-
defaultClassNames.range_start
|
|
116
|
-
),
|
|
117
|
-
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
118
|
-
range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
|
|
119
|
-
today: cn(
|
|
120
|
-
"rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none",
|
|
121
|
-
defaultClassNames.today
|
|
122
|
-
),
|
|
123
|
-
outside: cn(
|
|
124
|
-
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
125
|
-
defaultClassNames.outside
|
|
126
|
-
),
|
|
127
|
-
disabled: cn(
|
|
128
|
-
"text-muted-foreground opacity-50",
|
|
129
|
-
defaultClassNames.disabled
|
|
130
|
-
),
|
|
131
|
-
hidden: cn("invisible", defaultClassNames.hidden),
|
|
132
|
-
...classNames,
|
|
133
|
-
}}
|
|
134
|
-
components={{
|
|
135
|
-
Root: ({ className, rootRef, ...props }) => {
|
|
136
|
-
return (
|
|
137
|
-
<div
|
|
138
|
-
data-slot="calendar"
|
|
139
|
-
ref={rootRef}
|
|
140
|
-
className={cn(className)}
|
|
141
|
-
{...props}
|
|
142
|
-
/>
|
|
143
|
-
)
|
|
144
|
-
},
|
|
145
|
-
Chevron: ({ className, orientation, ...props }) => {
|
|
146
|
-
if (orientation === "left") {
|
|
147
|
-
return (
|
|
148
|
-
<ChevronLeftIcon className={cn("size-4", className)} {...props} />
|
|
149
|
-
)
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
if (orientation === "right") {
|
|
153
|
-
return (
|
|
154
|
-
<ChevronRightIcon
|
|
155
|
-
className={cn("size-4", className)}
|
|
156
|
-
{...props}
|
|
157
|
-
/>
|
|
158
|
-
)
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
return (
|
|
162
|
-
<ChevronDownIcon className={cn("size-4", className)} {...props} />
|
|
163
|
-
)
|
|
164
|
-
},
|
|
165
|
-
DayButton: CalendarDayButton,
|
|
166
|
-
WeekNumber: ({ children, ...props }) => {
|
|
167
|
-
return (
|
|
168
|
-
<td {...props}>
|
|
169
|
-
<div className="flex size-(--cell-size) items-center justify-center text-center">
|
|
170
|
-
{children}
|
|
171
|
-
</div>
|
|
172
|
-
</td>
|
|
173
|
-
)
|
|
174
|
-
},
|
|
175
|
-
...components,
|
|
176
|
-
}}
|
|
177
|
-
{...props}
|
|
178
|
-
/>
|
|
179
|
-
)
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
function CalendarDayButton({
|
|
183
|
-
className,
|
|
184
|
-
day,
|
|
185
|
-
modifiers,
|
|
186
|
-
...props
|
|
187
|
-
}: React.ComponentProps<typeof DayButton>) {
|
|
188
|
-
const defaultClassNames = getDefaultClassNames()
|
|
189
|
-
|
|
190
|
-
const ref = React.useRef<HTMLButtonElement>(null)
|
|
191
|
-
React.useEffect(() => {
|
|
192
|
-
if (modifiers.focused) ref.current?.focus()
|
|
193
|
-
}, [modifiers.focused])
|
|
194
|
-
|
|
195
|
-
return (
|
|
196
|
-
<Button
|
|
197
|
-
ref={ref}
|
|
198
|
-
variant="ghost"
|
|
199
|
-
size="icon"
|
|
200
|
-
data-day={day.date.toLocaleDateString()}
|
|
201
|
-
data-selected-single={
|
|
202
|
-
modifiers.selected &&
|
|
203
|
-
!modifiers.range_start &&
|
|
204
|
-
!modifiers.range_end &&
|
|
205
|
-
!modifiers.range_middle
|
|
206
|
-
}
|
|
207
|
-
data-range-start={modifiers.range_start}
|
|
208
|
-
data-range-end={modifiers.range_end}
|
|
209
|
-
data-range-middle={modifiers.range_middle}
|
|
210
|
-
className={cn(
|
|
211
|
-
"flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70",
|
|
212
|
-
defaultClassNames.day,
|
|
213
|
-
className
|
|
214
|
-
)}
|
|
215
|
-
{...props}
|
|
216
|
-
/>
|
|
217
|
-
)
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
export { Calendar, CalendarDayButton }
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
function Card({ className, ...props }: React.ComponentProps<"div">) {
|
|
6
|
-
return (
|
|
7
|
-
<div
|
|
8
|
-
data-slot="card"
|
|
9
|
-
className={cn(
|
|
10
|
-
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
|
11
|
-
className
|
|
12
|
-
)}
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
19
|
-
return (
|
|
20
|
-
<div
|
|
21
|
-
data-slot="card-header"
|
|
22
|
-
className={cn(
|
|
23
|
-
"@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",
|
|
24
|
-
className
|
|
25
|
-
)}
|
|
26
|
-
{...props}
|
|
27
|
-
/>
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
32
|
-
return (
|
|
33
|
-
<div
|
|
34
|
-
data-slot="card-title"
|
|
35
|
-
className={cn("leading-none font-semibold", className)}
|
|
36
|
-
{...props}
|
|
37
|
-
/>
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
|
|
42
|
-
return (
|
|
43
|
-
<div
|
|
44
|
-
data-slot="card-description"
|
|
45
|
-
className={cn("text-muted-foreground text-sm", className)}
|
|
46
|
-
{...props}
|
|
47
|
-
/>
|
|
48
|
-
)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
|
|
52
|
-
return (
|
|
53
|
-
<div
|
|
54
|
-
data-slot="card-action"
|
|
55
|
-
className={cn(
|
|
56
|
-
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
57
|
-
className
|
|
58
|
-
)}
|
|
59
|
-
{...props}
|
|
60
|
-
/>
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
65
|
-
return (
|
|
66
|
-
<div
|
|
67
|
-
data-slot="card-content"
|
|
68
|
-
className={cn("px-6", className)}
|
|
69
|
-
{...props}
|
|
70
|
-
/>
|
|
71
|
-
)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
75
|
-
return (
|
|
76
|
-
<div
|
|
77
|
-
data-slot="card-footer"
|
|
78
|
-
className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
|
|
79
|
-
{...props}
|
|
80
|
-
/>
|
|
81
|
-
)
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export {
|
|
85
|
-
Card,
|
|
86
|
-
CardHeader,
|
|
87
|
-
CardFooter,
|
|
88
|
-
CardTitle,
|
|
89
|
-
CardAction,
|
|
90
|
-
CardDescription,
|
|
91
|
-
CardContent,
|
|
92
|
-
}
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { Command as CommandPrimitive } from "cmdk"
|
|
5
|
-
import { SearchIcon } from "lucide-react"
|
|
6
|
-
|
|
7
|
-
import { cn } from "@/lib/utils"
|
|
8
|
-
import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog"
|
|
9
|
-
import { VisuallyHidden } from "radix-ui"
|
|
10
|
-
|
|
11
|
-
function Command({
|
|
12
|
-
className,
|
|
13
|
-
...props
|
|
14
|
-
}: React.ComponentProps<typeof CommandPrimitive>) {
|
|
15
|
-
return (
|
|
16
|
-
<CommandPrimitive
|
|
17
|
-
className={cn(
|
|
18
|
-
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
19
|
-
className
|
|
20
|
-
)}
|
|
21
|
-
{...props}
|
|
22
|
-
/>
|
|
23
|
-
)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function CommandDialog({
|
|
27
|
-
children,
|
|
28
|
-
...props
|
|
29
|
-
}: React.ComponentProps<typeof Dialog>) {
|
|
30
|
-
return (
|
|
31
|
-
<Dialog {...props}>
|
|
32
|
-
<DialogContent
|
|
33
|
-
className="overflow-hidden p-0 max-w-xl"
|
|
34
|
-
showCloseButton={false}
|
|
35
|
-
>
|
|
36
|
-
<VisuallyHidden.Root>
|
|
37
|
-
<DialogTitle>Command Palette</DialogTitle>
|
|
38
|
-
</VisuallyHidden.Root>
|
|
39
|
-
<Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-4 [&_[cmdk-input-wrapper]_svg]:w-4 [&_[cmdk-input]]:h-11 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-2.5">
|
|
40
|
-
{children}
|
|
41
|
-
</Command>
|
|
42
|
-
</DialogContent>
|
|
43
|
-
</Dialog>
|
|
44
|
-
)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function CommandInput({
|
|
48
|
-
className,
|
|
49
|
-
...props
|
|
50
|
-
}: React.ComponentProps<typeof CommandPrimitive.Input>) {
|
|
51
|
-
return (
|
|
52
|
-
<div className="flex items-center border-b border-border px-3" cmdk-input-wrapper="">
|
|
53
|
-
<SearchIcon className="mr-2 h-4 w-4 shrink-0 text-muted-foreground" />
|
|
54
|
-
<CommandPrimitive.Input
|
|
55
|
-
className={cn(
|
|
56
|
-
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm font-mono outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
57
|
-
className
|
|
58
|
-
)}
|
|
59
|
-
{...props}
|
|
60
|
-
/>
|
|
61
|
-
</div>
|
|
62
|
-
)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function CommandList({
|
|
66
|
-
className,
|
|
67
|
-
...props
|
|
68
|
-
}: React.ComponentProps<typeof CommandPrimitive.List>) {
|
|
69
|
-
return (
|
|
70
|
-
<CommandPrimitive.List
|
|
71
|
-
className={cn("max-h-[400px] overflow-y-auto overflow-x-hidden", className)}
|
|
72
|
-
{...props}
|
|
73
|
-
/>
|
|
74
|
-
)
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function CommandEmpty({
|
|
78
|
-
...props
|
|
79
|
-
}: React.ComponentProps<typeof CommandPrimitive.Empty>) {
|
|
80
|
-
return (
|
|
81
|
-
<CommandPrimitive.Empty
|
|
82
|
-
className="py-8 text-center text-sm text-muted-foreground/50 font-mono"
|
|
83
|
-
{...props}
|
|
84
|
-
/>
|
|
85
|
-
)
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function CommandGroup({
|
|
89
|
-
className,
|
|
90
|
-
...props
|
|
91
|
-
}: React.ComponentProps<typeof CommandPrimitive.Group>) {
|
|
92
|
-
return (
|
|
93
|
-
<CommandPrimitive.Group
|
|
94
|
-
className={cn(
|
|
95
|
-
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
96
|
-
className
|
|
97
|
-
)}
|
|
98
|
-
{...props}
|
|
99
|
-
/>
|
|
100
|
-
)
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function CommandSeparator({
|
|
104
|
-
className,
|
|
105
|
-
...props
|
|
106
|
-
}: React.ComponentProps<typeof CommandPrimitive.Separator>) {
|
|
107
|
-
return (
|
|
108
|
-
<CommandPrimitive.Separator
|
|
109
|
-
className={cn("-mx-1 h-px bg-border", className)}
|
|
110
|
-
{...props}
|
|
111
|
-
/>
|
|
112
|
-
)
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function CommandItem({
|
|
116
|
-
className,
|
|
117
|
-
...props
|
|
118
|
-
}: React.ComponentProps<typeof CommandPrimitive.Item>) {
|
|
119
|
-
return (
|
|
120
|
-
<CommandPrimitive.Item
|
|
121
|
-
className={cn(
|
|
122
|
-
"relative flex cursor-pointer gap-2 select-none items-center rounded-sm px-2 py-2 text-sm outline-none font-mono",
|
|
123
|
-
"data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",
|
|
124
|
-
"data-[selected=true]:bg-muted data-[selected=true]:text-foreground",
|
|
125
|
-
"hover:bg-muted/60",
|
|
126
|
-
className
|
|
127
|
-
)}
|
|
128
|
-
{...props}
|
|
129
|
-
/>
|
|
130
|
-
)
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
function CommandShortcut({
|
|
134
|
-
className,
|
|
135
|
-
...props
|
|
136
|
-
}: React.ComponentProps<"span">) {
|
|
137
|
-
return (
|
|
138
|
-
<span
|
|
139
|
-
className={cn(
|
|
140
|
-
"ml-auto text-[10px] tracking-widest text-muted-foreground/40 font-mono uppercase",
|
|
141
|
-
className
|
|
142
|
-
)}
|
|
143
|
-
{...props}
|
|
144
|
-
/>
|
|
145
|
-
)
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export {
|
|
149
|
-
Command,
|
|
150
|
-
CommandDialog,
|
|
151
|
-
CommandEmpty,
|
|
152
|
-
CommandGroup,
|
|
153
|
-
CommandInput,
|
|
154
|
-
CommandItem,
|
|
155
|
-
CommandList,
|
|
156
|
-
CommandSeparator,
|
|
157
|
-
CommandShortcut,
|
|
158
|
-
}
|