@skilldrunk/brain-ui 0.1.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/ActivityFeed.d.ts +14 -0
- package/dist/ActivityFeed.d.ts.map +1 -0
- package/dist/ActivityFeed.js +81 -0
- package/dist/ActivityFeed.js.map +1 -0
- package/dist/BacklogPanel.d.ts +21 -0
- package/dist/BacklogPanel.d.ts.map +1 -0
- package/dist/BacklogPanel.js +42 -0
- package/dist/BacklogPanel.js.map +1 -0
- package/dist/CalendarPanel.d.ts +20 -0
- package/dist/CalendarPanel.d.ts.map +1 -0
- package/dist/CalendarPanel.js +44 -0
- package/dist/CalendarPanel.js.map +1 -0
- package/dist/DigestStrip.d.ts +15 -0
- package/dist/DigestStrip.d.ts.map +1 -0
- package/dist/DigestStrip.js +63 -0
- package/dist/DigestStrip.js.map +1 -0
- package/dist/EmptyStateCoach.d.ts +16 -0
- package/dist/EmptyStateCoach.d.ts.map +1 -0
- package/dist/EmptyStateCoach.js +38 -0
- package/dist/EmptyStateCoach.js.map +1 -0
- package/dist/KpiHero.d.ts +13 -0
- package/dist/KpiHero.d.ts.map +1 -0
- package/dist/KpiHero.js +60 -0
- package/dist/KpiHero.js.map +1 -0
- package/dist/OwnerLayout.d.ts +21 -0
- package/dist/OwnerLayout.d.ts.map +1 -0
- package/dist/OwnerLayout.js +39 -0
- package/dist/OwnerLayout.js.map +1 -0
- package/dist/ProductCard.d.ts +14 -0
- package/dist/ProductCard.d.ts.map +1 -0
- package/dist/ProductCard.js +61 -0
- package/dist/ProductCard.js.map +1 -0
- package/dist/ShuffleGrid.d.ts +22 -0
- package/dist/ShuffleGrid.d.ts.map +1 -0
- package/dist/ShuffleGrid.js +20 -0
- package/dist/ShuffleGrid.js.map +1 -0
- package/dist/Sidebar.d.ts +13 -0
- package/dist/Sidebar.d.ts.map +1 -0
- package/dist/Sidebar.js +85 -0
- package/dist/Sidebar.js.map +1 -0
- package/dist/Topbar.d.ts +16 -0
- package/dist/Topbar.d.ts.map +1 -0
- package/dist/Topbar.js +59 -0
- package/dist/Topbar.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +41 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +38 -0
- package/src/theme.css +99 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BrainActivity } from "@skilldrunk/brain-client";
|
|
2
|
+
interface Props {
|
|
3
|
+
activities: BrainActivity[];
|
|
4
|
+
emptyCoach?: {
|
|
5
|
+
message: string;
|
|
6
|
+
actions?: Array<{
|
|
7
|
+
label: string;
|
|
8
|
+
href: string;
|
|
9
|
+
}>;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export declare function ActivityFeed({ activities, emptyCoach }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=ActivityFeed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActivityFeed.d.ts","sourceRoot":"","sources":["../src/ActivityFeed.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAG9D,UAAU,KAAK;IACb,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAC;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC;CACpF;AAiCD,wBAAgB,YAAY,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,KAAK,2CAmG7D"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { EmptyStateCoach } from "./EmptyStateCoach";
|
|
3
|
+
const SOURCE_ICON = {
|
|
4
|
+
github: "⌥",
|
|
5
|
+
vercel: "▲",
|
|
6
|
+
obsidian: "◇",
|
|
7
|
+
manual: "✎",
|
|
8
|
+
admin_app: "▦",
|
|
9
|
+
replit: "▶",
|
|
10
|
+
lovable: "♡",
|
|
11
|
+
google_ai_studio: "✦",
|
|
12
|
+
};
|
|
13
|
+
function groupByDay(items) {
|
|
14
|
+
const out = {};
|
|
15
|
+
for (const a of items) {
|
|
16
|
+
const day = a.occurred_at.slice(0, 10);
|
|
17
|
+
(out[day] ?? (out[day] = [])).push(a);
|
|
18
|
+
}
|
|
19
|
+
return out;
|
|
20
|
+
}
|
|
21
|
+
function dayLabel(iso) {
|
|
22
|
+
const today = new Date().toISOString().slice(0, 10);
|
|
23
|
+
const yesterday = new Date(Date.now() - 86400000).toISOString().slice(0, 10);
|
|
24
|
+
if (iso === today)
|
|
25
|
+
return "Bugün";
|
|
26
|
+
if (iso === yesterday)
|
|
27
|
+
return "Dün";
|
|
28
|
+
return new Date(iso).toLocaleDateString("tr-TR", {
|
|
29
|
+
day: "numeric",
|
|
30
|
+
month: "long",
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
export function ActivityFeed({ activities, emptyCoach }) {
|
|
34
|
+
if (!activities.length) {
|
|
35
|
+
return (_jsx(EmptyStateCoach, { area: "activity", message: emptyCoach?.message ?? "Son 24 saatte aktivite yok.", actions: emptyCoach?.actions }));
|
|
36
|
+
}
|
|
37
|
+
const grouped = groupByDay(activities);
|
|
38
|
+
return (_jsxs("section", { className: "bd-surface", style: { padding: 0 }, children: [_jsxs("header", { style: {
|
|
39
|
+
padding: "12px 16px",
|
|
40
|
+
borderBottom: "1px solid var(--bd-border)",
|
|
41
|
+
display: "flex",
|
|
42
|
+
justifyContent: "space-between",
|
|
43
|
+
fontSize: 12,
|
|
44
|
+
color: "var(--bd-text-3)",
|
|
45
|
+
letterSpacing: "0.05em",
|
|
46
|
+
textTransform: "uppercase",
|
|
47
|
+
}, children: [_jsx("span", { children: "aktivite" }), _jsx("span", { style: { fontFamily: "var(--bd-font-mono)" }, children: activities.length })] }), _jsx("ol", { style: { listStyle: "none", margin: 0, padding: 0 }, children: Object.entries(grouped).map(([day, items]) => (_jsxs("li", { children: [_jsx("div", { style: {
|
|
48
|
+
padding: "8px 16px",
|
|
49
|
+
fontSize: 11,
|
|
50
|
+
color: "var(--bd-text-3)",
|
|
51
|
+
background: "var(--bd-bg-2)",
|
|
52
|
+
borderBottom: "1px solid var(--bd-border)",
|
|
53
|
+
letterSpacing: "0.05em",
|
|
54
|
+
textTransform: "uppercase",
|
|
55
|
+
}, children: dayLabel(day) }), items.map((a) => (_jsxs("a", { href: a.url ?? "#", target: a.url ? "_blank" : undefined, rel: "noreferrer", style: {
|
|
56
|
+
display: "flex",
|
|
57
|
+
gap: 10,
|
|
58
|
+
padding: "10px 16px",
|
|
59
|
+
textDecoration: "none",
|
|
60
|
+
color: "var(--bd-text)",
|
|
61
|
+
borderBottom: "1px solid var(--bd-border)",
|
|
62
|
+
alignItems: "flex-start",
|
|
63
|
+
}, children: [_jsx("span", { "aria-hidden": true, style: {
|
|
64
|
+
width: 22,
|
|
65
|
+
height: 22,
|
|
66
|
+
display: "grid",
|
|
67
|
+
placeItems: "center",
|
|
68
|
+
borderRadius: 999,
|
|
69
|
+
background: "var(--bd-accent-bg)",
|
|
70
|
+
color: "var(--bd-accent-2)",
|
|
71
|
+
fontSize: 12,
|
|
72
|
+
flexShrink: 0,
|
|
73
|
+
}, children: SOURCE_ICON[a.source] ?? "•" }), _jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [_jsx("div", { style: {
|
|
74
|
+
fontSize: 13,
|
|
75
|
+
lineHeight: 1.35,
|
|
76
|
+
overflow: "hidden",
|
|
77
|
+
textOverflow: "ellipsis",
|
|
78
|
+
whiteSpace: "nowrap",
|
|
79
|
+
}, children: a.title }), _jsxs("div", { style: { fontSize: 11, color: "var(--bd-text-3)" }, children: [a.event_type, " \u00B7 ", a.source, " \u00B7 ", new Date(a.occurred_at).toLocaleTimeString("tr-TR", { hour: "2-digit", minute: "2-digit" })] })] })] }, a.id)))] }, day))) })] }));
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=ActivityFeed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActivityFeed.js","sourceRoot":"","sources":["../src/ActivityFeed.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAOpD,MAAM,WAAW,GAA2B;IAC1C,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;IACX,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,GAAG;IACX,SAAS,EAAE,GAAG;IACd,MAAM,EAAE,GAAG;IACX,OAAO,EAAE,GAAG;IACZ,gBAAgB,EAAE,GAAG;CACtB,CAAC;AAEF,SAAS,UAAU,CAAC,KAAsB;IACxC,MAAM,GAAG,GAAoC,EAAE,CAAC;IAChD,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;QACtB,MAAM,GAAG,GAAG,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACvC,CAAC,GAAG,CAAC,GAAG,MAAP,GAAG,CAAC,GAAG,IAAM,EAAE,EAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,QAAQ,CAAC,GAAW;IAC3B,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACpD,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,QAAU,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,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gDAClB,YAAY,EAAE,UAAU;gDACxB,UAAU,EAAE,QAAQ;6CACrB,YAEA,CAAC,CAAC,KAAK,GACJ,EACN,eAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,aACpD,CAAC,CAAC,UAAU,cAAK,CAAC,CAAC,MAAM,cAAK,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,kBAAkB,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,IACtH,IACF,KA7CD,CAAC,CAAC,EAAE,CA8CP,CACL,CAAC,KA/DK,GAAG,CAgEP,CACN,CAAC,GACC,IACG,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface BacklogRow {
|
|
2
|
+
id: number;
|
|
3
|
+
title: string;
|
|
4
|
+
priority: number;
|
|
5
|
+
status: string;
|
|
6
|
+
project?: string | null;
|
|
7
|
+
url?: string;
|
|
8
|
+
}
|
|
9
|
+
interface Props {
|
|
10
|
+
rows: BacklogRow[];
|
|
11
|
+
emptyCoach?: {
|
|
12
|
+
message: string;
|
|
13
|
+
actions?: Array<{
|
|
14
|
+
label: string;
|
|
15
|
+
href: string;
|
|
16
|
+
}>;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export declare function BacklogPanel({ rows, emptyCoach }: Props): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=BacklogPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BacklogPanel.d.ts","sourceRoot":"","sources":["../src/BacklogPanel.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,UAAU,KAAK;IACb,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,UAAU,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAC;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC;CACpF;AAUD,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,KAAK,2CA+EvD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { EmptyStateCoach } from "./EmptyStateCoach";
|
|
3
|
+
const PRIORITY_COLOR = {
|
|
4
|
+
1: "var(--bd-danger)",
|
|
5
|
+
2: "var(--bd-warn)",
|
|
6
|
+
3: "var(--bd-accent-2)",
|
|
7
|
+
4: "var(--bd-text-3)",
|
|
8
|
+
5: "var(--bd-text-3)",
|
|
9
|
+
};
|
|
10
|
+
export function BacklogPanel({ rows, emptyCoach }) {
|
|
11
|
+
if (!rows.length) {
|
|
12
|
+
return (_jsx(EmptyStateCoach, { area: "backlog", message: emptyCoach?.message ??
|
|
13
|
+
"Backlog temiz 🎉 Yeni hedef ekle veya bugünkü AI digest'i oku.", actions: emptyCoach?.actions }));
|
|
14
|
+
}
|
|
15
|
+
return (_jsxs("section", { className: "bd-surface", style: { padding: 0 }, children: [_jsxs("header", { style: {
|
|
16
|
+
padding: "12px 16px",
|
|
17
|
+
borderBottom: "1px solid var(--bd-border)",
|
|
18
|
+
fontSize: 12,
|
|
19
|
+
color: "var(--bd-text-3)",
|
|
20
|
+
letterSpacing: "0.05em",
|
|
21
|
+
textTransform: "uppercase",
|
|
22
|
+
display: "flex",
|
|
23
|
+
justifyContent: "space-between",
|
|
24
|
+
}, children: [_jsxs("span", { children: ["backlog \u00B7 top ", rows.length] }), _jsx("span", { style: { fontFamily: "var(--bd-font-mono)" }, children: "P1+" })] }), _jsx("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, children: rows.map((r) => (_jsxs("li", { style: {
|
|
25
|
+
display: "flex",
|
|
26
|
+
gap: 10,
|
|
27
|
+
padding: "10px 16px",
|
|
28
|
+
borderBottom: "1px solid var(--bd-border)",
|
|
29
|
+
alignItems: "center",
|
|
30
|
+
}, children: [_jsxs("span", { "aria-label": `Priority ${r.priority}`, style: {
|
|
31
|
+
width: 22,
|
|
32
|
+
fontSize: 11,
|
|
33
|
+
fontFamily: "var(--bd-font-mono)",
|
|
34
|
+
color: PRIORITY_COLOR[r.priority] ?? "var(--bd-text-3)",
|
|
35
|
+
textAlign: "center",
|
|
36
|
+
}, children: ["P", r.priority] }), _jsx("span", { style: { flex: 1, fontSize: 13 }, children: r.url ? (_jsx("a", { className: "bd-link", href: r.url, children: r.title })) : (r.title) }), r.project && (_jsx("span", { style: {
|
|
37
|
+
fontSize: 10,
|
|
38
|
+
color: "var(--bd-text-3)",
|
|
39
|
+
fontFamily: "var(--bd-font-mono)",
|
|
40
|
+
}, children: r.project }))] }, r.id))) })] }));
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=BacklogPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BacklogPanel.js","sourceRoot":"","sources":["../src/BacklogPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAgBpD,MAAM,cAAc,GAA2B;IAC7C,CAAC,EAAE,kBAAkB;IACrB,CAAC,EAAE,gBAAgB;IACnB,CAAC,EAAE,oBAAoB;IACvB,CAAC,EAAE,kBAAkB;IACrB,CAAC,EAAE,kBAAkB;CACtB,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,EAAE,IAAI,EAAE,UAAU,EAAS;IACtD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Q,IACP,EACP,eAAM,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,YACnC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CACP,YAAG,SAAS,EAAC,SAAS,EAAC,IAAI,EAAE,CAAC,CAAC,GAAG,YAC/B,CAAC,CAAC,KAAK,GACN,CACL,CAAC,CAAC,CAAC,CACF,CAAC,CAAC,KAAK,CACR,GACI,EACN,CAAC,CAAC,OAAO,IAAI,CACZ,eACE,KAAK,EAAE;gCACL,QAAQ,EAAE,EAAE;gCACZ,KAAK,EAAE,kBAAkB;gCACzB,UAAU,EAAE,qBAAqB;6BAClC,YAEA,CAAC,CAAC,OAAO,GACL,CACR,KAxCI,CAAC,CAAC,EAAE,CAyCN,CACN,CAAC,GACC,IACG,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface CalendarEvent {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
startsAt: string;
|
|
5
|
+
source?: "google" | "outlook" | string;
|
|
6
|
+
url?: string;
|
|
7
|
+
}
|
|
8
|
+
interface Props {
|
|
9
|
+
events: CalendarEvent[];
|
|
10
|
+
emptyCoach?: {
|
|
11
|
+
message: string;
|
|
12
|
+
actions?: Array<{
|
|
13
|
+
label: string;
|
|
14
|
+
href: string;
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export declare function CalendarPanel({ events, emptyCoach }: Props): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=CalendarPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalendarPanel.d.ts","sourceRoot":"","sources":["../src/CalendarPanel.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;IACvC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,UAAU,KAAK;IACb,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAC;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC;CACpF;AAOD,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,KAAK,2CAgF1D"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { EmptyStateCoach } from "./EmptyStateCoach";
|
|
3
|
+
const SOURCE_ICON = {
|
|
4
|
+
google: "G",
|
|
5
|
+
outlook: "O",
|
|
6
|
+
};
|
|
7
|
+
export function CalendarPanel({ events, emptyCoach }) {
|
|
8
|
+
if (!events.length) {
|
|
9
|
+
return (_jsx(EmptyStateCoach, { area: "takvim", message: emptyCoach?.message ?? "Önümüzdeki 24 saatte etkinlik yok.", actions: emptyCoach?.actions }));
|
|
10
|
+
}
|
|
11
|
+
return (_jsxs("section", { className: "bd-surface", style: { padding: 0 }, children: [_jsx("header", { style: {
|
|
12
|
+
padding: "12px 16px",
|
|
13
|
+
borderBottom: "1px solid var(--bd-border)",
|
|
14
|
+
fontSize: 12,
|
|
15
|
+
color: "var(--bd-text-3)",
|
|
16
|
+
letterSpacing: "0.05em",
|
|
17
|
+
textTransform: "uppercase",
|
|
18
|
+
}, children: "Takvim \u00B7 sonraki 24h" }), _jsx("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, children: events.map((e) => (_jsxs("li", { style: {
|
|
19
|
+
display: "flex",
|
|
20
|
+
gap: 10,
|
|
21
|
+
padding: "10px 16px",
|
|
22
|
+
borderBottom: "1px solid var(--bd-border)",
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
}, children: [_jsx("span", { style: {
|
|
25
|
+
fontFamily: "var(--bd-font-mono)",
|
|
26
|
+
fontSize: 12,
|
|
27
|
+
color: "var(--bd-accent-2)",
|
|
28
|
+
width: 50,
|
|
29
|
+
}, children: new Date(e.startsAt).toLocaleTimeString("tr-TR", {
|
|
30
|
+
hour: "2-digit",
|
|
31
|
+
minute: "2-digit",
|
|
32
|
+
}) }), _jsx("span", { style: { flex: 1, fontSize: 13 }, children: e.url ? (_jsx("a", { className: "bd-link", href: e.url, target: "_blank", rel: "noreferrer", children: e.title })) : (e.title) }), e.source && (_jsx("span", { style: {
|
|
33
|
+
width: 18,
|
|
34
|
+
height: 18,
|
|
35
|
+
borderRadius: 999,
|
|
36
|
+
background: "var(--bd-surface-2)",
|
|
37
|
+
color: "var(--bd-text-3)",
|
|
38
|
+
fontSize: 10,
|
|
39
|
+
display: "grid",
|
|
40
|
+
placeItems: "center",
|
|
41
|
+
fontFamily: "var(--bd-font-mono)",
|
|
42
|
+
}, children: SOURCE_ICON[e.source] ?? e.source.slice(0, 1).toUpperCase() }))] }, e.id))) })] }));
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=CalendarPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalendarPanel.js","sourceRoot":"","sources":["../src/CalendarPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAepD,MAAM,WAAW,GAA2B;IAC1C,MAAM,EAAE,GAAG;IACX,OAAO,EAAE,GAAG;CACb,CAAC;AAEF,MAAM,UAAU,aAAa,CAAC,EAAE,MAAM,EAAE,UAAU,EAAS;IACzD,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACnB,OAAO,CACL,KAAC,eAAe,IACd,IAAI,EAAC,QAAQ,EACb,OA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Y,YACjE,CAAC,CAAC,KAAK,GACN,CACL,CAAC,CAAC,CAAC,CACF,CAAC,CAAC,KAAK,CACR,GACI,EACN,CAAC,CAAC,MAAM,IAAI,CACX,eACE,KAAK,EAAE;gCACL,KAAK,EAAE,EAAE;gCACT,MAAM,EAAE,EAAE;gCACV,YAAY,EAAE,GAAG;gCACjB,UAAU,EAAE,qBAAqB;gCACjC,KAAK,EAAE,kBAAkB;gCACzB,QAAQ,EAAE,EAAE;gCACZ,OAAO,EAAE,MAAM;gCACf,UAAU,EAAE,QAAQ;gCACpB,UAAU,EAAE,qBAAqB;6BAClC,YAEA,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,GACvD,CACR,KA/CI,CAAC,CAAC,EAAE,CAgDN,CACN,CAAC,GACC,IACG,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface Highlight {
|
|
2
|
+
label: string;
|
|
3
|
+
delta?: number;
|
|
4
|
+
status?: "up" | "down" | "flat" | "waiting";
|
|
5
|
+
}
|
|
6
|
+
interface Props {
|
|
7
|
+
greeting?: string;
|
|
8
|
+
digestText: string;
|
|
9
|
+
highlights?: Highlight[];
|
|
10
|
+
generatedAt?: string | null;
|
|
11
|
+
isFallback?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function DigestStrip({ greeting, digestText, highlights, generatedAt, isFallback, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=DigestStrip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DigestStrip.d.ts","sourceRoot":"","sources":["../src/DigestStrip.tsx"],"names":[],"mappings":"AAAA,UAAU,SAAS;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CAC7C;AAED,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAcD,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,UAAU,EACV,UAAe,EACf,WAAW,EACX,UAAU,GACX,EAAE,KAAK,2CAoGP"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
function defaultGreeting(d = new Date()) {
|
|
3
|
+
const h = d.getHours();
|
|
4
|
+
if (h < 11)
|
|
5
|
+
return "Günaydın";
|
|
6
|
+
if (h < 17)
|
|
7
|
+
return "İyi öğleden sonralar";
|
|
8
|
+
return "İyi akşamlar";
|
|
9
|
+
}
|
|
10
|
+
function deltaColor(delta) {
|
|
11
|
+
if (delta === undefined || delta === 0)
|
|
12
|
+
return "var(--bd-text-2)";
|
|
13
|
+
return delta > 0 ? "var(--bd-success)" : "var(--bd-danger)";
|
|
14
|
+
}
|
|
15
|
+
export function DigestStrip({ greeting, digestText, highlights = [], generatedAt, isFallback, }) {
|
|
16
|
+
const hello = greeting ?? defaultGreeting();
|
|
17
|
+
return (_jsxs("section", { className: "bd-surface", style: {
|
|
18
|
+
padding: "20px 22px",
|
|
19
|
+
marginBottom: 20,
|
|
20
|
+
background: isFallback
|
|
21
|
+
? "var(--bd-surface)"
|
|
22
|
+
: "linear-gradient(135deg, var(--bd-surface) 0%, var(--bd-accent-bg) 130%)",
|
|
23
|
+
}, children: [_jsxs("div", { style: {
|
|
24
|
+
display: "flex",
|
|
25
|
+
justifyContent: "space-between",
|
|
26
|
+
alignItems: "flex-start",
|
|
27
|
+
gap: 12,
|
|
28
|
+
marginBottom: 8,
|
|
29
|
+
}, children: [_jsxs("div", { children: [_jsx("p", { style: {
|
|
30
|
+
fontSize: 11,
|
|
31
|
+
letterSpacing: "0.2em",
|
|
32
|
+
textTransform: "uppercase",
|
|
33
|
+
color: "var(--bd-text-3)",
|
|
34
|
+
margin: 0,
|
|
35
|
+
marginBottom: 4,
|
|
36
|
+
}, children: "g\u00FCn\u00FCn \u00F6zeti" }), _jsxs("h2", { style: {
|
|
37
|
+
fontSize: 20,
|
|
38
|
+
margin: 0,
|
|
39
|
+
fontWeight: 600,
|
|
40
|
+
letterSpacing: "-0.01em",
|
|
41
|
+
}, children: [hello, " \uD83D\uDC4B"] })] }), generatedAt && (_jsx("span", { style: { fontSize: 11, color: "var(--bd-text-3)", fontFamily: "var(--bd-font-mono)" }, children: new Date(generatedAt).toLocaleString("tr-TR", {
|
|
42
|
+
hour: "2-digit",
|
|
43
|
+
minute: "2-digit",
|
|
44
|
+
day: "2-digit",
|
|
45
|
+
month: "2-digit",
|
|
46
|
+
}) }))] }), _jsx("p", { style: {
|
|
47
|
+
fontSize: 15,
|
|
48
|
+
lineHeight: 1.55,
|
|
49
|
+
color: isFallback ? "var(--bd-text-2)" : "var(--bd-text)",
|
|
50
|
+
margin: 0,
|
|
51
|
+
fontStyle: isFallback ? "italic" : "normal",
|
|
52
|
+
}, children: digestText }), highlights.length > 0 && (_jsx("div", { style: {
|
|
53
|
+
marginTop: 14,
|
|
54
|
+
display: "flex",
|
|
55
|
+
flexWrap: "wrap",
|
|
56
|
+
gap: 8,
|
|
57
|
+
}, children: highlights.map((h) => (_jsxs("span", { className: "bd-chip", style: {
|
|
58
|
+
background: "transparent",
|
|
59
|
+
border: "1px solid var(--bd-border)",
|
|
60
|
+
color: "var(--bd-text-2)",
|
|
61
|
+
}, children: [_jsx("span", { children: h.label }), h.delta !== undefined && (_jsxs("strong", { style: { color: deltaColor(h.delta) }, children: [h.delta > 0 ? "+" : "", h.delta, "%"] }))] }, h.label))) }))] }));
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=DigestStrip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DigestStrip.js","sourceRoot":"","sources":["../src/DigestStrip.tsx"],"names":[],"mappings":";AAcA,SAAS,eAAe,CAAC,CAAC,GAAG,IAAI,IAAI,EAAE;IACrC,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;IACvB,IAAI,CAAC,GAAG,EAAE;QAAE,OAAO,UAAU,CAAC;IAC9B,IAAI,CAAC,GAAG,EAAE;QAAE,OAAO,sBAAsB,CAAC;IAC1C,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,kBAAkB,CAAC;IAClE,OAAO,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,kBAAkB,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,EAC1B,QAAQ,EACR,UAAU,EACV,UAAU,GAAG,EAAE,EACf,WAAW,EACX,UAAU,GACJ;IACN,MAAM,KAAK,GAAG,QAAQ,IAAI,eAAe,EAAE,CAAC;IAC5C,OAAO,CACL,mBACE,SAAS,EAAC,YAAY,EACtB,KAAK,EAAE;YACL,OAAO,EAAE,WAAW;YACpB,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,UAAU;gBACpB,CAAC,CAAC,mBAAmB;gBACrB,CAAC,CAAC,yEAAyE;SAC9E,aAED,eACE,KAAK,EAAE;oBACL,OAAO,EAAE,MAAM;oBACf,cAAc,EAAE,eAAe;oBAC/B,UAAU,EAAE,YAAY;oBACxB,GAAG,EAAE,EAAE;oBACP,YAAY,EAAE,CAAC;iBAChB,aAED,0BACE,YACE,KAAK,EAAE;oCACL,QAAQ,EAAE,EAAE;oCACZ,aAAa,EAAE,OAA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AED,yBAAO,CAAC,CAAC,KAAK,GAAQ,EACrB,CAAC,CAAC,KAAK,KAAK,SAAS,IAAI,CACxB,kBAAQ,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,aAC1C,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EACtB,CAAC,CAAC,KAAK,SACD,CACV,KAdI,CAAC,CAAC,KAAK,CAeP,CACR,CAAC,GACE,CACP,IACO,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
area?: string;
|
|
3
|
+
message: string;
|
|
4
|
+
actions?: Array<{
|
|
5
|
+
label: string;
|
|
6
|
+
href: string;
|
|
7
|
+
}>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* D-011: every section must surface a coach message rather than render
|
|
11
|
+
* blank. menu.json defines the default text per route; pages may pass
|
|
12
|
+
* a section-specific override.
|
|
13
|
+
*/
|
|
14
|
+
export declare function EmptyStateCoach({ area, message, actions }: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=EmptyStateCoach.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyStateCoach.d.ts","sourceRoot":"","sources":["../src/EmptyStateCoach.tsx"],"names":[],"mappings":"AAEA,UAAU,KAAK;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,KAAK,2CA0DhE"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Link from "next/link";
|
|
3
|
+
/**
|
|
4
|
+
* D-011: every section must surface a coach message rather than render
|
|
5
|
+
* blank. menu.json defines the default text per route; pages may pass
|
|
6
|
+
* a section-specific override.
|
|
7
|
+
*/
|
|
8
|
+
export function EmptyStateCoach({ area, message, actions }) {
|
|
9
|
+
return (_jsxs("div", { className: "bd-surface", style: {
|
|
10
|
+
padding: "20px 22px",
|
|
11
|
+
textAlign: "center",
|
|
12
|
+
background: "var(--bd-surface)",
|
|
13
|
+
borderStyle: "dashed",
|
|
14
|
+
}, children: [area && (_jsx("p", { style: {
|
|
15
|
+
fontSize: 10,
|
|
16
|
+
color: "var(--bd-text-3)",
|
|
17
|
+
letterSpacing: "0.2em",
|
|
18
|
+
textTransform: "uppercase",
|
|
19
|
+
margin: 0,
|
|
20
|
+
marginBottom: 8,
|
|
21
|
+
fontFamily: "var(--bd-font-mono)",
|
|
22
|
+
}, children: area })), _jsx("p", { style: { fontSize: 14, color: "var(--bd-text-2)", margin: 0 }, children: message }), actions && actions.length > 0 && (_jsx("div", { style: {
|
|
23
|
+
marginTop: 12,
|
|
24
|
+
display: "flex",
|
|
25
|
+
justifyContent: "center",
|
|
26
|
+
gap: 8,
|
|
27
|
+
flexWrap: "wrap",
|
|
28
|
+
}, children: actions.map((a) => (_jsx(Link, { href: a.href, style: {
|
|
29
|
+
fontSize: 12,
|
|
30
|
+
padding: "6px 12px",
|
|
31
|
+
background: "var(--bd-accent-bg)",
|
|
32
|
+
color: "var(--bd-accent-2)",
|
|
33
|
+
border: "1px solid var(--bd-accent-bg-strong)",
|
|
34
|
+
borderRadius: 999,
|
|
35
|
+
textDecoration: "none",
|
|
36
|
+
}, children: a.label }, a.href))) }))] }));
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=EmptyStateCoach.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"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E,GAAG;wBACjB,cAAc,EAAE,MAAM;qBACvB,YAEA,CAAC,CAAC,KAAK,IAZH,CAAC,CAAC,IAAI,CAaN,CACR,CAAC,GACE,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface KpiCard {
|
|
2
|
+
label: string;
|
|
3
|
+
value: number | string;
|
|
4
|
+
delta?: number | null;
|
|
5
|
+
unit?: string;
|
|
6
|
+
sparkline?: number[];
|
|
7
|
+
}
|
|
8
|
+
interface Props {
|
|
9
|
+
cards: KpiCard[];
|
|
10
|
+
}
|
|
11
|
+
export declare function KpiHero({ cards }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=KpiHero.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KpiHero.d.ts","sourceRoot":"","sources":["../src/KpiHero.tsx"],"names":[],"mappings":"AAAA,UAAU,OAAO;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,UAAU,KAAK;IACb,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB;AAkDD,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,2CAiEvC"}
|
package/dist/KpiHero.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/** Render a sparkline as an SVG polyline (D-023 default: server SVG, no client JS). */
|
|
3
|
+
function Sparkline({ data, width = 80, height = 24 }) {
|
|
4
|
+
if (!data.length)
|
|
5
|
+
return null;
|
|
6
|
+
const max = Math.max(...data, 1);
|
|
7
|
+
const min = Math.min(...data, 0);
|
|
8
|
+
const range = max - min || 1;
|
|
9
|
+
const step = data.length > 1 ? width / (data.length - 1) : 0;
|
|
10
|
+
const pts = data
|
|
11
|
+
.map((v, i) => {
|
|
12
|
+
const x = i * step;
|
|
13
|
+
const y = height - ((v - min) / range) * height;
|
|
14
|
+
return `${x.toFixed(1)},${y.toFixed(1)}`;
|
|
15
|
+
})
|
|
16
|
+
.join(" ");
|
|
17
|
+
return (_jsx("svg", { width: width, height: height, "aria-hidden": true, style: { display: "block" }, children: _jsx("polyline", { fill: "none", stroke: "var(--bd-accent)", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", points: pts }) }));
|
|
18
|
+
}
|
|
19
|
+
function deltaPill(delta) {
|
|
20
|
+
if (delta === undefined || delta === null)
|
|
21
|
+
return null;
|
|
22
|
+
const positive = delta >= 0;
|
|
23
|
+
return (_jsxs("span", { style: {
|
|
24
|
+
fontSize: 11,
|
|
25
|
+
padding: "1px 6px",
|
|
26
|
+
borderRadius: 999,
|
|
27
|
+
background: positive ? "rgba(34,197,94,0.12)" : "rgba(239,68,68,0.12)",
|
|
28
|
+
color: positive ? "var(--bd-success)" : "var(--bd-danger)",
|
|
29
|
+
fontFamily: "var(--bd-font-mono)",
|
|
30
|
+
}, children: [positive ? "+" : "", delta, "%"] }));
|
|
31
|
+
}
|
|
32
|
+
export function KpiHero({ cards }) {
|
|
33
|
+
return (_jsx("section", { style: {
|
|
34
|
+
display: "grid",
|
|
35
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(200px, 1fr))",
|
|
36
|
+
gap: 12,
|
|
37
|
+
marginBottom: 20,
|
|
38
|
+
}, children: cards.map((c) => (_jsxs("div", { className: "bd-surface", style: { padding: "14px 16px" }, children: [_jsxs("div", { style: {
|
|
39
|
+
display: "flex",
|
|
40
|
+
justifyContent: "space-between",
|
|
41
|
+
alignItems: "center",
|
|
42
|
+
marginBottom: 6,
|
|
43
|
+
}, children: [_jsx("span", { style: {
|
|
44
|
+
fontSize: 11,
|
|
45
|
+
letterSpacing: "0.05em",
|
|
46
|
+
textTransform: "uppercase",
|
|
47
|
+
color: "var(--bd-text-3)",
|
|
48
|
+
}, children: c.label }), deltaPill(c.delta)] }), _jsxs("div", { style: {
|
|
49
|
+
display: "flex",
|
|
50
|
+
alignItems: "baseline",
|
|
51
|
+
justifyContent: "space-between",
|
|
52
|
+
gap: 6,
|
|
53
|
+
}, children: [_jsxs("span", { style: {
|
|
54
|
+
fontSize: 26,
|
|
55
|
+
fontWeight: 600,
|
|
56
|
+
fontVariantNumeric: "tabular-nums",
|
|
57
|
+
letterSpacing: "-0.02em",
|
|
58
|
+
}, children: [typeof c.value === "number" ? c.value.toLocaleString("tr-TR") : c.value, c.unit && (_jsx("span", { style: { fontSize: 13, color: "var(--bd-text-3)", marginLeft: 4 }, children: c.unit }))] }), c.sparkline && _jsx(Sparkline, { data: c.sparkline })] })] }, c.label))) }));
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=KpiHero.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KpiHero.js","sourceRoot":"","sources":["../src/KpiHero.tsx"],"names":[],"mappings":";AAYA,uFAAuF;AACvF,SAAS,SAAS,CAAC,EAAE,IAAI,EAAE,KAAK,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE,EAAuD;IACvG,IAAI,CAAC,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAC9B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC;IACjC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC;IACjC,MAAM,KAAK,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG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EAAE,kBAAkB,EAAE,UAAU,EAAE,CAAC,EAAE,YACpE,CAAC,CAAC,IAAI,GACF,CACR,IACI,EACN,CAAC,CAAC,SAAS,IAAI,KAAC,SAAS,IAAC,IAAI,EAAE,CAAC,CAAC,SAAS,GAAI,IAC5C,KAhDD,CAAC,CAAC,KAAK,CAiDR,CACP,CAAC,GACM,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { MenuConfig } from "./types";
|
|
3
|
+
interface Props {
|
|
4
|
+
menu: MenuConfig;
|
|
5
|
+
pathname: string;
|
|
6
|
+
breadcrumb: ReactNode;
|
|
7
|
+
search?: ReactNode;
|
|
8
|
+
notificationsBadge?: number;
|
|
9
|
+
calendarBadge?: number;
|
|
10
|
+
userLabel?: string;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Owner shell layout — sidebar + topbar + content area.
|
|
15
|
+
* Pure server component for Faz 2 (no mobile drawer yet — sidebar collapses
|
|
16
|
+
* to icon-only on narrow widths via CSS only). Mobile drawer toggle is
|
|
17
|
+
* planned for Faz 2.5 as a client wrapper.
|
|
18
|
+
*/
|
|
19
|
+
export declare function OwnerLayout({ menu, pathname, breadcrumb, search, notificationsBadge, calendarBadge, userLabel, children, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=OwnerLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OwnerLayout.d.ts","sourceRoot":"","sources":["../src/OwnerLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,UAAU,KAAK;IACb,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,SAAS,CAAC;IACtB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,MAAM,EACN,kBAAkB,EAClB,aAAa,EACb,SAAS,EACT,QAAQ,GACT,EAAE,KAAK,2CA8CP"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Sidebar } from "./Sidebar";
|
|
3
|
+
import { Topbar } from "./Topbar";
|
|
4
|
+
/**
|
|
5
|
+
* Owner shell layout — sidebar + topbar + content area.
|
|
6
|
+
* Pure server component for Faz 2 (no mobile drawer yet — sidebar collapses
|
|
7
|
+
* to icon-only on narrow widths via CSS only). Mobile drawer toggle is
|
|
8
|
+
* planned for Faz 2.5 as a client wrapper.
|
|
9
|
+
*/
|
|
10
|
+
export function OwnerLayout({ menu, pathname, breadcrumb, search, notificationsBadge, calendarBadge, userLabel, children, }) {
|
|
11
|
+
return (_jsxs("div", { style: {
|
|
12
|
+
display: "grid",
|
|
13
|
+
gridTemplateColumns: "var(--bd-sidebar-w) 1fr",
|
|
14
|
+
minHeight: "100vh",
|
|
15
|
+
background: "var(--bd-bg)",
|
|
16
|
+
color: "var(--bd-text)",
|
|
17
|
+
fontFamily: "var(--bd-font-display)",
|
|
18
|
+
}, "data-owner-shell": true, children: [_jsx(Sidebar, { menu: menu, pathname: pathname }), _jsxs("div", { style: { display: "flex", flexDirection: "column", minWidth: 0 }, children: [_jsx(Topbar, { breadcrumb: breadcrumb, search: search, notificationsBadge: notificationsBadge, calendarBadge: calendarBadge, userLabel: userLabel }), _jsx("main", { style: { padding: "24px", flex: 1, minWidth: 0 }, children: children })] }), _jsx("style", { children: `
|
|
19
|
+
@media (max-width: 768px) {
|
|
20
|
+
[data-owner-shell] {
|
|
21
|
+
grid-template-columns: 1fr !important;
|
|
22
|
+
}
|
|
23
|
+
[data-owner-shell] > aside {
|
|
24
|
+
position: fixed !important;
|
|
25
|
+
inset: auto 0 0 0 !important;
|
|
26
|
+
width: 100% !important;
|
|
27
|
+
height: auto !important;
|
|
28
|
+
max-height: 56vh;
|
|
29
|
+
border-right: 0 !important;
|
|
30
|
+
border-top: 1px solid var(--bd-border) !important;
|
|
31
|
+
z-index: 30;
|
|
32
|
+
}
|
|
33
|
+
[data-owner-shell] > div > main {
|
|
34
|
+
padding-bottom: 200px !important;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
` })] }));
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=OwnerLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OwnerLayout.js","sourceRoot":"","sources":["../src/OwnerLayout.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAclC;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,MAAM,EACN,kBAAkB,EAClB,aAAa,EACb,SAAS,EACT,QAAQ,GACF;IACN,OAAO,CACL,eACE,KAAK,EAAE;YACL,OAAO,EAAE,MAAM;YACf,mBAAmB,EAAE,yBAAyB;YAC9C,SAAS,EAAE,OAAO;YAClB,UAAU,EAAE,cAAc;YAC1B,KAAK,EAAE,gBAAgB;YACvB,UAAU,EAAE,wBAAwB;SACrC,uCAGD,KAAC,OAAO,IAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,GAAI,EAC3C,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,EAAE,aACnE,KAAC,MAAM,IACL,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,kBAAkB,EACtC,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,SAAS,GACpB,EACF,eAAM,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,YAAG,QAAQ,GAAQ,IACrE,EACN,0BAAQ;;;;;;;;;;;;;;;;;;;OAmBP,GAAS,IACN,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
title: string;
|
|
3
|
+
subtitle?: string | null;
|
|
4
|
+
url?: string | null;
|
|
5
|
+
coverUrl?: string | null;
|
|
6
|
+
category?: string | null;
|
|
7
|
+
status?: "active" | "archived" | "draft" | "broken";
|
|
8
|
+
source?: string;
|
|
9
|
+
slug?: string | null;
|
|
10
|
+
detailHref?: string | null;
|
|
11
|
+
}
|
|
12
|
+
export declare function ProductCard({ title, subtitle, url, coverUrl, category, status, source, detailHref, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=ProductCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductCard.d.ts","sourceRoot":"","sources":["../src/ProductCard.tsx"],"names":[],"mappings":"AAAA,UAAU,KAAK;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AASD,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,QAAQ,EACR,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,MAAiB,EACjB,MAAM,EACN,UAAU,GACX,EAAE,KAAK,2CA4GP"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const STATUS_COLOR = {
|
|
3
|
+
active: "var(--bd-success)",
|
|
4
|
+
draft: "var(--bd-warn)",
|
|
5
|
+
broken: "var(--bd-danger)",
|
|
6
|
+
archived: "var(--bd-text-3)",
|
|
7
|
+
};
|
|
8
|
+
export function ProductCard({ title, subtitle, url, coverUrl, category, status = "active", source, detailHref, }) {
|
|
9
|
+
const href = detailHref ?? url ?? "#";
|
|
10
|
+
return (_jsxs("a", { href: href, target: detailHref ? undefined : url ? "_blank" : undefined, rel: detailHref ? undefined : "noreferrer", className: "bd-surface", style: {
|
|
11
|
+
display: "flex",
|
|
12
|
+
flexDirection: "column",
|
|
13
|
+
textDecoration: "none",
|
|
14
|
+
color: "var(--bd-text)",
|
|
15
|
+
overflow: "hidden",
|
|
16
|
+
transition: "border-color 120ms",
|
|
17
|
+
}, children: [_jsxs("div", { "aria-hidden": true, style: {
|
|
18
|
+
aspectRatio: "16/9",
|
|
19
|
+
background: coverUrl
|
|
20
|
+
? `center/cover url(${coverUrl})`
|
|
21
|
+
: "linear-gradient(135deg, var(--bd-accent-bg) 0%, var(--bd-surface-2) 100%)",
|
|
22
|
+
borderBottom: "1px solid var(--bd-border)",
|
|
23
|
+
position: "relative",
|
|
24
|
+
}, children: [!coverUrl && (_jsx("span", { style: {
|
|
25
|
+
position: "absolute",
|
|
26
|
+
inset: 0,
|
|
27
|
+
display: "grid",
|
|
28
|
+
placeItems: "center",
|
|
29
|
+
fontSize: 28,
|
|
30
|
+
color: "var(--bd-accent-2)",
|
|
31
|
+
opacity: 0.5,
|
|
32
|
+
fontFamily: "var(--bd-font-mono)",
|
|
33
|
+
}, children: title.slice(0, 2).toUpperCase() })), _jsx("span", { "aria-hidden": true, style: {
|
|
34
|
+
position: "absolute",
|
|
35
|
+
top: 8,
|
|
36
|
+
right: 8,
|
|
37
|
+
width: 6,
|
|
38
|
+
height: 6,
|
|
39
|
+
borderRadius: 999,
|
|
40
|
+
background: STATUS_COLOR[status],
|
|
41
|
+
boxShadow: `0 0 6px ${STATUS_COLOR[status]}`,
|
|
42
|
+
} })] }), _jsxs("div", { style: { padding: "12px 14px", display: "flex", flexDirection: "column", gap: 4 }, children: [_jsxs("div", { style: { display: "flex", justifyContent: "space-between", gap: 6 }, children: [_jsx("strong", { style: {
|
|
43
|
+
fontSize: 14,
|
|
44
|
+
fontWeight: 600,
|
|
45
|
+
overflow: "hidden",
|
|
46
|
+
textOverflow: "ellipsis",
|
|
47
|
+
whiteSpace: "nowrap",
|
|
48
|
+
flex: 1,
|
|
49
|
+
}, children: title }), url && !detailHref && (_jsx("span", { "aria-hidden": true, style: { fontSize: 12, color: "var(--bd-text-3)" }, children: "\u2197" }))] }), subtitle && (_jsx("span", { style: {
|
|
50
|
+
fontSize: 12,
|
|
51
|
+
color: "var(--bd-text-2)",
|
|
52
|
+
overflow: "hidden",
|
|
53
|
+
textOverflow: "ellipsis",
|
|
54
|
+
whiteSpace: "nowrap",
|
|
55
|
+
}, children: subtitle })), _jsxs("div", { style: { display: "flex", gap: 4, alignItems: "center", marginTop: 4 }, children: [category && _jsx("span", { className: "bd-chip", children: category }), source && (_jsx("span", { style: {
|
|
56
|
+
fontSize: 10,
|
|
57
|
+
color: "var(--bd-text-3)",
|
|
58
|
+
fontFamily: "var(--bd-font-mono)",
|
|
59
|
+
}, children: source }))] })] })] }));
|
|
60
|
+
}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AAY,EAAE,UAAU;4BACxB,UAAU,EAAE,QAAQ;yBACrB,YAEA,QAAQ,GACJ,CACR,EACD,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE,aACxE,QAAQ,IAAI,eAAM,SAAS,EAAC,SAAS,YAAE,QAAQ,GAAQ,EACvD,MAAM,IAAI,CACT,eACE,KAAK,EAAE;oCACL,QAAQ,EAAE,EAAE;oCACZ,KAAK,EAAE,kBAAkB;oCACzB,UAAU,EAAE,qBAAqB;iCAClC,YAEA,MAAM,GACF,CACR,IACG,IACF,IACJ,CACL,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BrainItem } from "@skilldrunk/brain-client";
|
|
2
|
+
interface Props {
|
|
3
|
+
items: BrainItem[];
|
|
4
|
+
detailHrefPrefix?: string;
|
|
5
|
+
emptyCoach?: {
|
|
6
|
+
message: string;
|
|
7
|
+
actions?: Array<{
|
|
8
|
+
label: string;
|
|
9
|
+
href: string;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
filters?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Pure SSR grid for the shuffle catalog (D-004 server-side random). Each
|
|
16
|
+
* server render returns a different order; the page route must set
|
|
17
|
+
* Cache-Control: no-store. No client JS — Faz 2.5 brings filter chips +
|
|
18
|
+
* infinite scroll as a client wrapper around this primitive.
|
|
19
|
+
*/
|
|
20
|
+
export declare function ShuffleGrid({ items, detailHrefPrefix, emptyCoach, filters }: Props): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=ShuffleGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShuffleGrid.d.ts","sourceRoot":"","sources":["../src/ShuffleGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAI1D,UAAU,KAAK;IACb,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAC;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC;IACnF,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,KAAK,2CA6ClF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ProductCard } from "./ProductCard";
|
|
3
|
+
import { EmptyStateCoach } from "./EmptyStateCoach";
|
|
4
|
+
/**
|
|
5
|
+
* Pure SSR grid for the shuffle catalog (D-004 server-side random). Each
|
|
6
|
+
* server render returns a different order; the page route must set
|
|
7
|
+
* Cache-Control: no-store. No client JS — Faz 2.5 brings filter chips +
|
|
8
|
+
* infinite scroll as a client wrapper around this primitive.
|
|
9
|
+
*/
|
|
10
|
+
export function ShuffleGrid({ items, detailHrefPrefix, emptyCoach, filters }) {
|
|
11
|
+
return (_jsxs("section", { children: [filters && _jsx("div", { style: { marginBottom: 14 }, children: filters }), items.length === 0 ? (_jsx(EmptyStateCoach, { area: "catalog", message: emptyCoach?.message ??
|
|
12
|
+
"Katalog henüz boş. /catalog/add ile manuel ekle veya ingestion script'lerini çalıştır.", actions: emptyCoach?.actions ?? [{ label: "Manuel ekle", href: "/catalog/add" }] })) : (_jsx("div", { style: {
|
|
13
|
+
display: "grid",
|
|
14
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(240px, 1fr))",
|
|
15
|
+
gap: 14,
|
|
16
|
+
}, children: items.map((i) => (_jsx(ProductCard, { title: i.title, subtitle: i.subtitle, url: i.url, coverUrl: i.cover_url, category: i.category, status: i.status, source: i.source, slug: i.slug, detailHref: detailHrefPrefix && i.slug
|
|
17
|
+
? `${detailHrefPrefix}/${i.slug}`
|
|
18
|
+
: null }, i.id))) }))] }));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=ShuffleGrid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShuffleGrid.js","sourceRoot":"","sources":["../src/ShuffleGrid.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AASpD;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,OAAO,EAAS;IACjF,OAAO,CACL,8BACG,OAAO,IAAI,cAAK,KAAK,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,YAAG,OAAO,GAAO,EAC5D,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACpB,KAAC,eAAe,IACd,IAAI,EAAC,SAAS,EACd,OAAO,EACL,UAAU,EAAE,OAAO;oBACnB,wFAAwF,EAE1F,OAAO,EACL,UAAU,EAAE,OAAO,IAAI,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,GAEzE,CACH,CAAC,CAAC,CAAC,CACF,cACE,KAAK,EAAE;oBACL,OAAO,EAAE,MAAM;oBACf,mBAAmB,EAAE,uCAAuC;oBAC5D,GAAG,EAAE,EAAE;iBACR,YAEA,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAChB,KAAC,WAAW,IAEV,KAAK,EAAE,CAAC,CAAC,KAAK,EACd,QAAQ,EAAE,CAAC,CAAC,QAAQ,EACpB,GAAG,EAAE,CAAC,CAAC,GAAG,EACV,QAAQ,EAAE,CAAC,CAAC,SAAS,EACrB,QAAQ,EAAE,CAAC,CAAC,QAAQ,EACpB,MAAM,EAAE,CAAC,CAAC,MAAM,EAChB,MAAM,EAAE,CAAC,CAAC,MAAM,EAChB,IAAI,EAAE,CAAC,CAAC,IAAI,EACZ,UAAU,EACR,gBAAgB,IAAI,CAAC,CAAC,IAAI;wBACxB,CAAC,CAAC,GAAG,gBAAgB,IAAI,CAAC,CAAC,IAAI,EAAE;wBACjC,CAAC,CAAC,IAAI,IAZL,CAAC,CAAC,EAAE,CAcT,CACH,CAAC,GACE,CACP,IACO,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MenuConfig } from "./types";
|
|
2
|
+
interface Props {
|
|
3
|
+
menu: MenuConfig;
|
|
4
|
+
pathname: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Server-rendered sidebar. Active state derived from pathname server-side
|
|
8
|
+
* so first paint reflects the current route without client JS.
|
|
9
|
+
* Mobile drawer toggle lives in <OwnerLayout /> (client wrapper).
|
|
10
|
+
*/
|
|
11
|
+
export declare function Sidebar({ menu, pathname }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=Sidebar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../src/Sidebar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,UAAU,KAAK;IACb,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,KAAK,2CAiJhD"}
|
package/dist/Sidebar.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Link from "next/link";
|
|
3
|
+
/**
|
|
4
|
+
* Server-rendered sidebar. Active state derived from pathname server-side
|
|
5
|
+
* so first paint reflects the current route without client JS.
|
|
6
|
+
* Mobile drawer toggle lives in <OwnerLayout /> (client wrapper).
|
|
7
|
+
*/
|
|
8
|
+
export function Sidebar({ menu, pathname }) {
|
|
9
|
+
return (_jsxs("aside", { "aria-label": "Owner navigation", style: {
|
|
10
|
+
width: "var(--bd-sidebar-w)",
|
|
11
|
+
background: "var(--bd-bg-2)",
|
|
12
|
+
borderRight: "1px solid var(--bd-border)",
|
|
13
|
+
height: "100vh",
|
|
14
|
+
position: "sticky",
|
|
15
|
+
top: 0,
|
|
16
|
+
overflowY: "auto",
|
|
17
|
+
display: "flex",
|
|
18
|
+
flexDirection: "column",
|
|
19
|
+
}, children: [_jsx("div", { style: {
|
|
20
|
+
padding: "16px 18px",
|
|
21
|
+
borderBottom: "1px solid var(--bd-border)",
|
|
22
|
+
}, children: _jsxs(Link, { href: menu.brand.href, style: {
|
|
23
|
+
color: "var(--bd-text)",
|
|
24
|
+
fontFamily: "var(--bd-font-display)",
|
|
25
|
+
fontWeight: 600,
|
|
26
|
+
letterSpacing: "-0.02em",
|
|
27
|
+
fontSize: 17,
|
|
28
|
+
textDecoration: "none",
|
|
29
|
+
display: "flex",
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
gap: 8,
|
|
32
|
+
}, children: [_jsx("span", { "aria-hidden": true, style: {
|
|
33
|
+
width: 8,
|
|
34
|
+
height: 8,
|
|
35
|
+
borderRadius: 999,
|
|
36
|
+
background: "var(--bd-accent)",
|
|
37
|
+
boxShadow: "0 0 10px var(--bd-accent)",
|
|
38
|
+
} }), menu.brand.label] }) }), _jsx("nav", { style: { flex: 1, padding: "10px 8px" }, children: menu.items.map((item) => {
|
|
39
|
+
const isActive = pathname === item.href ||
|
|
40
|
+
(item.href !== "/" && pathname.startsWith(item.href));
|
|
41
|
+
return (_jsxs("div", { style: { marginBottom: 2 }, children: [_jsxs(Link, { href: item.href, style: {
|
|
42
|
+
display: "flex",
|
|
43
|
+
alignItems: "center",
|
|
44
|
+
gap: 10,
|
|
45
|
+
padding: "8px 12px",
|
|
46
|
+
borderRadius: "var(--bd-radius-sm)",
|
|
47
|
+
color: isActive ? "var(--bd-text)" : "var(--bd-text-2)",
|
|
48
|
+
background: isActive ? "var(--bd-accent-bg)" : "transparent",
|
|
49
|
+
borderLeft: isActive
|
|
50
|
+
? "2px solid var(--bd-accent)"
|
|
51
|
+
: "2px solid transparent",
|
|
52
|
+
fontSize: 14,
|
|
53
|
+
textDecoration: "none",
|
|
54
|
+
marginLeft: -2,
|
|
55
|
+
}, children: [item.icon && (_jsx("span", { "aria-hidden": true, style: { width: 18 }, children: item.icon })), _jsx("span", { style: { flex: 1 }, children: item.label }), item.badge !== undefined && (_jsx("span", { className: "bd-chip", children: item.badge }))] }), item.children && isActive && (_jsx("div", { style: { marginLeft: 28, marginTop: 2 }, children: item.children.map((child) => {
|
|
56
|
+
const childActive = pathname === child.href;
|
|
57
|
+
return (_jsx(Link, { href: child.href, style: {
|
|
58
|
+
display: "block",
|
|
59
|
+
padding: "5px 10px",
|
|
60
|
+
borderRadius: "var(--bd-radius-sm)",
|
|
61
|
+
color: childActive
|
|
62
|
+
? "var(--bd-text)"
|
|
63
|
+
: "var(--bd-text-3)",
|
|
64
|
+
fontSize: 13,
|
|
65
|
+
textDecoration: "none",
|
|
66
|
+
background: childActive
|
|
67
|
+
? "var(--bd-accent-bg)"
|
|
68
|
+
: "transparent",
|
|
69
|
+
}, children: child.label }, child.key));
|
|
70
|
+
}) }))] }, item.key));
|
|
71
|
+
}) }), _jsxs("div", { style: {
|
|
72
|
+
padding: "12px 14px",
|
|
73
|
+
borderTop: "1px solid var(--bd-border)",
|
|
74
|
+
fontSize: 12,
|
|
75
|
+
color: "var(--bd-text-3)",
|
|
76
|
+
display: "flex",
|
|
77
|
+
alignItems: "center",
|
|
78
|
+
justifyContent: "space-between",
|
|
79
|
+
}, children: [_jsx("span", { children: menu.footer?.avatarLabel ?? "" }), menu.footer?.crossover && (_jsxs("a", { href: menu.footer.crossover.href, style: {
|
|
80
|
+
color: "var(--bd-accent-2)",
|
|
81
|
+
textDecoration: "none",
|
|
82
|
+
fontSize: 11,
|
|
83
|
+
}, children: [menu.footer.crossover.label, " \u2192"] }))] })] }));
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=Sidebar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sidebar.js","sourceRoot":"","sources":["../src/Sidebar.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAQ7B;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAS;IAC/C,OAAO,CACL,+BACa,kBAAkB,EAC7B,KAAK,EAAE;YACL,KAAK,EAAE,qBAAqB;YAC5B,UAAU,EAAE,gBAAgB;YAC5B,WAAW,EAAE,4BAA4B;YACzC,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,QAAQ;YAClB,GAAG,EAAE,CAAC;YACN,SAAS,EAAE,MAAM;YACjB,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,QAAQ;SACxB,aAED,cACE,KAAK,EAAE;oBACL,OAAO,EAAE,WAAW;oBACpB,YAAY,EAAE,4BAA4B;iBAC3C,YAED,MAAC,IAAI,IACH,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACrB,KAAK,EAAE;wBACL,KAAK,EAAE,gBAAgB;wBACvB,UAAU,EAAE,wBAAwB;wBACpC,UAAU,EAAE,GAAG;wBACf,aAAa,EAAE,SAAS;wBACxB,QAAQ,EAAE,EAAE;wBACZ,cAAc,EAAE,MAAM;wBACtB,OAAO,EAAE,MAAM;wBACf,UAAU,EAAE,QA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AAc,EAAE,eAAe;iBAChC,aAED,yBAAO,IAAI,CAAC,MAAM,EAAE,WAAW,IAAI,EAAE,GAAQ,EAC5C,IAAI,CAAC,MAAM,EAAE,SAAS,IAAI,CACzB,aACE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,EAChC,KAAK,EAAE;4BACL,KAAK,EAAE,oBAAoB;4BAC3B,cAAc,EAAE,MAAM;4BACtB,QAAQ,EAAE,EAAE;yBACb,aAEA,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,eAC1B,CACL,IACG,IACA,CACT,CAAC;AACJ,CAAC"}
|
package/dist/Topbar.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
breadcrumb: ReactNode;
|
|
4
|
+
search?: ReactNode;
|
|
5
|
+
notificationsBadge?: number;
|
|
6
|
+
calendarBadge?: number;
|
|
7
|
+
userLabel?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Sticky topbar — breadcrumb + ⌘K search + notifications + calendar + avatar.
|
|
11
|
+
* Search trigger and notifications dropdown are passed as ReactNode so the
|
|
12
|
+
* shell controls behavior, brain-ui only ships the visual chrome.
|
|
13
|
+
*/
|
|
14
|
+
export declare function Topbar({ breadcrumb, search, notificationsBadge, calendarBadge, userLabel, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=Topbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Topbar.d.ts","sourceRoot":"","sources":["../src/Topbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,UAAU,KAAK;IACb,UAAU,EAAE,SAAS,CAAC;IACtB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,EACrB,UAAU,EACV,MAAM,EACN,kBAAkB,EAClB,aAAa,EACb,SAAS,GACV,EAAE,KAAK,2CAqFP"}
|
package/dist/Topbar.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Sticky topbar — breadcrumb + ⌘K search + notifications + calendar + avatar.
|
|
4
|
+
* Search trigger and notifications dropdown are passed as ReactNode so the
|
|
5
|
+
* shell controls behavior, brain-ui only ships the visual chrome.
|
|
6
|
+
*/
|
|
7
|
+
export function Topbar({ breadcrumb, search, notificationsBadge, calendarBadge, userLabel, }) {
|
|
8
|
+
return (_jsxs("header", { style: {
|
|
9
|
+
height: "var(--bd-topbar-h)",
|
|
10
|
+
background: "var(--bd-bg)",
|
|
11
|
+
borderBottom: "1px solid var(--bd-border)",
|
|
12
|
+
display: "flex",
|
|
13
|
+
alignItems: "center",
|
|
14
|
+
padding: "0 20px",
|
|
15
|
+
gap: 18,
|
|
16
|
+
position: "sticky",
|
|
17
|
+
top: 0,
|
|
18
|
+
zIndex: 20,
|
|
19
|
+
}, children: [_jsx("div", { style: { flex: 1, fontSize: 13, color: "var(--bd-text-2)" }, children: breadcrumb }), search && _jsx("div", { children: search }), _jsxs("button", { type: "button", "aria-label": "Bildirimler", style: {
|
|
20
|
+
position: "relative",
|
|
21
|
+
background: "transparent",
|
|
22
|
+
border: "1px solid var(--bd-border)",
|
|
23
|
+
color: "var(--bd-text-2)",
|
|
24
|
+
borderRadius: "var(--bd-radius-sm)",
|
|
25
|
+
padding: "6px 9px",
|
|
26
|
+
cursor: "pointer",
|
|
27
|
+
fontSize: 13,
|
|
28
|
+
}, children: ["\uD83D\uDD14", notificationsBadge !== undefined && notificationsBadge > 0 && (_jsx("span", { style: {
|
|
29
|
+
position: "absolute",
|
|
30
|
+
top: -4,
|
|
31
|
+
right: -4,
|
|
32
|
+
minWidth: 16,
|
|
33
|
+
height: 16,
|
|
34
|
+
borderRadius: 999,
|
|
35
|
+
background: "var(--bd-danger)",
|
|
36
|
+
color: "white",
|
|
37
|
+
fontSize: 9,
|
|
38
|
+
display: "grid",
|
|
39
|
+
placeItems: "center",
|
|
40
|
+
padding: "0 4px",
|
|
41
|
+
}, children: notificationsBadge }))] }), _jsxs("div", { style: {
|
|
42
|
+
fontSize: 12,
|
|
43
|
+
color: "var(--bd-text-2)",
|
|
44
|
+
padding: "4px 8px",
|
|
45
|
+
border: "1px solid var(--bd-border)",
|
|
46
|
+
borderRadius: "var(--bd-radius-sm)",
|
|
47
|
+
}, children: ["\uD83D\uDCC5 ", calendarBadge ?? 0, " bug\u00FCn"] }), _jsx("div", { style: {
|
|
48
|
+
width: 28,
|
|
49
|
+
height: 28,
|
|
50
|
+
borderRadius: 999,
|
|
51
|
+
background: "var(--bd-accent-bg-strong)",
|
|
52
|
+
color: "var(--bd-accent-2)",
|
|
53
|
+
display: "grid",
|
|
54
|
+
placeItems: "center",
|
|
55
|
+
fontSize: 12,
|
|
56
|
+
fontWeight: 600,
|
|
57
|
+
}, "aria-label": userLabel ?? "User", children: (userLabel ?? "U").slice(0, 1).toUpperCase() })] }));
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=Topbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Topbar.js","sourceRoot":"","sources":["../src/Topbar.tsx"],"names":[],"mappings":";AAUA;;;;GAIG;AACH,MAAM,UAAU,MAAM,CAAC,EACrB,UAAU,EACV,MAAM,EACN,kBAAkB,EAClB,aAAa,EACb,SAAS,GACH;IACN,OAAO,CACL,kBACE,KAAK,EAAE;YACL,MAAM,EAAE,oBAAoB;YAC5B,UAAU,EAAE,cAAc;YAC1B,YAAY,EAAE,4BAA4B;YAC1C,OA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B,EACN,cACE,KAAK,EAAE;oBACL,KAAK,EAAE,EAAE;oBACT,MAAM,EAAE,EAAE;oBACV,YAAY,EAAE,GAAG;oBACjB,UAAU,EAAE,4BAA4B;oBACxC,KAAK,EAAE,oBAAoB;oBAC3B,OAAO,EAAE,MAAM;oBACf,UAAU,EAAE,QAAQ;oBACpB,QAAQ,EAAE,EAAE;oBACZ,UAAU,EAAE,GAAG;iBAChB,gBACW,SAAS,IAAI,MAAM,YAE9B,CAAC,SAAS,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,GACzC,IACC,CACV,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { OwnerLayout } from "./OwnerLayout";
|
|
2
|
+
export { Sidebar } from "./Sidebar";
|
|
3
|
+
export { Topbar } from "./Topbar";
|
|
4
|
+
export { DigestStrip } from "./DigestStrip";
|
|
5
|
+
export { KpiHero } from "./KpiHero";
|
|
6
|
+
export { CalendarPanel } from "./CalendarPanel";
|
|
7
|
+
export { BacklogPanel } from "./BacklogPanel";
|
|
8
|
+
export { ActivityFeed } from "./ActivityFeed";
|
|
9
|
+
export { ShuffleGrid } from "./ShuffleGrid";
|
|
10
|
+
export { ProductCard } from "./ProductCard";
|
|
11
|
+
export { EmptyStateCoach } from "./EmptyStateCoach";
|
|
12
|
+
export type { MenuItem, MenuConfig, OwnerLayoutProps } from "./types";
|
|
13
|
+
export type { CalendarEvent } from "./CalendarPanel";
|
|
14
|
+
export type { BacklogRow } from "./BacklogPanel";
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACtE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @skilldrunk/brain-ui — Owner shell primitives.
|
|
2
|
+
// Theme-driven (CSS variables from theme.css). Pure server components.
|
|
3
|
+
export { OwnerLayout } from "./OwnerLayout";
|
|
4
|
+
export { Sidebar } from "./Sidebar";
|
|
5
|
+
export { Topbar } from "./Topbar";
|
|
6
|
+
export { DigestStrip } from "./DigestStrip";
|
|
7
|
+
export { KpiHero } from "./KpiHero";
|
|
8
|
+
export { CalendarPanel } from "./CalendarPanel";
|
|
9
|
+
export { BacklogPanel } from "./BacklogPanel";
|
|
10
|
+
export { ActivityFeed } from "./ActivityFeed";
|
|
11
|
+
export { ShuffleGrid } from "./ShuffleGrid";
|
|
12
|
+
export { ProductCard } from "./ProductCard";
|
|
13
|
+
export { EmptyStateCoach } from "./EmptyStateCoach";
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,uEAAuE;AAEvE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface MenuItem {
|
|
3
|
+
key: string;
|
|
4
|
+
label: string;
|
|
5
|
+
href: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
children?: MenuItem[];
|
|
8
|
+
badge?: string | number;
|
|
9
|
+
emptyStateCoach?: {
|
|
10
|
+
message: string;
|
|
11
|
+
actions?: Array<{
|
|
12
|
+
label: string;
|
|
13
|
+
href: string;
|
|
14
|
+
}>;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface MenuConfig {
|
|
18
|
+
brand: {
|
|
19
|
+
label: string;
|
|
20
|
+
href: string;
|
|
21
|
+
};
|
|
22
|
+
realmToggleHref?: string;
|
|
23
|
+
items: MenuItem[];
|
|
24
|
+
footer?: {
|
|
25
|
+
avatarLabel: string;
|
|
26
|
+
crossover?: {
|
|
27
|
+
label: string;
|
|
28
|
+
href: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface OwnerLayoutProps {
|
|
33
|
+
menu: MenuConfig;
|
|
34
|
+
pathname: string;
|
|
35
|
+
realm: "work" | "personal" | "shared";
|
|
36
|
+
search?: ReactNode;
|
|
37
|
+
notificationsBadge?: number;
|
|
38
|
+
calendarBadge?: number;
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,KAAK,CAAC;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KAClD,CAAC;CACH;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACvC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,MAAM,CAAC,EAAE;QACP,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC;KAC7C,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC;IACtC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC;CACrB"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@skilldrunk/brain-ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./theme.css": "./src/theme.css"
|
|
15
|
+
},
|
|
16
|
+
"files": ["dist", "src/theme.css", "README.md"],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc -p tsconfig.build.json",
|
|
19
|
+
"prepublishOnly": "pnpm run build"
|
|
20
|
+
},
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"next": "^16",
|
|
26
|
+
"react": "^19",
|
|
27
|
+
"react-dom": "^19"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/react": "^19",
|
|
31
|
+
"next": "16.2.3",
|
|
32
|
+
"react": "19.2.4",
|
|
33
|
+
"typescript": "^5"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@skilldrunk/brain-client": "workspace:*"
|
|
37
|
+
}
|
|
38
|
+
}
|
package/src/theme.css
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/* @skilldrunk/brain-ui — theme reset (D-010, D-011 per 02-skilldrunk-spec §2).
|
|
2
|
+
*
|
|
3
|
+
* Each tenant (skilldrunk = corporate, skimsoulfat = glassmorphic) sets
|
|
4
|
+
* its own theme class on <body>. brain-ui components read the CSS variables
|
|
5
|
+
* below — never hardcoded colors.
|
|
6
|
+
*
|
|
7
|
+
* Tokens are the contract. Don't add component-specific colors here.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/* ─── Default theme (used if no tenant class set) ──────────────────── */
|
|
11
|
+
:root {
|
|
12
|
+
--bd-bg: #0a0a0f;
|
|
13
|
+
--bd-bg-2: #12121a;
|
|
14
|
+
--bd-surface: #1a1a26;
|
|
15
|
+
--bd-surface-2: #21212e;
|
|
16
|
+
--bd-border: #26263a;
|
|
17
|
+
--bd-border-strong: #353548;
|
|
18
|
+
--bd-text: #e4e4e7;
|
|
19
|
+
--bd-text-2: #a1a1aa;
|
|
20
|
+
--bd-text-3: #6b6b78;
|
|
21
|
+
--bd-accent: #8b5cf6;
|
|
22
|
+
--bd-accent-2: #a78bfa;
|
|
23
|
+
--bd-accent-bg: rgba(139, 92, 246, 0.10);
|
|
24
|
+
--bd-accent-bg-strong: rgba(139, 92, 246, 0.18);
|
|
25
|
+
--bd-success: #22c55e;
|
|
26
|
+
--bd-warn: #f59e0b;
|
|
27
|
+
--bd-danger: #ef4444;
|
|
28
|
+
--bd-radius: 12px;
|
|
29
|
+
--bd-radius-sm: 8px;
|
|
30
|
+
--bd-radius-lg: 16px;
|
|
31
|
+
--bd-sidebar-w: 256px;
|
|
32
|
+
--bd-topbar-h: 56px;
|
|
33
|
+
--bd-font-display: ui-sans-serif, -apple-system, system-ui, sans-serif;
|
|
34
|
+
--bd-font-mono: ui-monospace, SF Mono, Menlo, monospace;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* ─── skilldrunk corporate (D-010) ─────────────────────────────────── */
|
|
38
|
+
.theme-skilldrunk-corporate {
|
|
39
|
+
--bd-bg: #0a0a0f;
|
|
40
|
+
--bd-bg-2: #12121a;
|
|
41
|
+
--bd-surface: #1a1a26;
|
|
42
|
+
--bd-surface-2: #21212e;
|
|
43
|
+
--bd-border: #26263a;
|
|
44
|
+
--bd-border-strong: #353548;
|
|
45
|
+
--bd-text: #e4e4e7;
|
|
46
|
+
--bd-text-2: #a1a1aa;
|
|
47
|
+
--bd-text-3: #6b6b78;
|
|
48
|
+
--bd-accent: #8b5cf6;
|
|
49
|
+
--bd-accent-2: #a78bfa;
|
|
50
|
+
--bd-accent-bg: rgba(139, 92, 246, 0.10);
|
|
51
|
+
--bd-accent-bg-strong: rgba(139, 92, 246, 0.18);
|
|
52
|
+
--bd-radius: 12px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* ─── skimsoulfat glassmorphic (Faz 3 — placeholder so devs see API) ── */
|
|
56
|
+
.theme-skimsoulfat-glassmorphic {
|
|
57
|
+
--bd-bg: #0c0a18;
|
|
58
|
+
--bd-bg-2: #1a0e2e;
|
|
59
|
+
--bd-surface: rgba(255, 255, 255, 0.04);
|
|
60
|
+
--bd-surface-2: rgba(255, 255, 255, 0.06);
|
|
61
|
+
--bd-border: rgba(255, 255, 255, 0.08);
|
|
62
|
+
--bd-border-strong: rgba(255, 255, 255, 0.14);
|
|
63
|
+
--bd-text: #f0f0f5;
|
|
64
|
+
--bd-text-2: #a8a8b8;
|
|
65
|
+
--bd-accent: #06b6d4;
|
|
66
|
+
--bd-accent-2: #67e8f9;
|
|
67
|
+
--bd-accent-bg: rgba(6, 182, 212, 0.10);
|
|
68
|
+
--bd-radius: 16px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* ─── primitive utility classes used by brain-ui components ─────────── */
|
|
72
|
+
.bd-surface {
|
|
73
|
+
background: var(--bd-surface);
|
|
74
|
+
border: 1px solid var(--bd-border);
|
|
75
|
+
border-radius: var(--bd-radius);
|
|
76
|
+
}
|
|
77
|
+
.bd-surface-2 {
|
|
78
|
+
background: var(--bd-surface-2);
|
|
79
|
+
border: 1px solid var(--bd-border-strong);
|
|
80
|
+
border-radius: var(--bd-radius);
|
|
81
|
+
}
|
|
82
|
+
.bd-chip {
|
|
83
|
+
display: inline-flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
gap: 4px;
|
|
86
|
+
padding: 2px 8px;
|
|
87
|
+
border-radius: 999px;
|
|
88
|
+
font-size: 11px;
|
|
89
|
+
background: var(--bd-accent-bg);
|
|
90
|
+
color: var(--bd-accent-2);
|
|
91
|
+
border: 1px solid var(--bd-accent-bg-strong);
|
|
92
|
+
}
|
|
93
|
+
.bd-link {
|
|
94
|
+
color: var(--bd-text);
|
|
95
|
+
text-decoration: none;
|
|
96
|
+
}
|
|
97
|
+
.bd-link:hover {
|
|
98
|
+
color: var(--bd-accent-2);
|
|
99
|
+
}
|