@gentiq/ui 1.0.0-alpha.4 → 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-PAl3Jjcu.js → MessageEditor-CTATfUm3.js} +1 -1
- package/dist/{VoiceInput-DX0ZCnIA.js → VoiceInput-CYuGXRYZ.js} +16 -15
- package/dist/index.d.ts +52 -6
- package/dist/index.es.js +46 -2063
- package/dist/internal.d.ts +11 -12
- 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-MFlvTavE.js +0 -3516
package/dist/internal.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare function Badge({ className, variant, asChild, ...props }: React_2
|
|
|
31
31
|
}): JSX.Element;
|
|
32
32
|
|
|
33
33
|
declare const badgeVariants: (props?: ({
|
|
34
|
-
variant?: "default" | "destructive" | "
|
|
34
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
35
35
|
} & ClassProp) | undefined) => string;
|
|
36
36
|
|
|
37
37
|
/** Meters gentiq counts itself. Anything else is app-defined and shown by its key. */
|
|
@@ -42,7 +42,7 @@ export declare function Button({ className, variant, size, asChild, ...props }:
|
|
|
42
42
|
}): JSX.Element;
|
|
43
43
|
|
|
44
44
|
declare const buttonVariants: (props?: ({
|
|
45
|
-
variant?: "default" | "destructive" | "link" | "
|
|
45
|
+
variant?: "default" | "destructive" | "link" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
46
46
|
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
47
47
|
} & ClassProp) | undefined) => string;
|
|
48
48
|
|
|
@@ -195,9 +195,9 @@ export declare function describeWindow(t: TFunction, window: {
|
|
|
195
195
|
anchor?: QuotaAnchor;
|
|
196
196
|
}): string;
|
|
197
197
|
|
|
198
|
-
export declare function Dialog(
|
|
198
|
+
export declare function Dialog(props: React_2.ComponentProps<typeof DialogPrimitive.Root>): JSX.Element;
|
|
199
199
|
|
|
200
|
-
export declare function DialogClose(
|
|
200
|
+
export declare function DialogClose(props: React_2.ComponentProps<typeof DialogPrimitive.Close>): JSX.Element;
|
|
201
201
|
|
|
202
202
|
export declare function DialogContent({ className, children, showCloseButton, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
203
203
|
showCloseButton?: boolean;
|
|
@@ -211,9 +211,9 @@ export declare function DialogHeader({ className, ...props }: React_2.ComponentP
|
|
|
211
211
|
|
|
212
212
|
export declare function DialogTitle({ className, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Title>): JSX.Element;
|
|
213
213
|
|
|
214
|
-
export declare function DialogTrigger(
|
|
214
|
+
export declare function DialogTrigger(props: React_2.ComponentProps<typeof DialogPrimitive.Trigger>): JSX.Element;
|
|
215
215
|
|
|
216
|
-
export declare function DropdownMenu(
|
|
216
|
+
export declare function DropdownMenu(props: React_2.ComponentProps<typeof DropdownMenuPrimitive.Root>): JSX.Element;
|
|
217
217
|
|
|
218
218
|
export declare function DropdownMenuContent({ className, sideOffset, ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.Content>): JSX.Element;
|
|
219
219
|
|
|
@@ -222,7 +222,7 @@ export declare function DropdownMenuItem({ className, inset, variant, ...props }
|
|
|
222
222
|
variant?: 'default' | 'destructive';
|
|
223
223
|
}): JSX.Element;
|
|
224
224
|
|
|
225
|
-
export declare function DropdownMenuTrigger(
|
|
225
|
+
export declare function DropdownMenuTrigger(props: React_2.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): JSX.Element;
|
|
226
226
|
|
|
227
227
|
/** The slots that always have a component: Gentiq's own unless the host replaced it. */
|
|
228
228
|
declare type FilledSlots = 'MessageList' | 'MessageActions' | 'PromptInput' | 'WelcomeScreen' | 'parts' | 'ChoiceQuestionPart' | 'ChoiceQuestionDock' | 'FollowUpSuggestions' | 'ChatError' | 'UsageMeter' | 'MaintenanceBanner' | 'MaintenanceScreen';
|
|
@@ -455,8 +455,7 @@ declare interface HeaderActionConfig {
|
|
|
455
455
|
*/
|
|
456
456
|
declare interface HeaderActionsProps {
|
|
457
457
|
/**
|
|
458
|
-
* Whether the viewport is phone-sized.
|
|
459
|
-
* phone there is room for about one icon-sized button before it is covered.
|
|
458
|
+
* Whether the viewport is phone-sized.
|
|
460
459
|
*/
|
|
461
460
|
isMobile: boolean;
|
|
462
461
|
}
|
|
@@ -543,7 +542,7 @@ export declare const QUOTA_PERIODS: QuotaPeriod[];
|
|
|
543
542
|
/** The slot map in force: every filled slot has a component (or `null` for a notice). */
|
|
544
543
|
declare type ResolvedSlots = Required<Pick<GentiqComponents, FilledSlots>> & Omit<GentiqComponents, FilledSlots>;
|
|
545
544
|
|
|
546
|
-
export declare function Select(
|
|
545
|
+
export declare function Select(props: React_2.ComponentProps<typeof SelectPrimitive.Root>): JSX.Element;
|
|
547
546
|
|
|
548
547
|
export declare function SelectContent({ className, children, position, ...props }: React_2.ComponentProps<typeof SelectPrimitive.Content>): JSX.Element;
|
|
549
548
|
|
|
@@ -553,9 +552,9 @@ export declare function SelectTrigger({ className, size, children, ...props }: R
|
|
|
553
552
|
size?: 'sm' | 'default';
|
|
554
553
|
}): JSX.Element;
|
|
555
554
|
|
|
556
|
-
export declare function SelectValue(
|
|
555
|
+
export declare function SelectValue(props: React_2.ComponentProps<typeof SelectPrimitive.Value>): JSX.Element;
|
|
557
556
|
|
|
558
|
-
export declare function Sheet(
|
|
557
|
+
export declare function Sheet(props: React_2.ComponentProps<typeof DialogPrimitive.Root>): JSX.Element;
|
|
559
558
|
|
|
560
559
|
export declare function SheetContent({ className, children, side, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
561
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
|
};
|