@hex-core/components 1.4.0 → 1.5.0
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/dist/_tsup-dts-rollup.d.ts +3105 -0
- package/dist/accordion.d.ts +4 -13
- package/dist/alert-dialog.d.ts +11 -34
- package/dist/alert.d.ts +4 -17
- package/dist/aspect-ratio.d.ts +1 -7
- package/dist/avatar.d.ts +3 -11
- package/dist/badge.d.ts +3 -22
- package/dist/breadcrumb.d.ts +7 -27
- package/dist/button.d.ts +3 -13
- package/dist/calendar.d.ts +1 -17
- package/dist/card.d.ts +6 -16
- package/dist/checkbox.d.ts +2 -11
- package/dist/citation.d.ts +2 -0
- package/dist/citation.js +70 -0
- package/dist/citation.js.map +1 -0
- package/dist/cluster.d.ts +3 -34
- package/dist/code-block-copy.d.ts +2 -0
- package/dist/code-block-copy.js +108 -0
- package/dist/code-block-copy.js.map +1 -0
- package/dist/code-block.d.ts +3 -0
- package/dist/code-block.js +90 -0
- package/dist/code-block.js.map +1 -0
- package/dist/collapsible.d.ts +3 -11
- package/dist/color-picker.d.ts +2 -44
- package/dist/combobox.d.ts +3 -45
- package/dist/command.d.ts +9 -111
- package/dist/composer.d.ts +2 -0
- package/dist/composer.js +75 -0
- package/dist/composer.js.map +1 -0
- package/dist/container.d.ts +3 -41
- package/dist/context-menu.d.ts +12 -37
- package/dist/data-table.d.ts +2 -33
- package/dist/date-picker.d.ts +2 -43
- package/dist/dialog.d.ts +11 -46
- package/dist/drawer.d.ts +10 -41
- package/dist/dropdown-menu.d.ts +13 -39
- package/dist/dropzone.d.ts +3 -54
- package/dist/file-tree.d.ts +3 -53
- package/dist/form.d.ts +8 -45
- package/dist/grid.d.ts +3 -50
- package/dist/hover-card.d.ts +3 -11
- package/dist/index.d.ts +298 -179
- package/dist/index.js +674 -1
- package/dist/index.js.map +1 -1
- package/dist/input-otp.d.ts +5 -19
- package/dist/input.d.ts +2 -6
- package/dist/label.d.ts +2 -11
- package/dist/loading-indicator.d.ts +3 -0
- package/dist/loading-indicator.js +64 -0
- package/dist/loading-indicator.js.map +1 -0
- package/dist/markdown.d.ts +2 -0
- package/dist/markdown.js +28 -0
- package/dist/markdown.js.map +1 -0
- package/dist/menubar.d.ts +11 -35
- package/dist/message-actions.d.ts +2 -0
- package/dist/message-actions.js +28 -0
- package/dist/message-actions.js.map +1 -0
- package/dist/message-list.d.ts +2 -0
- package/dist/message-list.js +49 -0
- package/dist/message-list.js.map +1 -0
- package/dist/message.d.ts +3 -0
- package/dist/message.js +35 -0
- package/dist/message.js.map +1 -0
- package/dist/multi-combobox.d.ts +3 -51
- package/dist/navigation-menu.d.ts +9 -23
- package/dist/pagination.d.ts +7 -40
- package/dist/popover.d.ts +4 -13
- package/dist/progress.d.ts +1 -10
- package/dist/radio-group.d.ts +2 -9
- package/dist/reasoning.d.ts +2 -0
- package/dist/reasoning.js +90 -0
- package/dist/reasoning.js.map +1 -0
- package/dist/resizable.d.ts +3 -28
- package/dist/schemas.d.ts +72 -121
- package/dist/schemas.js +849 -1
- package/dist/schemas.js.map +1 -1
- package/dist/scroll-area.d.ts +3 -18
- package/dist/select.d.ts +8 -21
- package/dist/separator.d.ts +2 -11
- package/dist/sheet.d.ts +10 -39
- package/dist/sidebar.d.ts +8 -75
- package/dist/skeleton.d.ts +1 -11
- package/dist/slider.d.ts +2 -20
- package/dist/sonner.d.ts +2 -14
- package/dist/spacer.d.ts +3 -38
- package/dist/stack.d.ts +3 -34
- package/dist/stepper.d.ts +4 -48
- package/dist/suggestion.d.ts +2 -0
- package/dist/suggestion.js +55 -0
- package/dist/suggestion.js.map +1 -0
- package/dist/switch.d.ts +2 -11
- package/dist/table.d.ts +8 -24
- package/dist/tabs.d.ts +4 -13
- package/dist/textarea.d.ts +2 -10
- package/dist/time-picker.d.ts +2 -34
- package/dist/timeline.d.ts +4 -42
- package/dist/toggle-group.d.ts +2 -17
- package/dist/toggle.d.ts +2 -19
- package/dist/tool-call.d.ts +2 -0
- package/dist/tool-call.js +133 -0
- package/dist/tool-call.js.map +1 -0
- package/dist/tooltip.d.ts +4 -13
- package/package.json +4 -1
- package/dist/button-variants-Bx6gCUFp.d.ts +0 -19
package/dist/input-otp.d.ts
CHANGED
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/** Root OTP input. Wraps input-otp's OTPInput and exposes slot context to children. */
|
|
7
|
-
declare const InputOTP: React.ForwardRefExoticComponent<InputOTPProps & React.RefAttributes<HTMLInputElement>>;
|
|
8
|
-
/** Groups slots together; place between runs of slots to add visual dividers. */
|
|
9
|
-
declare const InputOTPGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
interface InputOTPSlotProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
11
|
-
/** Index of the slot in the underlying OTP value. */
|
|
12
|
-
index: number;
|
|
13
|
-
}
|
|
14
|
-
/** A single character slot. Reads its state from OTPInputContext. */
|
|
15
|
-
declare const InputOTPSlot: React.ForwardRefExoticComponent<InputOTPSlotProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
-
/** Visual separator between slot groups (a bullet by default). */
|
|
17
|
-
declare const InputOTPSeparator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
-
|
|
19
|
-
export { InputOTP, InputOTPGroup, type InputOTPProps, InputOTPSeparator, InputOTPSlot };
|
|
1
|
+
export { InputOTP_alias_1 as InputOTP } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { InputOTPGroup_alias_1 as InputOTPGroup } from './_tsup-dts-rollup.js';
|
|
3
|
+
export { InputOTPSlot_alias_1 as InputOTPSlot } from './_tsup-dts-rollup.js';
|
|
4
|
+
export { InputOTPSeparator_alias_1 as InputOTPSeparator } from './_tsup-dts-rollup.js';
|
|
5
|
+
export { InputOTPProps_alias_1 as InputOTPProps } from './_tsup-dts-rollup.js';
|
package/dist/input.d.ts
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
|
|
4
|
-
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
5
|
-
|
|
6
|
-
export { Input, type InputProps };
|
|
1
|
+
export { InputProps_alias_1 as InputProps } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { Input_alias_1 as Input } from './_tsup-dts-rollup.js';
|
package/dist/label.d.ts
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
|
|
6
|
-
declare const labelVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
7
|
-
interface LabelProps extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>, VariantProps<typeof labelVariants> {
|
|
8
|
-
}
|
|
9
|
-
declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
10
|
-
|
|
11
|
-
export { Label, type LabelProps };
|
|
1
|
+
export { LabelProps_alias_1 as LabelProps } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { Label_alias_1 as Label } from './_tsup-dts-rollup.js';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { LoadingIndicatorProps_alias_1 as LoadingIndicatorProps } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { LoadingIndicator_alias_1 as LoadingIndicator } from './_tsup-dts-rollup.js';
|
|
3
|
+
export { loadingIndicatorVariants_alias_1 as loadingIndicatorVariants } from './_tsup-dts-rollup.js';
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { twMerge } from 'tailwind-merge';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
// src/ai/loading-indicator/loading-indicator.tsx
|
|
7
|
+
function cn(...inputs) {
|
|
8
|
+
return twMerge(clsx(inputs));
|
|
9
|
+
}
|
|
10
|
+
var loadingIndicatorVariants = cva("inline-flex items-center gap-2 text-muted-foreground", {
|
|
11
|
+
variants: {
|
|
12
|
+
size: {
|
|
13
|
+
sm: "text-xs",
|
|
14
|
+
md: "text-sm"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: { size: "md" }
|
|
18
|
+
});
|
|
19
|
+
function LoadingIndicator({
|
|
20
|
+
variant = "dots",
|
|
21
|
+
size,
|
|
22
|
+
label,
|
|
23
|
+
className,
|
|
24
|
+
...props
|
|
25
|
+
}) {
|
|
26
|
+
const ariaLabel = label ?? "Loading";
|
|
27
|
+
return /* @__PURE__ */ jsxs(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
role: "status",
|
|
31
|
+
"aria-live": "polite",
|
|
32
|
+
className: cn(loadingIndicatorVariants({ size }), className),
|
|
33
|
+
...props,
|
|
34
|
+
children: [
|
|
35
|
+
variant === "dots" ? /* @__PURE__ */ jsx(Dots, {}) : null,
|
|
36
|
+
variant === "pulse" ? /* @__PURE__ */ jsx(Pulse, {}) : null,
|
|
37
|
+
variant === "bar" ? /* @__PURE__ */ jsx(Bar, {}) : null,
|
|
38
|
+
label ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: label }) : null,
|
|
39
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: ariaLabel })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
function Dots() {
|
|
45
|
+
return /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
|
|
46
|
+
/* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 animate-bounce rounded-full bg-current [animation-delay:-0.3s]" }),
|
|
47
|
+
/* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 animate-bounce rounded-full bg-current [animation-delay:-0.15s]" }),
|
|
48
|
+
/* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 animate-bounce rounded-full bg-current" })
|
|
49
|
+
] });
|
|
50
|
+
}
|
|
51
|
+
function Pulse() {
|
|
52
|
+
return /* @__PURE__ */ jsx("span", { className: "h-2 w-2 animate-pulse rounded-full bg-current" });
|
|
53
|
+
}
|
|
54
|
+
function Bar() {
|
|
55
|
+
return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1", children: [
|
|
56
|
+
/* @__PURE__ */ jsx("span", { className: "h-0.5 w-2 animate-pulse rounded-full bg-current [animation-delay:-0.4s]" }),
|
|
57
|
+
/* @__PURE__ */ jsx("span", { className: "h-0.5 w-3 animate-pulse rounded-full bg-current [animation-delay:-0.2s]" }),
|
|
58
|
+
/* @__PURE__ */ jsx("span", { className: "h-0.5 w-4 animate-pulse rounded-full bg-current" })
|
|
59
|
+
] });
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { LoadingIndicator, loadingIndicatorVariants };
|
|
63
|
+
//# sourceMappingURL=loading-indicator.js.map
|
|
64
|
+
//# sourceMappingURL=loading-indicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/ai/loading-indicator/loading-indicator.tsx"],"names":[],"mappings":";;;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACNA,IAAM,wBAAA,GAA2B,IAAI,sDAAA,EAAwD;AAAA,EAC5F,QAAA,EAAU;AAAA,IACT,IAAA,EAAM;AAAA,MACL,EAAA,EAAI,SAAA;AAAA,MACJ,EAAA,EAAI;AAAA;AACL,GACD;AAAA,EACA,eAAA,EAAiB,EAAE,IAAA,EAAM,IAAA;AAC1B,CAAC;AAwBD,SAAS,gBAAA,CAAiB;AAAA,EACzB,OAAA,GAAU,MAAA;AAAA,EACV,IAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAA0B;AACzB,EAAA,MAAM,YAAY,KAAA,IAAS,SAAA;AAC3B,EAAA,uBACC,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACA,IAAA,EAAK,QAAA;AAAA,MACL,WAAA,EAAU,QAAA;AAAA,MACV,WAAW,EAAA,CAAG,wBAAA,CAAyB,EAAE,IAAA,EAAM,GAAG,SAAS,CAAA;AAAA,MAC1D,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA;AAAA,QAAA,OAAA,KAAY,MAAA,mBAAS,GAAA,CAAC,IAAA,EAAA,EAAK,CAAA,GAAK,IAAA;AAAA,QAChC,OAAA,KAAY,OAAA,mBAAU,GAAA,CAAC,KAAA,EAAA,EAAM,CAAA,GAAK,IAAA;AAAA,QAClC,OAAA,KAAY,KAAA,mBAAQ,GAAA,CAAC,GAAA,EAAA,EAAI,CAAA,GAAK,IAAA;AAAA,QAC9B,wBACA,GAAA,CAAC,MAAA,EAAA,EAAK,aAAA,EAAY,MAAA,EAAQ,iBAAM,CAAA,GAC7B,IAAA;AAAA,wBACJ,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,SAAA,EAAW,QAAA,EAAA,SAAA,EAAU;AAAA;AAAA;AAAA,GACtC;AAEF;AAEA,SAAS,IAAA,GAAO;AACf,EAAA,uBACC,IAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,yBAAA,EACf,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,WAAU,4EAAA,EAA6E,CAAA;AAAA,oBAC7F,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,6EAAA,EAA8E,CAAA;AAAA,oBAC9F,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,oDAAA,EAAqD;AAAA,GAAA,EACtE,CAAA;AAEF;AAEA,SAAS,KAAA,GAAQ;AAChB,EAAA,uBAAO,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,+CAAA,EAAgD,CAAA;AACxE;AAEA,SAAS,GAAA,GAAM;AACd,EAAA,uBACC,IAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,gCAAA,EACf,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,WAAU,yEAAA,EAA0E,CAAA;AAAA,oBAC1F,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,yEAAA,EAA0E,CAAA;AAAA,oBAC1F,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,iDAAA,EAAkD;AAAA,GAAA,EACnE,CAAA;AAEF","file":"loading-indicator.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import { type VariantProps, cva } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\n\nconst loadingIndicatorVariants = cva(\"inline-flex items-center gap-2 text-muted-foreground\", {\n\tvariants: {\n\t\tsize: {\n\t\t\tsm: \"text-xs\",\n\t\t\tmd: \"text-sm\",\n\t\t},\n\t},\n\tdefaultVariants: { size: \"md\" },\n});\n\n/**\n * Streaming/typing feedback for an in-flight LLM turn. Three motion variants\n * — `dots` (bouncing trio), `pulse` (single throbbing circle), `bar`\n * (horizontal sweep). Pure CSS, no JS — RSC-safe.\n *\n * @example\n * {isLoading && <LoadingIndicator label=\"Thinking…\" />}\n */\nexport interface LoadingIndicatorProps\n\textends React.HTMLAttributes<HTMLDivElement>,\n\t\tVariantProps<typeof loadingIndicatorVariants> {\n\t/** Animation style. Default `dots`. */\n\tvariant?: \"dots\" | \"pulse\" | \"bar\";\n\t/** Optional adjacent label, e.g. \"Thinking…\" or \"Searching docs…\". */\n\tlabel?: string;\n}\n\n/**\n * Renders an animated loading indicator with optional label.\n * @param props - variant + label\n * @returns A status div with role=\"status\"\n */\nfunction LoadingIndicator({\n\tvariant = \"dots\",\n\tsize,\n\tlabel,\n\tclassName,\n\t...props\n}: LoadingIndicatorProps) {\n\tconst ariaLabel = label ?? \"Loading\";\n\treturn (\n\t\t<div\n\t\t\trole=\"status\"\n\t\t\taria-live=\"polite\"\n\t\t\tclassName={cn(loadingIndicatorVariants({ size }), className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{variant === \"dots\" ? <Dots /> : null}\n\t\t\t{variant === \"pulse\" ? <Pulse /> : null}\n\t\t\t{variant === \"bar\" ? <Bar /> : null}\n\t\t\t{label ? (\n\t\t\t\t<span aria-hidden=\"true\">{label}</span>\n\t\t\t) : null}\n\t\t\t<span className=\"sr-only\">{ariaLabel}</span>\n\t\t</div>\n\t);\n}\n\nfunction Dots() {\n\treturn (\n\t\t<span className=\"flex items-center gap-1\">\n\t\t\t<span className=\"h-1.5 w-1.5 animate-bounce rounded-full bg-current [animation-delay:-0.3s]\" />\n\t\t\t<span className=\"h-1.5 w-1.5 animate-bounce rounded-full bg-current [animation-delay:-0.15s]\" />\n\t\t\t<span className=\"h-1.5 w-1.5 animate-bounce rounded-full bg-current\" />\n\t\t</span>\n\t);\n}\n\nfunction Pulse() {\n\treturn <span className=\"h-2 w-2 animate-pulse rounded-full bg-current\" />;\n}\n\nfunction Bar() {\n\treturn (\n\t\t<span className=\"inline-flex items-center gap-1\">\n\t\t\t<span className=\"h-0.5 w-2 animate-pulse rounded-full bg-current [animation-delay:-0.4s]\" />\n\t\t\t<span className=\"h-0.5 w-3 animate-pulse rounded-full bg-current [animation-delay:-0.2s]\" />\n\t\t\t<span className=\"h-0.5 w-4 animate-pulse rounded-full bg-current\" />\n\t\t</span>\n\t);\n}\n\nexport { LoadingIndicator, loadingIndicatorVariants };\n"]}
|
package/dist/markdown.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Streamdown } from 'streamdown';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function cn(...inputs) {
|
|
8
|
+
return twMerge(clsx(inputs));
|
|
9
|
+
}
|
|
10
|
+
function Markdown({ children, className }) {
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
Streamdown,
|
|
13
|
+
{
|
|
14
|
+
className: cn(
|
|
15
|
+
"prose prose-sm max-w-none text-foreground",
|
|
16
|
+
"prose-headings:text-foreground prose-strong:text-foreground",
|
|
17
|
+
"prose-a:text-primary prose-a:underline-offset-4 hover:prose-a:underline",
|
|
18
|
+
"prose-code:text-foreground prose-code:before:content-none prose-code:after:content-none",
|
|
19
|
+
className
|
|
20
|
+
),
|
|
21
|
+
children
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { Markdown };
|
|
27
|
+
//# sourceMappingURL=markdown.js.map
|
|
28
|
+
//# sourceMappingURL=markdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/ai/markdown/markdown.tsx"],"names":[],"mappings":";;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;AC8BA,SAAS,QAAA,CAAS,EAAE,QAAA,EAAU,SAAA,EAAU,EAAkB;AACzD,EAAA,uBACC,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA,QACV,2CAAA;AAAA,QACA,6DAAA;AAAA,QACA,yEAAA;AAAA,QACA,yFAAA;AAAA,QACA;AAAA,OACD;AAAA,MAEC;AAAA;AAAA,GACF;AAEF","file":"markdown.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport * as React from \"react\";\nimport { Streamdown } from \"streamdown\";\nimport { cn } from \"../../lib/utils.js\";\n\n/**\n * Streaming-safe markdown renderer. Wraps Vercel's `streamdown` so partial\n * input mid-stream — unclosed code fences, half-typed tags, dangling\n * brackets — renders gracefully instead of throwing or flashing raw text.\n *\n * Public prop surface is intentionally minimal (`children` + `className`)\n * so this primitive's DTS doesn't drag in `streamdown`'s full type graph.\n * Doing so would transitively pull Shiki's 600-literal `BundledLanguage`\n * union into the rollup-dts pass and exhaust heap. For per-element\n * overrides (custom `pre`, `code`, `a`, `img`, mermaid, math, line\n * numbers, plugins, etc.) drop down to `Streamdown` directly:\n *\n * ```tsx\n * import { Streamdown } from \"streamdown\";\n * import { CodeBlock } from \"@hex-core/components\";\n * <Streamdown components={{ pre: (p) => <CodeBlock {...p} /> }}>{md}</Streamdown>\n * ```\n *\n * @example\n * <Message role=\"assistant\">\n * <Markdown>{streamingText}</Markdown>\n * </Message>\n */\nexport interface MarkdownProps {\n\t/** Raw markdown. May be a partial chunk during streaming. */\n\tchildren: string;\n\tclassName?: string;\n}\n\n/**\n * Renders streaming-safe markdown.\n * @param props - children string + optional Streamdown overrides\n * @returns A Streamdown root scoped with prose styles\n */\nfunction Markdown({ children, className }: MarkdownProps) {\n\treturn (\n\t\t<Streamdown\n\t\t\tclassName={cn(\n\t\t\t\t\"prose prose-sm max-w-none text-foreground\",\n\t\t\t\t\"prose-headings:text-foreground prose-strong:text-foreground\",\n\t\t\t\t\"prose-a:text-primary prose-a:underline-offset-4 hover:prose-a:underline\",\n\t\t\t\t\"prose-code:text-foreground prose-code:before:content-none prose-code:after:content-none\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{children}\n\t\t</Streamdown>\n\t);\n}\n\nexport { Markdown };\n"]}
|
package/dist/menubar.d.ts
CHANGED
|
@@ -1,35 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
declare const MenubarPortal: typeof MenubarPrimitive.Portal;
|
|
13
|
-
/** Group for checkable radio items. */
|
|
14
|
-
declare const MenubarRadioGroup: typeof MenubarPrimitive.RadioGroup;
|
|
15
|
-
/** The clickable menu label in the bar. */
|
|
16
|
-
declare const MenubarTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
-
/** The menu panel shown when a trigger opens. */
|
|
18
|
-
declare const MenubarContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
/** A clickable menu item. */
|
|
20
|
-
declare const MenubarItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
21
|
-
inset?: boolean;
|
|
22
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
-
/** A non-interactive heading label. */
|
|
24
|
-
declare const MenubarLabel: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
25
|
-
inset?: boolean;
|
|
26
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
-
/** Horizontal divider. */
|
|
28
|
-
declare const MenubarSeparator: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
-
/**
|
|
30
|
-
* Right-aligned keyboard shortcut text.
|
|
31
|
-
* @returns A span with muted typography
|
|
32
|
-
*/
|
|
33
|
-
declare function MenubarShortcut({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
34
|
-
|
|
35
|
-
export { Menubar, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarSeparator, MenubarShortcut, MenubarTrigger };
|
|
1
|
+
export { Menubar_alias_1 as Menubar } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { MenubarMenu_alias_1 as MenubarMenu } from './_tsup-dts-rollup.js';
|
|
3
|
+
export { MenubarTrigger_alias_1 as MenubarTrigger } from './_tsup-dts-rollup.js';
|
|
4
|
+
export { MenubarContent_alias_1 as MenubarContent } from './_tsup-dts-rollup.js';
|
|
5
|
+
export { MenubarItem_alias_1 as MenubarItem } from './_tsup-dts-rollup.js';
|
|
6
|
+
export { MenubarLabel_alias_1 as MenubarLabel } from './_tsup-dts-rollup.js';
|
|
7
|
+
export { MenubarSeparator_alias_1 as MenubarSeparator } from './_tsup-dts-rollup.js';
|
|
8
|
+
export { MenubarShortcut_alias_1 as MenubarShortcut } from './_tsup-dts-rollup.js';
|
|
9
|
+
export { MenubarGroup_alias_1 as MenubarGroup } from './_tsup-dts-rollup.js';
|
|
10
|
+
export { MenubarPortal_alias_1 as MenubarPortal } from './_tsup-dts-rollup.js';
|
|
11
|
+
export { MenubarRadioGroup_alias_1 as MenubarRadioGroup } from './_tsup-dts-rollup.js';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { twMerge } from 'tailwind-merge';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
// src/lib/utils.ts
|
|
7
|
+
function cn(...inputs) {
|
|
8
|
+
return twMerge(clsx(inputs));
|
|
9
|
+
}
|
|
10
|
+
function MessageActions({ className, children, ...props }) {
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
className: cn(
|
|
15
|
+
"mt-2 flex items-center gap-1 opacity-60",
|
|
16
|
+
"transition-opacity duration-[var(--duration-normal,200ms)] ease-out",
|
|
17
|
+
"group-hover/message:opacity-100 hover:opacity-100 focus-within:opacity-100",
|
|
18
|
+
className
|
|
19
|
+
),
|
|
20
|
+
...props,
|
|
21
|
+
children
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { MessageActions };
|
|
27
|
+
//# sourceMappingURL=message-actions.js.map
|
|
28
|
+
//# sourceMappingURL=message-actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/ai/message-actions/message-actions.tsx"],"names":[],"mappings":";;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACmBA,SAAS,eAAe,EAAE,SAAA,EAAW,QAAA,EAAU,GAAG,OAAM,EAAwB;AAC/E,EAAA,uBACC,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA,QACV,yCAAA;AAAA,QACA,qEAAA;AAAA,QACA,4EAAA;AAAA,QACA;AAAA,OACD;AAAA,MACC,GAAG,KAAA;AAAA,MAEH;AAAA;AAAA,GACF;AAEF","file":"message-actions.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\n\n/**\n * Inline action row beneath a message — typically holds copy / regenerate /\n * thumbs-up / thumbs-down buttons. Pure container: it sets the layout and\n * leaves the buttons (and their handlers) to the consumer.\n *\n * Renders below the message body with subtle hover-reveal styling — the\n * row is dimmed by default and brightens when the parent hovers.\n *\n * @example\n * <Message role=\"assistant\">\n * <Markdown>{text}</Markdown>\n * <MessageActions>\n * <Button variant=\"ghost\" size=\"icon\" onClick={() => copy(text)}><CopyIcon /></Button>\n * <Button variant=\"ghost\" size=\"icon\" onClick={onRegenerate}><RetryIcon /></Button>\n * </MessageActions>\n * </Message>\n */\nexport interface MessageActionsProps extends React.HTMLAttributes<HTMLDivElement> {\n\tchildren: React.ReactNode;\n}\n\n/**\n * Renders the action-button row.\n * @param props - children buttons\n * @returns A flex container styled for in-message actions\n */\nfunction MessageActions({ className, children, ...props }: MessageActionsProps) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"mt-2 flex items-center gap-1 opacity-60\",\n\t\t\t\t\"transition-opacity duration-[var(--duration-normal,200ms)] ease-out\",\n\t\t\t\t\"group-hover/message:opacity-100 hover:opacity-100 focus-within:opacity-100\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\nexport { MessageActions };\n"]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function cn(...inputs) {
|
|
8
|
+
return twMerge(clsx(inputs));
|
|
9
|
+
}
|
|
10
|
+
var NEAR_BOTTOM_THRESHOLD_PX = 80;
|
|
11
|
+
function MessageList({
|
|
12
|
+
autoScroll = true,
|
|
13
|
+
className,
|
|
14
|
+
children,
|
|
15
|
+
...props
|
|
16
|
+
}) {
|
|
17
|
+
const ref = React.useRef(null);
|
|
18
|
+
const stickToBottomRef = React.useRef(true);
|
|
19
|
+
React.useEffect(() => {
|
|
20
|
+
const el = ref.current;
|
|
21
|
+
if (!el || !autoScroll) return;
|
|
22
|
+
if (stickToBottomRef.current) {
|
|
23
|
+
el.scrollTop = el.scrollHeight;
|
|
24
|
+
}
|
|
25
|
+
}, [autoScroll, children]);
|
|
26
|
+
function handleScroll(event) {
|
|
27
|
+
const el = event.currentTarget;
|
|
28
|
+
const distance = el.scrollHeight - el.scrollTop - el.clientHeight;
|
|
29
|
+
stickToBottomRef.current = distance < NEAR_BOTTOM_THRESHOLD_PX;
|
|
30
|
+
props.onScroll?.(event);
|
|
31
|
+
}
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
ref,
|
|
36
|
+
role: "log",
|
|
37
|
+
"aria-live": "polite",
|
|
38
|
+
"aria-relevant": "additions",
|
|
39
|
+
className: cn("flex flex-col overflow-y-auto", className),
|
|
40
|
+
...props,
|
|
41
|
+
onScroll: handleScroll,
|
|
42
|
+
children
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { MessageList };
|
|
48
|
+
//# sourceMappingURL=message-list.js.map
|
|
49
|
+
//# sourceMappingURL=message-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/ai/message-list/message-list.tsx"],"names":[],"mappings":";;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACaA,IAAM,wBAAA,GAA2B,EAAA;AAOjC,SAAS,WAAA,CAAY;AAAA,EACpB,UAAA,GAAa,IAAA;AAAA,EACb,SAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAAqB;AACpB,EAAA,MAAM,GAAA,GAAY,aAAuB,IAAI,CAAA;AAC7C,EAAA,MAAM,gBAAA,GAAyB,aAAO,IAAI,CAAA;AAE1C,EAAM,gBAAU,MAAM;AACrB,IAAA,MAAM,KAAK,GAAA,CAAI,OAAA;AACf,IAAA,IAAI,CAAC,EAAA,IAAM,CAAC,UAAA,EAAY;AACxB,IAAA,IAAI,iBAAiB,OAAA,EAAS;AAC7B,MAAA,EAAA,CAAG,YAAY,EAAA,CAAG,YAAA;AAAA,IACnB;AAAA,EACD,CAAA,EAAG,CAAC,UAAA,EAAY,QAAQ,CAAC,CAAA;AAEzB,EAAA,SAAS,aAAa,KAAA,EAAsC;AAC3D,IAAA,MAAM,KAAK,KAAA,CAAM,aAAA;AACjB,IAAA,MAAM,QAAA,GAAW,EAAA,CAAG,YAAA,GAAe,EAAA,CAAG,YAAY,EAAA,CAAG,YAAA;AACrD,IAAA,gBAAA,CAAiB,UAAU,QAAA,GAAW,wBAAA;AACtC,IAAA,KAAA,CAAM,WAAW,KAAK,CAAA;AAAA,EACvB;AAEA,EAAA,uBACC,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACA,GAAA;AAAA,MACA,IAAA,EAAK,KAAA;AAAA,MACL,WAAA,EAAU,QAAA;AAAA,MACV,eAAA,EAAc,WAAA;AAAA,MACd,SAAA,EAAW,EAAA,CAAG,+BAAA,EAAiC,SAAS,CAAA;AAAA,MACvD,GAAG,KAAA;AAAA,MACJ,QAAA,EAAU,YAAA;AAAA,MAET;AAAA;AAAA,GACF;AAEF","file":"message-list.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\n\n/**\n * Auto-scrolling viewport for a stream of chat messages. When `autoScroll`\n * is true (default), the container pins to the bottom whenever its content\n * changes — including during streaming token updates. Detects whether the\n * user has scrolled away from the bottom and pauses auto-scroll until they\n * scroll back, so reading earlier turns doesn't fight the stream.\n *\n * @example\n * <MessageList>\n * {messages.map((m) => <Message key={m.id} role={m.role}>{m.content}</Message>)}\n * </MessageList>\n */\nexport interface MessageListProps extends React.HTMLAttributes<HTMLDivElement> {\n\t/** Auto-scroll to bottom on content change (when user is already near the bottom). Default: true. */\n\tautoScroll?: boolean;\n\tchildren: React.ReactNode;\n}\n\nconst NEAR_BOTTOM_THRESHOLD_PX = 80;\n\n/**\n * Renders the scrolling message viewport.\n * @param props - children + autoScroll toggle\n * @returns A scrollable div that auto-pins to bottom when streaming\n */\nfunction MessageList({\n\tautoScroll = true,\n\tclassName,\n\tchildren,\n\t...props\n}: MessageListProps) {\n\tconst ref = React.useRef<HTMLDivElement>(null);\n\tconst stickToBottomRef = React.useRef(true);\n\n\tReact.useEffect(() => {\n\t\tconst el = ref.current;\n\t\tif (!el || !autoScroll) return;\n\t\tif (stickToBottomRef.current) {\n\t\t\tel.scrollTop = el.scrollHeight;\n\t\t}\n\t}, [autoScroll, children]);\n\n\tfunction handleScroll(event: React.UIEvent<HTMLDivElement>) {\n\t\tconst el = event.currentTarget;\n\t\tconst distance = el.scrollHeight - el.scrollTop - el.clientHeight;\n\t\tstickToBottomRef.current = distance < NEAR_BOTTOM_THRESHOLD_PX;\n\t\tprops.onScroll?.(event);\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\trole=\"log\"\n\t\t\taria-live=\"polite\"\n\t\t\taria-relevant=\"additions\"\n\t\t\tclassName={cn(\"flex flex-col overflow-y-auto\", className)}\n\t\t\t{...props}\n\t\t\tonScroll={handleScroll}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\nexport { MessageList };\n"]}
|
package/dist/message.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { twMerge } from 'tailwind-merge';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
// src/ai/message/message.tsx
|
|
7
|
+
function cn(...inputs) {
|
|
8
|
+
return twMerge(clsx(inputs));
|
|
9
|
+
}
|
|
10
|
+
var messageVariants = cva(
|
|
11
|
+
[
|
|
12
|
+
"flex w-full gap-3 px-4 py-3 text-sm",
|
|
13
|
+
"transition-colors duration-[var(--duration-normal,200ms)] ease-out"
|
|
14
|
+
].join(" "),
|
|
15
|
+
{
|
|
16
|
+
variants: {
|
|
17
|
+
role: {
|
|
18
|
+
user: "bg-secondary/40 text-foreground",
|
|
19
|
+
assistant: "bg-card text-card-foreground",
|
|
20
|
+
system: "bg-muted text-muted-foreground italic",
|
|
21
|
+
tool: "bg-accent/15 text-accent-foreground border-l-2 border-accent"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
role: "assistant"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
function Message({ role, className, children, ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsx("div", { "data-role": role, className: cn(messageVariants({ role }), className), ...props, children });
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { Message, messageVariants };
|
|
34
|
+
//# sourceMappingURL=message.js.map
|
|
35
|
+
//# sourceMappingURL=message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/ai/message/message.tsx"],"names":[],"mappings":";;;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACLA,IAAM,eAAA,GAAkB,GAAA;AAAA,EACvB;AAAA,IACC,qCAAA;AAAA,IACA;AAAA,GACD,CAAE,KAAK,GAAG,CAAA;AAAA,EACV;AAAA,IACC,QAAA,EAAU;AAAA,MACT,IAAA,EAAM;AAAA,QACL,IAAA,EAAM,iCAAA;AAAA,QACN,SAAA,EAAW,8BAAA;AAAA,QACX,MAAA,EAAQ,uCAAA;AAAA,QACR,IAAA,EAAM;AAAA;AACP,KACD;AAAA,IACA,eAAA,EAAiB;AAAA,MAChB,IAAA,EAAM;AAAA;AACP;AAEF;AA8BA,SAAS,QAAQ,EAAE,IAAA,EAAM,WAAW,QAAA,EAAU,GAAG,OAAM,EAAiB;AACvE,EAAA,uBACC,GAAA,CAAC,KAAA,EAAA,EAAI,WAAA,EAAW,IAAA,EAAM,WAAW,EAAA,CAAG,eAAA,CAAgB,EAAE,IAAA,EAAM,CAAA,EAAG,SAAS,CAAA,EAAI,GAAG,OAC7E,QAAA,EACF,CAAA;AAEF","file":"message.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS conflict resolution.\n * @param inputs - Class values (strings, arrays, objects) to merge\n * @returns A single merged class string with Tailwind conflicts resolved\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import { type VariantProps, cva } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport { cn } from \"../../lib/utils.js\";\nimport type { Role } from \"../types.js\";\n\nconst messageVariants = cva(\n\t[\n\t\t\"flex w-full gap-3 px-4 py-3 text-sm\",\n\t\t\"transition-colors duration-[var(--duration-normal,200ms)] ease-out\",\n\t].join(\" \"),\n\t{\n\t\tvariants: {\n\t\t\trole: {\n\t\t\t\tuser: \"bg-secondary/40 text-foreground\",\n\t\t\t\tassistant: \"bg-card text-card-foreground\",\n\t\t\t\tsystem: \"bg-muted text-muted-foreground italic\",\n\t\t\t\ttool: \"bg-accent/15 text-accent-foreground border-l-2 border-accent\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\trole: \"assistant\",\n\t\t},\n\t},\n);\n\n/**\n * Single chat message row. Renders content with role-specific styling and a\n * `data-role` attribute so consumers can target arbitrary roles via CSS.\n *\n * Headless: accepts any `children`. Pair with `Markdown` + `CodeBlock` for\n * assistant turns, with `ToolCall` for agent steps, or with plain strings.\n *\n * @example\n * <Message role=\"user\">What's the weather?</Message>\n * @example\n * <Message role=\"assistant\">\n * <Markdown>{streamingText}</Markdown>\n * <ToolCall name=\"getWeather\" state=\"result\" args={...} result={...} />\n * </Message>\n */\nexport interface MessageProps\n\textends Omit<React.HTMLAttributes<HTMLDivElement>, \"role\">,\n\t\tVariantProps<typeof messageVariants> {\n\t/** Speaker — drives variant styling and the `data-role` attribute. */\n\trole: Role;\n\tchildren: React.ReactNode;\n}\n\n/**\n * Renders a chat-message row scoped to one speaker.\n * @param props - role + content\n * @returns A styled div tagged with `data-role={role}`\n */\nfunction Message({ role, className, children, ...props }: MessageProps) {\n\treturn (\n\t\t<div data-role={role} className={cn(messageVariants({ role }), className)} {...props}>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\nexport { Message, messageVariants };\n"]}
|
package/dist/multi-combobox.d.ts
CHANGED
|
@@ -1,51 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/** The value returned in the onChange array (stable, unique). */
|
|
5
|
-
value: string;
|
|
6
|
-
/** The display label shown in the list and the trigger. */
|
|
7
|
-
label: string;
|
|
8
|
-
/** Mark as non-selectable. */
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
}
|
|
11
|
-
interface MultiComboboxProps {
|
|
12
|
-
/** The list of selectable options. */
|
|
13
|
-
options: MultiComboboxOption[];
|
|
14
|
-
/** Controlled selected values. */
|
|
15
|
-
value?: string[];
|
|
16
|
-
/** Fired when the user toggles an option: (values: string[]) => void */
|
|
17
|
-
onChange?: (values: string[]) => void;
|
|
18
|
-
/** Text shown on the trigger when nothing is selected. */
|
|
19
|
-
placeholder?: string;
|
|
20
|
-
/** Input placeholder inside the popover list. */
|
|
21
|
-
searchPlaceholder?: string;
|
|
22
|
-
/** Text shown when no options match the search. */
|
|
23
|
-
emptyText?: string;
|
|
24
|
-
/** Soft cap on selections. Once reached, unselected options become non-selectable. */
|
|
25
|
-
maxSelected?: number;
|
|
26
|
-
/** Close the popover after every pick. Default false (multi-select UX expects staying open). */
|
|
27
|
-
closeOnSelect?: boolean;
|
|
28
|
-
/** Disable the trigger. */
|
|
29
|
-
disabled?: boolean;
|
|
30
|
-
/** Extra class names on the trigger button. */
|
|
31
|
-
className?: string;
|
|
32
|
-
/** Accessible label for the trigger (required when no adjacent visible label). */
|
|
33
|
-
"aria-label"?: string;
|
|
34
|
-
/** Id of an external visible label that names this combobox. */
|
|
35
|
-
"aria-labelledby"?: string;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Searchable multi-select input built on Command + Popover.
|
|
39
|
-
*
|
|
40
|
-
* Pass `options` with `{ value, label }` and bind `value` (string[]) +
|
|
41
|
-
* `onChange`. The trigger shows "{n} selected" once any option is picked, with
|
|
42
|
-
* the comma-separated label list mirrored into the `title` attribute for
|
|
43
|
-
* pointer/screen-reader fallback. Each option is announced with `aria-selected`.
|
|
44
|
-
* @returns A trigger button that opens a multi-select option list.
|
|
45
|
-
*/
|
|
46
|
-
declare function MultiCombobox({ options, value, onChange, placeholder, searchPlaceholder, emptyText, maxSelected, closeOnSelect, disabled, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, }: MultiComboboxProps): react_jsx_runtime.JSX.Element;
|
|
47
|
-
declare namespace MultiCombobox {
|
|
48
|
-
var displayName: string;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export { MultiCombobox, type MultiComboboxOption, type MultiComboboxProps };
|
|
1
|
+
export { MultiCombobox_alias_1 as MultiCombobox } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { MultiComboboxOption_alias_1 as MultiComboboxOption } from './_tsup-dts-rollup.js';
|
|
3
|
+
export { MultiComboboxProps_alias_1 as MultiComboboxProps } from './_tsup-dts-rollup.js';
|
|
@@ -1,23 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
declare const NavigationMenuItem: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
11
|
-
declare const navigationMenuTriggerStyle: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
12
|
-
/** The clickable trigger that opens a nav-menu content panel. */
|
|
13
|
-
declare const NavigationMenuTrigger: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
-
/** The content panel (e.g. mega-menu). */
|
|
15
|
-
declare const NavigationMenuContent: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
-
/** A direct link (no content panel). */
|
|
17
|
-
declare const NavigationMenuLink: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
18
|
-
/** The viewport that hosts the active content panel. Rendered inside NavigationMenu. */
|
|
19
|
-
declare const NavigationMenuViewport: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuViewportProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
-
/** Visual indicator (arrow) pointing at the active trigger. */
|
|
21
|
-
declare const NavigationMenuIndicator: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuIndicatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
-
|
|
23
|
-
export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, navigationMenuTriggerStyle };
|
|
1
|
+
export { navigationMenuTriggerStyle_alias_1 as navigationMenuTriggerStyle } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { NavigationMenu_alias_1 as NavigationMenu } from './_tsup-dts-rollup.js';
|
|
3
|
+
export { NavigationMenuList_alias_1 as NavigationMenuList } from './_tsup-dts-rollup.js';
|
|
4
|
+
export { NavigationMenuItem_alias_1 as NavigationMenuItem } from './_tsup-dts-rollup.js';
|
|
5
|
+
export { NavigationMenuContent_alias_1 as NavigationMenuContent } from './_tsup-dts-rollup.js';
|
|
6
|
+
export { NavigationMenuTrigger_alias_1 as NavigationMenuTrigger } from './_tsup-dts-rollup.js';
|
|
7
|
+
export { NavigationMenuLink_alias_1 as NavigationMenuLink } from './_tsup-dts-rollup.js';
|
|
8
|
+
export { NavigationMenuIndicator_alias_1 as NavigationMenuIndicator } from './_tsup-dts-rollup.js';
|
|
9
|
+
export { NavigationMenuViewport_alias_1 as NavigationMenuViewport } from './_tsup-dts-rollup.js';
|
package/dist/pagination.d.ts
CHANGED
|
@@ -1,40 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* Root nav landmark for pagination controls.
|
|
9
|
-
* @returns A centered nav element with aria-label='pagination'
|
|
10
|
-
*/
|
|
11
|
-
declare function Pagination({ className, ...props }: React.ComponentProps<"nav">): react_jsx_runtime.JSX.Element;
|
|
12
|
-
/** Ordered list wrapper for pagination links. */
|
|
13
|
-
declare const PaginationContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
14
|
-
/** A pagination list item wrapper. */
|
|
15
|
-
declare const PaginationItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
16
|
-
type PaginationLinkProps = {
|
|
17
|
-
isActive?: boolean;
|
|
18
|
-
} & Pick<ButtonVariantsProps, "size"> & React.ComponentProps<"a">;
|
|
19
|
-
/**
|
|
20
|
-
* A pagination link styled as a button. Mark the current page with isActive.
|
|
21
|
-
* @returns An anchor element styled via buttonVariants
|
|
22
|
-
*/
|
|
23
|
-
declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): react_jsx_runtime.JSX.Element;
|
|
24
|
-
/**
|
|
25
|
-
* Previous-page link with chevron-left icon.
|
|
26
|
-
* @returns A PaginationLink with aria-label='Go to previous page'
|
|
27
|
-
*/
|
|
28
|
-
declare function PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>): react_jsx_runtime.JSX.Element;
|
|
29
|
-
/**
|
|
30
|
-
* Next-page link with chevron-right icon.
|
|
31
|
-
* @returns A PaginationLink with aria-label='Go to next page'
|
|
32
|
-
*/
|
|
33
|
-
declare function PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>): react_jsx_runtime.JSX.Element;
|
|
34
|
-
/**
|
|
35
|
-
* Ellipsis placeholder for truncated page ranges (e.g. 1 … 5 6 7 … 99).
|
|
36
|
-
* @returns A span containing a decorative SVG (aria-hidden) plus a sr-only "More pages" label for AT.
|
|
37
|
-
*/
|
|
38
|
-
declare function PaginationEllipsis({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
39
|
-
|
|
40
|
-
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
1
|
+
export { Pagination_alias_1 as Pagination } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { PaginationContent_alias_1 as PaginationContent } from './_tsup-dts-rollup.js';
|
|
3
|
+
export { PaginationEllipsis_alias_1 as PaginationEllipsis } from './_tsup-dts-rollup.js';
|
|
4
|
+
export { PaginationItem_alias_1 as PaginationItem } from './_tsup-dts-rollup.js';
|
|
5
|
+
export { PaginationLink_alias_1 as PaginationLink } from './_tsup-dts-rollup.js';
|
|
6
|
+
export { PaginationNext_alias_1 as PaginationNext } from './_tsup-dts-rollup.js';
|
|
7
|
+
export { PaginationPrevious_alias_1 as PaginationPrevious } from './_tsup-dts-rollup.js';
|
package/dist/popover.d.ts
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
6
|
-
/** The element that anchors and opens the popover. */
|
|
7
|
-
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
-
/** Helper to explicitly anchor the popover to a different element. */
|
|
9
|
-
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
/** The floating popover content panel. */
|
|
11
|
-
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
|
|
13
|
-
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
1
|
+
export { Popover_alias_1 as Popover } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { PopoverTrigger_alias_1 as PopoverTrigger } from './_tsup-dts-rollup.js';
|
|
3
|
+
export { PopoverContent_alias_1 as PopoverContent } from './_tsup-dts-rollup.js';
|
|
4
|
+
export { PopoverAnchor_alias_1 as PopoverAnchor } from './_tsup-dts-rollup.js';
|
package/dist/progress.d.ts
CHANGED
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* A horizontal progress bar from 0–100%.
|
|
6
|
-
* Built on Radix UI Progress for aria-valuenow/max wiring.
|
|
7
|
-
*/
|
|
8
|
-
declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
-
|
|
10
|
-
export { Progress };
|
|
1
|
+
export { Progress_alias_1 as Progress } from './_tsup-dts-rollup.js';
|
package/dist/radio-group.d.ts
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/** Root container for a radio group. Pair with one or more RadioGroupItem. */
|
|
5
|
-
declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
/** A single radio option within a RadioGroup. */
|
|
7
|
-
declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
-
|
|
9
|
-
export { RadioGroup, RadioGroupItem };
|
|
1
|
+
export { RadioGroup_alias_1 as RadioGroup } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { RadioGroupItem_alias_1 as RadioGroupItem } from './_tsup-dts-rollup.js';
|