chesai-ui 0.16.9 → 0.16.10
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.
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import { jsxs as r, jsx as t, Fragment as R } from "react/jsx-runtime";
|
|
2
|
-
import { useMediaQuery as
|
|
3
|
-
import { clsx as
|
|
2
|
+
import { useMediaQuery as ue } from "@uidotdev/usehooks";
|
|
3
|
+
import { clsx as X } from "clsx";
|
|
4
4
|
import { format as W } from "date-fns";
|
|
5
5
|
import { useDragControls as fe, useMotionValue as L, AnimatePresence as Q, motion as S } from "framer-motion";
|
|
6
6
|
import { Clock as he, Repeat as pe, X as U, Trash2 as J, GripHorizontal as ye } from "lucide-react";
|
|
7
|
-
import { useRef as ve, useState as
|
|
7
|
+
import { useRef as ve, useState as M, useEffect as K } from "react";
|
|
8
8
|
import { createPortal as P } from "react-dom";
|
|
9
|
-
import { Button as
|
|
9
|
+
import { Button as x } from "../button/index.mjs";
|
|
10
|
+
import { ButtonGroup as ge } from "../button-group/index.mjs";
|
|
10
11
|
import { DatePicker as z } from "../date-picker/date-picker.mjs";
|
|
11
|
-
import { IconButton as
|
|
12
|
-
import { Input as
|
|
13
|
-
import { Sheet as
|
|
12
|
+
import { IconButton as w } from "../icon-button/index.mjs";
|
|
13
|
+
import { Input as xe } from "../input/index.mjs";
|
|
14
|
+
import { Sheet as we, SheetContent as be, SheetHeader as Ne, SheetTitle as ke } from "../sheet/index.mjs";
|
|
14
15
|
import { TimePicker as Z } from "../time-picker/index.mjs";
|
|
15
|
-
import { Typography as
|
|
16
|
-
import { Switch as
|
|
16
|
+
import { Typography as b } from "../typography/index.mjs";
|
|
17
|
+
import { Switch as De } from "../switch/index.mjs";
|
|
17
18
|
import { Select as ee } from "../select/index.mjs";
|
|
18
19
|
import { NumberInput as te } from "../number-input/index.mjs";
|
|
19
|
-
import { useFullCalendar as
|
|
20
|
-
const
|
|
20
|
+
import { useFullCalendar as Ce } from "./calendar-context.mjs";
|
|
21
|
+
const N = 380, Oe = (s, i) => {
|
|
21
22
|
const o = s.frequency, a = s.interval;
|
|
22
23
|
let d = "";
|
|
23
24
|
if (a > 1 ? d = `Every ${a} ${o === "daily" ? "days" : o === "weekly" ? "weeks" : o === "monthly" ? "months" : "years"}` : d = o === "daily" ? "Daily" : o === "weekly" ? "Weekly" : o === "monthly" ? "Monthly" : "Annually", o === "weekly" && s.daysOfWeek && s.daysOfWeek.length > 0) {
|
|
24
|
-
const
|
|
25
|
+
const k = [
|
|
25
26
|
"Sunday",
|
|
26
27
|
"Monday",
|
|
27
28
|
"Tuesday",
|
|
@@ -30,7 +31,7 @@ const b = 380, Ce = (s, i) => {
|
|
|
30
31
|
"Friday",
|
|
31
32
|
"Saturday"
|
|
32
33
|
];
|
|
33
|
-
s.daysOfWeek.length === 7 ? d = a > 1 ? `Every ${a} weeks on all days` : "Every day" : s.daysOfWeek.length === 5 && [1, 2, 3, 4, 5].every((y) => s.daysOfWeek.includes(y)) ? d = a > 1 ? `Every ${a} weeks on weekdays` : "Every weekday (Monday to Friday)" : d += ` on ${s.daysOfWeek.map((y) =>
|
|
34
|
+
s.daysOfWeek.length === 7 ? d = a > 1 ? `Every ${a} weeks on all days` : "Every day" : s.daysOfWeek.length === 5 && [1, 2, 3, 4, 5].every((y) => s.daysOfWeek.includes(y)) ? d = a > 1 ? `Every ${a} weeks on weekdays` : "Every weekday (Monday to Friday)" : d += ` on ${s.daysOfWeek.map((y) => k[y]).join(", ")}`;
|
|
34
35
|
} else o === "monthly" ? d += ` on day ${i.getDate()}` : o === "yearly" && (d += ` on ${W(i, "MMM d")}`);
|
|
35
36
|
return s.endType === "on_date" && s.until ? d += `, until ${W(s.until, "MMM d, yyyy")}` : s.endType === "after_occurrences" && s.count && (d += `, for ${s.count} occurrences`), d;
|
|
36
37
|
}, A = ({
|
|
@@ -53,7 +54,7 @@ const b = 380, Ce = (s, i) => {
|
|
|
53
54
|
/* @__PURE__ */ t(
|
|
54
55
|
"div",
|
|
55
56
|
{
|
|
56
|
-
className:
|
|
57
|
+
className: X(
|
|
57
58
|
"w-5 h-5 rounded-full border-2 transition-colors",
|
|
58
59
|
s ? "border-primary" : "border-outline-variant hover:border-on-surface-variant"
|
|
59
60
|
)
|
|
@@ -62,7 +63,7 @@ const b = 380, Ce = (s, i) => {
|
|
|
62
63
|
/* @__PURE__ */ t(
|
|
63
64
|
"div",
|
|
64
65
|
{
|
|
65
|
-
className:
|
|
66
|
+
className: X(
|
|
66
67
|
"absolute w-2.5 h-2.5 rounded-full bg-primary transition-transform duration-200",
|
|
67
68
|
s ? "scale-100" : "scale-0"
|
|
68
69
|
)
|
|
@@ -72,22 +73,22 @@ const b = 380, Ce = (s, i) => {
|
|
|
72
73
|
/* @__PURE__ */ t("span", { className: "text-sm font-medium text-on-surface select-none", children: o })
|
|
73
74
|
] }),
|
|
74
75
|
a && /* @__PURE__ */ t("div", { className: "flex-1 flex items-center", children: a })
|
|
75
|
-
] }),
|
|
76
|
-
const s =
|
|
76
|
+
] }), Xe = () => {
|
|
77
|
+
const s = Ce(), {
|
|
77
78
|
popover: i,
|
|
78
79
|
closePopover: o,
|
|
79
80
|
draftEvent: a,
|
|
80
81
|
setDraftEvent: d,
|
|
81
|
-
onEventCreate:
|
|
82
|
+
onEventCreate: k,
|
|
82
83
|
onEventUpdate: y,
|
|
83
|
-
onEventDelete:
|
|
84
|
+
onEventDelete: H,
|
|
84
85
|
hidePopoverTitle: ae,
|
|
85
86
|
hidePopoverTime: ne,
|
|
86
87
|
hidePopoverRecurrence: re,
|
|
87
|
-
renderPopoverHeader:
|
|
88
|
-
renderPopoverFooter:
|
|
88
|
+
renderPopoverHeader: q,
|
|
89
|
+
renderPopoverFooter: Y,
|
|
89
90
|
renderPopoverCustomFields: V
|
|
90
|
-
} = s, v =
|
|
91
|
+
} = s, v = ue("(max-width: 768px)"), E = ve(null), _ = fe(), D = L(0), C = L(0), [ie, O] = M(!1), [g, le] = M(450), [c, u] = M({
|
|
91
92
|
frequency: "weekly",
|
|
92
93
|
interval: 1,
|
|
93
94
|
daysOfWeek: [],
|
|
@@ -108,18 +109,18 @@ const b = 380, Ce = (s, i) => {
|
|
|
108
109
|
const n = window.innerWidth, l = window.innerHeight;
|
|
109
110
|
if (i.anchorRect) {
|
|
110
111
|
let p = i.anchorRect.right + 16, f = i.anchorRect.top;
|
|
111
|
-
p +
|
|
112
|
+
p + N > n && (p = i.anchorRect.left - N - 16), f + g > l && (f = l - g - 16), p = Math.max(
|
|
112
113
|
16,
|
|
113
|
-
Math.min(p, n -
|
|
114
|
+
Math.min(p, n - N - 16)
|
|
114
115
|
), f = Math.max(
|
|
115
116
|
16,
|
|
116
117
|
Math.min(f, l - g - 16)
|
|
117
|
-
),
|
|
118
|
+
), D.set(p), C.set(f);
|
|
118
119
|
} else
|
|
119
|
-
|
|
120
|
+
D.set(n / 2 - N / 2), C.set(l / 2 - g / 2);
|
|
120
121
|
}
|
|
121
|
-
}, [i.isOpen, i.anchorRect, v, g,
|
|
122
|
-
const [se, oe] =
|
|
122
|
+
}, [i.isOpen, i.anchorRect, v, g, D, C]);
|
|
123
|
+
const [se, oe] = M(1), $ = async () => {
|
|
123
124
|
if (!a) return;
|
|
124
125
|
const e = new Date(a.start);
|
|
125
126
|
a.isAllDay ? e.setHours(0, 0, 0, 0) : e.setHours(
|
|
@@ -141,10 +142,10 @@ const b = 380, Ce = (s, i) => {
|
|
|
141
142
|
end: n,
|
|
142
143
|
title: a.title || "(No title)"
|
|
143
144
|
};
|
|
144
|
-
delete l.isDraft, i.mode === "create" &&
|
|
145
|
-
},
|
|
146
|
-
a?.id &&
|
|
147
|
-
},
|
|
145
|
+
delete l.isDraft, i.mode === "create" && k ? await k(l) : i.mode === "edit" && y && await y(l), o();
|
|
146
|
+
}, j = async () => {
|
|
147
|
+
a?.id && H && await H(a.id), o();
|
|
148
|
+
}, m = (e) => {
|
|
148
149
|
d((n) => n ? { ...n, ...e } : null);
|
|
149
150
|
}, T = (e) => {
|
|
150
151
|
d((n) => {
|
|
@@ -174,12 +175,12 @@ const b = 380, Ce = (s, i) => {
|
|
|
174
175
|
const e = a.recurrence;
|
|
175
176
|
e.interval === 1 && e.endType === "never" && (e.frequency === "daily" ? h = "daily" : e.frequency === "weekly" && e.daysOfWeek?.length === 1 && e.daysOfWeek[0] === a.start.getDay() ? h = "weekly" : e.frequency === "weekly" && e.daysOfWeek?.length === 5 && [1, 2, 3, 4, 5].every((n) => e.daysOfWeek.includes(n)) ? h = "weekdays" : e.frequency === "monthly" ? h = "monthly" : e.frequency === "yearly" && (h = "yearly")), h === "none" && (h = "custom_active", F.push({
|
|
176
177
|
value: "custom_active",
|
|
177
|
-
label:
|
|
178
|
+
label: Oe(e, a.start)
|
|
178
179
|
}));
|
|
179
180
|
}
|
|
180
181
|
F.push({ value: "custom", label: "Custom..." });
|
|
181
182
|
const ce = (e) => {
|
|
182
|
-
e === "none" ?
|
|
183
|
+
e === "none" ? m({ recurrence: void 0 }) : e === "custom" ? (u(
|
|
183
184
|
a?.recurrence || {
|
|
184
185
|
frequency: "weekly",
|
|
185
186
|
interval: 1,
|
|
@@ -188,14 +189,14 @@ const b = 380, Ce = (s, i) => {
|
|
|
188
189
|
count: 13,
|
|
189
190
|
until: new Date(Date.now() + 720 * 60 * 60 * 1e3)
|
|
190
191
|
}
|
|
191
|
-
),
|
|
192
|
+
), O(!0)) : e === "weekdays" ? m({
|
|
192
193
|
recurrence: {
|
|
193
194
|
frequency: "weekly",
|
|
194
195
|
interval: 1,
|
|
195
196
|
endType: "never",
|
|
196
197
|
daysOfWeek: [1, 2, 3, 4, 5]
|
|
197
198
|
}
|
|
198
|
-
}) : e !== "custom_active" &&
|
|
199
|
+
}) : e !== "custom_active" && m({
|
|
199
200
|
recurrence: {
|
|
200
201
|
frequency: e,
|
|
201
202
|
interval: 1,
|
|
@@ -206,14 +207,14 @@ const b = 380, Ce = (s, i) => {
|
|
|
206
207
|
};
|
|
207
208
|
if (!a) return null;
|
|
208
209
|
const B = /* @__PURE__ */ r("div", { className: "flex flex-col gap-6 p-6 font-manrope text-on-surface min-w-[340px]", children: [
|
|
209
|
-
|
|
210
|
+
q && /* @__PURE__ */ t("div", { className: "flex flex-col gap-4", children: q(a, T) }),
|
|
210
211
|
!ae && /* @__PURE__ */ t("div", { className: "pl-10 pr-2", children: /* @__PURE__ */ t(
|
|
211
|
-
|
|
212
|
+
xe,
|
|
212
213
|
{
|
|
213
214
|
variant: "underlined",
|
|
214
215
|
placeholder: "Add title",
|
|
215
216
|
value: a.title,
|
|
216
|
-
onChange: (e) =>
|
|
217
|
+
onChange: (e) => m({ title: e.target.value }),
|
|
217
218
|
autoFocus: !0,
|
|
218
219
|
className: "shadow-none px-0",
|
|
219
220
|
classNames: {
|
|
@@ -251,7 +252,7 @@ const b = 380, Ce = (s, i) => {
|
|
|
251
252
|
e.getFullYear(),
|
|
252
253
|
e.getMonth(),
|
|
253
254
|
e.getDate()
|
|
254
|
-
),
|
|
255
|
+
), m({ start: n, end: l });
|
|
255
256
|
}
|
|
256
257
|
}
|
|
257
258
|
),
|
|
@@ -272,13 +273,13 @@ const b = 380, Ce = (s, i) => {
|
|
|
272
273
|
e.getFullYear(),
|
|
273
274
|
e.getMonth(),
|
|
274
275
|
e.getDate()
|
|
275
|
-
),
|
|
276
|
+
), m({ end: n }), a.start > n) {
|
|
276
277
|
const l = new Date(a.start);
|
|
277
278
|
l.setFullYear(
|
|
278
279
|
e.getFullYear(),
|
|
279
280
|
e.getMonth(),
|
|
280
281
|
e.getDate()
|
|
281
|
-
),
|
|
282
|
+
), m({ start: l });
|
|
282
283
|
}
|
|
283
284
|
}
|
|
284
285
|
}
|
|
@@ -287,21 +288,21 @@ const b = 380, Ce = (s, i) => {
|
|
|
287
288
|
] }),
|
|
288
289
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 mt-1 w-fit", children: [
|
|
289
290
|
/* @__PURE__ */ t(
|
|
290
|
-
|
|
291
|
+
De,
|
|
291
292
|
{
|
|
292
293
|
id: "all-day-switch",
|
|
293
294
|
size: "sm",
|
|
294
295
|
checked: !!a.isAllDay,
|
|
295
296
|
onCheckedChange: (e) => {
|
|
296
297
|
if (e)
|
|
297
|
-
|
|
298
|
+
m({ isAllDay: e });
|
|
298
299
|
else {
|
|
299
300
|
const n = new Date(a.end);
|
|
300
301
|
n.setFullYear(
|
|
301
302
|
a.start.getFullYear(),
|
|
302
303
|
a.start.getMonth(),
|
|
303
304
|
a.start.getDate()
|
|
304
|
-
),
|
|
305
|
+
), m({ isAllDay: e, end: n });
|
|
305
306
|
}
|
|
306
307
|
}
|
|
307
308
|
}
|
|
@@ -324,7 +325,7 @@ const b = 380, Ce = (s, i) => {
|
|
|
324
325
|
size: "sm",
|
|
325
326
|
shape: "full",
|
|
326
327
|
value: a.start,
|
|
327
|
-
onChange: (e) =>
|
|
328
|
+
onChange: (e) => m({ start: e })
|
|
328
329
|
}
|
|
329
330
|
),
|
|
330
331
|
/* @__PURE__ */ t("span", { className: "text-on-surface-variant shrink-0", children: "-" }),
|
|
@@ -336,7 +337,7 @@ const b = 380, Ce = (s, i) => {
|
|
|
336
337
|
size: "sm",
|
|
337
338
|
shape: "full",
|
|
338
339
|
value: a.end,
|
|
339
|
-
onChange: (e) =>
|
|
340
|
+
onChange: (e) => m({ end: e })
|
|
340
341
|
}
|
|
341
342
|
)
|
|
342
343
|
] })
|
|
@@ -357,8 +358,8 @@ const b = 380, Ce = (s, i) => {
|
|
|
357
358
|
) })
|
|
358
359
|
] }),
|
|
359
360
|
V && /* @__PURE__ */ t("div", { className: "mt-2 border-t border-outline-variant/30 pt-4 flex flex-col gap-4", children: V(a, T) }),
|
|
360
|
-
|
|
361
|
-
] }),
|
|
361
|
+
Y && /* @__PURE__ */ t("div", { className: "mt-2 border-t border-outline-variant/30 pt-4 flex flex-col gap-4", children: Y(a, T) })
|
|
362
|
+
] }), I = /* @__PURE__ */ t(Q, { children: ie && /* @__PURE__ */ r("div", { className: "fixed inset-0 z-[100] flex items-center justify-center px-4 pointer-events-auto", children: [
|
|
362
363
|
/* @__PURE__ */ t(
|
|
363
364
|
S.div,
|
|
364
365
|
{
|
|
@@ -367,7 +368,7 @@ const b = 380, Ce = (s, i) => {
|
|
|
367
368
|
exit: { opacity: 0 },
|
|
368
369
|
transition: { duration: 0.2 },
|
|
369
370
|
className: "absolute inset-0 bg-black/50",
|
|
370
|
-
onClick: () =>
|
|
371
|
+
onClick: () => O(!1)
|
|
371
372
|
}
|
|
372
373
|
),
|
|
373
374
|
/* @__PURE__ */ r(
|
|
@@ -379,10 +380,10 @@ const b = 380, Ce = (s, i) => {
|
|
|
379
380
|
transition: { duration: 0.2 },
|
|
380
381
|
className: "relative bg-surface-container-high rounded-3xl shadow-2xl p-6 w-full max-w-[420px] flex flex-col gap-6",
|
|
381
382
|
children: [
|
|
382
|
-
/* @__PURE__ */ t(
|
|
383
|
+
/* @__PURE__ */ t(b, { variant: "title-medium", className: "font-bold", children: "Custom recurrence" }),
|
|
383
384
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
384
385
|
/* @__PURE__ */ t(
|
|
385
|
-
|
|
386
|
+
b,
|
|
386
387
|
{
|
|
387
388
|
variant: "body-medium",
|
|
388
389
|
className: "shrink-0 w-24 font-medium",
|
|
@@ -395,7 +396,7 @@ const b = 380, Ce = (s, i) => {
|
|
|
395
396
|
size: "sm",
|
|
396
397
|
variant: "filled",
|
|
397
398
|
value: c.interval,
|
|
398
|
-
onValueChange: (e) =>
|
|
399
|
+
onValueChange: (e) => u((n) => ({ ...n, interval: Number(e) })),
|
|
399
400
|
min: 1,
|
|
400
401
|
classNames: {
|
|
401
402
|
inputWrapper: "h-10 min-h-[40px] px-2",
|
|
@@ -409,7 +410,7 @@ const b = 380, Ce = (s, i) => {
|
|
|
409
410
|
size: "sm",
|
|
410
411
|
variant: "filled",
|
|
411
412
|
value: c.frequency,
|
|
412
|
-
onValueChange: (e) =>
|
|
413
|
+
onValueChange: (e) => u((n) => ({ ...n, frequency: e })),
|
|
413
414
|
items: [
|
|
414
415
|
{
|
|
415
416
|
value: "daily",
|
|
@@ -433,39 +434,38 @@ const b = 380, Ce = (s, i) => {
|
|
|
433
434
|
) })
|
|
434
435
|
] }),
|
|
435
436
|
c.frequency === "weekly" && /* @__PURE__ */ r("div", { className: "flex flex-col gap-2 mt-2", children: [
|
|
436
|
-
/* @__PURE__ */ t(
|
|
437
|
-
/* @__PURE__ */ t("div", { className: "flex justify-between
|
|
437
|
+
/* @__PURE__ */ t(b, { variant: "body-medium", className: "font-medium", children: "Repeat on" }),
|
|
438
|
+
/* @__PURE__ */ t("div", { className: "flex justify-between mt-1 w-full", children: /* @__PURE__ */ t(ge, { shape: "full", gap: "xs", className: "w-full flex", children: ["S", "M", "T", "W", "T", "F", "S"].map((e, n) => {
|
|
438
439
|
const l = c.daysOfWeek?.includes(n);
|
|
439
440
|
return /* @__PURE__ */ t(
|
|
440
|
-
|
|
441
|
+
x,
|
|
441
442
|
{
|
|
443
|
+
variant: l ? "primary" : "secondary",
|
|
444
|
+
isActive: l,
|
|
442
445
|
onClick: () => {
|
|
443
|
-
|
|
444
|
-
const f = p.daysOfWeek || [], G = f.includes(n) ? f.filter((
|
|
446
|
+
u((p) => {
|
|
447
|
+
const f = p.daysOfWeek || [], G = f.includes(n) ? f.filter((me) => me !== n) : [...f, n];
|
|
445
448
|
return {
|
|
446
449
|
...p,
|
|
447
450
|
daysOfWeek: G.length ? G : [n]
|
|
448
451
|
};
|
|
449
452
|
});
|
|
450
453
|
},
|
|
451
|
-
className:
|
|
452
|
-
"w-9 h-9 rounded-full flex items-center justify-center text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",
|
|
453
|
-
l ? "bg-primary text-on-primary" : "bg-surface-container-highest text-on-surface hover:bg-surface-container-highest/80"
|
|
454
|
-
),
|
|
454
|
+
className: "flex-1 !px-0 min-w-0",
|
|
455
455
|
children: e
|
|
456
456
|
},
|
|
457
457
|
n
|
|
458
458
|
);
|
|
459
|
-
}) })
|
|
459
|
+
}) }) })
|
|
460
460
|
] }),
|
|
461
461
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-3 mt-2", children: [
|
|
462
|
-
/* @__PURE__ */ t(
|
|
462
|
+
/* @__PURE__ */ t(b, { variant: "body-medium", className: "font-medium mb-1", children: "Ends" }),
|
|
463
463
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-4", children: [
|
|
464
464
|
/* @__PURE__ */ t(
|
|
465
465
|
A,
|
|
466
466
|
{
|
|
467
467
|
checked: c.endType === "never",
|
|
468
|
-
onChange: () =>
|
|
468
|
+
onChange: () => u((e) => ({ ...e, endType: "never" })),
|
|
469
469
|
label: "Never"
|
|
470
470
|
}
|
|
471
471
|
),
|
|
@@ -473,7 +473,7 @@ const b = 380, Ce = (s, i) => {
|
|
|
473
473
|
A,
|
|
474
474
|
{
|
|
475
475
|
checked: c.endType === "on_date",
|
|
476
|
-
onChange: () =>
|
|
476
|
+
onChange: () => u((e) => ({ ...e, endType: "on_date" })),
|
|
477
477
|
label: "On",
|
|
478
478
|
children: /* @__PURE__ */ t("div", { className: "w-[180px]", children: /* @__PURE__ */ t(
|
|
479
479
|
z,
|
|
@@ -483,7 +483,7 @@ const b = 380, Ce = (s, i) => {
|
|
|
483
483
|
size: "sm",
|
|
484
484
|
disabled: c.endType !== "on_date",
|
|
485
485
|
value: c.until,
|
|
486
|
-
onChange: (e) => e &&
|
|
486
|
+
onChange: (e) => e && u((n) => ({ ...n, until: e })),
|
|
487
487
|
classNames: { inputWrapper: "h-10 min-h-[40px]" }
|
|
488
488
|
}
|
|
489
489
|
) })
|
|
@@ -493,7 +493,7 @@ const b = 380, Ce = (s, i) => {
|
|
|
493
493
|
A,
|
|
494
494
|
{
|
|
495
495
|
checked: c.endType === "after_occurrences",
|
|
496
|
-
onChange: () =>
|
|
496
|
+
onChange: () => u((e) => ({
|
|
497
497
|
...e,
|
|
498
498
|
endType: "after_occurrences"
|
|
499
499
|
})),
|
|
@@ -506,7 +506,7 @@ const b = 380, Ce = (s, i) => {
|
|
|
506
506
|
size: "sm",
|
|
507
507
|
disabled: c.endType !== "after_occurrences",
|
|
508
508
|
value: c.count,
|
|
509
|
-
onValueChange: (e) =>
|
|
509
|
+
onValueChange: (e) => u((n) => ({ ...n, count: Number(e) })),
|
|
510
510
|
min: 1,
|
|
511
511
|
classNames: {
|
|
512
512
|
inputWrapper: "h-10 min-h-[40px] px-2",
|
|
@@ -515,7 +515,7 @@ const b = 380, Ce = (s, i) => {
|
|
|
515
515
|
}
|
|
516
516
|
),
|
|
517
517
|
/* @__PURE__ */ t(
|
|
518
|
-
|
|
518
|
+
b,
|
|
519
519
|
{
|
|
520
520
|
variant: "body-medium",
|
|
521
521
|
className: "whitespace-nowrap opacity-80 font-normal",
|
|
@@ -529,19 +529,19 @@ const b = 380, Ce = (s, i) => {
|
|
|
529
529
|
] }),
|
|
530
530
|
/* @__PURE__ */ r("div", { className: "flex justify-end gap-2 pt-4", children: [
|
|
531
531
|
/* @__PURE__ */ t(
|
|
532
|
-
|
|
532
|
+
x,
|
|
533
533
|
{
|
|
534
534
|
variant: "ghost",
|
|
535
|
-
onClick: () =>
|
|
535
|
+
onClick: () => O(!1),
|
|
536
536
|
children: "Cancel"
|
|
537
537
|
}
|
|
538
538
|
),
|
|
539
539
|
/* @__PURE__ */ t(
|
|
540
|
-
|
|
540
|
+
x,
|
|
541
541
|
{
|
|
542
542
|
variant: "primary",
|
|
543
543
|
onClick: () => {
|
|
544
|
-
|
|
544
|
+
m({ recurrence: c }), O(!1);
|
|
545
545
|
},
|
|
546
546
|
children: "Done"
|
|
547
547
|
}
|
|
@@ -555,7 +555,7 @@ const b = 380, Ce = (s, i) => {
|
|
|
555
555
|
if (v)
|
|
556
556
|
return /* @__PURE__ */ r(R, { children: [
|
|
557
557
|
/* @__PURE__ */ t(
|
|
558
|
-
|
|
558
|
+
we,
|
|
559
559
|
{
|
|
560
560
|
open: i.isOpen,
|
|
561
561
|
onOpenChange: (e) => !e && o(),
|
|
@@ -563,18 +563,18 @@ const b = 380, Ce = (s, i) => {
|
|
|
563
563
|
snapPoints: [0.6, 1],
|
|
564
564
|
activeSnapPoint: se,
|
|
565
565
|
setActiveSnapPoint: oe,
|
|
566
|
-
children: /* @__PURE__ */ r(
|
|
567
|
-
/* @__PURE__ */ r(
|
|
566
|
+
children: /* @__PURE__ */ r(be, { className: "p-0 flex flex-col overflow-hidden h-full", children: [
|
|
567
|
+
/* @__PURE__ */ r(Ne, { className: "px-4 py-2 border-b border-outline-variant/20 shrink-0 flex-row justify-between items-center !space-y-0", children: [
|
|
568
568
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
569
|
-
/* @__PURE__ */ t(
|
|
570
|
-
/* @__PURE__ */ t(
|
|
569
|
+
/* @__PURE__ */ t(w, { variant: "ghost", onClick: o, children: /* @__PURE__ */ t(U, { className: "w-5 h-5" }) }),
|
|
570
|
+
/* @__PURE__ */ t(ke, { className: "text-base font-semibold m-0", children: i.mode === "create" ? "New Event" : "Edit Event" })
|
|
571
571
|
] }),
|
|
572
572
|
i.mode === "edit" && /* @__PURE__ */ t(
|
|
573
|
-
|
|
573
|
+
w,
|
|
574
574
|
{
|
|
575
575
|
variant: "ghost",
|
|
576
576
|
size: "sm",
|
|
577
|
-
onClick:
|
|
577
|
+
onClick: j,
|
|
578
578
|
className: "text-error hover:bg-error/10 hover:text-error",
|
|
579
579
|
children: /* @__PURE__ */ t(J, { className: "w-5 h-5" })
|
|
580
580
|
}
|
|
@@ -582,7 +582,7 @@ const b = 380, Ce = (s, i) => {
|
|
|
582
582
|
] }),
|
|
583
583
|
/* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto no-scrollbar", children: B }),
|
|
584
584
|
/* @__PURE__ */ t("div", { className: "p-3 border-t border-outline-variant/20 bg-surface-container shrink-0 flex justify-end items-center pb-safe", children: /* @__PURE__ */ t(
|
|
585
|
-
|
|
585
|
+
x,
|
|
586
586
|
{
|
|
587
587
|
variant: "primary",
|
|
588
588
|
onClick: $,
|
|
@@ -593,7 +593,7 @@ const b = 380, Ce = (s, i) => {
|
|
|
593
593
|
] })
|
|
594
594
|
}
|
|
595
595
|
),
|
|
596
|
-
typeof document < "u" && P(
|
|
596
|
+
typeof document < "u" && P(I, document.body)
|
|
597
597
|
] });
|
|
598
598
|
const de = /* @__PURE__ */ t("div", { className: "fixed inset-0 pointer-events-none z-[50]", children: /* @__PURE__ */ t(Q, { children: i.isOpen && /* @__PURE__ */ r(
|
|
599
599
|
S.div,
|
|
@@ -604,10 +604,10 @@ const b = 380, Ce = (s, i) => {
|
|
|
604
604
|
dragControls: _,
|
|
605
605
|
dragListener: !1,
|
|
606
606
|
style: {
|
|
607
|
-
x:
|
|
608
|
-
y:
|
|
607
|
+
x: D,
|
|
608
|
+
y: C,
|
|
609
609
|
width: "auto",
|
|
610
|
-
minWidth:
|
|
610
|
+
minWidth: N,
|
|
611
611
|
maxWidth: "calc(100vw - 32px)"
|
|
612
612
|
},
|
|
613
613
|
initial: { opacity: 0, scale: 0.95 },
|
|
@@ -625,7 +625,7 @@ const b = 380, Ce = (s, i) => {
|
|
|
625
625
|
className: "flex items-center justify-between px-2 py-1.5 bg-surface-container-high border-b border-outline-variant/20 drag-handle cursor-move rounded-t-2xl shrink-0",
|
|
626
626
|
children: [
|
|
627
627
|
/* @__PURE__ */ t(
|
|
628
|
-
|
|
628
|
+
w,
|
|
629
629
|
{
|
|
630
630
|
variant: "ghost",
|
|
631
631
|
size: "sm",
|
|
@@ -635,17 +635,17 @@ const b = 380, Ce = (s, i) => {
|
|
|
635
635
|
),
|
|
636
636
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-1", children: [
|
|
637
637
|
i.mode === "edit" && a && /* @__PURE__ */ t(
|
|
638
|
-
|
|
638
|
+
w,
|
|
639
639
|
{
|
|
640
640
|
variant: "ghost",
|
|
641
641
|
size: "sm",
|
|
642
|
-
onClick:
|
|
642
|
+
onClick: j,
|
|
643
643
|
className: "text-error hover:bg-error/10 hover:text-error cursor-pointer pointer-events-auto",
|
|
644
644
|
children: /* @__PURE__ */ t(J, { className: "w-4 h-4" })
|
|
645
645
|
}
|
|
646
646
|
),
|
|
647
647
|
/* @__PURE__ */ t(
|
|
648
|
-
|
|
648
|
+
w,
|
|
649
649
|
{
|
|
650
650
|
variant: "ghost",
|
|
651
651
|
size: "sm",
|
|
@@ -660,7 +660,7 @@ const b = 380, Ce = (s, i) => {
|
|
|
660
660
|
),
|
|
661
661
|
/* @__PURE__ */ t("div", { className: "flex-1 max-h-[80vh] overflow-y-auto scrollbar-thin overflow-x-hidden min-h-0", children: B }),
|
|
662
662
|
/* @__PURE__ */ t("div", { className: "flex items-center justify-end gap-2 p-4 border-t border-outline-variant/20 bg-surface-container-high shrink-0 rounded-b-2xl", children: /* @__PURE__ */ t(
|
|
663
|
-
|
|
663
|
+
x,
|
|
664
664
|
{
|
|
665
665
|
variant: "primary",
|
|
666
666
|
onClick: $,
|
|
@@ -673,9 +673,9 @@ const b = 380, Ce = (s, i) => {
|
|
|
673
673
|
) }) });
|
|
674
674
|
return /* @__PURE__ */ r(R, { children: [
|
|
675
675
|
typeof document < "u" && P(de, document.body),
|
|
676
|
-
typeof document < "u" && P(
|
|
676
|
+
typeof document < "u" && P(I, document.body)
|
|
677
677
|
] });
|
|
678
678
|
};
|
|
679
679
|
export {
|
|
680
|
-
|
|
680
|
+
Xe as EventPopover
|
|
681
681
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { startOfWeek as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { startOfWeek as O, startOfMonth as T, endOfWeek as b, endOfMonth as H, addDays as w, startOfDay as f, isBefore as I, isAfter as x, differenceInDays as k, isSameDay as E, startOfYear as W, setMonth as R, format as Y } from "date-fns";
|
|
2
|
+
import { RRule as y } from "rrule";
|
|
3
|
+
const L = (t) => {
|
|
4
|
+
switch (t) {
|
|
4
5
|
case "primary":
|
|
5
6
|
return "bg-surface-container-low";
|
|
6
7
|
case "secondary":
|
|
@@ -10,8 +11,8 @@ const Y = (s) => {
|
|
|
10
11
|
default:
|
|
11
12
|
return "bg-surface";
|
|
12
13
|
}
|
|
13
|
-
},
|
|
14
|
-
switch (
|
|
14
|
+
}, U = (t) => {
|
|
15
|
+
switch (t) {
|
|
15
16
|
case "primary":
|
|
16
17
|
return "bg-surface-container-low";
|
|
17
18
|
case "secondary":
|
|
@@ -21,171 +22,170 @@ const Y = (s) => {
|
|
|
21
22
|
default:
|
|
22
23
|
return "bg-surface";
|
|
23
24
|
}
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
}, F = {
|
|
26
|
+
daily: y.DAILY,
|
|
27
|
+
weekly: y.WEEKLY,
|
|
28
|
+
monthly: y.MONTHLY,
|
|
29
|
+
yearly: y.YEARLY
|
|
30
|
+
}, C = [
|
|
31
|
+
y.SU,
|
|
32
|
+
// 0
|
|
33
|
+
y.MO,
|
|
34
|
+
// 1
|
|
35
|
+
y.TU,
|
|
36
|
+
// 2
|
|
37
|
+
y.WE,
|
|
38
|
+
// 3
|
|
39
|
+
y.TH,
|
|
40
|
+
// 4
|
|
41
|
+
y.FR,
|
|
42
|
+
// 5
|
|
43
|
+
y.SA
|
|
44
|
+
// 6
|
|
45
|
+
], _ = (t, d, c) => {
|
|
46
|
+
const e = [];
|
|
47
|
+
return t.forEach((n) => {
|
|
48
|
+
if (!n.recurrence) {
|
|
49
|
+
n.start <= c && n.end >= d && e.push(n);
|
|
29
50
|
return;
|
|
30
51
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
for (let e = 0; e < 7; e++)
|
|
85
|
-
i.push(r), r = m(r, 1);
|
|
86
|
-
return i;
|
|
87
|
-
}, P = (s) => {
|
|
88
|
-
const f = q(s), i = [];
|
|
89
|
-
for (let r = 0; r < 12; r++)
|
|
90
|
-
i.push(B(f, r));
|
|
91
|
-
return i;
|
|
92
|
-
}, j = (s) => {
|
|
93
|
-
const f = /* @__PURE__ */ new Set();
|
|
94
|
-
return s.forEach((i) => {
|
|
95
|
-
let r = y(i.start);
|
|
96
|
-
const e = y(i.end);
|
|
97
|
-
for (; r <= e; )
|
|
98
|
-
f.add(F(r, "yyyy-MM-dd")), r = m(r, 1);
|
|
99
|
-
}), f;
|
|
100
|
-
}, z = (s, f) => {
|
|
101
|
-
if (s.length === 0) return [];
|
|
102
|
-
const i = y(s[0]), r = y(s[s.length - 1]), e = f.filter((c) => {
|
|
103
|
-
const t = y(c.start), a = y(c.end);
|
|
104
|
-
return C(t, m(r, 1)) && I(m(a, 1), i);
|
|
52
|
+
try {
|
|
53
|
+
const i = n.recurrence, r = {
|
|
54
|
+
freq: F[i.frequency],
|
|
55
|
+
dtstart: n.start,
|
|
56
|
+
interval: i.interval || 1
|
|
57
|
+
};
|
|
58
|
+
i.endType === "on_date" && i.until ? r.until = i.until : i.endType === "after_occurrences" && i.count && (r.count = i.count), i.frequency === "weekly" && i.daysOfWeek && i.daysOfWeek.length > 0 && (r.byweekday = i.daysOfWeek.map((a) => C[a]));
|
|
59
|
+
const o = new y(r).between(d, c, !0), u = n.end.getTime() - n.start.getTime();
|
|
60
|
+
o.forEach((a, p) => {
|
|
61
|
+
e.push({
|
|
62
|
+
...n,
|
|
63
|
+
id: `${n.id}-occ-${p}`,
|
|
64
|
+
// Keep -occ- pattern intact to support standard edits
|
|
65
|
+
start: a,
|
|
66
|
+
end: new Date(a.getTime() + u)
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
} catch (i) {
|
|
70
|
+
console.error("Failed to parse recurrence rule with rrule.js:", i), n.start <= c && n.end >= d && e.push(n);
|
|
71
|
+
}
|
|
72
|
+
}), e;
|
|
73
|
+
}, K = (t) => {
|
|
74
|
+
const d = O(T(t));
|
|
75
|
+
b(H(t));
|
|
76
|
+
const c = [];
|
|
77
|
+
let e = d;
|
|
78
|
+
for (; c.length < 42; )
|
|
79
|
+
c.push(e), e = w(e, 1);
|
|
80
|
+
return c;
|
|
81
|
+
}, V = (t) => {
|
|
82
|
+
const d = O(t), c = [];
|
|
83
|
+
let e = d;
|
|
84
|
+
for (let n = 0; n < 7; n++)
|
|
85
|
+
c.push(e), e = w(e, 1);
|
|
86
|
+
return c;
|
|
87
|
+
}, $ = (t) => {
|
|
88
|
+
const d = W(t), c = [];
|
|
89
|
+
for (let e = 0; e < 12; e++)
|
|
90
|
+
c.push(R(d, e));
|
|
91
|
+
return c;
|
|
92
|
+
}, j = (t) => {
|
|
93
|
+
const d = /* @__PURE__ */ new Set();
|
|
94
|
+
return t.forEach((c) => {
|
|
95
|
+
let e = f(c.start);
|
|
96
|
+
const n = f(c.end);
|
|
97
|
+
for (; e <= n; )
|
|
98
|
+
d.add(Y(e, "yyyy-MM-dd")), e = w(e, 1);
|
|
99
|
+
}), d;
|
|
100
|
+
}, A = (t, d) => {
|
|
101
|
+
if (t.length === 0) return [];
|
|
102
|
+
const c = f(t[0]), e = f(t[t.length - 1]), n = d.filter((r) => {
|
|
103
|
+
const s = f(r.start), o = f(r.end);
|
|
104
|
+
return I(s, w(e, 1)) && x(w(o, 1), c);
|
|
105
105
|
});
|
|
106
|
-
|
|
107
|
-
const
|
|
108
|
-
return
|
|
106
|
+
n.sort((r, s) => {
|
|
107
|
+
const o = k(f(r.end), f(r.start)), u = k(f(s.end), f(s.start));
|
|
108
|
+
return o !== u ? u - o : r.start.getTime() - s.start.getTime();
|
|
109
109
|
});
|
|
110
|
-
const
|
|
111
|
-
for (let
|
|
112
|
-
return
|
|
113
|
-
const
|
|
114
|
-
let u =
|
|
110
|
+
const i = [], g = {};
|
|
111
|
+
for (let r = 0; r < t.length; r++) g[r] = /* @__PURE__ */ new Set();
|
|
112
|
+
return n.forEach((r) => {
|
|
113
|
+
const s = f(r.start), o = f(r.end);
|
|
114
|
+
let u = t.findIndex((l) => E(l, s));
|
|
115
115
|
u === -1 && (u = 0);
|
|
116
|
-
let
|
|
117
|
-
|
|
118
|
-
const p =
|
|
119
|
-
let h = 1,
|
|
120
|
-
for (; !
|
|
121
|
-
|
|
122
|
-
for (let
|
|
123
|
-
if (
|
|
124
|
-
|
|
116
|
+
let a = t.findIndex((l) => E(l, o));
|
|
117
|
+
a === -1 && (a = t.length - 1);
|
|
118
|
+
const p = a - u + 1;
|
|
119
|
+
let h = 1, M = !1;
|
|
120
|
+
for (; !M; ) {
|
|
121
|
+
M = !0;
|
|
122
|
+
for (let l = u; l <= a; l++)
|
|
123
|
+
if (g[l].has(h)) {
|
|
124
|
+
M = !1, h++;
|
|
125
125
|
break;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
for (let
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
event:
|
|
128
|
+
for (let l = u; l <= a; l++)
|
|
129
|
+
g[l].add(h);
|
|
130
|
+
i.push({
|
|
131
|
+
event: r,
|
|
132
132
|
colStart: u + 1,
|
|
133
133
|
colSpan: p,
|
|
134
134
|
row: h
|
|
135
135
|
});
|
|
136
|
-
}),
|
|
137
|
-
},
|
|
138
|
-
const
|
|
139
|
-
if (
|
|
140
|
-
const
|
|
141
|
-
return
|
|
136
|
+
}), i;
|
|
137
|
+
}, N = (t, d) => {
|
|
138
|
+
const c = f(t), e = d.filter((s) => {
|
|
139
|
+
if (s.isAllDay) return !1;
|
|
140
|
+
const o = f(s.start), u = f(s.end);
|
|
141
|
+
return c >= o && c <= u;
|
|
142
142
|
});
|
|
143
|
-
|
|
144
|
-
const u =
|
|
145
|
-
return u -
|
|
143
|
+
e.sort((s, o) => {
|
|
144
|
+
const u = E(s.start, t) ? s.start.getHours() * 60 + s.start.getMinutes() : 0, a = E(o.start, t) ? o.start.getHours() * 60 + o.start.getMinutes() : 0;
|
|
145
|
+
return u - a;
|
|
146
146
|
});
|
|
147
|
-
const
|
|
148
|
-
let
|
|
149
|
-
return
|
|
150
|
-
const
|
|
151
|
-
|
|
152
|
-
}),
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
const h =
|
|
156
|
-
let
|
|
157
|
-
for (let
|
|
158
|
-
const
|
|
159
|
-
if (h >=
|
|
160
|
-
|
|
147
|
+
const n = [], i = [];
|
|
148
|
+
let g = [], r = 0;
|
|
149
|
+
return e.forEach((s) => {
|
|
150
|
+
const o = E(s.start, t), u = E(s.end, t), a = o ? s.start.getHours() * 60 + s.start.getMinutes() : 0, p = u ? s.end.getHours() * 60 + s.end.getMinutes() : 1440;
|
|
151
|
+
g.length === 0 ? (g.push(s), r = p) : a < r ? (g.push(s), r = Math.max(r, p)) : (i.push([...g]), g = [s], r = p);
|
|
152
|
+
}), g.length > 0 && i.push(g), i.forEach((s) => {
|
|
153
|
+
const o = [];
|
|
154
|
+
s.forEach((a) => {
|
|
155
|
+
const h = E(a.start, t) ? a.start.getHours() * 60 + a.start.getMinutes() : 0;
|
|
156
|
+
let M = !1;
|
|
157
|
+
for (let l = 0; l < o.length; l++) {
|
|
158
|
+
const m = o[l][o[l].length - 1], S = E(m.end, t) ? m.end.getHours() * 60 + m.end.getMinutes() : 1440;
|
|
159
|
+
if (h >= S) {
|
|
160
|
+
o[l].push(a), M = !0;
|
|
161
161
|
break;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
|
|
164
|
+
M || o.push([a]);
|
|
165
165
|
});
|
|
166
|
-
const u =
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
const
|
|
170
|
-
|
|
166
|
+
const u = o.length;
|
|
167
|
+
o.forEach((a, p) => {
|
|
168
|
+
a.forEach((h) => {
|
|
169
|
+
const M = E(h.start, t), l = E(h.end, t), m = M ? h.start.getHours() * 60 + h.start.getMinutes() : 0, D = l ? h.end.getHours() * 60 + h.end.getMinutes() : 1440, S = Math.max(D - m, 15);
|
|
170
|
+
n.push({
|
|
171
171
|
event: h,
|
|
172
|
-
top:
|
|
173
|
-
height:
|
|
172
|
+
top: m / 1440 * 100,
|
|
173
|
+
height: S / 1440 * 100,
|
|
174
174
|
left: p / u * 100,
|
|
175
175
|
width: 100 / u
|
|
176
176
|
});
|
|
177
177
|
});
|
|
178
178
|
});
|
|
179
|
-
}),
|
|
179
|
+
}), n;
|
|
180
180
|
};
|
|
181
181
|
export {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
182
|
+
_ as expandEvents,
|
|
183
|
+
L as getCalendarBgClasses,
|
|
184
|
+
U as getCalendarStickyBgClasses,
|
|
185
|
+
K as getDaysForMonthView,
|
|
186
|
+
V as getDaysForWeekView,
|
|
187
187
|
j as getEventDaysMap,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
188
|
+
A as getEventSegments,
|
|
189
|
+
$ as getMonthsForYear,
|
|
190
|
+
N as getTimelinePositionsForDay
|
|
191
191
|
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chesai-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.16.
|
|
5
|
-
"packageManager": "pnpm@10.12.1",
|
|
4
|
+
"version": "0.16.10",
|
|
6
5
|
"repository": {
|
|
7
6
|
"type": "git",
|
|
8
7
|
"url": "https://github.com/ayhamdev/chesai-ui"
|
|
@@ -25,19 +24,6 @@
|
|
|
25
24
|
"engines": {
|
|
26
25
|
"node": ">=22"
|
|
27
26
|
},
|
|
28
|
-
"scripts": {
|
|
29
|
-
"dev": "bunx storybook dev -p 8000",
|
|
30
|
-
"build": "storybook build",
|
|
31
|
-
"build:lib": "tsc && vite build",
|
|
32
|
-
"build:docs": "npx ts-node ./scripts/generate-llm.ts",
|
|
33
|
-
"lint": "npx @biomejs/biome lint --write ./src",
|
|
34
|
-
"format": "npx @biomejs/biome check --write --organize-imports-enabled=true ./src",
|
|
35
|
-
"test": "vitest",
|
|
36
|
-
"test:cov": "vitest run --coverage",
|
|
37
|
-
"gen:context": "bun run ./scripts/context.ts",
|
|
38
|
-
"git:diff-merge": "git diff --unified=2000 $(git merge-base main HEAD)...HEAD",
|
|
39
|
-
"git:diff": "git diff --unified=2000 > git-changes.txt"
|
|
40
|
-
},
|
|
41
27
|
"dependencies": {
|
|
42
28
|
"@capacitor/app": "^8.0.0",
|
|
43
29
|
"@capacitor/core": "^8.0.1",
|
|
@@ -111,6 +97,7 @@
|
|
|
111
97
|
"react-rnd": "^10.5.2",
|
|
112
98
|
"react-router-dom": "^7.15.1",
|
|
113
99
|
"recharts": "^3.7.0",
|
|
100
|
+
"rrule": "^2.8.1",
|
|
114
101
|
"sonner": "^2.0.7",
|
|
115
102
|
"tailwind-merge": "^3.4.0",
|
|
116
103
|
"use-ripple-hook": "^1.0.24",
|
|
@@ -168,5 +155,18 @@
|
|
|
168
155
|
"biome lint --write --no-errors-on-unmatched --files-ignore-unknown=true",
|
|
169
156
|
"biome format --write --no-errors-on-unmatched"
|
|
170
157
|
]
|
|
158
|
+
},
|
|
159
|
+
"scripts": {
|
|
160
|
+
"dev": "bunx storybook dev -p 8000",
|
|
161
|
+
"build": "storybook build",
|
|
162
|
+
"build:lib": "tsc && vite build",
|
|
163
|
+
"build:docs": "npx ts-node ./scripts/generate-llm.ts",
|
|
164
|
+
"lint": "npx @biomejs/biome lint --write ./src",
|
|
165
|
+
"format": "npx @biomejs/biome check --write --organize-imports-enabled=true ./src",
|
|
166
|
+
"test": "vitest",
|
|
167
|
+
"test:cov": "vitest run --coverage",
|
|
168
|
+
"gen:context": "bun run ./scripts/context.ts",
|
|
169
|
+
"git:diff-merge": "git diff --unified=2000 $(git merge-base main HEAD)...HEAD",
|
|
170
|
+
"git:diff": "git diff --unified=2000 > git-changes.txt"
|
|
171
171
|
}
|
|
172
|
-
}
|
|
172
|
+
}
|