@copilotkit/react-ui 0.12.0 → 0.13.0-alpha.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/.turbo/turbo-build.log +216 -197
- package/CHANGELOG.md +22 -0
- package/dist/components/chat-components/chat-list.mjs +440 -12
- package/dist/components/chat-components/chat-list.mjs.map +1 -1
- package/dist/components/chat-components/chat-message-actions.mjs +168 -7
- package/dist/components/chat-components/chat-message-actions.mjs.map +1 -1
- package/dist/components/chat-components/chat-message.mjs +403 -10
- package/dist/components/chat-components/chat-message.mjs.map +1 -1
- package/dist/components/chat-components/chat-panel.mjs +300 -9
- package/dist/components/chat-components/chat-panel.mjs.map +1 -1
- package/dist/components/chat-components/chat-scroll-anchor.mjs +44 -4
- package/dist/components/chat-components/chat-scroll-anchor.mjs.map +1 -1
- package/dist/components/chat-components/clear-history.mjs +273 -74
- package/dist/components/chat-components/clear-history.mjs.map +1 -1
- package/dist/components/chat-components/copilot-chat.mjs +808 -21
- package/dist/components/chat-components/copilot-chat.mjs.map +1 -1
- package/dist/components/chat-components/default-empty-screen.mjs +175 -7
- package/dist/components/chat-components/default-empty-screen.mjs.map +1 -1
- package/dist/components/chat-components/external-link.mjs +25 -3
- package/dist/components/chat-components/external-link.mjs.map +1 -1
- package/dist/components/chat-components/markdown.mjs +10 -3
- package/dist/components/chat-components/markdown.mjs.map +1 -1
- package/dist/components/chat-components/prompt-form.mjs +227 -8
- package/dist/components/chat-components/prompt-form.mjs.map +1 -1
- package/dist/components/chat-components/theme-toggle.mjs +143 -31
- package/dist/components/chat-components/theme-toggle.mjs.map +1 -1
- package/dist/components/chat-components/toaster.mjs +7 -3
- package/dist/components/chat-components/toaster.mjs.map +1 -1
- package/dist/components/chat-components/ui/alert-dialog.mjs +199 -5
- package/dist/components/chat-components/ui/alert-dialog.mjs.map +1 -1
- package/dist/components/chat-components/ui/badge.d.ts +1 -1
- package/dist/components/chat-components/ui/badge.mjs +50 -10
- package/dist/components/chat-components/ui/badge.mjs.map +1 -1
- package/dist/components/chat-components/ui/button.mjs +85 -4
- package/dist/components/chat-components/ui/button.mjs.map +1 -1
- package/dist/components/chat-components/ui/codeblock.mjs +283 -7
- package/dist/components/chat-components/ui/codeblock.mjs.map +1 -1
- package/dist/components/chat-components/ui/dialog.mjs +125 -59
- package/dist/components/chat-components/ui/dialog.mjs.map +1 -1
- package/dist/components/chat-components/ui/dropdown-menu.mjs +102 -38
- package/dist/components/chat-components/ui/dropdown-menu.mjs.map +1 -1
- package/dist/components/chat-components/ui/icons.mjs +554 -4
- package/dist/components/chat-components/ui/icons.mjs.map +1 -1
- package/dist/components/chat-components/ui/input.mjs +59 -15
- package/dist/components/chat-components/ui/input.mjs.map +1 -1
- package/dist/components/chat-components/ui/label.mjs +52 -13
- package/dist/components/chat-components/ui/label.mjs.map +1 -1
- package/dist/components/chat-components/ui/select.mjs +156 -71
- package/dist/components/chat-components/ui/select.mjs.map +1 -1
- package/dist/components/chat-components/ui/separator.mjs +68 -4
- package/dist/components/chat-components/ui/separator.mjs.map +1 -1
- package/dist/components/chat-components/ui/sheet.mjs +124 -54
- package/dist/components/chat-components/ui/sheet.mjs.map +1 -1
- package/dist/components/chat-components/ui/switch.mjs +69 -18
- package/dist/components/chat-components/ui/switch.mjs.map +1 -1
- package/dist/components/chat-components/ui/textarea.mjs +58 -14
- package/dist/components/chat-components/ui/textarea.mjs.map +1 -1
- package/dist/components/chat-components/ui/tooltip.mjs +72 -4
- package/dist/components/chat-components/ui/tooltip.mjs.map +1 -1
- package/dist/components/index.mjs +924 -25
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/sidebar/copilot-sidebar-ui-provider.mjs +919 -24
- package/dist/components/sidebar/copilot-sidebar-ui-provider.mjs.map +1 -1
- package/dist/components/sidebar/copilot-sidebar.mjs +841 -22
- package/dist/components/sidebar/copilot-sidebar.mjs.map +1 -1
- package/dist/components/sidebar/sidebar-context.mjs +10 -3
- package/dist/components/sidebar/sidebar-context.mjs.map +1 -1
- package/dist/context/index.d.ts +1 -0
- package/dist/context/index.mjs +0 -2
- package/dist/context/index.mjs.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.mjs +0 -2
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/hooks/use-at-bottom.mjs +19 -3
- package/dist/hooks/use-at-bottom.mjs.map +1 -1
- package/dist/hooks/use-copy-to-clipboard.mjs +26 -3
- package/dist/hooks/use-copy-to-clipboard.mjs.map +1 -1
- package/dist/hooks/use-enter-submit.mjs +16 -3
- package/dist/hooks/use-enter-submit.mjs.map +1 -1
- package/dist/index.mjs +924 -28
- package/dist/index.mjs.map +1 -1
- package/dist/lib/utils.mjs +62 -3
- package/dist/lib/utils.mjs.map +1 -1
- package/dist/lib/utils.test.d.ts +1 -0
- package/dist/lib/utils.test.mjs +0 -1
- package/dist/lib/utils.test.mjs.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.mjs +0 -2
- package/dist/types/index.mjs.map +1 -1
- package/dist/types/types.mjs +0 -2
- package/dist/types/types.mjs.map +1 -1
- package/package.json +6 -6
- package/dist/chunk-34MTYKUD.mjs +0 -473
- package/dist/chunk-34MTYKUD.mjs.map +0 -1
- package/dist/chunk-4ENGXGIC.mjs +0 -85
- package/dist/chunk-4ENGXGIC.mjs.map +0 -1
- package/dist/chunk-5HCN6SPC.mjs +0 -47
- package/dist/chunk-5HCN6SPC.mjs.map +0 -1
- package/dist/chunk-6RG3YDAC.mjs +0 -28
- package/dist/chunk-6RG3YDAC.mjs.map +0 -1
- package/dist/chunk-7NSRDJ5C.mjs +0 -3
- package/dist/chunk-7NSRDJ5C.mjs.map +0 -1
- package/dist/chunk-AYVNEHBC.mjs +0 -70
- package/dist/chunk-AYVNEHBC.mjs.map +0 -1
- package/dist/chunk-CRRPHVT3.mjs +0 -57
- package/dist/chunk-CRRPHVT3.mjs.map +0 -1
- package/dist/chunk-D72RVITD.mjs +0 -30
- package/dist/chunk-D72RVITD.mjs.map +0 -1
- package/dist/chunk-ESP3H6NQ.mjs +0 -39
- package/dist/chunk-ESP3H6NQ.mjs.map +0 -1
- package/dist/chunk-EXOYIXGQ.mjs +0 -74
- package/dist/chunk-EXOYIXGQ.mjs.map +0 -1
- package/dist/chunk-GBPOPYU3.mjs +0 -27
- package/dist/chunk-GBPOPYU3.mjs.map +0 -1
- package/dist/chunk-GWX3NPF5.mjs +0 -48
- package/dist/chunk-GWX3NPF5.mjs.map +0 -1
- package/dist/chunk-H4VKQGVU.mjs +0 -3
- package/dist/chunk-H4VKQGVU.mjs.map +0 -1
- package/dist/chunk-HKSE5ISX.mjs +0 -105
- package/dist/chunk-HKSE5ISX.mjs.map +0 -1
- package/dist/chunk-IU3WTXLQ.mjs +0 -3
- package/dist/chunk-IU3WTXLQ.mjs.map +0 -1
- package/dist/chunk-MC6KTH4X.mjs +0 -12
- package/dist/chunk-MC6KTH4X.mjs.map +0 -1
- package/dist/chunk-MRXNTQOX.mjs +0 -55
- package/dist/chunk-MRXNTQOX.mjs.map +0 -1
- package/dist/chunk-OHWEJUCS.mjs +0 -18
- package/dist/chunk-OHWEJUCS.mjs.map +0 -1
- package/dist/chunk-PY4F436T.mjs +0 -25
- package/dist/chunk-PY4F436T.mjs.map +0 -1
- package/dist/chunk-Q6YO7LDK.mjs +0 -40
- package/dist/chunk-Q6YO7LDK.mjs.map +0 -1
- package/dist/chunk-TEYIQHMK.mjs +0 -12
- package/dist/chunk-TEYIQHMK.mjs.map +0 -1
- package/dist/chunk-U6NJWGTV.mjs +0 -3
- package/dist/chunk-U6NJWGTV.mjs.map +0 -1
- package/dist/chunk-VUNHHCOA.mjs +0 -24
- package/dist/chunk-VUNHHCOA.mjs.map +0 -1
- package/dist/chunk-XEVSX2QD.mjs +0 -137
- package/dist/chunk-XEVSX2QD.mjs.map +0 -1
- package/dist/chunk-XLGSWCCV.mjs +0 -75
- package/dist/chunk-XLGSWCCV.mjs.map +0 -1
- package/dist/chunk-ZA25IBKF.mjs +0 -69
- package/dist/chunk-ZA25IBKF.mjs.map +0 -1
- package/dist/chunk-ZLFSBGYI.mjs +0 -26
- package/dist/chunk-ZLFSBGYI.mjs.map +0 -1
- package/dist/chunk-ZYC5YVDO.mjs +0 -21
- package/dist/chunk-ZYC5YVDO.mjs.map +0 -1
package/dist/chunk-5HCN6SPC.mjs
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { cn } from './chunk-Q6YO7LDK.mjs';
|
|
2
|
-
import { __objRest, __spreadValues } from './chunk-MRXNTQOX.mjs';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { Slot } from '@radix-ui/react-slot';
|
|
5
|
-
import { cva } from 'class-variance-authority';
|
|
6
|
-
import { jsx } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
var buttonVariants = cva(
|
|
9
|
-
"inline-flex items-center justify-center rounded-md text-sm font-medium shadow ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
10
|
-
{
|
|
11
|
-
variants: {
|
|
12
|
-
variant: {
|
|
13
|
-
default: "bg-primary text-primary-foreground shadow-md hover:bg-primary/90",
|
|
14
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
15
|
-
outline: "border border-input hover:bg-accent hover:text-accent-foreground",
|
|
16
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
17
|
-
ghost: "shadow-none hover:bg-accent hover:text-accent-foreground",
|
|
18
|
-
link: "text-primary underline-offset-4 shadow-none hover:underline"
|
|
19
|
-
},
|
|
20
|
-
size: {
|
|
21
|
-
default: "h-8 px-4 py-2",
|
|
22
|
-
sm: "h-8 rounded-md px-3",
|
|
23
|
-
lg: "h-11 rounded-md px-8",
|
|
24
|
-
icon: "h-8 w-8 p-0"
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
defaultVariants: {
|
|
28
|
-
variant: "default",
|
|
29
|
-
size: "default"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
var Button = React.forwardRef(
|
|
34
|
-
(_a, ref) => {
|
|
35
|
-
var _b = _a, { className, variant, size, asChild = false } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild"]);
|
|
36
|
-
const Comp = asChild ? Slot : "button";
|
|
37
|
-
return /* @__PURE__ */ jsx(Comp, __spreadValues({
|
|
38
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
39
|
-
ref
|
|
40
|
-
}, props));
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
Button.displayName = "Button";
|
|
44
|
-
|
|
45
|
-
export { Button, buttonVariants };
|
|
46
|
-
//# sourceMappingURL=out.js.map
|
|
47
|
-
//# sourceMappingURL=chunk-5HCN6SPC.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/chat-components/ui/button.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,YAAY,WAAW;AACvB,SAAS,YAAY;AACrB,SAAS,WAA8B;AAwCjC;AApCN,IAAM,iBAAiB;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,aAAa;AAAA,QACb,SAAS;AAAA,QACT,WAAW;AAAA,QACX,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;AAQA,IAAM,SAAe;AAAA,EACnB,CAAC,IAAyD,QAAQ;AAAjE,iBAAE,aAAW,SAAS,MAAM,UAAU,MAvCzC,IAuCG,IAAgD,kBAAhD,IAAgD,CAA9C,aAAW,WAAS,QAAM;AAC3B,UAAM,OAAO,UAAU,OAAO;AAC9B,WACE,oBAAC;AAAA,MAAK,WAAW,GAAG,eAAe,EAAE,SAAS,MAAM,UAAU,CAAC,CAAC;AAAA,MAAG;AAAA,OAAc,MAAO;AAAA,EAE5F;AACF;AACA,OAAO,cAAc","sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../../lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center rounded-md text-sm font-medium shadow ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground shadow-md hover:bg-primary/90\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline: \"border border-input hover:bg-accent hover:text-accent-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"shadow-none hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 shadow-none hover:underline\",\n },\n size: {\n default: \"h-8 px-4 py-2\",\n sm: \"h-8 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-8 w-8 p-0\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n"]}
|
package/dist/chunk-6RG3YDAC.mjs
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { useAtBottom } from './chunk-ZYC5YVDO.mjs';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { useInView } from 'react-intersection-observer';
|
|
4
|
-
import { jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
function ChatScrollAnchor({ trackVisibility }) {
|
|
7
|
-
const isAtBottom = useAtBottom();
|
|
8
|
-
const { ref, entry, inView } = useInView({
|
|
9
|
-
trackVisibility,
|
|
10
|
-
delay: 100,
|
|
11
|
-
rootMargin: "0px 0px -150px 0px"
|
|
12
|
-
});
|
|
13
|
-
React.useEffect(() => {
|
|
14
|
-
if (isAtBottom && trackVisibility && !inView) {
|
|
15
|
-
entry == null ? void 0 : entry.target.scrollIntoView({
|
|
16
|
-
block: "start"
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}, [inView, entry, isAtBottom, trackVisibility]);
|
|
20
|
-
return /* @__PURE__ */ jsx("div", {
|
|
21
|
-
ref,
|
|
22
|
-
className: "h-px w-full"
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { ChatScrollAnchor };
|
|
27
|
-
//# sourceMappingURL=out.js.map
|
|
28
|
-
//# sourceMappingURL=chunk-6RG3YDAC.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/chat-components/chat-scroll-anchor.tsx"],"names":[],"mappings":";;;;;AAEA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AAwBjB;AA3BT;AAWO,SAAS,iBAAiB,EAAE,gBAAgB,GAA0B;AAC3E,QAAM,aAAa,YAAY;AAC/B,QAAM,EAAE,KAAK,OAAO,OAAO,IAAI,UAAU;AAAA,IACvC;AAAA,IACA,OAAO;AAAA,IACP,YAAY;AAAA,EACd,CAAC;AAED,EAAM,gBAAU,MAAM;AACpB,QAAI,cAAc,mBAAmB,CAAC,QAAQ;AAC5C,qCAAO,OAAO,eAAe;AAAA,QAC3B,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF,GAAG,CAAC,QAAQ,OAAO,YAAY,eAAe,CAAC;AAE/C,SAAO,oBAAC;AAAA,IAAI;AAAA,IAAU,WAAU;AAAA,GAAc;AAChD","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { useInView } from \"react-intersection-observer\";\n\nimport { useAtBottom } from \"../../hooks/use-at-bottom\";\n\ninterface ChatScrollAnchorProps {\n trackVisibility?: boolean;\n}\n\nexport function ChatScrollAnchor({ trackVisibility }: ChatScrollAnchorProps) {\n const isAtBottom = useAtBottom();\n const { ref, entry, inView } = useInView({\n trackVisibility,\n delay: 100,\n rootMargin: \"0px 0px -150px 0px\",\n });\n\n React.useEffect(() => {\n if (isAtBottom && trackVisibility && !inView) {\n entry?.target.scrollIntoView({\n block: \"start\",\n });\n }\n }, [inView, entry, isAtBottom, trackVisibility]);\n\n return <div ref={ref} className=\"h-px w-full\" />;\n}\n"]}
|
package/dist/chunk-7NSRDJ5C.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/chunk-AYVNEHBC.mjs
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { CopilotSidebar } from './chunk-GWX3NPF5.mjs';
|
|
2
|
-
import { CopilotSidebarContext } from './chunk-MC6KTH4X.mjs';
|
|
3
|
-
import { TooltipProvider } from './chunk-PY4F436T.mjs';
|
|
4
|
-
import { useState, useCallback } from 'react';
|
|
5
|
-
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
function CopilotSidebarUIProvider({ children }) {
|
|
8
|
-
const [sidebarOpen, setSidebarOpen] = useState(true);
|
|
9
|
-
const toggleSidebar = useCallback(() => {
|
|
10
|
-
setSidebarOpen((prev) => !prev);
|
|
11
|
-
}, []);
|
|
12
|
-
return /* @__PURE__ */ jsx(CopilotSidebarContext.Provider, {
|
|
13
|
-
value: { isSidebarOpen: sidebarOpen, toggleSidebar },
|
|
14
|
-
children: /* @__PURE__ */ jsx(Fragment, {
|
|
15
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
16
|
-
style: {
|
|
17
|
-
height: "100vh",
|
|
18
|
-
width: "100vw",
|
|
19
|
-
position: "relative"
|
|
20
|
-
},
|
|
21
|
-
children: [
|
|
22
|
-
/* @__PURE__ */ jsx("div", {
|
|
23
|
-
style: {
|
|
24
|
-
overflowY: "auto",
|
|
25
|
-
overflowX: "hidden",
|
|
26
|
-
height: "100%",
|
|
27
|
-
width: sidebarOpen ? "calc(100% - 450px)" : "100%",
|
|
28
|
-
position: "absolute",
|
|
29
|
-
transition: "width 0.5s ease-in-out"
|
|
30
|
-
},
|
|
31
|
-
children: /* @__PURE__ */ jsx("main", {
|
|
32
|
-
children
|
|
33
|
-
})
|
|
34
|
-
}),
|
|
35
|
-
/* @__PURE__ */ jsx("div", {
|
|
36
|
-
style: {
|
|
37
|
-
overflowY: "auto",
|
|
38
|
-
height: "100%",
|
|
39
|
-
width: "450px",
|
|
40
|
-
position: "absolute",
|
|
41
|
-
right: sidebarOpen ? "0" : "-450px",
|
|
42
|
-
transition: "right 0.5s ease-in-out"
|
|
43
|
-
},
|
|
44
|
-
children: /* @__PURE__ */ jsx(TooltipProvider, {
|
|
45
|
-
children: /* @__PURE__ */ jsx(CopilotSidebar, {
|
|
46
|
-
setSidebarOpen
|
|
47
|
-
})
|
|
48
|
-
})
|
|
49
|
-
}),
|
|
50
|
-
!sidebarOpen && /* @__PURE__ */ jsx("button", {
|
|
51
|
-
onClick: toggleSidebar,
|
|
52
|
-
style: {
|
|
53
|
-
position: "absolute",
|
|
54
|
-
top: "5%",
|
|
55
|
-
right: "20px",
|
|
56
|
-
transform: "translateY(-50%)",
|
|
57
|
-
transition: "opacity 0.5s ease-in-out"
|
|
58
|
-
},
|
|
59
|
-
className: "bg-slate-100 ring-2 ring-slate-600 font-semibold text-black p-2 rounded-lg shadow-lg",
|
|
60
|
-
children: "Open Copilot"
|
|
61
|
-
})
|
|
62
|
-
]
|
|
63
|
-
})
|
|
64
|
-
})
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export { CopilotSidebarUIProvider };
|
|
69
|
-
//# sourceMappingURL=out.js.map
|
|
70
|
-
//# sourceMappingURL=chunk-AYVNEHBC.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/sidebar/copilot-sidebar-ui-provider.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,SAA2B,mBAAmB;AAC9C,SAAS,gBAAgB;AAkBnB,mBAkBM,KAjBJ,YADF;AATC,SAAS,yBAAyB,EAAE,SAAS,GAAkC;AACpF,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,IAAI;AAEnD,QAAM,gBAAgB,YAAY,MAAM;AACtC,mBAAe,CAAC,SAAS,CAAC,IAAI;AAAA,EAChC,GAAG,CAAC,CAAC;AAEL,SACE,oBAAC,sBAAsB,UAAtB;AAAA,IAA+B,OAAO,EAAE,eAAe,aAAa,cAAc;AAAA,IACjF;AAAA,MACE,+BAAC;AAAA,QACC,OAAO;AAAA,UACL,QAAQ;AAAA,UACR,OAAO;AAAA,UACP,UAAU;AAAA,QACZ;AAAA,QAEA;AAAA,8BAAC;AAAA,YACC,OAAO;AAAA,cACL,WAAW;AAAA,cACX,WAAW;AAAA,cACX,QAAQ;AAAA,cACR,OAAO,cAAc,uBAAuB;AAAA,cAC5C,UAAU;AAAA,cACV,YAAY;AAAA,YACd;AAAA,YAEA,8BAAC;AAAA,cAAM;AAAA,aAAS;AAAA,WAClB;AAAA,UACA,oBAAC;AAAA,YACC,OAAO;AAAA,cACL,WAAW;AAAA,cACX,QAAQ;AAAA,cACR,OAAO;AAAA,cACP,UAAU;AAAA,cACV,OAAO,cAAc,MAAM;AAAA,cAC3B,YAAY;AAAA,YACd;AAAA,YAEA,8BAAC;AAAA,cACC,8BAAC;AAAA,gBAAe;AAAA,eAAgC;AAAA,aAClD;AAAA,WACF;AAAA,UACC,CAAC,eACA,oBAAC;AAAA,YACC,SAAS;AAAA,YACT,OAAO;AAAA,cACL,UAAU;AAAA,cACV,KAAK;AAAA,cACL,OAAO;AAAA,cACP,WAAW;AAAA,cACX,YAAY;AAAA,YACd;AAAA,YACA,WAAU;AAAA,YACX;AAAA,WAED;AAAA;AAAA,OAEJ;AAAA,KACF;AAAA,GACF;AAEJ","sourcesContent":["import React, { ReactNode, useCallback } from \"react\";\nimport { useState } from \"react\";\nimport { CopilotSidebar } from \"./copilot-sidebar\";\nimport { CopilotSidebarContext } from \"./sidebar-context\";\nimport { TooltipProvider } from \"../chat-components/ui/tooltip\";\n\nexport interface CopilotSidebarUIProviderProps {\n children: ReactNode;\n}\n\nexport function CopilotSidebarUIProvider({ children }: CopilotSidebarUIProviderProps) {\n const [sidebarOpen, setSidebarOpen] = useState(true);\n\n const toggleSidebar = useCallback(() => {\n setSidebarOpen((prev) => !prev);\n }, []);\n\n return (\n <CopilotSidebarContext.Provider value={{ isSidebarOpen: sidebarOpen, toggleSidebar }}>\n <>\n <div\n style={{\n height: \"100vh\",\n width: \"100vw\",\n position: \"relative\",\n }}\n >\n <div\n style={{\n overflowY: \"auto\",\n overflowX: \"hidden\",\n height: \"100%\",\n width: sidebarOpen ? \"calc(100% - 450px)\" : \"100%\",\n position: \"absolute\",\n transition: \"width 0.5s ease-in-out\", // New\n }}\n >\n <main>{children}</main>\n </div>\n <div\n style={{\n overflowY: \"auto\",\n height: \"100%\",\n width: \"450px\",\n position: \"absolute\",\n right: sidebarOpen ? \"0\" : \"-450px\",\n transition: \"right 0.5s ease-in-out\",\n }}\n >\n <TooltipProvider>\n <CopilotSidebar setSidebarOpen={setSidebarOpen} />\n </TooltipProvider>\n </div>\n {!sidebarOpen && (\n <button\n onClick={toggleSidebar}\n style={{\n position: \"absolute\",\n top: \"5%\",\n right: \"20px\",\n transform: \"translateY(-50%)\",\n transition: \"opacity 0.5s ease-in-out\",\n }}\n className=\"bg-slate-100 ring-2 ring-slate-600 font-semibold text-black p-2 rounded-lg shadow-lg\"\n >\n Open Copilot\n </button>\n )}\n </div>\n </>\n </CopilotSidebarContext.Provider>\n );\n}\n"]}
|
package/dist/chunk-CRRPHVT3.mjs
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { DefaultEmptyScreen } from './chunk-EXOYIXGQ.mjs';
|
|
2
|
-
import { ChatList } from './chunk-GBPOPYU3.mjs';
|
|
3
|
-
import { ChatPanel } from './chunk-ZA25IBKF.mjs';
|
|
4
|
-
import { ChatScrollAnchor } from './chunk-6RG3YDAC.mjs';
|
|
5
|
-
import { useCopilotChat } from '@copilotkit/react-core';
|
|
6
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
function CopilotChat({
|
|
9
|
-
id,
|
|
10
|
-
initialMessages,
|
|
11
|
-
makeSystemMessage,
|
|
12
|
-
EmptyScreen = DefaultEmptyScreen
|
|
13
|
-
}) {
|
|
14
|
-
const { visibleMessages, append, reload, stop, isLoading, input, setInput } = useCopilotChat({
|
|
15
|
-
id,
|
|
16
|
-
initialMessages,
|
|
17
|
-
makeSystemMessage
|
|
18
|
-
});
|
|
19
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
20
|
-
className: "w-full h-full flex flex-col overflow-hidden box-border items-start",
|
|
21
|
-
children: [
|
|
22
|
-
/* @__PURE__ */ jsx("div", {
|
|
23
|
-
className: "pt-5 px-5 overflow-y-auto overflow-x-hidden w-full flex-grow",
|
|
24
|
-
children: visibleMessages.length ? /* @__PURE__ */ jsxs("div", {
|
|
25
|
-
className: "pl-0 pr-6",
|
|
26
|
-
children: [
|
|
27
|
-
/* @__PURE__ */ jsx(ChatList, {
|
|
28
|
-
messages: visibleMessages
|
|
29
|
-
}),
|
|
30
|
-
/* @__PURE__ */ jsx(ChatScrollAnchor, {
|
|
31
|
-
trackVisibility: isLoading
|
|
32
|
-
})
|
|
33
|
-
]
|
|
34
|
-
}) : /* @__PURE__ */ jsx(EmptyScreen, {
|
|
35
|
-
setInput
|
|
36
|
-
})
|
|
37
|
-
}),
|
|
38
|
-
/* @__PURE__ */ jsx("div", {
|
|
39
|
-
className: "flex-shrink-0 w-full",
|
|
40
|
-
children: /* @__PURE__ */ jsx(ChatPanel, {
|
|
41
|
-
id,
|
|
42
|
-
isLoading,
|
|
43
|
-
stop,
|
|
44
|
-
append,
|
|
45
|
-
reload,
|
|
46
|
-
messages: visibleMessages,
|
|
47
|
-
input,
|
|
48
|
-
setInput
|
|
49
|
-
})
|
|
50
|
-
})
|
|
51
|
-
]
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export { CopilotChat };
|
|
56
|
-
//# sourceMappingURL=out.js.map
|
|
57
|
-
//# sourceMappingURL=chunk-CRRPHVT3.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/chat-components/copilot-chat.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AASA,SAAS,sBAAsB;AAwBrB,SACE,KADF;AAjCV;AAiBO,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAChB,GAAqB;AACnB,QAAM,EAAE,iBAAiB,QAAQ,QAAQ,MAAM,WAAW,OAAO,SAAS,IAAI,eAAe;AAAA,IAC3F;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE,qBAAC;AAAA,IAAI,WAAU;AAAA,IACb;AAAA,0BAAC;AAAA,QAAI,WAAU;AAAA,QACZ,0BAAgB,SACf,qBAAC;AAAA,UAAI,WAAU;AAAA,UACb;AAAA,gCAAC;AAAA,cAAS,UAAU;AAAA,aAAiB;AAAA,YACrC,oBAAC;AAAA,cAAiB,iBAAiB;AAAA,aAAW;AAAA;AAAA,SAChD,IAEA,oBAAC;AAAA,UAAY;AAAA,SAAoB;AAAA,OAErC;AAAA,MAEA,oBAAC;AAAA,QAAI,WAAU;AAAA,QACb,8BAAC;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,UAAU;AAAA,UACV;AAAA,UACA;AAAA,SACF;AAAA,OACF;AAAA;AAAA,GACF;AAEJ","sourcesContent":["\"use client\";\n\nimport React from \"react\";\n\nimport { ChatList } from \"./chat-list\";\nimport { ChatPanel } from \"./chat-panel\";\nimport { DefaultEmptyScreen, EmptyScreenProps } from \"./default-empty-screen\";\nimport { ChatScrollAnchor } from \"./chat-scroll-anchor\";\nimport { UseCopilotChatOptions } from \"@copilotkit/react-core\";\nimport { useCopilotChat } from \"@copilotkit/react-core\";\n\ninterface ChatComponentInjectionsProps {\n EmptyScreen?: React.FC<EmptyScreenProps>;\n}\n\ninterface CopilotChatProps extends UseCopilotChatOptions, ChatComponentInjectionsProps {}\n\nexport function CopilotChat({\n id,\n initialMessages,\n makeSystemMessage,\n EmptyScreen = DefaultEmptyScreen,\n}: CopilotChatProps) {\n const { visibleMessages, append, reload, stop, isLoading, input, setInput } = useCopilotChat({\n id,\n initialMessages,\n makeSystemMessage,\n });\n\n return (\n <div className=\"w-full h-full flex flex-col overflow-hidden box-border items-start\">\n <div className=\"pt-5 px-5 overflow-y-auto overflow-x-hidden w-full flex-grow\">\n {visibleMessages.length ? (\n <div className=\"pl-0 pr-6\">\n <ChatList messages={visibleMessages} />\n <ChatScrollAnchor trackVisibility={isLoading} />\n </div>\n ) : (\n <EmptyScreen setInput={setInput} />\n )}\n </div>\n\n <div className=\"flex-shrink-0 w-full\">\n <ChatPanel\n id={id}\n isLoading={isLoading}\n stop={stop}\n append={append}\n reload={reload}\n messages={visibleMessages}\n input={input}\n setInput={setInput}\n />\n </div>\n </div>\n );\n}\n"]}
|
package/dist/chunk-D72RVITD.mjs
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
// src/components/chat-components/external-link.tsx
|
|
4
|
-
function ExternalLink({ href, children }) {
|
|
5
|
-
return /* @__PURE__ */ jsxs("a", {
|
|
6
|
-
href,
|
|
7
|
-
target: "_blank",
|
|
8
|
-
className: "inline-flex flex-1 justify-center gap-1 leading-4 hover:underline",
|
|
9
|
-
children: [
|
|
10
|
-
/* @__PURE__ */ jsx("span", {
|
|
11
|
-
children
|
|
12
|
-
}),
|
|
13
|
-
/* @__PURE__ */ jsx("svg", {
|
|
14
|
-
"aria-hidden": "true",
|
|
15
|
-
height: "7",
|
|
16
|
-
viewBox: "0 0 6 6",
|
|
17
|
-
width: "7",
|
|
18
|
-
className: "opacity-70",
|
|
19
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
20
|
-
d: "M1.25215 5.54731L0.622742 4.9179L3.78169 1.75597H1.3834L1.38936 0.890915H5.27615V4.78069H4.40513L4.41109 2.38538L1.25215 5.54731Z",
|
|
21
|
-
fill: "currentColor"
|
|
22
|
-
})
|
|
23
|
-
})
|
|
24
|
-
]
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { ExternalLink };
|
|
29
|
-
//# sourceMappingURL=out.js.map
|
|
30
|
-
//# sourceMappingURL=chunk-D72RVITD.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/chat-components/external-link.tsx"],"names":[],"mappings":";AAEI,SAKE,KALF;AAFG,SAAS,aAAa,EAAE,MAAM,SAAS,GAAgD;AAC5F,SACE,qBAAC;AAAA,IACC;AAAA,IACA,QAAO;AAAA,IACP,WAAU;AAAA,IAEV;AAAA,0BAAC;AAAA,QAAM;AAAA,OAAS;AAAA,MAChB,oBAAC;AAAA,QAAI,eAAY;AAAA,QAAO,QAAO;AAAA,QAAI,SAAQ;AAAA,QAAU,OAAM;AAAA,QAAI,WAAU;AAAA,QACvE,8BAAC;AAAA,UACC,GAAE;AAAA,UACF,MAAK;AAAA,SACN;AAAA,OACH;AAAA;AAAA,GACF;AAEJ","sourcesContent":["export function ExternalLink({ href, children }: { href: string; children: React.ReactNode }) {\n return (\n <a\n href={href}\n target=\"_blank\"\n className=\"inline-flex flex-1 justify-center gap-1 leading-4 hover:underline\"\n >\n <span>{children}</span>\n <svg aria-hidden=\"true\" height=\"7\" viewBox=\"0 0 6 6\" width=\"7\" className=\"opacity-70\">\n <path\n d=\"M1.25215 5.54731L0.622742 4.9179L3.78169 1.75597H1.3834L1.38936 0.890915H5.27615V4.78069H4.40513L4.41109 2.38538L1.25215 5.54731Z\"\n fill=\"currentColor\"\n ></path>\n </svg>\n </a>\n );\n}\n"]}
|
package/dist/chunk-ESP3H6NQ.mjs
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Button } from './chunk-5HCN6SPC.mjs';
|
|
2
|
-
import { IconCheck, IconCopy } from './chunk-34MTYKUD.mjs';
|
|
3
|
-
import { cn } from './chunk-Q6YO7LDK.mjs';
|
|
4
|
-
import { useCopyToClipboard } from './chunk-ZLFSBGYI.mjs';
|
|
5
|
-
import { __objRest, __spreadProps, __spreadValues } from './chunk-MRXNTQOX.mjs';
|
|
6
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
function ChatMessageActions(_a) {
|
|
9
|
-
var _b = _a, { message, className } = _b, props = __objRest(_b, ["message", "className"]);
|
|
10
|
-
const { isCopied, copyToClipboard } = useCopyToClipboard({ timeout: 2e3 });
|
|
11
|
-
const onCopy = () => {
|
|
12
|
-
if (isCopied)
|
|
13
|
-
return;
|
|
14
|
-
copyToClipboard(message.content);
|
|
15
|
-
};
|
|
16
|
-
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({
|
|
17
|
-
className: cn(
|
|
18
|
-
"flex items-center justify-end transition-opacity group-hover:opacity-100 md:absolute md:-right-10 md:-top-2 md:opacity-0",
|
|
19
|
-
className
|
|
20
|
-
)
|
|
21
|
-
}, props), {
|
|
22
|
-
children: /* @__PURE__ */ jsxs(Button, {
|
|
23
|
-
variant: "ghost",
|
|
24
|
-
size: "icon",
|
|
25
|
-
onClick: onCopy,
|
|
26
|
-
children: [
|
|
27
|
-
isCopied ? /* @__PURE__ */ jsx(IconCheck, {}) : /* @__PURE__ */ jsx(IconCopy, {}),
|
|
28
|
-
/* @__PURE__ */ jsx("span", {
|
|
29
|
-
className: "sr-only",
|
|
30
|
-
children: "Copy message"
|
|
31
|
-
})
|
|
32
|
-
]
|
|
33
|
-
})
|
|
34
|
-
}));
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export { ChatMessageActions };
|
|
38
|
-
//# sourceMappingURL=out.js.map
|
|
39
|
-
//# sourceMappingURL=chunk-ESP3H6NQ.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/chat-components/chat-message-actions.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AA6BM,SACc,KADd;AA7BN;AAaO,SAAS,mBAAmB,IAA2D;AAA3D,eAAE,WAAS,UAb9C,IAamC,IAAyB,kBAAzB,IAAyB,CAAvB,WAAS;AAC5C,QAAM,EAAE,UAAU,gBAAgB,IAAI,mBAAmB,EAAE,SAAS,IAAK,CAAC;AAE1E,QAAM,SAAS,MAAM;AACnB,QAAI;AAAU;AACd,oBAAgB,QAAQ,OAAO;AAAA,EACjC;AAEA,SACE,oBAAC;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,KACI,QALL;AAAA,IAOC,+BAAC;AAAA,MAAO,SAAQ;AAAA,MAAQ,MAAK;AAAA,MAAO,SAAS;AAAA,MAC1C;AAAA,mBAAW,oBAAC,aAAU,IAAK,oBAAC,YAAS;AAAA,QACtC,oBAAC;AAAA,UAAK,WAAU;AAAA,UAAU;AAAA,SAAY;AAAA;AAAA,KACxC;AAAA,IACF;AAEJ","sourcesContent":["\"use client\";\n\nimport { type Message } from \"ai\";\n\nimport { Button } from \"./ui/button\";\nimport { IconCheck, IconCopy } from \"./ui/icons\";\nimport { useCopyToClipboard } from \"../../hooks/use-copy-to-clipboard\";\nimport { cn } from \"../../lib/utils\";\n\ninterface ChatMessageActionsProps extends React.ComponentProps<\"div\"> {\n message: Message;\n}\n\nexport function ChatMessageActions({ message, className, ...props }: ChatMessageActionsProps) {\n const { isCopied, copyToClipboard } = useCopyToClipboard({ timeout: 2000 });\n\n const onCopy = () => {\n if (isCopied) return;\n copyToClipboard(message.content);\n };\n\n return (\n <div\n className={cn(\n \"flex items-center justify-end transition-opacity group-hover:opacity-100 md:absolute md:-right-10 md:-top-2 md:opacity-0\",\n className,\n )}\n {...props}\n >\n <Button variant=\"ghost\" size=\"icon\" onClick={onCopy}>\n {isCopied ? <IconCheck /> : <IconCopy />}\n <span className=\"sr-only\">Copy message</span>\n </Button>\n </div>\n );\n}\n"]}
|
package/dist/chunk-EXOYIXGQ.mjs
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { ExternalLink } from './chunk-D72RVITD.mjs';
|
|
2
|
-
import { Button } from './chunk-5HCN6SPC.mjs';
|
|
3
|
-
import { IconArrowRight } from './chunk-34MTYKUD.mjs';
|
|
4
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
var exampleMessages = [
|
|
7
|
-
{
|
|
8
|
-
heading: "Explain technical concepts",
|
|
9
|
-
message: `What is a "serverless function"?`
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
heading: "Summarize an article",
|
|
13
|
-
message: "Summarize the following article for a 2nd grader: \n"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
heading: "Draft an email",
|
|
17
|
-
message: `Draft an email to my boss about the following:
|
|
18
|
-
`
|
|
19
|
-
}
|
|
20
|
-
];
|
|
21
|
-
var DefaultEmptyScreen = (props) => {
|
|
22
|
-
return /* @__PURE__ */ jsx("div", {
|
|
23
|
-
className: "mx-auto max-w-2xl px-4",
|
|
24
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
25
|
-
className: "rounded-lg border bg-background p-8",
|
|
26
|
-
children: [
|
|
27
|
-
/* @__PURE__ */ jsx("h1", {
|
|
28
|
-
className: "mb-2 text-lg font-semibold",
|
|
29
|
-
children: "Welcome to CopilotKit! \u{1F44B}"
|
|
30
|
-
}),
|
|
31
|
-
/* @__PURE__ */ jsxs("p", {
|
|
32
|
-
className: "mb-2 leading-normal text-muted-foreground",
|
|
33
|
-
children: [
|
|
34
|
-
"This is a Copilot built with",
|
|
35
|
-
" ",
|
|
36
|
-
/* @__PURE__ */ jsx(ExternalLink, {
|
|
37
|
-
href: "https://recursively.ai",
|
|
38
|
-
children: "recursively.ai's"
|
|
39
|
-
}),
|
|
40
|
-
" ",
|
|
41
|
-
/* @__PURE__ */ jsx(ExternalLink, {
|
|
42
|
-
href: "https://github.com/RecursivelyAI/CopilotKit",
|
|
43
|
-
children: "CopilotKit"
|
|
44
|
-
}),
|
|
45
|
-
" ",
|
|
46
|
-
"."
|
|
47
|
-
]
|
|
48
|
-
}),
|
|
49
|
-
/* @__PURE__ */ jsx("p", {
|
|
50
|
-
className: "leading-normal text-muted-foreground",
|
|
51
|
-
children: "You can start a conversation here or try the following examples:"
|
|
52
|
-
}),
|
|
53
|
-
/* @__PURE__ */ jsx("div", {
|
|
54
|
-
className: "mt-4 flex flex-col items-start space-y-2",
|
|
55
|
-
children: exampleMessages.map((message, index) => /* @__PURE__ */ jsxs(Button, {
|
|
56
|
-
variant: "link",
|
|
57
|
-
className: "h-auto p-0 text-base",
|
|
58
|
-
onClick: () => props.setInput(message.message),
|
|
59
|
-
children: [
|
|
60
|
-
/* @__PURE__ */ jsx(IconArrowRight, {
|
|
61
|
-
className: "mr-2 text-muted-foreground"
|
|
62
|
-
}),
|
|
63
|
-
message.heading
|
|
64
|
-
]
|
|
65
|
-
}, index))
|
|
66
|
-
})
|
|
67
|
-
]
|
|
68
|
-
})
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export { DefaultEmptyScreen };
|
|
73
|
-
//# sourceMappingURL=out.js.map
|
|
74
|
-
//# sourceMappingURL=chunk-EXOYIXGQ.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/chat-components/default-empty-screen.tsx"],"names":[],"mappings":";;;;;;;;;;;AA+BQ,cACA,YADA;AA/BR;AAQA,IAAM,kBAAkB;AAAA,EACtB;AAAA,IACE,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,SAAS;AAAA,IACT,SAAS;AAAA;AAAA,EACX;AACF;AAMO,IAAM,qBAAiD,CAAC,UAAU;AACvE,SACE,oBAAC;AAAA,IAAI,WAAU;AAAA,IACb,+BAAC;AAAA,MAAI,WAAU;AAAA,MACb;AAAA,4BAAC;AAAA,UAAG,WAAU;AAAA,UAA6B;AAAA,SAAyB;AAAA,QACpE,qBAAC;AAAA,UAAE,WAAU;AAAA,UAA4C;AAAA;AAAA,YAC1B;AAAA,YAC7B,oBAAC;AAAA,cAAa,MAAK;AAAA,cAAyB;AAAA,aAAgB;AAAA,YAAgB;AAAA,YAC5E,oBAAC;AAAA,cAAa,MAAK;AAAA,cAA8C;AAAA,aAAU;AAAA,YAAgB;AAAA,YAAI;AAAA;AAAA,SAEjG;AAAA,QACA,oBAAC;AAAA,UAAE,WAAU;AAAA,UAAuC;AAAA,SAEpD;AAAA,QACA,oBAAC;AAAA,UAAI,WAAU;AAAA,UACZ,0BAAgB,IAAI,CAAC,SAAS,UAC7B,qBAAC;AAAA,YAEC,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,SAAS,MAAM,MAAM,SAAS,QAAQ,OAAO;AAAA,YAE7C;AAAA,kCAAC;AAAA,gBAAe,WAAU;AAAA,eAA6B;AAAA,cACtD,QAAQ;AAAA;AAAA,aANJ,KAOP,CACD;AAAA,SACH;AAAA;AAAA,KACF;AAAA,GACF;AAEJ","sourcesContent":["\"use client\";\nimport React from \"react\";\nimport { UseChatHelpers } from \"ai/react\";\n\nimport { Button } from \"./ui/button\";\nimport { ExternalLink } from \"./external-link\";\nimport { IconArrowRight } from \"./ui/icons\";\n\nconst exampleMessages = [\n {\n heading: \"Explain technical concepts\",\n message: `What is a \"serverless function\"?`,\n },\n {\n heading: \"Summarize an article\",\n message: \"Summarize the following article for a 2nd grader: \\n\",\n },\n {\n heading: \"Draft an email\",\n message: `Draft an email to my boss about the following: \\n`,\n },\n];\n\nexport interface EmptyScreenProps {\n setInput: React.Dispatch<React.SetStateAction<string>>;\n}\n\nexport const DefaultEmptyScreen: React.FC<EmptyScreenProps> = (props) => {\n return (\n <div className=\"mx-auto max-w-2xl px-4\">\n <div className=\"rounded-lg border bg-background p-8\">\n <h1 className=\"mb-2 text-lg font-semibold\">Welcome to CopilotKit! 👋</h1>\n <p className=\"mb-2 leading-normal text-muted-foreground\">\n This is a Copilot built with{\" \"}\n <ExternalLink href=\"https://recursively.ai\">recursively.ai's</ExternalLink>{\" \"}\n <ExternalLink href=\"https://github.com/RecursivelyAI/CopilotKit\">CopilotKit</ExternalLink>{\" \"}\n .\n </p>\n <p className=\"leading-normal text-muted-foreground\">\n You can start a conversation here or try the following examples:\n </p>\n <div className=\"mt-4 flex flex-col items-start space-y-2\">\n {exampleMessages.map((message, index) => (\n <Button\n key={index}\n variant=\"link\"\n className=\"h-auto p-0 text-base\"\n onClick={() => props.setInput(message.message)}\n >\n <IconArrowRight className=\"mr-2 text-muted-foreground\" />\n {message.heading}\n </Button>\n ))}\n </div>\n </div>\n </div>\n );\n};\n"]}
|
package/dist/chunk-GBPOPYU3.mjs
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Separator } from './chunk-VUNHHCOA.mjs';
|
|
2
|
-
import { ChatMessage } from './chunk-XLGSWCCV.mjs';
|
|
3
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
function ChatList({ messages }) {
|
|
6
|
-
const displayedMessages = messages.filter((message) => message.role !== "system");
|
|
7
|
-
if (!displayedMessages.length) {
|
|
8
|
-
return null;
|
|
9
|
-
}
|
|
10
|
-
return /* @__PURE__ */ jsx("div", {
|
|
11
|
-
className: "relative mx-auto max-w-2xl px-0",
|
|
12
|
-
children: displayedMessages.map((message, index) => /* @__PURE__ */ jsxs("div", {
|
|
13
|
-
children: [
|
|
14
|
-
/* @__PURE__ */ jsx(ChatMessage, {
|
|
15
|
-
message
|
|
16
|
-
}),
|
|
17
|
-
index < displayedMessages.length - 1 && /* @__PURE__ */ jsx(Separator, {
|
|
18
|
-
className: "my-4 md:my-4"
|
|
19
|
-
})
|
|
20
|
-
]
|
|
21
|
-
}, index))
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { ChatList };
|
|
26
|
-
//# sourceMappingURL=out.js.map
|
|
27
|
-
//# sourceMappingURL=chunk-GBPOPYU3.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/chat-components/chat-list.tsx"],"names":[],"mappings":";;;;;;;;AAoBQ,SACE,KADF;AAXD,SAAS,SAAS,EAAE,SAAS,GAAa;AAE/C,QAAM,oBAAoB,SAAS,OAAO,CAAC,YAAY,QAAQ,SAAS,QAAQ;AAEhF,MAAI,CAAC,kBAAkB,QAAQ;AAC7B,WAAO;AAAA,EACT;AAEA,SACE,oBAAC;AAAA,IAAI,WAAU;AAAA,IACZ,4BAAkB,IAAI,CAAC,SAAS,UAC/B,qBAAC;AAAA,MACC;AAAA,4BAAC;AAAA,UAAY;AAAA,SAAkB;AAAA,QAC9B,QAAQ,kBAAkB,SAAS,KAAK,oBAAC;AAAA,UAAU,WAAU;AAAA,SAAe;AAAA;AAAA,OAFrE,KAGV,CACD;AAAA,GACH;AAEJ","sourcesContent":["import { type Message } from \"ai\";\n\nimport { Separator } from \"./ui/separator\";\nimport { ChatMessage } from \"./chat-message\";\n\nexport interface ChatList {\n messages: Message[];\n}\n\nexport function ChatList({ messages }: ChatList) {\n // we don't want to display system messages\n const displayedMessages = messages.filter((message) => message.role !== \"system\");\n\n if (!displayedMessages.length) {\n return null;\n }\n\n return (\n <div className=\"relative mx-auto max-w-2xl px-0\">\n {displayedMessages.map((message, index) => (\n <div key={index}>\n <ChatMessage message={message} />\n {index < displayedMessages.length - 1 && <Separator className=\"my-4 md:my-4\" />}\n </div>\n ))}\n </div>\n );\n}\n"]}
|
package/dist/chunk-GWX3NPF5.mjs
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { CopilotChat } from './chunk-CRRPHVT3.mjs';
|
|
2
|
-
import { __spreadValues } from './chunk-MRXNTQOX.mjs';
|
|
3
|
-
import { XMarkIcon } from '@heroicons/react/24/outline';
|
|
4
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
function CopilotSidebar(props) {
|
|
7
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
8
|
-
className: "shadow-lg bg-gray-50 flex flex-col border-l-2",
|
|
9
|
-
style: { width: "100%", height: "100%" },
|
|
10
|
-
children: [
|
|
11
|
-
/* @__PURE__ */ jsx(TopBar, __spreadValues({}, props)),
|
|
12
|
-
/* @__PURE__ */ jsx(CopilotChat, {})
|
|
13
|
-
]
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
function TopBar(props) {
|
|
17
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
18
|
-
className: "py-6 flex bg-gray-50 items-center justify-between px-4",
|
|
19
|
-
children: [
|
|
20
|
-
/* @__PURE__ */ jsx("h1", {
|
|
21
|
-
className: "text-base font-semibold leading-6 text-gray-900",
|
|
22
|
-
children: "Copilot Chat"
|
|
23
|
-
}),
|
|
24
|
-
/* @__PURE__ */ jsx("div", {
|
|
25
|
-
className: "ml-3 flex h-7 items-center",
|
|
26
|
-
children: /* @__PURE__ */ jsxs("button", {
|
|
27
|
-
type: "button",
|
|
28
|
-
className: "rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",
|
|
29
|
-
onClick: () => props.setSidebarOpen(false),
|
|
30
|
-
children: [
|
|
31
|
-
/* @__PURE__ */ jsx("span", {
|
|
32
|
-
className: "sr-only",
|
|
33
|
-
children: "Close panel"
|
|
34
|
-
}),
|
|
35
|
-
/* @__PURE__ */ jsx(XMarkIcon, {
|
|
36
|
-
className: "h-6 w-6",
|
|
37
|
-
"aria-hidden": "true"
|
|
38
|
-
})
|
|
39
|
-
]
|
|
40
|
-
})
|
|
41
|
-
})
|
|
42
|
-
]
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export { CopilotSidebar };
|
|
47
|
-
//# sourceMappingURL=out.js.map
|
|
48
|
-
//# sourceMappingURL=chunk-GWX3NPF5.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/sidebar/copilot-sidebar.tsx"],"names":[],"mappings":";;;;;;;;AAmBA,SAAS,iBAAiB;AAVtB,SAIE,KAJF;AAFG,SAAS,eAAe,OAAkC;AAC/D,SACE,qBAAC;AAAA,IACC,WAAU;AAAA,IACV,OAAO,EAAE,OAAO,QAAQ,QAAQ,OAAO;AAAA,IAEvC;AAAA,0BAAC,2BAAW,MAAO;AAAA,MACnB,oBAAC,eAAY;AAAA;AAAA,GACf;AAEJ;AAIA,SAAS,OAAO,OAAkC;AAChD,SACE,qBAAC;AAAA,IAAI,WAAU;AAAA,IACb;AAAA,0BAAC;AAAA,QAAG,WAAU;AAAA,QAAkD;AAAA,OAAY;AAAA,MAC5E,oBAAC;AAAA,QAAI,WAAU;AAAA,QACb,+BAAC;AAAA,UACC,MAAK;AAAA,UACL,WAAU;AAAA,UACV,SAAS,MAAM,MAAM,eAAe,KAAK;AAAA,UAEzC;AAAA,gCAAC;AAAA,cAAK,WAAU;AAAA,cAAU;AAAA,aAAW;AAAA,YACrC,oBAAC;AAAA,cAAU,WAAU;AAAA,cAAU,eAAY;AAAA,aAAO;AAAA;AAAA,SACpD;AAAA,OACF;AAAA;AAAA,GACF;AAEJ","sourcesContent":["import React from \"react\";\nimport { CopilotChat } from \"../chat-components/copilot-chat\";\n\nexport interface SidebarProps {\n setSidebarOpen: (open: boolean) => void;\n}\n\nexport function CopilotSidebar(props: SidebarProps): JSX.Element {\n return (\n <div\n className=\"shadow-lg bg-gray-50 flex flex-col border-l-2\"\n style={{ width: \"100%\", height: \"100%\" }}\n >\n <TopBar {...props} />\n <CopilotChat />\n </div>\n );\n}\n\nimport { XMarkIcon } from \"@heroicons/react/24/outline\";\n\nfunction TopBar(props: SidebarProps): JSX.Element {\n return (\n <div className=\"py-6 flex bg-gray-50 items-center justify-between px-4\">\n <h1 className=\"text-base font-semibold leading-6 text-gray-900\">Copilot Chat</h1>\n <div className=\"ml-3 flex h-7 items-center\">\n <button\n type=\"button\"\n className=\"rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2\"\n onClick={() => props.setSidebarOpen(false)}\n >\n <span className=\"sr-only\">Close panel</span>\n <XMarkIcon className=\"h-6 w-6\" aria-hidden=\"true\" />\n </button>\n </div>\n </div>\n );\n}\n"]}
|
package/dist/chunk-H4VKQGVU.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/chunk-HKSE5ISX.mjs
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { buttonVariants } from './chunk-5HCN6SPC.mjs';
|
|
2
|
-
import { cn } from './chunk-Q6YO7LDK.mjs';
|
|
3
|
-
import { __objRest, __spreadProps, __spreadValues } from './chunk-MRXNTQOX.mjs';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
6
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
var AlertDialog = AlertDialogPrimitive.Root;
|
|
9
|
-
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
10
|
-
var AlertDialogPortal = (_a) => {
|
|
11
|
-
var _b = _a, {
|
|
12
|
-
className,
|
|
13
|
-
children
|
|
14
|
-
} = _b, props = __objRest(_b, [
|
|
15
|
-
"className",
|
|
16
|
-
"children"
|
|
17
|
-
]);
|
|
18
|
-
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, __spreadProps(__spreadValues({
|
|
19
|
-
className: cn(className)
|
|
20
|
-
}, props), {
|
|
21
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
22
|
-
className: "fixed inset-0 z-50 flex items-end justify-center sm:items-center",
|
|
23
|
-
children
|
|
24
|
-
})
|
|
25
|
-
}));
|
|
26
|
-
};
|
|
27
|
-
AlertDialogPortal.displayName = AlertDialogPrimitive.Portal.displayName;
|
|
28
|
-
var AlertDialogOverlay = React.forwardRef((_a, ref) => {
|
|
29
|
-
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
30
|
-
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Overlay, __spreadProps(__spreadValues({
|
|
31
|
-
className: cn(
|
|
32
|
-
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm transition-opacity animate-in fade-in",
|
|
33
|
-
className
|
|
34
|
-
)
|
|
35
|
-
}, props), {
|
|
36
|
-
ref
|
|
37
|
-
}));
|
|
38
|
-
});
|
|
39
|
-
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
40
|
-
var AlertDialogContent = React.forwardRef((_a, ref) => {
|
|
41
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
42
|
-
return /* @__PURE__ */ jsxs(AlertDialogPortal, {
|
|
43
|
-
children: [
|
|
44
|
-
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
45
|
-
/* @__PURE__ */ jsx(AlertDialogPrimitive.Content, __spreadValues({
|
|
46
|
-
ref,
|
|
47
|
-
className: cn(
|
|
48
|
-
"fixed z-50 grid w-full max-w-lg scale-100 gap-4 border bg-background p-6 opacity-100 shadow-lg animate-in fade-in-90 slide-in-from-bottom-10 sm:rounded-lg sm:zoom-in-90 sm:slide-in-from-bottom-0 md:w-full",
|
|
49
|
-
className
|
|
50
|
-
)
|
|
51
|
-
}, props))
|
|
52
|
-
]
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
56
|
-
var AlertDialogHeader = (_a) => {
|
|
57
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
58
|
-
return /* @__PURE__ */ jsx("div", __spreadValues({
|
|
59
|
-
className: cn("flex flex-col space-y-2 text-center sm:text-left", className)
|
|
60
|
-
}, props));
|
|
61
|
-
};
|
|
62
|
-
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
63
|
-
var AlertDialogFooter = (_a) => {
|
|
64
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
65
|
-
return /* @__PURE__ */ jsx("div", __spreadValues({
|
|
66
|
-
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)
|
|
67
|
-
}, props));
|
|
68
|
-
};
|
|
69
|
-
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
70
|
-
var AlertDialogTitle = React.forwardRef((_a, ref) => {
|
|
71
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
72
|
-
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Title, __spreadValues({
|
|
73
|
-
ref,
|
|
74
|
-
className: cn("text-lg font-semibold", className)
|
|
75
|
-
}, props));
|
|
76
|
-
});
|
|
77
|
-
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
78
|
-
var AlertDialogDescription = React.forwardRef((_a, ref) => {
|
|
79
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
80
|
-
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Description, __spreadValues({
|
|
81
|
-
ref,
|
|
82
|
-
className: cn("text-sm text-muted-foreground", className)
|
|
83
|
-
}, props));
|
|
84
|
-
});
|
|
85
|
-
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
86
|
-
var AlertDialogAction = React.forwardRef((_a, ref) => {
|
|
87
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
88
|
-
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, __spreadValues({
|
|
89
|
-
ref,
|
|
90
|
-
className: cn(buttonVariants(), className)
|
|
91
|
-
}, props));
|
|
92
|
-
});
|
|
93
|
-
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
94
|
-
var AlertDialogCancel = React.forwardRef((_a, ref) => {
|
|
95
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
96
|
-
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Cancel, __spreadValues({
|
|
97
|
-
ref,
|
|
98
|
-
className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className)
|
|
99
|
-
}, props));
|
|
100
|
-
});
|
|
101
|
-
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
102
|
-
|
|
103
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger };
|
|
104
|
-
//# sourceMappingURL=out.js.map
|
|
105
|
-
//# sourceMappingURL=chunk-HKSE5ISX.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/chat-components/ui/alert-dialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAEA,YAAY,WAAW;AACvB,YAAY,0BAA0B;AAelC,cA0BF,YA1BE;AAlBJ;AAQA,IAAM,cAAmC;AAEzC,IAAM,qBAA0C;AAEhD,IAAM,oBAAoB,CAAC,OAIqB;AAJrB,eACzB;AAAA;AAAA,IACA;AAAA,EAdF,IAY2B,IAGtB,kBAHsB,IAGtB;AAAA,IAFH;AAAA,IACA;AAAA;AAGA,6BAAsB,6BAArB;AAAA,IAA4B,WAAW,GAAG,SAAS;AAAA,KAAO,QAA1D;AAAA,IACC,8BAAC;AAAA,MAAI,WAAU;AAAA,MACZ;AAAA,KACH;AAAA,IACF;AAAA;AAEF,kBAAkB,cAAmC,4BAAO;AAE5D,IAAM,qBAA2B,iBAG/B,CAAC,IAAmC,QAAK;AAAxC,eAAE,aAAW,SA5BhB,IA4BG,IAA0B,kBAA1B,IAA0B,CAAxB,aAAW;AACd,6BAAsB,8BAArB;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,KACI,QALL;AAAA,IAMC;AAAA,IACF;AAAA,CACD;AACD,mBAAmB,cAAmC,6BAAQ;AAE9D,IAAM,qBAA2B,iBAG/B,CAAC,IAAyB,QAAK;AAA9B,eAAE,YA3CL,IA2CG,IAAgB,kBAAhB,IAAgB,CAAd;AACH,8BAAC;AAAA,IACC;AAAA,0BAAC,sBAAmB;AAAA,MACpB,oBAAsB,8BAArB;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,SACI,MACN;AAAA;AAAA,GACF;AAAA,CACD;AACD,mBAAmB,cAAmC,6BAAQ;AAE9D,IAAM,oBAAoB,CAAC,OAA+D;AAA/D,eAAE,YA1D7B,IA0D2B,IAAgB,kBAAhB,IAAgB,CAAd;AAC3B,6BAAC;AAAA,IAAI,WAAW,GAAG,oDAAoD,SAAS;AAAA,KAAO,MAAO;AAAA;AAEhG,kBAAkB,cAAc;AAEhC,IAAM,oBAAoB,CAAC,OAA+D;AAA/D,eAAE,YA/D7B,IA+D2B,IAAgB,kBAAhB,IAAgB,CAAd;AAC3B,6BAAC;AAAA,IACC,WAAW,GAAG,iEAAiE,SAAS;AAAA,KACpF,MACN;AAAA;AAEF,kBAAkB,cAAc;AAEhC,IAAM,mBAAyB,iBAG7B,CAAC,IAAyB,QAAK;AAA9B,eAAE,YA1EL,IA0EG,IAAgB,kBAAhB,IAAgB,CAAd;AACH,6BAAsB,4BAArB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,yBAAyB,SAAS;AAAA,KAC5C,MACN;AAAA,CACD;AACD,iBAAiB,cAAmC,2BAAM;AAE1D,IAAM,yBAA+B,iBAGnC,CAAC,IAAyB,QAAK;AAA9B,eAAE,YAtFL,IAsFG,IAAgB,kBAAhB,IAAgB,CAAd;AACH,6BAAsB,kCAArB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,iCAAiC,SAAS;AAAA,KACpD,MACN;AAAA,CACD;AACD,uBAAuB,cAAmC,iCAAY;AAEtE,IAAM,oBAA0B,iBAG9B,CAAC,IAAyB,QAAK;AAA9B,eAAE,YAlGL,IAkGG,IAAgB,kBAAhB,IAAgB,CAAd;AACH,6BAAsB,6BAArB;AAAA,IAA4B;AAAA,IAAU,WAAW,GAAG,eAAe,GAAG,SAAS;AAAA,KAAO,MAAO;AAAA,CAC/F;AACD,kBAAkB,cAAmC,4BAAO;AAE5D,IAAM,oBAA0B,iBAG9B,CAAC,IAAyB,QAAK;AAA9B,eAAE,YA1GL,IA0GG,IAAgB,kBAAhB,IAAgB,CAAd;AACH,6BAAsB,6BAArB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,eAAe,EAAE,SAAS,UAAU,CAAC,GAAG,gBAAgB,SAAS;AAAA,KAC3E,MACN;AAAA,CACD;AACD,kBAAkB,cAAmC,4BAAO","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\n\nimport { cn } from \"../../../lib/utils\";\nimport { buttonVariants } from \"./button\";\n\nconst AlertDialog = AlertDialogPrimitive.Root;\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\nconst AlertDialogPortal = ({\n className,\n children,\n ...props\n}: AlertDialogPrimitive.AlertDialogPortalProps) => (\n <AlertDialogPrimitive.Portal className={cn(className)} {...props}>\n <div className=\"fixed inset-0 z-50 flex items-end justify-center sm:items-center\">\n {children}\n </div>\n </AlertDialogPrimitive.Portal>\n);\nAlertDialogPortal.displayName = AlertDialogPrimitive.Portal.displayName;\n\nconst AlertDialogOverlay = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, children, ...props }, ref) => (\n <AlertDialogPrimitive.Overlay\n className={cn(\n \"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm transition-opacity animate-in fade-in\",\n className,\n )}\n {...props}\n ref={ref}\n />\n));\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;\n\nconst AlertDialogContent = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed z-50 grid w-full max-w-lg scale-100 gap-4 border bg-background p-6 opacity-100 shadow-lg animate-in fade-in-90 slide-in-from-bottom-10 sm:rounded-lg sm:zoom-in-90 sm:slide-in-from-bottom-0 md:w-full\",\n className,\n )}\n {...props}\n />\n </AlertDialogPortal>\n));\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\n\nconst AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"flex flex-col space-y-2 text-center sm:text-left\", className)} {...props} />\n);\nAlertDialogHeader.displayName = \"AlertDialogHeader\";\n\nconst AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)}\n {...props}\n />\n);\nAlertDialogFooter.displayName = \"AlertDialogFooter\";\n\nconst AlertDialogTitle = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold\", className)}\n {...props}\n />\n));\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\n\nconst AlertDialogDescription = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nAlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;\n\nconst AlertDialogAction = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Action>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Action ref={ref} className={cn(buttonVariants(), className)} {...props} />\n));\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\n\nconst AlertDialogCancel = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Cancel\n ref={ref}\n className={cn(buttonVariants({ variant: \"outline\" }), \"mt-2 sm:mt-0\", className)}\n {...props}\n />\n));\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\n\nexport {\n AlertDialog,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n};\n"]}
|
package/dist/chunk-IU3WTXLQ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|