@devalok/shilp-sutra-karm 0.17.0 → 0.18.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 +175 -202
- package/dist/_chunks/kanban-board.js +4 -3
- package/dist/_chunks/markdown-components.js +35 -0
- package/dist/_chunks/render-adjustment-type.js +1 -1
- package/dist/_chunks/sidebar-scratchpad.js +39 -37
- package/dist/_chunks/task-detail-panel.js +68 -68
- package/dist/_chunks/vendor.js +5197 -10406
- package/dist/dashboard/daily-brief.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@ import { jsx as e, jsxs as a, Fragment as ve } from "react/jsx-runtime";
|
|
|
3
3
|
import * as P from "react";
|
|
4
4
|
import { useMemo as re, useState as E, useEffect as oe, useCallback as O, useContext as bt, createContext as xt, useRef as ye } from "react";
|
|
5
5
|
import { createPortal as wt } from "react-dom";
|
|
6
|
-
import {
|
|
6
|
+
import { u as Pe, C as _e, c as ze, a as vt, S as Ue, v as yt, b as kt, d as De, D as Ct, e as Nt, h as It, f as Dt, s as Tt, K as Rt, T as St, P as At } from "./vendor.js";
|
|
7
7
|
import { cn as N } from "@devalok/shilp-sutra/ui/lib/utils";
|
|
8
8
|
import { MotionStagger as le, MotionStaggerItem as Q } from "@devalok/shilp-sutra/motion/primitives";
|
|
9
9
|
import { Input as ke } from "@devalok/shilp-sutra/ui/input";
|
|
@@ -12,6 +12,7 @@ import { Badge as Mt } from "@devalok/shilp-sutra/ui/badge";
|
|
|
12
12
|
import { DropdownMenu as U, DropdownMenuTrigger as V, DropdownMenuContent as G, DropdownMenuLabel as te, DropdownMenuSeparator as Y, DropdownMenuCheckboxItem as Te, DropdownMenuRadioGroup as Lt, DropdownMenuRadioItem as Et, DropdownMenuItem as _ } from "@devalok/shilp-sutra/ui/dropdown-menu";
|
|
13
13
|
import { SegmentedControl as Ot } from "@devalok/shilp-sutra/ui/segmented-control";
|
|
14
14
|
import { IconX as Ce, IconSearch as Bt, IconFilter as Wt, IconUser as ce, IconLayoutGrid as Ft, IconLayoutList as $t, IconArrowRight as Se, IconAlertTriangle as Ne, IconEye as de, IconTrash as Ae, IconPlus as Me, IconDots as Pt, IconPencil as _t, IconGauge as zt, IconEyeOff as Ve, IconCalendar as Le, IconCheck as Ut, IconArrowUp as Ge, IconArrowDown as Ke, IconGripVertical as Vt, IconSubtask as Gt, IconLock as Kt, IconTag as Ht } from "@tabler/icons-react";
|
|
15
|
+
import { AnimatePresence as ie, motion as se } from "framer-motion";
|
|
15
16
|
import { springs as ae, motionProps as jt } from "@devalok/shilp-sutra/ui/lib/motion";
|
|
16
17
|
import { AvatarGroup as Yt } from "@devalok/shilp-sutra/composed/avatar-group";
|
|
17
18
|
import { u as He } from "./use-composed-ref.js";
|
|
@@ -27,7 +28,7 @@ const ss = 320, Be = [
|
|
|
27
28
|
"bg-category-emerald-9",
|
|
28
29
|
"bg-category-slate-9",
|
|
29
30
|
"bg-accent-9"
|
|
30
|
-
],
|
|
31
|
+
], Us = {
|
|
31
32
|
LOW: "IconArrowDown",
|
|
32
33
|
MEDIUM: "IconArrowRight",
|
|
33
34
|
HIGH: "IconArrowUp",
|
|
@@ -2027,7 +2028,7 @@ export {
|
|
|
2027
2028
|
ss as d,
|
|
2028
2029
|
Ze as e,
|
|
2029
2030
|
Je as f,
|
|
2030
|
-
|
|
2031
|
+
Us as g,
|
|
2031
2032
|
rt as h,
|
|
2032
2033
|
it as i,
|
|
2033
2034
|
ot as j,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
const l = {
|
|
4
|
+
p: ({ children: s }) => /* @__PURE__ */ e("p", { className: "mb-ds-03 last:mb-0", children: s }),
|
|
5
|
+
code: ({
|
|
6
|
+
children: s,
|
|
7
|
+
className: t
|
|
8
|
+
}) => (t == null ? void 0 : t.includes("language-")) ? /* @__PURE__ */ e("code", { className: t, children: s }) : /* @__PURE__ */ e("code", { className: "rounded bg-surface-3 px-ds-02 py-ds-01 text-ds-md", children: s }),
|
|
9
|
+
pre: ({ children: s }) => /* @__PURE__ */ e("pre", { className: "mb-ds-03 overflow-x-auto rounded-ds-lg bg-surface-3 p-ds-04 text-ds-md", children: s }),
|
|
10
|
+
ul: ({ children: s }) => /* @__PURE__ */ e("ul", { className: "mb-ds-03 list-disc pl-ds-05", children: s }),
|
|
11
|
+
ol: ({ children: s }) => /* @__PURE__ */ e("ol", { className: "mb-ds-03 list-decimal pl-ds-05", children: s }),
|
|
12
|
+
li: ({ children: s }) => /* @__PURE__ */ e("li", { className: "mb-ds-02", children: s }),
|
|
13
|
+
strong: ({ children: s }) => /* @__PURE__ */ e("strong", { className: "font-semibold", children: s }),
|
|
14
|
+
a: ({
|
|
15
|
+
href: s,
|
|
16
|
+
children: t,
|
|
17
|
+
...o
|
|
18
|
+
}) => {
|
|
19
|
+
const d = s && /^(https?:\/\/|mailto:)/i.test(s) ? s : "#";
|
|
20
|
+
return /* @__PURE__ */ e(
|
|
21
|
+
"a",
|
|
22
|
+
{
|
|
23
|
+
href: d,
|
|
24
|
+
target: "_blank",
|
|
25
|
+
rel: "noopener noreferrer",
|
|
26
|
+
className: "text-accent-11 underline hover:text-accent-12",
|
|
27
|
+
...o,
|
|
28
|
+
children: t
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
l as m
|
|
35
|
+
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as e, jsxs as a, Fragment as Q } from "react/jsx-runtime";
|
|
3
3
|
import * as _ from "react";
|
|
4
4
|
import Ee, { useState as B, useEffect as se, useRef as Pe, useCallback as $, Fragment as bs, useReducer as qs, useMemo as Be, createContext as gs, useContext as ws } from "react";
|
|
5
|
-
import { g as Us, i as et, j as He, k as st, l as Z,
|
|
5
|
+
import { g as Us, i as et, j as He, k as st, l as Z, m as O, n as tt, o as Re, p as at, q as Ns, r as Je, t as ys, c as rt, w as ee, x as dt, y as Ds, z as lt, A as ls, B as nt } from "./vendor.js";
|
|
6
6
|
import { cn as D } from "@devalok/shilp-sutra/ui/lib/utils";
|
|
7
7
|
import { Skeleton as R } from "@devalok/shilp-sutra/ui/skeleton";
|
|
8
8
|
import { DropdownMenu as ge, DropdownMenuTrigger as we, DropdownMenuContent as Te, DropdownMenuItem as be } from "@devalok/shilp-sutra/ui/dropdown-menu";
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
3
|
+
import * as R from "react";
|
|
4
4
|
import { useState as C, useRef as W, useEffect as P } from "react";
|
|
5
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
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { IconCheck as L, IconCoffee as Z, IconClock as z, IconArrowRight as F, IconSparkles as A, IconChevronDown as M, IconRefresh as U, IconX as H } from "@tabler/icons-react";
|
|
7
|
+
import { AnimatePresence as E, motion as S } from "framer-motion";
|
|
8
|
+
import { m as X } from "./markdown-components.js";
|
|
9
|
+
import { springs as B } from "@devalok/shilp-sutra/ui/lib/motion";
|
|
10
|
+
import { formatRelativeTime as q } from "@devalok/shilp-sutra/ui/lib/date-utils";
|
|
11
|
+
import { M as J } from "./vendor.js";
|
|
10
12
|
import { Checkbox as G } from "@devalok/shilp-sutra/ui/checkbox";
|
|
11
|
-
import { Input as
|
|
12
|
-
import { Button as
|
|
13
|
-
function
|
|
13
|
+
import { Input as Q } from "@devalok/shilp-sutra/ui/input";
|
|
14
|
+
import { Button as V } from "@devalok/shilp-sutra/ui/button";
|
|
15
|
+
function Y() {
|
|
14
16
|
const f = (/* @__PURE__ */ new Date()).getHours();
|
|
15
17
|
return f < 12 ? "Good morning" : f < 17 ? "Good afternoon" : "Good evening";
|
|
16
18
|
}
|
|
17
|
-
function
|
|
19
|
+
function ee() {
|
|
18
20
|
return (/* @__PURE__ */ new Date()).toLocaleDateString("en-IN", {
|
|
19
21
|
weekday: "long",
|
|
20
22
|
day: "numeric",
|
|
@@ -23,7 +25,7 @@ function Y() {
|
|
|
23
25
|
timeZone: "Asia/Kolkata"
|
|
24
26
|
});
|
|
25
27
|
}
|
|
26
|
-
function
|
|
28
|
+
function se(f) {
|
|
27
29
|
return new Date(f).toLocaleTimeString("en-IN", {
|
|
28
30
|
hour: "2-digit",
|
|
29
31
|
minute: "2-digit",
|
|
@@ -31,19 +33,19 @@ function ee(f) {
|
|
|
31
33
|
timeZone: "Asia/Kolkata"
|
|
32
34
|
});
|
|
33
35
|
}
|
|
34
|
-
const
|
|
36
|
+
const te = R.forwardRef(
|
|
35
37
|
function({
|
|
36
38
|
userName: a,
|
|
37
39
|
attendance: r,
|
|
38
40
|
canMarkAttendance: p,
|
|
39
41
|
onMarkAttendance: m,
|
|
40
42
|
isSubmitting: u = !1,
|
|
41
|
-
formatTime: v =
|
|
43
|
+
formatTime: v = se,
|
|
42
44
|
className: h,
|
|
43
45
|
...n
|
|
44
46
|
}, l) {
|
|
45
47
|
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 =
|
|
48
|
+
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 = Y(), o = (a == null ? void 0 : a.split(" ")[0]) || "there", x = ee();
|
|
47
49
|
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
50
|
/* @__PURE__ */ s("div", { className: "flex flex-col gap-ds-02", children: [
|
|
49
51
|
/* @__PURE__ */ s("h2", { className: "text-ds-2xl text-surface-fg", children: [
|
|
@@ -119,14 +121,14 @@ const se = A.forwardRef(
|
|
|
119
121
|
] }) });
|
|
120
122
|
}
|
|
121
123
|
);
|
|
122
|
-
|
|
124
|
+
te.displayName = "AttendanceCTA";
|
|
123
125
|
const _ = [
|
|
124
126
|
"bg-category-amber-9",
|
|
125
127
|
"bg-category-teal-9",
|
|
126
128
|
"bg-category-cyan-9",
|
|
127
129
|
"bg-accent-9",
|
|
128
130
|
"bg-accent-9"
|
|
129
|
-
],
|
|
131
|
+
], ae = R.forwardRef(
|
|
130
132
|
function({
|
|
131
133
|
data: a,
|
|
132
134
|
loading: r = !1,
|
|
@@ -158,7 +160,7 @@ const _ = [
|
|
|
158
160
|
] });
|
|
159
161
|
if (m)
|
|
160
162
|
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(
|
|
163
|
+
/* @__PURE__ */ e(A, { className: "h-ico-sm w-ico-sm text-surface-fg-subtle" }),
|
|
162
164
|
/* @__PURE__ */ e("span", { className: "text-ds-sm text-surface-fg-subtle", children: "AI brief unavailable" })
|
|
163
165
|
] });
|
|
164
166
|
if (!a || a.brief.length === 0) return null;
|
|
@@ -174,7 +176,7 @@ const _ = [
|
|
|
174
176
|
onClick: () => y(!g),
|
|
175
177
|
className: "flex flex-1 items-center gap-ds-03 transition-colors hover:opacity-80",
|
|
176
178
|
children: [
|
|
177
|
-
/* @__PURE__ */ e(
|
|
179
|
+
/* @__PURE__ */ e(A, { className: "h-ico-sm w-ico-sm text-accent-11" }),
|
|
178
180
|
/* @__PURE__ */ e("span", { className: "text-ds-base font-semibold text-surface-fg", children: N }),
|
|
179
181
|
/* @__PURE__ */ e(
|
|
180
182
|
M,
|
|
@@ -188,7 +190,7 @@ const _ = [
|
|
|
188
190
|
]
|
|
189
191
|
}
|
|
190
192
|
) : /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03", children: [
|
|
191
|
-
/* @__PURE__ */ e(
|
|
193
|
+
/* @__PURE__ */ e(A, { className: "h-ico-sm w-ico-sm text-accent-11" }),
|
|
192
194
|
/* @__PURE__ */ e("span", { className: "text-ds-base font-semibold text-surface-fg", children: N })
|
|
193
195
|
] }),
|
|
194
196
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-ds-02", children: p && /* @__PURE__ */ e(
|
|
@@ -202,13 +204,13 @@ const _ = [
|
|
|
202
204
|
}
|
|
203
205
|
) })
|
|
204
206
|
] }),
|
|
205
|
-
/* @__PURE__ */ e(
|
|
207
|
+
/* @__PURE__ */ e(E, { initial: !1, children: i && /* @__PURE__ */ e(
|
|
206
208
|
S.div,
|
|
207
209
|
{
|
|
208
210
|
initial: { height: 0, opacity: 0 },
|
|
209
211
|
animate: { height: "auto", opacity: 1 },
|
|
210
212
|
exit: { height: 0, opacity: 0 },
|
|
211
|
-
transition:
|
|
213
|
+
transition: B.smooth,
|
|
212
214
|
className: "overflow-hidden",
|
|
213
215
|
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
216
|
a.brief.map((o, x) => /* @__PURE__ */ s("div", { className: "flex items-start gap-ds-04", children: [
|
|
@@ -218,11 +220,11 @@ const _ = [
|
|
|
218
220
|
className: d("mt-ds-02b h-2 w-2 shrink-0 rounded-ds-full", _[x % _.length])
|
|
219
221
|
}
|
|
220
222
|
),
|
|
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(
|
|
223
|
+
/* @__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(J, { components: X, children: o }) })
|
|
222
224
|
] }, x)),
|
|
223
225
|
/* @__PURE__ */ s("div", { className: "mt-ds-02 text-ds-xs text-surface-fg-subtle", children: [
|
|
224
226
|
"Generated ",
|
|
225
|
-
|
|
227
|
+
q(a.generatedAt)
|
|
226
228
|
] })
|
|
227
229
|
] })
|
|
228
230
|
}
|
|
@@ -230,9 +232,9 @@ const _ = [
|
|
|
230
232
|
] });
|
|
231
233
|
}
|
|
232
234
|
);
|
|
233
|
-
|
|
235
|
+
ae.displayName = "DailyBrief";
|
|
234
236
|
const b = 20, I = 2, D = (b - I) / 2, j = 2 * Math.PI * D;
|
|
235
|
-
function
|
|
237
|
+
function re({ count: f, max: a, allDone: r }) {
|
|
236
238
|
const p = a > 0 ? f / a : 0, m = j * (1 - p);
|
|
237
239
|
return /* @__PURE__ */ s(
|
|
238
240
|
S.div,
|
|
@@ -280,7 +282,7 @@ function ae({ count: f, max: a, allDone: r }) {
|
|
|
280
282
|
}
|
|
281
283
|
);
|
|
282
284
|
}
|
|
283
|
-
const
|
|
285
|
+
const de = R.forwardRef(
|
|
284
286
|
function({
|
|
285
287
|
items: a,
|
|
286
288
|
maxItems: r = 5,
|
|
@@ -344,19 +346,19 @@ const re = A.forwardRef(
|
|
|
344
346
|
children: [
|
|
345
347
|
/* @__PURE__ */ s("div", { className: "flex items-center justify-between px-ds-05b py-ds-05", children: [
|
|
346
348
|
/* @__PURE__ */ e("span", { className: "text-ds-base font-semibold text-surface-fg", children: v }),
|
|
347
|
-
/* @__PURE__ */ e(
|
|
349
|
+
/* @__PURE__ */ e(re, { count: a.length, max: r, allDone: $ })
|
|
348
350
|
] }),
|
|
349
351
|
/* @__PURE__ */ s("div", { className: "flex flex-col border-t border-surface-border-strong px-ds-05b pb-ds-04 pt-ds-04", children: [
|
|
350
352
|
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
353
|
l && /* @__PURE__ */ e(l, { className: "h-ico-lg w-ico-lg text-surface-fg-subtle" }),
|
|
352
354
|
/* @__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(
|
|
355
|
+
] }) : /* @__PURE__ */ e("div", { className: "flex flex-col gap-ds-02b", children: /* @__PURE__ */ e(E, { initial: !1, children: a.map((t) => /* @__PURE__ */ s(
|
|
354
356
|
S.div,
|
|
355
357
|
{
|
|
356
358
|
initial: { opacity: 0, x: -10 },
|
|
357
359
|
animate: { opacity: 1, x: 0 },
|
|
358
360
|
exit: { opacity: 0, x: 20, height: 0 },
|
|
359
|
-
transition:
|
|
361
|
+
transition: B.snappy,
|
|
360
362
|
className: "group flex items-center gap-ds-03 rounded-ds-md px-ds-02 py-ds-02 transition-colors hover:bg-surface-2",
|
|
361
363
|
children: [
|
|
362
364
|
/* @__PURE__ */ e(
|
|
@@ -393,7 +395,7 @@ const re = A.forwardRef(
|
|
|
393
395
|
)) }) }),
|
|
394
396
|
a.length < r && /* @__PURE__ */ e("div", { className: "mt-ds-02b", children: i ? /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03", children: [
|
|
395
397
|
/* @__PURE__ */ e(
|
|
396
|
-
|
|
398
|
+
Q,
|
|
397
399
|
{
|
|
398
400
|
ref: k,
|
|
399
401
|
size: "sm",
|
|
@@ -408,7 +410,7 @@ const re = A.forwardRef(
|
|
|
408
410
|
}
|
|
409
411
|
),
|
|
410
412
|
/* @__PURE__ */ e(
|
|
411
|
-
|
|
413
|
+
V,
|
|
412
414
|
{
|
|
413
415
|
size: "sm",
|
|
414
416
|
onClick: T,
|
|
@@ -432,8 +434,8 @@ const re = A.forwardRef(
|
|
|
432
434
|
);
|
|
433
435
|
}
|
|
434
436
|
);
|
|
435
|
-
|
|
436
|
-
const
|
|
437
|
+
de.displayName = "ScratchpadWidget";
|
|
438
|
+
const ce = R.forwardRef(
|
|
437
439
|
function({ items: a, onToggle: r, defaultOpen: p = !0, badgeCount: m, className: u, ...v }, h) {
|
|
438
440
|
const [n, l] = C(p);
|
|
439
441
|
return /* @__PURE__ */ s("div", { ref: h, className: d("flex flex-col", u), ...v, children: [
|
|
@@ -499,10 +501,10 @@ const de = A.forwardRef(
|
|
|
499
501
|
] });
|
|
500
502
|
}
|
|
501
503
|
);
|
|
502
|
-
|
|
504
|
+
ce.displayName = "SidebarScratchpad";
|
|
503
505
|
export {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
506
|
+
te as A,
|
|
507
|
+
ae as D,
|
|
508
|
+
de as S,
|
|
509
|
+
ce as a
|
|
508
510
|
};
|