@athenaintel/react 0.6.6 → 0.7.1
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/index.cjs +716 -131
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +127 -0
- package/dist/index.js +717 -132
- package/dist/index.js.map +1 -1
- package/dist/styles.css +11 -0
- package/package.json +9 -10
package/dist/index.cjs
CHANGED
|
@@ -24491,6 +24491,70 @@ const themes = {
|
|
|
24491
24491
|
radius: "0.625rem"
|
|
24492
24492
|
}
|
|
24493
24493
|
};
|
|
24494
|
+
const QuoteCtx = React.createContext(null);
|
|
24495
|
+
function QuoteProvider({ children }) {
|
|
24496
|
+
const [quote, setQuote] = React.useState(null);
|
|
24497
|
+
const clearQuote = React.useCallback(() => setQuote(null), []);
|
|
24498
|
+
const value = React.useMemo(() => ({ quote, setQuote, clearQuote }), [quote, setQuote, clearQuote]);
|
|
24499
|
+
return /* @__PURE__ */ jsxRuntime.jsx(QuoteCtx.Provider, { value, children });
|
|
24500
|
+
}
|
|
24501
|
+
function useQuote() {
|
|
24502
|
+
const ctx = React.useContext(QuoteCtx);
|
|
24503
|
+
if (!ctx) {
|
|
24504
|
+
throw new Error("[AthenaSDK] useQuote must be used within <QuoteProvider>");
|
|
24505
|
+
}
|
|
24506
|
+
return ctx;
|
|
24507
|
+
}
|
|
24508
|
+
function useQuoteFromPostMessage() {
|
|
24509
|
+
const { setQuote } = useQuote();
|
|
24510
|
+
React.useEffect(() => {
|
|
24511
|
+
const handleKeydown = (e) => {
|
|
24512
|
+
var _a2;
|
|
24513
|
+
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "l") {
|
|
24514
|
+
const sel = window.getSelection();
|
|
24515
|
+
const selection = (_a2 = sel == null ? void 0 : sel.toString()) == null ? void 0 : _a2.trim();
|
|
24516
|
+
if (selection && selection.length > 0) {
|
|
24517
|
+
e.preventDefault();
|
|
24518
|
+
let messageId;
|
|
24519
|
+
let role;
|
|
24520
|
+
let node = sel == null ? void 0 : sel.anchorNode;
|
|
24521
|
+
while (node && node !== document.body) {
|
|
24522
|
+
if (node instanceof HTMLElement) {
|
|
24523
|
+
const dataRole = node.getAttribute("data-role");
|
|
24524
|
+
if (dataRole === "assistant" || dataRole === "user") {
|
|
24525
|
+
role = dataRole;
|
|
24526
|
+
messageId = node.getAttribute("data-message-id") ?? void 0;
|
|
24527
|
+
break;
|
|
24528
|
+
}
|
|
24529
|
+
}
|
|
24530
|
+
node = node.parentElement;
|
|
24531
|
+
}
|
|
24532
|
+
setQuote({ text: selection, sourceRole: role, sourceMessageId: messageId });
|
|
24533
|
+
}
|
|
24534
|
+
}
|
|
24535
|
+
};
|
|
24536
|
+
const handleMessage = (event) => {
|
|
24537
|
+
const data = event.data;
|
|
24538
|
+
if (data && typeof data === "object" && data.type === "athena-add-to-composer" && typeof data.text === "string" && data.text.trim().length > 0) {
|
|
24539
|
+
setQuote({
|
|
24540
|
+
text: data.text,
|
|
24541
|
+
sourceTitle: data.sourceTitle,
|
|
24542
|
+
sourceAssetId: data.sourceAssetId
|
|
24543
|
+
});
|
|
24544
|
+
}
|
|
24545
|
+
};
|
|
24546
|
+
document.addEventListener("keydown", handleKeydown, true);
|
|
24547
|
+
window.addEventListener("message", handleMessage);
|
|
24548
|
+
return () => {
|
|
24549
|
+
document.removeEventListener("keydown", handleKeydown, true);
|
|
24550
|
+
window.removeEventListener("message", handleMessage);
|
|
24551
|
+
};
|
|
24552
|
+
}, [setQuote]);
|
|
24553
|
+
}
|
|
24554
|
+
function QuotePostMessageBridge() {
|
|
24555
|
+
useQuoteFromPostMessage();
|
|
24556
|
+
return null;
|
|
24557
|
+
}
|
|
24494
24558
|
function AthenaStandalone({
|
|
24495
24559
|
children,
|
|
24496
24560
|
apiUrl,
|
|
@@ -24527,7 +24591,10 @@ function AthenaStandalone({
|
|
|
24527
24591
|
() => ({ backendUrl, apiKey, token }),
|
|
24528
24592
|
[backendUrl, apiKey, token]
|
|
24529
24593
|
);
|
|
24530
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AssistantRuntimeProvider, { aui, runtime, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaContext.Provider, { value: athenaConfig, children: /* @__PURE__ */ jsxRuntime.
|
|
24594
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AssistantRuntimeProvider, { aui, runtime, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaContext.Provider, { value: athenaConfig, children: /* @__PURE__ */ jsxRuntime.jsxs(QuoteProvider, { children: [
|
|
24595
|
+
/* @__PURE__ */ jsxRuntime.jsx(QuotePostMessageBridge, {}),
|
|
24596
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children })
|
|
24597
|
+
] }) }) });
|
|
24531
24598
|
}
|
|
24532
24599
|
function useAthenaRuntimeHook(config2) {
|
|
24533
24600
|
const remoteId = useAthenaThreadId();
|
|
@@ -24606,7 +24673,10 @@ function AthenaWithThreadList({
|
|
|
24606
24673
|
() => ({ backendUrl, apiKey, token }),
|
|
24607
24674
|
[backendUrl, apiKey, token]
|
|
24608
24675
|
);
|
|
24609
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AssistantRuntimeProvider, { aui, runtime, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaContext.Provider, { value: athenaConfig, children: /* @__PURE__ */ jsxRuntime.
|
|
24676
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AssistantRuntimeProvider, { aui, runtime, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaContext.Provider, { value: athenaConfig, children: /* @__PURE__ */ jsxRuntime.jsxs(QuoteProvider, { children: [
|
|
24677
|
+
/* @__PURE__ */ jsxRuntime.jsx(QuotePostMessageBridge, {}),
|
|
24678
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children })
|
|
24679
|
+
] }) }) });
|
|
24610
24680
|
}
|
|
24611
24681
|
function AthenaProvider({
|
|
24612
24682
|
children,
|
|
@@ -58382,6 +58452,18 @@ const TiptapText = ({ text: text2 }) => {
|
|
|
58382
58452
|
return /* @__PURE__ */ jsxRuntime.jsx(EditorContent, { editor });
|
|
58383
58453
|
};
|
|
58384
58454
|
var index_default$1 = Placeholder;
|
|
58455
|
+
const EditorCtx = React.createContext(null);
|
|
58456
|
+
function ComposerEditorProvider({ children }) {
|
|
58457
|
+
const ref = React.useRef(null);
|
|
58458
|
+
return /* @__PURE__ */ jsxRuntime.jsx(EditorCtx.Provider, { value: ref, children });
|
|
58459
|
+
}
|
|
58460
|
+
function useComposerEditorRef() {
|
|
58461
|
+
const ctx = React.useContext(EditorCtx);
|
|
58462
|
+
if (!ctx) {
|
|
58463
|
+
throw new Error("[AthenaSDK] useComposerEditorRef must be used within <ComposerEditorProvider>");
|
|
58464
|
+
}
|
|
58465
|
+
return ctx;
|
|
58466
|
+
}
|
|
58385
58467
|
const isMentionPopupActive = (editor) => {
|
|
58386
58468
|
var _a2, _b;
|
|
58387
58469
|
return Boolean(
|
|
@@ -58415,8 +58497,6 @@ const ComposerKeybinds = Extension.create({
|
|
|
58415
58497
|
if (editor.isActive("bulletList") || editor.isActive("orderedList")) {
|
|
58416
58498
|
return false;
|
|
58417
58499
|
}
|
|
58418
|
-
const hasContent = editor.getText().trim().length > 0;
|
|
58419
|
-
if (!hasContent) return false;
|
|
58420
58500
|
this.options.onSubmit();
|
|
58421
58501
|
return true;
|
|
58422
58502
|
},
|
|
@@ -60419,19 +60499,95 @@ function useMentionSuggestions(tools) {
|
|
|
60419
60499
|
}, [tools, store]);
|
|
60420
60500
|
return store;
|
|
60421
60501
|
}
|
|
60502
|
+
const AttachmentCtx = React.createContext(null);
|
|
60503
|
+
function AttachmentProvider({ children }) {
|
|
60504
|
+
const [attachments, setAttachments] = React.useState([]);
|
|
60505
|
+
const [isUploading, setIsUploading] = React.useState(false);
|
|
60506
|
+
const addAttachments = React.useCallback((assets) => {
|
|
60507
|
+
setAttachments((prev) => [...prev, ...assets]);
|
|
60508
|
+
}, []);
|
|
60509
|
+
const removeAttachment = React.useCallback((id) => {
|
|
60510
|
+
setAttachments((prev) => prev.filter((a) => a.id !== id));
|
|
60511
|
+
}, []);
|
|
60512
|
+
const clearAttachments = React.useCallback(() => setAttachments([]), []);
|
|
60513
|
+
const value = React.useMemo(
|
|
60514
|
+
() => ({ attachments, addAttachments, removeAttachment, clearAttachments, isUploading, setIsUploading }),
|
|
60515
|
+
[attachments, addAttachments, removeAttachment, clearAttachments, isUploading]
|
|
60516
|
+
);
|
|
60517
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AttachmentCtx.Provider, { value, children });
|
|
60518
|
+
}
|
|
60519
|
+
function useAttachments() {
|
|
60520
|
+
const ctx = React.useContext(AttachmentCtx);
|
|
60521
|
+
if (!ctx) {
|
|
60522
|
+
throw new Error("[AthenaSDK] useAttachments must be used within <AttachmentProvider>");
|
|
60523
|
+
}
|
|
60524
|
+
return ctx;
|
|
60525
|
+
}
|
|
60526
|
+
function buildAttachmentMarkdown(attachments) {
|
|
60527
|
+
if (attachments.length === 0) return "";
|
|
60528
|
+
return attachments.map((a) => `[@${a.title}](https://app.athenaintel.com/dashboard/spaces?asset_id=${a.id})`).join("\n");
|
|
60529
|
+
}
|
|
60530
|
+
function buildComposedMessage(opts) {
|
|
60531
|
+
var _a2;
|
|
60532
|
+
const parts = [];
|
|
60533
|
+
if (opts.attachments && opts.attachments.length > 0) {
|
|
60534
|
+
const attachmentMd = buildAttachmentMarkdown(opts.attachments);
|
|
60535
|
+
if (attachmentMd) parts.push(attachmentMd);
|
|
60536
|
+
}
|
|
60537
|
+
if (opts.quote) {
|
|
60538
|
+
const quotedLines = opts.quote.text.split("\n").map((l) => `> ${l}`).join("\n");
|
|
60539
|
+
const sourceLabel = opts.quote.sourceTitle ? `From "${opts.quote.sourceTitle}"` : opts.quote.sourceRole === "assistant" ? "Quoting assistant" : "Quoting";
|
|
60540
|
+
parts.push(`${sourceLabel}:
|
|
60541
|
+
${quotedLines}`);
|
|
60542
|
+
}
|
|
60543
|
+
const trimmed = (_a2 = opts.userText) == null ? void 0 : _a2.trim();
|
|
60544
|
+
if (trimmed) parts.push(trimmed);
|
|
60545
|
+
return parts.join("\n\n");
|
|
60546
|
+
}
|
|
60422
60547
|
const TiptapComposer = ({ tools = [] }) => {
|
|
60548
|
+
const aui = useAui();
|
|
60423
60549
|
const composerRuntime = useComposerRuntime();
|
|
60424
60550
|
const editorRef = React.useRef(null);
|
|
60551
|
+
const composerEditorRef = useComposerEditorRef();
|
|
60425
60552
|
const mentionStore = useMentionSuggestions(tools);
|
|
60553
|
+
const { attachments, clearAttachments, isUploading } = useAttachments();
|
|
60554
|
+
const { quote, clearQuote } = useQuote();
|
|
60555
|
+
const attachmentsRef = React.useRef(attachments);
|
|
60556
|
+
attachmentsRef.current = attachments;
|
|
60557
|
+
const quoteRef = React.useRef(quote);
|
|
60558
|
+
quoteRef.current = quote;
|
|
60559
|
+
const isUploadingRef = React.useRef(isUploading);
|
|
60560
|
+
isUploadingRef.current = isUploading;
|
|
60426
60561
|
const handleSubmit = React.useCallback(() => {
|
|
60427
60562
|
var _a2;
|
|
60563
|
+
if (isUploadingRef.current) return;
|
|
60428
60564
|
const editor2 = editorRef.current;
|
|
60429
|
-
if (!editor2
|
|
60565
|
+
if (!editor2) return;
|
|
60566
|
+
const currentAttachments = attachmentsRef.current;
|
|
60567
|
+
const currentQuote = quoteRef.current;
|
|
60568
|
+
const hasExtras = currentAttachments.length > 0 || !!currentQuote;
|
|
60569
|
+
if (editor2.isEmpty && !hasExtras) return;
|
|
60430
60570
|
const markdown = ((_a2 = editor2.storage.markdown) == null ? void 0 : _a2.getMarkdown()) ?? editor2.getText();
|
|
60431
|
-
|
|
60432
|
-
|
|
60571
|
+
if (hasExtras) {
|
|
60572
|
+
const fullMessage = buildComposedMessage({
|
|
60573
|
+
attachments: currentAttachments,
|
|
60574
|
+
quote: currentQuote,
|
|
60575
|
+
userText: markdown
|
|
60576
|
+
});
|
|
60577
|
+
if (fullMessage) {
|
|
60578
|
+
aui.thread().append({
|
|
60579
|
+
role: "user",
|
|
60580
|
+
content: [{ type: "text", text: fullMessage }]
|
|
60581
|
+
});
|
|
60582
|
+
}
|
|
60583
|
+
clearAttachments();
|
|
60584
|
+
clearQuote();
|
|
60585
|
+
} else {
|
|
60586
|
+
composerRuntime.setText(markdown);
|
|
60587
|
+
composerRuntime.send();
|
|
60588
|
+
}
|
|
60433
60589
|
editor2.commands.clearContent();
|
|
60434
|
-
}, [composerRuntime]);
|
|
60590
|
+
}, [aui, composerRuntime, clearAttachments, clearQuote]);
|
|
60435
60591
|
const editor = useEditor({
|
|
60436
60592
|
immediatelyRender: true,
|
|
60437
60593
|
extensions: [
|
|
@@ -60474,7 +60630,18 @@ const TiptapComposer = ({ tools = [] }) => {
|
|
|
60474
60630
|
});
|
|
60475
60631
|
React.useEffect(() => {
|
|
60476
60632
|
editorRef.current = editor;
|
|
60477
|
-
|
|
60633
|
+
composerEditorRef.current = editor ? {
|
|
60634
|
+
getMarkdown: () => {
|
|
60635
|
+
var _a2;
|
|
60636
|
+
return ((_a2 = editor.storage.markdown) == null ? void 0 : _a2.getMarkdown()) ?? editor.getText();
|
|
60637
|
+
},
|
|
60638
|
+
clear: () => editor.commands.clearContent(),
|
|
60639
|
+
isEmpty: () => editor.isEmpty,
|
|
60640
|
+
insertText: (text2) => {
|
|
60641
|
+
editor.chain().focus().insertContentAt(editor.state.doc.content.size, text2).run();
|
|
60642
|
+
}
|
|
60643
|
+
} : null;
|
|
60644
|
+
}, [editor, composerEditorRef]);
|
|
60478
60645
|
return /* @__PURE__ */ jsxRuntime.jsx(EditorContent, { editor });
|
|
60479
60646
|
};
|
|
60480
60647
|
/**
|
|
@@ -60607,40 +60774,40 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
60607
60774
|
* This source code is licensed under the ISC license.
|
|
60608
60775
|
* See the LICENSE file in the root directory of this source tree.
|
|
60609
60776
|
*/
|
|
60610
|
-
const __iconNode$
|
|
60777
|
+
const __iconNode$L = [
|
|
60611
60778
|
["path", { d: "M12 5v14", key: "s699le" }],
|
|
60612
60779
|
["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
|
|
60613
60780
|
];
|
|
60614
|
-
const ArrowDown = createLucideIcon("arrow-down", __iconNode$
|
|
60781
|
+
const ArrowDown = createLucideIcon("arrow-down", __iconNode$L);
|
|
60615
60782
|
/**
|
|
60616
60783
|
* @license lucide-react v0.575.0 - ISC
|
|
60617
60784
|
*
|
|
60618
60785
|
* This source code is licensed under the ISC license.
|
|
60619
60786
|
* See the LICENSE file in the root directory of this source tree.
|
|
60620
60787
|
*/
|
|
60621
|
-
const __iconNode$
|
|
60788
|
+
const __iconNode$K = [
|
|
60622
60789
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
60623
60790
|
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
60624
60791
|
];
|
|
60625
|
-
const ArrowRight = createLucideIcon("arrow-right", __iconNode$
|
|
60792
|
+
const ArrowRight = createLucideIcon("arrow-right", __iconNode$K);
|
|
60626
60793
|
/**
|
|
60627
60794
|
* @license lucide-react v0.575.0 - ISC
|
|
60628
60795
|
*
|
|
60629
60796
|
* This source code is licensed under the ISC license.
|
|
60630
60797
|
* See the LICENSE file in the root directory of this source tree.
|
|
60631
60798
|
*/
|
|
60632
|
-
const __iconNode$
|
|
60799
|
+
const __iconNode$J = [
|
|
60633
60800
|
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
60634
60801
|
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
60635
60802
|
];
|
|
60636
|
-
const ArrowUp = createLucideIcon("arrow-up", __iconNode$
|
|
60803
|
+
const ArrowUp = createLucideIcon("arrow-up", __iconNode$J);
|
|
60637
60804
|
/**
|
|
60638
60805
|
* @license lucide-react v0.575.0 - ISC
|
|
60639
60806
|
*
|
|
60640
60807
|
* This source code is licensed under the ISC license.
|
|
60641
60808
|
* See the LICENSE file in the root directory of this source tree.
|
|
60642
60809
|
*/
|
|
60643
|
-
const __iconNode$
|
|
60810
|
+
const __iconNode$I = [
|
|
60644
60811
|
["path", { d: "M12 7v14", key: "1akyts" }],
|
|
60645
60812
|
[
|
|
60646
60813
|
"path",
|
|
@@ -60650,14 +60817,14 @@ const __iconNode$G = [
|
|
|
60650
60817
|
}
|
|
60651
60818
|
]
|
|
60652
60819
|
];
|
|
60653
|
-
const BookOpen = createLucideIcon("book-open", __iconNode$
|
|
60820
|
+
const BookOpen = createLucideIcon("book-open", __iconNode$I);
|
|
60654
60821
|
/**
|
|
60655
60822
|
* @license lucide-react v0.575.0 - ISC
|
|
60656
60823
|
*
|
|
60657
60824
|
* This source code is licensed under the ISC license.
|
|
60658
60825
|
* See the LICENSE file in the root directory of this source tree.
|
|
60659
60826
|
*/
|
|
60660
|
-
const __iconNode$
|
|
60827
|
+
const __iconNode$H = [
|
|
60661
60828
|
["path", { d: "M12 18V5", key: "adv99a" }],
|
|
60662
60829
|
["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
|
|
60663
60830
|
["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
|
|
@@ -60667,148 +60834,148 @@ const __iconNode$F = [
|
|
|
60667
60834
|
["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
|
|
60668
60835
|
["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
|
|
60669
60836
|
];
|
|
60670
|
-
const Brain = createLucideIcon("brain", __iconNode$
|
|
60837
|
+
const Brain = createLucideIcon("brain", __iconNode$H);
|
|
60671
60838
|
/**
|
|
60672
60839
|
* @license lucide-react v0.575.0 - ISC
|
|
60673
60840
|
*
|
|
60674
60841
|
* This source code is licensed under the ISC license.
|
|
60675
60842
|
* See the LICENSE file in the root directory of this source tree.
|
|
60676
60843
|
*/
|
|
60677
|
-
const __iconNode$
|
|
60844
|
+
const __iconNode$G = [
|
|
60678
60845
|
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
60679
60846
|
["path", { d: "M18 17V9", key: "2bz60n" }],
|
|
60680
60847
|
["path", { d: "M13 17V5", key: "1frdt8" }],
|
|
60681
60848
|
["path", { d: "M8 17v-3", key: "17ska0" }]
|
|
60682
60849
|
];
|
|
60683
|
-
const ChartColumn = createLucideIcon("chart-column", __iconNode$
|
|
60850
|
+
const ChartColumn = createLucideIcon("chart-column", __iconNode$G);
|
|
60684
60851
|
/**
|
|
60685
60852
|
* @license lucide-react v0.575.0 - ISC
|
|
60686
60853
|
*
|
|
60687
60854
|
* This source code is licensed under the ISC license.
|
|
60688
60855
|
* See the LICENSE file in the root directory of this source tree.
|
|
60689
60856
|
*/
|
|
60690
|
-
const __iconNode$
|
|
60691
|
-
const Check = createLucideIcon("check", __iconNode$
|
|
60857
|
+
const __iconNode$F = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
60858
|
+
const Check = createLucideIcon("check", __iconNode$F);
|
|
60692
60859
|
/**
|
|
60693
60860
|
* @license lucide-react v0.575.0 - ISC
|
|
60694
60861
|
*
|
|
60695
60862
|
* This source code is licensed under the ISC license.
|
|
60696
60863
|
* See the LICENSE file in the root directory of this source tree.
|
|
60697
60864
|
*/
|
|
60698
|
-
const __iconNode$
|
|
60699
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$
|
|
60865
|
+
const __iconNode$E = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
60866
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$E);
|
|
60700
60867
|
/**
|
|
60701
60868
|
* @license lucide-react v0.575.0 - ISC
|
|
60702
60869
|
*
|
|
60703
60870
|
* This source code is licensed under the ISC license.
|
|
60704
60871
|
* See the LICENSE file in the root directory of this source tree.
|
|
60705
60872
|
*/
|
|
60706
|
-
const __iconNode$
|
|
60873
|
+
const __iconNode$D = [
|
|
60707
60874
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
60708
60875
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
60709
60876
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
60710
60877
|
];
|
|
60711
|
-
const CircleAlert = createLucideIcon("circle-alert", __iconNode$
|
|
60878
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$D);
|
|
60712
60879
|
/**
|
|
60713
60880
|
* @license lucide-react v0.575.0 - ISC
|
|
60714
60881
|
*
|
|
60715
60882
|
* This source code is licensed under the ISC license.
|
|
60716
60883
|
* See the LICENSE file in the root directory of this source tree.
|
|
60717
60884
|
*/
|
|
60718
|
-
const __iconNode$
|
|
60885
|
+
const __iconNode$C = [
|
|
60719
60886
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
60720
60887
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
60721
60888
|
];
|
|
60722
|
-
const CircleCheck = createLucideIcon("circle-check", __iconNode$
|
|
60889
|
+
const CircleCheck = createLucideIcon("circle-check", __iconNode$C);
|
|
60723
60890
|
/**
|
|
60724
60891
|
* @license lucide-react v0.575.0 - ISC
|
|
60725
60892
|
*
|
|
60726
60893
|
* This source code is licensed under the ISC license.
|
|
60727
60894
|
* See the LICENSE file in the root directory of this source tree.
|
|
60728
60895
|
*/
|
|
60729
|
-
const __iconNode$
|
|
60896
|
+
const __iconNode$B = [
|
|
60730
60897
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
60731
60898
|
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
60732
60899
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
60733
60900
|
];
|
|
60734
|
-
const CircleX = createLucideIcon("circle-x", __iconNode$
|
|
60901
|
+
const CircleX = createLucideIcon("circle-x", __iconNode$B);
|
|
60735
60902
|
/**
|
|
60736
60903
|
* @license lucide-react v0.575.0 - ISC
|
|
60737
60904
|
*
|
|
60738
60905
|
* This source code is licensed under the ISC license.
|
|
60739
60906
|
* See the LICENSE file in the root directory of this source tree.
|
|
60740
60907
|
*/
|
|
60741
|
-
const __iconNode$
|
|
60908
|
+
const __iconNode$A = [
|
|
60742
60909
|
["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
|
|
60743
60910
|
["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
|
|
60744
60911
|
];
|
|
60745
|
-
const Code = createLucideIcon("code", __iconNode$
|
|
60912
|
+
const Code = createLucideIcon("code", __iconNode$A);
|
|
60746
60913
|
/**
|
|
60747
60914
|
* @license lucide-react v0.575.0 - ISC
|
|
60748
60915
|
*
|
|
60749
60916
|
* This source code is licensed under the ISC license.
|
|
60750
60917
|
* See the LICENSE file in the root directory of this source tree.
|
|
60751
60918
|
*/
|
|
60752
|
-
const __iconNode$
|
|
60919
|
+
const __iconNode$z = [
|
|
60753
60920
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
60754
60921
|
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
60755
60922
|
];
|
|
60756
|
-
const Copy = createLucideIcon("copy", __iconNode$
|
|
60923
|
+
const Copy = createLucideIcon("copy", __iconNode$z);
|
|
60757
60924
|
/**
|
|
60758
60925
|
* @license lucide-react v0.575.0 - ISC
|
|
60759
60926
|
*
|
|
60760
60927
|
* This source code is licensed under the ISC license.
|
|
60761
60928
|
* See the LICENSE file in the root directory of this source tree.
|
|
60762
60929
|
*/
|
|
60763
|
-
const __iconNode$
|
|
60930
|
+
const __iconNode$y = [
|
|
60764
60931
|
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
60765
60932
|
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
60766
60933
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
60767
60934
|
];
|
|
60768
|
-
const Database = createLucideIcon("database", __iconNode$
|
|
60935
|
+
const Database = createLucideIcon("database", __iconNode$y);
|
|
60769
60936
|
/**
|
|
60770
60937
|
* @license lucide-react v0.575.0 - ISC
|
|
60771
60938
|
*
|
|
60772
60939
|
* This source code is licensed under the ISC license.
|
|
60773
60940
|
* See the LICENSE file in the root directory of this source tree.
|
|
60774
60941
|
*/
|
|
60775
|
-
const __iconNode$
|
|
60942
|
+
const __iconNode$x = [
|
|
60776
60943
|
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
60777
60944
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
60778
60945
|
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
60779
60946
|
];
|
|
60780
|
-
const Download = createLucideIcon("download", __iconNode$
|
|
60947
|
+
const Download = createLucideIcon("download", __iconNode$x);
|
|
60781
60948
|
/**
|
|
60782
60949
|
* @license lucide-react v0.575.0 - ISC
|
|
60783
60950
|
*
|
|
60784
60951
|
* This source code is licensed under the ISC license.
|
|
60785
60952
|
* See the LICENSE file in the root directory of this source tree.
|
|
60786
60953
|
*/
|
|
60787
|
-
const __iconNode$
|
|
60954
|
+
const __iconNode$w = [
|
|
60788
60955
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
60789
60956
|
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
|
|
60790
60957
|
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
|
|
60791
60958
|
];
|
|
60792
|
-
const Ellipsis = createLucideIcon("ellipsis", __iconNode$
|
|
60959
|
+
const Ellipsis = createLucideIcon("ellipsis", __iconNode$w);
|
|
60793
60960
|
/**
|
|
60794
60961
|
* @license lucide-react v0.575.0 - ISC
|
|
60795
60962
|
*
|
|
60796
60963
|
* This source code is licensed under the ISC license.
|
|
60797
60964
|
* See the LICENSE file in the root directory of this source tree.
|
|
60798
60965
|
*/
|
|
60799
|
-
const __iconNode$
|
|
60966
|
+
const __iconNode$v = [
|
|
60800
60967
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
60801
60968
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
60802
60969
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
60803
60970
|
];
|
|
60804
|
-
const ExternalLink = createLucideIcon("external-link", __iconNode$
|
|
60971
|
+
const ExternalLink = createLucideIcon("external-link", __iconNode$v);
|
|
60805
60972
|
/**
|
|
60806
60973
|
* @license lucide-react v0.575.0 - ISC
|
|
60807
60974
|
*
|
|
60808
60975
|
* This source code is licensed under the ISC license.
|
|
60809
60976
|
* See the LICENSE file in the root directory of this source tree.
|
|
60810
60977
|
*/
|
|
60811
|
-
const __iconNode$
|
|
60978
|
+
const __iconNode$u = [
|
|
60812
60979
|
[
|
|
60813
60980
|
"path",
|
|
60814
60981
|
{
|
|
@@ -60820,14 +60987,14 @@ const __iconNode$s = [
|
|
|
60820
60987
|
["path", { d: "M9 15h6", key: "cctwl0" }],
|
|
60821
60988
|
["path", { d: "M12 18v-6", key: "17g6i2" }]
|
|
60822
60989
|
];
|
|
60823
|
-
const FilePlus = createLucideIcon("file-plus", __iconNode$
|
|
60990
|
+
const FilePlus = createLucideIcon("file-plus", __iconNode$u);
|
|
60824
60991
|
/**
|
|
60825
60992
|
* @license lucide-react v0.575.0 - ISC
|
|
60826
60993
|
*
|
|
60827
60994
|
* This source code is licensed under the ISC license.
|
|
60828
60995
|
* See the LICENSE file in the root directory of this source tree.
|
|
60829
60996
|
*/
|
|
60830
|
-
const __iconNode$
|
|
60997
|
+
const __iconNode$t = [
|
|
60831
60998
|
[
|
|
60832
60999
|
"path",
|
|
60833
61000
|
{
|
|
@@ -60841,14 +61008,14 @@ const __iconNode$r = [
|
|
|
60841
61008
|
["path", { d: "M8 17h2", key: "2yhykz" }],
|
|
60842
61009
|
["path", { d: "M14 17h2", key: "10kma7" }]
|
|
60843
61010
|
];
|
|
60844
|
-
const FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode$
|
|
61011
|
+
const FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode$t);
|
|
60845
61012
|
/**
|
|
60846
61013
|
* @license lucide-react v0.575.0 - ISC
|
|
60847
61014
|
*
|
|
60848
61015
|
* This source code is licensed under the ISC license.
|
|
60849
61016
|
* See the LICENSE file in the root directory of this source tree.
|
|
60850
61017
|
*/
|
|
60851
|
-
const __iconNode$
|
|
61018
|
+
const __iconNode$s = [
|
|
60852
61019
|
[
|
|
60853
61020
|
"path",
|
|
60854
61021
|
{
|
|
@@ -60861,14 +61028,14 @@ const __iconNode$q = [
|
|
|
60861
61028
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
60862
61029
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
60863
61030
|
];
|
|
60864
|
-
const FileText = createLucideIcon("file-text", __iconNode$
|
|
61031
|
+
const FileText = createLucideIcon("file-text", __iconNode$s);
|
|
60865
61032
|
/**
|
|
60866
61033
|
* @license lucide-react v0.575.0 - ISC
|
|
60867
61034
|
*
|
|
60868
61035
|
* This source code is licensed under the ISC license.
|
|
60869
61036
|
* See the LICENSE file in the root directory of this source tree.
|
|
60870
61037
|
*/
|
|
60871
|
-
const __iconNode$
|
|
61038
|
+
const __iconNode$r = [
|
|
60872
61039
|
[
|
|
60873
61040
|
"path",
|
|
60874
61041
|
{
|
|
@@ -60878,14 +61045,14 @@ const __iconNode$p = [
|
|
|
60878
61045
|
],
|
|
60879
61046
|
["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
|
|
60880
61047
|
];
|
|
60881
|
-
const File$1 = createLucideIcon("file", __iconNode$
|
|
61048
|
+
const File$1 = createLucideIcon("file", __iconNode$r);
|
|
60882
61049
|
/**
|
|
60883
61050
|
* @license lucide-react v0.575.0 - ISC
|
|
60884
61051
|
*
|
|
60885
61052
|
* This source code is licensed under the ISC license.
|
|
60886
61053
|
* See the LICENSE file in the root directory of this source tree.
|
|
60887
61054
|
*/
|
|
60888
|
-
const __iconNode$
|
|
61055
|
+
const __iconNode$q = [
|
|
60889
61056
|
[
|
|
60890
61057
|
"path",
|
|
60891
61058
|
{
|
|
@@ -60894,38 +61061,38 @@ const __iconNode$o = [
|
|
|
60894
61061
|
}
|
|
60895
61062
|
]
|
|
60896
61063
|
];
|
|
60897
|
-
const FolderOpen = createLucideIcon("folder-open", __iconNode$
|
|
61064
|
+
const FolderOpen = createLucideIcon("folder-open", __iconNode$q);
|
|
60898
61065
|
/**
|
|
60899
61066
|
* @license lucide-react v0.575.0 - ISC
|
|
60900
61067
|
*
|
|
60901
61068
|
* This source code is licensed under the ISC license.
|
|
60902
61069
|
* See the LICENSE file in the root directory of this source tree.
|
|
60903
61070
|
*/
|
|
60904
|
-
const __iconNode$
|
|
61071
|
+
const __iconNode$p = [
|
|
60905
61072
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
60906
61073
|
["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
|
|
60907
61074
|
["path", { d: "M2 12h20", key: "9i4pu4" }]
|
|
60908
61075
|
];
|
|
60909
|
-
const Globe = createLucideIcon("globe", __iconNode$
|
|
61076
|
+
const Globe = createLucideIcon("globe", __iconNode$p);
|
|
60910
61077
|
/**
|
|
60911
61078
|
* @license lucide-react v0.575.0 - ISC
|
|
60912
61079
|
*
|
|
60913
61080
|
* This source code is licensed under the ISC license.
|
|
60914
61081
|
* See the LICENSE file in the root directory of this source tree.
|
|
60915
61082
|
*/
|
|
60916
|
-
const __iconNode$
|
|
61083
|
+
const __iconNode$o = [
|
|
60917
61084
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
60918
61085
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
60919
61086
|
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
60920
61087
|
];
|
|
60921
|
-
const Image = createLucideIcon("image", __iconNode$
|
|
61088
|
+
const Image = createLucideIcon("image", __iconNode$o);
|
|
60922
61089
|
/**
|
|
60923
61090
|
* @license lucide-react v0.575.0 - ISC
|
|
60924
61091
|
*
|
|
60925
61092
|
* This source code is licensed under the ISC license.
|
|
60926
61093
|
* See the LICENSE file in the root directory of this source tree.
|
|
60927
61094
|
*/
|
|
60928
|
-
const __iconNode$
|
|
61095
|
+
const __iconNode$n = [
|
|
60929
61096
|
[
|
|
60930
61097
|
"path",
|
|
60931
61098
|
{
|
|
@@ -60948,46 +61115,46 @@ const __iconNode$l = [
|
|
|
60948
61115
|
}
|
|
60949
61116
|
]
|
|
60950
61117
|
];
|
|
60951
|
-
const Layers = createLucideIcon("layers", __iconNode$
|
|
61118
|
+
const Layers = createLucideIcon("layers", __iconNode$n);
|
|
60952
61119
|
/**
|
|
60953
61120
|
* @license lucide-react v0.575.0 - ISC
|
|
60954
61121
|
*
|
|
60955
61122
|
* This source code is licensed under the ISC license.
|
|
60956
61123
|
* See the LICENSE file in the root directory of this source tree.
|
|
60957
61124
|
*/
|
|
60958
|
-
const __iconNode$
|
|
61125
|
+
const __iconNode$m = [
|
|
60959
61126
|
["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
|
|
60960
61127
|
["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
|
|
60961
61128
|
["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }],
|
|
60962
61129
|
["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }]
|
|
60963
61130
|
];
|
|
60964
|
-
const LayoutGrid = createLucideIcon("layout-grid", __iconNode$
|
|
61131
|
+
const LayoutGrid = createLucideIcon("layout-grid", __iconNode$m);
|
|
60965
61132
|
/**
|
|
60966
61133
|
* @license lucide-react v0.575.0 - ISC
|
|
60967
61134
|
*
|
|
60968
61135
|
* This source code is licensed under the ISC license.
|
|
60969
61136
|
* See the LICENSE file in the root directory of this source tree.
|
|
60970
61137
|
*/
|
|
60971
|
-
const __iconNode$
|
|
61138
|
+
const __iconNode$l = [
|
|
60972
61139
|
["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
|
|
60973
61140
|
["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
|
|
60974
61141
|
];
|
|
60975
|
-
const Link = createLucideIcon("link", __iconNode$
|
|
61142
|
+
const Link = createLucideIcon("link", __iconNode$l);
|
|
60976
61143
|
/**
|
|
60977
61144
|
* @license lucide-react v0.575.0 - ISC
|
|
60978
61145
|
*
|
|
60979
61146
|
* This source code is licensed under the ISC license.
|
|
60980
61147
|
* See the LICENSE file in the root directory of this source tree.
|
|
60981
61148
|
*/
|
|
60982
|
-
const __iconNode$
|
|
60983
|
-
const LoaderCircle = createLucideIcon("loader-circle", __iconNode$
|
|
61149
|
+
const __iconNode$k = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
|
|
61150
|
+
const LoaderCircle = createLucideIcon("loader-circle", __iconNode$k);
|
|
60984
61151
|
/**
|
|
60985
61152
|
* @license lucide-react v0.575.0 - ISC
|
|
60986
61153
|
*
|
|
60987
61154
|
* This source code is licensed under the ISC license.
|
|
60988
61155
|
* See the LICENSE file in the root directory of this source tree.
|
|
60989
61156
|
*/
|
|
60990
|
-
const __iconNode$
|
|
61157
|
+
const __iconNode$j = [
|
|
60991
61158
|
["path", { d: "M12 2v4", key: "3427ic" }],
|
|
60992
61159
|
["path", { d: "m16.2 7.8 2.9-2.9", key: "r700ao" }],
|
|
60993
61160
|
["path", { d: "M18 12h4", key: "wj9ykh" }],
|
|
@@ -60997,38 +61164,38 @@ const __iconNode$h = [
|
|
|
60997
61164
|
["path", { d: "M2 12h4", key: "j09sii" }],
|
|
60998
61165
|
["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
|
|
60999
61166
|
];
|
|
61000
|
-
const Loader = createLucideIcon("loader", __iconNode$
|
|
61167
|
+
const Loader = createLucideIcon("loader", __iconNode$j);
|
|
61001
61168
|
/**
|
|
61002
61169
|
* @license lucide-react v0.575.0 - ISC
|
|
61003
61170
|
*
|
|
61004
61171
|
* This source code is licensed under the ISC license.
|
|
61005
61172
|
* See the LICENSE file in the root directory of this source tree.
|
|
61006
61173
|
*/
|
|
61007
|
-
const __iconNode$
|
|
61174
|
+
const __iconNode$i = [
|
|
61008
61175
|
["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
|
|
61009
61176
|
["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
|
|
61010
61177
|
];
|
|
61011
|
-
const Mail = createLucideIcon("mail", __iconNode$
|
|
61178
|
+
const Mail = createLucideIcon("mail", __iconNode$i);
|
|
61012
61179
|
/**
|
|
61013
61180
|
* @license lucide-react v0.575.0 - ISC
|
|
61014
61181
|
*
|
|
61015
61182
|
* This source code is licensed under the ISC license.
|
|
61016
61183
|
* See the LICENSE file in the root directory of this source tree.
|
|
61017
61184
|
*/
|
|
61018
|
-
const __iconNode$
|
|
61185
|
+
const __iconNode$h = [
|
|
61019
61186
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
61020
61187
|
["path", { d: "m21 3-7 7", key: "1l2asr" }],
|
|
61021
61188
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
61022
61189
|
["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
|
|
61023
61190
|
];
|
|
61024
|
-
const Maximize2 = createLucideIcon("maximize-2", __iconNode$
|
|
61191
|
+
const Maximize2 = createLucideIcon("maximize-2", __iconNode$h);
|
|
61025
61192
|
/**
|
|
61026
61193
|
* @license lucide-react v0.575.0 - ISC
|
|
61027
61194
|
*
|
|
61028
61195
|
* This source code is licensed under the ISC license.
|
|
61029
61196
|
* See the LICENSE file in the root directory of this source tree.
|
|
61030
61197
|
*/
|
|
61031
|
-
const __iconNode$
|
|
61198
|
+
const __iconNode$g = [
|
|
61032
61199
|
[
|
|
61033
61200
|
"path",
|
|
61034
61201
|
{
|
|
@@ -61037,39 +61204,39 @@ const __iconNode$e = [
|
|
|
61037
61204
|
}
|
|
61038
61205
|
]
|
|
61039
61206
|
];
|
|
61040
|
-
const MessageSquare = createLucideIcon("message-square", __iconNode$
|
|
61207
|
+
const MessageSquare = createLucideIcon("message-square", __iconNode$g);
|
|
61041
61208
|
/**
|
|
61042
61209
|
* @license lucide-react v0.575.0 - ISC
|
|
61043
61210
|
*
|
|
61044
61211
|
* This source code is licensed under the ISC license.
|
|
61045
61212
|
* See the LICENSE file in the root directory of this source tree.
|
|
61046
61213
|
*/
|
|
61047
|
-
const __iconNode$
|
|
61214
|
+
const __iconNode$f = [
|
|
61048
61215
|
["path", { d: "m14 10 7-7", key: "oa77jy" }],
|
|
61049
61216
|
["path", { d: "M20 10h-6V4", key: "mjg0md" }],
|
|
61050
61217
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
61051
61218
|
["path", { d: "M4 14h6v6", key: "rmj7iw" }]
|
|
61052
61219
|
];
|
|
61053
|
-
const Minimize2 = createLucideIcon("minimize-2", __iconNode$
|
|
61220
|
+
const Minimize2 = createLucideIcon("minimize-2", __iconNode$f);
|
|
61054
61221
|
/**
|
|
61055
61222
|
* @license lucide-react v0.575.0 - ISC
|
|
61056
61223
|
*
|
|
61057
61224
|
* This source code is licensed under the ISC license.
|
|
61058
61225
|
* See the LICENSE file in the root directory of this source tree.
|
|
61059
61226
|
*/
|
|
61060
|
-
const __iconNode$
|
|
61227
|
+
const __iconNode$e = [
|
|
61061
61228
|
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
|
|
61062
61229
|
["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
|
|
61063
61230
|
["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
|
|
61064
61231
|
];
|
|
61065
|
-
const Monitor = createLucideIcon("monitor", __iconNode$
|
|
61232
|
+
const Monitor = createLucideIcon("monitor", __iconNode$e);
|
|
61066
61233
|
/**
|
|
61067
61234
|
* @license lucide-react v0.575.0 - ISC
|
|
61068
61235
|
*
|
|
61069
61236
|
* This source code is licensed under the ISC license.
|
|
61070
61237
|
* See the LICENSE file in the root directory of this source tree.
|
|
61071
61238
|
*/
|
|
61072
|
-
const __iconNode$
|
|
61239
|
+
const __iconNode$d = [
|
|
61073
61240
|
["path", { d: "M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4", key: "re6nr2" }],
|
|
61074
61241
|
["path", { d: "M2 6h4", key: "aawbzj" }],
|
|
61075
61242
|
["path", { d: "M2 10h4", key: "l0bgd4" }],
|
|
@@ -61083,14 +61250,30 @@ const __iconNode$b = [
|
|
|
61083
61250
|
}
|
|
61084
61251
|
]
|
|
61085
61252
|
];
|
|
61086
|
-
const NotebookPen = createLucideIcon("notebook-pen", __iconNode$
|
|
61253
|
+
const NotebookPen = createLucideIcon("notebook-pen", __iconNode$d);
|
|
61087
61254
|
/**
|
|
61088
61255
|
* @license lucide-react v0.575.0 - ISC
|
|
61089
61256
|
*
|
|
61090
61257
|
* This source code is licensed under the ISC license.
|
|
61091
61258
|
* See the LICENSE file in the root directory of this source tree.
|
|
61092
61259
|
*/
|
|
61093
|
-
const __iconNode$
|
|
61260
|
+
const __iconNode$c = [
|
|
61261
|
+
[
|
|
61262
|
+
"path",
|
|
61263
|
+
{
|
|
61264
|
+
d: "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",
|
|
61265
|
+
key: "1miecu"
|
|
61266
|
+
}
|
|
61267
|
+
]
|
|
61268
|
+
];
|
|
61269
|
+
const Paperclip = createLucideIcon("paperclip", __iconNode$c);
|
|
61270
|
+
/**
|
|
61271
|
+
* @license lucide-react v0.575.0 - ISC
|
|
61272
|
+
*
|
|
61273
|
+
* This source code is licensed under the ISC license.
|
|
61274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61275
|
+
*/
|
|
61276
|
+
const __iconNode$b = [
|
|
61094
61277
|
["path", { d: "M13 21h8", key: "1jsn5i" }],
|
|
61095
61278
|
[
|
|
61096
61279
|
"path",
|
|
@@ -61100,30 +61283,53 @@ const __iconNode$a = [
|
|
|
61100
61283
|
}
|
|
61101
61284
|
]
|
|
61102
61285
|
];
|
|
61103
|
-
const PenLine = createLucideIcon("pen-line", __iconNode$
|
|
61286
|
+
const PenLine = createLucideIcon("pen-line", __iconNode$b);
|
|
61104
61287
|
/**
|
|
61105
61288
|
* @license lucide-react v0.575.0 - ISC
|
|
61106
61289
|
*
|
|
61107
61290
|
* This source code is licensed under the ISC license.
|
|
61108
61291
|
* See the LICENSE file in the root directory of this source tree.
|
|
61109
61292
|
*/
|
|
61110
|
-
const __iconNode$
|
|
61293
|
+
const __iconNode$a = [
|
|
61111
61294
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
61112
61295
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
61113
61296
|
];
|
|
61114
|
-
const Plus = createLucideIcon("plus", __iconNode$
|
|
61297
|
+
const Plus = createLucideIcon("plus", __iconNode$a);
|
|
61115
61298
|
/**
|
|
61116
61299
|
* @license lucide-react v0.575.0 - ISC
|
|
61117
61300
|
*
|
|
61118
61301
|
* This source code is licensed under the ISC license.
|
|
61119
61302
|
* See the LICENSE file in the root directory of this source tree.
|
|
61120
61303
|
*/
|
|
61121
|
-
const __iconNode$
|
|
61304
|
+
const __iconNode$9 = [
|
|
61122
61305
|
["path", { d: "M2 3h20", key: "91anmk" }],
|
|
61123
61306
|
["path", { d: "M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3", key: "2k9sn8" }],
|
|
61124
61307
|
["path", { d: "m7 21 5-5 5 5", key: "bip4we" }]
|
|
61125
61308
|
];
|
|
61126
|
-
const Presentation = createLucideIcon("presentation", __iconNode$
|
|
61309
|
+
const Presentation = createLucideIcon("presentation", __iconNode$9);
|
|
61310
|
+
/**
|
|
61311
|
+
* @license lucide-react v0.575.0 - ISC
|
|
61312
|
+
*
|
|
61313
|
+
* This source code is licensed under the ISC license.
|
|
61314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61315
|
+
*/
|
|
61316
|
+
const __iconNode$8 = [
|
|
61317
|
+
[
|
|
61318
|
+
"path",
|
|
61319
|
+
{
|
|
61320
|
+
d: "M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",
|
|
61321
|
+
key: "rib7q0"
|
|
61322
|
+
}
|
|
61323
|
+
],
|
|
61324
|
+
[
|
|
61325
|
+
"path",
|
|
61326
|
+
{
|
|
61327
|
+
d: "M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",
|
|
61328
|
+
key: "1ymkrd"
|
|
61329
|
+
}
|
|
61330
|
+
]
|
|
61331
|
+
];
|
|
61332
|
+
const Quote = createLucideIcon("quote", __iconNode$8);
|
|
61127
61333
|
/**
|
|
61128
61334
|
* @license lucide-react v0.575.0 - ISC
|
|
61129
61335
|
*
|
|
@@ -63146,6 +63352,305 @@ const TooltipIconButton = React.forwardRef(
|
|
|
63146
63352
|
}
|
|
63147
63353
|
);
|
|
63148
63354
|
TooltipIconButton.displayName = "TooltipIconButton";
|
|
63355
|
+
const MAX_FILE_SIZE = 5 * 1024 * 1024 * 1024;
|
|
63356
|
+
function useFileUpload() {
|
|
63357
|
+
const { backendUrl, apiKey, token } = useAthenaConfig();
|
|
63358
|
+
const [isUploading, setIsUploading] = React.useState(false);
|
|
63359
|
+
const [progress, setProgress] = React.useState(null);
|
|
63360
|
+
const [error2, setError] = React.useState(null);
|
|
63361
|
+
const xhrRef = React.useRef(null);
|
|
63362
|
+
React.useEffect(() => {
|
|
63363
|
+
return () => {
|
|
63364
|
+
var _a2;
|
|
63365
|
+
(_a2 = xhrRef.current) == null ? void 0 : _a2.abort();
|
|
63366
|
+
};
|
|
63367
|
+
}, []);
|
|
63368
|
+
const clearError = React.useCallback(() => setError(null), []);
|
|
63369
|
+
const upload = React.useCallback(
|
|
63370
|
+
async (files) => {
|
|
63371
|
+
var _a2;
|
|
63372
|
+
if (files.length === 0) return [];
|
|
63373
|
+
for (const file of files) {
|
|
63374
|
+
if (file.size > MAX_FILE_SIZE) {
|
|
63375
|
+
const msg = `File "${file.name}" exceeds the maximum size of 5 GB.`;
|
|
63376
|
+
setError(msg);
|
|
63377
|
+
throw new Error(msg);
|
|
63378
|
+
}
|
|
63379
|
+
}
|
|
63380
|
+
setIsUploading(true);
|
|
63381
|
+
setError(null);
|
|
63382
|
+
setProgress({ current: 0, total: files.length, fileName: ((_a2 = files[0]) == null ? void 0 : _a2.name) ?? "", percent: 0 });
|
|
63383
|
+
try {
|
|
63384
|
+
const formData = new FormData();
|
|
63385
|
+
for (const file of files) {
|
|
63386
|
+
formData.append("files", file, file.name);
|
|
63387
|
+
}
|
|
63388
|
+
const baseUrl = backendUrl.replace(/\/api\/assistant-ui\/?$/, "");
|
|
63389
|
+
if (baseUrl === backendUrl) {
|
|
63390
|
+
console.warn("[AthenaSDK] useFileUpload: backendUrl does not end with /api/assistant-ui — upload URL may be incorrect:", `${baseUrl}/api/upload/`);
|
|
63391
|
+
}
|
|
63392
|
+
const uploadUrl = `${baseUrl}/api/upload/`;
|
|
63393
|
+
const headers = {};
|
|
63394
|
+
if (token) {
|
|
63395
|
+
headers["Authorization"] = `Bearer ${token}`;
|
|
63396
|
+
} else if (apiKey) {
|
|
63397
|
+
headers["X-API-KEY"] = apiKey;
|
|
63398
|
+
}
|
|
63399
|
+
const xhr = new XMLHttpRequest();
|
|
63400
|
+
xhrRef.current = xhr;
|
|
63401
|
+
const result = await new Promise((resolve, reject) => {
|
|
63402
|
+
xhr.upload.addEventListener("progress", (e) => {
|
|
63403
|
+
var _a3;
|
|
63404
|
+
if (e.lengthComputable) {
|
|
63405
|
+
const percent = e.loaded / e.total;
|
|
63406
|
+
const fileIndex = Math.min(
|
|
63407
|
+
Math.floor(percent * files.length),
|
|
63408
|
+
files.length - 1
|
|
63409
|
+
);
|
|
63410
|
+
setProgress({
|
|
63411
|
+
current: fileIndex + 1,
|
|
63412
|
+
total: files.length,
|
|
63413
|
+
fileName: ((_a3 = files[fileIndex]) == null ? void 0 : _a3.name) ?? "",
|
|
63414
|
+
percent
|
|
63415
|
+
});
|
|
63416
|
+
}
|
|
63417
|
+
});
|
|
63418
|
+
xhr.addEventListener("load", () => {
|
|
63419
|
+
if (xhr.status >= 200 && xhr.status < 300) {
|
|
63420
|
+
try {
|
|
63421
|
+
const data = JSON.parse(xhr.responseText);
|
|
63422
|
+
const assets = (data.success ?? []).map((a) => ({
|
|
63423
|
+
id: a.id,
|
|
63424
|
+
title: a.title ?? a.file_name,
|
|
63425
|
+
fileName: a.file_name,
|
|
63426
|
+
fileSize: a.file_size,
|
|
63427
|
+
mediaType: a.media_type
|
|
63428
|
+
}));
|
|
63429
|
+
resolve({ success: assets, errors: data.errors ?? [] });
|
|
63430
|
+
} catch {
|
|
63431
|
+
reject(new Error("Failed to parse upload response"));
|
|
63432
|
+
}
|
|
63433
|
+
} else if (xhr.status === 401 || xhr.status === 403) {
|
|
63434
|
+
reject(new Error("Authentication failed. Check your API key or token."));
|
|
63435
|
+
} else {
|
|
63436
|
+
reject(new Error(`Upload failed with status ${xhr.status}`));
|
|
63437
|
+
}
|
|
63438
|
+
});
|
|
63439
|
+
xhr.addEventListener("error", () => reject(new Error("Network error during upload")));
|
|
63440
|
+
xhr.addEventListener("abort", () => reject(new Error("Upload was cancelled")));
|
|
63441
|
+
xhr.open("POST", uploadUrl);
|
|
63442
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
63443
|
+
xhr.setRequestHeader(key, value);
|
|
63444
|
+
}
|
|
63445
|
+
xhr.withCredentials = !token && !apiKey;
|
|
63446
|
+
xhr.send(formData);
|
|
63447
|
+
});
|
|
63448
|
+
if (result.errors.length > 0) {
|
|
63449
|
+
const errMsg = result.errors.map((e) => `${e.file.filename}: ${e.error}`).join("; ");
|
|
63450
|
+
if (result.success.length === 0) {
|
|
63451
|
+
setError(errMsg);
|
|
63452
|
+
throw new Error(errMsg);
|
|
63453
|
+
}
|
|
63454
|
+
setError(errMsg);
|
|
63455
|
+
}
|
|
63456
|
+
return result.success;
|
|
63457
|
+
} catch (err) {
|
|
63458
|
+
const msg = err instanceof Error ? err.message : "Upload failed";
|
|
63459
|
+
setError(msg);
|
|
63460
|
+
throw err;
|
|
63461
|
+
} finally {
|
|
63462
|
+
xhrRef.current = null;
|
|
63463
|
+
setIsUploading(false);
|
|
63464
|
+
setProgress(null);
|
|
63465
|
+
}
|
|
63466
|
+
},
|
|
63467
|
+
[backendUrl, apiKey, token]
|
|
63468
|
+
);
|
|
63469
|
+
return { upload, isUploading, progress, error: error2, clearError };
|
|
63470
|
+
}
|
|
63471
|
+
const FileUploadButton = ({
|
|
63472
|
+
className,
|
|
63473
|
+
onUpload,
|
|
63474
|
+
accept
|
|
63475
|
+
}) => {
|
|
63476
|
+
const inputRef = React.useRef(null);
|
|
63477
|
+
const { upload, isUploading, error: error2, clearError } = useFileUpload();
|
|
63478
|
+
const { addAttachments, setIsUploading } = useAttachments();
|
|
63479
|
+
const handleClick2 = React.useCallback(() => {
|
|
63480
|
+
var _a2;
|
|
63481
|
+
clearError();
|
|
63482
|
+
(_a2 = inputRef.current) == null ? void 0 : _a2.click();
|
|
63483
|
+
}, [clearError]);
|
|
63484
|
+
const handleFiles = React.useCallback(
|
|
63485
|
+
async (files) => {
|
|
63486
|
+
if (!files || files.length === 0) return;
|
|
63487
|
+
const fileArray = Array.from(files);
|
|
63488
|
+
setIsUploading(true);
|
|
63489
|
+
try {
|
|
63490
|
+
const assets = await upload(fileArray);
|
|
63491
|
+
if (assets.length > 0) {
|
|
63492
|
+
addAttachments(assets);
|
|
63493
|
+
onUpload == null ? void 0 : onUpload(assets);
|
|
63494
|
+
}
|
|
63495
|
+
} catch {
|
|
63496
|
+
} finally {
|
|
63497
|
+
setIsUploading(false);
|
|
63498
|
+
}
|
|
63499
|
+
if (inputRef.current) {
|
|
63500
|
+
inputRef.current.value = "";
|
|
63501
|
+
}
|
|
63502
|
+
},
|
|
63503
|
+
[upload, addAttachments, setIsUploading, onUpload]
|
|
63504
|
+
);
|
|
63505
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
63506
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
63507
|
+
"input",
|
|
63508
|
+
{
|
|
63509
|
+
ref: inputRef,
|
|
63510
|
+
type: "file",
|
|
63511
|
+
multiple: true,
|
|
63512
|
+
accept,
|
|
63513
|
+
className: "hidden",
|
|
63514
|
+
onChange: (e) => handleFiles(e.target.files),
|
|
63515
|
+
"aria-label": "Upload files"
|
|
63516
|
+
}
|
|
63517
|
+
),
|
|
63518
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
63519
|
+
"button",
|
|
63520
|
+
{
|
|
63521
|
+
type: "button",
|
|
63522
|
+
onClick: handleClick2,
|
|
63523
|
+
disabled: isUploading,
|
|
63524
|
+
className: cn(
|
|
63525
|
+
"aui-file-upload-btn flex items-center justify-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-50 disabled:pointer-events-none",
|
|
63526
|
+
error2 && "text-destructive",
|
|
63527
|
+
className
|
|
63528
|
+
),
|
|
63529
|
+
title: error2 ?? (isUploading ? "Uploading..." : "Attach files"),
|
|
63530
|
+
"aria-label": isUploading ? "Uploading files" : "Attach files",
|
|
63531
|
+
children: isUploading ? /* @__PURE__ */ jsxRuntime.jsx(LoaderCircle, { className: "size-4 animate-spin" }) : error2 ? /* @__PURE__ */ jsxRuntime.jsx(CircleAlert, { className: "size-4" }) : /* @__PURE__ */ jsxRuntime.jsx(Paperclip, { className: "size-4" })
|
|
63532
|
+
}
|
|
63533
|
+
)
|
|
63534
|
+
] });
|
|
63535
|
+
};
|
|
63536
|
+
const ComposerQuotePreview = ({ className }) => {
|
|
63537
|
+
const { quote, clearQuote } = useQuote();
|
|
63538
|
+
if (!quote) return null;
|
|
63539
|
+
const previewText = quote.text.length > 200 ? quote.text.slice(0, 200).trimEnd() + "…" : quote.text;
|
|
63540
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
63541
|
+
"div",
|
|
63542
|
+
{
|
|
63543
|
+
className: cn(
|
|
63544
|
+
"aui-quote-preview mx-3 mt-2 flex items-start gap-2 rounded-lg border border-border/60 bg-muted/40 px-3 py-2 text-sm",
|
|
63545
|
+
className
|
|
63546
|
+
),
|
|
63547
|
+
children: [
|
|
63548
|
+
/* @__PURE__ */ jsxRuntime.jsx(Quote, { className: "mt-0.5 size-3.5 shrink-0 text-muted-foreground/60" }),
|
|
63549
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
63550
|
+
quote.sourceTitle && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-0.5 truncate text-xs font-medium text-muted-foreground", children: [
|
|
63551
|
+
"From ",
|
|
63552
|
+
quote.sourceTitle
|
|
63553
|
+
] }),
|
|
63554
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "line-clamp-3 whitespace-pre-wrap text-xs text-foreground/80 leading-relaxed", children: previewText })
|
|
63555
|
+
] }),
|
|
63556
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
63557
|
+
"button",
|
|
63558
|
+
{
|
|
63559
|
+
type: "button",
|
|
63560
|
+
onClick: clearQuote,
|
|
63561
|
+
className: "mt-0.5 shrink-0 rounded p-0.5 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",
|
|
63562
|
+
"aria-label": "Remove quote",
|
|
63563
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(X, { className: "size-3.5" })
|
|
63564
|
+
}
|
|
63565
|
+
)
|
|
63566
|
+
]
|
|
63567
|
+
}
|
|
63568
|
+
);
|
|
63569
|
+
};
|
|
63570
|
+
const ComposerAttachmentPreview = ({ className }) => {
|
|
63571
|
+
const { attachments, removeAttachment } = useAttachments();
|
|
63572
|
+
if (attachments.length === 0) return null;
|
|
63573
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("aui-attachment-preview mx-3 mt-2 flex flex-wrap gap-1.5", className), children: attachments.map((asset) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
63574
|
+
"div",
|
|
63575
|
+
{
|
|
63576
|
+
className: "flex items-center gap-1.5 rounded-lg border border-border/60 bg-muted/40 px-2.5 py-1.5 text-xs",
|
|
63577
|
+
children: [
|
|
63578
|
+
/* @__PURE__ */ jsxRuntime.jsx(Paperclip, { className: "size-3 shrink-0 text-muted-foreground/60" }),
|
|
63579
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "max-w-[180px] truncate text-foreground/80", children: asset.title }),
|
|
63580
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
63581
|
+
"button",
|
|
63582
|
+
{
|
|
63583
|
+
type: "button",
|
|
63584
|
+
onClick: () => removeAttachment(asset.id),
|
|
63585
|
+
className: "shrink-0 rounded p-0.5 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",
|
|
63586
|
+
"aria-label": `Remove ${asset.title}`,
|
|
63587
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(X, { className: "size-3" })
|
|
63588
|
+
}
|
|
63589
|
+
)
|
|
63590
|
+
]
|
|
63591
|
+
},
|
|
63592
|
+
asset.id
|
|
63593
|
+
)) });
|
|
63594
|
+
};
|
|
63595
|
+
const ComposerDropZone = ({
|
|
63596
|
+
children,
|
|
63597
|
+
className,
|
|
63598
|
+
onUpload
|
|
63599
|
+
}) => {
|
|
63600
|
+
const [isDragOver, setIsDragOver] = React.useState(false);
|
|
63601
|
+
const { upload, isUploading } = useFileUpload();
|
|
63602
|
+
const { addAttachments, setIsUploading } = useAttachments();
|
|
63603
|
+
const handleDragOver = React.useCallback((e) => {
|
|
63604
|
+
e.preventDefault();
|
|
63605
|
+
e.stopPropagation();
|
|
63606
|
+
if (e.dataTransfer.types.includes("Files")) {
|
|
63607
|
+
setIsDragOver(true);
|
|
63608
|
+
}
|
|
63609
|
+
}, []);
|
|
63610
|
+
const handleDragLeave = React.useCallback((e) => {
|
|
63611
|
+
e.preventDefault();
|
|
63612
|
+
e.stopPropagation();
|
|
63613
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
63614
|
+
const { clientX, clientY } = e;
|
|
63615
|
+
if (clientX < rect.left || clientX > rect.right || clientY < rect.top || clientY > rect.bottom) {
|
|
63616
|
+
setIsDragOver(false);
|
|
63617
|
+
}
|
|
63618
|
+
}, []);
|
|
63619
|
+
const handleDrop2 = React.useCallback(
|
|
63620
|
+
async (e) => {
|
|
63621
|
+
e.preventDefault();
|
|
63622
|
+
e.stopPropagation();
|
|
63623
|
+
setIsDragOver(false);
|
|
63624
|
+
const files = Array.from(e.dataTransfer.files);
|
|
63625
|
+
if (files.length === 0) return;
|
|
63626
|
+
setIsUploading(true);
|
|
63627
|
+
try {
|
|
63628
|
+
const assets = await upload(files);
|
|
63629
|
+
if (assets.length > 0) {
|
|
63630
|
+
addAttachments(assets);
|
|
63631
|
+
onUpload == null ? void 0 : onUpload(assets);
|
|
63632
|
+
}
|
|
63633
|
+
} catch {
|
|
63634
|
+
} finally {
|
|
63635
|
+
setIsUploading(false);
|
|
63636
|
+
}
|
|
63637
|
+
},
|
|
63638
|
+
[upload, addAttachments, setIsUploading, onUpload]
|
|
63639
|
+
);
|
|
63640
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
63641
|
+
"div",
|
|
63642
|
+
{
|
|
63643
|
+
className: cn("relative", className),
|
|
63644
|
+
onDragOver: handleDragOver,
|
|
63645
|
+
onDragLeave: handleDragLeave,
|
|
63646
|
+
onDrop: handleDrop2,
|
|
63647
|
+
children: [
|
|
63648
|
+
children,
|
|
63649
|
+
isDragOver && !isUploading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aui-drop-overlay pointer-events-none absolute inset-0 z-20 flex items-center justify-center rounded-2xl border-2 border-dashed border-primary/50 bg-primary/5", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-primary", children: "Drop files to upload" }) })
|
|
63650
|
+
]
|
|
63651
|
+
}
|
|
63652
|
+
);
|
|
63653
|
+
};
|
|
63149
63654
|
const EMPTY_MENTION_TOOLS = [];
|
|
63150
63655
|
const DEFAULT_SUGGESTIONS = [
|
|
63151
63656
|
{
|
|
@@ -63245,10 +63750,12 @@ const AthenaChat = ({
|
|
|
63245
63750
|
),
|
|
63246
63751
|
/* @__PURE__ */ jsxRuntime.jsxs(ThreadPrimitiveViewportFooter, { className: "aui-thread-viewport-footer sticky bottom-0 mx-auto mt-auto flex w-full max-w-(--thread-max-width) flex-col gap-4 overflow-visible rounded-t-3xl bg-background pb-4 md:pb-6", children: [
|
|
63247
63752
|
/* @__PURE__ */ jsxRuntime.jsx(ThreadScrollToBottom, {}),
|
|
63248
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ComposerPrimitiveRoot, { className: "aui-composer-root relative flex w-full flex-col rounded-2xl border border-input bg-background px-1
|
|
63753
|
+
/* @__PURE__ */ jsxRuntime.jsx(AttachmentProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(ComposerEditorProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(ComposerDropZone, { children: /* @__PURE__ */ jsxRuntime.jsxs(ComposerPrimitiveRoot, { className: "aui-composer-root relative flex w-full flex-col rounded-2xl border border-input bg-background px-1 outline-none transition-shadow focus-within:border-ring focus-within:ring-2 focus-within:ring-ring/20", children: [
|
|
63754
|
+
/* @__PURE__ */ jsxRuntime.jsx(ComposerQuotePreview, {}),
|
|
63755
|
+
/* @__PURE__ */ jsxRuntime.jsx(ComposerAttachmentPreview, {}),
|
|
63249
63756
|
/* @__PURE__ */ jsxRuntime.jsx(TiptapComposer, { tools }),
|
|
63250
63757
|
/* @__PURE__ */ jsxRuntime.jsx(ComposerAction, {})
|
|
63251
|
-
] })
|
|
63758
|
+
] }) }) }) })
|
|
63252
63759
|
] })
|
|
63253
63760
|
]
|
|
63254
63761
|
}
|
|
@@ -63278,8 +63785,66 @@ const ThreadScrollToBottom = () => /* @__PURE__ */ jsxRuntime.jsx(ThreadPrimitiv
|
|
|
63278
63785
|
children: /* @__PURE__ */ jsxRuntime.jsx(ArrowDown, {})
|
|
63279
63786
|
}
|
|
63280
63787
|
) });
|
|
63281
|
-
const ComposerAction = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "aui-composer-action-wrapper relative mx-2 mb-2 flex items-center justify-
|
|
63282
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
63788
|
+
const ComposerAction = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "aui-composer-action-wrapper relative mx-2 mb-2 flex items-center justify-between", children: [
|
|
63789
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ jsxRuntime.jsx(FileUploadButton, {}) }),
|
|
63790
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
|
|
63791
|
+
/* @__PURE__ */ jsxRuntime.jsx(AuiIf, { condition: (s) => !s.thread.isRunning, children: /* @__PURE__ */ jsxRuntime.jsx(ComposerSendWithQuote, {}) }),
|
|
63792
|
+
/* @__PURE__ */ jsxRuntime.jsx(AuiIf, { condition: (s) => s.thread.isRunning, children: /* @__PURE__ */ jsxRuntime.jsx(ComposerPrimitiveCancel, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
63793
|
+
Button,
|
|
63794
|
+
{
|
|
63795
|
+
type: "button",
|
|
63796
|
+
variant: "default",
|
|
63797
|
+
size: "icon",
|
|
63798
|
+
className: "aui-composer-cancel size-8 rounded-full",
|
|
63799
|
+
"aria-label": "Stop generating",
|
|
63800
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Square, { className: "aui-composer-cancel-icon size-3 fill-current" })
|
|
63801
|
+
}
|
|
63802
|
+
) }) })
|
|
63803
|
+
] })
|
|
63804
|
+
] });
|
|
63805
|
+
const ComposerSendWithQuote = () => {
|
|
63806
|
+
const aui = useAui();
|
|
63807
|
+
const { quote, clearQuote } = useQuote();
|
|
63808
|
+
const { attachments, clearAttachments, isUploading } = useAttachments();
|
|
63809
|
+
const editorRef = useComposerEditorRef();
|
|
63810
|
+
const hasExtras = !!quote || attachments.length > 0;
|
|
63811
|
+
const handleSend = React.useCallback(() => {
|
|
63812
|
+
var _a2;
|
|
63813
|
+
if (isUploading) return;
|
|
63814
|
+
const editor = editorRef.current;
|
|
63815
|
+
const userText = ((_a2 = editor == null ? void 0 : editor.getMarkdown()) == null ? void 0 : _a2.trim()) ?? "";
|
|
63816
|
+
const fullMessage = buildComposedMessage({
|
|
63817
|
+
attachments,
|
|
63818
|
+
quote,
|
|
63819
|
+
userText
|
|
63820
|
+
});
|
|
63821
|
+
if (!fullMessage) return;
|
|
63822
|
+
aui.thread().append({
|
|
63823
|
+
role: "user",
|
|
63824
|
+
content: [{ type: "text", text: fullMessage }]
|
|
63825
|
+
});
|
|
63826
|
+
editor == null ? void 0 : editor.clear();
|
|
63827
|
+
clearQuote();
|
|
63828
|
+
clearAttachments();
|
|
63829
|
+
}, [aui, quote, attachments, isUploading, clearQuote, clearAttachments, editorRef]);
|
|
63830
|
+
if (hasExtras) {
|
|
63831
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
63832
|
+
TooltipIconButton,
|
|
63833
|
+
{
|
|
63834
|
+
tooltip: isUploading ? "Upload in progress..." : "Send message",
|
|
63835
|
+
side: "bottom",
|
|
63836
|
+
type: "button",
|
|
63837
|
+
variant: "default",
|
|
63838
|
+
size: "icon",
|
|
63839
|
+
className: "aui-composer-send size-8 rounded-full",
|
|
63840
|
+
"aria-label": "Send message",
|
|
63841
|
+
onClick: handleSend,
|
|
63842
|
+
disabled: isUploading,
|
|
63843
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ArrowUp, { className: "aui-composer-send-icon size-4" })
|
|
63844
|
+
}
|
|
63845
|
+
);
|
|
63846
|
+
}
|
|
63847
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ComposerPrimitiveSend, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
63283
63848
|
TooltipIconButton,
|
|
63284
63849
|
{
|
|
63285
63850
|
tooltip: "Send message",
|
|
@@ -63291,19 +63856,8 @@ const ComposerAction = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
|
63291
63856
|
"aria-label": "Send message",
|
|
63292
63857
|
children: /* @__PURE__ */ jsxRuntime.jsx(ArrowUp, { className: "aui-composer-send-icon size-4" })
|
|
63293
63858
|
}
|
|
63294
|
-
) })
|
|
63295
|
-
|
|
63296
|
-
Button,
|
|
63297
|
-
{
|
|
63298
|
-
type: "button",
|
|
63299
|
-
variant: "default",
|
|
63300
|
-
size: "icon",
|
|
63301
|
-
className: "aui-composer-cancel size-8 rounded-full",
|
|
63302
|
-
"aria-label": "Stop generating",
|
|
63303
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Square, { className: "aui-composer-cancel-icon size-3 fill-current" })
|
|
63304
|
-
}
|
|
63305
|
-
) }) })
|
|
63306
|
-
] });
|
|
63859
|
+
) });
|
|
63860
|
+
};
|
|
63307
63861
|
const MessageError = () => /* @__PURE__ */ jsxRuntime.jsx(MessagePrimitiveError, { children: /* @__PURE__ */ jsxRuntime.jsxs(ErrorPrimitiveRoot, { className: "aui-message-error-root mt-2 flex items-start gap-2 rounded-md border border-destructive bg-destructive/10 p-3 text-destructive text-sm dark:bg-destructive/5 dark:text-red-200", children: [
|
|
63308
63862
|
/* @__PURE__ */ jsxRuntime.jsx(CircleAlert, { className: "mt-0.5 size-4 shrink-0" }),
|
|
63309
63863
|
/* @__PURE__ */ jsxRuntime.jsx(ErrorPrimitiveMessage, { className: "aui-message-error-message grow" }),
|
|
@@ -63344,35 +63898,56 @@ const AssistantMessage = ({ toolUIs }) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
|
63344
63898
|
]
|
|
63345
63899
|
}
|
|
63346
63900
|
);
|
|
63347
|
-
const AssistantActionBar = () =>
|
|
63348
|
-
|
|
63349
|
-
|
|
63350
|
-
|
|
63351
|
-
|
|
63352
|
-
|
|
63353
|
-
|
|
63354
|
-
|
|
63355
|
-
|
|
63356
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
63357
|
-
|
|
63358
|
-
|
|
63359
|
-
|
|
63360
|
-
/* @__PURE__ */ jsxRuntime.
|
|
63361
|
-
|
|
63362
|
-
|
|
63363
|
-
|
|
63364
|
-
|
|
63365
|
-
|
|
63366
|
-
|
|
63367
|
-
|
|
63368
|
-
|
|
63369
|
-
|
|
63370
|
-
|
|
63371
|
-
|
|
63372
|
-
|
|
63373
|
-
|
|
63374
|
-
|
|
63375
|
-
|
|
63901
|
+
const AssistantActionBar = () => {
|
|
63902
|
+
const threadId = useAthenaThreadId();
|
|
63903
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
63904
|
+
ActionBarPrimitiveRoot,
|
|
63905
|
+
{
|
|
63906
|
+
hideWhenRunning: true,
|
|
63907
|
+
autohide: "not-last",
|
|
63908
|
+
className: "aui-assistant-action-bar-root -ml-1 flex gap-1 text-muted-foreground",
|
|
63909
|
+
children: [
|
|
63910
|
+
/* @__PURE__ */ jsxRuntime.jsx(ActionBarPrimitiveCopy, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(TooltipIconButton, { tooltip: "Copy", children: [
|
|
63911
|
+
/* @__PURE__ */ jsxRuntime.jsx(AuiIf, { condition: (s) => s.message.isCopied, children: /* @__PURE__ */ jsxRuntime.jsx(Check, {}) }),
|
|
63912
|
+
/* @__PURE__ */ jsxRuntime.jsx(AuiIf, { condition: (s) => !s.message.isCopied, children: /* @__PURE__ */ jsxRuntime.jsx(Copy, {}) })
|
|
63913
|
+
] }) }),
|
|
63914
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ActionBarMorePrimitiveRoot, { children: [
|
|
63915
|
+
/* @__PURE__ */ jsxRuntime.jsx(ActionBarMorePrimitiveTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(TooltipIconButton, { tooltip: "More", className: "data-[state=open]:bg-accent", children: /* @__PURE__ */ jsxRuntime.jsx(Ellipsis, {}) }) }),
|
|
63916
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
63917
|
+
ActionBarMorePrimitiveContent,
|
|
63918
|
+
{
|
|
63919
|
+
side: "bottom",
|
|
63920
|
+
align: "start",
|
|
63921
|
+
className: "aui-action-bar-more-content z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
63922
|
+
children: [
|
|
63923
|
+
/* @__PURE__ */ jsxRuntime.jsx(ActionBarPrimitiveExportMarkdown, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(ActionBarMorePrimitiveItem, { className: "aui-action-bar-more-item flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground", children: [
|
|
63924
|
+
/* @__PURE__ */ jsxRuntime.jsx(Download, { className: "size-4" }),
|
|
63925
|
+
"Export as Markdown"
|
|
63926
|
+
] }) }),
|
|
63927
|
+
threadId && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
63928
|
+
ActionBarMorePrimitiveItem,
|
|
63929
|
+
{
|
|
63930
|
+
className: "aui-action-bar-more-item flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
|
63931
|
+
onClick: () => {
|
|
63932
|
+
window.open(
|
|
63933
|
+
`https://app.athenaintel.com/dashboard/spaces?session_id=${threadId}`,
|
|
63934
|
+
"_blank"
|
|
63935
|
+
);
|
|
63936
|
+
},
|
|
63937
|
+
children: [
|
|
63938
|
+
/* @__PURE__ */ jsxRuntime.jsx(ExternalLink, { className: "size-4" }),
|
|
63939
|
+
"Open in Athena"
|
|
63940
|
+
]
|
|
63941
|
+
}
|
|
63942
|
+
)
|
|
63943
|
+
]
|
|
63944
|
+
}
|
|
63945
|
+
)
|
|
63946
|
+
] })
|
|
63947
|
+
]
|
|
63948
|
+
}
|
|
63949
|
+
);
|
|
63950
|
+
};
|
|
63376
63951
|
const UserMessage = () => /* @__PURE__ */ jsxRuntime.jsx(
|
|
63377
63952
|
MessagePrimitiveRoot,
|
|
63378
63953
|
{
|
|
@@ -63823,6 +64398,8 @@ exports.Button = Button;
|
|
|
63823
64398
|
exports.Collapsible = Collapsible;
|
|
63824
64399
|
exports.CollapsibleContent = CollapsibleContent;
|
|
63825
64400
|
exports.CollapsibleTrigger = CollapsibleTrigger;
|
|
64401
|
+
exports.ComposerDropZone = ComposerDropZone;
|
|
64402
|
+
exports.ComposerQuotePreview = ComposerQuotePreview;
|
|
63826
64403
|
exports.CreateDocumentToolUI = CreateDocumentToolUI;
|
|
63827
64404
|
exports.CreateEmailDraftToolUI = CreateEmailDraftToolUI;
|
|
63828
64405
|
exports.CreateNotebookToolUI = CreateNotebookToolUI;
|
|
@@ -63830,6 +64407,8 @@ exports.CreatePresentationToolUI = CreatePresentationToolUI;
|
|
|
63830
64407
|
exports.CreateSheetToolUI = CreateSheetToolUI;
|
|
63831
64408
|
exports.DEFAULT_BACKEND_URL = DEFAULT_BACKEND_URL;
|
|
63832
64409
|
exports.EmailSearchToolUI = EmailSearchToolUI;
|
|
64410
|
+
exports.ExpandableSection = ExpandableSection;
|
|
64411
|
+
exports.FileUploadButton = FileUploadButton;
|
|
63833
64412
|
exports.OpenAssetToolUI = OpenAssetToolUI;
|
|
63834
64413
|
exports.ReadAssetToolUI = ReadAssetToolUI;
|
|
63835
64414
|
exports.RunPythonCodeToolUI = RunPythonCodeToolUI;
|
|
@@ -63837,6 +64416,7 @@ exports.TOOL_UI_REGISTRY = TOOL_UI_REGISTRY;
|
|
|
63837
64416
|
exports.ThreadList = ThreadList;
|
|
63838
64417
|
exports.TiptapComposer = TiptapComposer;
|
|
63839
64418
|
exports.TiptapText = TiptapText;
|
|
64419
|
+
exports.ToolCard = ToolCard;
|
|
63840
64420
|
exports.ToolFallback = ToolFallback;
|
|
63841
64421
|
exports.ToolFallbackArgs = ToolFallbackArgs;
|
|
63842
64422
|
exports.ToolFallbackContent = ToolFallbackContent;
|
|
@@ -63855,10 +64435,13 @@ exports.buttonVariants = buttonVariants;
|
|
|
63855
64435
|
exports.clearAutoOpenedAssets = clearAutoOpenedAssets;
|
|
63856
64436
|
exports.cn = cn;
|
|
63857
64437
|
exports.createAssetToolUI = createAssetToolUI;
|
|
64438
|
+
exports.formatToolName = formatToolName;
|
|
63858
64439
|
exports.getAssetInfo = getAssetInfo;
|
|
64440
|
+
exports.normalizeResult = normalizeResult;
|
|
63859
64441
|
exports.resetAssetAutoOpen = resetAssetAutoOpen;
|
|
63860
64442
|
exports.themeToStyleVars = themeToStyleVars;
|
|
63861
64443
|
exports.themes = themes;
|
|
64444
|
+
exports.truncate = truncate;
|
|
63862
64445
|
exports.tryParseJson = tryParseJson$1;
|
|
63863
64446
|
exports.useAppendToComposer = useAppendToComposer;
|
|
63864
64447
|
exports.useAssetEmbed = useAssetEmbed;
|
|
@@ -63866,6 +64449,8 @@ exports.useAssetPanelStore = useAssetPanelStore;
|
|
|
63866
64449
|
exports.useAthenaConfig = useAthenaConfig;
|
|
63867
64450
|
exports.useAthenaRuntime = useAthenaRuntime;
|
|
63868
64451
|
exports.useComposerAttachment = useComposerAttachment;
|
|
64452
|
+
exports.useFileUpload = useFileUpload;
|
|
63869
64453
|
exports.useMentionSuggestions = useMentionSuggestions;
|
|
63870
64454
|
exports.useParentAuth = useParentAuth;
|
|
64455
|
+
exports.useQuote = useQuote;
|
|
63871
64456
|
//# sourceMappingURL=index.cjs.map
|