@upstep/js 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { jsxs as d, Fragment as T, jsx as e } from "react/jsx-runtime";
2
- import { createContext as G, useState as h, useEffect as S, useCallback as F, useContext as j, useRef as O } from "react";
2
+ import { createContext as G, useState as h, useEffect as k, useCallback as F, useContext as O, useRef as j } from "react";
3
3
  import { U as V } from "./api-C1UV7Szw.mjs";
4
- const _ = "#D97757", Y = {
4
+ const _ = "#5B7168", Y = {
5
5
  bg: "#ffffff",
6
- bgSoft: "#f6f5f2",
7
- bgHover: "#efede8",
6
+ bgSoft: "#f4f6f4",
7
+ bgHover: "#eaf0eb",
8
8
  text: "#1a1915",
9
9
  textSoft: "#56544d",
10
10
  textFaint: "#9b9890",
@@ -12,8 +12,8 @@ const _ = "#D97757", Y = {
12
12
  overlay: "rgba(26,25,21,.45)"
13
13
  }, q = {
14
14
  bg: "#000000",
15
- bgSoft: "#262522",
16
- bgHover: "#302e2a",
15
+ bgSoft: "#191d1b",
16
+ bgHover: "#252d28",
17
17
  text: "#f5f4f0",
18
18
  textSoft: "#b4b1a8",
19
19
  textFaint: "#7d7a72",
@@ -22,131 +22,158 @@ const _ = "#D97757", Y = {
22
22
  };
23
23
  function E() {
24
24
  if (typeof document > "u") return !1;
25
- const n = document.documentElement;
26
- return n.classList.contains("dark") || n.getAttribute("data-theme") === "dark";
25
+ const o = document.documentElement;
26
+ return o.classList.contains("dark") || o.getAttribute("data-theme") === "dark";
27
27
  }
28
- function K(n) {
29
- const [o, t] = h(() => n === "dark");
30
- return S(() => {
31
- if (n !== "auto") {
32
- t(n === "dark");
28
+ function K(o) {
29
+ const [n, t] = h(() => o === "dark");
30
+ return k(() => {
31
+ if (o !== "auto") {
32
+ t(o === "dark");
33
33
  return;
34
34
  }
35
35
  if (t(E()), typeof MutationObserver > "u") return;
36
- const f = new MutationObserver(() => t(E()));
37
- return f.observe(document.documentElement, {
36
+ const g = new MutationObserver(() => t(E()));
37
+ return g.observe(document.documentElement, {
38
38
  attributes: !0,
39
39
  attributeFilter: ["class", "data-theme"]
40
- }), () => f.disconnect();
41
- }, [n]), o ? q : Y;
40
+ }), () => g.disconnect();
41
+ }, [o]), n ? q : Y;
42
42
  }
43
43
  const R = G(null);
44
44
  function de({
45
- children: n,
46
- ...o
45
+ children: o,
46
+ ...n
47
47
  }) {
48
- const [t] = h(() => new V(o)), [f, g] = h([]), [i, r] = h(!1), [l, y] = h(!0);
49
- S(() => {
50
- t.setUserId(o.userId);
51
- }, [t, o.userId]), S(() => {
52
- t.supportIdentityToken = o.supportIdentityToken, document.querySelectorAll("iframe[data-upstep-support]").forEach((c) => {
53
- var m;
54
- return (m = c.contentWindow) == null ? void 0 : m.postMessage({ type: "upstep:support:identity", token: o.supportIdentityToken }, new URL(t.baseUrl).origin);
55
- });
56
- }, [t, o.supportIdentityToken]);
57
- const a = F(async () => {
48
+ const [t] = h(() => new V(n)), [g, a] = h([]), [i, r] = h(!1), [l, x] = h(!0);
49
+ k(() => {
50
+ t.setUserId(n.userId);
51
+ }, [t, n.userId]), k(() => {
52
+ t.supportIdentityToken = n.supportIdentityToken, document.querySelectorAll("iframe[data-upstep-support]").forEach(
53
+ (p) => {
54
+ var y;
55
+ return (y = p.contentWindow) == null ? void 0 : y.postMessage(
56
+ {
57
+ type: "upstep:support:identity",
58
+ token: n.supportIdentityToken
59
+ },
60
+ new URL(t.baseUrl).origin
61
+ );
62
+ }
63
+ );
64
+ }, [t, n.supportIdentityToken]);
65
+ const c = F(async () => {
58
66
  try {
59
- const c = await t.listFeedback({ sort: "votes", limit: 20 });
60
- g(c.items), y(c.showBranding ?? !0);
67
+ const p = await t.listFeedback({ sort: "votes", limit: 20 });
68
+ a(p.items), x(p.showBranding ?? !0);
61
69
  } catch {
62
70
  }
63
71
  }, [t]);
64
- S(() => {
65
- a();
66
- }, [a]);
67
- const w = F(async (c, m, v) => {
68
- const p = { content: m };
69
- c.trim() && (p.title = c.trim()), v !== void 0 && (p.type = v), await t.submitFeedback(p), await a();
70
- }, [t, a]), x = F(async (c, m) => {
71
- try {
72
- await t.vote(c, m), await a();
73
- } catch {
74
- }
75
- }, [t, a]), s = F(
76
- (c) => t.getItem(c),
72
+ k(() => {
73
+ c();
74
+ }, [c]);
75
+ const w = F(
76
+ async (p, y, v) => {
77
+ const u = { content: y };
78
+ p.trim() && (u.title = p.trim()), v !== void 0 && (u.type = v), await t.submitFeedback(u), await c();
79
+ },
80
+ [t, c]
81
+ ), m = F(
82
+ async (p, y) => {
83
+ try {
84
+ await t.vote(p, y), await c();
85
+ } catch {
86
+ }
87
+ },
88
+ [t, c]
89
+ ), s = F(
90
+ (p) => t.getItem(p),
91
+ [t]
92
+ ), b = F(() => r(!0), []), S = F(() => r(!1), []), C = F(
93
+ (p) => t.setUserId(p),
77
94
  [t]
78
- ), b = F(() => r(!0), []), k = F(() => r(!1), []), C = F((c) => t.setUserId(c), [t]);
95
+ );
79
96
  return /* @__PURE__ */ e(
80
97
  R.Provider,
81
98
  {
82
99
  value: {
83
100
  client: t,
84
- feedItems: f,
85
- loadFeed: a,
101
+ feedItems: g,
102
+ loadFeed: c,
86
103
  submit: w,
87
- vote: x,
104
+ vote: m,
88
105
  getItem: s,
89
106
  isOpen: i,
90
107
  open: b,
91
- close: k,
108
+ close: S,
92
109
  identify: C,
93
- accentColor: o.accentColor ?? _,
94
- theme: o.theme ?? "auto",
110
+ accentColor: n.accentColor ?? _,
111
+ theme: n.theme ?? "auto",
95
112
  showBranding: l,
96
- chat: o.chat !== !1
113
+ chat: n.chat !== !1
97
114
  },
98
- children: n
115
+ children: o
99
116
  }
100
117
  );
101
118
  }
102
119
  function I() {
103
- const n = j(R);
104
- if (!n) throw new Error("useUpstep must be used inside <UpstepProvider>");
105
- return n;
120
+ const o = O(R);
121
+ if (!o) throw new Error("useUpstep must be used inside <UpstepProvider>");
122
+ return o;
106
123
  }
107
124
  function ae({
108
- position: n = "bottom-right",
109
- accentColor: o,
125
+ position: o = "bottom-right",
126
+ accentColor: n,
110
127
  theme: t,
111
- hideLauncher: f = !1,
112
- chat: g = !0
128
+ hideLauncher: g = !1,
129
+ chat: a = !0
113
130
  }) {
114
- const i = I(), r = o ?? i.accentColor, l = K(t ?? i.theme), { isOpen: y, open: a, close: w, showBranding: x } = i, [s, b] = h("list"), [k, C] = h(!1);
115
- S(() => {
116
- let u = !0;
117
- if (i.client.chat = i.chat, !i.chat || !g) {
131
+ const i = I(), r = n ?? i.accentColor, l = K(t ?? i.theme), {
132
+ isOpen: x,
133
+ open: c,
134
+ close: w,
135
+ showBranding: m
136
+ } = i, [s, b] = h("list"), [S, C] = h(!1);
137
+ k(() => {
138
+ let f = !0;
139
+ if (i.client.chat = i.chat, !i.chat || !a) {
118
140
  C(!1);
119
141
  return;
120
142
  }
121
143
  return i.client.supportEnabled().then((z) => {
122
- u && C(z);
144
+ f && C(z);
123
145
  }), () => {
124
- u = !1;
146
+ f = !1;
125
147
  };
126
- }, [i.client, i.chat, g]), S(() => {
127
- (!i.chat || !g) && s === "support" && b("list");
128
- }, [i.chat, g, s]);
129
- const [c, m] = h(null), [v, p] = h(!1);
130
- S(() => {
131
- const u = window.matchMedia("(max-width: 639px)");
132
- p(u.matches);
133
- const z = ($) => p($.matches);
134
- return u.addEventListener("change", z), () => u.removeEventListener("change", z);
148
+ }, [i.client, i.chat, a]), k(() => {
149
+ (!i.chat || !a) && s === "support" && b("list");
150
+ }, [i.chat, a, s]), k(() => {
151
+ x && b(S && a && i.chat ? "support" : "list");
152
+ }, [x, S, a, i.chat]);
153
+ const [p, y] = h(null), [v, u] = h(!1);
154
+ k(() => {
155
+ const f = window.matchMedia("(max-width: 639px)");
156
+ u(f.matches);
157
+ const z = ($) => u($.matches);
158
+ return f.addEventListener("change", z), () => f.removeEventListener("change", z);
135
159
  }, []);
136
- const H = n === "bottom-left" ? { position: "fixed", bottom: 24, left: 24 } : { position: "fixed", bottom: 24, right: 24 }, B = '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif';
160
+ const H = {
161
+ position: "fixed",
162
+ bottom: 24,
163
+ right: 24
164
+ }, B = '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif';
137
165
  function W() {
138
- w(), setTimeout(() => {
139
- b("list"), m(null);
140
- }, 300);
166
+ w(), y(null);
141
167
  }
142
- function N(u) {
143
- m(u), b("detail");
168
+ function N(f) {
169
+ y(f), b("detail");
144
170
  }
145
171
  return /* @__PURE__ */ d(T, { children: [
146
- !f && /* @__PURE__ */ d(
172
+ !g && /* @__PURE__ */ d(
147
173
  "button",
148
174
  {
149
- onClick: a,
175
+ "aria-label": "Open help and feedback",
176
+ onClick: c,
150
177
  style: {
151
178
  ...H,
152
179
  zIndex: 9998,
@@ -166,24 +193,23 @@ function ae({
166
193
  },
167
194
  children: [
168
195
  /* @__PURE__ */ e(re, { size: 16 }),
169
- !v && (k && g && i.chat ? "Help & feedback" : "Feedback")
196
+ !v && (S && a && i.chat ? "Help & feedback" : "Feedback")
170
197
  ]
171
198
  }
172
199
  ),
173
- y && /* @__PURE__ */ e(
200
+ x && /* @__PURE__ */ e(
174
201
  "div",
175
202
  {
176
- onClick: (u) => u.target === u.currentTarget && W(),
203
+ onClick: (f) => f.target === f.currentTarget && W(),
177
204
  style: {
178
205
  position: "fixed",
179
206
  inset: 0,
180
- background: l.overlay,
181
- backdropFilter: "blur(3px)",
207
+ background: "transparent",
182
208
  zIndex: 9999,
183
209
  display: "flex",
184
- alignItems: "center",
185
- justifyContent: "center",
186
- padding: 16,
210
+ alignItems: "flex-end",
211
+ justifyContent: "flex-end",
212
+ padding: v ? "0 12px 80px" : "0 24px 88px",
187
213
  fontFamily: B
188
214
  },
189
215
  children: /* @__PURE__ */ d(
@@ -194,75 +220,251 @@ function ae({
194
220
  border: `1px solid ${l.border}`,
195
221
  borderRadius: 20,
196
222
  width: "100%",
197
- maxWidth: k && g && i.chat ? 460 : 440,
198
- maxHeight: "88vh",
223
+ maxWidth: S && a && i.chat ? 460 : 440,
224
+ maxHeight: "calc(100dvh - 112px)",
199
225
  display: "flex",
200
226
  flexDirection: "column",
201
227
  overflow: "hidden",
202
228
  boxShadow: "0 24px 64px rgba(0,0,0,.28)"
203
229
  },
204
230
  children: [
205
- k && g && i.chat ? /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 14, padding: "10px 14px", borderBottom: `1px solid ${l.border}`, flexShrink: 0 }, children: [
206
- /* @__PURE__ */ e("div", { style: { display: "flex", flex: 1, gap: 4 }, children: [["support", "Support"], ["list", "Feedback"]].map(([u, z]) => /* @__PURE__ */ e("button", { onClick: () => b(u), style: { flex: 1, border: 0, borderRadius: 8, padding: "9px 12px", background: (s === "support" ? u === "support" : u === "list") ? l.bgSoft : "transparent", color: (s === "support" ? u === "support" : u === "list") ? l.text : l.textSoft, fontSize: 12, fontWeight: 600, cursor: "pointer" }, children: z }, u)) }),
207
- /* @__PURE__ */ e("button", { "aria-label": "Close", onClick: W, style: { border: 0, background: "transparent", color: l.textSoft, padding: 6, cursor: "pointer", fontSize: 14 }, children: "✕" })
208
- ] }) : /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", padding: "16px 20px", borderBottom: `1px solid ${l.border}`, flexShrink: 0 }, children: [
209
- /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
210
- s !== "list" && /* @__PURE__ */ e(
211
- "button",
212
- {
213
- onClick: () => b("list"),
214
- style: { background: "none", border: "none", cursor: "pointer", color: r, fontSize: 13, fontWeight: 600, padding: 0 },
215
- children: "← Back"
216
- }
217
- ),
218
- s === "list" && /* @__PURE__ */ e("span", { style: { fontWeight: 700, fontSize: 16, color: l.text, letterSpacing: "-.01em" }, children: "Feedback" }),
219
- s === "create" && /* @__PURE__ */ e("span", { style: { fontWeight: 700, fontSize: 16, color: l.text, letterSpacing: "-.01em" }, children: "New feedback" })
220
- ] }),
221
- /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
222
- s === "list" && /* @__PURE__ */ e(
223
- "button",
224
- {
225
- onClick: () => b("create"),
226
- style: { background: r, color: "#fff", border: "none", borderRadius: 20, padding: "6px 14px", fontSize: 13, fontWeight: 700, cursor: "pointer" },
227
- children: "+ New"
228
- }
229
- ),
230
- /* @__PURE__ */ e(
231
- "button",
232
- {
233
- onClick: W,
234
- style: { background: l.bgSoft, border: "none", width: 28, height: 28, borderRadius: 8, fontSize: 14, cursor: "pointer", color: l.textSoft, display: "flex", alignItems: "center", justifyContent: "center" },
235
- children: "✕"
236
- }
237
- )
238
- ] })
239
- ] }),
240
- /* @__PURE__ */ d("div", { style: { flex: 1, overflowY: "auto", padding: s === "support" ? 0 : "16px 20px 24px" }, children: [
241
- s === "support" && g && i.chat && /* @__PURE__ */ e(J, { client: i.client, theme: l.bg === "#000000" ? "dark" : "light" }),
242
- k && g && i.chat && s !== "support" && /* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: 16 }, children: s === "list" ? /* @__PURE__ */ d(T, { children: [
243
- /* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 600, color: l.text }, children: "Feedback & ideas" }),
244
- /* @__PURE__ */ e("button", { onClick: () => b("create"), style: { border: 0, borderRadius: 8, background: r, color: "white", fontSize: 12, padding: "7px 10px", cursor: "pointer" }, children: "+ New" })
245
- ] }) : /* @__PURE__ */ e("button", { onClick: () => b("list"), style: { border: 0, background: "none", padding: 0, color: l.textSoft, fontSize: 12, cursor: "pointer" }, children: "← Back to feedback" }) }),
246
- s === "list" && /* @__PURE__ */ e(
247
- Q,
248
- {
249
- onSelect: N,
250
- accent: r,
251
- p: l
252
- }
253
- ),
254
- s === "detail" && c && /* @__PURE__ */ e(X, { feedbackId: c, accent: r, p: l, font: B }),
255
- s === "create" && /* @__PURE__ */ e(
256
- ee,
257
- {
258
- accent: r,
259
- p: l,
260
- font: B,
261
- onDone: () => b("list")
262
- }
263
- )
264
- ] }),
265
- x && s !== "support" && /* @__PURE__ */ d(
231
+ S && a && i.chat ? /* @__PURE__ */ d(
232
+ "div",
233
+ {
234
+ style: {
235
+ display: "flex",
236
+ alignItems: "center",
237
+ gap: 14,
238
+ padding: "10px 14px",
239
+ borderBottom: `1px solid ${l.border}`,
240
+ flexShrink: 0
241
+ },
242
+ children: [
243
+ /* @__PURE__ */ e("div", { style: { display: "flex", flex: 1, gap: 4 }, children: [
244
+ ["support", "Support"],
245
+ ["list", "Feedback"]
246
+ ].map(([f, z]) => /* @__PURE__ */ e(
247
+ "button",
248
+ {
249
+ onClick: () => b(f),
250
+ style: {
251
+ flex: 1,
252
+ border: 0,
253
+ borderRadius: 8,
254
+ padding: "9px 12px",
255
+ background: (s === "support" ? f === "support" : f === "list") ? l.bgSoft : "transparent",
256
+ color: (s === "support" ? f === "support" : f === "list") ? l.text : l.textSoft,
257
+ fontSize: 14,
258
+ fontWeight: 600,
259
+ cursor: "pointer"
260
+ },
261
+ children: z
262
+ },
263
+ f
264
+ )) }),
265
+ /* @__PURE__ */ e(
266
+ "button",
267
+ {
268
+ "aria-label": "Close",
269
+ onClick: W,
270
+ style: {
271
+ border: 0,
272
+ background: "transparent",
273
+ color: l.textSoft,
274
+ padding: 6,
275
+ cursor: "pointer",
276
+ fontSize: 14
277
+ },
278
+ children: "✕"
279
+ }
280
+ )
281
+ ]
282
+ }
283
+ ) : /* @__PURE__ */ d(
284
+ "div",
285
+ {
286
+ style: {
287
+ display: "flex",
288
+ alignItems: "center",
289
+ justifyContent: "space-between",
290
+ padding: "16px 20px",
291
+ borderBottom: `1px solid ${l.border}`,
292
+ flexShrink: 0
293
+ },
294
+ children: [
295
+ /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
296
+ s !== "list" && /* @__PURE__ */ e(
297
+ "button",
298
+ {
299
+ onClick: () => b("list"),
300
+ style: {
301
+ background: "none",
302
+ border: "none",
303
+ cursor: "pointer",
304
+ color: r,
305
+ fontSize: 14,
306
+ fontWeight: 600,
307
+ padding: 0
308
+ },
309
+ children: "← Back"
310
+ }
311
+ ),
312
+ s === "list" && /* @__PURE__ */ e(
313
+ "span",
314
+ {
315
+ style: {
316
+ fontWeight: 700,
317
+ fontSize: 16,
318
+ color: l.text,
319
+ letterSpacing: "-.01em"
320
+ },
321
+ children: "Feedback"
322
+ }
323
+ ),
324
+ s === "create" && /* @__PURE__ */ e(
325
+ "span",
326
+ {
327
+ style: {
328
+ fontWeight: 700,
329
+ fontSize: 16,
330
+ color: l.text,
331
+ letterSpacing: "-.01em"
332
+ },
333
+ children: "New feedback"
334
+ }
335
+ )
336
+ ] }),
337
+ /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
338
+ s === "list" && /* @__PURE__ */ e(
339
+ "button",
340
+ {
341
+ onClick: () => b("create"),
342
+ style: {
343
+ background: r,
344
+ color: "#fff",
345
+ border: "none",
346
+ borderRadius: 20,
347
+ padding: "6px 14px",
348
+ fontSize: 14,
349
+ fontWeight: 700,
350
+ cursor: "pointer"
351
+ },
352
+ children: "+ New"
353
+ }
354
+ ),
355
+ /* @__PURE__ */ e(
356
+ "button",
357
+ {
358
+ onClick: W,
359
+ style: {
360
+ background: l.bgSoft,
361
+ border: "none",
362
+ width: 28,
363
+ height: 28,
364
+ borderRadius: 8,
365
+ fontSize: 14,
366
+ cursor: "pointer",
367
+ color: l.textSoft,
368
+ display: "flex",
369
+ alignItems: "center",
370
+ justifyContent: "center"
371
+ },
372
+ children: "✕"
373
+ }
374
+ )
375
+ ] })
376
+ ]
377
+ }
378
+ ),
379
+ /* @__PURE__ */ d(
380
+ "div",
381
+ {
382
+ style: {
383
+ flex: 1,
384
+ overflowY: "auto",
385
+ padding: s === "support" ? 0 : "16px 20px 24px"
386
+ },
387
+ children: [
388
+ s === "support" && a && i.chat && /* @__PURE__ */ e(
389
+ J,
390
+ {
391
+ client: i.client,
392
+ theme: l.bg === "#000000" ? "dark" : "light"
393
+ }
394
+ ),
395
+ S && a && i.chat && s !== "support" && /* @__PURE__ */ e(
396
+ "div",
397
+ {
398
+ style: {
399
+ display: "flex",
400
+ alignItems: "center",
401
+ justifyContent: "space-between",
402
+ marginBottom: 16
403
+ },
404
+ children: s === "list" ? /* @__PURE__ */ d(T, { children: [
405
+ /* @__PURE__ */ e(
406
+ "span",
407
+ {
408
+ style: { fontSize: 14, fontWeight: 600, color: l.text },
409
+ children: "Feedback & ideas"
410
+ }
411
+ ),
412
+ /* @__PURE__ */ e(
413
+ "button",
414
+ {
415
+ onClick: () => b("create"),
416
+ style: {
417
+ border: 0,
418
+ borderRadius: 8,
419
+ background: r,
420
+ color: "white",
421
+ fontSize: 14,
422
+ padding: "7px 10px",
423
+ cursor: "pointer"
424
+ },
425
+ children: "+ New"
426
+ }
427
+ )
428
+ ] }) : /* @__PURE__ */ e(
429
+ "button",
430
+ {
431
+ onClick: () => b("list"),
432
+ style: {
433
+ border: 0,
434
+ background: "none",
435
+ padding: 0,
436
+ color: l.textSoft,
437
+ fontSize: 14,
438
+ cursor: "pointer"
439
+ },
440
+ children: "← Back to feedback"
441
+ }
442
+ )
443
+ }
444
+ ),
445
+ s === "list" && /* @__PURE__ */ e(Q, { onSelect: N, accent: r, p: l }),
446
+ s === "detail" && p && /* @__PURE__ */ e(
447
+ X,
448
+ {
449
+ feedbackId: p,
450
+ accent: r,
451
+ p: l,
452
+ font: B
453
+ }
454
+ ),
455
+ s === "create" && /* @__PURE__ */ e(
456
+ ee,
457
+ {
458
+ accent: r,
459
+ p: l,
460
+ font: B,
461
+ onDone: () => b("list")
462
+ }
463
+ )
464
+ ]
465
+ }
466
+ ),
467
+ m && s !== "support" && /* @__PURE__ */ d(
266
468
  "a",
267
469
  {
268
470
  href: "https://upstep.dev",
@@ -279,7 +481,8 @@ function ae({
279
481
  flexShrink: 0
280
482
  },
281
483
  children: [
282
- "Powered by ",
484
+ "Powered by",
485
+ " ",
283
486
  /* @__PURE__ */ e("strong", { style: { fontWeight: 700 }, children: "Upstep.dev" })
284
487
  ]
285
488
  }
@@ -291,24 +494,42 @@ function ae({
291
494
  )
292
495
  ] });
293
496
  }
294
- function J({ client: n, theme: o }) {
295
- const t = O(null);
296
- return S(() => {
297
- if (t.current) return n.connectSupportFrame(t.current);
298
- }, [n]), /* @__PURE__ */ e("iframe", { ref: t, "data-upstep-support": !0, title: "Customer support", src: n.supportFrameUrl(o), style: { width: "100%", height: "min(560px, calc(88dvh - 56px))", minHeight: 300, border: 0, display: "block" } });
497
+ function J({
498
+ client: o,
499
+ theme: n
500
+ }) {
501
+ const t = j(null);
502
+ return k(() => {
503
+ if (t.current) return o.connectSupportFrame(t.current);
504
+ }, [o]), /* @__PURE__ */ e(
505
+ "iframe",
506
+ {
507
+ ref: t,
508
+ "data-upstep-support": !0,
509
+ title: "Customer support",
510
+ src: o.supportFrameUrl(n),
511
+ style: {
512
+ width: "100%",
513
+ height: "min(560px, calc(100dvh - 168px))",
514
+ minHeight: 300,
515
+ border: 0,
516
+ display: "block"
517
+ }
518
+ }
519
+ );
299
520
  }
300
521
  function Q({
301
- onSelect: n,
302
- accent: o,
522
+ onSelect: o,
523
+ accent: n,
303
524
  p: t
304
525
  }) {
305
- const { feedItems: f, vote: g } = I(), i = f.filter((r) => r.status !== "CLOSED");
526
+ const { feedItems: g, vote: a } = I(), i = g.filter((r) => r.status !== "CLOSED");
306
527
  return i.length ? /* @__PURE__ */ e(T, { children: i.map((r) => {
307
- const l = r.userVote === "UP", y = r.title ?? r.content;
528
+ const l = r.userVote === "UP", x = r.title ?? r.content;
308
529
  return /* @__PURE__ */ d(
309
530
  "div",
310
531
  {
311
- onClick: () => n(r.id),
532
+ onClick: () => o(r.id),
312
533
  style: {
313
534
  display: "flex",
314
535
  gap: 12,
@@ -323,8 +544,8 @@ function Q({
323
544
  /* @__PURE__ */ d(
324
545
  "button",
325
546
  {
326
- onClick: (a) => {
327
- a.stopPropagation(), g(r.id, "UP");
547
+ onClick: (c) => {
548
+ c.stopPropagation(), a(r.id, "UP");
328
549
  },
329
550
  style: {
330
551
  display: "flex",
@@ -337,115 +558,309 @@ function Q({
337
558
  borderRadius: 11,
338
559
  cursor: "pointer",
339
560
  flexShrink: 0,
340
- border: `1px solid ${l ? o : t.border}`,
341
- background: l ? `${o}1a` : t.bgSoft
561
+ border: `1px solid ${l ? n : t.border}`,
562
+ background: l ? `${n}1a` : t.bgSoft
342
563
  },
343
564
  children: [
344
- /* @__PURE__ */ e(D, { color: o }),
345
- /* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 700, color: t.text, lineHeight: 1.1 }, children: r.upvotes })
565
+ /* @__PURE__ */ e(D, { color: n }),
566
+ /* @__PURE__ */ e(
567
+ "span",
568
+ {
569
+ style: {
570
+ fontSize: 14,
571
+ fontWeight: 700,
572
+ color: t.text,
573
+ lineHeight: 1.1
574
+ },
575
+ children: r.upvotes
576
+ }
577
+ )
346
578
  ]
347
579
  }
348
580
  ),
349
581
  /* @__PURE__ */ d("div", { style: { flex: 1, minWidth: 0 }, children: [
350
- /* @__PURE__ */ e("p", { style: { fontSize: 13.5, fontWeight: 600, lineHeight: 1.4, color: t.text, margin: "0 0 6px", overflow: "hidden", display: "-webkit-box", WebkitLineClamp: 2, WebkitBoxOrient: "vertical" }, children: y }),
351
- /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 6, flexWrap: "wrap" }, children: [
352
- /* @__PURE__ */ e(L, { type: r.type, p: t }),
353
- r.status === "PENDING" ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(A, { status: r.status, boardStatus: r.boardStatus, p: t }),
354
- /* @__PURE__ */ e("span", { style: { fontSize: 11, color: t.textFaint }, children: P(r.createdAt) })
355
- ] })
582
+ /* @__PURE__ */ e(
583
+ "p",
584
+ {
585
+ style: {
586
+ fontSize: 14,
587
+ fontWeight: 600,
588
+ lineHeight: 1.4,
589
+ color: t.text,
590
+ margin: "0 0 6px",
591
+ overflow: "hidden",
592
+ display: "-webkit-box",
593
+ WebkitLineClamp: 2,
594
+ WebkitBoxOrient: "vertical"
595
+ },
596
+ children: x
597
+ }
598
+ ),
599
+ /* @__PURE__ */ d(
600
+ "div",
601
+ {
602
+ style: {
603
+ display: "flex",
604
+ alignItems: "center",
605
+ gap: 6,
606
+ flexWrap: "wrap"
607
+ },
608
+ children: [
609
+ /* @__PURE__ */ e(L, { type: r.type, p: t }),
610
+ r.status === "PENDING" ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(
611
+ A,
612
+ {
613
+ status: r.status,
614
+ boardStatus: r.boardStatus,
615
+ p: t
616
+ }
617
+ ),
618
+ /* @__PURE__ */ e("span", { style: { fontSize: 11, color: t.textFaint }, children: P(r.createdAt) })
619
+ ]
620
+ }
621
+ )
356
622
  ] }),
357
- /* @__PURE__ */ e("span", { style: { color: t.textFaint, fontSize: 18, alignSelf: "center", flexShrink: 0 }, children: "›" })
623
+ /* @__PURE__ */ e(
624
+ "span",
625
+ {
626
+ style: {
627
+ color: t.textFaint,
628
+ fontSize: 18,
629
+ alignSelf: "center",
630
+ flexShrink: 0
631
+ },
632
+ children: "›"
633
+ }
634
+ )
358
635
  ]
359
636
  },
360
637
  r.id
361
638
  );
362
639
  }) }) : /* @__PURE__ */ d("div", { style: { textAlign: "center", padding: "40px 0" }, children: [
363
- /* @__PURE__ */ e("div", { style: { color: t.textSoft, fontSize: 15, fontWeight: 600, marginBottom: 4 }, children: "No open feedback yet" }),
640
+ /* @__PURE__ */ e(
641
+ "div",
642
+ {
643
+ style: {
644
+ color: t.textSoft,
645
+ fontSize: 15,
646
+ fontWeight: 600,
647
+ marginBottom: 4
648
+ },
649
+ children: "No open feedback yet"
650
+ }
651
+ ),
364
652
  /* @__PURE__ */ e("div", { style: { color: t.textFaint, fontSize: 14 }, children: "Be the first to share one." })
365
653
  ] });
366
654
  }
367
- function X({ feedbackId: n, accent: o, p: t, font: f }) {
368
- const { vote: g, getItem: i } = I(), [r, l] = h(null), [y, a] = h(!1);
369
- S(() => {
655
+ function X({
656
+ feedbackId: o,
657
+ accent: n,
658
+ p: t,
659
+ font: g
660
+ }) {
661
+ const { vote: a, getItem: i } = I(), [r, l] = h(null), [x, c] = h(!1);
662
+ k(() => {
370
663
  let s = !1;
371
- return i(n).then((b) => {
664
+ return i(o).then((b) => {
372
665
  s || l(b);
373
666
  }).catch(() => {
374
667
  }), () => {
375
668
  s = !0;
376
669
  };
377
- }, [n, i]);
670
+ }, [o, i]);
378
671
  async function w() {
379
- if (!(!r || y)) {
380
- a(!0);
672
+ if (!(!r || x)) {
673
+ c(!0);
381
674
  try {
382
- await g(r.id, "UP");
383
- const s = await i(n);
675
+ await a(r.id, "UP");
676
+ const s = await i(o);
384
677
  l(s);
385
678
  } catch {
386
679
  } finally {
387
- a(!1);
680
+ c(!1);
388
681
  }
389
682
  }
390
683
  }
391
684
  if (!r)
392
- return /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: "40px 0", color: t.textFaint, fontSize: 14 }, children: "Loading…" });
393
- const x = r.title;
685
+ return /* @__PURE__ */ e(
686
+ "div",
687
+ {
688
+ style: {
689
+ textAlign: "center",
690
+ padding: "40px 0",
691
+ color: t.textFaint,
692
+ fontSize: 14
693
+ },
694
+ children: "Loading…"
695
+ }
696
+ );
697
+ const m = r.title;
394
698
  return /* @__PURE__ */ d("div", { children: [
395
- x && /* @__PURE__ */ e("div", { style: { fontSize: 20, fontWeight: 700, color: t.text, letterSpacing: "-.02em", marginBottom: 10, lineHeight: 1.3 }, children: x }),
396
- /* @__PURE__ */ d("div", { style: { display: "flex", gap: 6, marginBottom: 14, flexWrap: "wrap" }, children: [
397
- /* @__PURE__ */ e(L, { type: r.type, p: t }),
398
- r.status === "PENDING" ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(A, { status: r.status, boardStatus: r.boardStatus, p: t })
399
- ] }),
400
- /* @__PURE__ */ e("p", { style: { fontSize: 15, lineHeight: 1.6, color: t.textSoft, marginBottom: 20 }, children: r.content }),
699
+ m && /* @__PURE__ */ e(
700
+ "div",
701
+ {
702
+ style: {
703
+ fontSize: 20,
704
+ fontWeight: 700,
705
+ color: t.text,
706
+ letterSpacing: "-.02em",
707
+ marginBottom: 10,
708
+ lineHeight: 1.3
709
+ },
710
+ children: m
711
+ }
712
+ ),
713
+ /* @__PURE__ */ d(
714
+ "div",
715
+ {
716
+ style: { display: "flex", gap: 6, marginBottom: 14, flexWrap: "wrap" },
717
+ children: [
718
+ /* @__PURE__ */ e(L, { type: r.type, p: t }),
719
+ r.status === "PENDING" ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(
720
+ A,
721
+ {
722
+ status: r.status,
723
+ boardStatus: r.boardStatus,
724
+ p: t
725
+ }
726
+ )
727
+ ]
728
+ }
729
+ ),
730
+ /* @__PURE__ */ e(
731
+ "p",
732
+ {
733
+ style: {
734
+ fontSize: 15,
735
+ lineHeight: 1.6,
736
+ color: t.textSoft,
737
+ marginBottom: 20
738
+ },
739
+ children: r.content
740
+ }
741
+ ),
401
742
  /* @__PURE__ */ d(
402
743
  "button",
403
744
  {
404
745
  onClick: w,
405
- disabled: y,
746
+ disabled: x,
406
747
  style: {
407
748
  display: "inline-flex",
408
749
  alignItems: "center",
409
750
  gap: 8,
410
- border: `1px solid ${r.userVote === "UP" ? o : t.border}`,
411
- background: r.userVote === "UP" ? `${o}15` : t.bgSoft,
751
+ border: `1px solid ${r.userVote === "UP" ? n : t.border}`,
752
+ background: r.userVote === "UP" ? `${n}15` : t.bgSoft,
412
753
  borderRadius: 12,
413
754
  padding: "10px 16px",
414
755
  cursor: "pointer",
415
- fontFamily: f
756
+ fontFamily: g
416
757
  },
417
758
  children: [
418
- /* @__PURE__ */ e(D, { color: o, size: 13 }),
759
+ /* @__PURE__ */ e(D, { color: n, size: 13 }),
419
760
  /* @__PURE__ */ e("span", { style: { fontSize: 18, fontWeight: 700, color: t.text }, children: r.upvotes }),
420
- /* @__PURE__ */ e("span", { style: { fontSize: 13, color: t.textFaint }, children: r.userVote === "UP" ? "Upvoted" : "Upvote" })
761
+ /* @__PURE__ */ e("span", { style: { fontSize: 14, color: t.textFaint }, children: r.userVote === "UP" ? "Upvoted" : "Upvote" })
421
762
  ]
422
763
  }
423
764
  ),
424
- r.comments.length > 0 && /* @__PURE__ */ d("div", { style: { marginTop: 28, borderTop: `1px solid ${t.border}`, paddingTop: 20 }, children: [
425
- /* @__PURE__ */ e("div", { style: { fontSize: 10, fontWeight: 700, letterSpacing: ".08em", color: t.textFaint, marginBottom: 12, textTransform: "uppercase" }, children: "Comments" }),
426
- r.comments.map((s) => /* @__PURE__ */ e(Z, { comment: s, p: t, accent: o }, s.id))
427
- ] })
765
+ r.comments.length > 0 && /* @__PURE__ */ d(
766
+ "div",
767
+ {
768
+ style: {
769
+ marginTop: 28,
770
+ borderTop: `1px solid ${t.border}`,
771
+ paddingTop: 20
772
+ },
773
+ children: [
774
+ /* @__PURE__ */ e(
775
+ "div",
776
+ {
777
+ style: {
778
+ fontSize: 10,
779
+ fontWeight: 700,
780
+ letterSpacing: ".08em",
781
+ color: t.textFaint,
782
+ marginBottom: 12,
783
+ textTransform: "uppercase"
784
+ },
785
+ children: "Comments"
786
+ }
787
+ ),
788
+ r.comments.map((s) => /* @__PURE__ */ e(Z, { comment: s, p: t, accent: n }, s.id))
789
+ ]
790
+ }
791
+ )
428
792
  ] });
429
793
  }
430
- function Z({ comment: n, p: o, accent: t }) {
431
- var f;
432
- return /* @__PURE__ */ d("div", { style: { background: o.bgSoft, border: `1px solid ${o.border}`, borderRadius: 12, padding: 14, marginBottom: 10 }, children: [
433
- /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 8 }, children: [
434
- /* @__PURE__ */ e("span", { style: { background: `${t}20`, color: t, fontSize: 11, fontWeight: 700, borderRadius: 20, padding: "2px 8px" }, children: ((f = n.authorName) == null ? void 0 : f.trim()) || "UpStep Team" }),
435
- /* @__PURE__ */ e("span", { style: { fontSize: 11, color: o.textFaint }, children: P(n.createdAt) })
436
- ] }),
437
- /* @__PURE__ */ e("p", { style: { fontSize: 14, lineHeight: 1.5, color: o.textSoft, margin: 0 }, children: n.content })
438
- ] });
794
+ function Z({
795
+ comment: o,
796
+ p: n,
797
+ accent: t
798
+ }) {
799
+ var g;
800
+ return /* @__PURE__ */ d(
801
+ "div",
802
+ {
803
+ style: {
804
+ background: n.bgSoft,
805
+ border: `1px solid ${n.border}`,
806
+ borderRadius: 12,
807
+ padding: 14,
808
+ marginBottom: 10
809
+ },
810
+ children: [
811
+ /* @__PURE__ */ d(
812
+ "div",
813
+ {
814
+ style: {
815
+ display: "flex",
816
+ alignItems: "center",
817
+ gap: 8,
818
+ marginBottom: 8
819
+ },
820
+ children: [
821
+ /* @__PURE__ */ e(
822
+ "span",
823
+ {
824
+ style: {
825
+ background: `${t}20`,
826
+ color: t,
827
+ fontSize: 11,
828
+ fontWeight: 700,
829
+ borderRadius: 20,
830
+ padding: "2px 8px"
831
+ },
832
+ children: ((g = o.authorName) == null ? void 0 : g.trim()) || "UpStep Team"
833
+ }
834
+ ),
835
+ /* @__PURE__ */ e("span", { style: { fontSize: 11, color: n.textFaint }, children: P(o.createdAt) })
836
+ ]
837
+ }
838
+ ),
839
+ /* @__PURE__ */ e(
840
+ "p",
841
+ {
842
+ style: { fontSize: 16, lineHeight: 1.6, color: n.textSoft, margin: 0 },
843
+ children: o.content
844
+ }
845
+ )
846
+ ]
847
+ }
848
+ );
439
849
  }
440
- function ee({ accent: n, p: o, font: t, onDone: f }) {
441
- const { submit: g } = I(), [i, r] = h(""), [l, y] = h(""), [a, w] = h("GENERAL"), [x, s] = h(!1), [b, k] = h(!1), [C, c] = h("");
442
- async function m() {
443
- if (!(!i.trim() || x)) {
444
- s(!0), c("");
850
+ function ee({
851
+ accent: o,
852
+ p: n,
853
+ font: t,
854
+ onDone: g
855
+ }) {
856
+ const { submit: a } = I(), [i, r] = h(""), [l, x] = h(""), [c, w] = h("GENERAL"), [m, s] = h(!1), [b, S] = h(!1), [C, p] = h("");
857
+ async function y() {
858
+ if (!(!i.trim() || m)) {
859
+ s(!0), p("");
445
860
  try {
446
- await g(i.trim(), l.trim() || i.trim(), a), k(!0), setTimeout(f, 1200);
861
+ await a(i.trim(), l.trim() || i.trim(), c), S(!0), setTimeout(g, 1200);
447
862
  } catch {
448
- c("Something went wrong. Please try again.");
863
+ p("Something went wrong. Please try again.");
449
864
  } finally {
450
865
  s(!1);
451
866
  }
@@ -453,28 +868,52 @@ function ee({ accent: n, p: o, font: t, onDone: f }) {
453
868
  }
454
869
  if (b)
455
870
  return /* @__PURE__ */ d("div", { style: { textAlign: "center", paddingTop: 40 }, children: [
456
- /* @__PURE__ */ e("div", { style: { fontSize: 18, fontWeight: 700, color: o.text, marginBottom: 6 }, children: "Submitted" }),
457
- /* @__PURE__ */ e("div", { style: { fontSize: 14, color: o.textFaint }, children: "Feedback received. Thank you." })
871
+ /* @__PURE__ */ e(
872
+ "div",
873
+ {
874
+ style: {
875
+ fontSize: 18,
876
+ fontWeight: 700,
877
+ color: n.text,
878
+ marginBottom: 6
879
+ },
880
+ children: "Submitted"
881
+ }
882
+ ),
883
+ /* @__PURE__ */ e("div", { style: { fontSize: 14, color: n.textFaint }, children: "Feedback received. Thank you." })
458
884
  ] });
459
885
  const v = {
460
886
  width: "100%",
461
- border: `1px solid ${o.border}`,
887
+ border: `1px solid ${n.border}`,
462
888
  borderRadius: 12,
463
889
  padding: "10px 12px",
464
- fontSize: 14,
465
- lineHeight: 1.5,
890
+ fontSize: 16,
891
+ lineHeight: 1.6,
466
892
  outline: "none",
467
- background: o.bgSoft,
468
- color: o.text,
893
+ background: n.bgSoft,
894
+ color: n.text,
469
895
  fontFamily: t,
470
896
  boxSizing: "border-box"
471
897
  };
472
898
  return /* @__PURE__ */ d("div", { children: [
473
- /* @__PURE__ */ e("div", { style: { fontSize: 10, fontWeight: 700, letterSpacing: ".08em", color: o.textFaint, marginBottom: 8, textTransform: "uppercase" }, children: "Type" }),
474
- /* @__PURE__ */ e("div", { style: { display: "flex", gap: 7, marginBottom: 16 }, children: ["BUG", "FEATURE", "GENERAL"].map((p) => /* @__PURE__ */ d(
899
+ /* @__PURE__ */ e(
900
+ "div",
901
+ {
902
+ style: {
903
+ fontSize: 10,
904
+ fontWeight: 700,
905
+ letterSpacing: ".08em",
906
+ color: n.textFaint,
907
+ marginBottom: 8,
908
+ textTransform: "uppercase"
909
+ },
910
+ children: "Type"
911
+ }
912
+ ),
913
+ /* @__PURE__ */ e("div", { style: { display: "flex", gap: 7, marginBottom: 16 }, children: ["BUG", "FEATURE", "GENERAL"].map((u) => /* @__PURE__ */ d(
475
914
  "button",
476
915
  {
477
- onClick: () => w(p),
916
+ onClick: () => w(u),
478
917
  style: {
479
918
  flex: 1,
480
919
  display: "flex",
@@ -483,67 +922,100 @@ function ee({ accent: n, p: o, font: t, onDone: f }) {
483
922
  gap: 5,
484
923
  padding: "8px 10px",
485
924
  borderRadius: 9,
486
- fontSize: 12.5,
925
+ fontSize: 14,
487
926
  fontWeight: 600,
488
927
  cursor: "pointer",
489
- background: a === p ? n : o.bg,
490
- color: a === p ? "#fff" : o.textSoft,
491
- border: `1px solid ${a === p ? n : o.border}`,
928
+ background: c === u ? o : n.bg,
929
+ color: c === u ? "#fff" : n.textSoft,
930
+ border: `1px solid ${c === u ? o : n.border}`,
492
931
  fontFamily: t
493
932
  },
494
933
  children: [
495
- U[p].icon,
496
- U[p].label
934
+ U[u].icon,
935
+ U[u].label
497
936
  ]
498
937
  },
499
- p
938
+ u
500
939
  )) }),
501
- /* @__PURE__ */ e("div", { style: { fontSize: 10, fontWeight: 700, letterSpacing: ".08em", color: o.textFaint, marginBottom: 8, textTransform: "uppercase" }, children: "Title" }),
940
+ /* @__PURE__ */ e(
941
+ "div",
942
+ {
943
+ style: {
944
+ fontSize: 10,
945
+ fontWeight: 700,
946
+ letterSpacing: ".08em",
947
+ color: n.textFaint,
948
+ marginBottom: 8,
949
+ textTransform: "uppercase"
950
+ },
951
+ children: "Title"
952
+ }
953
+ ),
502
954
  /* @__PURE__ */ e(
503
955
  "input",
504
956
  {
505
957
  value: i,
506
- onChange: (p) => r(p.target.value),
958
+ onChange: (u) => r(u.target.value),
507
959
  placeholder: "Short summary of the issue or idea",
508
960
  maxLength: 200,
509
961
  style: { ...v, marginBottom: 16, display: "block" }
510
962
  }
511
963
  ),
512
- /* @__PURE__ */ d("div", { style: { fontSize: 10, fontWeight: 700, letterSpacing: ".08em", color: o.textFaint, marginBottom: 8, textTransform: "uppercase" }, children: [
513
- "Description ",
514
- /* @__PURE__ */ e("span", { style: { fontWeight: 400, textTransform: "none", letterSpacing: 0 }, children: "(optional)" })
515
- ] }),
964
+ /* @__PURE__ */ d(
965
+ "div",
966
+ {
967
+ style: {
968
+ fontSize: 10,
969
+ fontWeight: 700,
970
+ letterSpacing: ".08em",
971
+ color: n.textFaint,
972
+ marginBottom: 8,
973
+ textTransform: "uppercase"
974
+ },
975
+ children: [
976
+ "Description",
977
+ " ",
978
+ /* @__PURE__ */ e(
979
+ "span",
980
+ {
981
+ style: { fontWeight: 400, textTransform: "none", letterSpacing: 0 },
982
+ children: "(optional)"
983
+ }
984
+ )
985
+ ]
986
+ }
987
+ ),
516
988
  /* @__PURE__ */ e(
517
989
  "textarea",
518
990
  {
519
991
  value: l,
520
- onChange: (p) => y(p.target.value),
992
+ onChange: (u) => x(u.target.value),
521
993
  placeholder: "Steps to reproduce, expected behaviour, or more context",
522
994
  maxLength: 2e3,
523
995
  rows: 4,
524
996
  style: { ...v, resize: "vertical", marginBottom: 16 }
525
997
  }
526
998
  ),
527
- C && /* @__PURE__ */ e("p", { style: { fontSize: 13, color: "#d6453d", marginBottom: 12 }, children: C }),
999
+ C && /* @__PURE__ */ e("p", { style: { fontSize: 14, color: "#d6453d", marginBottom: 12 }, children: C }),
528
1000
  /* @__PURE__ */ e(
529
1001
  "button",
530
1002
  {
531
- onClick: m,
532
- disabled: x || !i.trim(),
1003
+ onClick: y,
1004
+ disabled: m || !i.trim(),
533
1005
  style: {
534
1006
  width: "100%",
535
1007
  padding: 12,
536
- background: n,
1008
+ background: o,
537
1009
  color: "#fff",
538
1010
  border: "none",
539
1011
  borderRadius: 11,
540
1012
  fontSize: 14,
541
1013
  fontWeight: 600,
542
1014
  cursor: "pointer",
543
- opacity: x || !i.trim() ? 0.5 : 1,
1015
+ opacity: m || !i.trim() ? 0.5 : 1,
544
1016
  fontFamily: t
545
1017
  },
546
- children: x ? "Submitting…" : "Submit feedback"
1018
+ children: m ? "Submitting…" : "Submit feedback"
547
1019
  }
548
1020
  )
549
1021
  ] });
@@ -551,65 +1023,202 @@ function ee({ accent: n, p: o, font: t, onDone: f }) {
551
1023
  const U = {
552
1024
  BUG: {
553
1025
  label: "Bug",
554
- icon: /* @__PURE__ */ d("svg", { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: 1.8, strokeLinecap: "round", strokeLinejoin: "round", children: [
555
- /* @__PURE__ */ e("ellipse", { cx: "8", cy: "10", rx: "3.5", ry: "4.5" }),
556
- /* @__PURE__ */ e("path", { d: "M8 5.5V4M5.5 6.5 3.5 5M10.5 6.5 12.5 5M4.5 10.5 2.5 10M11.5 10.5 13.5 10" })
557
- ] })
1026
+ icon: /* @__PURE__ */ d(
1027
+ "svg",
1028
+ {
1029
+ width: 12,
1030
+ height: 12,
1031
+ viewBox: "0 0 16 16",
1032
+ fill: "none",
1033
+ stroke: "currentColor",
1034
+ strokeWidth: 1.8,
1035
+ strokeLinecap: "round",
1036
+ strokeLinejoin: "round",
1037
+ children: [
1038
+ /* @__PURE__ */ e("ellipse", { cx: "8", cy: "10", rx: "3.5", ry: "4.5" }),
1039
+ /* @__PURE__ */ e("path", { d: "M8 5.5V4M5.5 6.5 3.5 5M10.5 6.5 12.5 5M4.5 10.5 2.5 10M11.5 10.5 13.5 10" })
1040
+ ]
1041
+ }
1042
+ )
558
1043
  },
559
1044
  FEATURE: {
560
1045
  label: "Feature",
561
- icon: /* @__PURE__ */ d("svg", { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: 1.8, strokeLinecap: "round", strokeLinejoin: "round", children: [
562
- /* @__PURE__ */ e("path", { d: "M8 2v1.5M8 12.5V14M2 8h1.5M12.5 8H14M4.1 4.1l1 1M10.9 10.9l1 1M11.9 4.1l-1 1M5.1 10.9l-1 1" }),
563
- /* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "2.5" })
564
- ] })
1046
+ icon: /* @__PURE__ */ d(
1047
+ "svg",
1048
+ {
1049
+ width: 12,
1050
+ height: 12,
1051
+ viewBox: "0 0 16 16",
1052
+ fill: "none",
1053
+ stroke: "currentColor",
1054
+ strokeWidth: 1.8,
1055
+ strokeLinecap: "round",
1056
+ strokeLinejoin: "round",
1057
+ children: [
1058
+ /* @__PURE__ */ e("path", { d: "M8 2v1.5M8 12.5V14M2 8h1.5M12.5 8H14M4.1 4.1l1 1M10.9 10.9l1 1M11.9 4.1l-1 1M5.1 10.9l-1 1" }),
1059
+ /* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "2.5" })
1060
+ ]
1061
+ }
1062
+ )
565
1063
  },
566
1064
  GENERAL: {
567
1065
  label: "General",
568
- icon: /* @__PURE__ */ e("svg", { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: 1.8, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "M14 9a2 2 0 0 1-2 2H5L2 14V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v5z" }) })
1066
+ icon: /* @__PURE__ */ e(
1067
+ "svg",
1068
+ {
1069
+ width: 12,
1070
+ height: 12,
1071
+ viewBox: "0 0 16 16",
1072
+ fill: "none",
1073
+ stroke: "currentColor",
1074
+ strokeWidth: 1.8,
1075
+ strokeLinecap: "round",
1076
+ strokeLinejoin: "round",
1077
+ children: /* @__PURE__ */ e("path", { d: "M14 9a2 2 0 0 1-2 2H5L2 14V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v5z" })
1078
+ }
1079
+ )
569
1080
  }
570
- }, te = { BUG: "#fdecec", FEATURE: "#e9f0fd" }, oe = { BUG: "#d6453d", FEATURE: "#3b76d6" };
571
- function L({ type: n, p: o }) {
572
- return /* @__PURE__ */ e("span", { style: {
573
- padding: "2px 8px",
574
- borderRadius: 9999,
575
- fontSize: 10.5,
576
- fontWeight: 700,
577
- letterSpacing: ".02em",
578
- background: te[n] ?? o.bgSoft,
579
- color: oe[n] ?? o.textSoft
580
- }, children: n });
1081
+ }, te = { BUG: "#fdecec", FEATURE: "#e9f0fd" }, ne = { BUG: "#d6453d", FEATURE: "#3b76d6" };
1082
+ function L({ type: o, p: n }) {
1083
+ return /* @__PURE__ */ e(
1084
+ "span",
1085
+ {
1086
+ style: {
1087
+ padding: "2px 8px",
1088
+ borderRadius: 9999,
1089
+ fontSize: 10.5,
1090
+ fontWeight: 700,
1091
+ letterSpacing: ".02em",
1092
+ background: te[o] ?? n.bgSoft,
1093
+ color: ne[o] ?? n.textSoft
1094
+ },
1095
+ children: o
1096
+ }
1097
+ );
581
1098
  }
582
- const ne = {
1099
+ const oe = {
583
1100
  OPEN: "#b45309",
584
1101
  IN_PROGRESS: "#1d4ed8",
585
1102
  DONE: "#15803d",
586
1103
  CLOSED: "#6b7280"
587
1104
  };
588
1105
  function M() {
589
- return /* @__PURE__ */ d("span", { style: { display: "inline-flex", alignItems: "center", gap: 4, background: "#fff7ed", border: "1px solid #fed7aa", borderRadius: 6, padding: "1px 6px", fontSize: 10, fontWeight: 700, color: "#ea580c" }, children: [
590
- /* @__PURE__ */ e("span", { style: { width: 5, height: 5, borderRadius: "50%", background: "#ea580c", display: "inline-block" } }),
591
- "Pending review"
592
- ] });
1106
+ return /* @__PURE__ */ d(
1107
+ "span",
1108
+ {
1109
+ style: {
1110
+ display: "inline-flex",
1111
+ alignItems: "center",
1112
+ gap: 4,
1113
+ background: "#fff7ed",
1114
+ border: "1px solid #fed7aa",
1115
+ borderRadius: 6,
1116
+ padding: "1px 6px",
1117
+ fontSize: 10,
1118
+ fontWeight: 700,
1119
+ color: "#ea580c"
1120
+ },
1121
+ children: [
1122
+ /* @__PURE__ */ e(
1123
+ "span",
1124
+ {
1125
+ style: {
1126
+ width: 5,
1127
+ height: 5,
1128
+ borderRadius: "50%",
1129
+ background: "#ea580c",
1130
+ display: "inline-block"
1131
+ }
1132
+ }
1133
+ ),
1134
+ "Pending review"
1135
+ ]
1136
+ }
1137
+ );
593
1138
  }
594
1139
  function A({
595
- status: n,
596
- boardStatus: o,
1140
+ status: o,
1141
+ boardStatus: n,
597
1142
  p: t
598
1143
  }) {
599
- const f = (o == null ? void 0 : o.color) ?? ne[n] ?? "#9ca3af";
600
- return /* @__PURE__ */ d("span", { style: { display: "inline-flex", alignItems: "center", gap: 5, background: t.bgSoft, border: `1px solid ${t.border}`, borderRadius: 6, padding: "2px 8px", fontSize: 10, fontWeight: 600, color: t.textSoft }, children: [
601
- /* @__PURE__ */ e("span", { style: { width: 6, height: 6, borderRadius: "50%", background: f, display: "inline-block", flexShrink: 0 } }),
602
- (o == null ? void 0 : o.name) ?? n.replace("_", " ")
603
- ] });
1144
+ const g = (n == null ? void 0 : n.color) ?? oe[o] ?? "#9ca3af";
1145
+ return /* @__PURE__ */ d(
1146
+ "span",
1147
+ {
1148
+ style: {
1149
+ display: "inline-flex",
1150
+ alignItems: "center",
1151
+ gap: 5,
1152
+ background: t.bgSoft,
1153
+ border: `1px solid ${t.border}`,
1154
+ borderRadius: 6,
1155
+ padding: "2px 8px",
1156
+ fontSize: 10,
1157
+ fontWeight: 600,
1158
+ color: t.textSoft
1159
+ },
1160
+ children: [
1161
+ /* @__PURE__ */ e(
1162
+ "span",
1163
+ {
1164
+ style: {
1165
+ width: 6,
1166
+ height: 6,
1167
+ borderRadius: "50%",
1168
+ background: g,
1169
+ display: "inline-block",
1170
+ flexShrink: 0
1171
+ }
1172
+ }
1173
+ ),
1174
+ (n == null ? void 0 : n.name) ?? o.replace("_", " ")
1175
+ ]
1176
+ }
1177
+ );
604
1178
  }
605
- function re({ size: n = 16, color: o = "currentColor" }) {
606
- return /* @__PURE__ */ e("svg", { width: n, height: n, viewBox: "0 0 24 24", fill: "none", stroke: o, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }) });
1179
+ function re({
1180
+ size: o = 16,
1181
+ color: n = "currentColor"
1182
+ }) {
1183
+ return /* @__PURE__ */ e(
1184
+ "svg",
1185
+ {
1186
+ width: o,
1187
+ height: o,
1188
+ viewBox: "0 0 24 24",
1189
+ fill: "none",
1190
+ stroke: n,
1191
+ strokeWidth: 2,
1192
+ strokeLinecap: "round",
1193
+ strokeLinejoin: "round",
1194
+ children: /* @__PURE__ */ e("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
1195
+ }
1196
+ );
607
1197
  }
608
- function D({ color: n = "currentColor", size: o = 11 }) {
609
- return /* @__PURE__ */ e("svg", { width: o, height: o, viewBox: "0 0 16 16", fill: "none", stroke: n, strokeWidth: 2.2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "M8 13V3M3 8l5-5 5 5" }) });
1198
+ function D({
1199
+ color: o = "currentColor",
1200
+ size: n = 11
1201
+ }) {
1202
+ return /* @__PURE__ */ e(
1203
+ "svg",
1204
+ {
1205
+ width: n,
1206
+ height: n,
1207
+ viewBox: "0 0 16 16",
1208
+ fill: "none",
1209
+ stroke: o,
1210
+ strokeWidth: 2.2,
1211
+ strokeLinecap: "round",
1212
+ strokeLinejoin: "round",
1213
+ children: /* @__PURE__ */ e("path", { d: "M8 13V3M3 8l5-5 5 5" })
1214
+ }
1215
+ );
610
1216
  }
611
- function P(n) {
612
- return new Date(n).toLocaleDateString(void 0, { month: "short", day: "numeric" });
1217
+ function P(o) {
1218
+ return new Date(o).toLocaleDateString(void 0, {
1219
+ month: "short",
1220
+ day: "numeric"
1221
+ });
613
1222
  }
614
1223
  export {
615
1224
  ae as FeedbackWidget,