@particle-academy/react-fancy 3.0.0 → 3.1.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/README.md +15 -0
- package/dist/index.cjs +790 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +234 -1
- package/dist/index.d.ts +234 -1
- package/dist/index.js +787 -3
- package/dist/index.js.map +1 -1
- package/docs/MagicWand.md +65 -0
- package/docs/MoodMeter.md +63 -0
- package/docs/PromptInput.md +69 -0
- package/docs/ReasonTag.md +63 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9202,11 +9202,11 @@ function computeTicks(min, max, count = 5) {
|
|
|
9202
9202
|
}
|
|
9203
9203
|
return ticks;
|
|
9204
9204
|
}
|
|
9205
|
-
function niceNum(range2,
|
|
9205
|
+
function niceNum(range2, round2) {
|
|
9206
9206
|
const exponent = Math.floor(Math.log10(range2));
|
|
9207
9207
|
const fraction = range2 / Math.pow(10, exponent);
|
|
9208
9208
|
let niceFraction;
|
|
9209
|
-
if (
|
|
9209
|
+
if (round2) {
|
|
9210
9210
|
if (fraction < 1.5) niceFraction = 1;
|
|
9211
9211
|
else if (fraction < 3) niceFraction = 2;
|
|
9212
9212
|
else if (fraction < 7) niceFraction = 5;
|
|
@@ -11819,7 +11819,791 @@ TreeNavRoot.displayName = "TreeNav";
|
|
|
11819
11819
|
var TreeNav = Object.assign(TreeNavRoot, {
|
|
11820
11820
|
Node: TreeNode
|
|
11821
11821
|
});
|
|
11822
|
+
var CONFIDENCE_TIERS = [
|
|
11823
|
+
{ min: 0.85, color: "#10b981", label: "high" },
|
|
11824
|
+
{ min: 0.6, color: "#f59e0b", label: "medium" },
|
|
11825
|
+
{ min: 0, color: "#ef4444", label: "low" }
|
|
11826
|
+
];
|
|
11827
|
+
function tier(c) {
|
|
11828
|
+
return CONFIDENCE_TIERS.find((t) => c >= t.min) ?? CONFIDENCE_TIERS[2];
|
|
11829
|
+
}
|
|
11830
|
+
function ReasonTag({
|
|
11831
|
+
value,
|
|
11832
|
+
reason,
|
|
11833
|
+
confidence = 1,
|
|
11834
|
+
sources = [],
|
|
11835
|
+
by,
|
|
11836
|
+
theme = "dot",
|
|
11837
|
+
pinned = false,
|
|
11838
|
+
onFollowUp,
|
|
11839
|
+
className
|
|
11840
|
+
}) {
|
|
11841
|
+
const t = tier(confidence);
|
|
11842
|
+
const trigger = theme === "chip" ? /* @__PURE__ */ jsxs(
|
|
11843
|
+
"span",
|
|
11844
|
+
{
|
|
11845
|
+
className: `inline-flex cursor-help items-center gap-1 rounded-full px-2 py-0.5 text-[12px] font-medium ${className ?? ""}`,
|
|
11846
|
+
style: { backgroundColor: t.color + "22", color: t.color },
|
|
11847
|
+
children: [
|
|
11848
|
+
/* @__PURE__ */ jsx(
|
|
11849
|
+
"span",
|
|
11850
|
+
{
|
|
11851
|
+
className: "h-1.5 w-1.5 rounded-full",
|
|
11852
|
+
style: { backgroundColor: t.color }
|
|
11853
|
+
}
|
|
11854
|
+
),
|
|
11855
|
+
value,
|
|
11856
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] opacity-70", children: "?" })
|
|
11857
|
+
]
|
|
11858
|
+
}
|
|
11859
|
+
) : theme === "underline" ? /* @__PURE__ */ jsxs(
|
|
11860
|
+
"span",
|
|
11861
|
+
{
|
|
11862
|
+
className: `cursor-help underline decoration-dotted underline-offset-2 ${className ?? ""}`,
|
|
11863
|
+
style: { textDecorationColor: t.color },
|
|
11864
|
+
children: [
|
|
11865
|
+
value,
|
|
11866
|
+
/* @__PURE__ */ jsx(
|
|
11867
|
+
"span",
|
|
11868
|
+
{
|
|
11869
|
+
className: "ml-0.5 font-mono text-[10px]",
|
|
11870
|
+
style: { color: t.color },
|
|
11871
|
+
children: "?"
|
|
11872
|
+
}
|
|
11873
|
+
)
|
|
11874
|
+
]
|
|
11875
|
+
}
|
|
11876
|
+
) : /* @__PURE__ */ jsxs("span", { className: `inline-flex cursor-help items-baseline gap-1 ${className ?? ""}`, children: [
|
|
11877
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: value }),
|
|
11878
|
+
/* @__PURE__ */ jsx(
|
|
11879
|
+
"span",
|
|
11880
|
+
{
|
|
11881
|
+
className: "inline-block h-1.5 w-1.5 rounded-full align-middle",
|
|
11882
|
+
style: { backgroundColor: t.color },
|
|
11883
|
+
title: "reason available"
|
|
11884
|
+
}
|
|
11885
|
+
)
|
|
11886
|
+
] });
|
|
11887
|
+
if (pinned) {
|
|
11888
|
+
return /* @__PURE__ */ jsxs("span", { className: "inline-flex flex-col items-start gap-0.5 align-top", children: [
|
|
11889
|
+
trigger,
|
|
11890
|
+
/* @__PURE__ */ jsx(
|
|
11891
|
+
"span",
|
|
11892
|
+
{
|
|
11893
|
+
className: "block max-w-[280px] rounded border-l-2 pl-2 text-[11px] leading-snug text-zinc-600 dark:text-zinc-300",
|
|
11894
|
+
style: { borderColor: t.color },
|
|
11895
|
+
children: reason
|
|
11896
|
+
}
|
|
11897
|
+
)
|
|
11898
|
+
] });
|
|
11899
|
+
}
|
|
11900
|
+
return /* @__PURE__ */ jsxs(Popover, { hover: true, children: [
|
|
11901
|
+
/* @__PURE__ */ jsx(Popover.Trigger, { children: trigger }),
|
|
11902
|
+
/* @__PURE__ */ jsx(Popover.Content, { children: /* @__PURE__ */ jsxs("div", { className: "w-72 space-y-2 text-sm", children: [
|
|
11903
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-2", children: [
|
|
11904
|
+
/* @__PURE__ */ jsxs(
|
|
11905
|
+
"span",
|
|
11906
|
+
{
|
|
11907
|
+
className: "text-[10px] font-semibold uppercase tracking-wider",
|
|
11908
|
+
style: { color: t.color },
|
|
11909
|
+
children: [
|
|
11910
|
+
t.label,
|
|
11911
|
+
" confidence \xB7 ",
|
|
11912
|
+
(confidence * 100).toFixed(0),
|
|
11913
|
+
"%"
|
|
11914
|
+
]
|
|
11915
|
+
}
|
|
11916
|
+
),
|
|
11917
|
+
by && /* @__PURE__ */ jsxs("span", { className: "ml-auto font-mono text-[10px] text-zinc-400", children: [
|
|
11918
|
+
"@",
|
|
11919
|
+
by
|
|
11920
|
+
] })
|
|
11921
|
+
] }),
|
|
11922
|
+
/* @__PURE__ */ jsx("p", { className: "text-[13px] leading-snug text-zinc-700 dark:text-zinc-200", children: reason }),
|
|
11923
|
+
sources.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
11924
|
+
/* @__PURE__ */ jsx("div", { className: "text-[10px] uppercase tracking-wider text-zinc-400", children: "sources" }),
|
|
11925
|
+
/* @__PURE__ */ jsx("ul", { className: "mt-0.5 space-y-0.5 text-[12px]", children: sources.map((s, i) => /* @__PURE__ */ jsx("li", { children: s.href ? /* @__PURE__ */ jsx("a", { className: "text-violet-600 hover:underline", href: s.href, children: s.label }) : /* @__PURE__ */ jsx("span", { className: "text-zinc-600 dark:text-zinc-300", children: s.label }) }, i)) })
|
|
11926
|
+
] }),
|
|
11927
|
+
onFollowUp && /* @__PURE__ */ jsx("div", { className: "flex justify-end pt-1", children: /* @__PURE__ */ jsx(Action, { size: "sm", variant: "ghost", onClick: onFollowUp, children: "ask follow-up" }) })
|
|
11928
|
+
] }) })
|
|
11929
|
+
] });
|
|
11930
|
+
}
|
|
11931
|
+
function MoodMeter({
|
|
11932
|
+
min,
|
|
11933
|
+
max,
|
|
11934
|
+
step,
|
|
11935
|
+
value,
|
|
11936
|
+
confidence,
|
|
11937
|
+
onChange,
|
|
11938
|
+
posted,
|
|
11939
|
+
width = 320,
|
|
11940
|
+
height = 220,
|
|
11941
|
+
showGrid = true,
|
|
11942
|
+
color = "#0ea5e9",
|
|
11943
|
+
postedColor = "#a855f7",
|
|
11944
|
+
prefix = "",
|
|
11945
|
+
suffix = "",
|
|
11946
|
+
formatValue,
|
|
11947
|
+
className
|
|
11948
|
+
}) {
|
|
11949
|
+
const ref = useRef(null);
|
|
11950
|
+
const [dragging, setDragging] = useState(false);
|
|
11951
|
+
const snapStep = step ?? (max - min) / 100;
|
|
11952
|
+
const fmt = useCallback(
|
|
11953
|
+
(v) => {
|
|
11954
|
+
if (formatValue) return formatValue(v);
|
|
11955
|
+
const num = snapStep < 1 ? v.toFixed(2) : Math.round(v).toString();
|
|
11956
|
+
return `${prefix}${num}${suffix}`;
|
|
11957
|
+
},
|
|
11958
|
+
[formatValue, snapStep, prefix, suffix]
|
|
11959
|
+
);
|
|
11960
|
+
const set = useCallback(
|
|
11961
|
+
(clientX, clientY) => {
|
|
11962
|
+
const el = ref.current;
|
|
11963
|
+
if (!el) return;
|
|
11964
|
+
const rect = el.getBoundingClientRect();
|
|
11965
|
+
const x = clamp((clientX - rect.left) / rect.width, 0, 1);
|
|
11966
|
+
const y = clamp((clientY - rect.top) / rect.height, 0, 1);
|
|
11967
|
+
const raw = min + x * (max - min);
|
|
11968
|
+
const snapped = round(raw, snapStep, min);
|
|
11969
|
+
const c = clamp(1 - y, 0, 1);
|
|
11970
|
+
onChange(snapped, Math.round(c * 100) / 100);
|
|
11971
|
+
},
|
|
11972
|
+
[min, max, snapStep, onChange]
|
|
11973
|
+
);
|
|
11974
|
+
const onPointerDown = (e) => {
|
|
11975
|
+
e.target.setPointerCapture?.(e.pointerId);
|
|
11976
|
+
setDragging(true);
|
|
11977
|
+
set(e.clientX, e.clientY);
|
|
11978
|
+
};
|
|
11979
|
+
const onPointerMove = (e) => {
|
|
11980
|
+
if (!dragging) return;
|
|
11981
|
+
set(e.clientX, e.clientY);
|
|
11982
|
+
};
|
|
11983
|
+
const onPointerUp = () => setDragging(false);
|
|
11984
|
+
const xPct = (value - min) / (max - min) * 100;
|
|
11985
|
+
const yPct = (1 - confidence) * 100;
|
|
11986
|
+
const haloR = 18 + (1 - confidence) * 70;
|
|
11987
|
+
const pxPct = posted ? (posted.value - min) / (max - min) * 100 : 0;
|
|
11988
|
+
const pyPct = posted ? (1 - posted.confidence) * 100 : 0;
|
|
11989
|
+
const pHaloR = posted ? 16 + (1 - posted.confidence) * 60 : 0;
|
|
11990
|
+
return /* @__PURE__ */ jsxs(
|
|
11991
|
+
"div",
|
|
11992
|
+
{
|
|
11993
|
+
ref,
|
|
11994
|
+
onPointerDown,
|
|
11995
|
+
onPointerMove,
|
|
11996
|
+
onPointerUp,
|
|
11997
|
+
onPointerCancel: onPointerUp,
|
|
11998
|
+
className: `relative cursor-crosshair touch-none select-none overflow-hidden rounded-md border border-zinc-200 bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-950 ${className ?? ""}`,
|
|
11999
|
+
style: { width, height },
|
|
12000
|
+
children: [
|
|
12001
|
+
showGrid && /* @__PURE__ */ jsxs("svg", { className: "pointer-events-none absolute inset-0 h-full w-full", "aria-hidden": true, children: [
|
|
12002
|
+
[0.25, 0.5, 0.75].map((p, i) => /* @__PURE__ */ jsx(
|
|
12003
|
+
"line",
|
|
12004
|
+
{
|
|
12005
|
+
x1: `${p * 100}%`,
|
|
12006
|
+
x2: `${p * 100}%`,
|
|
12007
|
+
y1: "0",
|
|
12008
|
+
y2: "100%",
|
|
12009
|
+
stroke: "#a1a1aa",
|
|
12010
|
+
strokeOpacity: 0.18,
|
|
12011
|
+
strokeDasharray: "3 4"
|
|
12012
|
+
},
|
|
12013
|
+
`v${i}`
|
|
12014
|
+
)),
|
|
12015
|
+
[0.25, 0.5, 0.75].map((p, i) => /* @__PURE__ */ jsx(
|
|
12016
|
+
"line",
|
|
12017
|
+
{
|
|
12018
|
+
x1: "0",
|
|
12019
|
+
x2: "100%",
|
|
12020
|
+
y1: `${p * 100}%`,
|
|
12021
|
+
y2: `${p * 100}%`,
|
|
12022
|
+
stroke: "#a1a1aa",
|
|
12023
|
+
strokeOpacity: 0.18,
|
|
12024
|
+
strokeDasharray: "3 4"
|
|
12025
|
+
},
|
|
12026
|
+
`h${i}`
|
|
12027
|
+
))
|
|
12028
|
+
] }),
|
|
12029
|
+
showGrid && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12030
|
+
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute left-1.5 top-1.5 text-[10px] uppercase tracking-wider text-zinc-400", children: "\u2191 sure" }),
|
|
12031
|
+
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute bottom-1.5 left-1.5 text-[10px] uppercase tracking-wider text-zinc-400", children: "\u2193 unsure" }),
|
|
12032
|
+
/* @__PURE__ */ jsxs("div", { className: "pointer-events-none absolute right-1.5 top-1.5 text-[10px] uppercase tracking-wider text-zinc-400", children: [
|
|
12033
|
+
fmt(max),
|
|
12034
|
+
" \u2192"
|
|
12035
|
+
] }),
|
|
12036
|
+
/* @__PURE__ */ jsxs("div", { className: "pointer-events-none absolute bottom-1.5 right-1.5 text-[10px] uppercase tracking-wider text-zinc-400", children: [
|
|
12037
|
+
"\u2190 ",
|
|
12038
|
+
fmt(min)
|
|
12039
|
+
] })
|
|
12040
|
+
] }),
|
|
12041
|
+
posted && /* @__PURE__ */ jsx(
|
|
12042
|
+
Handle,
|
|
12043
|
+
{
|
|
12044
|
+
xPct: pxPct,
|
|
12045
|
+
yPct: pyPct,
|
|
12046
|
+
haloR: pHaloR,
|
|
12047
|
+
color: postedColor,
|
|
12048
|
+
dashed: true,
|
|
12049
|
+
label: "agent"
|
|
12050
|
+
}
|
|
12051
|
+
),
|
|
12052
|
+
/* @__PURE__ */ jsx(
|
|
12053
|
+
Handle,
|
|
12054
|
+
{
|
|
12055
|
+
xPct,
|
|
12056
|
+
yPct,
|
|
12057
|
+
haloR,
|
|
12058
|
+
color,
|
|
12059
|
+
label: fmt(value)
|
|
12060
|
+
}
|
|
12061
|
+
)
|
|
12062
|
+
]
|
|
12063
|
+
}
|
|
12064
|
+
);
|
|
12065
|
+
}
|
|
12066
|
+
function Handle({
|
|
12067
|
+
xPct,
|
|
12068
|
+
yPct,
|
|
12069
|
+
haloR,
|
|
12070
|
+
color,
|
|
12071
|
+
dashed = false,
|
|
12072
|
+
label
|
|
12073
|
+
}) {
|
|
12074
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12075
|
+
/* @__PURE__ */ jsx(
|
|
12076
|
+
"div",
|
|
12077
|
+
{
|
|
12078
|
+
className: "pointer-events-none absolute -translate-x-1/2 -translate-y-1/2 rounded-full",
|
|
12079
|
+
style: {
|
|
12080
|
+
left: `${xPct}%`,
|
|
12081
|
+
top: `${yPct}%`,
|
|
12082
|
+
width: haloR * 2,
|
|
12083
|
+
height: haloR * 2,
|
|
12084
|
+
background: color + (dashed ? "11" : "22"),
|
|
12085
|
+
border: dashed ? `1px dashed ${color}` : "none"
|
|
12086
|
+
}
|
|
12087
|
+
}
|
|
12088
|
+
),
|
|
12089
|
+
/* @__PURE__ */ jsx(
|
|
12090
|
+
"div",
|
|
12091
|
+
{
|
|
12092
|
+
className: "pointer-events-none absolute -translate-x-1/2 -translate-y-1/2 rounded-full ring-2 ring-white dark:ring-zinc-900",
|
|
12093
|
+
style: {
|
|
12094
|
+
left: `${xPct}%`,
|
|
12095
|
+
top: `${yPct}%`,
|
|
12096
|
+
width: 14,
|
|
12097
|
+
height: 14,
|
|
12098
|
+
background: color,
|
|
12099
|
+
opacity: dashed ? 0.6 : 1
|
|
12100
|
+
}
|
|
12101
|
+
}
|
|
12102
|
+
),
|
|
12103
|
+
/* @__PURE__ */ jsx(
|
|
12104
|
+
"div",
|
|
12105
|
+
{
|
|
12106
|
+
className: "pointer-events-none absolute -translate-x-1/2 rounded px-1.5 py-0.5 font-mono text-[10px]",
|
|
12107
|
+
style: {
|
|
12108
|
+
left: `${xPct}%`,
|
|
12109
|
+
top: `calc(${yPct}% + 14px)`,
|
|
12110
|
+
color
|
|
12111
|
+
},
|
|
12112
|
+
children: label
|
|
12113
|
+
}
|
|
12114
|
+
)
|
|
12115
|
+
] });
|
|
12116
|
+
}
|
|
12117
|
+
function clamp(n, lo, hi) {
|
|
12118
|
+
return Math.max(lo, Math.min(hi, n));
|
|
12119
|
+
}
|
|
12120
|
+
function round(n, step, min) {
|
|
12121
|
+
if (step >= 1) return Math.round(n);
|
|
12122
|
+
return Math.round((n - min) / step) * step + min;
|
|
12123
|
+
}
|
|
12124
|
+
var DEFAULT_MENTION_COLOR = {
|
|
12125
|
+
agent: "#a855f7",
|
|
12126
|
+
file: "#10b981",
|
|
12127
|
+
person: "#3b82f6"
|
|
12128
|
+
};
|
|
12129
|
+
function PromptInput({
|
|
12130
|
+
budgetTokens,
|
|
12131
|
+
commands = [],
|
|
12132
|
+
mentions = [],
|
|
12133
|
+
showHint = true,
|
|
12134
|
+
onSubmit,
|
|
12135
|
+
placeholder = "Ask anything. Type / for commands, @ for mentions. \u2318/Ctrl+Enter to send.",
|
|
12136
|
+
charsPerToken = 4,
|
|
12137
|
+
mentionColor,
|
|
12138
|
+
maxHeight = 280
|
|
12139
|
+
}) {
|
|
12140
|
+
const [text, setText] = useState("");
|
|
12141
|
+
const [attachments, setAttachments] = useState([]);
|
|
12142
|
+
const [picker, setPicker] = useState(null);
|
|
12143
|
+
const taRef = useRef(null);
|
|
12144
|
+
const [dragOver, setDragOver] = useState(false);
|
|
12145
|
+
const colors = mentionColor ?? DEFAULT_MENTION_COLOR;
|
|
12146
|
+
const tokens = useMemo(
|
|
12147
|
+
() => Math.ceil(text.length / Math.max(1, charsPerToken)),
|
|
12148
|
+
[text, charsPerToken]
|
|
12149
|
+
);
|
|
12150
|
+
const ratio = Math.min(1, tokens / budgetTokens);
|
|
12151
|
+
const meterColor = ratio < 0.6 ? "#10b981" : ratio < 0.85 ? "#f59e0b" : "#ef4444";
|
|
12152
|
+
const filteredCmds = useMemo(
|
|
12153
|
+
() => picker?.kind === "cmd" ? commands.filter(
|
|
12154
|
+
(c) => c.name.slice(1).toLowerCase().startsWith(picker.query.toLowerCase())
|
|
12155
|
+
) : [],
|
|
12156
|
+
[picker, commands]
|
|
12157
|
+
);
|
|
12158
|
+
const filteredMentions = useMemo(
|
|
12159
|
+
() => picker?.kind === "mention" ? mentions.filter(
|
|
12160
|
+
(m) => m.name.toLowerCase().includes(picker.query.toLowerCase())
|
|
12161
|
+
) : [],
|
|
12162
|
+
[picker, mentions]
|
|
12163
|
+
);
|
|
12164
|
+
const items = picker?.kind === "cmd" ? filteredCmds : picker?.kind === "mention" ? filteredMentions : [];
|
|
12165
|
+
useEffect(() => {
|
|
12166
|
+
const ta = taRef.current;
|
|
12167
|
+
if (!ta) return;
|
|
12168
|
+
ta.style.height = "auto";
|
|
12169
|
+
ta.style.height = Math.min(maxHeight, ta.scrollHeight) + "px";
|
|
12170
|
+
}, [text, maxHeight]);
|
|
12171
|
+
const updateText = (next, caret) => {
|
|
12172
|
+
setText(next);
|
|
12173
|
+
let triggerIdx = -1;
|
|
12174
|
+
let triggerKind = null;
|
|
12175
|
+
for (let i = caret - 1; i >= 0; i--) {
|
|
12176
|
+
const ch = next[i];
|
|
12177
|
+
if (ch === "@") {
|
|
12178
|
+
triggerKind = "mention";
|
|
12179
|
+
triggerIdx = i;
|
|
12180
|
+
break;
|
|
12181
|
+
}
|
|
12182
|
+
if (ch === "/" && (i === 0 || /\s/.test(next[i - 1] ?? ""))) {
|
|
12183
|
+
triggerKind = "cmd";
|
|
12184
|
+
triggerIdx = i;
|
|
12185
|
+
break;
|
|
12186
|
+
}
|
|
12187
|
+
if (/\s/.test(ch)) break;
|
|
12188
|
+
}
|
|
12189
|
+
if (triggerKind !== null && triggerIdx >= 0) {
|
|
12190
|
+
const query = next.slice(triggerIdx + 1, caret);
|
|
12191
|
+
setPicker({ kind: triggerKind, start: triggerIdx, query, cursor: 0 });
|
|
12192
|
+
} else {
|
|
12193
|
+
setPicker(null);
|
|
12194
|
+
}
|
|
12195
|
+
};
|
|
12196
|
+
const insertChoice = (i) => {
|
|
12197
|
+
if (!picker || items.length === 0) return;
|
|
12198
|
+
const choice = items[i] ?? items[0];
|
|
12199
|
+
const insert = picker.kind === "cmd" ? choice.name + " " : `@${choice.id} `;
|
|
12200
|
+
const before = text.slice(0, picker.start);
|
|
12201
|
+
const after = text.slice(picker.start + 1 + picker.query.length);
|
|
12202
|
+
const next = before + insert + after;
|
|
12203
|
+
setText(next);
|
|
12204
|
+
setPicker(null);
|
|
12205
|
+
requestAnimationFrame(() => {
|
|
12206
|
+
const ta = taRef.current;
|
|
12207
|
+
if (!ta) return;
|
|
12208
|
+
ta.focus();
|
|
12209
|
+
const pos = before.length + insert.length;
|
|
12210
|
+
ta.setSelectionRange(pos, pos);
|
|
12211
|
+
});
|
|
12212
|
+
};
|
|
12213
|
+
const submit = () => {
|
|
12214
|
+
if (!text.trim() && attachments.length === 0) return;
|
|
12215
|
+
onSubmit(text, attachments);
|
|
12216
|
+
setText("");
|
|
12217
|
+
setAttachments([]);
|
|
12218
|
+
setPicker(null);
|
|
12219
|
+
};
|
|
12220
|
+
const onKeyDown = (e) => {
|
|
12221
|
+
if (picker) {
|
|
12222
|
+
if (e.key === "ArrowDown") {
|
|
12223
|
+
e.preventDefault();
|
|
12224
|
+
setPicker(
|
|
12225
|
+
(p) => p ? { ...p, cursor: Math.min(items.length - 1, p.cursor + 1) } : p
|
|
12226
|
+
);
|
|
12227
|
+
return;
|
|
12228
|
+
}
|
|
12229
|
+
if (e.key === "ArrowUp") {
|
|
12230
|
+
e.preventDefault();
|
|
12231
|
+
setPicker((p) => p ? { ...p, cursor: Math.max(0, p.cursor - 1) } : p);
|
|
12232
|
+
return;
|
|
12233
|
+
}
|
|
12234
|
+
if (e.key === "Enter" && !e.metaKey && !e.ctrlKey && items.length > 0) {
|
|
12235
|
+
e.preventDefault();
|
|
12236
|
+
insertChoice(picker.cursor);
|
|
12237
|
+
return;
|
|
12238
|
+
}
|
|
12239
|
+
if (e.key === "Escape") {
|
|
12240
|
+
e.preventDefault();
|
|
12241
|
+
setPicker(null);
|
|
12242
|
+
return;
|
|
12243
|
+
}
|
|
12244
|
+
}
|
|
12245
|
+
if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) {
|
|
12246
|
+
e.preventDefault();
|
|
12247
|
+
submit();
|
|
12248
|
+
}
|
|
12249
|
+
};
|
|
12250
|
+
const onDrop = (e) => {
|
|
12251
|
+
e.preventDefault();
|
|
12252
|
+
setDragOver(false);
|
|
12253
|
+
const files = Array.from(e.dataTransfer.files);
|
|
12254
|
+
setAttachments((cur) => [
|
|
12255
|
+
...cur,
|
|
12256
|
+
...files.map((f) => ({
|
|
12257
|
+
id: `${f.name}-${Date.now()}-${Math.random()}`,
|
|
12258
|
+
name: f.name,
|
|
12259
|
+
bytes: f.size
|
|
12260
|
+
}))
|
|
12261
|
+
]);
|
|
12262
|
+
};
|
|
12263
|
+
return /* @__PURE__ */ jsxs(
|
|
12264
|
+
"div",
|
|
12265
|
+
{
|
|
12266
|
+
onDragOver: (e) => {
|
|
12267
|
+
e.preventDefault();
|
|
12268
|
+
setDragOver(true);
|
|
12269
|
+
},
|
|
12270
|
+
onDragLeave: () => setDragOver(false),
|
|
12271
|
+
onDrop,
|
|
12272
|
+
className: `relative rounded-md border transition ${dragOver ? "border-violet-400 bg-violet-50/50 dark:border-violet-600 dark:bg-violet-950/30" : "border-zinc-200 dark:border-zinc-800"} bg-white dark:bg-zinc-900`,
|
|
12273
|
+
children: [
|
|
12274
|
+
attachments.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5 border-b border-zinc-200 px-3 py-2 dark:border-zinc-800", children: attachments.map((a) => /* @__PURE__ */ jsxs(
|
|
12275
|
+
"span",
|
|
12276
|
+
{
|
|
12277
|
+
className: "inline-flex items-center gap-1.5 rounded-md bg-zinc-100 px-2 py-0.5 text-[11px] dark:bg-zinc-800",
|
|
12278
|
+
children: [
|
|
12279
|
+
/* @__PURE__ */ jsx("span", { children: "\u{1F4CE}" }),
|
|
12280
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono", children: a.name }),
|
|
12281
|
+
/* @__PURE__ */ jsx("span", { className: "text-zinc-400", children: fmtSize(a.bytes) }),
|
|
12282
|
+
/* @__PURE__ */ jsx(
|
|
12283
|
+
"button",
|
|
12284
|
+
{
|
|
12285
|
+
onClick: () => setAttachments((cur) => cur.filter((x) => x.id !== a.id)),
|
|
12286
|
+
className: "opacity-50 hover:opacity-100",
|
|
12287
|
+
"aria-label": "Remove attachment",
|
|
12288
|
+
children: "\xD7"
|
|
12289
|
+
}
|
|
12290
|
+
)
|
|
12291
|
+
]
|
|
12292
|
+
},
|
|
12293
|
+
a.id
|
|
12294
|
+
)) }),
|
|
12295
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
12296
|
+
/* @__PURE__ */ jsx(
|
|
12297
|
+
"textarea",
|
|
12298
|
+
{
|
|
12299
|
+
ref: taRef,
|
|
12300
|
+
value: text,
|
|
12301
|
+
onChange: (e) => updateText(e.target.value, e.target.selectionStart),
|
|
12302
|
+
onKeyDown,
|
|
12303
|
+
placeholder,
|
|
12304
|
+
spellCheck: false,
|
|
12305
|
+
className: "block w-full resize-none bg-transparent px-3 py-2.5 text-[14px] leading-relaxed outline-none placeholder:text-zinc-400",
|
|
12306
|
+
rows: 3
|
|
12307
|
+
}
|
|
12308
|
+
),
|
|
12309
|
+
picker && items.length > 0 && /* @__PURE__ */ jsxs("div", { className: "absolute bottom-full left-2 z-10 mb-1 w-72 overflow-hidden rounded-md border border-zinc-200 bg-white shadow-lg dark:border-zinc-700 dark:bg-zinc-900", children: [
|
|
12310
|
+
/* @__PURE__ */ jsxs("div", { className: "border-b border-zinc-100 bg-zinc-50 px-2 py-1 text-[10px] font-semibold uppercase tracking-wider text-zinc-500 dark:border-zinc-800 dark:bg-zinc-950", children: [
|
|
12311
|
+
picker.kind === "cmd" ? "Commands" : "Mention",
|
|
12312
|
+
" \xB7 ",
|
|
12313
|
+
items.length
|
|
12314
|
+
] }),
|
|
12315
|
+
/* @__PURE__ */ jsx("ul", { className: "max-h-56 overflow-y-auto", children: items.map((item, i) => {
|
|
12316
|
+
const active = i === picker.cursor;
|
|
12317
|
+
if (picker.kind === "cmd") {
|
|
12318
|
+
const c = item;
|
|
12319
|
+
return /* @__PURE__ */ jsxs(
|
|
12320
|
+
"li",
|
|
12321
|
+
{
|
|
12322
|
+
onMouseDown: (e) => {
|
|
12323
|
+
e.preventDefault();
|
|
12324
|
+
insertChoice(i);
|
|
12325
|
+
},
|
|
12326
|
+
onMouseEnter: () => setPicker((p) => p ? { ...p, cursor: i } : p),
|
|
12327
|
+
className: `cursor-pointer px-2 py-1.5 text-[12px] ${active ? "bg-violet-100 dark:bg-violet-900/30" : "hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,
|
|
12328
|
+
children: [
|
|
12329
|
+
/* @__PURE__ */ jsx("div", { className: "font-mono font-medium text-violet-700 dark:text-violet-300", children: c.name }),
|
|
12330
|
+
/* @__PURE__ */ jsx("div", { className: "text-[11px] text-zinc-500", children: c.hint })
|
|
12331
|
+
]
|
|
12332
|
+
},
|
|
12333
|
+
c.name
|
|
12334
|
+
);
|
|
12335
|
+
}
|
|
12336
|
+
const m = item;
|
|
12337
|
+
return /* @__PURE__ */ jsxs(
|
|
12338
|
+
"li",
|
|
12339
|
+
{
|
|
12340
|
+
onMouseDown: (e) => {
|
|
12341
|
+
e.preventDefault();
|
|
12342
|
+
insertChoice(i);
|
|
12343
|
+
},
|
|
12344
|
+
onMouseEnter: () => setPicker((p) => p ? { ...p, cursor: i } : p),
|
|
12345
|
+
className: `flex cursor-pointer items-center gap-2 px-2 py-1.5 text-[12px] ${active ? "bg-violet-100 dark:bg-violet-900/30" : "hover:bg-zinc-50 dark:hover:bg-zinc-800"}`,
|
|
12346
|
+
children: [
|
|
12347
|
+
/* @__PURE__ */ jsx(
|
|
12348
|
+
"span",
|
|
12349
|
+
{
|
|
12350
|
+
className: "h-2 w-2 rounded-full",
|
|
12351
|
+
style: { backgroundColor: colors[m.kind] ?? "#71717a" }
|
|
12352
|
+
}
|
|
12353
|
+
),
|
|
12354
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: m.name }),
|
|
12355
|
+
/* @__PURE__ */ jsx("span", { className: "ml-auto text-[10px] uppercase tracking-wider text-zinc-400", children: m.kind })
|
|
12356
|
+
]
|
|
12357
|
+
},
|
|
12358
|
+
m.id
|
|
12359
|
+
);
|
|
12360
|
+
}) })
|
|
12361
|
+
] })
|
|
12362
|
+
] }),
|
|
12363
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 border-t border-zinc-200 bg-zinc-50/60 px-3 py-2 dark:border-zinc-800 dark:bg-zinc-900/40", children: [
|
|
12364
|
+
/* @__PURE__ */ jsx(Tooltip, { content: "Drop files here, or click", children: /* @__PURE__ */ jsx(
|
|
12365
|
+
Action,
|
|
12366
|
+
{
|
|
12367
|
+
variant: "ghost",
|
|
12368
|
+
size: "sm",
|
|
12369
|
+
onClick: () => {
|
|
12370
|
+
},
|
|
12371
|
+
children: "\u{1F4CE} attach"
|
|
12372
|
+
}
|
|
12373
|
+
) }),
|
|
12374
|
+
/* @__PURE__ */ jsxs("div", { className: "ml-2 flex items-center gap-1.5", children: [
|
|
12375
|
+
/* @__PURE__ */ jsx("div", { className: "h-1.5 w-24 overflow-hidden rounded-full bg-zinc-200 dark:bg-zinc-700", children: /* @__PURE__ */ jsx(
|
|
12376
|
+
"div",
|
|
12377
|
+
{
|
|
12378
|
+
className: "h-full rounded-full transition-all",
|
|
12379
|
+
style: { width: `${ratio * 100}%`, backgroundColor: meterColor }
|
|
12380
|
+
}
|
|
12381
|
+
) }),
|
|
12382
|
+
/* @__PURE__ */ jsxs("span", { className: "font-mono text-[11px]", style: { color: meterColor }, children: [
|
|
12383
|
+
fmtTokens(tokens),
|
|
12384
|
+
" / ",
|
|
12385
|
+
fmtTokens(budgetTokens)
|
|
12386
|
+
] })
|
|
12387
|
+
] }),
|
|
12388
|
+
/* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-2", children: [
|
|
12389
|
+
showHint && /* @__PURE__ */ jsxs("span", { className: "hidden text-[10px] text-zinc-500 sm:inline", children: [
|
|
12390
|
+
/* @__PURE__ */ jsx("kbd", { className: "rounded border border-zinc-300 bg-zinc-50 px-1 py-0.5 font-mono text-[9px] text-zinc-700 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300", children: "\u2318" }),
|
|
12391
|
+
" ",
|
|
12392
|
+
"+",
|
|
12393
|
+
" ",
|
|
12394
|
+
/* @__PURE__ */ jsx("kbd", { className: "rounded border border-zinc-300 bg-zinc-50 px-1 py-0.5 font-mono text-[9px] text-zinc-700 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300", children: "Enter" }),
|
|
12395
|
+
" ",
|
|
12396
|
+
"to send"
|
|
12397
|
+
] }),
|
|
12398
|
+
/* @__PURE__ */ jsx(Action, { color: "violet", size: "sm", onClick: submit, children: "send \u2192" })
|
|
12399
|
+
] })
|
|
12400
|
+
] })
|
|
12401
|
+
]
|
|
12402
|
+
}
|
|
12403
|
+
);
|
|
12404
|
+
}
|
|
12405
|
+
function fmtTokens(n) {
|
|
12406
|
+
if (n < 1e3) return `${n}`;
|
|
12407
|
+
return `${(n / 1e3).toFixed(1)}k`;
|
|
12408
|
+
}
|
|
12409
|
+
function fmtSize(b) {
|
|
12410
|
+
if (b < 1024) return `${b} B`;
|
|
12411
|
+
if (b < 1024 * 1024) return `${(b / 1024).toFixed(0)} KB`;
|
|
12412
|
+
return `${(b / 1024 / 1024).toFixed(1)} MB`;
|
|
12413
|
+
}
|
|
12414
|
+
function MagicWand({
|
|
12415
|
+
value,
|
|
12416
|
+
onValueChange,
|
|
12417
|
+
actions,
|
|
12418
|
+
appearance = "floating",
|
|
12419
|
+
autoHide = true,
|
|
12420
|
+
rows = 6,
|
|
12421
|
+
placeholder,
|
|
12422
|
+
onAction
|
|
12423
|
+
}) {
|
|
12424
|
+
const taRef = useRef(null);
|
|
12425
|
+
const wandRef = useRef(null);
|
|
12426
|
+
const [sel, setSel] = useState(null);
|
|
12427
|
+
const [pos, setPos] = useState(null);
|
|
12428
|
+
const [busy, setBusy] = useState(null);
|
|
12429
|
+
const measureSelection = useCallback(() => {
|
|
12430
|
+
const ta = taRef.current;
|
|
12431
|
+
if (!ta) return;
|
|
12432
|
+
const start = ta.selectionStart ?? 0;
|
|
12433
|
+
const end = ta.selectionEnd ?? 0;
|
|
12434
|
+
if (start === end) {
|
|
12435
|
+
setSel(null);
|
|
12436
|
+
setPos(null);
|
|
12437
|
+
return;
|
|
12438
|
+
}
|
|
12439
|
+
const text = ta.value.slice(start, end);
|
|
12440
|
+
setSel({ start, end, text });
|
|
12441
|
+
const rect = caretRect(ta, start, end);
|
|
12442
|
+
if (rect) setPos({ x: rect.x, y: rect.y });
|
|
12443
|
+
}, []);
|
|
12444
|
+
useEffect(() => {
|
|
12445
|
+
if (!autoHide) return;
|
|
12446
|
+
const onScroll = () => {
|
|
12447
|
+
setSel(null);
|
|
12448
|
+
setPos(null);
|
|
12449
|
+
};
|
|
12450
|
+
window.addEventListener("scroll", onScroll, true);
|
|
12451
|
+
return () => window.removeEventListener("scroll", onScroll, true);
|
|
12452
|
+
}, [autoHide]);
|
|
12453
|
+
useEffect(() => {
|
|
12454
|
+
if (!autoHide) return;
|
|
12455
|
+
const onDocMouseDown = (e) => {
|
|
12456
|
+
if (wandRef.current?.contains(e.target)) return;
|
|
12457
|
+
if (taRef.current?.contains(e.target)) return;
|
|
12458
|
+
setSel(null);
|
|
12459
|
+
setPos(null);
|
|
12460
|
+
};
|
|
12461
|
+
document.addEventListener("mousedown", onDocMouseDown);
|
|
12462
|
+
return () => document.removeEventListener("mousedown", onDocMouseDown);
|
|
12463
|
+
}, [autoHide]);
|
|
12464
|
+
const handleAction = async (action) => {
|
|
12465
|
+
if (!sel) return;
|
|
12466
|
+
setBusy(action.id);
|
|
12467
|
+
try {
|
|
12468
|
+
const replacement = await action.run(sel.text, sel);
|
|
12469
|
+
const next = value.slice(0, sel.start) + replacement + value.slice(sel.end);
|
|
12470
|
+
onValueChange(next);
|
|
12471
|
+
onAction?.(action, sel, replacement);
|
|
12472
|
+
} finally {
|
|
12473
|
+
setBusy(null);
|
|
12474
|
+
setSel(null);
|
|
12475
|
+
setPos(null);
|
|
12476
|
+
}
|
|
12477
|
+
};
|
|
12478
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
12479
|
+
/* @__PURE__ */ jsx(
|
|
12480
|
+
Textarea,
|
|
12481
|
+
{
|
|
12482
|
+
ref: taRef,
|
|
12483
|
+
value,
|
|
12484
|
+
onValueChange,
|
|
12485
|
+
onSelect: measureSelection,
|
|
12486
|
+
onKeyUp: measureSelection,
|
|
12487
|
+
onMouseUp: measureSelection,
|
|
12488
|
+
rows,
|
|
12489
|
+
placeholder
|
|
12490
|
+
}
|
|
12491
|
+
),
|
|
12492
|
+
sel && pos && /* @__PURE__ */ jsx(
|
|
12493
|
+
Wand,
|
|
12494
|
+
{
|
|
12495
|
+
ref: wandRef,
|
|
12496
|
+
pos,
|
|
12497
|
+
actions,
|
|
12498
|
+
appearance,
|
|
12499
|
+
busy,
|
|
12500
|
+
onAction: handleAction,
|
|
12501
|
+
selectionLength: sel.text.length
|
|
12502
|
+
}
|
|
12503
|
+
)
|
|
12504
|
+
] });
|
|
12505
|
+
}
|
|
12506
|
+
function Wand({
|
|
12507
|
+
ref,
|
|
12508
|
+
pos,
|
|
12509
|
+
actions,
|
|
12510
|
+
appearance,
|
|
12511
|
+
busy,
|
|
12512
|
+
onAction,
|
|
12513
|
+
selectionLength
|
|
12514
|
+
}) {
|
|
12515
|
+
return /* @__PURE__ */ jsxs(
|
|
12516
|
+
"div",
|
|
12517
|
+
{
|
|
12518
|
+
ref,
|
|
12519
|
+
className: "absolute z-20 -translate-x-1/2 -translate-y-full",
|
|
12520
|
+
style: { left: pos.x, top: pos.y - 6 },
|
|
12521
|
+
children: [
|
|
12522
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 rounded-full border border-violet-300 bg-white px-1.5 py-1 shadow-lg ring-1 ring-violet-200 dark:border-violet-700 dark:bg-zinc-900 dark:ring-violet-900", children: [
|
|
12523
|
+
/* @__PURE__ */ jsxs("span", { className: "ml-1 mr-0.5 inline-flex items-center gap-1 text-[10px] font-medium text-violet-700 dark:text-violet-300", children: [
|
|
12524
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "\u2726" }),
|
|
12525
|
+
appearance === "floating" && /* @__PURE__ */ jsxs(Badge, { color: "violet", children: [
|
|
12526
|
+
selectionLength,
|
|
12527
|
+
" chars"
|
|
12528
|
+
] })
|
|
12529
|
+
] }),
|
|
12530
|
+
actions.map((a) => /* @__PURE__ */ jsxs(
|
|
12531
|
+
Action,
|
|
12532
|
+
{
|
|
12533
|
+
size: "sm",
|
|
12534
|
+
variant: "ghost",
|
|
12535
|
+
onClick: () => onAction(a),
|
|
12536
|
+
disabled: busy !== null,
|
|
12537
|
+
title: a.hint,
|
|
12538
|
+
children: [
|
|
12539
|
+
busy === a.id ? "\u2026" : appearance === "pill" ? a.label[0] : a.label,
|
|
12540
|
+
appearance === "floating" && a.tag && /* @__PURE__ */ jsx("span", { className: "ml-1 rounded-full bg-zinc-100 px-1 text-[9px] font-medium text-zinc-500 dark:bg-zinc-800", children: a.tag })
|
|
12541
|
+
]
|
|
12542
|
+
},
|
|
12543
|
+
a.id
|
|
12544
|
+
))
|
|
12545
|
+
] }),
|
|
12546
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-1/2 top-full -translate-x-1/2 -translate-y-px", children: /* @__PURE__ */ jsx("div", { className: "h-2 w-2 rotate-45 border-b border-r border-violet-300 bg-white dark:border-violet-700 dark:bg-zinc-900" }) })
|
|
12547
|
+
]
|
|
12548
|
+
}
|
|
12549
|
+
);
|
|
12550
|
+
}
|
|
12551
|
+
function caretRect(ta, start, end) {
|
|
12552
|
+
const div = document.createElement("div");
|
|
12553
|
+
const style = getComputedStyle(ta);
|
|
12554
|
+
const props = [
|
|
12555
|
+
"boxSizing",
|
|
12556
|
+
"width",
|
|
12557
|
+
"height",
|
|
12558
|
+
"overflowX",
|
|
12559
|
+
"overflowY",
|
|
12560
|
+
"borderTopWidth",
|
|
12561
|
+
"borderRightWidth",
|
|
12562
|
+
"borderBottomWidth",
|
|
12563
|
+
"borderLeftWidth",
|
|
12564
|
+
"paddingTop",
|
|
12565
|
+
"paddingRight",
|
|
12566
|
+
"paddingBottom",
|
|
12567
|
+
"paddingLeft",
|
|
12568
|
+
"fontStyle",
|
|
12569
|
+
"fontVariant",
|
|
12570
|
+
"fontWeight",
|
|
12571
|
+
"fontStretch",
|
|
12572
|
+
"fontSize",
|
|
12573
|
+
"fontSizeAdjust",
|
|
12574
|
+
"lineHeight",
|
|
12575
|
+
"fontFamily",
|
|
12576
|
+
"textAlign",
|
|
12577
|
+
"textTransform",
|
|
12578
|
+
"textIndent",
|
|
12579
|
+
"letterSpacing",
|
|
12580
|
+
"wordSpacing",
|
|
12581
|
+
"tabSize"
|
|
12582
|
+
];
|
|
12583
|
+
for (const p of props) div.style[p] = style[p];
|
|
12584
|
+
div.style.position = "absolute";
|
|
12585
|
+
div.style.top = "-9999px";
|
|
12586
|
+
div.style.left = "-9999px";
|
|
12587
|
+
div.style.whiteSpace = "pre-wrap";
|
|
12588
|
+
div.style.wordWrap = "break-word";
|
|
12589
|
+
const value = ta.value;
|
|
12590
|
+
div.textContent = value.substring(0, start);
|
|
12591
|
+
const startSpan = document.createElement("span");
|
|
12592
|
+
startSpan.textContent = value.substring(start, end) || ".";
|
|
12593
|
+
div.appendChild(startSpan);
|
|
12594
|
+
document.body.appendChild(div);
|
|
12595
|
+
const taRect = ta.getBoundingClientRect();
|
|
12596
|
+
const parentRect = ta.offsetParent?.getBoundingClientRect() ?? taRect;
|
|
12597
|
+
const spanRect = startSpan.getBoundingClientRect();
|
|
12598
|
+
const divRect = div.getBoundingClientRect();
|
|
12599
|
+
const offsetX = spanRect.left - divRect.left;
|
|
12600
|
+
const offsetY = spanRect.top - divRect.top;
|
|
12601
|
+
document.body.removeChild(div);
|
|
12602
|
+
const x = taRect.left - parentRect.left + offsetX + spanRect.width / 2;
|
|
12603
|
+
const y = taRect.top - parentRect.top + offsetY - ta.scrollTop;
|
|
12604
|
+
return { x, y };
|
|
12605
|
+
}
|
|
11822
12606
|
|
|
11823
|
-
export { Accordion, AccordionPanel, AccordionPanelContent, AccordionPanelSection, AccordionPanelTrigger, Action, Autocomplete, Avatar, Badge, Brand, Breadcrumbs, Calendar, Callout, Card, Carousel, Chart, Checkbox, CheckboxGroup, ColorPicker, Command, Composer, ContentRenderer, ContextMenu, DatePicker, Dropdown, EMOJI_CATEGORY_ORDER, EMOJI_DATA, EMOJI_ENTRIES, Editor, Emoji, EmojiSelect, Field, FileUpload, Heading, Icon, Input, Kanban, Menu2 as Menu, MobileMenu, Modal, MultiSwitch, Navbar, OtpInput, Pagination, Pillbox, Popover, Portal, Profile, Progress, RadioGroup, SKIN_TONES, Select, Separator, Sidebar, Skeleton, Slider, Switch, Table, Tabs, Text, Textarea, TimePicker, Timeline, Toast, Tooltip, TreeNav, applyTone, cn, configureIcons, find, hasSkinTones, registerExtension, registerExtensions, registerIconSet, registerIcons, resolve, sanitizeHref, sanitizeHtml, search, skinTones, useAccordion, useAccordionPanel, useAccordionSection, useAnimation, useCarousel, useCommand, useContextMenu, useControllableState, useDropdown, useEditor, useEscapeKey, useFileUpload, useFloatingPosition, useFocusTrap, useId12 as useId, useKanban, useMenu, useMobileMenu, useModal, useNavbar, useNodeRegistry, useOutsideClick, usePanZoom, usePopover, useSidebar, useTabs, useToast, useTreeNav };
|
|
12607
|
+
export { Accordion, AccordionPanel, AccordionPanelContent, AccordionPanelSection, AccordionPanelTrigger, Action, Autocomplete, Avatar, Badge, Brand, Breadcrumbs, Calendar, Callout, Card, Carousel, Chart, Checkbox, CheckboxGroup, ColorPicker, Command, Composer, ContentRenderer, ContextMenu, DatePicker, Dropdown, EMOJI_CATEGORY_ORDER, EMOJI_DATA, EMOJI_ENTRIES, Editor, Emoji, EmojiSelect, Field, FileUpload, Heading, Icon, Input, Kanban, MagicWand, Menu2 as Menu, MobileMenu, Modal, MoodMeter, MultiSwitch, Navbar, OtpInput, Pagination, Pillbox, Popover, Portal, Profile, Progress, PromptInput, RadioGroup, ReasonTag, SKIN_TONES, Select, Separator, Sidebar, Skeleton, Slider, Switch, Table, Tabs, Text, Textarea, TimePicker, Timeline, Toast, Tooltip, TreeNav, applyTone, cn, configureIcons, find, hasSkinTones, registerExtension, registerExtensions, registerIconSet, registerIcons, resolve, sanitizeHref, sanitizeHtml, search, skinTones, useAccordion, useAccordionPanel, useAccordionSection, useAnimation, useCarousel, useCommand, useContextMenu, useControllableState, useDropdown, useEditor, useEscapeKey, useFileUpload, useFloatingPosition, useFocusTrap, useId12 as useId, useKanban, useMenu, useMobileMenu, useModal, useNavbar, useNodeRegistry, useOutsideClick, usePanZoom, usePopover, useSidebar, useTabs, useToast, useTreeNav };
|
|
11824
12608
|
//# sourceMappingURL=index.js.map
|
|
11825
12609
|
//# sourceMappingURL=index.js.map
|