@gentiq/ui 1.0.0-alpha.3 → 1.0.0-alpha.5
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/{MessageEditor-HB-YJP7R.js → MessageEditor-CTATfUm3.js} +1 -1
- package/dist/{VoiceInput-B3e7emmb.js → VoiceInput-CYuGXRYZ.js} +16 -15
- package/dist/index.d.ts +74 -6
- package/dist/index.es.js +46 -2029
- package/dist/internal.d.ts +18 -18
- package/dist/internal.es.js +94 -87
- package/dist/shared-BPpDLW8N.js +650 -0
- package/dist/shared-Yglb7Id_.js +5095 -0
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/dist/shared-BNCHeyvj.js +0 -3505
package/dist/internal.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ import { FC } from 'react';
|
|
|
12
12
|
import { GentiqUIMessage } from '@gentiq/core';
|
|
13
13
|
import { HTMLAttributes } from 'react';
|
|
14
14
|
import { JSX } from 'react/jsx-runtime';
|
|
15
|
-
import { LoaderVariant } from '@gentiq/react';
|
|
16
15
|
import { MaintenanceStatus } from '@gentiq/core';
|
|
17
16
|
import { MessagePartComponents } from '@gentiq/react';
|
|
18
17
|
import { PlanDuration } from '@gentiq/core';
|
|
@@ -32,7 +31,7 @@ export declare function Badge({ className, variant, asChild, ...props }: React_2
|
|
|
32
31
|
}): JSX.Element;
|
|
33
32
|
|
|
34
33
|
declare const badgeVariants: (props?: ({
|
|
35
|
-
variant?: "default" | "destructive" | "
|
|
34
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
36
35
|
} & ClassProp) | undefined) => string;
|
|
37
36
|
|
|
38
37
|
/** Meters gentiq counts itself. Anything else is app-defined and shown by its key. */
|
|
@@ -43,7 +42,7 @@ export declare function Button({ className, variant, size, asChild, ...props }:
|
|
|
43
42
|
}): JSX.Element;
|
|
44
43
|
|
|
45
44
|
declare const buttonVariants: (props?: ({
|
|
46
|
-
variant?: "default" | "destructive" | "link" | "
|
|
45
|
+
variant?: "default" | "destructive" | "link" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
47
46
|
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
48
47
|
} & ClassProp) | undefined) => string;
|
|
49
48
|
|
|
@@ -196,9 +195,9 @@ export declare function describeWindow(t: TFunction, window: {
|
|
|
196
195
|
anchor?: QuotaAnchor;
|
|
197
196
|
}): string;
|
|
198
197
|
|
|
199
|
-
export declare function Dialog(
|
|
198
|
+
export declare function Dialog(props: React_2.ComponentProps<typeof DialogPrimitive.Root>): JSX.Element;
|
|
200
199
|
|
|
201
|
-
export declare function DialogClose(
|
|
200
|
+
export declare function DialogClose(props: React_2.ComponentProps<typeof DialogPrimitive.Close>): JSX.Element;
|
|
202
201
|
|
|
203
202
|
export declare function DialogContent({ className, children, showCloseButton, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
204
203
|
showCloseButton?: boolean;
|
|
@@ -212,9 +211,9 @@ export declare function DialogHeader({ className, ...props }: React_2.ComponentP
|
|
|
212
211
|
|
|
213
212
|
export declare function DialogTitle({ className, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Title>): JSX.Element;
|
|
214
213
|
|
|
215
|
-
export declare function DialogTrigger(
|
|
214
|
+
export declare function DialogTrigger(props: React_2.ComponentProps<typeof DialogPrimitive.Trigger>): JSX.Element;
|
|
216
215
|
|
|
217
|
-
export declare function DropdownMenu(
|
|
216
|
+
export declare function DropdownMenu(props: React_2.ComponentProps<typeof DropdownMenuPrimitive.Root>): JSX.Element;
|
|
218
217
|
|
|
219
218
|
export declare function DropdownMenuContent({ className, sideOffset, ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.Content>): JSX.Element;
|
|
220
219
|
|
|
@@ -223,7 +222,7 @@ export declare function DropdownMenuItem({ className, inset, variant, ...props }
|
|
|
223
222
|
variant?: 'default' | 'destructive';
|
|
224
223
|
}): JSX.Element;
|
|
225
224
|
|
|
226
|
-
export declare function DropdownMenuTrigger(
|
|
225
|
+
export declare function DropdownMenuTrigger(props: React_2.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): JSX.Element;
|
|
227
226
|
|
|
228
227
|
/** The slots that always have a component: Gentiq's own unless the host replaced it. */
|
|
229
228
|
declare type FilledSlots = 'MessageList' | 'MessageActions' | 'PromptInput' | 'WelcomeScreen' | 'parts' | 'ChoiceQuestionPart' | 'ChoiceQuestionDock' | 'FollowUpSuggestions' | 'ChatError' | 'UsageMeter' | 'MaintenanceBanner' | 'MaintenanceScreen';
|
|
@@ -277,6 +276,10 @@ declare interface GentiqComponents {
|
|
|
277
276
|
PromptInput?: ComponentType<PromptInputProps>;
|
|
278
277
|
/** Replaces the welcome / empty-state screen */
|
|
279
278
|
WelcomeScreen?: ComponentType<WelcomeScreenProps>;
|
|
279
|
+
/**
|
|
280
|
+
* Replaces the pending-reply and thread-loading indicator with a custom loader component.
|
|
281
|
+
*/
|
|
282
|
+
Loader?: ComponentType<LoaderProps>;
|
|
280
283
|
/**
|
|
281
284
|
* The component for each part type, over Gentiq's: `text`, `reasoning`, `file`, `tool` (any tool
|
|
282
285
|
* call without its own), `tool-<name>` (one tool's calls), `data-<name>` (a part the backend
|
|
@@ -452,8 +455,7 @@ declare interface HeaderActionConfig {
|
|
|
452
455
|
*/
|
|
453
456
|
declare interface HeaderActionsProps {
|
|
454
457
|
/**
|
|
455
|
-
* Whether the viewport is phone-sized.
|
|
456
|
-
* phone there is room for about one icon-sized button before it is covered.
|
|
458
|
+
* Whether the viewport is phone-sized.
|
|
457
459
|
*/
|
|
458
460
|
isMobile: boolean;
|
|
459
461
|
}
|
|
@@ -467,12 +469,10 @@ export declare const Loader: ({ className, variant, ...props }: LoaderProps) =>
|
|
|
467
469
|
declare type LoaderProps = HTMLAttributes<HTMLDivElement> & {
|
|
468
470
|
size?: number;
|
|
469
471
|
/**
|
|
470
|
-
*
|
|
471
|
-
*
|
|
472
|
-
* Every variant but `dots` draws only when the app loads `gentiq/loaders.css`;
|
|
473
|
-
* without it, the dots show.
|
|
472
|
+
* Indicator variant. Retained for compatibility with custom renderers;
|
|
473
|
+
* Gentiq's built-in loader renders the clean 3-dot pulse.
|
|
474
474
|
*/
|
|
475
|
-
variant?:
|
|
475
|
+
variant?: string;
|
|
476
476
|
};
|
|
477
477
|
|
|
478
478
|
/**
|
|
@@ -542,7 +542,7 @@ export declare const QUOTA_PERIODS: QuotaPeriod[];
|
|
|
542
542
|
/** The slot map in force: every filled slot has a component (or `null` for a notice). */
|
|
543
543
|
declare type ResolvedSlots = Required<Pick<GentiqComponents, FilledSlots>> & Omit<GentiqComponents, FilledSlots>;
|
|
544
544
|
|
|
545
|
-
export declare function Select(
|
|
545
|
+
export declare function Select(props: React_2.ComponentProps<typeof SelectPrimitive.Root>): JSX.Element;
|
|
546
546
|
|
|
547
547
|
export declare function SelectContent({ className, children, position, ...props }: React_2.ComponentProps<typeof SelectPrimitive.Content>): JSX.Element;
|
|
548
548
|
|
|
@@ -552,9 +552,9 @@ export declare function SelectTrigger({ className, size, children, ...props }: R
|
|
|
552
552
|
size?: 'sm' | 'default';
|
|
553
553
|
}): JSX.Element;
|
|
554
554
|
|
|
555
|
-
export declare function SelectValue(
|
|
555
|
+
export declare function SelectValue(props: React_2.ComponentProps<typeof SelectPrimitive.Value>): JSX.Element;
|
|
556
556
|
|
|
557
|
-
export declare function Sheet(
|
|
557
|
+
export declare function Sheet(props: React_2.ComponentProps<typeof DialogPrimitive.Root>): JSX.Element;
|
|
558
558
|
|
|
559
559
|
export declare function SheetContent({ className, children, side, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
560
560
|
side?: 'top' | 'end' | 'bottom' | 'start';
|
package/dist/internal.es.js
CHANGED
|
@@ -1,61 +1,68 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { jsxs as
|
|
5
|
-
import { Monitor as
|
|
6
|
-
import { useGentiqTranslation as
|
|
2
|
+
import { T as g, i as b, B as h, j as m, c as r } from "./shared-BPpDLW8N.js";
|
|
3
|
+
import { a1 as H, h as B, C as R, b as j, a as O, D as P, a2 as Q, e as q, _ as A, $ as F, f as G, g as U, d as V, l as W, n as X, o as J, m as K, N as Y, G as Z, L as $, a3 as ee, H as ae, K as te, M as re, I as ie, J as oe, V as se, W as ne, Z as de, X as le, Y as ce, a4 as ue, x as ge, F as be, w as he, a0 as me, y as pe, u as fe } from "./shared-BPpDLW8N.js";
|
|
4
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
5
|
+
import { Monitor as l, Moon as p, Sun as f, CheckIcon as k } from "lucide-react";
|
|
6
|
+
import { useGentiqTranslation as x, useTheme as v } from "@gentiq/react";
|
|
7
7
|
import "react";
|
|
8
|
-
import * as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
case "dark":
|
|
28
|
-
return a("system");
|
|
29
|
-
case "system":
|
|
30
|
-
return a("light");
|
|
31
|
-
default:
|
|
32
|
-
return a("toggle");
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
return /* @__PURE__ */ i(g, { children: [
|
|
36
|
-
/* @__PURE__ */ e(m, { asChild: !0, children: /* @__PURE__ */ i(h, { variant: "ghost", size: "icon", onClick: d, className: t, children: [
|
|
37
|
-
c(),
|
|
38
|
-
/* @__PURE__ */ e("span", { className: "sr-only", children: a("toggle") })
|
|
39
|
-
] }) }),
|
|
40
|
-
/* @__PURE__ */ e(p, { children: u() })
|
|
8
|
+
import * as n from "@radix-ui/react-checkbox";
|
|
9
|
+
import * as d from "@radix-ui/react-switch";
|
|
10
|
+
const T = { system: "light", light: "dark", dark: "system" }, w = { light: f, dark: p, system: l }, I = ({ className: t }) => {
|
|
11
|
+
const { t: a } = x(["theme"]), { theme: i, setTheme: c } = v(), u = w[i] ?? l, o = T[i];
|
|
12
|
+
return /* @__PURE__ */ s(g, { children: [
|
|
13
|
+
/* @__PURE__ */ e(b, { asChild: !0, children: /* @__PURE__ */ s(
|
|
14
|
+
h,
|
|
15
|
+
{
|
|
16
|
+
variant: "ghost",
|
|
17
|
+
size: "icon",
|
|
18
|
+
onClick: () => c(o ?? "system"),
|
|
19
|
+
className: t,
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ e(u, { className: "h-[1.2rem] w-[1.2rem]" }),
|
|
22
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: a("toggle") })
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
) }),
|
|
26
|
+
/* @__PURE__ */ e(m, { children: a(o ?? "toggle") })
|
|
41
27
|
] });
|
|
42
28
|
};
|
|
43
|
-
function
|
|
29
|
+
function M({ className: t, ...a }) {
|
|
30
|
+
return /* @__PURE__ */ e(
|
|
31
|
+
n.Root,
|
|
32
|
+
{
|
|
33
|
+
"data-slot": "checkbox",
|
|
34
|
+
className: r(
|
|
35
|
+
"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
36
|
+
t
|
|
37
|
+
),
|
|
38
|
+
...a,
|
|
39
|
+
children: /* @__PURE__ */ e(
|
|
40
|
+
n.Indicator,
|
|
41
|
+
{
|
|
42
|
+
"data-slot": "checkbox-indicator",
|
|
43
|
+
className: "grid place-content-center text-current transition-none",
|
|
44
|
+
children: /* @__PURE__ */ e(k, { className: "size-3.5" })
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
function E({ className: t, ...a }) {
|
|
44
51
|
return /* @__PURE__ */ e(
|
|
45
|
-
|
|
52
|
+
d.Root,
|
|
46
53
|
{
|
|
47
54
|
"data-slot": "switch",
|
|
48
55
|
dir: "ltr",
|
|
49
|
-
className:
|
|
56
|
+
className: r(
|
|
50
57
|
"peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-5 w-9 shrink-0 items-center rounded-full border-2 border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
51
58
|
t
|
|
52
59
|
),
|
|
53
60
|
...a,
|
|
54
61
|
children: /* @__PURE__ */ e(
|
|
55
|
-
|
|
62
|
+
d.Thumb,
|
|
56
63
|
{
|
|
57
64
|
"data-slot": "switch-thumb",
|
|
58
|
-
className:
|
|
65
|
+
className: r(
|
|
59
66
|
"bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
60
67
|
)
|
|
61
68
|
}
|
|
@@ -63,12 +70,12 @@ function y({ className: t, ...a }) {
|
|
|
63
70
|
}
|
|
64
71
|
);
|
|
65
72
|
}
|
|
66
|
-
function
|
|
73
|
+
function L({ className: t, ...a }) {
|
|
67
74
|
return /* @__PURE__ */ e(
|
|
68
75
|
"textarea",
|
|
69
76
|
{
|
|
70
77
|
"data-slot": "textarea",
|
|
71
|
-
className:
|
|
78
|
+
className: r(
|
|
72
79
|
"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
73
80
|
t
|
|
74
81
|
),
|
|
@@ -77,48 +84,48 @@ function N({ className: t, ...a }) {
|
|
|
77
84
|
);
|
|
78
85
|
}
|
|
79
86
|
export {
|
|
80
|
-
|
|
81
|
-
|
|
87
|
+
H as BUILT_IN_METERS,
|
|
88
|
+
B as Badge,
|
|
82
89
|
h as Button,
|
|
83
|
-
|
|
84
|
-
|
|
90
|
+
M as Checkbox,
|
|
91
|
+
R as Collapsible,
|
|
85
92
|
j as CollapsibleContent,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
93
|
+
O as CollapsibleTrigger,
|
|
94
|
+
P as Dialog,
|
|
95
|
+
Q as DialogClose,
|
|
96
|
+
q as DialogContent,
|
|
97
|
+
A as DialogDescription,
|
|
98
|
+
F as DialogFooter,
|
|
99
|
+
G as DialogHeader,
|
|
100
|
+
U as DialogTitle,
|
|
101
|
+
V as DialogTrigger,
|
|
102
|
+
W as DropdownMenu,
|
|
103
|
+
X as DropdownMenuContent,
|
|
104
|
+
J as DropdownMenuItem,
|
|
105
|
+
K as DropdownMenuTrigger,
|
|
106
|
+
Y as Input,
|
|
107
|
+
Z as Label,
|
|
108
|
+
$ as Loader,
|
|
109
|
+
I as ModeToggle,
|
|
110
|
+
ee as QUOTA_PERIODS,
|
|
111
|
+
ae as Select,
|
|
112
|
+
te as SelectContent,
|
|
113
|
+
re as SelectItem,
|
|
114
|
+
ie as SelectTrigger,
|
|
115
|
+
oe as SelectValue,
|
|
116
|
+
se as Sheet,
|
|
117
|
+
ne as SheetContent,
|
|
118
|
+
de as SheetDescription,
|
|
119
|
+
le as SheetHeader,
|
|
120
|
+
ce as SheetTitle,
|
|
121
|
+
E as Switch,
|
|
122
|
+
L as Textarea,
|
|
123
|
+
r as cn,
|
|
124
|
+
ue as describeDuration,
|
|
125
|
+
ge as describeWindow,
|
|
126
|
+
be as formatQuotaAmount,
|
|
127
|
+
he as formatQuotaDate,
|
|
128
|
+
me as gentiqLogo,
|
|
129
|
+
pe as meterLabel,
|
|
130
|
+
fe as useSlots
|
|
124
131
|
};
|