harebear-ui 0.1.0 → 0.2.2
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/AGENTS.md +14 -11
- package/dist/components/ai/chat.js +4 -0
- package/dist/components/ai/code-block.d.ts +13 -7
- package/dist/components/ai/code-block.js +23 -13
- package/dist/components/auth/auth.d.ts +85 -0
- package/dist/components/auth/auth.js +325 -0
- package/dist/components/theme/theme-toggle.js +1 -0
- package/dist/components/ui/attachment.d.ts +24 -0
- package/dist/components/ui/attachment.js +100 -0
- package/dist/components/ui/bubble.d.ts +17 -0
- package/dist/components/ui/bubble.js +71 -0
- package/dist/components/ui/code-block.d.ts +26 -0
- package/dist/components/ui/code-block.js +123 -0
- package/dist/components/ui/combobox.d.ts +24 -0
- package/dist/components/ui/combobox.js +162 -0
- package/dist/components/ui/direction.d.ts +7 -0
- package/dist/components/ui/direction.js +12 -0
- package/dist/components/ui/field.js +1 -1
- package/dist/components/ui/input-group.js +1 -1
- package/dist/components/ui/marker.d.ts +11 -0
- package/dist/components/ui/marker.js +39 -0
- package/dist/components/ui/message-scroller.d.ts +10 -0
- package/dist/components/ui/message-scroller.js +59 -0
- package/dist/components/ui/message.d.ts +10 -0
- package/dist/components/ui/message.js +48 -0
- package/dist/components/ui/native-select.d.ts +8 -0
- package/dist/components/ui/native-select.js +37 -0
- package/dist/components/ui/questionnaire.d.ts +19 -0
- package/dist/components/ui/questionnaire.js +168 -0
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/trace.d.ts +18 -0
- package/dist/components/ui/trace.js +74 -0
- package/dist/hooks/use-highlighted-code.d.ts +2 -0
- package/dist/hooks/use-highlighted-code.js +54 -0
- package/dist/index.d.ts +16 -2
- package/dist/index.js +16 -2
- package/dist/lib/highlighter.d.ts +9 -0
- package/dist/lib/highlighter.js +77 -0
- package/docs/COMPONENTS.md +115 -62
- package/llms.txt +6 -4
- package/package.json +8 -5
- package/skills/harebear-ui/SKILL.md +3 -2
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { Button } from "./button.js";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { ArrowDownIcon } from "lucide-react";
|
|
6
|
+
import { MessageScroller as MessageScroller$1, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
|
|
7
|
+
// src/components/ui/message-scroller.tsx
|
|
8
|
+
function MessageScrollerProvider(props) {
|
|
9
|
+
return /* @__PURE__ */ jsx(MessageScroller$1.Provider, { ...props });
|
|
10
|
+
}
|
|
11
|
+
function MessageScroller({ className, ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(MessageScroller$1.Root, {
|
|
13
|
+
"data-slot": "message-scroller",
|
|
14
|
+
className: cn("group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden", className),
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function MessageScrollerViewport({ className, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(MessageScroller$1.Viewport, {
|
|
20
|
+
"data-slot": "message-scroller-viewport",
|
|
21
|
+
className: cn("size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent data-pending-scroll:invisible", className),
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function MessageScrollerContent({ className, ...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsx(MessageScroller$1.Content, {
|
|
27
|
+
"data-slot": "message-scroller-content",
|
|
28
|
+
className: cn("flex h-max min-h-full flex-col gap-6", className),
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function MessageScrollerItem({ className, scrollAnchor = false, ...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsx(MessageScroller$1.Item, {
|
|
34
|
+
"data-slot": "message-scroller-item",
|
|
35
|
+
scrollAnchor,
|
|
36
|
+
className: cn("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function MessageScrollerButton({ direction = "end", className, children, render, variant = "secondary", size = "icon-sm", ...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsx(MessageScroller$1.Button, {
|
|
42
|
+
"data-slot": "message-scroller-button",
|
|
43
|
+
"data-direction": direction,
|
|
44
|
+
"data-variant": variant,
|
|
45
|
+
"data-size": size,
|
|
46
|
+
direction,
|
|
47
|
+
className: cn("absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180", className),
|
|
48
|
+
render: render ?? /* @__PURE__ */ jsx(Button, {
|
|
49
|
+
variant,
|
|
50
|
+
size
|
|
51
|
+
}),
|
|
52
|
+
...props,
|
|
53
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ArrowDownIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
54
|
+
className: "sr-only",
|
|
55
|
+
children: direction === "end" ? "Scroll to end" : "Scroll to start"
|
|
56
|
+
})] })
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
export { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function MessageGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
3
|
+
declare function Message({ className, align, ...props }: React.ComponentProps<"div"> & {
|
|
4
|
+
align?: "start" | "end";
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
declare function MessageAvatar({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
7
|
+
declare function MessageContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function MessageHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
+
declare function MessageFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
export { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
// src/components/ui/message.tsx
|
|
5
|
+
function MessageGroup({ className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
"data-slot": "message-group",
|
|
8
|
+
className: cn("flex min-w-0 flex-col gap-2", className),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function Message({ className, align = "start", ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx("div", {
|
|
14
|
+
"data-slot": "message",
|
|
15
|
+
"data-align": align,
|
|
16
|
+
className: cn("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", className),
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function MessageAvatar({ className, ...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsx("div", {
|
|
22
|
+
"data-slot": "message-avatar",
|
|
23
|
+
className: cn("flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8", className),
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function MessageContent({ className, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx("div", {
|
|
29
|
+
"data-slot": "message-content",
|
|
30
|
+
className: cn("flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end", className),
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function MessageHeader({ className, ...props }) {
|
|
35
|
+
return /* @__PURE__ */ jsx("div", {
|
|
36
|
+
"data-slot": "message-header",
|
|
37
|
+
className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0", className),
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function MessageFooter({ className, ...props }) {
|
|
42
|
+
return /* @__PURE__ */ jsx("div", {
|
|
43
|
+
"data-slot": "message-footer",
|
|
44
|
+
className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end", className),
|
|
45
|
+
...props
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
export { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type NativeSelectProps = Omit<React.ComponentProps<"select">, "size"> & {
|
|
3
|
+
size?: "sm" | "default";
|
|
4
|
+
};
|
|
5
|
+
declare function NativeSelect({ className, size, ...props }: NativeSelectProps): React.JSX.Element;
|
|
6
|
+
declare function NativeSelectOption({ className, ...props }: React.ComponentProps<"option">): React.JSX.Element;
|
|
7
|
+
declare function NativeSelectOptGroup({ className, ...props }: React.ComponentProps<"optgroup">): React.JSX.Element;
|
|
8
|
+
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
5
|
+
// src/components/ui/native-select.tsx
|
|
6
|
+
function NativeSelect({ className, size = "default", ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
8
|
+
className: cn("group/native-select relative w-fit has-[select:disabled]:opacity-50", className),
|
|
9
|
+
"data-slot": "native-select-wrapper",
|
|
10
|
+
"data-size": size,
|
|
11
|
+
children: [/* @__PURE__ */ jsx("select", {
|
|
12
|
+
"data-slot": "native-select",
|
|
13
|
+
"data-size": size,
|
|
14
|
+
className: "h-10 w-full min-w-0 appearance-none rounded-md border border-transparent bg-muted py-1 pr-9 pl-3.5 text-sm transition-[border-color,box-shadow,background-color] outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-primary focus-visible:bg-card focus-visible:ring-4 focus-visible:ring-primary/15 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-8 data-[size=sm]:py-0.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
15
|
+
...props
|
|
16
|
+
}), /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
17
|
+
className: "pointer-events-none absolute top-1/2 right-3 size-4 -translate-y-1/2 text-muted-foreground select-none",
|
|
18
|
+
"aria-hidden": "true",
|
|
19
|
+
"data-slot": "native-select-icon"
|
|
20
|
+
})]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function NativeSelectOption({ className, ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsx("option", {
|
|
25
|
+
"data-slot": "native-select-option",
|
|
26
|
+
className: cn("bg-[Canvas] text-[CanvasText]", className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function NativeSelectOptGroup({ className, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsx("optgroup", {
|
|
32
|
+
"data-slot": "native-select-optgroup",
|
|
33
|
+
className: cn("bg-[Canvas] text-[CanvasText]", className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Button } from "./button.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Questionnaire as Questionnaire$1 } from "@shadcn/react/questionnaire";
|
|
4
|
+
declare function Questionnaire({ className, ...props }: React.ComponentProps<typeof Questionnaire$1.Root>): React.JSX.Element;
|
|
5
|
+
declare function QuestionnaireProgress({ className, ...props }: React.ComponentProps<typeof Questionnaire$1.Progress>): React.JSX.Element;
|
|
6
|
+
declare function QuestionnaireItem({ className, ...props }: React.ComponentProps<typeof Questionnaire$1.Item>): React.JSX.Element;
|
|
7
|
+
declare function QuestionnaireTitle({ className, ...props }: React.ComponentProps<typeof Questionnaire$1.Title>): React.JSX.Element;
|
|
8
|
+
declare function QuestionnaireDescription({ className, ...props }: React.ComponentProps<typeof Questionnaire$1.Description>): React.JSX.Element;
|
|
9
|
+
declare function QuestionnaireChoices({ className, ...props }: React.ComponentProps<typeof Questionnaire$1.Choices>): React.JSX.Element;
|
|
10
|
+
declare function QuestionnaireChoice({ children, className, ...props }: React.ComponentProps<typeof Questionnaire$1.Choice>): React.JSX.Element;
|
|
11
|
+
declare function QuestionnaireChoiceDescription({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
12
|
+
declare function QuestionnaireInput({ className, ...props }: React.ComponentProps<typeof Questionnaire$1.Input>): React.JSX.Element;
|
|
13
|
+
declare function QuestionnaireError({ className, ...props }: React.ComponentProps<typeof Questionnaire$1.Error>): React.JSX.Element;
|
|
14
|
+
declare function QuestionnaireActions({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
15
|
+
declare function QuestionnairePrevious({ children, className, size, variant, ...props }: React.ComponentProps<typeof Questionnaire$1.Previous> & Pick<React.ComponentProps<typeof Button>, "size" | "variant">): React.JSX.Element;
|
|
16
|
+
declare function QuestionnaireSkip({ children, className, size, variant, ...props }: React.ComponentProps<typeof Questionnaire$1.Skip> & Pick<React.ComponentProps<typeof Button>, "size" | "variant">): React.JSX.Element;
|
|
17
|
+
declare function QuestionnaireNext({ children, className, size, variant, ...props }: React.ComponentProps<typeof Questionnaire$1.Next> & Pick<React.ComponentProps<typeof Button>, "size" | "variant">): React.JSX.Element;
|
|
18
|
+
declare function QuestionnaireSubmit({ children, className, size, variant, ...props }: React.ComponentProps<typeof Questionnaire$1.Submit> & Pick<React.ComponentProps<typeof Button>, "size" | "variant">): React.JSX.Element;
|
|
19
|
+
export { Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoiceDescription, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireInput, QuestionnaireItem, QuestionnaireNext, QuestionnairePrevious, QuestionnaireProgress, QuestionnaireSkip, QuestionnaireSubmit, QuestionnaireTitle };
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { buttonVariants } from "./button.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { CheckIcon } from "lucide-react";
|
|
6
|
+
import { Questionnaire as Questionnaire$1 } from "@shadcn/react/questionnaire";
|
|
7
|
+
// src/components/ui/questionnaire.tsx
|
|
8
|
+
function Questionnaire({ className, ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Root, {
|
|
10
|
+
"data-slot": "questionnaire",
|
|
11
|
+
className: cn("flex w-full min-w-0 flex-col gap-4", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function QuestionnaireProgress({ className, ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Progress, {
|
|
17
|
+
"data-slot": "questionnaire-progress",
|
|
18
|
+
className: cn("min-h-[1lh] w-fit min-w-[14ch] text-xs font-medium text-muted-foreground tabular-nums", className),
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function QuestionnaireItem({ className, ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Item, {
|
|
24
|
+
"data-slot": "questionnaire-item",
|
|
25
|
+
className: cn("flex min-w-0 flex-col gap-4 border-0 p-0 outline-none", className),
|
|
26
|
+
...props
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function QuestionnaireTitle({ className, ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Title, {
|
|
31
|
+
"data-slot": "questionnaire-title",
|
|
32
|
+
className: cn("font-heading text-base leading-snug font-medium text-pretty [&:not(:has(~[data-slot=questionnaire-description]))]:mb-4", className),
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function QuestionnaireDescription({ className, ...props }) {
|
|
37
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Description, {
|
|
38
|
+
"data-slot": "questionnaire-description",
|
|
39
|
+
className: cn("text-sm text-pretty text-muted-foreground", className),
|
|
40
|
+
...props
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function QuestionnaireChoices({ className, ...props }) {
|
|
44
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Choices, {
|
|
45
|
+
"data-slot": "questionnaire-choices",
|
|
46
|
+
className: cn("group/questionnaire-choices grid min-w-0 gap-2", className),
|
|
47
|
+
...props
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function QuestionnaireChoice({ children, className, ...props }) {
|
|
51
|
+
return /* @__PURE__ */ jsxs(Questionnaire$1.Choice, {
|
|
52
|
+
"data-slot": "questionnaire-choice",
|
|
53
|
+
className: cn("group/questionnaire-choice relative flex min-h-11 cursor-pointer items-start gap-2.5 rounded-lg border border-border bg-card px-3.5 py-3 text-start text-sm transition-colors outline-none select-none hover:bg-muted has-[>input:focus-visible]:border-primary has-[>input:focus-visible]:ring-4 has-[>input:focus-visible]:ring-primary/15 data-invalid:border-destructive data-checked:border-primary/40 data-checked:bg-primary-soft", "data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
|
|
54
|
+
...props,
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ jsx(Questionnaire$1.ChoiceInput, {
|
|
57
|
+
"data-slot": "questionnaire-choice-input",
|
|
58
|
+
className: "absolute inset-0 z-10 size-full cursor-pointer opacity-0"
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ jsxs("span", {
|
|
61
|
+
"aria-hidden": "true",
|
|
62
|
+
"data-slot": "questionnaire-choice-indicator",
|
|
63
|
+
className: "pointer-events-none relative flex size-4 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-[4px] border border-input group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[type=radio]/questionnaire-choice:rounded-full group-data-checked/questionnaire-choice:border-primary group-data-checked/questionnaire-choice:bg-primary group-data-checked/questionnaire-choice:text-primary-foreground dark:bg-input/30 dark:group-data-checked/questionnaire-choice:bg-primary",
|
|
64
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
65
|
+
"data-slot": "questionnaire-choice-indicator-dot",
|
|
66
|
+
className: "hidden size-2 rounded-full bg-primary-foreground group-data-[type=checkbox]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
|
|
67
|
+
}), /* @__PURE__ */ jsx(CheckIcon, {
|
|
68
|
+
"data-slot": "questionnaire-choice-indicator-check",
|
|
69
|
+
className: "hidden size-3.5 group-data-[type=radio]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
|
|
70
|
+
})]
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ jsx(Questionnaire$1.ChoiceLabel, {
|
|
73
|
+
"data-slot": "questionnaire-choice-label",
|
|
74
|
+
className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-snug",
|
|
75
|
+
children
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ jsx(Questionnaire$1.ChoiceShortcut, {
|
|
78
|
+
"data-slot": "questionnaire-choice-shortcut",
|
|
79
|
+
className: "pointer-events-none ms-auto hidden size-5 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-md border border-input bg-background font-mono text-[0.625rem] leading-none font-medium text-muted-foreground group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[shortcut]/questionnaire-choice:inline-flex"
|
|
80
|
+
})
|
|
81
|
+
]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function QuestionnaireChoiceDescription({ className, ...props }) {
|
|
85
|
+
return /* @__PURE__ */ jsx("span", {
|
|
86
|
+
"data-slot": "questionnaire-choice-description",
|
|
87
|
+
className: cn("text-muted-foreground", className),
|
|
88
|
+
...props
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function QuestionnaireInput({ className, ...props }) {
|
|
92
|
+
return /* @__PURE__ */ jsx("div", {
|
|
93
|
+
"data-slot": "questionnaire-input-wrapper",
|
|
94
|
+
className: "group/questionnaire-input relative w-full min-w-0",
|
|
95
|
+
children: /* @__PURE__ */ jsx(Questionnaire$1.Input, {
|
|
96
|
+
"data-slot": "questionnaire-input",
|
|
97
|
+
className: cn("h-10 w-full min-w-0 rounded-md border border-transparent bg-muted px-3.5 py-1 text-base transition-[border-color,box-shadow,background-color] outline-none focus-visible:border-primary focus-visible:bg-card focus-visible:ring-4 focus-visible:ring-primary/15 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-4 aria-invalid:ring-destructive/15 md:text-sm", "selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground", className),
|
|
98
|
+
...props
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function QuestionnaireError({ className, ...props }) {
|
|
103
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Error, {
|
|
104
|
+
"data-slot": "questionnaire-error",
|
|
105
|
+
className: cn("mt-2 text-sm text-destructive", className),
|
|
106
|
+
...props
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function QuestionnaireActions({ className, ...props }) {
|
|
110
|
+
return /* @__PURE__ */ jsx("div", {
|
|
111
|
+
"data-slot": "questionnaire-actions",
|
|
112
|
+
className: cn("grid min-h-11 w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 sm:min-h-8", className),
|
|
113
|
+
...props
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
function QuestionnairePrevious({ children, className, size = "default", variant = "outline", ...props }) {
|
|
117
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Previous, {
|
|
118
|
+
"data-slot": "questionnaire-previous",
|
|
119
|
+
"data-size": size,
|
|
120
|
+
"data-variant": variant,
|
|
121
|
+
className: cn(buttonVariants({
|
|
122
|
+
size,
|
|
123
|
+
variant
|
|
124
|
+
}), "col-start-1 row-start-1 min-h-11 justify-self-start sm:min-h-0", className),
|
|
125
|
+
...props,
|
|
126
|
+
children: children ?? "Previous"
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
function QuestionnaireSkip({ children, className, size = "default", variant = "outline", ...props }) {
|
|
130
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Skip, {
|
|
131
|
+
"data-slot": "questionnaire-skip",
|
|
132
|
+
"data-size": size,
|
|
133
|
+
"data-variant": variant,
|
|
134
|
+
className: cn(buttonVariants({
|
|
135
|
+
size,
|
|
136
|
+
variant
|
|
137
|
+
}), "col-start-2 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
|
|
138
|
+
...props,
|
|
139
|
+
children: children ?? "Skip"
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
function QuestionnaireNext({ children, className, size = "default", variant = "default", ...props }) {
|
|
143
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Next, {
|
|
144
|
+
"data-slot": "questionnaire-next",
|
|
145
|
+
"data-size": size,
|
|
146
|
+
"data-variant": variant,
|
|
147
|
+
className: cn(buttonVariants({
|
|
148
|
+
size,
|
|
149
|
+
variant
|
|
150
|
+
}), "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
|
|
151
|
+
...props,
|
|
152
|
+
children: children ?? "Next"
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
function QuestionnaireSubmit({ children, className, size = "default", variant = "default", ...props }) {
|
|
156
|
+
return /* @__PURE__ */ jsx(Questionnaire$1.Submit, {
|
|
157
|
+
"data-slot": "questionnaire-submit",
|
|
158
|
+
"data-size": size,
|
|
159
|
+
"data-variant": variant,
|
|
160
|
+
className: cn(buttonVariants({
|
|
161
|
+
size,
|
|
162
|
+
variant
|
|
163
|
+
}), "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
|
|
164
|
+
...props,
|
|
165
|
+
children: children ?? "Submit"
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
export { Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoiceDescription, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireInput, QuestionnaireItem, QuestionnaireNext, QuestionnairePrevious, QuestionnaireProgress, QuestionnaireSkip, QuestionnaireSubmit, QuestionnaireTitle };
|
|
@@ -27,7 +27,7 @@ function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
|
27
27
|
return /* @__PURE__ */ jsxs(Select$1.Trigger, {
|
|
28
28
|
"data-slot": "select-trigger",
|
|
29
29
|
"data-size": size,
|
|
30
|
-
className: cn("flex w-fit items-center justify-between gap-1.5 rounded-
|
|
30
|
+
className: cn("flex w-fit items-center justify-between gap-1.5 rounded-md border border-transparent bg-muted py-2 pr-3 pl-3.5 text-sm whitespace-nowrap transition-[border-color,box-shadow,background-color] outline-none select-none focus-visible:border-primary focus-visible:bg-card focus-visible:ring-4 focus-visible:ring-primary/15 aria-expanded:bg-card disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-10 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
31
31
|
...props,
|
|
32
32
|
children: [children, /* @__PURE__ */ jsx(Select$1.Icon, {
|
|
33
33
|
asChild: true,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./collapsible.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare function Trace({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
4
|
+
declare function TraceLine({ className, status, ...props }: React.ComponentProps<"span"> & {
|
|
5
|
+
status?: "running" | "error" | "pending";
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
declare function TraceIcon({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
8
|
+
declare function TraceTitle({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
9
|
+
declare function TraceDescription({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
10
|
+
declare function TraceCollapsible({ className, ...props }: Omit<React.ComponentProps<typeof Collapsible>, "asChild" | "open"> & ({
|
|
11
|
+
open?: undefined;
|
|
12
|
+
} | {
|
|
13
|
+
open: boolean;
|
|
14
|
+
onOpenChange: NonNullable<React.ComponentProps<typeof Collapsible>["onOpenChange"]>;
|
|
15
|
+
})): React.JSX.Element;
|
|
16
|
+
declare function TraceCollapsibleTrigger({ className, children, ...props }: Omit<React.ComponentProps<typeof CollapsibleTrigger>, "asChild">): React.JSX.Element;
|
|
17
|
+
declare function TraceCollapsibleContent({ className, children, ...props }: Omit<React.ComponentProps<typeof CollapsibleContent>, "asChild">): React.JSX.Element;
|
|
18
|
+
export { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./collapsible.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { ChevronRightIcon } from "lucide-react";
|
|
6
|
+
// src/components/ui/trace.tsx
|
|
7
|
+
function Trace({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx("div", {
|
|
9
|
+
"data-slot": "trace",
|
|
10
|
+
className: cn("flex w-full min-w-0 flex-col gap-2 *:has-[>[data-slot=trace-line]]:flex *:has-[>[data-slot=trace-line]]:w-fit *:has-[>[data-slot=trace-line]]:max-w-full *:has-[>[data-slot=trace-line]]:min-w-0 *:has-[>[data-slot=trace-line]]:rounded-md *:has-[>[data-slot=trace-line]]:text-left *:has-[>[data-slot=trace-line]]:outline-none *:has-[>[data-slot=trace-line]]:focus-visible:ring-3 *:has-[>[data-slot=trace-line]]:focus-visible:ring-ring/50", className),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function TraceLine({ className, status, ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx("span", {
|
|
16
|
+
"data-slot": "trace-line",
|
|
17
|
+
"data-status": status,
|
|
18
|
+
className: cn("flex w-fit max-w-full min-w-0 items-center gap-2 text-sm text-muted-foreground transition-colors in-[a,button]:cursor-pointer in-[a:hover,button:hover]:text-foreground data-[status=error]:text-destructive data-[status=error]:in-[a:hover,button:hover]:text-destructive data-[status=pending]:opacity-60 data-[status=running]:*:data-[slot=trace-title]:shimmer", className),
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function TraceIcon({ className, ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsx("span", {
|
|
24
|
+
"data-slot": "trace-icon",
|
|
25
|
+
"aria-hidden": "true",
|
|
26
|
+
className: cn("flex size-4 shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [[data-slot=trace-title]~&]:-ml-1", className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function TraceTitle({ className, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsx("span", {
|
|
32
|
+
"data-slot": "trace-title",
|
|
33
|
+
className: cn("min-w-0 truncate motion-reduce:shimmer-none", className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function TraceDescription({ className, ...props }) {
|
|
38
|
+
return /* @__PURE__ */ jsx("span", {
|
|
39
|
+
"data-slot": "trace-description",
|
|
40
|
+
className: cn("shrink-0 text-muted-foreground/70 tabular-nums", className),
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function TraceCollapsible({ className, ...props }) {
|
|
45
|
+
return /* @__PURE__ */ jsx(Collapsible, {
|
|
46
|
+
"data-slot": "trace-collapsible",
|
|
47
|
+
className: cn("flex w-full min-w-0 flex-col", className),
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function TraceCollapsibleTrigger({ className, children, ...props }) {
|
|
52
|
+
return /* @__PURE__ */ jsxs(CollapsibleTrigger, {
|
|
53
|
+
"data-slot": "trace-collapsible-trigger",
|
|
54
|
+
className: cn("group/trace-collapsible-trigger flex w-fit max-w-full min-w-0 cursor-pointer items-center gap-1 rounded-md text-left text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 has-[[data-status=error]]:text-destructive", className),
|
|
55
|
+
...props,
|
|
56
|
+
children: [children, /* @__PURE__ */ jsx(TraceIcon, {
|
|
57
|
+
className: "transition-transform group-aria-expanded/trace-collapsible-trigger:rotate-90",
|
|
58
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
59
|
+
})]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function TraceCollapsibleContent({ className, children, ...props }) {
|
|
63
|
+
return /* @__PURE__ */ jsx(CollapsibleContent, {
|
|
64
|
+
"data-slot": "trace-collapsible-content",
|
|
65
|
+
className: "min-w-0 overflow-hidden duration-200 [--radix-accordion-content-height:var(--radix-collapsible-content-height)] data-open:animate-accordion-down data-closed:animate-accordion-up",
|
|
66
|
+
...props,
|
|
67
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
68
|
+
"data-slot": "trace-collapsible-content-inner",
|
|
69
|
+
className: cn("mt-2 mb-1 ml-[calc(--spacing(2)-1px)] min-w-0 border-l pr-1 pl-4 leading-relaxed wrap-break-word text-muted-foreground", className),
|
|
70
|
+
children
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
export { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare function useHighlightedCode(value: string, language: string): (string | number | bigint | boolean | React.JSX.Element[] | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | Iterable<React.ReactNode> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | React.ReactPortal | null | undefined> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null | undefined)[];
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { loadHighlighter } from "../lib/highlighter.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
// src/hooks/use-highlighted-code.ts
|
|
5
|
+
function useHighlightedCode(value, language) {
|
|
6
|
+
const code = value.endsWith("\n") ? value.slice(0, -1) : value;
|
|
7
|
+
const [loaded, setLoaded] = React.useState(null);
|
|
8
|
+
const highlighter = loaded?.language === language ? loaded.highlighter : null;
|
|
9
|
+
React.useEffect(() => {
|
|
10
|
+
let cancelled = false;
|
|
11
|
+
loadHighlighter(language).then((next) => {
|
|
12
|
+
if (!cancelled) setLoaded({
|
|
13
|
+
language,
|
|
14
|
+
highlighter: next
|
|
15
|
+
});
|
|
16
|
+
}).catch(() => {});
|
|
17
|
+
return () => {
|
|
18
|
+
cancelled = true;
|
|
19
|
+
};
|
|
20
|
+
}, [language]);
|
|
21
|
+
const [done, setDone] = React.useState({
|
|
22
|
+
highlighter: null,
|
|
23
|
+
text: "",
|
|
24
|
+
lines: []
|
|
25
|
+
});
|
|
26
|
+
let next = done;
|
|
27
|
+
if (next.highlighter !== highlighter || !code.startsWith(next.text)) next = {
|
|
28
|
+
highlighter,
|
|
29
|
+
text: "",
|
|
30
|
+
lines: []
|
|
31
|
+
};
|
|
32
|
+
const end = code.lastIndexOf("\n") + 1;
|
|
33
|
+
if (highlighter && end > next.text.length) {
|
|
34
|
+
const result = highlighter.highlight(code.slice(next.text.length, end - 1), next.state);
|
|
35
|
+
next = {
|
|
36
|
+
highlighter,
|
|
37
|
+
text: code.slice(0, end),
|
|
38
|
+
lines: [...next.lines, ...result.lines],
|
|
39
|
+
state: result.state
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
if (next !== done) setDone(next);
|
|
43
|
+
const tail = code.slice(end);
|
|
44
|
+
return React.useMemo(() => {
|
|
45
|
+
if (!highlighter) return code.split("\n");
|
|
46
|
+
return [...next.lines, highlighter.highlight(tail, next.state).lines[0]];
|
|
47
|
+
}, [
|
|
48
|
+
code,
|
|
49
|
+
highlighter,
|
|
50
|
+
next,
|
|
51
|
+
tail
|
|
52
|
+
]);
|
|
53
|
+
}
|
|
54
|
+
export { useHighlightedCode };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,9 +4,11 @@ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./
|
|
|
4
4
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger } from "./components/ui/alert-dialog.js";
|
|
5
5
|
import { Alert, AlertAction, AlertDescription, AlertTitle } from "./components/ui/alert.js";
|
|
6
6
|
import { AspectRatio } from "./components/ui/aspect-ratio.js";
|
|
7
|
+
import { Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger } from "./components/ui/attachment.js";
|
|
7
8
|
import { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage } from "./components/ui/avatar.js";
|
|
8
9
|
import { Badge, badgeVariants } from "./components/ui/badge.js";
|
|
9
10
|
import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./components/ui/breadcrumb.js";
|
|
11
|
+
import { Bubble, BubbleContent, BubbleGroup, BubbleReactions } from "./components/ui/bubble.js";
|
|
10
12
|
import { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants } from "./components/ui/button-group.js";
|
|
11
13
|
import { Button, buttonVariants } from "./components/ui/button.js";
|
|
12
14
|
import { Calendar, CalendarDayButton } from "./components/ui/calendar.js";
|
|
@@ -14,10 +16,13 @@ import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader,
|
|
|
14
16
|
import { Carousel, CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, useCarousel } from "./components/ui/carousel.js";
|
|
15
17
|
import { ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent } from "./components/ui/chart.js";
|
|
16
18
|
import { Checkbox } from "./components/ui/checkbox.js";
|
|
19
|
+
import { CodeBlock, CodeBlockActions, CodeBlockContent, CodeBlockCopyButton, CodeBlockFooter, CodeBlockHeader, CodeBlockLine, CodeBlockTitle } from "./components/ui/code-block.js";
|
|
17
20
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./components/ui/collapsible.js";
|
|
21
|
+
import { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor } from "./components/ui/combobox.js";
|
|
18
22
|
import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from "./components/ui/command.js";
|
|
19
23
|
import { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger } from "./components/ui/context-menu.js";
|
|
20
24
|
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./components/ui/dialog.js";
|
|
25
|
+
import { DirectionProvider, useDirection } from "./components/ui/direction.js";
|
|
21
26
|
import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger } from "./components/ui/drawer.js";
|
|
22
27
|
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./components/ui/dropdown-menu.js";
|
|
23
28
|
import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "./components/ui/empty.js";
|
|
@@ -29,11 +34,16 @@ import { Input } from "./components/ui/input.js";
|
|
|
29
34
|
import { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle } from "./components/ui/item.js";
|
|
30
35
|
import { Kbd, KbdGroup } from "./components/ui/kbd.js";
|
|
31
36
|
import { Label } from "./components/ui/label.js";
|
|
37
|
+
import { Marker, MarkerContent, MarkerIcon, markerVariants } from "./components/ui/marker.js";
|
|
32
38
|
import { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger } from "./components/ui/menubar.js";
|
|
39
|
+
import { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "./components/ui/message-scroller.js";
|
|
40
|
+
import { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader } from "./components/ui/message.js";
|
|
41
|
+
import { NativeSelect, NativeSelectOptGroup, NativeSelectOption } from "./components/ui/native-select.js";
|
|
33
42
|
import { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, navigationMenuTriggerStyle } from "./components/ui/navigation-menu.js";
|
|
34
43
|
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "./components/ui/pagination.js";
|
|
35
44
|
import { Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger } from "./components/ui/popover.js";
|
|
36
45
|
import { Progress } from "./components/ui/progress.js";
|
|
46
|
+
import { Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoiceDescription, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireInput, QuestionnaireItem, QuestionnaireNext, QuestionnairePrevious, QuestionnaireProgress, QuestionnaireSkip, QuestionnaireSubmit, QuestionnaireTitle } from "./components/ui/questionnaire.js";
|
|
37
47
|
import { RadioGroup, RadioGroupItem } from "./components/ui/radio-group.js";
|
|
38
48
|
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "./components/ui/resizable.js";
|
|
39
49
|
import { ScrollArea, ScrollBar } from "./components/ui/scroll-area.js";
|
|
@@ -52,6 +62,7 @@ import { Textarea } from "./components/ui/textarea.js";
|
|
|
52
62
|
import { ToggleGroup, ToggleGroupItem } from "./components/ui/toggle-group.js";
|
|
53
63
|
import { Toggle, toggleVariants } from "./components/ui/toggle.js";
|
|
54
64
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./components/ui/tooltip.js";
|
|
65
|
+
import { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle } from "./components/ui/trace.js";
|
|
55
66
|
import { ActivityFeed, ActivityItem } from "./components/admin/activity-feed.js";
|
|
56
67
|
import { AppBrand, AppBrandProps, AppNavItem, AppNavSection, AppShell, AppShellProps } from "./components/admin/app-shell.js";
|
|
57
68
|
import { Callout } from "./components/admin/callout.js";
|
|
@@ -70,11 +81,14 @@ import { Sparkline, SparklineProps, smoothPath } from "./components/data/sparkli
|
|
|
70
81
|
import { StatusBarDatum, StatusBars, StatusBarsProps } from "./components/data/status-bars.js";
|
|
71
82
|
import { TrendChart, TrendChartProps, TrendLegend, TrendSeries } from "./components/data/trend-chart.js";
|
|
72
83
|
import { AssistantAvatar, ChatMessage, ChatMessageProps, ChatThread, ChatThreadProps, MessageActions, MessageActionsProps, ToolCall, ToolCallProps, TypingIndicator } from "./components/ai/chat.js";
|
|
73
|
-
import {
|
|
84
|
+
import { CodeSnippet, CodeSnippetProps, InlineCode, Prose } from "./components/ai/code-block.js";
|
|
74
85
|
import { Conversation, ConversationGroup, ConversationList, ConversationListProps } from "./components/ai/conversation-list.js";
|
|
75
86
|
import { ModelOption, ModelPicker, ModelPickerProps } from "./components/ai/model-picker.js";
|
|
76
87
|
import { PromptInput, PromptInputChip, PromptInputProps } from "./components/ai/prompt-input.js";
|
|
88
|
+
import { AppleIcon, AuthLayout, AuthLayoutProps, AuthProvider, GitHubIcon, GoogleIcon, LoginForm, LoginFormProps, LoginValues, SignupForm, SignupFormProps, SignupValues } from "./components/auth/auth.js";
|
|
77
89
|
import { useCopyToClipboard } from "./hooks/use-copy-to-clipboard.js";
|
|
90
|
+
import { useHighlightedCode } from "./hooks/use-highlighted-code.js";
|
|
78
91
|
import { useIsMobile } from "./hooks/use-mobile.js";
|
|
92
|
+
import { highlightCode, loadHighlighter } from "./lib/highlighter.js";
|
|
79
93
|
import { cn } from "./lib/utils.js";
|
|
80
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityFeed, type ActivityItem, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppBrand, type AppBrandProps, type AppNavItem, type AppNavSection, AppShell, type AppShellProps, AspectRatio, AssistantAvatar, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BarList, type BarListItem, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Callout, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChatMessage, type ChatMessageProps, ChatThread, type ChatThreadProps, Checkbox, CodeBlock, type
|
|
94
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityFeed, type ActivityItem, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppBrand, type AppBrandProps, type AppNavItem, type AppNavSection, AppShell, type AppShellProps, AppleIcon, AspectRatio, AssistantAvatar, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, AuthLayout, type AuthLayoutProps, type AuthProvider, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BarList, type BarListItem, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Callout, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChatMessage, type ChatMessageProps, ChatThread, type ChatThreadProps, Checkbox, CodeBlock, CodeBlockActions, CodeBlockContent, CodeBlockCopyButton, CodeBlockFooter, CodeBlockHeader, CodeBlockLine, CodeBlockTitle, CodeSnippet, type CodeSnippetProps, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type Conversation, type ConversationGroup, ConversationList, type ConversationListProps, DataTable, type DataTableColumnDef, type DataTableFeatures, type DataTableProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectionProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GitHubIcon, GoogleIcon, HoverCard, HoverCardContent, HoverCardTrigger, InlineCode, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, KeyValueGrid, type KeyValueItem, Label, LinkTile, type LinkTileProps, LoginForm, type LoginFormProps, type LoginValues, Marker, MarkerContent, MarkerIcon, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MessageActions, type MessageActionsProps, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, type ModelOption, ModelPicker, type ModelPickerProps, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageHeader, type PageHeaderProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, PromptInput, PromptInputChip, type PromptInputProps, Prose, Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoiceDescription, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireInput, QuestionnaireItem, QuestionnaireNext, QuestionnairePrevious, QuestionnaireProgress, QuestionnaireSkip, QuestionnaireSubmit, QuestionnaireTitle, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, type ResolvedThemeMode, ScrollArea, ScrollBar, SearchInput, type SearchInputProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignupForm, type SignupFormProps, type SignupValues, Skeleton, Slider, Sparkline, type SparklineProps, Spinner, StatCard, type StatCardProps, StatusBadge, type StatusBarDatum, StatusBars, type StatusBarsProps, StatusDot, type StatusTone, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type ThemeContextValue, type ThemeMode, ThemeProvider, type ThemeProviderProps, ThemeScript, ThemeToggle, Timeline, type TimelineItem, Toaster, Toggle, ToggleGroup, ToggleGroupItem, ToolCall, type ToolCallProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle, TrendChart, type TrendChartProps, TrendLegend, type TrendSeries, TypingIndicator, UsageMeter, type UsageMeterProps, UserChip, type UserChipProps, badgeVariants, buttonGroupVariants, buttonVariants, cn, createDataTableColumnHelper, dataTableFeatures, highlightCode, initials, loadHighlighter, markerVariants, navigationMenuTriggerStyle, smoothPath, tabsListVariants, toggleVariants, useCarousel, useComboboxAnchor, useCopyToClipboard, useDirection, useHighlightedCode, useIsMobile, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, useSidebar, useTheme };
|