@copilotkit/react-ui 1.5.1-next.2 → 1.5.1-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/{chunk-F2W5FD7L.mjs → chunk-2B57NCBA.mjs} +3 -3
- package/dist/{chunk-PNQVKBPN.mjs → chunk-4FIGRRFS.mjs} +2 -2
- package/dist/{chunk-PNQVKBPN.mjs.map → chunk-4FIGRRFS.mjs.map} +1 -1
- package/dist/{chunk-EMQEEXUB.mjs → chunk-4LUMV4YO.mjs} +3 -8
- package/dist/chunk-4LUMV4YO.mjs.map +1 -0
- package/dist/{chunk-BH6PCAAL.mjs → chunk-4T3TMQNJ.mjs} +2 -38
- package/dist/chunk-4T3TMQNJ.mjs.map +1 -0
- package/dist/{chunk-UWVGLGFQ.mjs → chunk-63ZKP62F.mjs} +4 -8
- package/dist/chunk-63ZKP62F.mjs.map +1 -0
- package/dist/{chunk-DCNCY2PL.mjs → chunk-DHGDU64D.mjs} +11 -114
- package/dist/chunk-DHGDU64D.mjs.map +1 -0
- package/dist/{chunk-3E7HY2UN.mjs → chunk-OMTPWC7T.mjs} +4 -5
- package/dist/chunk-OMTPWC7T.mjs.map +1 -0
- package/dist/{chunk-7II4YL7R.mjs → chunk-RKPANT3F.mjs} +6 -2
- package/dist/chunk-RKPANT3F.mjs.map +1 -0
- package/dist/{chunk-WSMMTZCM.mjs → chunk-TKFQ7VQR.mjs} +2 -2
- package/dist/{chunk-375NVWZM.mjs → chunk-VYKDFXGS.mjs} +2 -2
- package/dist/chunk-WOUWNTAV.mjs +72 -0
- package/dist/chunk-WOUWNTAV.mjs.map +1 -0
- package/dist/components/chat/Chat.d.ts +5 -50
- package/dist/components/chat/Chat.js +41 -249
- package/dist/components/chat/Chat.js.map +1 -1
- package/dist/components/chat/Chat.mjs +8 -8
- package/dist/components/chat/Input.js +2 -7
- package/dist/components/chat/Input.js.map +1 -1
- package/dist/components/chat/Input.mjs +1 -1
- package/dist/components/chat/Messages.d.ts +3 -3
- package/dist/components/chat/Messages.js.map +1 -1
- package/dist/components/chat/Messages.mjs +1 -1
- package/dist/components/chat/Modal.d.ts +1 -1
- package/dist/components/chat/Modal.js +41 -253
- package/dist/components/chat/Modal.js.map +1 -1
- package/dist/components/chat/Modal.mjs +9 -9
- package/dist/components/chat/Popup.js +41 -253
- package/dist/components/chat/Popup.js.map +1 -1
- package/dist/components/chat/Popup.mjs +10 -10
- package/dist/components/chat/Sidebar.js +41 -253
- package/dist/components/chat/Sidebar.js.map +1 -1
- package/dist/components/chat/Sidebar.mjs +10 -10
- package/dist/components/chat/index.js +41 -253
- package/dist/components/chat/index.js.map +1 -1
- package/dist/components/chat/index.mjs +11 -11
- package/dist/components/chat/messages/RenderActionExecutionMessage.js +3 -4
- package/dist/components/chat/messages/RenderActionExecutionMessage.js.map +1 -1
- package/dist/components/chat/messages/RenderActionExecutionMessage.mjs +1 -1
- package/dist/components/dev-console/console.js +28 -128
- package/dist/components/dev-console/console.js.map +1 -1
- package/dist/components/dev-console/console.mjs +4 -4
- package/dist/components/dev-console/index.js +28 -128
- package/dist/components/dev-console/index.js.map +1 -1
- package/dist/components/dev-console/index.mjs +4 -4
- package/dist/components/dev-console/utils.js +1 -1
- package/dist/components/dev-console/utils.js.map +1 -1
- package/dist/components/dev-console/utils.mjs +1 -1
- package/dist/components/help-modal/icons.d.ts +1 -4
- package/dist/components/help-modal/icons.js +2 -39
- package/dist/components/help-modal/icons.js.map +1 -1
- package/dist/components/help-modal/icons.mjs +3 -5
- package/dist/components/help-modal/index.js +27 -147
- package/dist/components/help-modal/index.js.map +1 -1
- package/dist/components/help-modal/index.mjs +2 -2
- package/dist/components/help-modal/modal.js +27 -147
- package/dist/components/help-modal/modal.js.map +1 -1
- package/dist/components/help-modal/modal.mjs +2 -2
- package/dist/components/index.js +41 -253
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +11 -11
- package/dist/index.js +43 -255
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -11
- package/package.json +4 -4
- package/dist/chunk-3E7HY2UN.mjs.map +0 -1
- package/dist/chunk-7II4YL7R.mjs.map +0 -1
- package/dist/chunk-BH6PCAAL.mjs.map +0 -1
- package/dist/chunk-DCNCY2PL.mjs.map +0 -1
- package/dist/chunk-EMQEEXUB.mjs.map +0 -1
- package/dist/chunk-TI7SY2RI.mjs +0 -164
- package/dist/chunk-TI7SY2RI.mjs.map +0 -1
- package/dist/chunk-UWVGLGFQ.mjs.map +0 -1
- /package/dist/{chunk-F2W5FD7L.mjs.map → chunk-2B57NCBA.mjs.map} +0 -0
- /package/dist/{chunk-WSMMTZCM.mjs.map → chunk-TKFQ7VQR.mjs.map} +0 -0
- /package/dist/{chunk-375NVWZM.mjs.map → chunk-VYKDFXGS.mjs.map} +0 -0
|
@@ -16,26 +16,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var __async = (__this, __arguments, generator) => {
|
|
20
|
-
return new Promise((resolve, reject) => {
|
|
21
|
-
var fulfilled = (value) => {
|
|
22
|
-
try {
|
|
23
|
-
step(generator.next(value));
|
|
24
|
-
} catch (e) {
|
|
25
|
-
reject(e);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
var rejected = (value) => {
|
|
29
|
-
try {
|
|
30
|
-
step(generator.throw(value));
|
|
31
|
-
} catch (e) {
|
|
32
|
-
reject(e);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
36
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
19
|
|
|
40
20
|
// src/components/help-modal/index.tsx
|
|
41
21
|
var help_modal_exports = {};
|
|
@@ -49,52 +29,41 @@ var import_react = require("react");
|
|
|
49
29
|
|
|
50
30
|
// src/components/help-modal/icons.tsx
|
|
51
31
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
52
|
-
var
|
|
32
|
+
var LifeBuoyIcon = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
53
33
|
"svg",
|
|
54
34
|
{
|
|
55
35
|
xmlns: "http://www.w3.org/2000/svg",
|
|
56
|
-
|
|
36
|
+
width: "24",
|
|
37
|
+
height: "24",
|
|
57
38
|
viewBox: "0 0 24 24",
|
|
58
|
-
|
|
39
|
+
fill: "none",
|
|
59
40
|
stroke: "currentColor",
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
41
|
+
strokeWidth: "2",
|
|
42
|
+
strokeLinecap: "round",
|
|
43
|
+
strokeLinejoin: "round",
|
|
44
|
+
className: "icon icon-tabler icons-tabler-outline icon-tabler-lifebuoy",
|
|
45
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { transform: "translate(0, -1)", children: [
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" }),
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" }),
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M15 15l3.35 3.35" }),
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M9 15l-3.35 3.35" }),
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M5.65 5.65l3.35 3.35" }),
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M18.35 5.65l-3.35 3.35" })
|
|
53
|
+
] })
|
|
63
54
|
}
|
|
64
55
|
);
|
|
65
|
-
var
|
|
56
|
+
var CloseIcon = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
66
57
|
"svg",
|
|
67
58
|
{
|
|
68
|
-
style: {
|
|
69
|
-
animation: "copilotKitSpinAnimation 1s linear infinite",
|
|
70
|
-
color
|
|
71
|
-
},
|
|
72
|
-
width: "24",
|
|
73
|
-
height: "24",
|
|
74
59
|
xmlns: "http://www.w3.org/2000/svg",
|
|
75
60
|
fill: "none",
|
|
76
61
|
viewBox: "0 0 24 24",
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
cx: "12",
|
|
83
|
-
cy: "12",
|
|
84
|
-
r: "10",
|
|
85
|
-
stroke: "currentColor",
|
|
86
|
-
strokeWidth: "4"
|
|
87
|
-
}
|
|
88
|
-
),
|
|
89
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
90
|
-
"path",
|
|
91
|
-
{
|
|
92
|
-
style: { opacity: 0.75 },
|
|
93
|
-
fill: "currentColor",
|
|
94
|
-
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
95
|
-
}
|
|
96
|
-
)
|
|
97
|
-
]
|
|
62
|
+
strokeWidth: "1.5",
|
|
63
|
+
stroke: "currentColor",
|
|
64
|
+
width: "20",
|
|
65
|
+
height: "20",
|
|
66
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
98
67
|
}
|
|
99
68
|
);
|
|
100
69
|
|
|
@@ -103,52 +72,18 @@ var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
|
103
72
|
function CopilotKitHelpModal() {
|
|
104
73
|
const [showHelpModal, setShowHelpModal] = (0, import_react.useState)(false);
|
|
105
74
|
const [issueDescription, setIssueDescription] = (0, import_react.useState)("");
|
|
106
|
-
const
|
|
107
|
-
const [emailError, setEmailError] = (0, import_react.useState)("");
|
|
108
|
-
const [submitting, setSubmitting] = (0, import_react.useState)(false);
|
|
109
|
-
const validateEmail = (email2) => {
|
|
110
|
-
const re = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
111
|
-
return re.test(email2);
|
|
112
|
-
};
|
|
113
|
-
const handleSubmit = (e) => __async(this, null, function* () {
|
|
114
|
-
e.preventDefault();
|
|
115
|
-
if ((email == null ? void 0 : email.length) > 0 && !validateEmail(email)) {
|
|
116
|
-
setEmailError("Please enter a valid email address");
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
setSubmitting(true);
|
|
120
|
-
yield fetch("https://api.segment.io/v1/track", {
|
|
121
|
-
method: "POST",
|
|
122
|
-
headers: {
|
|
123
|
-
"Content-Type": "application/json"
|
|
124
|
-
},
|
|
125
|
-
body: JSON.stringify({
|
|
126
|
-
event: "oss.dev-console.help",
|
|
127
|
-
anonymousId: window.crypto.randomUUID(),
|
|
128
|
-
properties: { email, text: issueDescription },
|
|
129
|
-
writeKey: "q0gQqvGYyw9pNyhIocNzefSYKGO1aiwW"
|
|
130
|
-
})
|
|
131
|
-
});
|
|
132
|
-
setEmailError("");
|
|
133
|
-
setEmail("");
|
|
134
|
-
setIssueDescription("");
|
|
135
|
-
setSubmitting(false);
|
|
75
|
+
const handleSubmit = () => {
|
|
136
76
|
setShowHelpModal(false);
|
|
137
|
-
}
|
|
77
|
+
};
|
|
138
78
|
const HelpButton = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
139
79
|
"button",
|
|
140
80
|
{
|
|
141
81
|
onClick: () => setShowHelpModal(true),
|
|
142
|
-
|
|
143
|
-
className: "text-sm p-0 bg-transparent rounded border border-blue-500",
|
|
82
|
+
className: "p-2 bg-transparent rounded-full shadow-lg hover:shadow-xl transition-shadow duration-300 focus:outline-none focus:ring-2 focus:ring-blue-500",
|
|
144
83
|
"aria-label": "Open Help",
|
|
145
|
-
children:
|
|
84
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LifeBuoyIcon, {})
|
|
146
85
|
}
|
|
147
86
|
);
|
|
148
|
-
const submitButtonDisabled = (0, import_react.useMemo)(
|
|
149
|
-
() => submitting || !!emailError || issueDescription == null || (issueDescription == null ? void 0 : issueDescription.length) == 0,
|
|
150
|
-
[submitting, emailError, issueDescription]
|
|
151
|
-
);
|
|
152
87
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
153
88
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(HelpButton, {}),
|
|
154
89
|
showHelpModal && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
@@ -169,15 +104,6 @@ function CopilotKitHelpModal() {
|
|
|
169
104
|
),
|
|
170
105
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "w-full flex mb-6 justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h2", { className: "text-2xl font-bold", children: "Help Options" }) }),
|
|
171
106
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "space-y-4 mb-4", children: [
|
|
172
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
173
|
-
"a",
|
|
174
|
-
{
|
|
175
|
-
href: "https://docs.copilotkit.ai/coagents/troubleshooting/common-issues",
|
|
176
|
-
target: "_blank",
|
|
177
|
-
rel: "noopener noreferrer",
|
|
178
|
-
children: "Visit the Troubleshooting and FAQ section in the docs"
|
|
179
|
-
}
|
|
180
|
-
) }),
|
|
181
107
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
182
108
|
"a",
|
|
183
109
|
{
|
|
@@ -196,52 +122,6 @@ function CopilotKitHelpModal() {
|
|
|
196
122
|
children: "Apply for Priority Direct Slack Support"
|
|
197
123
|
}
|
|
198
124
|
) })
|
|
199
|
-
] }),
|
|
200
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("form", { onSubmit: handleSubmit, className: "flex flex-col space-y-2", children: [
|
|
201
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
|
|
202
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { htmlFor: "feedback", className: "block text-sm font-medium text-gray-700 mb-1", children: "Let us know what your issue is:" }),
|
|
203
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
204
|
-
"textarea",
|
|
205
|
-
{
|
|
206
|
-
id: "feedback",
|
|
207
|
-
rows: 4,
|
|
208
|
-
className: "w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500",
|
|
209
|
-
placeholder: "A Loom link / screen recording is always great!",
|
|
210
|
-
onChange: (e) => setIssueDescription(e.target.value),
|
|
211
|
-
value: issueDescription,
|
|
212
|
-
required: true
|
|
213
|
-
}
|
|
214
|
-
)
|
|
215
|
-
] }),
|
|
216
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
|
|
217
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { htmlFor: "email", className: "block text-sm font-medium text-gray-700 mb-1", children: "Email (optional):" }),
|
|
218
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
219
|
-
"input",
|
|
220
|
-
{
|
|
221
|
-
type: "email",
|
|
222
|
-
id: "email",
|
|
223
|
-
className: `w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500 ${emailError ? "border-red-500" : ""}`,
|
|
224
|
-
placeholder: "Enter your email for follow-up",
|
|
225
|
-
onChange: (e) => {
|
|
226
|
-
setEmail(e.target.value);
|
|
227
|
-
setEmailError("");
|
|
228
|
-
},
|
|
229
|
-
value: email
|
|
230
|
-
}
|
|
231
|
-
),
|
|
232
|
-
emailError && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-red-500 text-sm mt-1", children: emailError })
|
|
233
|
-
] }),
|
|
234
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "bg-gray-50 px-4 py-4 sm:px-6 sm:flex sm:flex-row-reverse rounded-b-lg", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
235
|
-
"button",
|
|
236
|
-
{
|
|
237
|
-
type: "submit",
|
|
238
|
-
onClick: handleSubmit,
|
|
239
|
-
disabled: submitButtonDisabled,
|
|
240
|
-
style: submitButtonDisabled ? { backgroundColor: "rgb(216, 216, 216)", color: "rgb(129, 129, 129)" } : void 0,
|
|
241
|
-
className: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-500 text-base font-medium text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm disabled:shadow-none",
|
|
242
|
-
children: submitting ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LoadingSpinnerIcon, { color: "white" }) : "Submit"
|
|
243
|
-
}
|
|
244
|
-
) })
|
|
245
125
|
] })
|
|
246
126
|
] })
|
|
247
127
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/help-modal/index.tsx","../../../src/components/help-modal/modal.tsx","../../../src/components/help-modal/icons.tsx"],"sourcesContent":["export { CopilotKitHelpModal } from \"./modal\";\n","import React, { useMemo, useState } from \"react\";\nimport { CloseIcon, LifeBuoyIcon, LoadingSpinnerIcon } from \"./icons\";\n\nexport function CopilotKitHelpModal() {\n const [showHelpModal, setShowHelpModal] = useState(false);\n const [issueDescription, setIssueDescription] = useState(\"\");\n const [email, setEmail] = useState(\"\");\n const [emailError, setEmailError] = useState(\"\");\n const [submitting, setSubmitting] = useState(false);\n\n const validateEmail = (email: string) => {\n const re = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/;\n return re.test(email);\n };\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n\n if (email?.length > 0 && !validateEmail(email)) {\n setEmailError(\"Please enter a valid email address\");\n return;\n }\n setSubmitting(true);\n\n await fetch(\"https://api.segment.io/v1/track\", {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n event: \"oss.dev-console.help\",\n anonymousId: window.crypto.randomUUID(),\n properties: { email, text: issueDescription },\n writeKey: \"q0gQqvGYyw9pNyhIocNzefSYKGO1aiwW\",\n }),\n });\n\n // Reset\n setEmailError(\"\");\n setEmail(\"\");\n setIssueDescription(\"\");\n setSubmitting(false);\n setShowHelpModal(false);\n };\n\n const HelpButton = () => (\n <button\n onClick={() => setShowHelpModal(true)}\n style={{ width: \"50px\", height: \"30px\", marginRight: \"0.25rem\" }}\n className=\"text-sm p-0 bg-transparent rounded border border-blue-500\"\n aria-label=\"Open Help\"\n >\n Help\n </button>\n );\n\n const submitButtonDisabled = useMemo(\n () => submitting || !!emailError || issueDescription == null || issueDescription?.length == 0,\n [submitting, emailError, issueDescription],\n );\n\n return (\n <>\n <HelpButton />\n {showHelpModal && (\n <div\n className=\"fixed inset-0 flex items-center justify-center p-4\"\n style={{ backgroundColor: \"rgba(11, 15, 26, 0.5)\", zIndex: 99 }}\n >\n <div className=\"bg-white rounded-lg shadow-xl max-w-md w-full p-4 flex-col relative\">\n <button\n className=\"absolute text-gray-400 hover:text-gray-600 focus:outline-none\"\n style={{ top: \"10px\", right: \"10px\" }}\n onClick={() => setShowHelpModal(false)}\n aria-label=\"Close\"\n >\n <CloseIcon />\n </button>\n <div className=\"w-full flex mb-6 justify-center\">\n <h2 className=\"text-2xl font-bold\">Help Options</h2>\n </div>\n <div className=\"space-y-4 mb-4\">\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://docs.copilotkit.ai/coagents/troubleshooting/common-issues\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Visit the Troubleshooting and FAQ section in the docs\n </a>\n </div>\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://go.copilotkit.ai/dev-console-support-discord\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Go to Discord Support Channel (Community Support)\n </a>\n </div>\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://go.copilotkit.ai/dev-console-support-slack\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Apply for Priority Direct Slack Support\n </a>\n </div>\n </div>\n <form onSubmit={handleSubmit} className=\"flex flex-col space-y-2\">\n <div>\n <label htmlFor=\"feedback\" className=\"block text-sm font-medium text-gray-700 mb-1\">\n Let us know what your issue is:\n </label>\n <textarea\n id=\"feedback\"\n rows={4}\n className=\"w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500\"\n placeholder=\"A Loom link / screen recording is always great!\"\n onChange={(e) => setIssueDescription(e.target.value)}\n value={issueDescription}\n required\n ></textarea>\n </div>\n <div>\n <label htmlFor=\"email\" className=\"block text-sm font-medium text-gray-700 mb-1\">\n Email (optional):\n </label>\n <input\n type=\"email\"\n id=\"email\"\n className={`w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500 ${emailError ? \"border-red-500\" : \"\"}`}\n placeholder=\"Enter your email for follow-up\"\n onChange={(e) => {\n setEmail(e.target.value);\n setEmailError(\"\");\n }}\n value={email}\n />\n {emailError && <p className=\"text-red-500 text-sm mt-1\">{emailError}</p>}\n </div>\n <div className=\"bg-gray-50 px-4 py-4 sm:px-6 sm:flex sm:flex-row-reverse rounded-b-lg\">\n <button\n type=\"submit\"\n onClick={handleSubmit}\n disabled={submitButtonDisabled}\n style={\n submitButtonDisabled\n ? { backgroundColor: \"rgb(216, 216, 216)\", color: \"rgb(129, 129, 129)\" }\n : undefined\n }\n className=\"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-500 text-base font-medium text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm disabled:shadow-none\"\n >\n {submitting ? <LoadingSpinnerIcon color=\"white\" /> : \"Submit\"}\n </button>\n </div>\n </form>\n </div>\n </div>\n )}\n </>\n );\n}\n","import React from \"react\";\n\nexport const LifeBuoyIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"icon icon-tabler icons-tabler-outline icon-tabler-lifebuoy\"\n >\n <g transform=\"translate(0, -1)\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0\" />\n <path d=\"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0\" />\n <path d=\"M15 15l3.35 3.35\" />\n <path d=\"M9 15l-3.35 3.35\" />\n <path d=\"M5.65 5.65l3.35 3.35\" />\n <path d=\"M18.35 5.65l-3.35 3.35\" />\n </g>\n </svg>\n);\n\nexport const CloseIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"1.5\"\n stroke=\"currentColor\"\n width=\"20\"\n height=\"20\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n);\n\nexport const LoadingSpinnerIcon = ({ color = \"rgb(107 114 128)\" }: { color?: string }) => (\n <svg\n style={{\n animation: \"copilotKitSpinAnimation 1s linear infinite\",\n color,\n }}\n width=\"24\"\n height=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n style={{ opacity: 0.25 }}\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n ></circle>\n <path\n style={{ opacity: 0.75 }}\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAyC;;;ACerC;AAYG,IAAM,YAAY,MACvB;AAAA,EAAC;AAAA;AAAA,IACC,OAAM;AAAA,IACN,MAAK;AAAA,IACL,SAAQ;AAAA,IACR,aAAY;AAAA,IACZ,QAAO;AAAA,IACP,OAAM;AAAA,IACN,QAAO;AAAA,IAEP,sDAAC,UAAK,eAAc,SAAQ,gBAAe,SAAQ,GAAE,wBAAuB;AAAA;AAC9E;AAGK,IAAM,qBAAqB,CAAC,EAAE,QAAQ,mBAAmB,MAC9D;AAAA,EAAC;AAAA;AAAA,IACC,OAAO;AAAA,MACL,WAAW;AAAA,MACX;AAAA,IACF;AAAA,IACA,OAAM;AAAA,IACN,QAAO;AAAA,IACP,OAAM;AAAA,IACN,MAAK;AAAA,IACL,SAAQ;AAAA,IAER;AAAA;AAAA,QAAC;AAAA;A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GACF;AAAA,aACF;AAAA,UACA,8CAAC,UAAK,UAAU,cAAc,WAAU,2BACtC;AAAA,0DAAC,SACC;AAAA,2DAAC,WAAM,SAAQ,YAAW,WAAU,gDAA+C,6CAEnF;AAAA,cACA;AAAA,gBAAC;AAAA;AAAA,kBACC,IAAG;AAAA,kBACH,MAAM;AAAA,kBACN,WAAU;AAAA,kBACV,aAAY;AAAA,kBACZ,UAAU,CAAC,MAAM,oBAAoB,EAAE,OAAO,KAAK;AAAA,kBACnD,OAAO;AAAA,kBACP,UAAQ;AAAA;AAAA,cACT;AAAA,eACH;AAAA,YACA,8CAAC,SACC;AAAA,2DAAC,WAAM,SAAQ,SAAQ,WAAU,gDAA+C,+BAEhF;AAAA,cACA;AAAA,gBAAC;AAAA;AAAA,kBACC,MAAK;AAAA,kBACL,IAAG;AAAA,kBACH,WAAW,6FAA6F,aAAa,mBAAmB;AAAA,kBACxI,aAAY;AAAA,kBACZ,UAAU,CAAC,MAAM;AACf,6BAAS,EAAE,OAAO,KAAK;AACvB,kCAAc,EAAE;AAAA,kBAClB;AAAA,kBACA,OAAO;AAAA;AAAA,cACT;AAAA,cACC,cAAc,6CAAC,OAAE,WAAU,6BAA6B,sBAAW;AAAA,eACtE;AAAA,YACA,6CAAC,SAAI,WAAU,yEACb;AAAA,cAAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBACL,SAAS;AAAA,gBACT,UAAU;AAAA,gBACV,OACE,uBACI,EAAE,iBAAiB,sBAAsB,OAAO,qBAAqB,IACrE;AAAA,gBAEN,WAAU;AAAA,gBAET,uBAAa,6CAAC,sBAAmB,OAAM,SAAQ,IAAK;AAAA;AAAA,YACvD,GACF;AAAA,aACF;AAAA,WACF;AAAA;AAAA,IACF;AAAA,KAEJ;AAEJ;","names":["import_jsx_runtime","email"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/help-modal/index.tsx","../../../src/components/help-modal/modal.tsx","../../../src/components/help-modal/icons.tsx"],"sourcesContent":["export { CopilotKitHelpModal } from \"./modal\";\n","import React, { useState } from \"react\";\nimport { CloseIcon, LifeBuoyIcon } from \"./icons\";\n\nexport function CopilotKitHelpModal() {\n const [showHelpModal, setShowHelpModal] = useState(false);\n const [issueDescription, setIssueDescription] = useState(\"\");\n\n const handleSubmit = () => {\n // submit issueDescription\n setShowHelpModal(false);\n };\n\n const HelpButton = () => (\n <button\n onClick={() => setShowHelpModal(true)}\n className=\"p-2 bg-transparent rounded-full shadow-lg hover:shadow-xl transition-shadow duration-300 focus:outline-none focus:ring-2 focus:ring-blue-500\"\n aria-label=\"Open Help\"\n >\n <LifeBuoyIcon />\n </button>\n );\n\n return (\n <>\n <HelpButton />\n {showHelpModal && (\n <div\n className=\"fixed inset-0 flex items-center justify-center p-4\"\n style={{ backgroundColor: \"rgba(11, 15, 26, 0.5)\", zIndex: 99 }}\n >\n <div className=\"bg-white rounded-lg shadow-xl max-w-md w-full p-4 flex-col relative\">\n <button\n className=\"absolute text-gray-400 hover:text-gray-600 focus:outline-none\"\n style={{ top: \"10px\", right: \"10px\" }}\n onClick={() => setShowHelpModal(false)}\n aria-label=\"Close\"\n >\n <CloseIcon />\n </button>\n <div className=\"w-full flex mb-6 justify-center\">\n <h2 className=\"text-2xl font-bold\">Help Options</h2>\n </div>\n <div className=\"space-y-4 mb-4\">\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://go.copilotkit.ai/dev-console-support-discord\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Go to Discord Support Channel (Community Support)\n </a>\n </div>\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://go.copilotkit.ai/dev-console-support-slack\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Apply for Priority Direct Slack Support\n </a>\n </div>\n </div>\n {/*<form onSubmit={handleSubmit} className=\"flex flex-col space-y-4\">*/}\n {/* <div>*/}\n {/* <label htmlFor=\"feedback\" className=\"block text-sm font-medium text-gray-700 mb-1\">*/}\n {/* Let us know what your issue is:*/}\n {/* </label>*/}\n {/* <textarea*/}\n {/* id=\"feedback\"*/}\n {/* rows={4}*/}\n {/* className=\"w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500\"*/}\n {/* placeholder=\"A Loom link / screen recording is always great!\"*/}\n {/* onChange={e => setIssueDescription(e.target.value)}*/}\n {/* value={issueDescription}*/}\n {/* ></textarea>*/}\n {/* </div>*/}\n {/* <div className=\"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse rounded-b-lg\">*/}\n {/* <button*/}\n {/* type=\"submit\"*/}\n {/* className=\"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-500 text-base font-medium text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm\"*/}\n {/* >*/}\n {/* Submit*/}\n {/* </button>*/}\n {/* </div>*/}\n {/*</form>*/}\n </div>\n </div>\n )}\n </>\n );\n}\n","import React from \"react\";\n\nexport const LifeBuoyIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"icon icon-tabler icons-tabler-outline icon-tabler-lifebuoy\"\n >\n <g transform=\"translate(0, -1)\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0\" />\n <path d=\"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0\" />\n <path d=\"M15 15l3.35 3.35\" />\n <path d=\"M9 15l-3.35 3.35\" />\n <path d=\"M5.65 5.65l3.35 3.35\" />\n <path d=\"M18.35 5.65l-3.35 3.35\" />\n </g>\n </svg>\n);\n\nexport const CloseIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"1.5\"\n stroke=\"currentColor\"\n width=\"20\"\n height=\"20\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAgC;;;ACe5B;AAbG,IAAM,eAAe,MAC1B;AAAA,EAAC;AAAA;AAAA,IACC,OAAM;AAAA,IACN,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,QAAO;AAAA,IACP,aAAY;AAAA,IACZ,eAAc;AAAA,IACd,gBAAe;AAAA,IACf,WAAU;AAAA,IAEV,uDAAC,OAAE,WAAU,oBACX;AAAA,kDAAC,UAAK,QAAO,QAAO,GAAE,iBAAgB,MAAK,QAAO;AAAA,MAClD,4CAAC,UAAK,GAAE,4CAA2C;AAAA,MACnD,4CAAC,UAAK,GAAE,8CAA6C;AAAA,MACrD,4CAAC,UAAK,GAAE,oBAAmB;AAAA,MAC3B,4CAAC,UAAK,GAAE,oBAAmB;AAAA,MAC3B,4CAAC,UAAK,GAAE,wBAAuB;AAAA,MAC/B,4CAAC,UAAK,GAAE,0BAAyB;AAAA,OACnC;AAAA;AACF;AAGK,IAAM,YAAY,MACvB;AAAA,EAAC;AAAA;AAAA,IACC,OAAM;AAAA,IACN,MAAK;AAAA,IACL,SAAQ;AAAA,IACR,aAAY;AAAA,IACZ,QAAO;AAAA,IACP,OAAM;AAAA,IACN,QAAO;AAAA,IAEP,sDAAC,UAAK,eAAc,SAAQ,gBAAe,SAAQ,GAAE,wBAAuB;AAAA;AAC9E;;;ADpBI,IAAAA,sBAAA;AAfC,SAAS,sBA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";
|
|
2
2
|
import {
|
|
3
3
|
CopilotKitHelpModal
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-WOUWNTAV.mjs";
|
|
5
|
+
import "../../chunk-4T3TMQNJ.mjs";
|
|
6
6
|
import "../../chunk-MRXNTQOX.mjs";
|
|
7
7
|
export {
|
|
8
8
|
CopilotKitHelpModal
|
|
@@ -16,26 +16,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var __async = (__this, __arguments, generator) => {
|
|
20
|
-
return new Promise((resolve, reject) => {
|
|
21
|
-
var fulfilled = (value) => {
|
|
22
|
-
try {
|
|
23
|
-
step(generator.next(value));
|
|
24
|
-
} catch (e) {
|
|
25
|
-
reject(e);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
var rejected = (value) => {
|
|
29
|
-
try {
|
|
30
|
-
step(generator.throw(value));
|
|
31
|
-
} catch (e) {
|
|
32
|
-
reject(e);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
36
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
19
|
|
|
40
20
|
// src/components/help-modal/modal.tsx
|
|
41
21
|
var modal_exports = {};
|
|
@@ -47,52 +27,41 @@ var import_react = require("react");
|
|
|
47
27
|
|
|
48
28
|
// src/components/help-modal/icons.tsx
|
|
49
29
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
50
|
-
var
|
|
30
|
+
var LifeBuoyIcon = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
31
|
"svg",
|
|
52
32
|
{
|
|
53
33
|
xmlns: "http://www.w3.org/2000/svg",
|
|
54
|
-
|
|
34
|
+
width: "24",
|
|
35
|
+
height: "24",
|
|
55
36
|
viewBox: "0 0 24 24",
|
|
56
|
-
|
|
37
|
+
fill: "none",
|
|
57
38
|
stroke: "currentColor",
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
39
|
+
strokeWidth: "2",
|
|
40
|
+
strokeLinecap: "round",
|
|
41
|
+
strokeLinejoin: "round",
|
|
42
|
+
className: "icon icon-tabler icons-tabler-outline icon-tabler-lifebuoy",
|
|
43
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { transform: "translate(0, -1)", children: [
|
|
44
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" }),
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" }),
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M15 15l3.35 3.35" }),
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M9 15l-3.35 3.35" }),
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M5.65 5.65l3.35 3.35" }),
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M18.35 5.65l-3.35 3.35" })
|
|
51
|
+
] })
|
|
61
52
|
}
|
|
62
53
|
);
|
|
63
|
-
var
|
|
54
|
+
var CloseIcon = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
64
55
|
"svg",
|
|
65
56
|
{
|
|
66
|
-
style: {
|
|
67
|
-
animation: "copilotKitSpinAnimation 1s linear infinite",
|
|
68
|
-
color
|
|
69
|
-
},
|
|
70
|
-
width: "24",
|
|
71
|
-
height: "24",
|
|
72
57
|
xmlns: "http://www.w3.org/2000/svg",
|
|
73
58
|
fill: "none",
|
|
74
59
|
viewBox: "0 0 24 24",
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
cx: "12",
|
|
81
|
-
cy: "12",
|
|
82
|
-
r: "10",
|
|
83
|
-
stroke: "currentColor",
|
|
84
|
-
strokeWidth: "4"
|
|
85
|
-
}
|
|
86
|
-
),
|
|
87
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
88
|
-
"path",
|
|
89
|
-
{
|
|
90
|
-
style: { opacity: 0.75 },
|
|
91
|
-
fill: "currentColor",
|
|
92
|
-
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
93
|
-
}
|
|
94
|
-
)
|
|
95
|
-
]
|
|
60
|
+
strokeWidth: "1.5",
|
|
61
|
+
stroke: "currentColor",
|
|
62
|
+
width: "20",
|
|
63
|
+
height: "20",
|
|
64
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
96
65
|
}
|
|
97
66
|
);
|
|
98
67
|
|
|
@@ -101,52 +70,18 @@ var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
|
101
70
|
function CopilotKitHelpModal() {
|
|
102
71
|
const [showHelpModal, setShowHelpModal] = (0, import_react.useState)(false);
|
|
103
72
|
const [issueDescription, setIssueDescription] = (0, import_react.useState)("");
|
|
104
|
-
const
|
|
105
|
-
const [emailError, setEmailError] = (0, import_react.useState)("");
|
|
106
|
-
const [submitting, setSubmitting] = (0, import_react.useState)(false);
|
|
107
|
-
const validateEmail = (email2) => {
|
|
108
|
-
const re = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
109
|
-
return re.test(email2);
|
|
110
|
-
};
|
|
111
|
-
const handleSubmit = (e) => __async(this, null, function* () {
|
|
112
|
-
e.preventDefault();
|
|
113
|
-
if ((email == null ? void 0 : email.length) > 0 && !validateEmail(email)) {
|
|
114
|
-
setEmailError("Please enter a valid email address");
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
setSubmitting(true);
|
|
118
|
-
yield fetch("https://api.segment.io/v1/track", {
|
|
119
|
-
method: "POST",
|
|
120
|
-
headers: {
|
|
121
|
-
"Content-Type": "application/json"
|
|
122
|
-
},
|
|
123
|
-
body: JSON.stringify({
|
|
124
|
-
event: "oss.dev-console.help",
|
|
125
|
-
anonymousId: window.crypto.randomUUID(),
|
|
126
|
-
properties: { email, text: issueDescription },
|
|
127
|
-
writeKey: "q0gQqvGYyw9pNyhIocNzefSYKGO1aiwW"
|
|
128
|
-
})
|
|
129
|
-
});
|
|
130
|
-
setEmailError("");
|
|
131
|
-
setEmail("");
|
|
132
|
-
setIssueDescription("");
|
|
133
|
-
setSubmitting(false);
|
|
73
|
+
const handleSubmit = () => {
|
|
134
74
|
setShowHelpModal(false);
|
|
135
|
-
}
|
|
75
|
+
};
|
|
136
76
|
const HelpButton = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
137
77
|
"button",
|
|
138
78
|
{
|
|
139
79
|
onClick: () => setShowHelpModal(true),
|
|
140
|
-
|
|
141
|
-
className: "text-sm p-0 bg-transparent rounded border border-blue-500",
|
|
80
|
+
className: "p-2 bg-transparent rounded-full shadow-lg hover:shadow-xl transition-shadow duration-300 focus:outline-none focus:ring-2 focus:ring-blue-500",
|
|
142
81
|
"aria-label": "Open Help",
|
|
143
|
-
children:
|
|
82
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LifeBuoyIcon, {})
|
|
144
83
|
}
|
|
145
84
|
);
|
|
146
|
-
const submitButtonDisabled = (0, import_react.useMemo)(
|
|
147
|
-
() => submitting || !!emailError || issueDescription == null || (issueDescription == null ? void 0 : issueDescription.length) == 0,
|
|
148
|
-
[submitting, emailError, issueDescription]
|
|
149
|
-
);
|
|
150
85
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
151
86
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(HelpButton, {}),
|
|
152
87
|
showHelpModal && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
@@ -167,15 +102,6 @@ function CopilotKitHelpModal() {
|
|
|
167
102
|
),
|
|
168
103
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "w-full flex mb-6 justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h2", { className: "text-2xl font-bold", children: "Help Options" }) }),
|
|
169
104
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "space-y-4 mb-4", children: [
|
|
170
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
171
|
-
"a",
|
|
172
|
-
{
|
|
173
|
-
href: "https://docs.copilotkit.ai/coagents/troubleshooting/common-issues",
|
|
174
|
-
target: "_blank",
|
|
175
|
-
rel: "noopener noreferrer",
|
|
176
|
-
children: "Visit the Troubleshooting and FAQ section in the docs"
|
|
177
|
-
}
|
|
178
|
-
) }),
|
|
179
105
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
180
106
|
"a",
|
|
181
107
|
{
|
|
@@ -194,52 +120,6 @@ function CopilotKitHelpModal() {
|
|
|
194
120
|
children: "Apply for Priority Direct Slack Support"
|
|
195
121
|
}
|
|
196
122
|
) })
|
|
197
|
-
] }),
|
|
198
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("form", { onSubmit: handleSubmit, className: "flex flex-col space-y-2", children: [
|
|
199
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
|
|
200
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { htmlFor: "feedback", className: "block text-sm font-medium text-gray-700 mb-1", children: "Let us know what your issue is:" }),
|
|
201
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
202
|
-
"textarea",
|
|
203
|
-
{
|
|
204
|
-
id: "feedback",
|
|
205
|
-
rows: 4,
|
|
206
|
-
className: "w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500",
|
|
207
|
-
placeholder: "A Loom link / screen recording is always great!",
|
|
208
|
-
onChange: (e) => setIssueDescription(e.target.value),
|
|
209
|
-
value: issueDescription,
|
|
210
|
-
required: true
|
|
211
|
-
}
|
|
212
|
-
)
|
|
213
|
-
] }),
|
|
214
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
|
|
215
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { htmlFor: "email", className: "block text-sm font-medium text-gray-700 mb-1", children: "Email (optional):" }),
|
|
216
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
217
|
-
"input",
|
|
218
|
-
{
|
|
219
|
-
type: "email",
|
|
220
|
-
id: "email",
|
|
221
|
-
className: `w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500 ${emailError ? "border-red-500" : ""}`,
|
|
222
|
-
placeholder: "Enter your email for follow-up",
|
|
223
|
-
onChange: (e) => {
|
|
224
|
-
setEmail(e.target.value);
|
|
225
|
-
setEmailError("");
|
|
226
|
-
},
|
|
227
|
-
value: email
|
|
228
|
-
}
|
|
229
|
-
),
|
|
230
|
-
emailError && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-red-500 text-sm mt-1", children: emailError })
|
|
231
|
-
] }),
|
|
232
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "bg-gray-50 px-4 py-4 sm:px-6 sm:flex sm:flex-row-reverse rounded-b-lg", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
233
|
-
"button",
|
|
234
|
-
{
|
|
235
|
-
type: "submit",
|
|
236
|
-
onClick: handleSubmit,
|
|
237
|
-
disabled: submitButtonDisabled,
|
|
238
|
-
style: submitButtonDisabled ? { backgroundColor: "rgb(216, 216, 216)", color: "rgb(129, 129, 129)" } : void 0,
|
|
239
|
-
className: "w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-500 text-base font-medium text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm disabled:shadow-none",
|
|
240
|
-
children: submitting ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LoadingSpinnerIcon, { color: "white" }) : "Submit"
|
|
241
|
-
}
|
|
242
|
-
) })
|
|
243
123
|
] })
|
|
244
124
|
] })
|
|
245
125
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/help-modal/modal.tsx","../../../src/components/help-modal/icons.tsx"],"sourcesContent":["import React, { useMemo, useState } from \"react\";\nimport { CloseIcon, LifeBuoyIcon, LoadingSpinnerIcon } from \"./icons\";\n\nexport function CopilotKitHelpModal() {\n const [showHelpModal, setShowHelpModal] = useState(false);\n const [issueDescription, setIssueDescription] = useState(\"\");\n const [email, setEmail] = useState(\"\");\n const [emailError, setEmailError] = useState(\"\");\n const [submitting, setSubmitting] = useState(false);\n\n const validateEmail = (email: string) => {\n const re = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/;\n return re.test(email);\n };\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n\n if (email?.length > 0 && !validateEmail(email)) {\n setEmailError(\"Please enter a valid email address\");\n return;\n }\n setSubmitting(true);\n\n await fetch(\"https://api.segment.io/v1/track\", {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n event: \"oss.dev-console.help\",\n anonymousId: window.crypto.randomUUID(),\n properties: { email, text: issueDescription },\n writeKey: \"q0gQqvGYyw9pNyhIocNzefSYKGO1aiwW\",\n }),\n });\n\n // Reset\n setEmailError(\"\");\n setEmail(\"\");\n setIssueDescription(\"\");\n setSubmitting(false);\n setShowHelpModal(false);\n };\n\n const HelpButton = () => (\n <button\n onClick={() => setShowHelpModal(true)}\n style={{ width: \"50px\", height: \"30px\", marginRight: \"0.25rem\" }}\n className=\"text-sm p-0 bg-transparent rounded border border-blue-500\"\n aria-label=\"Open Help\"\n >\n Help\n </button>\n );\n\n const submitButtonDisabled = useMemo(\n () => submitting || !!emailError || issueDescription == null || issueDescription?.length == 0,\n [submitting, emailError, issueDescription],\n );\n\n return (\n <>\n <HelpButton />\n {showHelpModal && (\n <div\n className=\"fixed inset-0 flex items-center justify-center p-4\"\n style={{ backgroundColor: \"rgba(11, 15, 26, 0.5)\", zIndex: 99 }}\n >\n <div className=\"bg-white rounded-lg shadow-xl max-w-md w-full p-4 flex-col relative\">\n <button\n className=\"absolute text-gray-400 hover:text-gray-600 focus:outline-none\"\n style={{ top: \"10px\", right: \"10px\" }}\n onClick={() => setShowHelpModal(false)}\n aria-label=\"Close\"\n >\n <CloseIcon />\n </button>\n <div className=\"w-full flex mb-6 justify-center\">\n <h2 className=\"text-2xl font-bold\">Help Options</h2>\n </div>\n <div className=\"space-y-4 mb-4\">\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://docs.copilotkit.ai/coagents/troubleshooting/common-issues\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Visit the Troubleshooting and FAQ section in the docs\n </a>\n </div>\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://go.copilotkit.ai/dev-console-support-discord\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Go to Discord Support Channel (Community Support)\n </a>\n </div>\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://go.copilotkit.ai/dev-console-support-slack\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Apply for Priority Direct Slack Support\n </a>\n </div>\n </div>\n <form onSubmit={handleSubmit} className=\"flex flex-col space-y-2\">\n <div>\n <label htmlFor=\"feedback\" className=\"block text-sm font-medium text-gray-700 mb-1\">\n Let us know what your issue is:\n </label>\n <textarea\n id=\"feedback\"\n rows={4}\n className=\"w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500\"\n placeholder=\"A Loom link / screen recording is always great!\"\n onChange={(e) => setIssueDescription(e.target.value)}\n value={issueDescription}\n required\n ></textarea>\n </div>\n <div>\n <label htmlFor=\"email\" className=\"block text-sm font-medium text-gray-700 mb-1\">\n Email (optional):\n </label>\n <input\n type=\"email\"\n id=\"email\"\n className={`w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500 ${emailError ? \"border-red-500\" : \"\"}`}\n placeholder=\"Enter your email for follow-up\"\n onChange={(e) => {\n setEmail(e.target.value);\n setEmailError(\"\");\n }}\n value={email}\n />\n {emailError && <p className=\"text-red-500 text-sm mt-1\">{emailError}</p>}\n </div>\n <div className=\"bg-gray-50 px-4 py-4 sm:px-6 sm:flex sm:flex-row-reverse rounded-b-lg\">\n <button\n type=\"submit\"\n onClick={handleSubmit}\n disabled={submitButtonDisabled}\n style={\n submitButtonDisabled\n ? { backgroundColor: \"rgb(216, 216, 216)\", color: \"rgb(129, 129, 129)\" }\n : undefined\n }\n className=\"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-500 text-base font-medium text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm disabled:shadow-none\"\n >\n {submitting ? <LoadingSpinnerIcon color=\"white\" /> : \"Submit\"}\n </button>\n </div>\n </form>\n </div>\n </div>\n )}\n </>\n );\n}\n","import React from \"react\";\n\nexport const LifeBuoyIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"icon icon-tabler icons-tabler-outline icon-tabler-lifebuoy\"\n >\n <g transform=\"translate(0, -1)\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0\" />\n <path d=\"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0\" />\n <path d=\"M15 15l3.35 3.35\" />\n <path d=\"M9 15l-3.35 3.35\" />\n <path d=\"M5.65 5.65l3.35 3.35\" />\n <path d=\"M18.35 5.65l-3.35 3.35\" />\n </g>\n </svg>\n);\n\nexport const CloseIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"1.5\"\n stroke=\"currentColor\"\n width=\"20\"\n height=\"20\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n);\n\nexport const LoadingSpinnerIcon = ({ color = \"rgb(107 114 128)\" }: { color?: string }) => (\n <svg\n style={{\n animation: \"copilotKitSpinAnimation 1s linear infinite\",\n color,\n }}\n width=\"24\"\n height=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n style={{ opacity: 0.25 }}\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n ></circle>\n <path\n style={{ opacity: 0.75 }}\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAyC;;;ACerC;AAYG,IAAM,YAAY,MACvB;AAAA,EAAC;AAAA;AAAA,IACC,OAAM;AAAA,IACN,MAAK;AAAA,IACL,SAAQ;AAAA,IACR,aAAY;AAAA,IACZ,QAAO;AAAA,IACP,OAAM;AAAA,IACN,QAAO;AAAA,IAEP,sDAAC,UAAK,eAAc,SAAQ,gBAAe,SAAQ,GAAE,wBAAuB;AAAA;AAC9E;AAGK,IAAM,qBAAqB,CAAC,EAAE,QAAQ,mBAAmB,MAC9D;AAAA,EAAC;AAAA;AAAA,IACC,OAAO;AAAA,MACL,WAAW;AAAA,MACX;AAAA,IACF;AAAA,IACA,OAAM;AAAA,IACN,QAAO;AAAA,IACP,OAAM;AAAA,IACN,MAAK;AAAA,IACL,SAAQ;AAAA,IAER;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,SAAS,KAAK;AAAA,UACvB,IAAG;AAAA,UACH,IAAG;AAAA,UACH,GAAE;AAAA,UACF,QAAO;AAAA,UACP,aAAY;AAAA;AAAA,MACb;AAAA,MACD;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,EAAE,SAAS,KAAK;AAAA,UACvB,MAAK;AAAA,UACL,GAAE;AAAA;AAAA,MACH;AAAA;AAAA;AACH;;;ADpBE,IAAAA,sBAAA;AA3CG,SAAS,sBAAsB;AACpC,QAAM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BACP,UAAQ;AAAA;AAAA,cACT;AAAA,eACH;AAAA,YACA,8CAAC,SACC;AAAA,2DAAC,WAAM,SAAQ,SAAQ,WAAU,gDAA+C,+BAEhF;AAAA,cACA;AAAA,gBAAC;AAAA;AAAA,kBACC,MAAK;AAAA,kBACL,IAAG;AAAA,kBACH,WAAW,6FAA6F,aAAa,mBAAmB;AAAA,kBACxI,aAAY;AAAA,kBACZ,UAAU,CAAC,MAAM;AACf,6BAAS,EAAE,OAAO,KAAK;AACvB,kCAAc,EAAE;AAAA,kBAClB;AAAA,kBACA,OAAO;AAAA;AAAA,cACT;AAAA,cACC,cAAc,6CAAC,OAAE,WAAU,6BAA6B,sBAAW;AAAA,eACtE;AAAA,YACA,6CAAC,SAAI,WAAU,yEACb;AAAA,cAAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBACL,SAAS;AAAA,gBACT,UAAU;AAAA,gBACV,OACE,uBACI,EAAE,iBAAiB,sBAAsB,OAAO,qBAAqB,IACrE;AAAA,gBAEN,WAAU;AAAA,gBAET,uBAAa,6CAAC,sBAAmB,OAAM,SAAQ,IAAK;AAAA;AAAA,YACvD,GACF;AAAA,aACF;AAAA,WACF;AAAA;AAAA,IACF;AAAA,KAEJ;AAEJ;","names":["import_jsx_runtime","email"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/help-modal/modal.tsx","../../../src/components/help-modal/icons.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport { CloseIcon, LifeBuoyIcon } from \"./icons\";\n\nexport function CopilotKitHelpModal() {\n const [showHelpModal, setShowHelpModal] = useState(false);\n const [issueDescription, setIssueDescription] = useState(\"\");\n\n const handleSubmit = () => {\n // submit issueDescription\n setShowHelpModal(false);\n };\n\n const HelpButton = () => (\n <button\n onClick={() => setShowHelpModal(true)}\n className=\"p-2 bg-transparent rounded-full shadow-lg hover:shadow-xl transition-shadow duration-300 focus:outline-none focus:ring-2 focus:ring-blue-500\"\n aria-label=\"Open Help\"\n >\n <LifeBuoyIcon />\n </button>\n );\n\n return (\n <>\n <HelpButton />\n {showHelpModal && (\n <div\n className=\"fixed inset-0 flex items-center justify-center p-4\"\n style={{ backgroundColor: \"rgba(11, 15, 26, 0.5)\", zIndex: 99 }}\n >\n <div className=\"bg-white rounded-lg shadow-xl max-w-md w-full p-4 flex-col relative\">\n <button\n className=\"absolute text-gray-400 hover:text-gray-600 focus:outline-none\"\n style={{ top: \"10px\", right: \"10px\" }}\n onClick={() => setShowHelpModal(false)}\n aria-label=\"Close\"\n >\n <CloseIcon />\n </button>\n <div className=\"w-full flex mb-6 justify-center\">\n <h2 className=\"text-2xl font-bold\">Help Options</h2>\n </div>\n <div className=\"space-y-4 mb-4\">\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://go.copilotkit.ai/dev-console-support-discord\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Go to Discord Support Channel (Community Support)\n </a>\n </div>\n <div className=\"block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm\">\n <a\n href=\"https://go.copilotkit.ai/dev-console-support-slack\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Apply for Priority Direct Slack Support\n </a>\n </div>\n </div>\n {/*<form onSubmit={handleSubmit} className=\"flex flex-col space-y-4\">*/}\n {/* <div>*/}\n {/* <label htmlFor=\"feedback\" className=\"block text-sm font-medium text-gray-700 mb-1\">*/}\n {/* Let us know what your issue is:*/}\n {/* </label>*/}\n {/* <textarea*/}\n {/* id=\"feedback\"*/}\n {/* rows={4}*/}\n {/* className=\"w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500\"*/}\n {/* placeholder=\"A Loom link / screen recording is always great!\"*/}\n {/* onChange={e => setIssueDescription(e.target.value)}*/}\n {/* value={issueDescription}*/}\n {/* ></textarea>*/}\n {/* </div>*/}\n {/* <div className=\"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse rounded-b-lg\">*/}\n {/* <button*/}\n {/* type=\"submit\"*/}\n {/* className=\"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-500 text-base font-medium text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm\"*/}\n {/* >*/}\n {/* Submit*/}\n {/* </button>*/}\n {/* </div>*/}\n {/*</form>*/}\n </div>\n </div>\n )}\n </>\n );\n}\n","import React from \"react\";\n\nexport const LifeBuoyIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"icon icon-tabler icons-tabler-outline icon-tabler-lifebuoy\"\n >\n <g transform=\"translate(0, -1)\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0\" />\n <path d=\"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0\" />\n <path d=\"M15 15l3.35 3.35\" />\n <path d=\"M9 15l-3.35 3.35\" />\n <path d=\"M5.65 5.65l3.35 3.35\" />\n <path d=\"M18.35 5.65l-3.35 3.35\" />\n </g>\n </svg>\n);\n\nexport const CloseIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"1.5\"\n stroke=\"currentColor\"\n width=\"20\"\n height=\"20\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAgC;;;ACe5B;AAbG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