@humain/ui 2.4.1 → 2.4.3
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/index150.js +1 -1
- package/dist/index150.js.map +1 -1
- package/dist/index194.js +6 -8
- package/dist/index194.js.map +1 -1
- package/dist/index24.js +1 -1
- package/dist/index24.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/wc/AIClarificationCard.js +1 -1
- package/dist/wc/AIContainer.js +1 -1
- package/dist/wc/AIForm.js +17 -17
- package/dist/wc/AIInput.js +32 -32
- package/dist/wc/AIInput.js.map +1 -1
- package/dist/wc/AIMermaidDiagram.js +1 -1
- package/dist/wc/AIMessage.js +1 -1
- package/dist/wc/AIScrollButton.js +4 -4
- package/dist/wc/AIToolCall.js +5 -5
- package/dist/wc/AppSidebar.constants.js +1 -1
- package/dist/wc/AvatarFallback.js +5 -5
- package/dist/wc/CheckboxIndicator.js +7 -7
- package/dist/wc/CollapsiblePanel.js +1 -1
- package/dist/wc/DialogTrigger.js +9 -9
- package/dist/wc/DropdownMenu.js +16 -16
- package/dist/wc/MenuSubmenuTrigger.js +31 -31
- package/dist/wc/PopoverDescription.js +30 -30
- package/dist/wc/PrehydrationScript.js +1 -1
- package/dist/wc/Select.js +18 -18
- package/dist/wc/SelectSeparator.js +72 -72
- package/dist/wc/SelectSeparator.js.map +1 -1
- package/dist/wc/Tabs.js +18 -18
- package/dist/wc/TooltipProvider.js +9 -9
- package/dist/wc/chart.js +1 -1
- package/dist/wc/chunk-75Z2AOVW.js +39 -39
- package/dist/wc/chunk-OSK3NFVY.js +32 -32
- package/dist/wc/command.js +4 -4
- package/dist/wc/form-field.js +1 -1
- package/dist/wc/form-fieldset.js +5 -5
- package/dist/wc/hf-accordion-card.js +4 -4
- package/dist/wc/hf-accordion.js +6 -6
- package/dist/wc/hf-ai-feedback-bar.js +5 -5
- package/dist/wc/hf-ai-reasoning-block.js +6 -6
- package/dist/wc/hf-ai-system-message.js +1 -1
- package/dist/wc/hf-ai-tool-run.js +1 -1
- package/dist/wc/hf-area-chart.js +15 -15
- package/dist/wc/hf-autocomplete.js +36 -36
- package/dist/wc/hf-bar-chart.js +4 -4
- package/dist/wc/hf-calendar.js +4 -4
- package/dist/wc/hf-carousel.js +1 -1
- package/dist/wc/hf-context-menu.js +8 -8
- package/dist/wc/hf-donut-chart.js +10 -10
- package/dist/wc/hf-empty-state.js +87 -88
- package/dist/wc/hf-empty-state.js.map +1 -1
- package/dist/wc/hf-history.js +4 -4
- package/dist/wc/hf-horizontal-bar-chart.js +7 -7
- package/dist/wc/hf-hover-card.js +6 -6
- package/dist/wc/hf-line-chart.js +4 -4
- package/dist/wc/hf-metric-card.js +5 -5
- package/dist/wc/hf-metric-item.js +8 -8
- package/dist/wc/hf-metric-item.js.map +1 -1
- package/dist/wc/hf-nav-account-menu.js +4 -4
- package/dist/wc/hf-notification-panel.js +2 -2
- package/dist/wc/hf-pie-chart.js +17 -17
- package/dist/wc/hf-radar-chart.js +16 -16
- package/dist/wc/hf-section-header.js +6 -6
- package/dist/wc/hf-sheet.js +1 -1
- package/dist/wc/hf-sparkline-chart.js +5 -5
- package/dist/wc/hf-steps.js +6 -6
- package/dist/wc/journeyDiagram-3NMN7TZE.js +10 -10
- package/dist/wc/pieDiagram-E7YTZNPT.js +16 -16
- package/dist/wc/popupStateMapping.js +53 -53
- package/dist/wc/popupStateMapping.js.map +1 -1
- package/dist/wc/selection-group.js +1 -1
- package/dist/wc/selection-group.js.map +1 -1
- package/dist/wc/{useOpenChangeComplete.js → stateAttributesMapping.js} +21 -21
- package/dist/wc/stateAttributesMapping.js.map +1 -0
- package/dist/wc/stateDiagram-D77RDMKH.js +3 -3
- package/dist/wc/timeline-definition-24CTP7MA.js +19 -19
- package/dist/wc/useCollapsiblePanel.js +3 -3
- package/dist/wc/usePopupHandleStore.js +4 -4
- package/dist/wc/useScrollLock.js +1 -1
- package/dist/wc/vendor/recharts.js +525 -524
- package/dist/wc/vendor/recharts.js.map +1 -1
- package/dist/wc/xychartDiagram-S5SC5T6Z.js +6 -6
- package/dist/wc-react/AIClarificationCard.js +1 -1
- package/dist/wc-react/AIContainer.js +1 -1
- package/dist/wc-react/AIForm.js +17 -17
- package/dist/wc-react/AIInput.js +2 -2
- package/dist/wc-react/AIInput.js.map +1 -1
- package/dist/wc-react/AIMermaidDiagram.js +1 -1
- package/dist/wc-react/AIMessage.js +1 -1
- package/dist/wc-react/AIScrollButton.js +4 -4
- package/dist/wc-react/AIToolCall.js +5 -5
- package/dist/wc-react/AppSidebar.constants.js +1 -1
- package/dist/wc-react/AvatarFallback.js +5 -5
- package/dist/wc-react/CheckboxIndicator.js +7 -7
- package/dist/wc-react/CollapsiblePanel.js +1 -1
- package/dist/wc-react/DialogTrigger.js +9 -9
- package/dist/wc-react/DropdownMenu.js +16 -16
- package/dist/wc-react/FloatingPortalLite.js +3 -3
- package/dist/wc-react/MenuSubmenuTrigger.js +31 -31
- package/dist/wc-react/PopoverDescription.js +31 -31
- package/dist/wc-react/PrehydrationScript.js +1 -1
- package/dist/wc-react/Select.js +18 -18
- package/dist/wc-react/SelectSeparator.js +71 -70
- package/dist/wc-react/SelectSeparator.js.map +1 -1
- package/dist/wc-react/Tabs.js +18 -18
- package/dist/wc-react/TooltipProvider.js +9 -9
- package/dist/wc-react/chart.js +1 -1
- package/dist/wc-react/chunk-75Z2AOVW.js +39 -39
- package/dist/wc-react/chunk-OSK3NFVY.js +32 -32
- package/dist/wc-react/command.js +4 -4
- package/dist/wc-react/form-field.js +1 -1
- package/dist/wc-react/form-fieldset.js +77 -77
- package/dist/wc-react/hf-accordion-card.js +4 -4
- package/dist/wc-react/hf-accordion.js +6 -6
- package/dist/wc-react/hf-ai-feedback-bar.js +5 -5
- package/dist/wc-react/hf-ai-reasoning-block.js +6 -6
- package/dist/wc-react/hf-ai-system-message.js +1 -1
- package/dist/wc-react/hf-ai-tool-run.js +1 -1
- package/dist/wc-react/hf-autocomplete.js +37 -37
- package/dist/wc-react/hf-calendar.js +4 -4
- package/dist/wc-react/hf-carousel.js +1 -1
- package/dist/wc-react/hf-context-menu.js +8 -8
- package/dist/wc-react/hf-data-table.js +1 -1
- package/dist/wc-react/hf-empty-state.js +87 -88
- package/dist/wc-react/hf-empty-state.js.map +1 -1
- package/dist/wc-react/hf-history.js +4 -4
- package/dist/wc-react/hf-hover-card.js +6 -6
- package/dist/wc-react/hf-metric-item.js +6 -6
- package/dist/wc-react/hf-metric-item.js.map +1 -1
- package/dist/wc-react/hf-nav-account-menu.js +4 -4
- package/dist/wc-react/hf-notification-panel.js +2 -2
- package/dist/wc-react/hf-section-header.js +6 -6
- package/dist/wc-react/hf-sheet.js +1 -1
- package/dist/wc-react/hf-steps.js +5 -5
- package/dist/wc-react/journeyDiagram-3NMN7TZE.js +10 -10
- package/dist/wc-react/pieDiagram-E7YTZNPT.js +16 -16
- package/dist/wc-react/popupStateMapping.js +54 -54
- package/dist/wc-react/popupStateMapping.js.map +1 -1
- package/dist/wc-react/selection-group.js +1 -1
- package/dist/wc-react/selection-group.js.map +1 -1
- package/dist/wc-react/{useOpenChangeComplete.js → stateAttributesMapping.js} +19 -19
- package/dist/wc-react/stateAttributesMapping.js.map +1 -0
- package/dist/wc-react/stateDiagram-D77RDMKH.js +3 -3
- package/dist/wc-react/timeline-definition-24CTP7MA.js +19 -19
- package/dist/wc-react/useCollapsiblePanel.js +3 -3
- package/dist/wc-react/usePopupHandleStore.js +3 -3
- package/dist/wc-react/useScrollLock.js +1 -1
- package/dist/wc-react/vendor/recharts.js +525 -524
- package/dist/wc-react/vendor/recharts.js.map +1 -1
- package/dist/wc-react/xychartDiagram-S5SC5T6Z.js +6 -6
- package/package.json +1 -1
- package/skills/humain-ui/SKILL.md +1 -1
- package/skills/humain-ui-wc/SKILL.md +1 -1
- package/skills/humain-ui-wc.skill +0 -0
- package/skills/humain-ui.skill +0 -0
- package/dist/wc/useOpenChangeComplete.js.map +0 -1
- package/dist/wc-react/useOpenChangeComplete.js.map +0 -1
|
@@ -15,8 +15,8 @@ import { t as Y } from "./loader-circle.js";
|
|
|
15
15
|
import { t as ze } from "./plus.js";
|
|
16
16
|
import { t as Ae } from "./x.js";
|
|
17
17
|
import { n as y } from "./utils.js";
|
|
18
|
-
import { t as Le } from "./use-controllable-state.js";
|
|
19
18
|
import { t as N } from "./button.js";
|
|
19
|
+
import { t as Le } from "./use-controllable-state.js";
|
|
20
20
|
import { t as Ie } from "./Progress.js";
|
|
21
21
|
import { t as _e } from "./Input2.js";
|
|
22
22
|
import { t as Fe } from "./Textarea2.js";
|
package/dist/wc/AIContainer.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as $ } from "./rolldown-runtime.js";
|
|
2
2
|
import { i as K, t as P } from "./vendor/react.js";
|
|
3
3
|
import { t as ee } from "./minimize-2.js";
|
|
4
|
-
import { t as te } from "./create-safe-context.js";
|
|
5
4
|
import { n as m } from "./utils.js";
|
|
5
|
+
import { t as te } from "./create-safe-context.js";
|
|
6
6
|
import { t as z } from "./AIInput.js";
|
|
7
7
|
import { t as E } from "./AIMessage.js";
|
|
8
8
|
import { n as H, r as se, t as T } from "./AIScrollButton.js";
|
package/dist/wc/AIForm.js
CHANGED
|
@@ -5,28 +5,28 @@ import { t as j } from "./chevron-down.js";
|
|
|
5
5
|
import { t as V } from "./chevron-up.js";
|
|
6
6
|
import { i as v, n as d, t as $ } from "./utils.js";
|
|
7
7
|
import { t as f } from "./label.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { a as B, c as L, d as G, f as T, g as A, h as O, i as P, l as U, m as K, n as M, o as E, p as J, r as H, s as Q, t as W, u as X } from "./SelectSeparator.js";
|
|
9
|
+
import { t as Y } from "./button.js";
|
|
10
10
|
import { t as b } from "./input3.js";
|
|
11
11
|
import { t as Z } from "./textarea.js";
|
|
12
12
|
import { r as ee } from "./interaction-context.js";
|
|
13
13
|
import { n as ae } from "./schema-validation.js";
|
|
14
14
|
import { t as re } from "./checkbox2.js";
|
|
15
|
-
var n = /* @__PURE__ */ R(k(), 1), a = D(), te =
|
|
15
|
+
var n = /* @__PURE__ */ R(k(), 1), a = D(), te = A, se = n.forwardRef(({ className: e, ...r }, s) => /* @__PURE__ */ (0, a.jsx)(H, {
|
|
16
16
|
ref: s,
|
|
17
17
|
"data-slot": "select-group",
|
|
18
18
|
className: d("scroll-my-1 p-1", e),
|
|
19
19
|
...r
|
|
20
20
|
}));
|
|
21
21
|
se.displayName = "Select.Group";
|
|
22
|
-
var S = n.forwardRef(({ className: e, ...r }, s) => /* @__PURE__ */ (0, a.jsx)(
|
|
22
|
+
var S = n.forwardRef(({ className: e, ...r }, s) => /* @__PURE__ */ (0, a.jsx)(K, {
|
|
23
23
|
ref: s,
|
|
24
24
|
"data-slot": "select-value",
|
|
25
25
|
className: d("flex flex-1 text-left", e),
|
|
26
26
|
...r
|
|
27
27
|
}));
|
|
28
28
|
S.displayName = "Select.Value";
|
|
29
|
-
var y = n.forwardRef(({ className: e, size: r = "md", shape: s = "rounded", state: t = "default", children: o, ...i }, l) => /* @__PURE__ */ (0, a.jsxs)(
|
|
29
|
+
var y = n.forwardRef(({ className: e, size: r = "md", shape: s = "rounded", state: t = "default", children: o, ...i }, l) => /* @__PURE__ */ (0, a.jsxs)(O, {
|
|
30
30
|
ref: l,
|
|
31
31
|
"data-slot": "select-trigger",
|
|
32
32
|
"data-size": r,
|
|
@@ -35,58 +35,58 @@ var y = n.forwardRef(({ className: e, size: r = "md", shape: s = "rounded", stat
|
|
|
35
35
|
"aria-invalid": t === "error" || void 0,
|
|
36
36
|
className: d("flex w-full items-center justify-between gap-1.5 outline-none", "bg-background border shadow-xs transition-[color,border-color,box-shadow] duration-200 ease-out motion-reduce:transition-none", "not-disabled:hover:border-ring/50", "disabled:cursor-not-allowed disabled:opacity-50", "*:data-[slot=select-value]:flex *:data-[slot=select-value]:flex-1 *:data-[slot=select-value]:items-center", "data-[placeholder]:text-muted-foreground", r === "xs" && "h-7 px-3 py-1 text-xs", r === "sm" && "h-8 px-3 py-1.5 text-xs", r === "md" && "h-9 px-3 py-2 text-xs", r === "lg" && "h-10 px-3 py-2.5 text-sm", s === "rounded" && "rounded-xl", s === "round" && "rounded-full", t === "default" && "border-input", t === "success" && "border-success", t === "error" && "border-destructive", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", t === "error" && "focus-visible:ring-destructive/20", e),
|
|
37
37
|
...i,
|
|
38
|
-
children: [o, /* @__PURE__ */ (0, a.jsx)(
|
|
38
|
+
children: [o, /* @__PURE__ */ (0, a.jsx)(J, { render: /* @__PURE__ */ (0, a.jsx)(j, { className: "size-4 shrink-0 text-muted-foreground" }) })]
|
|
39
39
|
}));
|
|
40
40
|
y.displayName = "Select.Trigger";
|
|
41
|
-
var N = n.forwardRef(({ className: e, children: r, side: s = "bottom", sideOffset: t = 4, align: o = "center", alignOffset: i = 0, alignItemWithTrigger: l = !0, ...c }, u) => /* @__PURE__ */ (0, a.jsx)(
|
|
41
|
+
var N = n.forwardRef(({ className: e, children: r, side: s = "bottom", sideOffset: t = 4, align: o = "center", alignOffset: i = 0, alignItemWithTrigger: l = !0, ...c }, u) => /* @__PURE__ */ (0, a.jsx)(T, { children: /* @__PURE__ */ (0, a.jsx)(G, {
|
|
42
42
|
side: s,
|
|
43
43
|
sideOffset: t,
|
|
44
44
|
align: o,
|
|
45
45
|
alignOffset: i,
|
|
46
46
|
alignItemWithTrigger: l,
|
|
47
47
|
className: "isolate z-50",
|
|
48
|
-
children: /* @__PURE__ */ (0, a.jsxs)(
|
|
48
|
+
children: /* @__PURE__ */ (0, a.jsxs)(X, {
|
|
49
49
|
ref: u,
|
|
50
50
|
"data-slot": "select-popup",
|
|
51
51
|
className: d("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 motion-reduce:animate-none ring-foreground/10 min-w-36 rounded-md shadow-md ring-1 duration-100 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto", e),
|
|
52
52
|
...c,
|
|
53
53
|
children: [
|
|
54
54
|
/* @__PURE__ */ (0, a.jsx)(q, {}),
|
|
55
|
-
/* @__PURE__ */ (0, a.jsx)(
|
|
55
|
+
/* @__PURE__ */ (0, a.jsx)(U, { children: r }),
|
|
56
56
|
/* @__PURE__ */ (0, a.jsx)(I, {})
|
|
57
57
|
]
|
|
58
58
|
})
|
|
59
59
|
}) }));
|
|
60
60
|
N.displayName = "Select.Popup";
|
|
61
|
-
var oe = n.forwardRef(({ className: e, ...r }, s) => /* @__PURE__ */ (0, a.jsx)(
|
|
61
|
+
var oe = n.forwardRef(({ className: e, ...r }, s) => /* @__PURE__ */ (0, a.jsx)(M, {
|
|
62
62
|
ref: s,
|
|
63
63
|
"data-slot": "select-group-label",
|
|
64
64
|
className: d("text-muted-foreground px-2 py-1.5 text-xs", e),
|
|
65
65
|
...r
|
|
66
66
|
}));
|
|
67
67
|
oe.displayName = "Select.GroupLabel";
|
|
68
|
-
var w = n.forwardRef(({ className: e, children: r, ...s }, t) => /* @__PURE__ */ (0, a.jsxs)(
|
|
68
|
+
var w = n.forwardRef(({ className: e, children: r, ...s }, t) => /* @__PURE__ */ (0, a.jsxs)(L, {
|
|
69
69
|
ref: t,
|
|
70
70
|
"data-slot": "select-item",
|
|
71
71
|
className: d("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground transition-colors duration-75 ease-out motion-reduce:transition-none gap-2 rounded-sm py-1.5 pe-8 ps-2 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", e),
|
|
72
72
|
...s,
|
|
73
|
-
children: [/* @__PURE__ */ (0, a.jsx)(
|
|
73
|
+
children: [/* @__PURE__ */ (0, a.jsx)(E, {
|
|
74
74
|
className: "flex flex-1 gap-2 shrink-0 whitespace-nowrap",
|
|
75
75
|
children: r
|
|
76
|
-
}), /* @__PURE__ */ (0, a.jsx)(
|
|
76
|
+
}), /* @__PURE__ */ (0, a.jsx)(Q, {
|
|
77
77
|
render: /* @__PURE__ */ (0, a.jsx)("span", { className: "pointer-events-none absolute end-2 flex size-4 items-center justify-center" }),
|
|
78
78
|
children: /* @__PURE__ */ (0, a.jsx)(_, { className: "pointer-events-none animate-in zoom-in-75 fade-in duration-150 motion-reduce:animate-none" })
|
|
79
79
|
})]
|
|
80
80
|
}));
|
|
81
81
|
w.displayName = "Select.Item";
|
|
82
|
-
var le = n.forwardRef(({ className: e, ...r }, s) => /* @__PURE__ */ (0, a.jsx)(
|
|
82
|
+
var le = n.forwardRef(({ className: e, ...r }, s) => /* @__PURE__ */ (0, a.jsx)(W, {
|
|
83
83
|
ref: s,
|
|
84
84
|
"data-slot": "select-separator",
|
|
85
85
|
className: d("bg-border -mx-1 my-1 h-px pointer-events-none", e),
|
|
86
86
|
...r
|
|
87
87
|
}));
|
|
88
88
|
le.displayName = "Select.Separator";
|
|
89
|
-
var q = n.forwardRef(({ className: e, ...r }, s) => /* @__PURE__ */ (0, a.jsx)(
|
|
89
|
+
var q = n.forwardRef(({ className: e, ...r }, s) => /* @__PURE__ */ (0, a.jsx)(P, {
|
|
90
90
|
ref: s,
|
|
91
91
|
"data-slot": "select-scroll-up-button",
|
|
92
92
|
className: d("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 top-0 w-full", e),
|
|
@@ -94,7 +94,7 @@ var q = n.forwardRef(({ className: e, ...r }, s) => /* @__PURE__ */ (0, a.jsx)(U
|
|
|
94
94
|
children: /* @__PURE__ */ (0, a.jsx)(V, {})
|
|
95
95
|
}));
|
|
96
96
|
q.displayName = "Select.ScrollUpButton";
|
|
97
|
-
var I = n.forwardRef(({ className: e, ...r }, s) => /* @__PURE__ */ (0, a.jsx)(
|
|
97
|
+
var I = n.forwardRef(({ className: e, ...r }, s) => /* @__PURE__ */ (0, a.jsx)(B, {
|
|
98
98
|
ref: s,
|
|
99
99
|
"data-slot": "select-scroll-down-button",
|
|
100
100
|
className: d("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 bottom-0 w-full", e),
|
|
@@ -355,7 +355,7 @@ function me({ schema: e, className: r }) {
|
|
|
355
355
|
}),
|
|
356
356
|
/* @__PURE__ */ (0, a.jsx)("div", {
|
|
357
357
|
className: "flex justify-end",
|
|
358
|
-
children: /* @__PURE__ */ (0, a.jsx)(
|
|
358
|
+
children: /* @__PURE__ */ (0, a.jsx)(Y, {
|
|
359
359
|
type: "submit",
|
|
360
360
|
appearance: "gradient",
|
|
361
361
|
variant: "primary",
|
package/dist/wc/AIInput.js
CHANGED
|
@@ -5,8 +5,8 @@ import { t as ke } from "./arrow-down.js";
|
|
|
5
5
|
import { t as ne } from "./arrow-up.js";
|
|
6
6
|
import { a as ce, i as De, n as Y, r as Ee } from "./FileUpload.js";
|
|
7
7
|
import { t as re } from "./x.js";
|
|
8
|
-
import { t as ze } from "./create-safe-context.js";
|
|
9
8
|
import { n as u } from "./utils.js";
|
|
9
|
+
import { t as ze } from "./create-safe-context.js";
|
|
10
10
|
import { t as oe } from "./button.js";
|
|
11
11
|
var l = /* @__PURE__ */ Ae(Ce(), 1), Pe = 500, Se = 10, Be = 1e6, Fe = /^(import |from |export |function |class |const |let |var |def |package )/m, _e = /^\d{4}-\d{2}-\d{2}[\sT]\d{2}:\d{2}:\d{2}/m, Oe = /^\s+at\s+/m, Ke = Object.freeze({
|
|
12
12
|
json: {
|
|
@@ -128,10 +128,10 @@ function me(s) {
|
|
|
128
128
|
if (!i || N) return;
|
|
129
129
|
const f = r.clipboardData.getData("text/plain");
|
|
130
130
|
if (!f) return;
|
|
131
|
-
const
|
|
132
|
-
charThreshold:
|
|
133
|
-
lineThreshold:
|
|
134
|
-
detectStructured:
|
|
131
|
+
const v = i === !0 ? {} : i, I = {
|
|
132
|
+
charThreshold: v.threshold,
|
|
133
|
+
lineThreshold: v.lineThreshold,
|
|
134
|
+
detectStructured: v.detectStructured
|
|
135
135
|
}, { shouldConvert: R, kind: d } = He(f, I);
|
|
136
136
|
if (!R || !c) return;
|
|
137
137
|
const { ext: B, mime: T } = Le(d), k = t.current + 1, j = `Pasted-${k}.${B}`;
|
|
@@ -146,11 +146,11 @@ function me(s) {
|
|
|
146
146
|
} catch {
|
|
147
147
|
return;
|
|
148
148
|
}
|
|
149
|
-
if (r.preventDefault(), t.current = k, c(A),
|
|
150
|
-
const h =
|
|
149
|
+
if (r.preventDefault(), t.current = k, c(A), v.prefillTemplate) {
|
|
150
|
+
const h = v.prefillTemplate(j, d);
|
|
151
151
|
h?.trim() && S(m ? `${m} ${h}` : h);
|
|
152
152
|
}
|
|
153
|
-
|
|
153
|
+
v.onConverted?.(j, d);
|
|
154
154
|
}, []);
|
|
155
155
|
return s.variant === "inline" || !s.pasteAsFile ? { onPaste: void 0 } : { onPaste: a };
|
|
156
156
|
}
|
|
@@ -219,10 +219,10 @@ function ue({ customButton: s, disabled: t }) {
|
|
|
219
219
|
const n = { disabled: t };
|
|
220
220
|
return s ? s(n) : /* @__PURE__ */ (0, e.jsx)(ee, {
|
|
221
221
|
icon: ne,
|
|
222
|
-
|
|
222
|
+
disabled: !0
|
|
223
223
|
});
|
|
224
224
|
}
|
|
225
|
-
function he({ children: s, variant: t = "default", value: n, defaultValue: a = "", onChange: r, onSubmit: i, uploadingFiles: c = [], onRemoveFile: x, onCancelUpload: N, onRetryUpload: m, onRemoveAllFiles: S, disabled: f = !1, className:
|
|
225
|
+
function he({ children: s, variant: t = "default", value: n, defaultValue: a = "", onChange: r, onSubmit: i, uploadingFiles: c = [], onRemoveFile: x, onCancelUpload: N, onRetryUpload: m, onRemoveAllFiles: S, disabled: f = !1, className: v, onFilesSelected: I, accept: R, multiple: d = !0, dropText: B = "Drop files to attach", pasteAsFile: T }) {
|
|
226
226
|
const [k, j] = l.useState(a), [A, h] = l.useState(!1), X = l.useRef(null), W = l.useRef(null), L = l.useRef(null), { isDragging: F, dropZoneProps: D, openFilePicker: H } = ce({
|
|
227
227
|
onFilesSelected: I,
|
|
228
228
|
accept: R,
|
|
@@ -239,7 +239,7 @@ function he({ children: s, variant: t = "default", value: n, defaultValue: a = "
|
|
|
239
239
|
variant: t,
|
|
240
240
|
value: y,
|
|
241
241
|
setValue: g
|
|
242
|
-
}),
|
|
242
|
+
}), b = l.useCallback(() => {
|
|
243
243
|
p && i && (i(y), E || j(""));
|
|
244
244
|
}, [
|
|
245
245
|
p,
|
|
@@ -247,8 +247,8 @@ function he({ children: s, variant: t = "default", value: n, defaultValue: a = "
|
|
|
247
247
|
y,
|
|
248
248
|
E
|
|
249
249
|
]), _ = l.useCallback((C) => {
|
|
250
|
-
C.key === "Enter" && !C.shiftKey && (C.preventDefault(),
|
|
251
|
-
}, [
|
|
250
|
+
C.key === "Enter" && !C.shiftKey && (C.preventDefault(), b());
|
|
251
|
+
}, [b]), Z = l.useCallback(() => {
|
|
252
252
|
g(""), t === "inline" ? W.current?.focus() : X.current?.focus();
|
|
253
253
|
}, [g, t]), O = () => f ? "disabled" : F ? "dragover" : z ? "attachments" : p ? "withText" : A ? "focused" : "default", P = l.useMemo(() => ({
|
|
254
254
|
value: y,
|
|
@@ -260,7 +260,7 @@ function he({ children: s, variant: t = "default", value: n, defaultValue: a = "
|
|
|
260
260
|
hasAttachments: z,
|
|
261
261
|
setValue: g,
|
|
262
262
|
setIsFocused: h,
|
|
263
|
-
handleSubmit:
|
|
263
|
+
handleSubmit: b,
|
|
264
264
|
handleKeyDown: _,
|
|
265
265
|
handleClear: Z,
|
|
266
266
|
onPaste: w,
|
|
@@ -282,7 +282,7 @@ function he({ children: s, variant: t = "default", value: n, defaultValue: a = "
|
|
|
282
282
|
c,
|
|
283
283
|
z,
|
|
284
284
|
g,
|
|
285
|
-
|
|
285
|
+
b,
|
|
286
286
|
_,
|
|
287
287
|
Z,
|
|
288
288
|
w,
|
|
@@ -305,7 +305,7 @@ function he({ children: s, variant: t = "default", value: n, defaultValue: a = "
|
|
|
305
305
|
className: Q({
|
|
306
306
|
state: V,
|
|
307
307
|
variant: t,
|
|
308
|
-
className:
|
|
308
|
+
className: v
|
|
309
309
|
}),
|
|
310
310
|
children: /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
311
311
|
"data-slot": "ai-input-inner",
|
|
@@ -375,7 +375,7 @@ function ie({ children: s, className: t }) {
|
|
|
375
375
|
});
|
|
376
376
|
}
|
|
377
377
|
ie.displayName = "AIInput.LeadingIcon";
|
|
378
|
-
function
|
|
378
|
+
function be({ icon: s, className: t, ...n }) {
|
|
379
379
|
const a = U(), r = s ?? ne;
|
|
380
380
|
return /* @__PURE__ */ (0, e.jsx)(oe, {
|
|
381
381
|
type: "button",
|
|
@@ -389,8 +389,8 @@ function ve({ icon: s, className: t, ...n }) {
|
|
|
389
389
|
children: /* @__PURE__ */ (0, e.jsx)(r, { className: "size-4" })
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
|
-
|
|
393
|
-
function
|
|
392
|
+
be.displayName = "AIInput.SendButton";
|
|
393
|
+
function ve({ icon: s, tooltip: t, className: n, onClick: a, ...r }) {
|
|
394
394
|
const i = U(), c = l.useCallback((x) => {
|
|
395
395
|
a ? a(x) : i.onFilesSelected && i.openFilePicker();
|
|
396
396
|
}, [
|
|
@@ -410,7 +410,7 @@ function be({ icon: s, tooltip: t, className: n, onClick: a, ...r }) {
|
|
|
410
410
|
children: /* @__PURE__ */ (0, e.jsx)(s, { className: "size-4" })
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
|
-
|
|
413
|
+
ve.displayName = "AIInput.AttachButton";
|
|
414
414
|
function je({ children: s, position: t = "leading", className: n }) {
|
|
415
415
|
return /* @__PURE__ */ (0, e.jsx)("div", {
|
|
416
416
|
"data-slot": "ai-input-actions",
|
|
@@ -502,21 +502,21 @@ function we({ className: s }) {
|
|
|
502
502
|
});
|
|
503
503
|
}
|
|
504
504
|
we.displayName = "AIInput.FilePreview";
|
|
505
|
-
function Ne({ variant: s = "default", placeholder: t = "How can HUMAIN ONE help you today?", value: n, defaultValue: a = "", onChange: r, onSubmit: i, uploadingFiles: c = [], onRemoveFile: x, onCancelUpload: N, onRetryUpload: m, onRemoveAllFiles: S, onFilesSelected: f, accept:
|
|
505
|
+
function Ne({ variant: s = "default", placeholder: t = "How can HUMAIN ONE help you today?", value: n, defaultValue: a = "", onChange: r, onSubmit: i, uploadingFiles: c = [], onRemoveFile: x, onCancelUpload: N, onRetryUpload: m, onRemoveAllFiles: S, onFilesSelected: f, accept: v, multiple: I = !0, dropText: R = "Drop files to attach", disabled: d = !1, className: B, leadingActions: T, trailingActions: k, submitButton: j, defaultButton: A, leadingIcon: h, pasteAsFile: X }) {
|
|
506
506
|
const [W, L] = l.useState(a), [F, D] = l.useState(!1), H = l.useRef(null), E = l.useRef(null), y = l.useRef(null), { isDragging: p, dropZoneProps: z } = ce({
|
|
507
507
|
onFilesSelected: f,
|
|
508
|
-
accept:
|
|
508
|
+
accept: v,
|
|
509
509
|
multiple: I,
|
|
510
510
|
disabled: d,
|
|
511
511
|
containerRef: y
|
|
512
|
-
}), g = n !== void 0 ? n : W, w = g.trim().length > 0,
|
|
512
|
+
}), g = n !== void 0 ? n : W, w = g.trim().length > 0, b = c.length > 0, _ = n !== void 0, Z = s === "inline", O = s === "default", P = () => d ? "disabled" : p ? "dragover" : b ? "attachments" : w ? "withText" : F ? "focused" : "default", K = l.useCallback((o) => {
|
|
513
513
|
r && r(o), _ || L(o);
|
|
514
514
|
}, [r, _]), V = (o) => {
|
|
515
515
|
K(o.target.value);
|
|
516
516
|
}, { onPaste: C } = me({
|
|
517
517
|
pasteAsFile: X,
|
|
518
518
|
onFilesSelected: f,
|
|
519
|
-
accept:
|
|
519
|
+
accept: v,
|
|
520
520
|
disabled: d,
|
|
521
521
|
variant: s,
|
|
522
522
|
value: g,
|
|
@@ -527,7 +527,7 @@ function Ne({ variant: s = "default", placeholder: t = "How can HUMAIN ONE help
|
|
|
527
527
|
o.key === "Enter" && !o.shiftKey && (o.preventDefault(), q());
|
|
528
528
|
}, Ie = () => {
|
|
529
529
|
r && r(""), _ || L(""), s === "inline" ? E.current?.focus() : H.current?.focus();
|
|
530
|
-
}, G = c.filter((o) => o.status === "complete" || o.progress >= 100).length, le = !O &&
|
|
530
|
+
}, G = c.filter((o) => o.status === "complete" || o.progress >= 100).length, le = !O && b && /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
531
531
|
"data-slot": "ai-input-file-preview",
|
|
532
532
|
className: "w-full flex flex-col gap-2",
|
|
533
533
|
children: [
|
|
@@ -577,7 +577,7 @@ function Ne({ variant: s = "default", placeholder: t = "How can HUMAIN ONE help
|
|
|
577
577
|
className: u(J({
|
|
578
578
|
state: P(),
|
|
579
579
|
variant: "inline"
|
|
580
|
-
}), "relative bg-transparent",
|
|
580
|
+
}), "relative bg-transparent", b && "flex-col items-stretch py-3"),
|
|
581
581
|
children: [
|
|
582
582
|
p && /* @__PURE__ */ (0, e.jsx)($, {
|
|
583
583
|
isDefault: O,
|
|
@@ -635,7 +635,7 @@ function Ne({ variant: s = "default", placeholder: t = "How can HUMAIN ONE help
|
|
|
635
635
|
isDefault: O,
|
|
636
636
|
dropText: R
|
|
637
637
|
}),
|
|
638
|
-
|
|
638
|
+
b && /* @__PURE__ */ (0, e.jsxs)("div", {
|
|
639
639
|
"data-slot": "ai-input-file-preview",
|
|
640
640
|
className: "w-full flex flex-col gap-2",
|
|
641
641
|
children: [
|
|
@@ -732,7 +732,7 @@ function Ne({ variant: s = "default", placeholder: t = "How can HUMAIN ONE help
|
|
|
732
732
|
className: u(J({
|
|
733
733
|
state: P(),
|
|
734
734
|
variant: "compact"
|
|
735
|
-
}), "relative bg-transparent",
|
|
735
|
+
}), "relative bg-transparent", b && "flex-col items-stretch"),
|
|
736
736
|
children: [
|
|
737
737
|
p && /* @__PURE__ */ (0, e.jsx)($, {
|
|
738
738
|
isDefault: O,
|
|
@@ -741,7 +741,7 @@ function Ne({ variant: s = "default", placeholder: t = "How can HUMAIN ONE help
|
|
|
741
741
|
le,
|
|
742
742
|
/* @__PURE__ */ (0, e.jsx)("div", {
|
|
743
743
|
"data-slot": "ai-input-text-area",
|
|
744
|
-
className: u("flex gap-2",
|
|
744
|
+
className: u("flex gap-2", b ? "w-full items-start" : "min-w-0 flex-1 items-center"),
|
|
745
745
|
children: /* @__PURE__ */ (0, e.jsx)("textarea", {
|
|
746
746
|
ref: H,
|
|
747
747
|
"data-slot": "ai-input-textarea",
|
|
@@ -760,7 +760,7 @@ function Ne({ variant: s = "default", placeholder: t = "How can HUMAIN ONE help
|
|
|
760
760
|
}),
|
|
761
761
|
/* @__PURE__ */ (0, e.jsxs)("div", {
|
|
762
762
|
"data-slot": "ai-input-action-bar",
|
|
763
|
-
className: u("flex items-center",
|
|
763
|
+
className: u("flex items-center", b ? "justify-between w-full" : "shrink-0 gap-3"),
|
|
764
764
|
children: [/* @__PURE__ */ (0, e.jsx)("div", {
|
|
765
765
|
"data-slot": "ai-input-actions",
|
|
766
766
|
className: "flex items-center gap-2",
|
|
@@ -787,8 +787,8 @@ var nt = Object.assign(Ne, {
|
|
|
787
787
|
Root: he,
|
|
788
788
|
TextArea: ge,
|
|
789
789
|
LeadingIcon: ie,
|
|
790
|
-
SendButton:
|
|
791
|
-
AttachButton:
|
|
790
|
+
SendButton: be,
|
|
791
|
+
AttachButton: ve,
|
|
792
792
|
Actions: je,
|
|
793
793
|
ActionBar: ye,
|
|
794
794
|
FilePreview: we,
|