@actioneer/ads 0.5.6 → 0.5.8
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/bin/ads-init.mjs +6 -0
- package/components/accordion.js +50 -48
- package/components/agent-icon.d.ts +12 -0
- package/components/agent-icon.js +135 -121
- package/components/ai-elements/chain-of-thought-icon.d.ts +10 -12
- package/components/ai-elements/chain-of-thought-icon.js +341 -201
- package/components/ai-elements/chain-of-thought.d.ts +2 -2
- package/components/ai-elements/chain-of-thought.js +108 -108
- package/components/ai-elements/chart.js +16 -14
- package/components/ai-elements/inline-citation.js +41 -41
- package/components/ai-elements/message.js +4 -4
- package/components/ai-elements/queue.js +7 -7
- package/components/ai-elements/research-activity.js +114 -114
- package/components/ai-elements/shimmer.d.ts +2 -2
- package/components/ai-elements/speech-input.js +28 -28
- package/components/ai-elements/task-progress.js +26 -16
- package/components/ai-elements/task.js +17 -17
- package/components/ai-elements/tool.js +6 -6
- package/components/ai-elements/transcript.js +6 -5
- package/components/ai-elements/voice.js +1 -1
- package/components/alert.js +10 -10
- package/components/answer-sources.d.ts +42 -0
- package/components/answer-sources.js +111 -0
- package/components/answer.js +115 -114
- package/components/assistant-ui/action-bar.js +94 -48
- package/components/assistant-ui/attachment.js +131 -103
- package/components/assistant-ui/badge.d.ts +1 -1
- package/components/assistant-ui/badge.js +17 -17
- package/components/assistant-ui/chain-of-thought.d.ts +1 -1
- package/components/assistant-ui/composer-add-context.js +9 -9
- package/components/assistant-ui/composer-deep-research.js +5 -5
- package/components/assistant-ui/composer-harness.js +12 -9
- package/components/assistant-ui/composer-trigger-popover.js +45 -34
- package/components/assistant-ui/composer.js +59 -59
- package/components/assistant-ui/error.js +14 -14
- package/components/assistant-ui/file.d.ts +1 -1
- package/components/assistant-ui/image.d.ts +1 -1
- package/components/assistant-ui/image.js +113 -103
- package/components/assistant-ui/markdown-text.js +18 -18
- package/components/assistant-ui/message.js +46 -45
- package/components/assistant-ui/quote.js +1 -1
- package/components/assistant-ui/reasoning.d.ts +1 -1
- package/components/assistant-ui/reasoning.js +66 -77
- package/components/assistant-ui/suggestions.js +4 -4
- package/components/assistant-ui/thread-context.d.ts +2 -0
- package/components/assistant-ui/thread.js +41 -40
- package/components/assistant-ui/tool-fallback.js +60 -63
- package/components/assistant-ui/tool-group.d.ts +1 -1
- package/components/assistant-ui/tool-group.js +36 -42
- package/components/audio-waveform.js +25 -24
- package/components/autocomplete.d.ts +1 -0
- package/components/autocomplete.js +45 -43
- package/components/avatar.js +30 -30
- package/components/badge.d.ts +1 -1
- package/components/breadcrumbs.js +2 -2
- package/components/button.d.ts +2 -2
- package/components/button.js +22 -20
- package/components/card.js +8 -8
- package/components/carousel.js +105 -104
- package/components/chart.js +9 -7
- package/components/checkbox.js +74 -38
- package/components/chip.d.ts +1 -1
- package/components/code-block.js +3 -3
- package/components/collapsible.js +67 -23
- package/components/connector-card.js +6 -6
- package/components/drawer.d.ts +15 -10
- package/components/drawer.js +78 -77
- package/components/dropdown.d.ts +3 -1
- package/components/dropdown.js +88 -79
- package/components/empty-state.d.ts +4 -4
- package/components/empty-state.js +7 -7
- package/components/field.d.ts +4 -0
- package/components/field.js +45 -34
- package/components/file-dropzone.js +12 -12
- package/components/index.d.ts +4 -0
- package/components/index.js +584 -553
- package/components/infinite-canvas.js +1 -1
- package/components/input-field.js +51 -46
- package/components/input.js +20 -20
- package/components/link.js +9 -9
- package/components/modal.js +105 -73
- package/components/navbar.d.ts +1 -1
- package/components/navbar.js +1 -1
- package/components/number-field.js +38 -29
- package/components/page-header.js +12 -12
- package/components/pagination.js +19 -19
- package/components/panel.js +2 -2
- package/components/pixel-blast-svg.js +3 -3
- package/components/pixel-icon.d.ts +3 -1
- package/components/pixel-icon.js +294 -215
- package/components/popover.d.ts +1 -1
- package/components/popover.js +66 -64
- package/components/progress-circle.js +36 -32
- package/components/progress.js +28 -24
- package/components/radio.js +59 -49
- package/components/resizable-panel.js +1 -1
- package/components/reveal.d.ts +2 -2
- package/components/ripple.d.ts +3 -3
- package/components/scroll-area.js +17 -16
- package/components/segmented.d.ts +4 -1
- package/components/segmented.js +26 -25
- package/components/select.d.ts +2 -0
- package/components/select.js +61 -57
- package/components/setting-row.js +45 -42
- package/components/sidebar.d.ts +2 -2
- package/components/sidebar.js +131 -127
- package/components/skeleton.js +5 -5
- package/components/spinner.d.ts +13 -4
- package/components/spinner.js +42 -42
- package/components/stepper.js +21 -21
- package/components/switch.js +52 -32
- package/components/table.d.ts +24 -7
- package/components/table.js +457 -220
- package/components/tabs.js +149 -137
- package/components/textarea.js +1 -2
- package/components/toast.js +66 -66
- package/components/tooltip.js +2 -2
- package/components/tree.js +62 -51
- package/components/typography.d.ts +2 -1
- package/components/typography.js +33 -32
- package/components/ui/button.d.ts +2 -2
- package/components/ui/button.js +19 -19
- package/components/ui/collapsible.d.ts +1 -5
- package/components/ui/dialog.d.ts +3 -3
- package/components/ui/dialog.js +95 -58
- package/components/ui/tooltip.d.ts +2 -2
- package/components/ui/tooltip.js +67 -33
- package/components/viz-charts.js +95 -95
- package/demo/components/add-to-artifact.js +341 -0
- package/demo/lib/artifact-library.js +134 -0
- package/fonts/aribau-grotesk-medium.woff2 +0 -0
- package/fonts/aribau-grotesk-regular.woff2 +0 -0
- package/fonts.css +11 -11
- package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +17 -16
- package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +21 -20
- package/lib/icons.d.ts +12 -0
- package/lib/icons.js +107 -104
- package/lib/motion.d.ts +42 -39
- package/lib/motion.js +112 -52
- package/lib/spinner-mark.d.ts +9 -0
- package/lib/spinner-mark.js +98 -0
- package/llms.txt +69 -26
- package/manifest.json +344 -42
- package/package.json +1 -1
- package/styles.css +175 -161
- package/theme.css +104 -128
- package/components/ui/collapsible.js +0 -35
- package/fonts/aribau-grotesk-500.otf +0 -0
- package/fonts/aribau-grotesk-600.woff2 +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { Slot as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { cn as
|
|
6
|
-
const
|
|
2
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
3
|
+
import { Slot as s } from "radix-ui";
|
|
4
|
+
import { cva as g } from "class-variance-authority";
|
|
5
|
+
import { cn as u } from "../../lib/cn.js";
|
|
6
|
+
const i = g(
|
|
7
7
|
"inline-flex items-center justify-center gap-1 rounded-md text-xs font-medium transition-colors [&_svg]:size-3 [&_svg]:shrink-0",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
outline: "border-input text-muted-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground border bg-transparent",
|
|
12
12
|
secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/80",
|
|
13
|
-
muted: "bg-muted text-muted-foreground [a&]:hover:bg-
|
|
13
|
+
muted: "bg-muted text-muted-foreground [a&]:hover:bg-accent [a&]:hover:text-foreground",
|
|
14
14
|
ghost: "text-muted-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground bg-transparent",
|
|
15
|
-
info: "bg-blue-100 text-blue-700
|
|
16
|
-
warning: "bg-amber-100 text-amber-700
|
|
17
|
-
success: "bg-emerald-100 text-emerald-700
|
|
18
|
-
destructive: "bg-red-100 text-red-700
|
|
15
|
+
info: "bg-blue-100 text-blue-700 [a&]:hover:bg-blue-100/80",
|
|
16
|
+
warning: "bg-amber-100 text-amber-700 [a&]:hover:bg-amber-100/80",
|
|
17
|
+
success: "bg-emerald-100 text-emerald-700 [a&]:hover:bg-emerald-100/80",
|
|
18
|
+
destructive: "bg-red-100 text-red-700 [a&]:hover:bg-red-100/80"
|
|
19
19
|
},
|
|
20
20
|
size: {
|
|
21
21
|
sm: "px-1.5 py-0.5",
|
|
@@ -29,26 +29,26 @@ const m = s(
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
|
-
function
|
|
32
|
+
function l({
|
|
33
33
|
className: r,
|
|
34
34
|
variant: e,
|
|
35
35
|
size: t,
|
|
36
36
|
asChild: a = !1,
|
|
37
37
|
...o
|
|
38
38
|
}) {
|
|
39
|
-
const
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
-
|
|
39
|
+
const n = a ? s.Root : "span";
|
|
40
|
+
return /* @__PURE__ */ d(
|
|
41
|
+
n,
|
|
42
42
|
{
|
|
43
43
|
"data-slot": "badge",
|
|
44
44
|
"data-variant": e,
|
|
45
45
|
"data-size": t,
|
|
46
|
-
className:
|
|
46
|
+
className: u(i({ variant: e, size: t }), r),
|
|
47
47
|
...o
|
|
48
48
|
}
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
51
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
l as Badge,
|
|
53
|
+
i as badgeVariants
|
|
54
54
|
};
|
|
@@ -3,7 +3,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
import { ActiveChainOfThoughtState } from '../ai-elements/chain-of-thought-icon';
|
|
4
4
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../ui/collapsible';
|
|
5
5
|
declare const chainOfThoughtVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "outline" | "muted" | "ghost" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
8
|
export type ChainOfThoughtRootProps = Omit<React.ComponentProps<typeof Collapsible>, "open" | "onOpenChange"> & VariantProps<typeof chainOfThoughtVariants>;
|
|
9
9
|
/**
|
|
@@ -22,10 +22,10 @@ function ue({
|
|
|
22
22
|
}
|
|
23
23
|
const w = "flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-xs text-left outline-none transition-colors hover:bg-muted focus-visible:bg-muted [&_svg]:size-4 [&_svg]:shrink-0 [&_img]:size-4 [&_img]:shrink-0 [&_img]:rounded-xs", _ = (o) => o.map((t) => t.label).slice(1).join(" · "), te = (o) => o.startsWith("mem.") || o.startsWith("skill.");
|
|
24
24
|
function fe() {
|
|
25
|
-
const o = E(S), t = E(T), a = V(), B = X((e) => e.attachments), [c,
|
|
25
|
+
const o = E(S), t = E(T), a = V(), B = X((e) => e.attachments), [c, g] = y(!1), [u, h] = y([]), b = A(null), k = A(null), [d, O] = y(null);
|
|
26
26
|
if (U(() => {
|
|
27
27
|
if (!c) return;
|
|
28
|
-
const e =
|
|
28
|
+
const e = b.current;
|
|
29
29
|
if (!e) return;
|
|
30
30
|
const r = () => {
|
|
31
31
|
const s = e.getBoundingClientRect();
|
|
@@ -41,9 +41,9 @@ function fe() {
|
|
|
41
41
|
const e = (s) => {
|
|
42
42
|
var f, x;
|
|
43
43
|
const i = s.target;
|
|
44
|
-
(f = k.current) != null && f.contains(i) || (x =
|
|
44
|
+
(f = k.current) != null && f.contains(i) || (x = b.current) != null && x.contains(i) || g(!1);
|
|
45
45
|
}, r = (s) => {
|
|
46
|
-
s.key === "Escape" && (s.preventDefault(), h((i) => i.length ? i.slice(0, -1) : (
|
|
46
|
+
s.key === "Escape" && (s.preventDefault(), h((i) => i.length ? i.slice(0, -1) : (g(!1), i)));
|
|
47
47
|
};
|
|
48
48
|
return document.addEventListener("pointerdown", e), document.addEventListener("keydown", r), () => {
|
|
49
49
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", r);
|
|
@@ -61,13 +61,13 @@ function fe() {
|
|
|
61
61
|
/* @__PURE__ */ n(
|
|
62
62
|
G,
|
|
63
63
|
{
|
|
64
|
-
ref:
|
|
64
|
+
ref: b,
|
|
65
65
|
tooltip: "Add context",
|
|
66
66
|
side: "top",
|
|
67
67
|
"aria-label": "Add context",
|
|
68
68
|
"aria-expanded": c,
|
|
69
69
|
type: "button",
|
|
70
|
-
onClick: () =>
|
|
70
|
+
onClick: () => g((e) => !e),
|
|
71
71
|
className: "aui-composer-add-context hover:bg-muted-foreground/15 size-7 rounded-full p-1",
|
|
72
72
|
children: /* @__PURE__ */ n(J, { className: "size-4.5 stroke-[1.5px]" })
|
|
73
73
|
}
|
|
@@ -98,12 +98,12 @@ function fe() {
|
|
|
98
98
|
type: "button",
|
|
99
99
|
"aria-label": "Back",
|
|
100
100
|
onClick: () => h((e) => e.slice(0, -1)),
|
|
101
|
-
className: "flex size-6 shrink-0 items-center justify-center rounded-
|
|
101
|
+
className: "flex size-6 shrink-0 items-center justify-center rounded-sm text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring [&_svg]:size-4",
|
|
102
102
|
children: /* @__PURE__ */ n(Q, {})
|
|
103
103
|
}
|
|
104
104
|
),
|
|
105
|
-
/* @__PURE__ */ n("span", { className: "min-w-0 flex-1 truncate text-xs font-
|
|
106
|
-
] }) : /* @__PURE__ */ n("div", { className: "px-2 py-1 text-xs font-
|
|
105
|
+
/* @__PURE__ */ n("span", { className: "min-w-0 flex-1 truncate text-xs font-medium text-muted-foreground", children: u.map((e) => e.label).join(" · ") })
|
|
106
|
+
] }) : /* @__PURE__ */ n("div", { className: "px-2 py-1 text-xs font-medium text-muted-foreground", children: "Agent's context" }),
|
|
107
107
|
(l == null ? void 0 : l.addable) && (() => {
|
|
108
108
|
const e = _(u), r = v.has(e);
|
|
109
109
|
return /* @__PURE__ */ m(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
3
|
-
import { createContext as u, useContext as
|
|
4
|
-
import { Telescope as
|
|
3
|
+
import { createContext as u, useContext as c } from "react";
|
|
4
|
+
import { Telescope as a } from "../../lib/icons.js";
|
|
5
5
|
import { cn as n } from "../../lib/cn.js";
|
|
6
6
|
const t = u(null);
|
|
7
7
|
function p({
|
|
@@ -11,7 +11,7 @@ function p({
|
|
|
11
11
|
return /* @__PURE__ */ r(t.Provider, { value: o, children: e });
|
|
12
12
|
}
|
|
13
13
|
function x() {
|
|
14
|
-
const o =
|
|
14
|
+
const o = c(t);
|
|
15
15
|
if (!o) return null;
|
|
16
16
|
const { enabled: e, setEnabled: i } = o;
|
|
17
17
|
return (
|
|
@@ -30,14 +30,14 @@ function x() {
|
|
|
30
30
|
e ? "bg-info-50 text-info-700 hover:bg-info-100" : "text-muted-foreground hover:bg-muted-foreground/15 hover:text-foreground"
|
|
31
31
|
),
|
|
32
32
|
children: [
|
|
33
|
-
/* @__PURE__ */ r(
|
|
33
|
+
/* @__PURE__ */ r(a, { className: "size-4 shrink-0" }),
|
|
34
34
|
"Deep research",
|
|
35
35
|
/* @__PURE__ */ r(
|
|
36
36
|
"span",
|
|
37
37
|
{
|
|
38
38
|
"aria-hidden": !0,
|
|
39
39
|
className: n(
|
|
40
|
-
"size-1.5 shrink-0 rounded-dot transition-colors duration-
|
|
40
|
+
"size-1.5 shrink-0 rounded-dot transition-colors duration-150 ease-out motion-reduce:transition-none",
|
|
41
41
|
e ? "bg-info-600" : "bg-muted-foreground/40"
|
|
42
42
|
)
|
|
43
43
|
}
|
|
@@ -7,7 +7,7 @@ import { useComposerRuntime as d, useComposer as u } from "@assistant-ui/react";
|
|
|
7
7
|
import "clsx";
|
|
8
8
|
import "tailwind-merge";
|
|
9
9
|
import "../../lib/interactive.js";
|
|
10
|
-
import "
|
|
10
|
+
import "../ui/tooltip.js";
|
|
11
11
|
import "../button.js";
|
|
12
12
|
import "../spinner.js";
|
|
13
13
|
import "../reveal.js";
|
|
@@ -23,7 +23,7 @@ import "../scroll-area.js";
|
|
|
23
23
|
import "../stepper.js";
|
|
24
24
|
import "../resizable-panel.js";
|
|
25
25
|
import "react";
|
|
26
|
-
import { Bolt as a, ChevronDown as
|
|
26
|
+
import { Bolt as a, ChevronDown as h, CheckList as f, Sparkles as g } from "../../lib/icons.js";
|
|
27
27
|
import "react-dom";
|
|
28
28
|
import "motion/react";
|
|
29
29
|
import "../ripple.js";
|
|
@@ -44,6 +44,7 @@ import "../popover.js";
|
|
|
44
44
|
import { Dropdown as b, DropdownTrigger as v, DropdownContent as y, DropdownLabel as x, DropdownItem as w } from "../dropdown.js";
|
|
45
45
|
import "../toast.js";
|
|
46
46
|
import "../answer.js";
|
|
47
|
+
import "../answer-sources.js";
|
|
47
48
|
import "../card.js";
|
|
48
49
|
import "../carousel.js";
|
|
49
50
|
import "../chart.js";
|
|
@@ -96,6 +97,8 @@ import "./thread-context.js";
|
|
|
96
97
|
import "./tooltip-icon-button.js";
|
|
97
98
|
import "./composer-add-context.js";
|
|
98
99
|
import "zustand/shallow";
|
|
100
|
+
import "../ui/dialog.js";
|
|
101
|
+
import "radix-ui";
|
|
99
102
|
import "./composer-deep-research.js";
|
|
100
103
|
import "./composer-trigger-popover.js";
|
|
101
104
|
import "./directive-text.js";
|
|
@@ -116,7 +119,7 @@ const m = "application/x-actioneer-harness", S = [
|
|
|
116
119
|
{
|
|
117
120
|
id: "metric",
|
|
118
121
|
label: "Metric analysis",
|
|
119
|
-
icon: /* @__PURE__ */ e(
|
|
122
|
+
icon: /* @__PURE__ */ e(f, {}),
|
|
120
123
|
instructions: "Define the metric, grain, population, and time window before calculating. Call out comparisons, denominator changes, and any data-quality caveats."
|
|
121
124
|
},
|
|
122
125
|
{
|
|
@@ -126,7 +129,7 @@ const m = "application/x-actioneer-harness", S = [
|
|
|
126
129
|
instructions: "Write a concise executive brief: lead with the decision or insight, use only decision-relevant evidence, and end with the recommended next action."
|
|
127
130
|
}
|
|
128
131
|
];
|
|
129
|
-
function
|
|
132
|
+
function Ai() {
|
|
130
133
|
const r = d(), t = u((i) => i.attachments), o = new Set(
|
|
131
134
|
t.filter((i) => i.contentType === m).map((i) => i.name)
|
|
132
135
|
), s = (i) => {
|
|
@@ -145,10 +148,10 @@ function xi() {
|
|
|
145
148
|
/* @__PURE__ */ e(a, { className: "size-4 shrink-0" }),
|
|
146
149
|
"Add harness",
|
|
147
150
|
/* @__PURE__ */ e(
|
|
148
|
-
|
|
151
|
+
h,
|
|
149
152
|
{
|
|
150
153
|
"aria-hidden": !0,
|
|
151
|
-
className: "size-3.5 shrink-0 opacity-60 transition-transform duration-
|
|
154
|
+
className: "size-3.5 shrink-0 opacity-60 transition-transform duration-150 ease-out group-data-[state=open]:rotate-180 motion-reduce:transition-none"
|
|
152
155
|
}
|
|
153
156
|
)
|
|
154
157
|
]
|
|
@@ -169,7 +172,7 @@ function xi() {
|
|
|
169
172
|
] })
|
|
170
173
|
] });
|
|
171
174
|
}
|
|
172
|
-
class
|
|
175
|
+
class Ci {
|
|
173
176
|
constructor() {
|
|
174
177
|
p(this, "accept", m);
|
|
175
178
|
}
|
|
@@ -202,7 +205,7 @@ ${o}
|
|
|
202
205
|
}
|
|
203
206
|
}
|
|
204
207
|
export {
|
|
205
|
-
|
|
208
|
+
Ai as ComposerHarness,
|
|
206
209
|
m as HARNESS_MIME,
|
|
207
|
-
|
|
210
|
+
Ci as HarnessAttachmentAdapter
|
|
208
211
|
};
|
|
@@ -3,22 +3,23 @@ import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
|
3
3
|
import { memo as h, useRef as b } from "react";
|
|
4
4
|
import { ComposerPrimitive as n, unstable_defaultDirectiveFormatter as u, unstable_useTriggerPopoverScopeContext as N } from "@assistant-ui/react";
|
|
5
5
|
import { Sparkles as y, ChevronRight as P, ChevronLeft as T } from "../../lib/icons.js";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
import { Spinner as C } from "../spinner.js";
|
|
7
|
+
import { cn as I } from "../../lib/cn.js";
|
|
8
|
+
function x(o, r, i) {
|
|
9
|
+
return o && (r != null && r[o]) ? r[o] : i;
|
|
9
10
|
}
|
|
10
|
-
const
|
|
11
|
+
const _ = ({
|
|
11
12
|
iconMap: o,
|
|
12
13
|
fallbackIcon: r,
|
|
13
|
-
emptyLabel:
|
|
14
|
-
}) => /* @__PURE__ */ e(n.Unstable_TriggerPopoverCategories, { children: (
|
|
14
|
+
emptyLabel: i
|
|
15
|
+
}) => /* @__PURE__ */ e(n.Unstable_TriggerPopoverCategories, { children: (c) => /* @__PURE__ */ s(
|
|
15
16
|
"div",
|
|
16
17
|
{
|
|
17
18
|
"data-slot": "composer-trigger-popover-categories",
|
|
18
19
|
className: "flex flex-col py-1",
|
|
19
20
|
children: [
|
|
20
|
-
|
|
21
|
-
const
|
|
21
|
+
c.map((a) => {
|
|
22
|
+
const l = x(a.id, o, r);
|
|
22
23
|
return /* @__PURE__ */ s(
|
|
23
24
|
n.Unstable_TriggerPopoverCategoryItem,
|
|
24
25
|
{
|
|
@@ -26,7 +27,7 @@ const I = ({
|
|
|
26
27
|
className: "hover:bg-accent focus:bg-accent data-[highlighted]:bg-accent flex cursor-pointer items-center justify-between gap-2 px-3 py-2 text-sm transition-colors outline-none",
|
|
27
28
|
children: [
|
|
28
29
|
/* @__PURE__ */ s("span", { className: "flex items-center gap-2", children: [
|
|
29
|
-
/* @__PURE__ */ e(
|
|
30
|
+
/* @__PURE__ */ e(l, { className: "text-muted-foreground size-4" }),
|
|
30
31
|
a.label
|
|
31
32
|
] }),
|
|
32
33
|
/* @__PURE__ */ e(P, { className: "text-muted-foreground size-4" })
|
|
@@ -35,17 +36,17 @@ const I = ({
|
|
|
35
36
|
a.id
|
|
36
37
|
);
|
|
37
38
|
}),
|
|
38
|
-
|
|
39
|
+
c.length === 0 && /* @__PURE__ */ e("div", { className: "text-muted-foreground px-3 py-2 text-sm", children: i })
|
|
39
40
|
]
|
|
40
41
|
}
|
|
41
|
-
) }),
|
|
42
|
+
) }), U = ({
|
|
42
43
|
iconMap: o,
|
|
43
44
|
fallbackIcon: r,
|
|
44
|
-
backLabel:
|
|
45
|
-
emptyLabel:
|
|
45
|
+
backLabel: i,
|
|
46
|
+
emptyLabel: c,
|
|
46
47
|
loadingLabel: a
|
|
47
48
|
}) => {
|
|
48
|
-
const { isLoading:
|
|
49
|
+
const { isLoading: l } = N();
|
|
49
50
|
return /* @__PURE__ */ e(n.Unstable_TriggerPopoverItems, { children: (g) => /* @__PURE__ */ s(
|
|
50
51
|
"div",
|
|
51
52
|
{
|
|
@@ -54,17 +55,17 @@ const I = ({
|
|
|
54
55
|
children: [
|
|
55
56
|
/* @__PURE__ */ s(n.Unstable_TriggerPopoverBack, { className: "text-muted-foreground hover:bg-accent flex cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs tracking-wide uppercase transition-colors", children: [
|
|
56
57
|
/* @__PURE__ */ e(T, { className: "size-3.5" }),
|
|
57
|
-
|
|
58
|
+
i
|
|
58
59
|
] }),
|
|
59
60
|
/* @__PURE__ */ s("div", { className: "py-1", children: [
|
|
60
|
-
g.map((t,
|
|
61
|
+
g.map((t, m) => {
|
|
61
62
|
var d;
|
|
62
63
|
const p = typeof ((d = t.metadata) == null ? void 0 : d.icon) == "string" ? t.metadata.icon : void 0, v = x(p, o, r);
|
|
63
64
|
return /* @__PURE__ */ s(
|
|
64
65
|
n.Unstable_TriggerPopoverItem,
|
|
65
66
|
{
|
|
66
67
|
item: t,
|
|
67
|
-
index:
|
|
68
|
+
index: m,
|
|
68
69
|
className: "hover:bg-accent focus:bg-accent data-[highlighted]:bg-accent flex w-full cursor-pointer flex-col items-start gap-0.5 px-3 py-2 text-start transition-colors outline-none",
|
|
69
70
|
children: [
|
|
70
71
|
/* @__PURE__ */ s("span", { className: "flex items-center gap-2 text-sm font-medium", children: [
|
|
@@ -77,7 +78,17 @@ const I = ({
|
|
|
77
78
|
t.id
|
|
78
79
|
);
|
|
79
80
|
}),
|
|
80
|
-
g.length === 0 && /* @__PURE__ */
|
|
81
|
+
g.length === 0 && /* @__PURE__ */ s(
|
|
82
|
+
"div",
|
|
83
|
+
{
|
|
84
|
+
role: l ? "status" : void 0,
|
|
85
|
+
className: "text-muted-foreground flex items-center gap-2 px-3 py-2 text-sm",
|
|
86
|
+
children: [
|
|
87
|
+
l && /* @__PURE__ */ e(C, { variant: "content", size: "xs", "aria-hidden": !0 }),
|
|
88
|
+
l ? a : c
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
)
|
|
81
92
|
] })
|
|
82
93
|
]
|
|
83
94
|
}
|
|
@@ -85,19 +96,19 @@ const I = ({
|
|
|
85
96
|
}, f = ({
|
|
86
97
|
iconMap: o,
|
|
87
98
|
fallbackIcon: r = y,
|
|
88
|
-
backLabel:
|
|
89
|
-
emptyCategoriesLabel:
|
|
99
|
+
backLabel: i = "Back",
|
|
100
|
+
emptyCategoriesLabel: c = "No items available",
|
|
90
101
|
emptyItemsLabel: a = "No matching items",
|
|
91
|
-
loadingLabel:
|
|
102
|
+
loadingLabel: l = "Loading…",
|
|
92
103
|
className: g,
|
|
93
104
|
directive: t,
|
|
94
|
-
action:
|
|
105
|
+
action: m,
|
|
95
106
|
...p
|
|
96
107
|
}) => (b(!1), /* @__PURE__ */ s(
|
|
97
108
|
n.Unstable_TriggerPopover,
|
|
98
109
|
{
|
|
99
110
|
"data-slot": "composer-trigger-popover",
|
|
100
|
-
className:
|
|
111
|
+
className: I(
|
|
101
112
|
"aui-composer-trigger-popover bg-popover text-popover-foreground absolute start-0 bottom-full z-50 mb-2 w-64 overflow-hidden rounded-xl border shadow-lg",
|
|
102
113
|
g
|
|
103
114
|
),
|
|
@@ -109,39 +120,39 @@ const I = ({
|
|
|
109
120
|
formatter: t.formatter ?? u,
|
|
110
121
|
onInserted: t.onInserted
|
|
111
122
|
}
|
|
112
|
-
) :
|
|
123
|
+
) : m ? /* @__PURE__ */ e(
|
|
113
124
|
n.Unstable_TriggerPopover.Action,
|
|
114
125
|
{
|
|
115
|
-
formatter:
|
|
116
|
-
onExecute:
|
|
117
|
-
removeOnExecute:
|
|
126
|
+
formatter: m.formatter ?? u,
|
|
127
|
+
onExecute: m.onExecute,
|
|
128
|
+
removeOnExecute: m.removeOnExecute
|
|
118
129
|
}
|
|
119
130
|
) : null,
|
|
120
131
|
/* @__PURE__ */ e(
|
|
121
|
-
|
|
132
|
+
_,
|
|
122
133
|
{
|
|
123
134
|
iconMap: o,
|
|
124
135
|
fallbackIcon: r,
|
|
125
|
-
emptyLabel:
|
|
136
|
+
emptyLabel: c
|
|
126
137
|
}
|
|
127
138
|
),
|
|
128
139
|
/* @__PURE__ */ e(
|
|
129
|
-
|
|
140
|
+
U,
|
|
130
141
|
{
|
|
131
142
|
iconMap: o,
|
|
132
143
|
fallbackIcon: r,
|
|
133
|
-
backLabel:
|
|
144
|
+
backLabel: i,
|
|
134
145
|
emptyLabel: a,
|
|
135
|
-
loadingLabel:
|
|
146
|
+
loadingLabel: l
|
|
136
147
|
}
|
|
137
148
|
)
|
|
138
149
|
]
|
|
139
150
|
}
|
|
140
151
|
));
|
|
141
152
|
f.displayName = "ComposerTriggerPopover";
|
|
142
|
-
const
|
|
153
|
+
const S = h(
|
|
143
154
|
f
|
|
144
155
|
);
|
|
145
156
|
export {
|
|
146
|
-
|
|
157
|
+
S as ComposerTriggerPopover
|
|
147
158
|
};
|