@devalok/shilp-sutra-karm 0.16.0 → 0.17.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/_chunks/chat-panel.js +292 -230
- package/dist/_chunks/kanban-board.js +1113 -1078
- package/dist/_chunks/project-card.js +51 -51
- package/dist/_chunks/render-adjustment-type.js +2044 -2037
- package/dist/_chunks/sidebar-scratchpad.js +508 -0
- package/dist/_chunks/task-detail-panel.js +774 -752
- package/dist/_chunks/vendor.js +10425 -5216
- package/dist/admin/adjustments/approved-adjustments.d.ts +2 -1
- package/dist/admin/adjustments/approved-adjustments.d.ts.map +1 -1
- package/dist/admin/adjustments/index.d.ts +1 -0
- package/dist/admin/break/break-admin-skeleton.d.ts +2 -1
- package/dist/admin/break/break-admin-skeleton.d.ts.map +1 -1
- package/dist/admin/break/break-admin.d.ts +2 -1
- package/dist/admin/break/break-admin.d.ts.map +1 -1
- package/dist/admin/break/break-balance.d.ts +2 -1
- package/dist/admin/break/break-balance.d.ts.map +1 -1
- package/dist/admin/break/breaks.d.ts +2 -1
- package/dist/admin/break/breaks.d.ts.map +1 -1
- package/dist/admin/break/delete-break.d.ts +2 -1
- package/dist/admin/break/delete-break.d.ts.map +1 -1
- package/dist/admin/break/edit-break-balance.d.ts +2 -1
- package/dist/admin/break/edit-break-balance.d.ts.map +1 -1
- package/dist/admin/break/edit-break.d.ts +2 -1
- package/dist/admin/break/edit-break.d.ts.map +1 -1
- package/dist/admin/break/header.d.ts +2 -1
- package/dist/admin/break/header.d.ts.map +1 -1
- package/dist/admin/break/index.d.ts +1 -0
- package/dist/admin/break/leave-request.d.ts +2 -1
- package/dist/admin/break/leave-request.d.ts.map +1 -1
- package/dist/admin/break/use-break-date-picker.d.ts +1 -0
- package/dist/admin/dashboard/admin-dashboard.d.ts +7 -6
- package/dist/admin/dashboard/admin-dashboard.d.ts.map +1 -1
- package/dist/admin/dashboard/associate-detail.d.ts +2 -1
- package/dist/admin/dashboard/associate-detail.d.ts.map +1 -1
- package/dist/admin/dashboard/attendance-overview.d.ts +2 -1
- package/dist/admin/dashboard/attendance-overview.d.ts.map +1 -1
- package/dist/admin/dashboard/break-request.d.ts +2 -1
- package/dist/admin/dashboard/break-request.d.ts.map +1 -1
- package/dist/admin/dashboard/calendar.d.ts +2 -1
- package/dist/admin/dashboard/calendar.d.ts.map +1 -1
- package/dist/admin/dashboard/correction-list.d.ts +2 -1
- package/dist/admin/dashboard/correction-list.d.ts.map +1 -1
- package/dist/admin/dashboard/dashboard-header.d.ts +2 -1
- package/dist/admin/dashboard/dashboard-header.d.ts.map +1 -1
- package/dist/admin/dashboard/dashboard-skeleton.d.ts +2 -1
- package/dist/admin/dashboard/dashboard-skeleton.d.ts.map +1 -1
- package/dist/admin/dashboard/index.d.ts +1 -0
- package/dist/admin/dashboard/leave-requests.d.ts +2 -1
- package/dist/admin/dashboard/leave-requests.d.ts.map +1 -1
- package/dist/admin/dashboard/render-date.d.ts +2 -1
- package/dist/admin/dashboard/render-date.d.ts.map +1 -1
- package/dist/admin/dashboard/use-calendar-navigation.d.ts +1 -0
- package/dist/admin/dashboard/use-calendar-navigation.d.ts.map +1 -1
- package/dist/admin/dashboard/use-leave-request-interaction.d.ts +1 -0
- package/dist/admin/icons.d.ts +1 -0
- package/dist/admin/index.d.ts +1 -0
- package/dist/admin/types.d.ts +1 -0
- package/dist/admin/utils/date-range-utils.d.ts +1 -0
- package/dist/admin/utils/date-utils.d.ts +1 -0
- package/dist/admin/utils/emoji-utils.d.ts +1 -0
- package/dist/admin/utils/render-adjustment-type.d.ts +1 -0
- package/dist/admin/utils/render-status.d.ts +1 -0
- package/dist/board/board-column.d.ts +2 -1
- package/dist/board/board-column.d.ts.map +1 -1
- package/dist/board/board-constants.d.ts +6 -5
- package/dist/board/board-constants.d.ts.map +1 -1
- package/dist/board/board-context.d.ts +2 -1
- package/dist/board/board-context.d.ts.map +1 -1
- package/dist/board/board-toolbar.d.ts +4 -3
- package/dist/board/board-toolbar.d.ts.map +1 -1
- package/dist/board/board-types.d.ts +1 -0
- package/dist/board/board-utils.d.ts +1 -0
- package/dist/board/bulk-action-bar.d.ts +4 -3
- package/dist/board/bulk-action-bar.d.ts.map +1 -1
- package/dist/board/column-empty.d.ts +4 -6
- package/dist/board/column-empty.d.ts.map +1 -1
- package/dist/board/column-header.d.ts +4 -5
- package/dist/board/column-header.d.ts.map +1 -1
- package/dist/board/index.d.ts +1 -0
- package/dist/board/kanban-board.d.ts +1 -0
- package/dist/board/kanban-board.d.ts.map +1 -1
- package/dist/board/task-card.d.ts +5 -4
- package/dist/board/task-card.d.ts.map +1 -1
- package/dist/board/task-context-menu.d.ts +3 -4
- package/dist/board/task-context-menu.d.ts.map +1 -1
- package/dist/board/use-board-filters.d.ts +1 -0
- package/dist/board/use-board-keyboard.d.ts +1 -0
- package/dist/chat/chat-input.d.ts +2 -1
- package/dist/chat/chat-input.d.ts.map +1 -1
- package/dist/chat/chat-panel.d.ts +2 -1
- package/dist/chat/chat-panel.d.ts.map +1 -1
- package/dist/chat/conversation-list.d.ts +2 -1
- package/dist/chat/conversation-list.d.ts.map +1 -1
- package/dist/chat/index.d.ts +1 -0
- package/dist/chat/markdown-components.d.ts +1 -0
- package/dist/chat/message-list.d.ts +2 -1
- package/dist/chat/message-list.d.ts.map +1 -1
- package/dist/chat/streaming-text.d.ts +4 -1
- package/dist/chat/streaming-text.d.ts.map +1 -1
- package/dist/client/accent-provider.d.ts +1 -0
- package/dist/client/client-portal-header.d.ts +1 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/project-card.d.ts +1 -0
- package/dist/dashboard/attendance-cta.d.ts +2 -1
- package/dist/dashboard/attendance-cta.d.ts.map +1 -1
- package/dist/dashboard/daily-brief.d.ts +2 -2
- package/dist/dashboard/daily-brief.d.ts.map +1 -1
- package/dist/dashboard/index.d.ts +1 -0
- package/dist/dashboard/index.js +5 -267
- package/dist/dashboard/scratchpad-widget.d.ts +2 -2
- package/dist/dashboard/scratchpad-widget.d.ts.map +1 -1
- package/dist/dashboard/sidebar-scratchpad.d.ts +2 -2
- package/dist/dashboard/sidebar-scratchpad.d.ts.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +211 -103
- package/dist/page-skeletons.d.ts +3 -2
- package/dist/page-skeletons.d.ts.map +1 -1
- package/dist/shell/karm-command-registry.d.ts +4 -0
- package/dist/shell/karm-command-registry.d.ts.map +1 -0
- package/dist/tasks/activity-tab.d.ts +2 -2
- package/dist/tasks/activity-tab.d.ts.map +1 -1
- package/dist/tasks/conversation-tab.d.ts +2 -2
- package/dist/tasks/conversation-tab.d.ts.map +1 -1
- package/dist/tasks/files-tab.d.ts +2 -2
- package/dist/tasks/files-tab.d.ts.map +1 -1
- package/dist/tasks/index.d.ts +1 -0
- package/dist/tasks/review-tab.d.ts +2 -2
- package/dist/tasks/review-tab.d.ts.map +1 -1
- package/dist/tasks/subtasks-tab.d.ts +2 -2
- package/dist/tasks/subtasks-tab.d.ts.map +1 -1
- package/dist/tasks/task-constants.d.ts +1 -0
- package/dist/tasks/task-detail-panel.d.ts +2 -1
- package/dist/tasks/task-detail-panel.d.ts.map +1 -1
- package/dist/tasks/task-properties.d.ts +2 -2
- package/dist/tasks/task-properties.d.ts.map +1 -1
- package/dist/tasks/task-utils.d.ts +9 -0
- package/dist/tasks/task-utils.d.ts.map +1 -0
- package/dist/utils/use-composed-ref.d.ts +1 -0
- package/llms.txt +3 -1
- package/package.json +80 -78
- package/dist/_chunks/daily-brief.js +0 -226
|
@@ -0,0 +1,508 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
3
|
+
import * as A from "react";
|
|
4
|
+
import { useState as C, useRef as W, useEffect as P } from "react";
|
|
5
|
+
import { cn as d } from "@devalok/shilp-sutra/ui/lib/utils";
|
|
6
|
+
import { IconCheck as L, IconCoffee as Z, IconClock as z, IconArrowRight as F, IconSparkles as R, IconChevronDown as M, IconRefresh as U, IconX as H } from "@tabler/icons-react";
|
|
7
|
+
import { springs as E } from "@devalok/shilp-sutra/ui/lib/motion";
|
|
8
|
+
import { formatRelativeTime as X } from "@devalok/shilp-sutra/ui/lib/date-utils";
|
|
9
|
+
import { A as B, m as S, M as q } from "./vendor.js";
|
|
10
|
+
import { Checkbox as G } from "@devalok/shilp-sutra/ui/checkbox";
|
|
11
|
+
import { Input as J } from "@devalok/shilp-sutra/ui/input";
|
|
12
|
+
import { Button as Q } from "@devalok/shilp-sutra/ui/button";
|
|
13
|
+
function V() {
|
|
14
|
+
const f = (/* @__PURE__ */ new Date()).getHours();
|
|
15
|
+
return f < 12 ? "Good morning" : f < 17 ? "Good afternoon" : "Good evening";
|
|
16
|
+
}
|
|
17
|
+
function Y() {
|
|
18
|
+
return (/* @__PURE__ */ new Date()).toLocaleDateString("en-IN", {
|
|
19
|
+
weekday: "long",
|
|
20
|
+
day: "numeric",
|
|
21
|
+
month: "long",
|
|
22
|
+
year: "numeric",
|
|
23
|
+
timeZone: "Asia/Kolkata"
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function ee(f) {
|
|
27
|
+
return new Date(f).toLocaleTimeString("en-IN", {
|
|
28
|
+
hour: "2-digit",
|
|
29
|
+
minute: "2-digit",
|
|
30
|
+
hour12: !0,
|
|
31
|
+
timeZone: "Asia/Kolkata"
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
const se = A.forwardRef(
|
|
35
|
+
function({
|
|
36
|
+
userName: a,
|
|
37
|
+
attendance: r,
|
|
38
|
+
canMarkAttendance: p,
|
|
39
|
+
onMarkAttendance: m,
|
|
40
|
+
isSubmitting: u = !1,
|
|
41
|
+
formatTime: v = ee,
|
|
42
|
+
className: h,
|
|
43
|
+
...n
|
|
44
|
+
}, l) {
|
|
45
|
+
var w, k;
|
|
46
|
+
const c = ((w = r == null ? void 0 : r.attendance) == null ? void 0 : w.status) ?? "Not_Marked", g = c === "PRESENT" || u, y = c === "BREAK", N = (k = r == null ? void 0 : r.attendance) == null ? void 0 : k.timeIn, i = V(), o = (a == null ? void 0 : a.split(" ")[0]) || "there", x = Y();
|
|
47
|
+
return g && !y ? /* @__PURE__ */ e("div", { ref: l, className: d("relative overflow-hidden rounded-ds-2xl border border-surface-border-strong bg-surface-1 shadow-01", h), ...n, children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between px-ds-06 py-ds-05b sm:px-ds-07", children: [
|
|
48
|
+
/* @__PURE__ */ s("div", { className: "flex flex-col gap-ds-02", children: [
|
|
49
|
+
/* @__PURE__ */ s("h2", { className: "text-ds-2xl text-surface-fg", children: [
|
|
50
|
+
i,
|
|
51
|
+
",",
|
|
52
|
+
" ",
|
|
53
|
+
/* @__PURE__ */ e("span", { className: "font-semibold italic text-accent-11", children: o })
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ e("p", { className: "text-ds-md text-surface-fg-subtle", children: x })
|
|
56
|
+
] }),
|
|
57
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03 rounded-ds-xl bg-success-3 px-ds-05 py-ds-03", children: [
|
|
58
|
+
/* @__PURE__ */ e("div", { className: "flex h-ico-md w-ico-md items-center justify-center rounded-ds-full bg-success-9", children: /* @__PURE__ */ e(L, { className: "h-ico-sm w-ico-sm text-accent-fg" }) }),
|
|
59
|
+
/* @__PURE__ */ s("span", { className: "text-ds-md font-semibold text-success-11", children: [
|
|
60
|
+
"Marked at",
|
|
61
|
+
" ",
|
|
62
|
+
N ? v(N) : "--:--"
|
|
63
|
+
] })
|
|
64
|
+
] })
|
|
65
|
+
] }) }) : y ? /* @__PURE__ */ e("div", { ref: l, className: d("relative overflow-hidden rounded-ds-2xl border border-surface-border-strong bg-surface-1 shadow-01", h), ...n, children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between px-ds-06 py-ds-05b sm:px-ds-07", children: [
|
|
66
|
+
/* @__PURE__ */ s("div", { className: "flex flex-col gap-ds-02", children: [
|
|
67
|
+
/* @__PURE__ */ s("h2", { className: "text-ds-2xl text-surface-fg", children: [
|
|
68
|
+
i,
|
|
69
|
+
",",
|
|
70
|
+
" ",
|
|
71
|
+
/* @__PURE__ */ e("span", { className: "font-semibold italic text-accent-11", children: o })
|
|
72
|
+
] }),
|
|
73
|
+
/* @__PURE__ */ e("p", { className: "text-ds-md text-surface-fg-subtle", children: x })
|
|
74
|
+
] }),
|
|
75
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03 rounded-ds-xl bg-warning-3 px-ds-05 py-ds-03", children: [
|
|
76
|
+
/* @__PURE__ */ e(Z, { className: "h-ico-sm w-ico-sm text-warning-11" }),
|
|
77
|
+
/* @__PURE__ */ s("span", { className: "text-ds-md font-semibold text-warning-11", children: [
|
|
78
|
+
"On break",
|
|
79
|
+
r != null && r.breakReason ? ` — ${r.breakReason}` : ""
|
|
80
|
+
] })
|
|
81
|
+
] })
|
|
82
|
+
] }) }) : p ? /* @__PURE__ */ e("div", { ref: l, className: d("relative overflow-hidden rounded-ds-2xl border border-surface-border-strong bg-gradient-to-br from-accent-2 via-surface-1 to-success-3", h), ...n, children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between px-ds-06 py-ds-07 sm:px-ds-07 sm:py-ds-08", children: [
|
|
83
|
+
/* @__PURE__ */ s("div", { className: "flex flex-col gap-ds-02b", children: [
|
|
84
|
+
/* @__PURE__ */ s("h2", { className: "text-ds-3xl text-surface-fg", children: [
|
|
85
|
+
i,
|
|
86
|
+
",",
|
|
87
|
+
" ",
|
|
88
|
+
/* @__PURE__ */ e("span", { className: "font-semibold italic text-accent-11", children: o })
|
|
89
|
+
] }),
|
|
90
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-ds-03", children: /* @__PURE__ */ e("p", { className: "text-ds-base text-surface-fg-subtle", children: x }) })
|
|
91
|
+
] }),
|
|
92
|
+
/* @__PURE__ */ s(
|
|
93
|
+
"button",
|
|
94
|
+
{
|
|
95
|
+
type: "button",
|
|
96
|
+
onClick: m,
|
|
97
|
+
disabled: u,
|
|
98
|
+
className: "flex items-center gap-ds-03 rounded-ds-xl bg-accent-9 px-ds-06 py-ds-04 font-semibold text-accent-fg shadow-02 transition-all duration-150 ease-out hover:-translate-y-0.5 hover:shadow-03 active:translate-y-0 active:scale-[0.98] disabled:opacity-action-disabled",
|
|
99
|
+
children: [
|
|
100
|
+
u ? "Marking..." : "Mark Attendance",
|
|
101
|
+
!u && /* @__PURE__ */ e(F, { className: "h-ico-sm w-ico-sm" })
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
] }) }) : /* @__PURE__ */ e("div", { ref: l, className: d("relative overflow-hidden rounded-ds-2xl border border-surface-border-strong bg-surface-1 shadow-01", h), ...n, children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between px-ds-06 py-ds-06 sm:px-ds-07 sm:py-ds-07", children: [
|
|
106
|
+
/* @__PURE__ */ s("div", { className: "flex flex-col gap-ds-02b", children: [
|
|
107
|
+
/* @__PURE__ */ s("h2", { className: "text-ds-3xl text-surface-fg", children: [
|
|
108
|
+
i,
|
|
109
|
+
",",
|
|
110
|
+
" ",
|
|
111
|
+
/* @__PURE__ */ e("span", { className: "font-semibold italic text-accent-11", children: o })
|
|
112
|
+
] }),
|
|
113
|
+
/* @__PURE__ */ e("p", { className: "text-ds-base text-surface-fg-subtle", children: x })
|
|
114
|
+
] }),
|
|
115
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03 rounded-ds-xl bg-surface-2 px-ds-05 py-ds-03", children: [
|
|
116
|
+
/* @__PURE__ */ e(z, { className: "h-ico-sm w-ico-sm text-surface-fg-subtle" }),
|
|
117
|
+
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-subtle", children: "Attendance window closed" })
|
|
118
|
+
] })
|
|
119
|
+
] }) });
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
se.displayName = "AttendanceCTA";
|
|
123
|
+
const _ = [
|
|
124
|
+
"bg-category-amber-9",
|
|
125
|
+
"bg-category-teal-9",
|
|
126
|
+
"bg-category-cyan-9",
|
|
127
|
+
"bg-accent-9",
|
|
128
|
+
"bg-accent-9"
|
|
129
|
+
], te = A.forwardRef(
|
|
130
|
+
function({
|
|
131
|
+
data: a,
|
|
132
|
+
loading: r = !1,
|
|
133
|
+
onRefresh: p,
|
|
134
|
+
unavailable: m = !1,
|
|
135
|
+
collapsible: u = !0,
|
|
136
|
+
defaultCollapsed: v = !1,
|
|
137
|
+
title: h,
|
|
138
|
+
className: n,
|
|
139
|
+
...l
|
|
140
|
+
}, c) {
|
|
141
|
+
const [g, y] = C(v), N = h ?? "Morning Brief";
|
|
142
|
+
if (r && !a)
|
|
143
|
+
return /* @__PURE__ */ s("div", { ref: c, className: d("flex flex-col gap-ds-04 rounded-ds-2xl border border-surface-border-strong bg-surface-1 shadow-01 p-ds-05b", n), ...l, children: [
|
|
144
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03", children: [
|
|
145
|
+
/* @__PURE__ */ e("div", { className: "h-ico-sm w-ico-sm animate-pulse rounded bg-surface-2" }),
|
|
146
|
+
/* @__PURE__ */ e("div", { className: "h-4 w-24 animate-pulse rounded bg-surface-2" })
|
|
147
|
+
] }),
|
|
148
|
+
[1, 2, 3].map((o) => /* @__PURE__ */ s("div", { className: "flex items-start gap-ds-04", children: [
|
|
149
|
+
/* @__PURE__ */ e("div", { className: "mt-ds-02b h-2 w-2 shrink-0 animate-pulse rounded-ds-full bg-surface-2" }),
|
|
150
|
+
/* @__PURE__ */ e(
|
|
151
|
+
"div",
|
|
152
|
+
{
|
|
153
|
+
className: "h-4 animate-pulse rounded bg-surface-2",
|
|
154
|
+
style: { width: `${60 + o * 10}%` }
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
] }, o))
|
|
158
|
+
] });
|
|
159
|
+
if (m)
|
|
160
|
+
return /* @__PURE__ */ s("div", { ref: c, className: d("flex items-center gap-ds-03 rounded-ds-2xl border border-surface-border-strong bg-surface-1 shadow-01 px-ds-05b py-ds-05", n), ...l, children: [
|
|
161
|
+
/* @__PURE__ */ e(R, { className: "h-ico-sm w-ico-sm text-surface-fg-subtle" }),
|
|
162
|
+
/* @__PURE__ */ e("span", { className: "text-ds-sm text-surface-fg-subtle", children: "AI brief unavailable" })
|
|
163
|
+
] });
|
|
164
|
+
if (!a || a.brief.length === 0) return null;
|
|
165
|
+
const i = !u || !g;
|
|
166
|
+
return /* @__PURE__ */ s("div", { ref: c, className: d("flex flex-col rounded-ds-2xl border border-surface-border-strong bg-surface-1 shadow-01", n), ...l, children: [
|
|
167
|
+
/* @__PURE__ */ s("div", { className: "flex items-center justify-between px-ds-05b py-ds-05", children: [
|
|
168
|
+
u ? /* @__PURE__ */ s(
|
|
169
|
+
"button",
|
|
170
|
+
{
|
|
171
|
+
type: "button",
|
|
172
|
+
"aria-label": "Toggle brief",
|
|
173
|
+
"aria-expanded": i,
|
|
174
|
+
onClick: () => y(!g),
|
|
175
|
+
className: "flex flex-1 items-center gap-ds-03 transition-colors hover:opacity-80",
|
|
176
|
+
children: [
|
|
177
|
+
/* @__PURE__ */ e(R, { className: "h-ico-sm w-ico-sm text-accent-11" }),
|
|
178
|
+
/* @__PURE__ */ e("span", { className: "text-ds-base font-semibold text-surface-fg", children: N }),
|
|
179
|
+
/* @__PURE__ */ e(
|
|
180
|
+
M,
|
|
181
|
+
{
|
|
182
|
+
className: d(
|
|
183
|
+
"h-ico-sm w-ico-sm text-surface-fg-subtle transition-transform duration-200",
|
|
184
|
+
i && "rotate-180"
|
|
185
|
+
)
|
|
186
|
+
}
|
|
187
|
+
)
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
) : /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03", children: [
|
|
191
|
+
/* @__PURE__ */ e(R, { className: "h-ico-sm w-ico-sm text-accent-11" }),
|
|
192
|
+
/* @__PURE__ */ e("span", { className: "text-ds-base font-semibold text-surface-fg", children: N })
|
|
193
|
+
] }),
|
|
194
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-ds-02", children: p && /* @__PURE__ */ e(
|
|
195
|
+
"button",
|
|
196
|
+
{
|
|
197
|
+
type: "button",
|
|
198
|
+
onClick: p,
|
|
199
|
+
"aria-label": "Refresh brief",
|
|
200
|
+
className: "p-1.5 rounded hover:bg-surface-2 transition-colors",
|
|
201
|
+
children: /* @__PURE__ */ e(U, { className: d("h-ico-sm w-ico-sm text-surface-fg-subtle", r && "animate-spin") })
|
|
202
|
+
}
|
|
203
|
+
) })
|
|
204
|
+
] }),
|
|
205
|
+
/* @__PURE__ */ e(B, { initial: !1, children: i && /* @__PURE__ */ e(
|
|
206
|
+
S.div,
|
|
207
|
+
{
|
|
208
|
+
initial: { height: 0, opacity: 0 },
|
|
209
|
+
animate: { height: "auto", opacity: 1 },
|
|
210
|
+
exit: { height: 0, opacity: 0 },
|
|
211
|
+
transition: E.smooth,
|
|
212
|
+
className: "overflow-hidden",
|
|
213
|
+
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-ds-03 border-t border-surface-border-strong px-ds-05b pb-ds-05b pt-ds-05", children: [
|
|
214
|
+
a.brief.map((o, x) => /* @__PURE__ */ s("div", { className: "flex items-start gap-ds-04", children: [
|
|
215
|
+
/* @__PURE__ */ e(
|
|
216
|
+
"div",
|
|
217
|
+
{
|
|
218
|
+
className: d("mt-ds-02b h-2 w-2 shrink-0 rounded-ds-full", _[x % _.length])
|
|
219
|
+
}
|
|
220
|
+
),
|
|
221
|
+
/* @__PURE__ */ e("div", { className: "text-ds-md text-surface-fg-muted [&_p]:mb-0 [&_strong]:font-semibold [&_code]:rounded [&_code]:bg-surface-3 [&_code]:px-1 [&_code]:py-ds-01 [&_code]:text-ds-sm [&_a]:text-accent-11 [&_a]:underline", children: /* @__PURE__ */ e(q, { children: o }) })
|
|
222
|
+
] }, x)),
|
|
223
|
+
/* @__PURE__ */ s("div", { className: "mt-ds-02 text-ds-xs text-surface-fg-subtle", children: [
|
|
224
|
+
"Generated ",
|
|
225
|
+
X(a.generatedAt)
|
|
226
|
+
] })
|
|
227
|
+
] })
|
|
228
|
+
}
|
|
229
|
+
) })
|
|
230
|
+
] });
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
te.displayName = "DailyBrief";
|
|
234
|
+
const b = 20, I = 2, D = (b - I) / 2, j = 2 * Math.PI * D;
|
|
235
|
+
function ae({ count: f, max: a, allDone: r }) {
|
|
236
|
+
const p = a > 0 ? f / a : 0, m = j * (1 - p);
|
|
237
|
+
return /* @__PURE__ */ s(
|
|
238
|
+
S.div,
|
|
239
|
+
{
|
|
240
|
+
className: "relative flex items-center justify-center",
|
|
241
|
+
animate: r ? { scale: [1, 1.1, 1] } : {},
|
|
242
|
+
transition: { duration: 0.3 },
|
|
243
|
+
children: [
|
|
244
|
+
/* @__PURE__ */ s("svg", { width: b, height: b, viewBox: `0 0 ${b} ${b}`, className: "-rotate-90", children: [
|
|
245
|
+
/* @__PURE__ */ e(
|
|
246
|
+
"circle",
|
|
247
|
+
{
|
|
248
|
+
cx: b / 2,
|
|
249
|
+
cy: b / 2,
|
|
250
|
+
r: D,
|
|
251
|
+
fill: "none",
|
|
252
|
+
strokeWidth: I,
|
|
253
|
+
className: "stroke-surface-2"
|
|
254
|
+
}
|
|
255
|
+
),
|
|
256
|
+
/* @__PURE__ */ e(
|
|
257
|
+
"circle",
|
|
258
|
+
{
|
|
259
|
+
cx: b / 2,
|
|
260
|
+
cy: b / 2,
|
|
261
|
+
r: D,
|
|
262
|
+
fill: "none",
|
|
263
|
+
strokeWidth: I,
|
|
264
|
+
strokeLinecap: "round",
|
|
265
|
+
strokeDasharray: j,
|
|
266
|
+
strokeDashoffset: m,
|
|
267
|
+
className: d(
|
|
268
|
+
"transition-all duration-300",
|
|
269
|
+
r ? "stroke-success-9" : "stroke-accent-9"
|
|
270
|
+
)
|
|
271
|
+
}
|
|
272
|
+
)
|
|
273
|
+
] }),
|
|
274
|
+
/* @__PURE__ */ s("span", { className: "absolute text-[8px] font-medium text-surface-fg-muted", "data-testid": "progress-count", children: [
|
|
275
|
+
f,
|
|
276
|
+
"/",
|
|
277
|
+
a
|
|
278
|
+
] })
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
const re = A.forwardRef(
|
|
284
|
+
function({
|
|
285
|
+
items: a,
|
|
286
|
+
maxItems: r = 5,
|
|
287
|
+
onToggle: p,
|
|
288
|
+
onAdd: m,
|
|
289
|
+
onDelete: u,
|
|
290
|
+
title: v = "My Scratchpad",
|
|
291
|
+
resetLabel: h,
|
|
292
|
+
emptyText: n = "Nothing here yet. Add a task!",
|
|
293
|
+
emptyIcon: l,
|
|
294
|
+
loading: c = !1,
|
|
295
|
+
className: g,
|
|
296
|
+
...y
|
|
297
|
+
}, N) {
|
|
298
|
+
const [i, o] = C(!1), [x, w] = C(""), k = W(null), $ = a.length > 0 && a.every((t) => t.done);
|
|
299
|
+
P(() => {
|
|
300
|
+
i && k.current && k.current.focus();
|
|
301
|
+
}, [i]);
|
|
302
|
+
function T() {
|
|
303
|
+
const t = x.trim();
|
|
304
|
+
t && (m(t), w(""));
|
|
305
|
+
}
|
|
306
|
+
function O(t) {
|
|
307
|
+
t.key === "Enter" ? (t.preventDefault(), T()) : t.key === "Escape" && (o(!1), w(""));
|
|
308
|
+
}
|
|
309
|
+
return c ? /* @__PURE__ */ s(
|
|
310
|
+
"div",
|
|
311
|
+
{
|
|
312
|
+
ref: N,
|
|
313
|
+
className: d(
|
|
314
|
+
"flex flex-col gap-ds-04 rounded-ds-2xl border border-surface-border-strong bg-surface-1 shadow-01 p-ds-05b",
|
|
315
|
+
g
|
|
316
|
+
),
|
|
317
|
+
...y,
|
|
318
|
+
children: [
|
|
319
|
+
/* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
320
|
+
/* @__PURE__ */ e("div", { className: "h-4 w-28 animate-pulse rounded bg-surface-2" }),
|
|
321
|
+
/* @__PURE__ */ e("div", { className: "h-5 w-5 animate-pulse rounded-full bg-surface-2" })
|
|
322
|
+
] }),
|
|
323
|
+
[1, 2, 3].map((t) => /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03", children: [
|
|
324
|
+
/* @__PURE__ */ e("div", { className: "h-ico-md w-ico-md shrink-0 animate-pulse rounded-ds-sm bg-surface-2" }),
|
|
325
|
+
/* @__PURE__ */ e(
|
|
326
|
+
"div",
|
|
327
|
+
{
|
|
328
|
+
className: "h-4 animate-pulse rounded bg-surface-2",
|
|
329
|
+
style: { width: `${50 + t * 12}%` }
|
|
330
|
+
}
|
|
331
|
+
)
|
|
332
|
+
] }, t))
|
|
333
|
+
]
|
|
334
|
+
}
|
|
335
|
+
) : /* @__PURE__ */ s(
|
|
336
|
+
"div",
|
|
337
|
+
{
|
|
338
|
+
ref: N,
|
|
339
|
+
className: d(
|
|
340
|
+
"flex flex-col rounded-ds-2xl border border-surface-border-strong bg-surface-1 shadow-01",
|
|
341
|
+
g
|
|
342
|
+
),
|
|
343
|
+
...y,
|
|
344
|
+
children: [
|
|
345
|
+
/* @__PURE__ */ s("div", { className: "flex items-center justify-between px-ds-05b py-ds-05", children: [
|
|
346
|
+
/* @__PURE__ */ e("span", { className: "text-ds-base font-semibold text-surface-fg", children: v }),
|
|
347
|
+
/* @__PURE__ */ e(ae, { count: a.length, max: r, allDone: $ })
|
|
348
|
+
] }),
|
|
349
|
+
/* @__PURE__ */ s("div", { className: "flex flex-col border-t border-surface-border-strong px-ds-05b pb-ds-04 pt-ds-04", children: [
|
|
350
|
+
a.length === 0 && !i ? /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center gap-ds-03 py-ds-06 text-center", children: [
|
|
351
|
+
l && /* @__PURE__ */ e(l, { className: "h-ico-lg w-ico-lg text-surface-fg-subtle" }),
|
|
352
|
+
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-subtle", children: n })
|
|
353
|
+
] }) : /* @__PURE__ */ e("div", { className: "flex flex-col gap-ds-02b", children: /* @__PURE__ */ e(B, { initial: !1, children: a.map((t) => /* @__PURE__ */ s(
|
|
354
|
+
S.div,
|
|
355
|
+
{
|
|
356
|
+
initial: { opacity: 0, x: -10 },
|
|
357
|
+
animate: { opacity: 1, x: 0 },
|
|
358
|
+
exit: { opacity: 0, x: 20, height: 0 },
|
|
359
|
+
transition: E.snappy,
|
|
360
|
+
className: "group flex items-center gap-ds-03 rounded-ds-md px-ds-02 py-ds-02 transition-colors hover:bg-surface-2",
|
|
361
|
+
children: [
|
|
362
|
+
/* @__PURE__ */ e(
|
|
363
|
+
G,
|
|
364
|
+
{
|
|
365
|
+
checked: t.done,
|
|
366
|
+
onCheckedChange: (K) => p(t.id, K === !0),
|
|
367
|
+
"aria-label": `Toggle ${t.text}`
|
|
368
|
+
}
|
|
369
|
+
),
|
|
370
|
+
/* @__PURE__ */ e(
|
|
371
|
+
"span",
|
|
372
|
+
{
|
|
373
|
+
className: d(
|
|
374
|
+
"flex-1 text-ds-md transition-all duration-200 ease-in-out",
|
|
375
|
+
t.done && "text-surface-fg-subtle line-through"
|
|
376
|
+
),
|
|
377
|
+
children: t.text
|
|
378
|
+
}
|
|
379
|
+
),
|
|
380
|
+
/* @__PURE__ */ e(
|
|
381
|
+
"button",
|
|
382
|
+
{
|
|
383
|
+
type: "button",
|
|
384
|
+
onClick: () => u(t.id),
|
|
385
|
+
"aria-label": `Delete ${t.text}`,
|
|
386
|
+
className: "flex h-ico-md w-ico-md items-center justify-center rounded-ds-sm opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100 hover:bg-surface-3",
|
|
387
|
+
children: /* @__PURE__ */ e(H, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
388
|
+
}
|
|
389
|
+
)
|
|
390
|
+
]
|
|
391
|
+
},
|
|
392
|
+
t.id
|
|
393
|
+
)) }) }),
|
|
394
|
+
a.length < r && /* @__PURE__ */ e("div", { className: "mt-ds-02b", children: i ? /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03", children: [
|
|
395
|
+
/* @__PURE__ */ e(
|
|
396
|
+
J,
|
|
397
|
+
{
|
|
398
|
+
ref: k,
|
|
399
|
+
size: "sm",
|
|
400
|
+
value: x,
|
|
401
|
+
onChange: (t) => w(t.target.value),
|
|
402
|
+
onKeyDown: O,
|
|
403
|
+
onBlur: () => {
|
|
404
|
+
x.trim() || (o(!1), w(""));
|
|
405
|
+
},
|
|
406
|
+
placeholder: "What needs doing?",
|
|
407
|
+
className: "flex-1"
|
|
408
|
+
}
|
|
409
|
+
),
|
|
410
|
+
/* @__PURE__ */ e(
|
|
411
|
+
Q,
|
|
412
|
+
{
|
|
413
|
+
size: "sm",
|
|
414
|
+
onClick: T,
|
|
415
|
+
onMouseDown: (t) => t.preventDefault(),
|
|
416
|
+
children: "Add"
|
|
417
|
+
}
|
|
418
|
+
)
|
|
419
|
+
] }) : /* @__PURE__ */ e(
|
|
420
|
+
"button",
|
|
421
|
+
{
|
|
422
|
+
type: "button",
|
|
423
|
+
onClick: () => o(!0),
|
|
424
|
+
className: "w-full rounded-ds-md px-ds-02 py-ds-02 text-left text-ds-md text-surface-fg-subtle transition-colors hover:bg-surface-2",
|
|
425
|
+
children: "+ Add a task..."
|
|
426
|
+
}
|
|
427
|
+
) }),
|
|
428
|
+
h && /* @__PURE__ */ e("span", { className: "mt-ds-03 text-ds-xs text-surface-fg-subtle", children: h })
|
|
429
|
+
] })
|
|
430
|
+
]
|
|
431
|
+
}
|
|
432
|
+
);
|
|
433
|
+
}
|
|
434
|
+
);
|
|
435
|
+
re.displayName = "ScratchpadWidget";
|
|
436
|
+
const de = A.forwardRef(
|
|
437
|
+
function({ items: a, onToggle: r, defaultOpen: p = !0, badgeCount: m, className: u, ...v }, h) {
|
|
438
|
+
const [n, l] = C(p);
|
|
439
|
+
return /* @__PURE__ */ s("div", { ref: h, className: d("flex flex-col", u), ...v, children: [
|
|
440
|
+
/* @__PURE__ */ s(
|
|
441
|
+
"button",
|
|
442
|
+
{
|
|
443
|
+
type: "button",
|
|
444
|
+
onClick: () => l((c) => !c),
|
|
445
|
+
"aria-expanded": n,
|
|
446
|
+
className: "flex w-full items-center gap-ds-02 px-ds-03 py-ds-02 text-left text-ds-xs font-semibold text-surface-fg-muted transition-colors hover:bg-surface-2",
|
|
447
|
+
children: [
|
|
448
|
+
/* @__PURE__ */ e(
|
|
449
|
+
M,
|
|
450
|
+
{
|
|
451
|
+
className: d(
|
|
452
|
+
"h-3.5 w-3.5 shrink-0 transition-transform duration-200",
|
|
453
|
+
!n && "-rotate-180"
|
|
454
|
+
)
|
|
455
|
+
}
|
|
456
|
+
),
|
|
457
|
+
/* @__PURE__ */ e("span", { className: "flex-1", children: "Scratchpad" }),
|
|
458
|
+
m != null && m > 0 && /* @__PURE__ */ e("span", { className: "rounded-full bg-surface-2 px-1.5 text-ds-xs text-surface-fg-muted", children: m })
|
|
459
|
+
]
|
|
460
|
+
}
|
|
461
|
+
),
|
|
462
|
+
/* @__PURE__ */ e(
|
|
463
|
+
"div",
|
|
464
|
+
{
|
|
465
|
+
className: d(
|
|
466
|
+
"grid transition-[grid-template-rows] duration-200",
|
|
467
|
+
n ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
468
|
+
),
|
|
469
|
+
children: /* @__PURE__ */ e("div", { className: "overflow-hidden", children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-0.5 px-ds-03 pb-ds-02", children: a.map((c) => /* @__PURE__ */ s(
|
|
470
|
+
"label",
|
|
471
|
+
{
|
|
472
|
+
className: "flex cursor-pointer items-center gap-ds-02 rounded-ds-sm px-ds-02 py-0.5 transition-colors hover:bg-surface-2",
|
|
473
|
+
children: [
|
|
474
|
+
/* @__PURE__ */ e(
|
|
475
|
+
G,
|
|
476
|
+
{
|
|
477
|
+
checked: c.done,
|
|
478
|
+
onCheckedChange: (g) => r(c.id, g === !0),
|
|
479
|
+
"aria-label": `Toggle ${c.text}`,
|
|
480
|
+
className: "h-3.5 w-3.5"
|
|
481
|
+
}
|
|
482
|
+
),
|
|
483
|
+
/* @__PURE__ */ e(
|
|
484
|
+
"span",
|
|
485
|
+
{
|
|
486
|
+
className: d(
|
|
487
|
+
"flex-1 text-xs transition-all duration-200",
|
|
488
|
+
c.done ? "text-surface-fg-subtle line-through" : "text-surface-fg"
|
|
489
|
+
),
|
|
490
|
+
children: c.text
|
|
491
|
+
}
|
|
492
|
+
)
|
|
493
|
+
]
|
|
494
|
+
},
|
|
495
|
+
c.id
|
|
496
|
+
)) }) })
|
|
497
|
+
}
|
|
498
|
+
)
|
|
499
|
+
] });
|
|
500
|
+
}
|
|
501
|
+
);
|
|
502
|
+
de.displayName = "SidebarScratchpad";
|
|
503
|
+
export {
|
|
504
|
+
se as A,
|
|
505
|
+
te as D,
|
|
506
|
+
re as S,
|
|
507
|
+
de as a
|
|
508
|
+
};
|