@yarvelle/ui 0.1.0 → 0.1.2
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/index-B6FcwyCu.d.ts +163 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +686 -344
- package/dist/index.js.map +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/index-DLbrj3Po.d.ts +0 -90
package/dist/index.js
CHANGED
|
@@ -2402,8 +2402,348 @@ function ModelSelector({
|
|
|
2402
2402
|
);
|
|
2403
2403
|
}
|
|
2404
2404
|
|
|
2405
|
-
// src/
|
|
2405
|
+
// src/chat/DeliberationRoundtable.tsx
|
|
2406
|
+
import * as React23 from "react";
|
|
2406
2407
|
import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2408
|
+
var stanceBadgeVariant = {
|
|
2409
|
+
endorse: "success",
|
|
2410
|
+
complement: "info",
|
|
2411
|
+
amend: "warn",
|
|
2412
|
+
conflict: "danger"
|
|
2413
|
+
};
|
|
2414
|
+
function mapRiskTierToLevel(tier) {
|
|
2415
|
+
switch (tier) {
|
|
2416
|
+
case "irreversible":
|
|
2417
|
+
return "danger";
|
|
2418
|
+
case "write_external":
|
|
2419
|
+
case "write_local":
|
|
2420
|
+
return "warn";
|
|
2421
|
+
case "read":
|
|
2422
|
+
return "info";
|
|
2423
|
+
default:
|
|
2424
|
+
return "danger";
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2427
|
+
function DeliberationRoundtable({
|
|
2428
|
+
panel_id,
|
|
2429
|
+
title,
|
|
2430
|
+
agents = [],
|
|
2431
|
+
shared_constraints,
|
|
2432
|
+
skipped_constraints,
|
|
2433
|
+
proposals,
|
|
2434
|
+
critiques,
|
|
2435
|
+
staged_actions,
|
|
2436
|
+
rounds_used,
|
|
2437
|
+
converged,
|
|
2438
|
+
termination_reason,
|
|
2439
|
+
minority_reports,
|
|
2440
|
+
open_amendments,
|
|
2441
|
+
className,
|
|
2442
|
+
onApproveStagedAction
|
|
2443
|
+
}) {
|
|
2444
|
+
const proposalList = React23.useMemo(() => {
|
|
2445
|
+
if (!proposals) return [];
|
|
2446
|
+
if (Array.isArray(proposals)) return proposals;
|
|
2447
|
+
const flat = [];
|
|
2448
|
+
for (const roundKey of Object.keys(proposals)) {
|
|
2449
|
+
const roundProposals = proposals[Number(roundKey)];
|
|
2450
|
+
if (roundProposals) {
|
|
2451
|
+
for (const agentKey of Object.keys(roundProposals)) {
|
|
2452
|
+
flat.push(roundProposals[agentKey]);
|
|
2453
|
+
}
|
|
2454
|
+
}
|
|
2455
|
+
}
|
|
2456
|
+
return flat;
|
|
2457
|
+
}, [proposals]);
|
|
2458
|
+
const critiqueList = React23.useMemo(() => {
|
|
2459
|
+
if (!critiques) return [];
|
|
2460
|
+
if (Array.isArray(critiques)) return critiques;
|
|
2461
|
+
const flat = [];
|
|
2462
|
+
for (const roundKey of Object.keys(critiques)) {
|
|
2463
|
+
const roundCritiques = critiques[Number(roundKey)];
|
|
2464
|
+
if (Array.isArray(roundCritiques)) {
|
|
2465
|
+
flat.push(...roundCritiques);
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2468
|
+
return flat;
|
|
2469
|
+
}, [critiques]);
|
|
2470
|
+
const availableRounds = React23.useMemo(() => {
|
|
2471
|
+
const roundSet = /* @__PURE__ */ new Set();
|
|
2472
|
+
proposalList.forEach((p) => roundSet.add(p.round_num));
|
|
2473
|
+
critiqueList.forEach((c) => roundSet.add(c.round_num));
|
|
2474
|
+
return Array.from(roundSet).sort((a, b) => a - b);
|
|
2475
|
+
}, [proposalList, critiqueList]);
|
|
2476
|
+
const [selectedRound, setSelectedRound] = React23.useState("all");
|
|
2477
|
+
const filteredProposals = React23.useMemo(() => {
|
|
2478
|
+
if (selectedRound === "all") return proposalList;
|
|
2479
|
+
return proposalList.filter((p) => p.round_num === selectedRound);
|
|
2480
|
+
}, [proposalList, selectedRound]);
|
|
2481
|
+
const filteredCritiques = React23.useMemo(() => {
|
|
2482
|
+
if (selectedRound === "all") return critiqueList;
|
|
2483
|
+
return critiqueList.filter((c) => c.round_num === selectedRound);
|
|
2484
|
+
}, [critiqueList, selectedRound]);
|
|
2485
|
+
const renderStatusBadge = () => {
|
|
2486
|
+
if (converged) {
|
|
2487
|
+
return /* @__PURE__ */ jsx28(Badge, { variant: "success", children: "Converged" });
|
|
2488
|
+
}
|
|
2489
|
+
if (termination_reason === "max_rounds") {
|
|
2490
|
+
return /* @__PURE__ */ jsx28(Badge, { variant: "warn", children: "Max Rounds Reached" });
|
|
2491
|
+
}
|
|
2492
|
+
if (termination_reason === "budget") {
|
|
2493
|
+
return /* @__PURE__ */ jsx28(Badge, { variant: "danger", children: "Budget Exceeded" });
|
|
2494
|
+
}
|
|
2495
|
+
if (termination_reason === "cancelled") {
|
|
2496
|
+
return /* @__PURE__ */ jsx28(Badge, { variant: "danger", children: "Cancelled" });
|
|
2497
|
+
}
|
|
2498
|
+
if (termination_reason) {
|
|
2499
|
+
return /* @__PURE__ */ jsx28(Badge, { variant: "neutral", children: termination_reason });
|
|
2500
|
+
}
|
|
2501
|
+
return null;
|
|
2502
|
+
};
|
|
2503
|
+
return /* @__PURE__ */ jsxs20(
|
|
2504
|
+
"div",
|
|
2505
|
+
{
|
|
2506
|
+
role: "region",
|
|
2507
|
+
"aria-label": "Multi-Agent Deliberation Roundtable",
|
|
2508
|
+
"data-slot": "deliberation-roundtable",
|
|
2509
|
+
className: cn(
|
|
2510
|
+
"yc-DeliberationRoundtable-root yc-RoundtableCard-root my-3 rounded-lg border border-border bg-surface p-4 text-xs shadow-1 space-y-4",
|
|
2511
|
+
className
|
|
2512
|
+
),
|
|
2513
|
+
children: [
|
|
2514
|
+
/* @__PURE__ */ jsxs20("div", { "data-slot": "panel-header", className: "yc-DeliberationRoundtable-header flex flex-col gap-2 pb-3 border-b border-border", children: [
|
|
2515
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between gap-2 flex-wrap", children: [
|
|
2516
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
|
|
2517
|
+
/* @__PURE__ */ jsx28("h3", { "data-slot": "title", className: "yc-DeliberationRoundtable-title text-sm font-semibold text-fg", children: title || "Multi-Agent Deliberation" }),
|
|
2518
|
+
panel_id && /* @__PURE__ */ jsx28(Badge, { variant: "outline", children: panel_id })
|
|
2519
|
+
] }),
|
|
2520
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-1.5", children: [
|
|
2521
|
+
renderStatusBadge(),
|
|
2522
|
+
rounds_used != null && /* @__PURE__ */ jsx28(Badge, { variant: "neutral", children: `Rounds: ${rounds_used}` })
|
|
2523
|
+
] })
|
|
2524
|
+
] }),
|
|
2525
|
+
agents.length > 0 && /* @__PURE__ */ jsxs20("div", { className: "flex flex-wrap items-center gap-1.5", "data-slot": "agent-pills", children: [
|
|
2526
|
+
/* @__PURE__ */ jsx28("span", { className: "text-fg-muted font-medium", children: "Specialists:" }),
|
|
2527
|
+
agents.map((agent) => /* @__PURE__ */ jsx28(Badge, { variant: "neutral", "data-slot": "agent-pill", children: agent }, agent))
|
|
2528
|
+
] }),
|
|
2529
|
+
shared_constraints && shared_constraints.length > 0 && /* @__PURE__ */ jsxs20("div", { className: "space-y-1.5 pt-1", "data-slot": "constraint-meters", children: [
|
|
2530
|
+
/* @__PURE__ */ jsx28("span", { className: "text-fg-muted font-medium text-[11px]", children: "Shared Constraints:" }),
|
|
2531
|
+
/* @__PURE__ */ jsx28("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-2", children: shared_constraints.map((c) => {
|
|
2532
|
+
const isSkipped = c.limit_value == null || c.skipped === true || skipped_constraints && skipped_constraints.includes(c.id);
|
|
2533
|
+
const claimed = c.total_claimed ?? 0;
|
|
2534
|
+
const isOver = !isSkipped && c.limit_value != null && claimed > c.limit_value;
|
|
2535
|
+
const overAmount = isOver ? claimed - c.limit_value : 0;
|
|
2536
|
+
return /* @__PURE__ */ jsxs20(
|
|
2537
|
+
"div",
|
|
2538
|
+
{
|
|
2539
|
+
"data-slot": "constraint-item",
|
|
2540
|
+
className: "yc-DeliberationRoundtable-constraintItem flex items-center justify-between p-2 rounded bg-surface-2 border border-border",
|
|
2541
|
+
children: [
|
|
2542
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-col", children: [
|
|
2543
|
+
/* @__PURE__ */ jsx28("span", { className: "font-semibold text-fg", children: c.id }),
|
|
2544
|
+
c.description && /* @__PURE__ */ jsx28("span", { className: "text-fg-muted text-[11px]", children: c.description })
|
|
2545
|
+
] }),
|
|
2546
|
+
isSkipped ? /* @__PURE__ */ jsx28(Badge, { variant: "neutral", "data-slot": "constraint-skipped", children: "Limit Unknown (Skipped)" }) : /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
|
|
2547
|
+
/* @__PURE__ */ jsxs20("span", { className: "text-fg-muted font-mono", children: [
|
|
2548
|
+
claimed,
|
|
2549
|
+
" / ",
|
|
2550
|
+
c.limit_value,
|
|
2551
|
+
" ",
|
|
2552
|
+
c.unit
|
|
2553
|
+
] }),
|
|
2554
|
+
isOver ? /* @__PURE__ */ jsx28(Badge, { variant: "danger", children: `Overbudget (+${overAmount.toFixed(1)})` }) : /* @__PURE__ */ jsx28(Badge, { variant: "success", children: "Within limit" })
|
|
2555
|
+
] })
|
|
2556
|
+
]
|
|
2557
|
+
},
|
|
2558
|
+
c.id
|
|
2559
|
+
);
|
|
2560
|
+
}) })
|
|
2561
|
+
] })
|
|
2562
|
+
] }),
|
|
2563
|
+
filteredProposals.length > 0 && /* @__PURE__ */ jsxs20("div", { "data-slot": "proposals-section", className: "yc-DeliberationRoundtable-proposals space-y-3", children: [
|
|
2564
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between gap-2 pb-1", "data-slot": "proposals-header", children: [
|
|
2565
|
+
/* @__PURE__ */ jsx28("h4", { className: "text-sm font-semibold text-fg", children: "Specialist Proposals" }),
|
|
2566
|
+
availableRounds.length > 1 && /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-1", "data-slot": "round-tabs", role: "tablist", children: [
|
|
2567
|
+
/* @__PURE__ */ jsx28(
|
|
2568
|
+
"button",
|
|
2569
|
+
{
|
|
2570
|
+
type: "button",
|
|
2571
|
+
role: "tab",
|
|
2572
|
+
"aria-selected": selectedRound === "all",
|
|
2573
|
+
className: cn(
|
|
2574
|
+
"px-2 py-0.5 rounded text-[11px] font-medium transition-colors",
|
|
2575
|
+
selectedRound === "all" ? "bg-primary text-primary-fg" : "bg-surface-2 text-fg-muted hover:bg-surface-3"
|
|
2576
|
+
),
|
|
2577
|
+
onClick: () => setSelectedRound("all"),
|
|
2578
|
+
children: "All Rounds"
|
|
2579
|
+
}
|
|
2580
|
+
),
|
|
2581
|
+
availableRounds.map((r) => /* @__PURE__ */ jsx28(
|
|
2582
|
+
"button",
|
|
2583
|
+
{
|
|
2584
|
+
type: "button",
|
|
2585
|
+
role: "tab",
|
|
2586
|
+
"aria-selected": selectedRound === r,
|
|
2587
|
+
className: cn(
|
|
2588
|
+
"px-2 py-0.5 rounded text-[11px] font-medium transition-colors",
|
|
2589
|
+
selectedRound === r ? "bg-primary text-primary-fg" : "bg-surface-2 text-fg-muted hover:bg-surface-3"
|
|
2590
|
+
),
|
|
2591
|
+
onClick: () => setSelectedRound(r),
|
|
2592
|
+
children: `Round ${r}`
|
|
2593
|
+
},
|
|
2594
|
+
r
|
|
2595
|
+
))
|
|
2596
|
+
] })
|
|
2597
|
+
] }),
|
|
2598
|
+
/* @__PURE__ */ jsx28("div", { className: "space-y-3", children: filteredProposals.map((p, idx) => /* @__PURE__ */ jsxs20(
|
|
2599
|
+
"div",
|
|
2600
|
+
{
|
|
2601
|
+
"data-slot": "proposal-card",
|
|
2602
|
+
className: "yc-DeliberationRoundtable-proposalCard rounded border border-border bg-surface-2 p-3 space-y-2",
|
|
2603
|
+
children: [
|
|
2604
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between gap-2 flex-wrap", children: [
|
|
2605
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
2606
|
+
/* @__PURE__ */ jsx28("span", { className: "font-semibold text-fg text-sm", children: p.agent_id }),
|
|
2607
|
+
/* @__PURE__ */ jsx28(Badge, { variant: "neutral", children: `Round ${p.round_num}` }),
|
|
2608
|
+
p.round_num > 1 && /* @__PURE__ */ jsx28(Badge, { variant: "primary", "data-slot": "revision-badge", children: "Revised after peer review" }),
|
|
2609
|
+
p.tainted === true && /* @__PURE__ */ jsx28(Badge, { variant: "warn", "data-slot": "taint-badge", children: "\u26A0\uFE0F Untrusted Source" })
|
|
2610
|
+
] }),
|
|
2611
|
+
p.confidence != null && /* @__PURE__ */ jsx28("span", { className: "text-fg-muted font-mono text-[11px]", children: `conf: ${(p.confidence * 100).toFixed(0)}%` })
|
|
2612
|
+
] }),
|
|
2613
|
+
/* @__PURE__ */ jsx28("p", { className: "text-fg text-xs leading-relaxed", children: p.summary }),
|
|
2614
|
+
p.recommendations && p.recommendations.length > 0 && /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
|
|
2615
|
+
/* @__PURE__ */ jsx28("span", { className: "text-fg-muted text-[11px] font-medium", children: "Recommendations:" }),
|
|
2616
|
+
/* @__PURE__ */ jsx28("ul", { className: "space-y-1 ps-4 list-disc text-fg-muted text-xs", "data-slot": "recommendations", children: p.recommendations.map((rec, rIdx) => /* @__PURE__ */ jsx28("li", { children: rec }, rIdx)) })
|
|
2617
|
+
] }),
|
|
2618
|
+
p.resource_claims && Object.keys(p.resource_claims).length > 0 && /* @__PURE__ */ jsxs20("div", { className: "flex flex-wrap items-center gap-1.5 pt-1", "data-slot": "resource-claims", children: [
|
|
2619
|
+
/* @__PURE__ */ jsx28("span", { className: "text-fg-muted text-[11px] font-medium", children: "Claims:" }),
|
|
2620
|
+
Object.entries(p.resource_claims).map(([key, val]) => {
|
|
2621
|
+
const unit = p.resource_claim_units?.[key] || "";
|
|
2622
|
+
return /* @__PURE__ */ jsx28(Badge, { variant: "neutral", className: "font-mono text-[11px]", children: `${key}: ${val}${unit ? ` ${unit}` : ""}` }, key);
|
|
2623
|
+
})
|
|
2624
|
+
] })
|
|
2625
|
+
]
|
|
2626
|
+
},
|
|
2627
|
+
`${p.agent_id}-${p.round_num}-${idx}`
|
|
2628
|
+
)) })
|
|
2629
|
+
] }),
|
|
2630
|
+
filteredCritiques.length > 0 && /* @__PURE__ */ jsxs20("div", { "data-slot": "critiques-section", className: "yc-DeliberationRoundtable-critiques space-y-3", children: [
|
|
2631
|
+
/* @__PURE__ */ jsx28("h4", { className: "text-sm font-semibold text-fg", children: "Peer Critiques & Alignments" }),
|
|
2632
|
+
/* @__PURE__ */ jsx28("div", { className: "space-y-2", children: filteredCritiques.map((c, idx) => {
|
|
2633
|
+
const stanceVariant = stanceBadgeVariant[c.stance] || "neutral";
|
|
2634
|
+
return /* @__PURE__ */ jsxs20(
|
|
2635
|
+
"div",
|
|
2636
|
+
{
|
|
2637
|
+
"data-slot": "critique-item",
|
|
2638
|
+
className: "yc-DeliberationRoundtable-critiqueItem flex flex-col gap-1.5 p-2.5 rounded border border-border bg-surface",
|
|
2639
|
+
children: [
|
|
2640
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between gap-2 flex-wrap", children: [
|
|
2641
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
2642
|
+
/* @__PURE__ */ jsx28("span", { className: "font-mono text-xs text-fg font-semibold", children: `${c.reviewer_agent_id} \u2192 ${c.target_agent_id}` }),
|
|
2643
|
+
/* @__PURE__ */ jsx28(Badge, { variant: stanceVariant, "data-slot": "stance-badge", children: c.stance.toUpperCase() }),
|
|
2644
|
+
/* @__PURE__ */ jsx28(Badge, { variant: "neutral", children: c.issue_type })
|
|
2645
|
+
] }),
|
|
2646
|
+
/* @__PURE__ */ jsx28(Badge, { variant: "neutral", children: `Round ${c.round_num}` })
|
|
2647
|
+
] }),
|
|
2648
|
+
/* @__PURE__ */ jsx28("p", { className: "text-fg-muted text-xs leading-relaxed", children: c.critique }),
|
|
2649
|
+
c.proposed_resolution && /* @__PURE__ */ jsxs20("p", { className: "text-fg text-xs font-medium", children: [
|
|
2650
|
+
/* @__PURE__ */ jsx28("span", { className: "text-fg-muted", children: "Proposed: " }),
|
|
2651
|
+
c.proposed_resolution
|
|
2652
|
+
] })
|
|
2653
|
+
]
|
|
2654
|
+
},
|
|
2655
|
+
`${c.reviewer_agent_id}-${c.target_agent_id}-${c.round_num}-${idx}`
|
|
2656
|
+
);
|
|
2657
|
+
}) })
|
|
2658
|
+
] }),
|
|
2659
|
+
minority_reports && minority_reports.length > 0 && /* @__PURE__ */ jsxs20("div", { "data-slot": "minority-report", className: "space-y-3 rounded-lg border border-danger-border bg-danger-bg/20 p-3", children: [
|
|
2660
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-0.5", children: [
|
|
2661
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
|
|
2662
|
+
/* @__PURE__ */ jsx28(Badge, { variant: "danger", children: "Minority Report" }),
|
|
2663
|
+
/* @__PURE__ */ jsx28("h4", { className: "text-sm font-semibold text-fg", children: "Minority Report: Unresolved Conflicts" })
|
|
2664
|
+
] }),
|
|
2665
|
+
/* @__PURE__ */ jsx28("p", { className: "text-xs text-fg-muted", children: "The panel did not reach consensus on the following items. Options are presented below for stakeholder review and value judgment." })
|
|
2666
|
+
] }),
|
|
2667
|
+
/* @__PURE__ */ jsx28("div", { className: "space-y-3", children: minority_reports.map((item, idx) => /* @__PURE__ */ jsxs20("div", { className: "rounded border border-border bg-surface p-3 space-y-2.5", children: [
|
|
2668
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
2669
|
+
/* @__PURE__ */ jsx28(Badge, { variant: "danger", children: "CONFLICT" }),
|
|
2670
|
+
/* @__PURE__ */ jsx28("span", { className: "font-mono text-xs font-semibold text-fg", children: `${item.reviewer_agent_id} vs. ${item.target_agent_id}` }),
|
|
2671
|
+
/* @__PURE__ */ jsx28(Badge, { variant: "neutral", children: item.issue_type })
|
|
2672
|
+
] }),
|
|
2673
|
+
/* @__PURE__ */ jsxs20("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-2.5", children: [
|
|
2674
|
+
/* @__PURE__ */ jsxs20("div", { "data-slot": "minority-option", "data-option": "A", className: "p-2.5 rounded bg-surface-2 border border-border space-y-1", children: [
|
|
2675
|
+
/* @__PURE__ */ jsx28("div", { className: "font-semibold text-xs text-fg", children: `Option A (${item.target_agent_id} Position)` }),
|
|
2676
|
+
/* @__PURE__ */ jsx28("p", { className: "text-xs text-fg-muted leading-relaxed", children: item.target_position }),
|
|
2677
|
+
item.target_recommendations && item.target_recommendations.length > 0 && /* @__PURE__ */ jsx28("ul", { className: "list-disc ps-4 text-[11px] text-fg-muted space-y-0.5 pt-1", children: item.target_recommendations.map((rec, ri) => /* @__PURE__ */ jsx28("li", { children: rec }, ri)) })
|
|
2678
|
+
] }),
|
|
2679
|
+
/* @__PURE__ */ jsxs20("div", { "data-slot": "minority-option", "data-option": "B", className: "p-2.5 rounded bg-surface-2 border border-border space-y-1", children: [
|
|
2680
|
+
/* @__PURE__ */ jsx28("div", { className: "font-semibold text-xs text-fg", children: `Option B (${item.reviewer_agent_id} Position)` }),
|
|
2681
|
+
/* @__PURE__ */ jsx28("p", { className: "text-xs text-fg-muted leading-relaxed", children: item.reviewer_critique }),
|
|
2682
|
+
/* @__PURE__ */ jsxs20("p", { className: "text-xs text-fg pt-1", children: [
|
|
2683
|
+
/* @__PURE__ */ jsx28("span", { className: "text-fg-muted font-medium", children: "Proposed: " }),
|
|
2684
|
+
item.reviewer_proposed_resolution
|
|
2685
|
+
] })
|
|
2686
|
+
] })
|
|
2687
|
+
] }),
|
|
2688
|
+
/* @__PURE__ */ jsx28("div", { className: "text-xs text-primary font-medium", children: "Stakeholder Decision Required: Value judgment and review required by human stakeholder." })
|
|
2689
|
+
] }, idx)) })
|
|
2690
|
+
] }),
|
|
2691
|
+
open_amendments && open_amendments.length > 0 && /* @__PURE__ */ jsxs20("div", { "data-slot": "open-amendments", className: "space-y-2 rounded-lg border border-warn-border bg-warn-bg/20 p-3", children: [
|
|
2692
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-0.5", children: [
|
|
2693
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
|
|
2694
|
+
/* @__PURE__ */ jsx28(Badge, { variant: "warn", children: "Open Amendments" }),
|
|
2695
|
+
/* @__PURE__ */ jsx28("h4", { className: "text-sm font-semibold text-fg", children: "Advisory Amendment Notes" })
|
|
2696
|
+
] }),
|
|
2697
|
+
/* @__PURE__ */ jsx28("p", { className: "text-xs text-fg-muted", children: "The following peer amendment proposals remain open for stakeholder review:" })
|
|
2698
|
+
] }),
|
|
2699
|
+
/* @__PURE__ */ jsx28("div", { className: "space-y-2", children: open_amendments.map((amend, idx) => /* @__PURE__ */ jsxs20("div", { className: "p-2.5 rounded border border-border bg-surface space-y-1", children: [
|
|
2700
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
2701
|
+
/* @__PURE__ */ jsx28("span", { className: "font-mono text-xs font-semibold text-fg", children: `${amend.reviewer_agent_id} \u2192 ${amend.target_agent_id}` }),
|
|
2702
|
+
/* @__PURE__ */ jsx28(Badge, { variant: "warn", children: "AMEND" }),
|
|
2703
|
+
/* @__PURE__ */ jsx28(Badge, { variant: "neutral", children: amend.issue_type })
|
|
2704
|
+
] }),
|
|
2705
|
+
/* @__PURE__ */ jsx28("p", { className: "text-xs text-fg-muted", children: amend.critique }),
|
|
2706
|
+
amend.proposed_resolution && /* @__PURE__ */ jsxs20("p", { className: "text-xs text-fg", children: [
|
|
2707
|
+
/* @__PURE__ */ jsx28("span", { className: "text-fg-muted font-medium", children: "Proposed: " }),
|
|
2708
|
+
amend.proposed_resolution
|
|
2709
|
+
] })
|
|
2710
|
+
] }, idx)) })
|
|
2711
|
+
] }),
|
|
2712
|
+
staged_actions && staged_actions.length > 0 && /* @__PURE__ */ jsxs20("div", { "data-slot": "staged-actions", className: "space-y-3 pt-1", children: [
|
|
2713
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-0.5", children: [
|
|
2714
|
+
/* @__PURE__ */ jsx28("h4", { className: "text-sm font-semibold text-fg", children: "Staged Actions for Human Approval" }),
|
|
2715
|
+
/* @__PURE__ */ jsx28("p", { className: "text-xs text-fg-muted", children: "All panel-staged actions require human verification before execution." })
|
|
2716
|
+
] }),
|
|
2717
|
+
/* @__PURE__ */ jsx28("div", { className: "space-y-2", children: staged_actions.map((action, idx) => {
|
|
2718
|
+
const level = mapRiskTierToLevel(action.risk_tier);
|
|
2719
|
+
const actionId = action.id || `staged-${action.agent_id}-${action.tool_name}-${idx}`;
|
|
2720
|
+
return /* @__PURE__ */ jsx28(
|
|
2721
|
+
ApprovalCard,
|
|
2722
|
+
{
|
|
2723
|
+
id: actionId,
|
|
2724
|
+
level,
|
|
2725
|
+
label: `${action.agent_id}: ${action.tool_name}`,
|
|
2726
|
+
details: {
|
|
2727
|
+
agent: action.agent_id,
|
|
2728
|
+
tool: action.tool_name,
|
|
2729
|
+
arguments: action.tool_args || {},
|
|
2730
|
+
rationale: action.rationale || "",
|
|
2731
|
+
risk_tier: action.risk_tier
|
|
2732
|
+
},
|
|
2733
|
+
status: action.status || "pending",
|
|
2734
|
+
onDecide: onApproveStagedAction
|
|
2735
|
+
},
|
|
2736
|
+
actionId
|
|
2737
|
+
);
|
|
2738
|
+
}) })
|
|
2739
|
+
] })
|
|
2740
|
+
]
|
|
2741
|
+
}
|
|
2742
|
+
);
|
|
2743
|
+
}
|
|
2744
|
+
|
|
2745
|
+
// src/notes/RecordSearch.tsx
|
|
2746
|
+
import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2407
2747
|
function RecordSearch({
|
|
2408
2748
|
searchQuery,
|
|
2409
2749
|
onSearchChange,
|
|
@@ -2417,15 +2757,15 @@ function RecordSearch({
|
|
|
2417
2757
|
placeholder = "Search records...",
|
|
2418
2758
|
className
|
|
2419
2759
|
}) {
|
|
2420
|
-
return /* @__PURE__ */
|
|
2760
|
+
return /* @__PURE__ */ jsxs21(
|
|
2421
2761
|
"div",
|
|
2422
2762
|
{
|
|
2423
2763
|
"data-slot": "record-search",
|
|
2424
2764
|
className: cn("yc-RecordSearch-root flex flex-col gap-2.5", className),
|
|
2425
2765
|
children: [
|
|
2426
|
-
/* @__PURE__ */
|
|
2427
|
-
/* @__PURE__ */
|
|
2428
|
-
/* @__PURE__ */
|
|
2766
|
+
/* @__PURE__ */ jsxs21("div", { className: "relative flex items-center", children: [
|
|
2767
|
+
/* @__PURE__ */ jsx29("span", { className: "absolute start-3 text-fg-muted text-sm", children: "\u{1F50D}" }),
|
|
2768
|
+
/* @__PURE__ */ jsx29(
|
|
2429
2769
|
"input",
|
|
2430
2770
|
{
|
|
2431
2771
|
type: "text",
|
|
@@ -2436,7 +2776,7 @@ function RecordSearch({
|
|
|
2436
2776
|
"data-slot": "search-input"
|
|
2437
2777
|
}
|
|
2438
2778
|
),
|
|
2439
|
-
searchQuery && /* @__PURE__ */
|
|
2779
|
+
searchQuery && /* @__PURE__ */ jsx29(
|
|
2440
2780
|
"button",
|
|
2441
2781
|
{
|
|
2442
2782
|
type: "button",
|
|
@@ -2447,21 +2787,21 @@ function RecordSearch({
|
|
|
2447
2787
|
}
|
|
2448
2788
|
)
|
|
2449
2789
|
] }),
|
|
2450
|
-
/* @__PURE__ */
|
|
2790
|
+
/* @__PURE__ */ jsx29(
|
|
2451
2791
|
"div",
|
|
2452
2792
|
{
|
|
2453
2793
|
"data-slot": "filter-chips",
|
|
2454
2794
|
className: "yc-RecordSearch-chips flex flex-wrap gap-1.5",
|
|
2455
2795
|
children: filterOptions.map((opt) => {
|
|
2456
2796
|
const isSelected = opt.id === selectedFilter;
|
|
2457
|
-
return /* @__PURE__ */
|
|
2797
|
+
return /* @__PURE__ */ jsxs21(
|
|
2458
2798
|
Chip,
|
|
2459
2799
|
{
|
|
2460
2800
|
selected: isSelected,
|
|
2461
2801
|
onClick: () => onFilterChange(opt.id),
|
|
2462
2802
|
children: [
|
|
2463
2803
|
opt.label,
|
|
2464
|
-
opt.count !== void 0 && /* @__PURE__ */
|
|
2804
|
+
opt.count !== void 0 && /* @__PURE__ */ jsxs21("span", { className: "ms-1.5 text-xs text-fg-muted font-normal", children: [
|
|
2465
2805
|
"(",
|
|
2466
2806
|
opt.count,
|
|
2467
2807
|
")"
|
|
@@ -2479,7 +2819,7 @@ function RecordSearch({
|
|
|
2479
2819
|
}
|
|
2480
2820
|
|
|
2481
2821
|
// src/notes/NotesList.tsx
|
|
2482
|
-
import { jsx as
|
|
2822
|
+
import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2483
2823
|
function NotesList({
|
|
2484
2824
|
notes,
|
|
2485
2825
|
selectedNoteId,
|
|
@@ -2489,16 +2829,16 @@ function NotesList({
|
|
|
2489
2829
|
emptyDescription = "Create a new note or adjust your search filter."
|
|
2490
2830
|
}) {
|
|
2491
2831
|
if (notes.length === 0) {
|
|
2492
|
-
return /* @__PURE__ */
|
|
2832
|
+
return /* @__PURE__ */ jsx30(EmptyState, { title: emptyTitle, description: emptyDescription, className });
|
|
2493
2833
|
}
|
|
2494
|
-
return /* @__PURE__ */
|
|
2834
|
+
return /* @__PURE__ */ jsx30(
|
|
2495
2835
|
"div",
|
|
2496
2836
|
{
|
|
2497
2837
|
"data-slot": "notes-list",
|
|
2498
2838
|
className: cn("yc-NotesList-root flex flex-col gap-2 overflow-y-auto", className),
|
|
2499
2839
|
children: notes.map((note) => {
|
|
2500
2840
|
const isSelected = note.id === selectedNoteId;
|
|
2501
|
-
return /* @__PURE__ */
|
|
2841
|
+
return /* @__PURE__ */ jsxs22(
|
|
2502
2842
|
"button",
|
|
2503
2843
|
{
|
|
2504
2844
|
type: "button",
|
|
@@ -2510,15 +2850,15 @@ function NotesList({
|
|
|
2510
2850
|
isSelected ? "border-primary bg-primary-subtle/20" : "border-border bg-surface hover:bg-surface-2"
|
|
2511
2851
|
),
|
|
2512
2852
|
children: [
|
|
2513
|
-
/* @__PURE__ */
|
|
2514
|
-
/* @__PURE__ */
|
|
2515
|
-
note.pinned && /* @__PURE__ */
|
|
2853
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex items-center justify-between gap-2 pb-1", children: [
|
|
2854
|
+
/* @__PURE__ */ jsxs22("span", { className: "font-semibold text-sm text-fg truncate", children: [
|
|
2855
|
+
note.pinned && /* @__PURE__ */ jsx30("span", { className: "me-1 text-primary", children: "\u{1F4CC}" }),
|
|
2516
2856
|
note.title || "Untitled Note"
|
|
2517
2857
|
] }),
|
|
2518
|
-
/* @__PURE__ */
|
|
2858
|
+
/* @__PURE__ */ jsx30("span", { className: "text-[11px] text-fg-muted shrink-0", children: note.updatedAt })
|
|
2519
2859
|
] }),
|
|
2520
|
-
/* @__PURE__ */
|
|
2521
|
-
note.tags && note.tags.length > 0 && /* @__PURE__ */
|
|
2860
|
+
/* @__PURE__ */ jsx30("p", { className: "text-xs text-fg-muted line-clamp-2 leading-relaxed", children: note.content || "No content" }),
|
|
2861
|
+
note.tags && note.tags.length > 0 && /* @__PURE__ */ jsx30("div", { className: "mt-2 flex flex-wrap gap-1", children: note.tags.map((tag) => /* @__PURE__ */ jsx30(Badge, { variant: "neutral", children: tag }, tag)) })
|
|
2522
2862
|
]
|
|
2523
2863
|
},
|
|
2524
2864
|
note.id
|
|
@@ -2529,7 +2869,7 @@ function NotesList({
|
|
|
2529
2869
|
}
|
|
2530
2870
|
|
|
2531
2871
|
// src/notes/NoteView.tsx
|
|
2532
|
-
import { jsx as
|
|
2872
|
+
import { jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2533
2873
|
function NoteView({
|
|
2534
2874
|
note,
|
|
2535
2875
|
onEdit,
|
|
@@ -2537,7 +2877,7 @@ function NoteView({
|
|
|
2537
2877
|
onTogglePin,
|
|
2538
2878
|
className
|
|
2539
2879
|
}) {
|
|
2540
|
-
return /* @__PURE__ */
|
|
2880
|
+
return /* @__PURE__ */ jsxs23(
|
|
2541
2881
|
"div",
|
|
2542
2882
|
{
|
|
2543
2883
|
"data-slot": "note-view",
|
|
@@ -2546,25 +2886,25 @@ function NoteView({
|
|
|
2546
2886
|
className
|
|
2547
2887
|
),
|
|
2548
2888
|
children: [
|
|
2549
|
-
/* @__PURE__ */
|
|
2550
|
-
/* @__PURE__ */
|
|
2551
|
-
/* @__PURE__ */
|
|
2552
|
-
note.pinned && /* @__PURE__ */
|
|
2889
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-start justify-between gap-4 border-b border-border pb-4", children: [
|
|
2890
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
2891
|
+
/* @__PURE__ */ jsxs23("h2", { className: "yc-NoteView-title text-xl font-bold text-fg flex items-center gap-2", children: [
|
|
2892
|
+
note.pinned && /* @__PURE__ */ jsx31("span", { className: "text-primary text-base", children: "\u{1F4CC}" }),
|
|
2553
2893
|
note.title || "Untitled Note"
|
|
2554
2894
|
] }),
|
|
2555
|
-
/* @__PURE__ */
|
|
2556
|
-
/* @__PURE__ */
|
|
2895
|
+
/* @__PURE__ */ jsxs23("div", { className: "mt-1 flex items-center gap-3 text-xs text-fg-muted", children: [
|
|
2896
|
+
/* @__PURE__ */ jsxs23("span", { children: [
|
|
2557
2897
|
"Updated ",
|
|
2558
2898
|
note.updatedAt
|
|
2559
2899
|
] }),
|
|
2560
|
-
/* @__PURE__ */
|
|
2900
|
+
/* @__PURE__ */ jsxs23("span", { children: [
|
|
2561
2901
|
"Created ",
|
|
2562
2902
|
note.createdAt
|
|
2563
2903
|
] })
|
|
2564
2904
|
] })
|
|
2565
2905
|
] }),
|
|
2566
|
-
/* @__PURE__ */
|
|
2567
|
-
onTogglePin && /* @__PURE__ */
|
|
2906
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2", children: [
|
|
2907
|
+
onTogglePin && /* @__PURE__ */ jsx31(
|
|
2568
2908
|
Button,
|
|
2569
2909
|
{
|
|
2570
2910
|
size: "sm",
|
|
@@ -2574,12 +2914,12 @@ function NoteView({
|
|
|
2574
2914
|
children: note.pinned ? "Unpin" : "Pin"
|
|
2575
2915
|
}
|
|
2576
2916
|
),
|
|
2577
|
-
onEdit && /* @__PURE__ */
|
|
2578
|
-
onDelete && /* @__PURE__ */
|
|
2917
|
+
onEdit && /* @__PURE__ */ jsx31(Button, { size: "sm", variant: "secondary", onClick: () => onEdit(note), children: "Edit" }),
|
|
2918
|
+
onDelete && /* @__PURE__ */ jsx31(Button, { size: "sm", variant: "danger", onClick: () => onDelete(note.id), children: "Delete" })
|
|
2579
2919
|
] })
|
|
2580
2920
|
] }),
|
|
2581
|
-
note.tags && note.tags.length > 0 && /* @__PURE__ */
|
|
2582
|
-
/* @__PURE__ */
|
|
2921
|
+
note.tags && note.tags.length > 0 && /* @__PURE__ */ jsx31("div", { className: "mt-3 flex flex-wrap gap-1.5 pb-2", children: note.tags.map((tag) => /* @__PURE__ */ jsx31(Badge, { variant: "neutral", children: tag }, tag)) }),
|
|
2922
|
+
/* @__PURE__ */ jsx31(
|
|
2583
2923
|
"div",
|
|
2584
2924
|
{
|
|
2585
2925
|
"data-slot": "note-content",
|
|
@@ -2593,8 +2933,8 @@ function NoteView({
|
|
|
2593
2933
|
}
|
|
2594
2934
|
|
|
2595
2935
|
// src/calendar/Calendar.tsx
|
|
2596
|
-
import * as
|
|
2597
|
-
import { jsx as
|
|
2936
|
+
import * as React24 from "react";
|
|
2937
|
+
import { jsx as jsx32, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2598
2938
|
function Calendar({
|
|
2599
2939
|
events,
|
|
2600
2940
|
selectedDate = /* @__PURE__ */ new Date(),
|
|
@@ -2604,8 +2944,8 @@ function Calendar({
|
|
|
2604
2944
|
onViewModeChange,
|
|
2605
2945
|
className
|
|
2606
2946
|
}) {
|
|
2607
|
-
const [currentDate, setCurrentDate] =
|
|
2608
|
-
const [currentView, setCurrentView] =
|
|
2947
|
+
const [currentDate, setCurrentDate] = React24.useState(selectedDate);
|
|
2948
|
+
const [currentView, setCurrentView] = React24.useState(viewMode);
|
|
2609
2949
|
const activeView = onViewModeChange ? viewMode : currentView;
|
|
2610
2950
|
const setView = (v) => {
|
|
2611
2951
|
setCurrentView(v);
|
|
@@ -2641,7 +2981,7 @@ function Calendar({
|
|
|
2641
2981
|
onSelectDate?.(today);
|
|
2642
2982
|
};
|
|
2643
2983
|
const monthName = currentDate.toLocaleString("default", { month: "long", year: "numeric" });
|
|
2644
|
-
const monthDays =
|
|
2984
|
+
const monthDays = React24.useMemo(() => {
|
|
2645
2985
|
const year = currentDate.getFullYear();
|
|
2646
2986
|
const month = currentDate.getMonth();
|
|
2647
2987
|
const firstDayIndex = new Date(year, month, 1).getDay();
|
|
@@ -2664,7 +3004,7 @@ function Calendar({
|
|
|
2664
3004
|
}
|
|
2665
3005
|
return days;
|
|
2666
3006
|
}, [currentDate]);
|
|
2667
|
-
return /* @__PURE__ */
|
|
3007
|
+
return /* @__PURE__ */ jsxs24(
|
|
2668
3008
|
"div",
|
|
2669
3009
|
{
|
|
2670
3010
|
"data-slot": "calendar",
|
|
@@ -2674,16 +3014,16 @@ function Calendar({
|
|
|
2674
3014
|
className
|
|
2675
3015
|
),
|
|
2676
3016
|
children: [
|
|
2677
|
-
/* @__PURE__ */
|
|
2678
|
-
/* @__PURE__ */
|
|
2679
|
-
/* @__PURE__ */
|
|
2680
|
-
/* @__PURE__ */
|
|
2681
|
-
/* @__PURE__ */
|
|
2682
|
-
/* @__PURE__ */
|
|
2683
|
-
/* @__PURE__ */
|
|
3017
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex flex-wrap items-center justify-between gap-3 pb-4 border-b border-border", children: [
|
|
3018
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2", children: [
|
|
3019
|
+
/* @__PURE__ */ jsx32("h2", { className: "text-lg font-bold text-fg", children: monthName }),
|
|
3020
|
+
/* @__PURE__ */ jsx32(Button, { size: "sm", variant: "outline", onClick: handleToday, children: "Today" }),
|
|
3021
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-1", children: [
|
|
3022
|
+
/* @__PURE__ */ jsx32(Button, { size: "sm", variant: "ghost", onClick: handlePrev, "aria-label": "Previous", children: "\u2039" }),
|
|
3023
|
+
/* @__PURE__ */ jsx32(Button, { size: "sm", variant: "ghost", onClick: handleNext, "aria-label": "Next", children: "\u203A" })
|
|
2684
3024
|
] })
|
|
2685
3025
|
] }),
|
|
2686
|
-
/* @__PURE__ */
|
|
3026
|
+
/* @__PURE__ */ jsx32(
|
|
2687
3027
|
SegmentedControl,
|
|
2688
3028
|
{
|
|
2689
3029
|
size: "sm",
|
|
@@ -2697,16 +3037,16 @@ function Calendar({
|
|
|
2697
3037
|
}
|
|
2698
3038
|
)
|
|
2699
3039
|
] }),
|
|
2700
|
-
activeView === "month" && /* @__PURE__ */
|
|
2701
|
-
/* @__PURE__ */
|
|
2702
|
-
/* @__PURE__ */
|
|
3040
|
+
activeView === "month" && /* @__PURE__ */ jsxs24("div", { "data-slot": "month-view", className: "mt-4 flex flex-col", children: [
|
|
3041
|
+
/* @__PURE__ */ jsx32("div", { className: "grid grid-cols-7 text-center text-xs font-semibold text-fg-muted pb-2", children: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"].map((d) => /* @__PURE__ */ jsx32("div", { className: "py-1", children: d }, d)) }),
|
|
3042
|
+
/* @__PURE__ */ jsx32("div", { className: "grid grid-cols-7 gap-px bg-border rounded-lg overflow-hidden border border-border", children: monthDays.map((d, idx) => {
|
|
2703
3043
|
const dateStr = d.date.toISOString().split("T")[0];
|
|
2704
3044
|
const dayEvents = events.filter((e) => {
|
|
2705
3045
|
const s = typeof e.start === "string" ? e.start : e.start.toISOString();
|
|
2706
3046
|
return s.startsWith(dateStr);
|
|
2707
3047
|
});
|
|
2708
3048
|
const hasConflict = dayEvents.some((e) => e.conflict);
|
|
2709
|
-
return /* @__PURE__ */
|
|
3049
|
+
return /* @__PURE__ */ jsxs24(
|
|
2710
3050
|
"div",
|
|
2711
3051
|
{
|
|
2712
3052
|
onClick: () => onSelectDate?.(d.date),
|
|
@@ -2715,12 +3055,12 @@ function Calendar({
|
|
|
2715
3055
|
d.isCurrentMonth ? "bg-surface hover:bg-surface-2" : "bg-surface-2/50 text-fg-muted"
|
|
2716
3056
|
),
|
|
2717
3057
|
children: [
|
|
2718
|
-
/* @__PURE__ */
|
|
2719
|
-
/* @__PURE__ */
|
|
2720
|
-
hasConflict && /* @__PURE__ */
|
|
3058
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-center justify-between", children: [
|
|
3059
|
+
/* @__PURE__ */ jsx32("span", { className: "text-xs font-medium", children: d.dayNumber }),
|
|
3060
|
+
hasConflict && /* @__PURE__ */ jsx32(Badge, { variant: "danger", className: "text-[10px] px-1 py-0", children: "Conflict" })
|
|
2721
3061
|
] }),
|
|
2722
|
-
/* @__PURE__ */
|
|
2723
|
-
dayEvents.slice(0, 2).map((ev) => /* @__PURE__ */
|
|
3062
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-1 mt-1", children: [
|
|
3063
|
+
dayEvents.slice(0, 2).map((ev) => /* @__PURE__ */ jsx32(
|
|
2724
3064
|
"button",
|
|
2725
3065
|
{
|
|
2726
3066
|
type: "button",
|
|
@@ -2736,7 +3076,7 @@ function Calendar({
|
|
|
2736
3076
|
},
|
|
2737
3077
|
ev.id
|
|
2738
3078
|
)),
|
|
2739
|
-
dayEvents.length > 2 && /* @__PURE__ */
|
|
3079
|
+
dayEvents.length > 2 && /* @__PURE__ */ jsxs24("span", { className: "text-[10px] text-fg-muted ps-1", children: [
|
|
2740
3080
|
"+",
|
|
2741
3081
|
dayEvents.length - 2,
|
|
2742
3082
|
" more"
|
|
@@ -2748,9 +3088,9 @@ function Calendar({
|
|
|
2748
3088
|
);
|
|
2749
3089
|
}) })
|
|
2750
3090
|
] }),
|
|
2751
|
-
activeView === "week" && /* @__PURE__ */
|
|
2752
|
-
/* @__PURE__ */
|
|
2753
|
-
/* @__PURE__ */
|
|
3091
|
+
activeView === "week" && /* @__PURE__ */ jsx32("div", { "data-slot": "week-view", className: "mt-4 p-4 text-center text-sm text-fg-muted", children: /* @__PURE__ */ jsx32("div", { className: "grid grid-cols-7 gap-2", children: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"].map((dayName, idx) => /* @__PURE__ */ jsxs24("div", { className: "rounded-lg border border-border p-2 bg-surface-2", children: [
|
|
3092
|
+
/* @__PURE__ */ jsx32("div", { className: "font-semibold text-fg text-xs pb-1", children: dayName }),
|
|
3093
|
+
/* @__PURE__ */ jsx32("div", { className: "space-y-1 mt-2", children: events.slice(0, 2).map((ev) => /* @__PURE__ */ jsx32(
|
|
2754
3094
|
"div",
|
|
2755
3095
|
{
|
|
2756
3096
|
onClick: () => onSelectEvent?.(ev),
|
|
@@ -2763,7 +3103,7 @@ function Calendar({
|
|
|
2763
3103
|
ev.id
|
|
2764
3104
|
)) })
|
|
2765
3105
|
] }, idx)) }) }),
|
|
2766
|
-
activeView === "agenda" && /* @__PURE__ */
|
|
3106
|
+
activeView === "agenda" && /* @__PURE__ */ jsx32("div", { "data-slot": "agenda-view", className: "mt-4 flex flex-col gap-2", children: events.length === 0 ? /* @__PURE__ */ jsx32("div", { className: "py-8 text-center text-sm text-fg-muted", children: "No scheduled events." }) : events.map((ev) => /* @__PURE__ */ jsxs24(
|
|
2767
3107
|
"div",
|
|
2768
3108
|
{
|
|
2769
3109
|
onClick: () => onSelectEvent?.(ev),
|
|
@@ -2772,15 +3112,15 @@ function Calendar({
|
|
|
2772
3112
|
ev.conflict ? "border-danger-border bg-danger-bg/20" : "border-border bg-surface"
|
|
2773
3113
|
),
|
|
2774
3114
|
children: [
|
|
2775
|
-
/* @__PURE__ */
|
|
2776
|
-
/* @__PURE__ */
|
|
2777
|
-
/* @__PURE__ */
|
|
3115
|
+
/* @__PURE__ */ jsxs24("div", { children: [
|
|
3116
|
+
/* @__PURE__ */ jsx32("h4", { className: "text-sm font-semibold text-fg", children: ev.title }),
|
|
3117
|
+
/* @__PURE__ */ jsxs24("p", { className: "text-xs text-fg-muted", children: [
|
|
2778
3118
|
String(ev.start),
|
|
2779
3119
|
" ",
|
|
2780
3120
|
ev.location && `\u2022 ${ev.location}`
|
|
2781
3121
|
] })
|
|
2782
3122
|
] }),
|
|
2783
|
-
ev.conflict && /* @__PURE__ */
|
|
3123
|
+
ev.conflict && /* @__PURE__ */ jsx32(Badge, { variant: "danger", children: "Conflict" })
|
|
2784
3124
|
]
|
|
2785
3125
|
},
|
|
2786
3126
|
ev.id
|
|
@@ -2791,18 +3131,18 @@ function Calendar({
|
|
|
2791
3131
|
}
|
|
2792
3132
|
|
|
2793
3133
|
// src/calendar/ScheduleAgenda.tsx
|
|
2794
|
-
import { jsx as
|
|
3134
|
+
import { jsx as jsx33, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2795
3135
|
function ScheduleAgenda({
|
|
2796
3136
|
events,
|
|
2797
3137
|
onSelectEvent,
|
|
2798
3138
|
className
|
|
2799
3139
|
}) {
|
|
2800
|
-
return /* @__PURE__ */
|
|
3140
|
+
return /* @__PURE__ */ jsx33(
|
|
2801
3141
|
"div",
|
|
2802
3142
|
{
|
|
2803
3143
|
"data-slot": "schedule-agenda",
|
|
2804
3144
|
className: cn("yc-ScheduleAgenda-root flex flex-col gap-3", className),
|
|
2805
|
-
children: events.length === 0 ? /* @__PURE__ */
|
|
3145
|
+
children: events.length === 0 ? /* @__PURE__ */ jsx33("div", { className: "py-6 text-center text-sm text-fg-muted", children: "No scheduled agenda items." }) : events.map((event) => /* @__PURE__ */ jsxs25(
|
|
2806
3146
|
"div",
|
|
2807
3147
|
{
|
|
2808
3148
|
onClick: () => onSelectEvent?.(event),
|
|
@@ -2812,15 +3152,15 @@ function ScheduleAgenda({
|
|
|
2812
3152
|
event.conflict ? "border-danger-border bg-danger-bg/20" : "border-border bg-surface hover:bg-surface-2"
|
|
2813
3153
|
),
|
|
2814
3154
|
children: [
|
|
2815
|
-
/* @__PURE__ */
|
|
2816
|
-
/* @__PURE__ */
|
|
2817
|
-
/* @__PURE__ */
|
|
3155
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-0.5", children: [
|
|
3156
|
+
/* @__PURE__ */ jsx33("span", { className: "text-sm font-semibold text-fg", children: event.title }),
|
|
3157
|
+
/* @__PURE__ */ jsxs25("span", { className: "text-xs text-fg-muted", children: [
|
|
2818
3158
|
String(event.start),
|
|
2819
3159
|
" ",
|
|
2820
3160
|
event.location && `\u2022 ${event.location}`
|
|
2821
3161
|
] })
|
|
2822
3162
|
] }),
|
|
2823
|
-
event.conflict && /* @__PURE__ */
|
|
3163
|
+
event.conflict && /* @__PURE__ */ jsx33(Badge, { variant: "danger", children: "Conflict" })
|
|
2824
3164
|
]
|
|
2825
3165
|
},
|
|
2826
3166
|
event.id
|
|
@@ -2830,21 +3170,21 @@ function ScheduleAgenda({
|
|
|
2830
3170
|
}
|
|
2831
3171
|
|
|
2832
3172
|
// src/calendar/Reminders.tsx
|
|
2833
|
-
import { jsx as
|
|
3173
|
+
import { jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2834
3174
|
function Reminders({
|
|
2835
3175
|
reminders,
|
|
2836
3176
|
onComplete,
|
|
2837
3177
|
onSnooze,
|
|
2838
3178
|
className
|
|
2839
3179
|
}) {
|
|
2840
|
-
return /* @__PURE__ */
|
|
3180
|
+
return /* @__PURE__ */ jsx34(
|
|
2841
3181
|
"div",
|
|
2842
3182
|
{
|
|
2843
3183
|
"data-slot": "reminders",
|
|
2844
3184
|
className: cn("yc-Reminders-root flex flex-col gap-2", className),
|
|
2845
|
-
children: reminders.length === 0 ? /* @__PURE__ */
|
|
3185
|
+
children: reminders.length === 0 ? /* @__PURE__ */ jsx34("div", { className: "py-6 text-center text-sm text-fg-muted", children: "No reminders pending." }) : reminders.map((reminder) => {
|
|
2846
3186
|
const isDone = reminder.completed;
|
|
2847
|
-
return /* @__PURE__ */
|
|
3187
|
+
return /* @__PURE__ */ jsxs26(
|
|
2848
3188
|
"div",
|
|
2849
3189
|
{
|
|
2850
3190
|
"data-slot": "reminder-item",
|
|
@@ -2854,8 +3194,8 @@ function Reminders({
|
|
|
2854
3194
|
isDone && "opacity-60"
|
|
2855
3195
|
),
|
|
2856
3196
|
children: [
|
|
2857
|
-
/* @__PURE__ */
|
|
2858
|
-
/* @__PURE__ */
|
|
3197
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-3", children: [
|
|
3198
|
+
/* @__PURE__ */ jsx34(
|
|
2859
3199
|
"input",
|
|
2860
3200
|
{
|
|
2861
3201
|
type: "checkbox",
|
|
@@ -2865,8 +3205,8 @@ function Reminders({
|
|
|
2865
3205
|
"aria-label": `Mark ${reminder.title} as completed`
|
|
2866
3206
|
}
|
|
2867
3207
|
),
|
|
2868
|
-
/* @__PURE__ */
|
|
2869
|
-
/* @__PURE__ */
|
|
3208
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex flex-col", children: [
|
|
3209
|
+
/* @__PURE__ */ jsx34(
|
|
2870
3210
|
"span",
|
|
2871
3211
|
{
|
|
2872
3212
|
className: cn(
|
|
@@ -2876,23 +3216,23 @@ function Reminders({
|
|
|
2876
3216
|
children: reminder.title
|
|
2877
3217
|
}
|
|
2878
3218
|
),
|
|
2879
|
-
/* @__PURE__ */
|
|
2880
|
-
/* @__PURE__ */
|
|
3219
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 text-xs text-fg-muted", children: [
|
|
3220
|
+
/* @__PURE__ */ jsxs26("span", { children: [
|
|
2881
3221
|
"Due: ",
|
|
2882
3222
|
reminder.dueAt
|
|
2883
3223
|
] }),
|
|
2884
|
-
reminder.rrule && /* @__PURE__ */
|
|
3224
|
+
reminder.rrule && /* @__PURE__ */ jsxs26(Badge, { variant: "neutral", className: "text-[10px] px-1 py-0", children: [
|
|
2885
3225
|
"\u{1F504} ",
|
|
2886
3226
|
reminder.rrule
|
|
2887
3227
|
] }),
|
|
2888
|
-
reminder.snoozedUntil && /* @__PURE__ */
|
|
3228
|
+
reminder.snoozedUntil && /* @__PURE__ */ jsxs26("span", { className: "text-warn-fg", children: [
|
|
2889
3229
|
"Snoozed until ",
|
|
2890
3230
|
reminder.snoozedUntil
|
|
2891
3231
|
] })
|
|
2892
3232
|
] })
|
|
2893
3233
|
] })
|
|
2894
3234
|
] }),
|
|
2895
|
-
!isDone && onSnooze && /* @__PURE__ */
|
|
3235
|
+
!isDone && onSnooze && /* @__PURE__ */ jsx34(
|
|
2896
3236
|
Button,
|
|
2897
3237
|
{
|
|
2898
3238
|
size: "sm",
|
|
@@ -2912,37 +3252,37 @@ function Reminders({
|
|
|
2912
3252
|
}
|
|
2913
3253
|
|
|
2914
3254
|
// src/calendar/Routines.tsx
|
|
2915
|
-
import { jsx as
|
|
3255
|
+
import { jsx as jsx35, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2916
3256
|
function Routines({
|
|
2917
3257
|
routines,
|
|
2918
3258
|
onToggleActive,
|
|
2919
3259
|
className
|
|
2920
3260
|
}) {
|
|
2921
|
-
return /* @__PURE__ */
|
|
3261
|
+
return /* @__PURE__ */ jsx35(
|
|
2922
3262
|
"div",
|
|
2923
3263
|
{
|
|
2924
3264
|
"data-slot": "routines",
|
|
2925
3265
|
className: cn("yc-Routines-root flex flex-col gap-2.5", className),
|
|
2926
|
-
children: routines.length === 0 ? /* @__PURE__ */
|
|
3266
|
+
children: routines.length === 0 ? /* @__PURE__ */ jsx35("div", { className: "py-6 text-center text-sm text-fg-muted", children: "No active routines configured." }) : routines.map((routine) => /* @__PURE__ */ jsxs27(
|
|
2927
3267
|
"div",
|
|
2928
3268
|
{
|
|
2929
3269
|
"data-slot": "routine-item",
|
|
2930
3270
|
className: "yc-Routines-item flex items-center justify-between rounded-lg border border-border bg-surface p-3 shadow-1",
|
|
2931
3271
|
children: [
|
|
2932
|
-
/* @__PURE__ */
|
|
2933
|
-
/* @__PURE__ */
|
|
2934
|
-
/* @__PURE__ */
|
|
2935
|
-
/* @__PURE__ */
|
|
2936
|
-
/* @__PURE__ */
|
|
2937
|
-
routine.durationMinutes && /* @__PURE__ */
|
|
3272
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex flex-col gap-1", children: [
|
|
3273
|
+
/* @__PURE__ */ jsx35("span", { className: "text-sm font-semibold text-fg", children: routine.title }),
|
|
3274
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2 text-xs text-fg-muted", children: [
|
|
3275
|
+
/* @__PURE__ */ jsx35(Badge, { variant: "neutral", children: routine.frequency }),
|
|
3276
|
+
/* @__PURE__ */ jsx35("span", { children: routine.timeOfDay }),
|
|
3277
|
+
routine.durationMinutes && /* @__PURE__ */ jsxs27("span", { children: [
|
|
2938
3278
|
"(",
|
|
2939
3279
|
routine.durationMinutes,
|
|
2940
3280
|
" mins)"
|
|
2941
3281
|
] })
|
|
2942
3282
|
] })
|
|
2943
3283
|
] }),
|
|
2944
|
-
/* @__PURE__ */
|
|
2945
|
-
/* @__PURE__ */
|
|
3284
|
+
/* @__PURE__ */ jsxs27("label", { className: "relative inline-flex cursor-pointer items-center", children: [
|
|
3285
|
+
/* @__PURE__ */ jsx35(
|
|
2946
3286
|
"input",
|
|
2947
3287
|
{
|
|
2948
3288
|
type: "checkbox",
|
|
@@ -2952,7 +3292,7 @@ function Routines({
|
|
|
2952
3292
|
"aria-label": `Toggle ${routine.title} routine`
|
|
2953
3293
|
}
|
|
2954
3294
|
),
|
|
2955
|
-
/* @__PURE__ */
|
|
3295
|
+
/* @__PURE__ */ jsx35("div", { className: "h-6 w-11 rounded-full bg-surface-3 peer peer-checked:bg-primary peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-border after:border after:rounded-full after:h-5 after:w-5 after:transition-all" })
|
|
2956
3296
|
] })
|
|
2957
3297
|
]
|
|
2958
3298
|
},
|
|
@@ -2963,7 +3303,7 @@ function Routines({
|
|
|
2963
3303
|
}
|
|
2964
3304
|
|
|
2965
3305
|
// src/calendar/ActivityTimeline.tsx
|
|
2966
|
-
import { jsx as
|
|
3306
|
+
import { jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2967
3307
|
var statusColors = {
|
|
2968
3308
|
info: "bg-info-fg",
|
|
2969
3309
|
success: "bg-success-fg",
|
|
@@ -2971,18 +3311,18 @@ var statusColors = {
|
|
|
2971
3311
|
danger: "bg-danger-fg"
|
|
2972
3312
|
};
|
|
2973
3313
|
function ActivityTimeline({ events, className }) {
|
|
2974
|
-
return /* @__PURE__ */
|
|
3314
|
+
return /* @__PURE__ */ jsx36(
|
|
2975
3315
|
"div",
|
|
2976
3316
|
{
|
|
2977
3317
|
"data-slot": "activity-timeline",
|
|
2978
3318
|
className: cn("yc-ActivityTimeline-root flex flex-col", className),
|
|
2979
|
-
children: events.length === 0 ? /* @__PURE__ */
|
|
3319
|
+
children: events.length === 0 ? /* @__PURE__ */ jsx36("div", { className: "py-6 text-center text-sm text-fg-muted", children: "No timeline activities." }) : /* @__PURE__ */ jsx36("div", { className: "relative border-s border-border ms-3.5 space-y-6 my-2", children: events.map((ev) => /* @__PURE__ */ jsxs28(
|
|
2980
3320
|
"div",
|
|
2981
3321
|
{
|
|
2982
3322
|
"data-slot": "timeline-item",
|
|
2983
3323
|
className: "yc-ActivityTimeline-item relative ps-6",
|
|
2984
3324
|
children: [
|
|
2985
|
-
/* @__PURE__ */
|
|
3325
|
+
/* @__PURE__ */ jsx36(
|
|
2986
3326
|
"span",
|
|
2987
3327
|
{
|
|
2988
3328
|
className: cn(
|
|
@@ -2991,12 +3331,12 @@ function ActivityTimeline({ events, className }) {
|
|
|
2991
3331
|
)
|
|
2992
3332
|
}
|
|
2993
3333
|
),
|
|
2994
|
-
/* @__PURE__ */
|
|
2995
|
-
/* @__PURE__ */
|
|
2996
|
-
/* @__PURE__ */
|
|
2997
|
-
/* @__PURE__ */
|
|
3334
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex flex-col", children: [
|
|
3335
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between gap-2", children: [
|
|
3336
|
+
/* @__PURE__ */ jsx36("span", { className: "text-sm font-semibold text-fg", children: ev.title }),
|
|
3337
|
+
/* @__PURE__ */ jsx36("span", { className: "text-xs text-fg-muted", children: ev.timestamp })
|
|
2998
3338
|
] }),
|
|
2999
|
-
ev.description && /* @__PURE__ */
|
|
3339
|
+
ev.description && /* @__PURE__ */ jsx36("p", { className: "mt-1 text-xs text-fg-muted leading-relaxed", children: ev.description })
|
|
3000
3340
|
] })
|
|
3001
3341
|
]
|
|
3002
3342
|
},
|
|
@@ -3007,7 +3347,7 @@ function ActivityTimeline({ events, className }) {
|
|
|
3007
3347
|
}
|
|
3008
3348
|
|
|
3009
3349
|
// src/profiles/ProfileSwitcher.tsx
|
|
3010
|
-
import { jsx as
|
|
3350
|
+
import { jsx as jsx37, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3011
3351
|
function ProfileSwitcher({
|
|
3012
3352
|
members,
|
|
3013
3353
|
activeMemberId,
|
|
@@ -3015,21 +3355,21 @@ function ProfileSwitcher({
|
|
|
3015
3355
|
className
|
|
3016
3356
|
}) {
|
|
3017
3357
|
const activeMember = members.find((m) => m.id === activeMemberId) || members[0];
|
|
3018
|
-
return /* @__PURE__ */
|
|
3358
|
+
return /* @__PURE__ */ jsx37(
|
|
3019
3359
|
"div",
|
|
3020
3360
|
{
|
|
3021
3361
|
"data-slot": "profile-switcher",
|
|
3022
3362
|
className: cn("yc-ProfileSwitcher-root inline-block", className),
|
|
3023
|
-
children: /* @__PURE__ */
|
|
3024
|
-
/* @__PURE__ */
|
|
3025
|
-
/* @__PURE__ */
|
|
3026
|
-
/* @__PURE__ */
|
|
3027
|
-
/* @__PURE__ */
|
|
3028
|
-
activeMember?.relationship && /* @__PURE__ */
|
|
3363
|
+
children: /* @__PURE__ */ jsxs29(Menu, { children: [
|
|
3364
|
+
/* @__PURE__ */ jsxs29(MenuTrigger, { className: "flex items-center gap-2 rounded-lg border border-border bg-surface px-2.5 py-1.5 shadow-1 hover:bg-surface-2 transition-colors", children: [
|
|
3365
|
+
/* @__PURE__ */ jsx37(Avatar, { size: "sm", children: activeMember?.avatarUrl ? /* @__PURE__ */ jsx37(AvatarImage, { src: activeMember.avatarUrl, alt: activeMember.displayName }) : /* @__PURE__ */ jsx37(AvatarFallback, { children: activeMember ? activeMember.displayName.substring(0, 2).toUpperCase() : "ME" }) }),
|
|
3366
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex flex-col text-start", children: [
|
|
3367
|
+
/* @__PURE__ */ jsx37("span", { className: "text-xs font-semibold text-fg", children: activeMember ? activeMember.displayName : "Select Profile" }),
|
|
3368
|
+
activeMember?.relationship && /* @__PURE__ */ jsx37("span", { className: "text-[10px] text-fg-muted", children: activeMember.relationship })
|
|
3029
3369
|
] }),
|
|
3030
|
-
/* @__PURE__ */
|
|
3370
|
+
/* @__PURE__ */ jsx37("span", { className: "ms-1 text-xs text-fg-muted", children: "\u25BE" })
|
|
3031
3371
|
] }),
|
|
3032
|
-
/* @__PURE__ */
|
|
3372
|
+
/* @__PURE__ */ jsx37(MenuContent, { align: "start", children: members.map((member) => /* @__PURE__ */ jsxs29(
|
|
3033
3373
|
MenuItem,
|
|
3034
3374
|
{
|
|
3035
3375
|
onClick: () => onSelectMember(member.id),
|
|
@@ -3038,10 +3378,10 @@ function ProfileSwitcher({
|
|
|
3038
3378
|
member.id === activeMemberId && "bg-surface-2 font-semibold"
|
|
3039
3379
|
),
|
|
3040
3380
|
children: [
|
|
3041
|
-
/* @__PURE__ */
|
|
3042
|
-
/* @__PURE__ */
|
|
3043
|
-
/* @__PURE__ */
|
|
3044
|
-
/* @__PURE__ */
|
|
3381
|
+
/* @__PURE__ */ jsx37(Avatar, { size: "sm", children: member.avatarUrl ? /* @__PURE__ */ jsx37(AvatarImage, { src: member.avatarUrl, alt: member.displayName }) : /* @__PURE__ */ jsx37(AvatarFallback, { children: member.displayName.substring(0, 2).toUpperCase() }) }),
|
|
3382
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex flex-col text-start", children: [
|
|
3383
|
+
/* @__PURE__ */ jsx37("span", { className: "text-xs text-fg", children: member.displayName }),
|
|
3384
|
+
/* @__PURE__ */ jsx37("span", { className: "text-[10px] text-fg-muted", children: member.relationship || member.role })
|
|
3045
3385
|
] })
|
|
3046
3386
|
]
|
|
3047
3387
|
},
|
|
@@ -3053,7 +3393,7 @@ function ProfileSwitcher({
|
|
|
3053
3393
|
}
|
|
3054
3394
|
|
|
3055
3395
|
// src/profiles/MemberCard.tsx
|
|
3056
|
-
import { jsx as
|
|
3396
|
+
import { jsx as jsx38, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3057
3397
|
var roleBadgeVariant = {
|
|
3058
3398
|
owner: "primary",
|
|
3059
3399
|
steward: "info",
|
|
@@ -3061,7 +3401,7 @@ var roleBadgeVariant = {
|
|
|
3061
3401
|
viewer: "warn"
|
|
3062
3402
|
};
|
|
3063
3403
|
function MemberCard({ member, onEdit, className }) {
|
|
3064
|
-
return /* @__PURE__ */
|
|
3404
|
+
return /* @__PURE__ */ jsxs30(
|
|
3065
3405
|
"div",
|
|
3066
3406
|
{
|
|
3067
3407
|
"data-slot": "member-card",
|
|
@@ -3070,15 +3410,15 @@ function MemberCard({ member, onEdit, className }) {
|
|
|
3070
3410
|
className
|
|
3071
3411
|
),
|
|
3072
3412
|
children: [
|
|
3073
|
-
/* @__PURE__ */
|
|
3074
|
-
/* @__PURE__ */
|
|
3075
|
-
/* @__PURE__ */
|
|
3076
|
-
/* @__PURE__ */
|
|
3077
|
-
/* @__PURE__ */
|
|
3078
|
-
/* @__PURE__ */
|
|
3413
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-3", children: [
|
|
3414
|
+
/* @__PURE__ */ jsx38(Avatar, { size: "md", children: member.avatarUrl ? /* @__PURE__ */ jsx38(AvatarImage, { src: member.avatarUrl, alt: member.displayName }) : /* @__PURE__ */ jsx38(AvatarFallback, { children: member.displayName.substring(0, 2).toUpperCase() }) }),
|
|
3415
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex flex-col", children: [
|
|
3416
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2", children: [
|
|
3417
|
+
/* @__PURE__ */ jsx38("span", { className: "text-sm font-bold text-fg", children: member.displayName }),
|
|
3418
|
+
/* @__PURE__ */ jsx38(Badge, { variant: roleBadgeVariant[member.role], children: member.role })
|
|
3079
3419
|
] }),
|
|
3080
|
-
member.relationship && /* @__PURE__ */
|
|
3081
|
-
member.scopes && member.scopes.length > 0 && /* @__PURE__ */
|
|
3420
|
+
member.relationship && /* @__PURE__ */ jsx38("span", { className: "text-xs text-fg-muted", children: member.relationship }),
|
|
3421
|
+
member.scopes && member.scopes.length > 0 && /* @__PURE__ */ jsx38("div", { className: "mt-1 flex flex-wrap gap-1", children: member.scopes.map((scope) => /* @__PURE__ */ jsx38(
|
|
3082
3422
|
"span",
|
|
3083
3423
|
{
|
|
3084
3424
|
className: "rounded bg-surface-2 px-1.5 py-0.5 text-[10px] text-fg-muted",
|
|
@@ -3088,25 +3428,25 @@ function MemberCard({ member, onEdit, className }) {
|
|
|
3088
3428
|
)) })
|
|
3089
3429
|
] })
|
|
3090
3430
|
] }),
|
|
3091
|
-
onEdit && /* @__PURE__ */
|
|
3431
|
+
onEdit && /* @__PURE__ */ jsx38(Button, { size: "sm", variant: "ghost", onClick: () => onEdit(member), children: "Edit" })
|
|
3092
3432
|
]
|
|
3093
3433
|
}
|
|
3094
3434
|
);
|
|
3095
3435
|
}
|
|
3096
3436
|
|
|
3097
3437
|
// src/profiles/ProfileEditModal.tsx
|
|
3098
|
-
import * as
|
|
3099
|
-
import { jsx as
|
|
3438
|
+
import * as React25 from "react";
|
|
3439
|
+
import { jsx as jsx39, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3100
3440
|
function ProfileEditModal({
|
|
3101
3441
|
member,
|
|
3102
3442
|
open,
|
|
3103
3443
|
onOpenChange,
|
|
3104
3444
|
onSave
|
|
3105
3445
|
}) {
|
|
3106
|
-
const [displayName, setDisplayName] =
|
|
3107
|
-
const [relationship, setRelationship] =
|
|
3108
|
-
const [role, setRole] =
|
|
3109
|
-
|
|
3446
|
+
const [displayName, setDisplayName] = React25.useState(member?.displayName || "");
|
|
3447
|
+
const [relationship, setRelationship] = React25.useState(member?.relationship || "");
|
|
3448
|
+
const [role, setRole] = React25.useState(member?.role || "member");
|
|
3449
|
+
React25.useEffect(() => {
|
|
3110
3450
|
if (member) {
|
|
3111
3451
|
setDisplayName(member.displayName);
|
|
3112
3452
|
setRelationship(member.relationship || "");
|
|
@@ -3124,12 +3464,12 @@ function ProfileEditModal({
|
|
|
3124
3464
|
});
|
|
3125
3465
|
onOpenChange(false);
|
|
3126
3466
|
};
|
|
3127
|
-
return /* @__PURE__ */
|
|
3128
|
-
/* @__PURE__ */
|
|
3129
|
-
/* @__PURE__ */
|
|
3130
|
-
/* @__PURE__ */
|
|
3131
|
-
/* @__PURE__ */
|
|
3132
|
-
/* @__PURE__ */
|
|
3467
|
+
return /* @__PURE__ */ jsx39(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsx39(DialogContent, { className: "yc-ProfileEditModal-content max-w-md", children: /* @__PURE__ */ jsxs31("form", { onSubmit: handleSubmit, "data-slot": "profile-edit-modal", children: [
|
|
3468
|
+
/* @__PURE__ */ jsx39(DialogHeader, { children: /* @__PURE__ */ jsx39(DialogTitle, { children: "Edit Profile" }) }),
|
|
3469
|
+
/* @__PURE__ */ jsxs31("div", { className: "space-y-4 py-4 text-xs", children: [
|
|
3470
|
+
/* @__PURE__ */ jsxs31("div", { children: [
|
|
3471
|
+
/* @__PURE__ */ jsx39("label", { className: "block font-medium text-fg mb-1", children: "Display Name" }),
|
|
3472
|
+
/* @__PURE__ */ jsx39(
|
|
3133
3473
|
"input",
|
|
3134
3474
|
{
|
|
3135
3475
|
type: "text",
|
|
@@ -3140,9 +3480,9 @@ function ProfileEditModal({
|
|
|
3140
3480
|
}
|
|
3141
3481
|
)
|
|
3142
3482
|
] }),
|
|
3143
|
-
/* @__PURE__ */
|
|
3144
|
-
/* @__PURE__ */
|
|
3145
|
-
/* @__PURE__ */
|
|
3483
|
+
/* @__PURE__ */ jsxs31("div", { children: [
|
|
3484
|
+
/* @__PURE__ */ jsx39("label", { className: "block font-medium text-fg mb-1", children: "Relationship" }),
|
|
3485
|
+
/* @__PURE__ */ jsx39(
|
|
3146
3486
|
"input",
|
|
3147
3487
|
{
|
|
3148
3488
|
type: "text",
|
|
@@ -3153,33 +3493,33 @@ function ProfileEditModal({
|
|
|
3153
3493
|
}
|
|
3154
3494
|
)
|
|
3155
3495
|
] }),
|
|
3156
|
-
/* @__PURE__ */
|
|
3157
|
-
/* @__PURE__ */
|
|
3158
|
-
/* @__PURE__ */
|
|
3496
|
+
/* @__PURE__ */ jsxs31("div", { children: [
|
|
3497
|
+
/* @__PURE__ */ jsx39("label", { className: "block font-medium text-fg mb-1", children: "Role" }),
|
|
3498
|
+
/* @__PURE__ */ jsxs31(
|
|
3159
3499
|
"select",
|
|
3160
3500
|
{
|
|
3161
3501
|
value: role,
|
|
3162
3502
|
onChange: (e) => setRole(e.target.value),
|
|
3163
3503
|
className: "w-full rounded-md border border-border bg-surface-2 p-2 text-sm text-fg focus:border-primary focus:outline-none",
|
|
3164
3504
|
children: [
|
|
3165
|
-
/* @__PURE__ */
|
|
3166
|
-
/* @__PURE__ */
|
|
3167
|
-
/* @__PURE__ */
|
|
3168
|
-
/* @__PURE__ */
|
|
3505
|
+
/* @__PURE__ */ jsx39("option", { value: "owner", children: "Owner" }),
|
|
3506
|
+
/* @__PURE__ */ jsx39("option", { value: "steward", children: "Steward" }),
|
|
3507
|
+
/* @__PURE__ */ jsx39("option", { value: "member", children: "Member" }),
|
|
3508
|
+
/* @__PURE__ */ jsx39("option", { value: "viewer", children: "Viewer" })
|
|
3169
3509
|
]
|
|
3170
3510
|
}
|
|
3171
3511
|
)
|
|
3172
3512
|
] })
|
|
3173
3513
|
] }),
|
|
3174
|
-
/* @__PURE__ */
|
|
3175
|
-
/* @__PURE__ */
|
|
3176
|
-
/* @__PURE__ */
|
|
3514
|
+
/* @__PURE__ */ jsxs31(DialogFooter, { className: "gap-2", children: [
|
|
3515
|
+
/* @__PURE__ */ jsx39(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx39(Button, { type: "button", variant: "ghost", size: "sm", children: "Cancel" }) }),
|
|
3516
|
+
/* @__PURE__ */ jsx39(Button, { type: "submit", variant: "primary", size: "sm", children: "Save Changes" })
|
|
3177
3517
|
] })
|
|
3178
3518
|
] }) }) });
|
|
3179
3519
|
}
|
|
3180
3520
|
|
|
3181
3521
|
// src/profiles/RoleMatrix.tsx
|
|
3182
|
-
import { jsx as
|
|
3522
|
+
import { jsx as jsx40, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3183
3523
|
function RoleMatrix({
|
|
3184
3524
|
permissions,
|
|
3185
3525
|
onChange,
|
|
@@ -3195,7 +3535,7 @@ function RoleMatrix({
|
|
|
3195
3535
|
};
|
|
3196
3536
|
onChange(next);
|
|
3197
3537
|
};
|
|
3198
|
-
return /* @__PURE__ */
|
|
3538
|
+
return /* @__PURE__ */ jsx40(
|
|
3199
3539
|
"div",
|
|
3200
3540
|
{
|
|
3201
3541
|
"data-slot": "role-matrix",
|
|
@@ -3203,16 +3543,16 @@ function RoleMatrix({
|
|
|
3203
3543
|
"yc-RoleMatrix-root overflow-x-auto rounded-xl border border-border bg-surface text-fg shadow-1",
|
|
3204
3544
|
className
|
|
3205
3545
|
),
|
|
3206
|
-
children: /* @__PURE__ */
|
|
3207
|
-
/* @__PURE__ */
|
|
3208
|
-
/* @__PURE__ */
|
|
3209
|
-
/* @__PURE__ */
|
|
3210
|
-
/* @__PURE__ */
|
|
3211
|
-
/* @__PURE__ */
|
|
3546
|
+
children: /* @__PURE__ */ jsxs32("table", { className: "w-full text-start text-xs", children: [
|
|
3547
|
+
/* @__PURE__ */ jsx40("thead", { className: "border-b border-border bg-surface-2 text-fg-muted font-semibold", children: /* @__PURE__ */ jsxs32("tr", { children: [
|
|
3548
|
+
/* @__PURE__ */ jsx40("th", { className: "p-3 text-start", children: "Domain Scope" }),
|
|
3549
|
+
/* @__PURE__ */ jsx40("th", { className: "p-3 text-center", children: "Read" }),
|
|
3550
|
+
/* @__PURE__ */ jsx40("th", { className: "p-3 text-center", children: "Write" }),
|
|
3551
|
+
/* @__PURE__ */ jsx40("th", { className: "p-3 text-center", children: "Approve" })
|
|
3212
3552
|
] }) }),
|
|
3213
|
-
/* @__PURE__ */
|
|
3214
|
-
/* @__PURE__ */
|
|
3215
|
-
/* @__PURE__ */
|
|
3553
|
+
/* @__PURE__ */ jsx40("tbody", { className: "divide-y divide-border", children: permissions.map((perm, idx) => /* @__PURE__ */ jsxs32("tr", { className: "hover:bg-surface-2/50 transition-colors", children: [
|
|
3554
|
+
/* @__PURE__ */ jsx40("td", { className: "p-3 font-medium text-fg capitalize", children: perm.domain }),
|
|
3555
|
+
/* @__PURE__ */ jsx40("td", { className: "p-3 text-center", children: /* @__PURE__ */ jsx40(
|
|
3216
3556
|
"input",
|
|
3217
3557
|
{
|
|
3218
3558
|
type: "checkbox",
|
|
@@ -3223,7 +3563,7 @@ function RoleMatrix({
|
|
|
3223
3563
|
"aria-label": `Read permission for ${perm.domain}`
|
|
3224
3564
|
}
|
|
3225
3565
|
) }),
|
|
3226
|
-
/* @__PURE__ */
|
|
3566
|
+
/* @__PURE__ */ jsx40("td", { className: "p-3 text-center", children: /* @__PURE__ */ jsx40(
|
|
3227
3567
|
"input",
|
|
3228
3568
|
{
|
|
3229
3569
|
type: "checkbox",
|
|
@@ -3234,7 +3574,7 @@ function RoleMatrix({
|
|
|
3234
3574
|
"aria-label": `Write permission for ${perm.domain}`
|
|
3235
3575
|
}
|
|
3236
3576
|
) }),
|
|
3237
|
-
/* @__PURE__ */
|
|
3577
|
+
/* @__PURE__ */ jsx40("td", { className: "p-3 text-center", children: /* @__PURE__ */ jsx40(
|
|
3238
3578
|
"input",
|
|
3239
3579
|
{
|
|
3240
3580
|
type: "checkbox",
|
|
@@ -3252,18 +3592,18 @@ function RoleMatrix({
|
|
|
3252
3592
|
}
|
|
3253
3593
|
|
|
3254
3594
|
// src/profiles/ViewerInvite.tsx
|
|
3255
|
-
import * as
|
|
3256
|
-
import { jsx as
|
|
3595
|
+
import * as React26 from "react";
|
|
3596
|
+
import { jsx as jsx41, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3257
3597
|
function ViewerInvite({
|
|
3258
3598
|
availableScopes = ["general", "notes", "calendar", "finances", "records"],
|
|
3259
3599
|
onSendInvite,
|
|
3260
3600
|
className
|
|
3261
3601
|
}) {
|
|
3262
|
-
const [email, setEmail] =
|
|
3263
|
-
const [selectedScopes, setSelectedScopes] =
|
|
3264
|
-
const [expiresInDays, setExpiresInDays] =
|
|
3265
|
-
const [sent, setSent] =
|
|
3266
|
-
const [loading, setLoading] =
|
|
3602
|
+
const [email, setEmail] = React26.useState("");
|
|
3603
|
+
const [selectedScopes, setSelectedScopes] = React26.useState(["general"]);
|
|
3604
|
+
const [expiresInDays, setExpiresInDays] = React26.useState(7);
|
|
3605
|
+
const [sent, setSent] = React26.useState(false);
|
|
3606
|
+
const [loading, setLoading] = React26.useState(false);
|
|
3267
3607
|
const toggleScope = (scope) => {
|
|
3268
3608
|
setSelectedScopes(
|
|
3269
3609
|
(prev) => prev.includes(scope) ? prev.filter((s) => s !== scope) : [...prev, scope]
|
|
@@ -3285,7 +3625,7 @@ function ViewerInvite({
|
|
|
3285
3625
|
setLoading(false);
|
|
3286
3626
|
}
|
|
3287
3627
|
};
|
|
3288
|
-
return /* @__PURE__ */
|
|
3628
|
+
return /* @__PURE__ */ jsxs33(
|
|
3289
3629
|
"div",
|
|
3290
3630
|
{
|
|
3291
3631
|
"data-slot": "viewer-invite",
|
|
@@ -3294,16 +3634,16 @@ function ViewerInvite({
|
|
|
3294
3634
|
className
|
|
3295
3635
|
),
|
|
3296
3636
|
children: [
|
|
3297
|
-
/* @__PURE__ */
|
|
3298
|
-
/* @__PURE__ */
|
|
3299
|
-
sent ? /* @__PURE__ */
|
|
3300
|
-
/* @__PURE__ */
|
|
3301
|
-
/* @__PURE__ */
|
|
3637
|
+
/* @__PURE__ */ jsx41("h3", { className: "text-base font-bold text-fg", children: "Invite Viewer" }),
|
|
3638
|
+
/* @__PURE__ */ jsx41("p", { className: "mt-1 text-fg-muted leading-relaxed", children: "Grant time-limited, read-only access to selected record scopes." }),
|
|
3639
|
+
sent ? /* @__PURE__ */ jsxs33("div", { className: "mt-4 rounded-lg bg-success-bg/30 border border-success-border p-4 text-center", children: [
|
|
3640
|
+
/* @__PURE__ */ jsx41("span", { className: "font-semibold text-success-fg", children: "Invitation Sent!" }),
|
|
3641
|
+
/* @__PURE__ */ jsxs33("p", { className: "mt-1 text-fg-muted", children: [
|
|
3302
3642
|
"An invitation link has been dispatched to ",
|
|
3303
3643
|
email,
|
|
3304
3644
|
"."
|
|
3305
3645
|
] }),
|
|
3306
|
-
/* @__PURE__ */
|
|
3646
|
+
/* @__PURE__ */ jsx41(
|
|
3307
3647
|
Button,
|
|
3308
3648
|
{
|
|
3309
3649
|
size: "sm",
|
|
@@ -3316,10 +3656,10 @@ function ViewerInvite({
|
|
|
3316
3656
|
children: "Invite Another"
|
|
3317
3657
|
}
|
|
3318
3658
|
)
|
|
3319
|
-
] }) : /* @__PURE__ */
|
|
3320
|
-
/* @__PURE__ */
|
|
3321
|
-
/* @__PURE__ */
|
|
3322
|
-
/* @__PURE__ */
|
|
3659
|
+
] }) : /* @__PURE__ */ jsxs33("form", { onSubmit: handleSubmit, className: "mt-4 space-y-4", children: [
|
|
3660
|
+
/* @__PURE__ */ jsxs33("div", { children: [
|
|
3661
|
+
/* @__PURE__ */ jsx41("label", { className: "block font-medium text-fg mb-1", children: "Viewer Email Address" }),
|
|
3662
|
+
/* @__PURE__ */ jsx41(
|
|
3323
3663
|
"input",
|
|
3324
3664
|
{
|
|
3325
3665
|
type: "email",
|
|
@@ -3331,9 +3671,9 @@ function ViewerInvite({
|
|
|
3331
3671
|
}
|
|
3332
3672
|
)
|
|
3333
3673
|
] }),
|
|
3334
|
-
/* @__PURE__ */
|
|
3335
|
-
/* @__PURE__ */
|
|
3336
|
-
/* @__PURE__ */
|
|
3674
|
+
/* @__PURE__ */ jsxs33("div", { children: [
|
|
3675
|
+
/* @__PURE__ */ jsx41("label", { className: "block font-medium text-fg mb-1", children: "Allowed Scopes" }),
|
|
3676
|
+
/* @__PURE__ */ jsx41("div", { className: "flex flex-wrap gap-1.5 mt-1", children: availableScopes.map((scope) => /* @__PURE__ */ jsx41(
|
|
3337
3677
|
Chip,
|
|
3338
3678
|
{
|
|
3339
3679
|
selected: selectedScopes.includes(scope),
|
|
@@ -3343,24 +3683,24 @@ function ViewerInvite({
|
|
|
3343
3683
|
scope
|
|
3344
3684
|
)) })
|
|
3345
3685
|
] }),
|
|
3346
|
-
/* @__PURE__ */
|
|
3347
|
-
/* @__PURE__ */
|
|
3348
|
-
/* @__PURE__ */
|
|
3686
|
+
/* @__PURE__ */ jsxs33("div", { children: [
|
|
3687
|
+
/* @__PURE__ */ jsx41("label", { className: "block font-medium text-fg mb-1", children: "Access Expiration" }),
|
|
3688
|
+
/* @__PURE__ */ jsxs33(
|
|
3349
3689
|
"select",
|
|
3350
3690
|
{
|
|
3351
3691
|
value: expiresInDays,
|
|
3352
3692
|
onChange: (e) => setExpiresInDays(Number(e.target.value)),
|
|
3353
3693
|
className: "w-full rounded-md border border-border bg-surface-2 p-2 text-sm text-fg focus:border-primary focus:outline-none",
|
|
3354
3694
|
children: [
|
|
3355
|
-
/* @__PURE__ */
|
|
3356
|
-
/* @__PURE__ */
|
|
3357
|
-
/* @__PURE__ */
|
|
3358
|
-
/* @__PURE__ */
|
|
3695
|
+
/* @__PURE__ */ jsx41("option", { value: 1, children: "24 hours" }),
|
|
3696
|
+
/* @__PURE__ */ jsx41("option", { value: 7, children: "7 days" }),
|
|
3697
|
+
/* @__PURE__ */ jsx41("option", { value: 30, children: "30 days" }),
|
|
3698
|
+
/* @__PURE__ */ jsx41("option", { value: 90, children: "90 days" })
|
|
3359
3699
|
]
|
|
3360
3700
|
}
|
|
3361
3701
|
)
|
|
3362
3702
|
] }),
|
|
3363
|
-
/* @__PURE__ */
|
|
3703
|
+
/* @__PURE__ */ jsx41(Button, { type: "submit", variant: "primary", size: "sm", loading, className: "w-full", children: "Send Secure Invitation" })
|
|
3364
3704
|
] })
|
|
3365
3705
|
]
|
|
3366
3706
|
}
|
|
@@ -3368,18 +3708,18 @@ function ViewerInvite({
|
|
|
3368
3708
|
}
|
|
3369
3709
|
|
|
3370
3710
|
// src/profiles/ShareBundle.tsx
|
|
3371
|
-
import * as
|
|
3372
|
-
import { jsx as
|
|
3711
|
+
import * as React27 from "react";
|
|
3712
|
+
import { jsx as jsx42, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3373
3713
|
function ShareBundle({
|
|
3374
3714
|
availableScopes = ["general", "notes", "calendar", "finances", "records"],
|
|
3375
3715
|
onCreateBundle,
|
|
3376
3716
|
className
|
|
3377
3717
|
}) {
|
|
3378
|
-
const [name, setName] =
|
|
3379
|
-
const [selectedScopes, setSelectedScopes] =
|
|
3380
|
-
const [requiresPasscode, setRequiresPasscode] =
|
|
3381
|
-
const [bundleLink, setBundleLink] =
|
|
3382
|
-
const [loading, setLoading] =
|
|
3718
|
+
const [name, setName] = React27.useState("");
|
|
3719
|
+
const [selectedScopes, setSelectedScopes] = React27.useState(["general"]);
|
|
3720
|
+
const [requiresPasscode, setRequiresPasscode] = React27.useState(false);
|
|
3721
|
+
const [bundleLink, setBundleLink] = React27.useState(null);
|
|
3722
|
+
const [loading, setLoading] = React27.useState(false);
|
|
3383
3723
|
const toggleScope = (scope) => {
|
|
3384
3724
|
setSelectedScopes(
|
|
3385
3725
|
(prev) => prev.includes(scope) ? prev.filter((s) => s !== scope) : [...prev, scope]
|
|
@@ -3400,7 +3740,7 @@ function ShareBundle({
|
|
|
3400
3740
|
setLoading(false);
|
|
3401
3741
|
}
|
|
3402
3742
|
};
|
|
3403
|
-
return /* @__PURE__ */
|
|
3743
|
+
return /* @__PURE__ */ jsxs34(
|
|
3404
3744
|
"div",
|
|
3405
3745
|
{
|
|
3406
3746
|
"data-slot": "share-bundle",
|
|
@@ -3409,13 +3749,13 @@ function ShareBundle({
|
|
|
3409
3749
|
className
|
|
3410
3750
|
),
|
|
3411
3751
|
children: [
|
|
3412
|
-
/* @__PURE__ */
|
|
3413
|
-
/* @__PURE__ */
|
|
3414
|
-
bundleLink ? /* @__PURE__ */
|
|
3415
|
-
/* @__PURE__ */
|
|
3416
|
-
/* @__PURE__ */
|
|
3417
|
-
/* @__PURE__ */
|
|
3418
|
-
/* @__PURE__ */
|
|
3752
|
+
/* @__PURE__ */ jsx42("h3", { className: "text-base font-bold text-fg", children: "Create Share Bundle" }),
|
|
3753
|
+
/* @__PURE__ */ jsx42("p", { className: "mt-1 text-fg-muted leading-relaxed", children: "Package records into an encrypted export bundle." }),
|
|
3754
|
+
bundleLink ? /* @__PURE__ */ jsxs34("div", { className: "mt-4 rounded-lg bg-surface-2 border border-border p-4 text-center", children: [
|
|
3755
|
+
/* @__PURE__ */ jsx42("span", { className: "font-semibold text-fg", children: "Bundle Created!" }),
|
|
3756
|
+
/* @__PURE__ */ jsx42("p", { className: "mt-1 text-fg-muted", children: "Shareable bundle link:" }),
|
|
3757
|
+
/* @__PURE__ */ jsx42("div", { className: "mt-2 rounded bg-surface p-2 font-mono text-xs text-primary border border-border", children: bundleLink }),
|
|
3758
|
+
/* @__PURE__ */ jsx42(
|
|
3419
3759
|
Button,
|
|
3420
3760
|
{
|
|
3421
3761
|
size: "sm",
|
|
@@ -3428,10 +3768,10 @@ function ShareBundle({
|
|
|
3428
3768
|
children: "Create Another"
|
|
3429
3769
|
}
|
|
3430
3770
|
)
|
|
3431
|
-
] }) : /* @__PURE__ */
|
|
3432
|
-
/* @__PURE__ */
|
|
3433
|
-
/* @__PURE__ */
|
|
3434
|
-
/* @__PURE__ */
|
|
3771
|
+
] }) : /* @__PURE__ */ jsxs34("form", { onSubmit: handleCreate, className: "mt-4 space-y-4", children: [
|
|
3772
|
+
/* @__PURE__ */ jsxs34("div", { children: [
|
|
3773
|
+
/* @__PURE__ */ jsx42("label", { className: "block font-medium text-fg mb-1", children: "Bundle Name" }),
|
|
3774
|
+
/* @__PURE__ */ jsx42(
|
|
3435
3775
|
"input",
|
|
3436
3776
|
{
|
|
3437
3777
|
type: "text",
|
|
@@ -3443,9 +3783,9 @@ function ShareBundle({
|
|
|
3443
3783
|
}
|
|
3444
3784
|
)
|
|
3445
3785
|
] }),
|
|
3446
|
-
/* @__PURE__ */
|
|
3447
|
-
/* @__PURE__ */
|
|
3448
|
-
/* @__PURE__ */
|
|
3786
|
+
/* @__PURE__ */ jsxs34("div", { children: [
|
|
3787
|
+
/* @__PURE__ */ jsx42("label", { className: "block font-medium text-fg mb-1", children: "Included Scopes" }),
|
|
3788
|
+
/* @__PURE__ */ jsx42("div", { className: "flex flex-wrap gap-1.5 mt-1", children: availableScopes.map((scope) => /* @__PURE__ */ jsx42(
|
|
3449
3789
|
Chip,
|
|
3450
3790
|
{
|
|
3451
3791
|
selected: selectedScopes.includes(scope),
|
|
@@ -3455,8 +3795,8 @@ function ShareBundle({
|
|
|
3455
3795
|
scope
|
|
3456
3796
|
)) })
|
|
3457
3797
|
] }),
|
|
3458
|
-
/* @__PURE__ */
|
|
3459
|
-
/* @__PURE__ */
|
|
3798
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-2", children: [
|
|
3799
|
+
/* @__PURE__ */ jsx42(
|
|
3460
3800
|
"input",
|
|
3461
3801
|
{
|
|
3462
3802
|
id: "passcode-opt",
|
|
@@ -3466,9 +3806,9 @@ function ShareBundle({
|
|
|
3466
3806
|
className: "h-4 w-4 rounded border-border text-primary focus:ring-primary"
|
|
3467
3807
|
}
|
|
3468
3808
|
),
|
|
3469
|
-
/* @__PURE__ */
|
|
3809
|
+
/* @__PURE__ */ jsx42("label", { htmlFor: "passcode-opt", className: "font-medium text-fg cursor-pointer", children: "Protect bundle with passkey / PIN" })
|
|
3470
3810
|
] }),
|
|
3471
|
-
/* @__PURE__ */
|
|
3811
|
+
/* @__PURE__ */ jsx42(Button, { type: "submit", variant: "primary", size: "sm", loading, className: "w-full", children: "Generate Secure Bundle" })
|
|
3472
3812
|
] })
|
|
3473
3813
|
]
|
|
3474
3814
|
}
|
|
@@ -3476,7 +3816,7 @@ function ShareBundle({
|
|
|
3476
3816
|
}
|
|
3477
3817
|
|
|
3478
3818
|
// src/profiles/TeenHandoverBanner.tsx
|
|
3479
|
-
import { jsx as
|
|
3819
|
+
import { jsx as jsx43, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3480
3820
|
function TeenHandoverBanner({
|
|
3481
3821
|
memberName,
|
|
3482
3822
|
handoverDate,
|
|
@@ -3484,7 +3824,7 @@ function TeenHandoverBanner({
|
|
|
3484
3824
|
onDismiss,
|
|
3485
3825
|
className
|
|
3486
3826
|
}) {
|
|
3487
|
-
return /* @__PURE__ */
|
|
3827
|
+
return /* @__PURE__ */ jsxs35(
|
|
3488
3828
|
"div",
|
|
3489
3829
|
{
|
|
3490
3830
|
"data-slot": "teen-handover-banner",
|
|
@@ -3493,22 +3833,22 @@ function TeenHandoverBanner({
|
|
|
3493
3833
|
className
|
|
3494
3834
|
),
|
|
3495
3835
|
children: [
|
|
3496
|
-
/* @__PURE__ */
|
|
3497
|
-
/* @__PURE__ */
|
|
3498
|
-
/* @__PURE__ */
|
|
3499
|
-
/* @__PURE__ */
|
|
3500
|
-
/* @__PURE__ */
|
|
3501
|
-
/* @__PURE__ */
|
|
3836
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-start gap-3", children: [
|
|
3837
|
+
/* @__PURE__ */ jsx43("span", { className: "text-warn-fg text-lg leading-none", children: "\u26A0\uFE0F" }),
|
|
3838
|
+
/* @__PURE__ */ jsxs35("div", { children: [
|
|
3839
|
+
/* @__PURE__ */ jsx43("h4", { className: "font-semibold text-fg", children: "Privacy & Age-of-Majority Transition" }),
|
|
3840
|
+
/* @__PURE__ */ jsxs35("p", { className: "mt-0.5 text-fg-muted", children: [
|
|
3841
|
+
/* @__PURE__ */ jsx43("span", { className: "font-medium text-fg", children: memberName }),
|
|
3502
3842
|
" reaches transition age on",
|
|
3503
3843
|
" ",
|
|
3504
|
-
/* @__PURE__ */
|
|
3844
|
+
/* @__PURE__ */ jsx43("span", { className: "font-medium text-fg", children: handoverDate }),
|
|
3505
3845
|
". Account stewardship and record privacy settings should be reviewed."
|
|
3506
3846
|
] })
|
|
3507
3847
|
] })
|
|
3508
3848
|
] }),
|
|
3509
|
-
/* @__PURE__ */
|
|
3510
|
-
onDismiss && /* @__PURE__ */
|
|
3511
|
-
onInitiateHandover && /* @__PURE__ */
|
|
3849
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
3850
|
+
onDismiss && /* @__PURE__ */ jsx43(Button, { size: "sm", variant: "ghost", onClick: onDismiss, children: "Dismiss" }),
|
|
3851
|
+
onInitiateHandover && /* @__PURE__ */ jsx43(Button, { size: "sm", variant: "outline", onClick: onInitiateHandover, children: "Review Privacy" })
|
|
3512
3852
|
] })
|
|
3513
3853
|
]
|
|
3514
3854
|
}
|
|
@@ -3516,7 +3856,7 @@ function TeenHandoverBanner({
|
|
|
3516
3856
|
}
|
|
3517
3857
|
|
|
3518
3858
|
// src/tasks/TaskItem.tsx
|
|
3519
|
-
import { jsx as
|
|
3859
|
+
import { jsx as jsx44, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
3520
3860
|
var priorityBadgeVariant = {
|
|
3521
3861
|
low: "neutral",
|
|
3522
3862
|
medium: "warn",
|
|
@@ -3529,7 +3869,7 @@ function TaskItem({
|
|
|
3529
3869
|
className
|
|
3530
3870
|
}) {
|
|
3531
3871
|
const isDone = task.completed;
|
|
3532
|
-
return /* @__PURE__ */
|
|
3872
|
+
return /* @__PURE__ */ jsxs36(
|
|
3533
3873
|
"div",
|
|
3534
3874
|
{
|
|
3535
3875
|
"data-slot": "task-item",
|
|
@@ -3540,8 +3880,8 @@ function TaskItem({
|
|
|
3540
3880
|
className
|
|
3541
3881
|
),
|
|
3542
3882
|
children: [
|
|
3543
|
-
/* @__PURE__ */
|
|
3544
|
-
/* @__PURE__ */
|
|
3883
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-3", children: [
|
|
3884
|
+
/* @__PURE__ */ jsx44(
|
|
3545
3885
|
"input",
|
|
3546
3886
|
{
|
|
3547
3887
|
type: "checkbox",
|
|
@@ -3551,9 +3891,9 @@ function TaskItem({
|
|
|
3551
3891
|
"aria-label": `Mark task ${task.title} as ${isDone ? "incomplete" : "complete"}`
|
|
3552
3892
|
}
|
|
3553
3893
|
),
|
|
3554
|
-
/* @__PURE__ */
|
|
3555
|
-
/* @__PURE__ */
|
|
3556
|
-
/* @__PURE__ */
|
|
3894
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex flex-col", children: [
|
|
3895
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-2", children: [
|
|
3896
|
+
/* @__PURE__ */ jsx44(
|
|
3557
3897
|
"span",
|
|
3558
3898
|
{
|
|
3559
3899
|
className: cn(
|
|
@@ -3563,18 +3903,18 @@ function TaskItem({
|
|
|
3563
3903
|
children: task.title
|
|
3564
3904
|
}
|
|
3565
3905
|
),
|
|
3566
|
-
task.priority && /* @__PURE__ */
|
|
3906
|
+
task.priority && /* @__PURE__ */ jsx44(Badge, { variant: priorityBadgeVariant[task.priority], className: "text-[10px] px-1 py-0", children: task.priority })
|
|
3567
3907
|
] }),
|
|
3568
|
-
(task.description || task.dueAt) && /* @__PURE__ */
|
|
3569
|
-
task.description && /* @__PURE__ */
|
|
3570
|
-
task.dueAt && /* @__PURE__ */
|
|
3908
|
+
(task.description || task.dueAt) && /* @__PURE__ */ jsxs36("div", { className: "mt-0.5 flex items-center gap-2 text-xs text-fg-muted", children: [
|
|
3909
|
+
task.description && /* @__PURE__ */ jsx44("span", { children: task.description }),
|
|
3910
|
+
task.dueAt && /* @__PURE__ */ jsxs36("span", { children: [
|
|
3571
3911
|
"Due: ",
|
|
3572
3912
|
task.dueAt
|
|
3573
3913
|
] })
|
|
3574
3914
|
] })
|
|
3575
3915
|
] })
|
|
3576
3916
|
] }),
|
|
3577
|
-
onDelete && /* @__PURE__ */
|
|
3917
|
+
onDelete && /* @__PURE__ */ jsx44(
|
|
3578
3918
|
"button",
|
|
3579
3919
|
{
|
|
3580
3920
|
type: "button",
|
|
@@ -3590,8 +3930,8 @@ function TaskItem({
|
|
|
3590
3930
|
}
|
|
3591
3931
|
|
|
3592
3932
|
// src/tasks/TaskList.tsx
|
|
3593
|
-
import * as
|
|
3594
|
-
import { jsx as
|
|
3933
|
+
import * as React28 from "react";
|
|
3934
|
+
import { jsx as jsx45, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
3595
3935
|
function TaskList({
|
|
3596
3936
|
tasks,
|
|
3597
3937
|
onToggleComplete,
|
|
@@ -3601,8 +3941,8 @@ function TaskList({
|
|
|
3601
3941
|
emptyTitle = "No tasks",
|
|
3602
3942
|
emptyDescription = "You have no tasks in this view."
|
|
3603
3943
|
}) {
|
|
3604
|
-
const [filter, setFilter] =
|
|
3605
|
-
const [newTitle, setNewTitle] =
|
|
3944
|
+
const [filter, setFilter] = React28.useState("all");
|
|
3945
|
+
const [newTitle, setNewTitle] = React28.useState("");
|
|
3606
3946
|
const filtered = tasks.filter((t) => {
|
|
3607
3947
|
if (filter === "active") return !t.completed;
|
|
3608
3948
|
if (filter === "completed") return t.completed;
|
|
@@ -3615,14 +3955,14 @@ function TaskList({
|
|
|
3615
3955
|
onAddTask?.(trimmed);
|
|
3616
3956
|
setNewTitle("");
|
|
3617
3957
|
};
|
|
3618
|
-
return /* @__PURE__ */
|
|
3958
|
+
return /* @__PURE__ */ jsxs37(
|
|
3619
3959
|
"div",
|
|
3620
3960
|
{
|
|
3621
3961
|
"data-slot": "task-list",
|
|
3622
3962
|
className: cn("yc-TaskList-root flex flex-col gap-3", className),
|
|
3623
3963
|
children: [
|
|
3624
|
-
/* @__PURE__ */
|
|
3625
|
-
/* @__PURE__ */
|
|
3964
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex items-center justify-between gap-3", children: [
|
|
3965
|
+
/* @__PURE__ */ jsx45(
|
|
3626
3966
|
SegmentedControl,
|
|
3627
3967
|
{
|
|
3628
3968
|
size: "sm",
|
|
@@ -3635,13 +3975,13 @@ function TaskList({
|
|
|
3635
3975
|
]
|
|
3636
3976
|
}
|
|
3637
3977
|
),
|
|
3638
|
-
/* @__PURE__ */
|
|
3978
|
+
/* @__PURE__ */ jsxs37("span", { className: "text-xs text-fg-muted", children: [
|
|
3639
3979
|
tasks.filter((t) => !t.completed).length,
|
|
3640
3980
|
" remaining"
|
|
3641
3981
|
] })
|
|
3642
3982
|
] }),
|
|
3643
|
-
onAddTask && /* @__PURE__ */
|
|
3644
|
-
/* @__PURE__ */
|
|
3983
|
+
onAddTask && /* @__PURE__ */ jsxs37("form", { onSubmit: handleAdd, className: "flex gap-2", children: [
|
|
3984
|
+
/* @__PURE__ */ jsx45(
|
|
3645
3985
|
"input",
|
|
3646
3986
|
{
|
|
3647
3987
|
type: "text",
|
|
@@ -3651,9 +3991,9 @@ function TaskList({
|
|
|
3651
3991
|
className: "flex-1 rounded-lg border border-border bg-surface-2 p-2 text-sm text-fg placeholder:text-fg-muted focus:border-primary focus:outline-none"
|
|
3652
3992
|
}
|
|
3653
3993
|
),
|
|
3654
|
-
/* @__PURE__ */
|
|
3994
|
+
/* @__PURE__ */ jsx45(Button, { type: "submit", variant: "primary", size: "sm", children: "Add" })
|
|
3655
3995
|
] }),
|
|
3656
|
-
filtered.length === 0 ? /* @__PURE__ */
|
|
3996
|
+
filtered.length === 0 ? /* @__PURE__ */ jsx45(EmptyState, { title: emptyTitle, description: emptyDescription }) : /* @__PURE__ */ jsx45("div", { className: "flex flex-col gap-2", children: filtered.map((task) => /* @__PURE__ */ jsx45(
|
|
3657
3997
|
TaskItem,
|
|
3658
3998
|
{
|
|
3659
3999
|
task,
|
|
@@ -3668,7 +4008,7 @@ function TaskList({
|
|
|
3668
4008
|
}
|
|
3669
4009
|
|
|
3670
4010
|
// src/notifications/NotificationCenter.tsx
|
|
3671
|
-
import { jsx as
|
|
4011
|
+
import { jsx as jsx46, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
3672
4012
|
var levelBadgeVariant2 = {
|
|
3673
4013
|
info: "info",
|
|
3674
4014
|
warn: "warn",
|
|
@@ -3683,26 +4023,26 @@ function NotificationCenter({
|
|
|
3683
4023
|
className
|
|
3684
4024
|
}) {
|
|
3685
4025
|
const unreadCount = notifications.filter((n) => !n.read).length;
|
|
3686
|
-
return /* @__PURE__ */
|
|
4026
|
+
return /* @__PURE__ */ jsx46(
|
|
3687
4027
|
"div",
|
|
3688
4028
|
{
|
|
3689
4029
|
"data-slot": "notification-center",
|
|
3690
4030
|
className: cn("yc-NotificationCenter-root inline-block", className),
|
|
3691
|
-
children: /* @__PURE__ */
|
|
3692
|
-
/* @__PURE__ */
|
|
3693
|
-
/* @__PURE__ */
|
|
3694
|
-
unreadCount > 0 && /* @__PURE__ */
|
|
4031
|
+
children: /* @__PURE__ */ jsxs38(Popover, { children: [
|
|
4032
|
+
/* @__PURE__ */ jsxs38(PopoverTrigger, { className: "relative flex items-center justify-center p-2 rounded-lg border border-border bg-surface hover:bg-surface-2 transition-colors", children: [
|
|
4033
|
+
/* @__PURE__ */ jsx46("span", { className: "text-base", role: "img", "aria-label": "Notifications", children: "\u{1F514}" }),
|
|
4034
|
+
unreadCount > 0 && /* @__PURE__ */ jsx46("span", { className: "absolute -top-1 -end-1 flex h-4 w-4 items-center justify-center rounded-full bg-danger-fg text-[10px] font-bold text-white", children: unreadCount > 9 ? "9+" : unreadCount })
|
|
3695
4035
|
] }),
|
|
3696
|
-
/* @__PURE__ */
|
|
3697
|
-
/* @__PURE__ */
|
|
3698
|
-
/* @__PURE__ */
|
|
3699
|
-
/* @__PURE__ */
|
|
3700
|
-
unreadCount > 0 && /* @__PURE__ */
|
|
4036
|
+
/* @__PURE__ */ jsxs38(PopoverContent, { align: "end", className: "w-80 p-0 shadow-3", children: [
|
|
4037
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex items-center justify-between border-b border-border p-3", children: [
|
|
4038
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-2", children: [
|
|
4039
|
+
/* @__PURE__ */ jsx46("span", { className: "font-semibold text-sm text-fg", children: "Notifications" }),
|
|
4040
|
+
unreadCount > 0 && /* @__PURE__ */ jsxs38(Badge, { variant: "primary", children: [
|
|
3701
4041
|
unreadCount,
|
|
3702
4042
|
" new"
|
|
3703
4043
|
] })
|
|
3704
4044
|
] }),
|
|
3705
|
-
unreadCount > 0 && onMarkAllRead && /* @__PURE__ */
|
|
4045
|
+
unreadCount > 0 && onMarkAllRead && /* @__PURE__ */ jsx46(
|
|
3706
4046
|
"button",
|
|
3707
4047
|
{
|
|
3708
4048
|
type: "button",
|
|
@@ -3712,7 +4052,7 @@ function NotificationCenter({
|
|
|
3712
4052
|
}
|
|
3713
4053
|
)
|
|
3714
4054
|
] }),
|
|
3715
|
-
/* @__PURE__ */
|
|
4055
|
+
/* @__PURE__ */ jsx46("div", { className: "max-h-80 overflow-y-auto divide-y divide-border", children: notifications.length === 0 ? /* @__PURE__ */ jsx46("div", { className: "p-6 text-center text-xs text-fg-muted", children: "No notifications right now." }) : notifications.map((n) => /* @__PURE__ */ jsxs38(
|
|
3716
4056
|
"div",
|
|
3717
4057
|
{
|
|
3718
4058
|
onClick: () => onSelectNotification?.(n),
|
|
@@ -3723,15 +4063,15 @@ function NotificationCenter({
|
|
|
3723
4063
|
n.read ? "bg-surface opacity-75" : "bg-surface-2/60"
|
|
3724
4064
|
),
|
|
3725
4065
|
children: [
|
|
3726
|
-
/* @__PURE__ */
|
|
3727
|
-
/* @__PURE__ */
|
|
3728
|
-
n.level && /* @__PURE__ */
|
|
3729
|
-
/* @__PURE__ */
|
|
4066
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex flex-col gap-0.5 flex-1 pe-2", children: [
|
|
4067
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-1.5", children: [
|
|
4068
|
+
n.level && /* @__PURE__ */ jsx46(Badge, { variant: levelBadgeVariant2[n.level], className: "text-[9px] px-1 py-0", children: n.level }),
|
|
4069
|
+
/* @__PURE__ */ jsx46("span", { className: "font-medium text-xs text-fg", children: n.title })
|
|
3730
4070
|
] }),
|
|
3731
|
-
n.description && /* @__PURE__ */
|
|
3732
|
-
/* @__PURE__ */
|
|
4071
|
+
n.description && /* @__PURE__ */ jsx46("p", { className: "text-[11px] text-fg-muted line-clamp-2", children: n.description }),
|
|
4072
|
+
/* @__PURE__ */ jsx46("span", { className: "text-[10px] text-fg-muted mt-1", children: n.timestamp })
|
|
3733
4073
|
] }),
|
|
3734
|
-
onDismiss && /* @__PURE__ */
|
|
4074
|
+
onDismiss && /* @__PURE__ */ jsx46(
|
|
3735
4075
|
"button",
|
|
3736
4076
|
{
|
|
3737
4077
|
type: "button",
|
|
@@ -3755,18 +4095,18 @@ function NotificationCenter({
|
|
|
3755
4095
|
}
|
|
3756
4096
|
|
|
3757
4097
|
// src/settings/SettingsLayout.tsx
|
|
3758
|
-
import * as
|
|
4098
|
+
import * as React30 from "react";
|
|
3759
4099
|
|
|
3760
4100
|
// src/slots/SlotRenderer.tsx
|
|
3761
|
-
import { useEffect as useEffect7, useState as
|
|
3762
|
-
import { Fragment as Fragment3, jsx as
|
|
4101
|
+
import { useEffect as useEffect7, useState as useState23 } from "react";
|
|
4102
|
+
import { Fragment as Fragment3, jsx as jsx47, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
3763
4103
|
var SlotRenderer = ({
|
|
3764
4104
|
contribution,
|
|
3765
4105
|
slotProps,
|
|
3766
4106
|
fallback = null
|
|
3767
4107
|
}) => {
|
|
3768
|
-
const [LoadedComp, setLoadedComp] =
|
|
3769
|
-
const [error, setError] =
|
|
4108
|
+
const [LoadedComp, setLoadedComp] = useState23(() => contribution.component ?? null);
|
|
4109
|
+
const [error, setError] = useState23(null);
|
|
3770
4110
|
useEffect7(() => {
|
|
3771
4111
|
let cancelled = false;
|
|
3772
4112
|
if (contribution.component) {
|
|
@@ -3789,19 +4129,19 @@ var SlotRenderer = ({
|
|
|
3789
4129
|
};
|
|
3790
4130
|
}, [contribution]);
|
|
3791
4131
|
if (error) {
|
|
3792
|
-
return /* @__PURE__ */
|
|
4132
|
+
return /* @__PURE__ */ jsxs39("div", { className: "yc-SlotRenderer-error text-danger text-sm p-4", "data-slot": "error", children: [
|
|
3793
4133
|
"Failed to load slot: ",
|
|
3794
4134
|
contribution.id
|
|
3795
4135
|
] });
|
|
3796
4136
|
}
|
|
3797
4137
|
if (!LoadedComp) {
|
|
3798
|
-
return /* @__PURE__ */
|
|
4138
|
+
return /* @__PURE__ */ jsx47(Fragment3, { children: fallback });
|
|
3799
4139
|
}
|
|
3800
|
-
return /* @__PURE__ */
|
|
4140
|
+
return /* @__PURE__ */ jsx47("div", { className: "yc-SlotRenderer-root", "data-slot": "root", "data-pack": contribution.pack, "data-contribution": contribution.id, children: /* @__PURE__ */ jsx47(LoadedComp, { ...slotProps }) });
|
|
3801
4141
|
};
|
|
3802
4142
|
|
|
3803
4143
|
// src/settings/SettingsLayout.tsx
|
|
3804
|
-
import { jsx as
|
|
4144
|
+
import { jsx as jsx48, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
3805
4145
|
function SettingsLayout({
|
|
3806
4146
|
sections,
|
|
3807
4147
|
activeSectionId,
|
|
@@ -3811,7 +4151,7 @@ function SettingsLayout({
|
|
|
3811
4151
|
children,
|
|
3812
4152
|
className
|
|
3813
4153
|
}) {
|
|
3814
|
-
const mergedSections =
|
|
4154
|
+
const mergedSections = React30.useMemo(() => {
|
|
3815
4155
|
const list = [...sections];
|
|
3816
4156
|
const slotSections = contributions.filter((c) => c.slot === "settings.section").map((c) => ({
|
|
3817
4157
|
id: c.id,
|
|
@@ -3822,7 +4162,7 @@ function SettingsLayout({
|
|
|
3822
4162
|
list.push(...slotSections);
|
|
3823
4163
|
return list.sort((a, b) => (a.order ?? 50) - (b.order ?? 50));
|
|
3824
4164
|
}, [sections, contributions]);
|
|
3825
|
-
const [selectedId, setSelectedId] =
|
|
4165
|
+
const [selectedId, setSelectedId] = React30.useState(
|
|
3826
4166
|
activeSectionId || (mergedSections[0]?.id ?? "")
|
|
3827
4167
|
);
|
|
3828
4168
|
const currentId = activeSectionId !== void 0 ? activeSectionId : selectedId;
|
|
@@ -3831,7 +4171,7 @@ function SettingsLayout({
|
|
|
3831
4171
|
setSelectedId(id);
|
|
3832
4172
|
onSelectSection?.(id);
|
|
3833
4173
|
};
|
|
3834
|
-
return /* @__PURE__ */
|
|
4174
|
+
return /* @__PURE__ */ jsxs40(
|
|
3835
4175
|
"div",
|
|
3836
4176
|
{
|
|
3837
4177
|
"data-slot": "settings-layout",
|
|
@@ -3840,17 +4180,17 @@ function SettingsLayout({
|
|
|
3840
4180
|
className
|
|
3841
4181
|
),
|
|
3842
4182
|
children: [
|
|
3843
|
-
/* @__PURE__ */
|
|
4183
|
+
/* @__PURE__ */ jsxs40(
|
|
3844
4184
|
"nav",
|
|
3845
4185
|
{
|
|
3846
4186
|
"data-slot": "nav",
|
|
3847
4187
|
className: "yc-SettingsLayout-nav w-full md:w-64 shrink-0 flex flex-col gap-1",
|
|
3848
4188
|
"aria-label": "Settings navigation",
|
|
3849
4189
|
children: [
|
|
3850
|
-
/* @__PURE__ */
|
|
4190
|
+
/* @__PURE__ */ jsx48("h2", { className: "text-lg font-bold text-fg px-3 pb-3", children: "Settings" }),
|
|
3851
4191
|
mergedSections.map((sec) => {
|
|
3852
4192
|
const isActive = sec.id === currentId;
|
|
3853
|
-
return /* @__PURE__ */
|
|
4193
|
+
return /* @__PURE__ */ jsxs40(
|
|
3854
4194
|
"button",
|
|
3855
4195
|
{
|
|
3856
4196
|
type: "button",
|
|
@@ -3862,8 +4202,8 @@ function SettingsLayout({
|
|
|
3862
4202
|
isActive ? "bg-surface-2 text-fg font-semibold shadow-1" : "text-fg-muted hover:bg-surface-2/60 hover:text-fg"
|
|
3863
4203
|
),
|
|
3864
4204
|
children: [
|
|
3865
|
-
sec.icon && /* @__PURE__ */
|
|
3866
|
-
/* @__PURE__ */
|
|
4205
|
+
sec.icon && /* @__PURE__ */ jsx48("span", { className: "inline-flex shrink-0", children: sec.icon }),
|
|
4206
|
+
/* @__PURE__ */ jsx48("span", { className: "truncate", children: sec.title })
|
|
3867
4207
|
]
|
|
3868
4208
|
},
|
|
3869
4209
|
sec.id
|
|
@@ -3872,23 +4212,23 @@ function SettingsLayout({
|
|
|
3872
4212
|
]
|
|
3873
4213
|
}
|
|
3874
4214
|
),
|
|
3875
|
-
/* @__PURE__ */
|
|
4215
|
+
/* @__PURE__ */ jsx48(
|
|
3876
4216
|
"main",
|
|
3877
4217
|
{
|
|
3878
4218
|
"data-slot": "content",
|
|
3879
4219
|
className: "yc-SettingsLayout-content flex-1 rounded-xl border border-border bg-surface p-6 shadow-1",
|
|
3880
|
-
children: currentSection && /* @__PURE__ */
|
|
3881
|
-
/* @__PURE__ */
|
|
3882
|
-
/* @__PURE__ */
|
|
3883
|
-
currentSection.description && /* @__PURE__ */
|
|
4220
|
+
children: currentSection && /* @__PURE__ */ jsxs40("div", { children: [
|
|
4221
|
+
/* @__PURE__ */ jsxs40("div", { className: "border-b border-border pb-4 mb-6", children: [
|
|
4222
|
+
/* @__PURE__ */ jsx48("h3", { className: "text-xl font-bold text-fg", children: currentSection.title }),
|
|
4223
|
+
currentSection.description && /* @__PURE__ */ jsx48("p", { className: "mt-1 text-sm text-fg-muted", children: currentSection.description })
|
|
3884
4224
|
] }),
|
|
3885
|
-
currentSection.slotContribution && slotProps ? /* @__PURE__ */
|
|
4225
|
+
currentSection.slotContribution && slotProps ? /* @__PURE__ */ jsx48(
|
|
3886
4226
|
SlotRenderer,
|
|
3887
4227
|
{
|
|
3888
4228
|
contribution: currentSection.slotContribution,
|
|
3889
4229
|
slotProps
|
|
3890
4230
|
}
|
|
3891
|
-
) : currentSection.component ? /* @__PURE__ */
|
|
4231
|
+
) : currentSection.component ? /* @__PURE__ */ jsx48(currentSection.component, {}) : children
|
|
3892
4232
|
] })
|
|
3893
4233
|
}
|
|
3894
4234
|
)
|
|
@@ -3898,26 +4238,26 @@ function SettingsLayout({
|
|
|
3898
4238
|
}
|
|
3899
4239
|
|
|
3900
4240
|
// src/settings/SettingsSectionSlotRenderer.tsx
|
|
3901
|
-
import { jsx as
|
|
4241
|
+
import { jsx as jsx49, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
3902
4242
|
function SettingsSectionSlotRenderer({
|
|
3903
4243
|
contributions,
|
|
3904
4244
|
slotProps,
|
|
3905
4245
|
className
|
|
3906
4246
|
}) {
|
|
3907
4247
|
const sectionSlots = contributions.filter((c) => c.slot === "settings.section");
|
|
3908
|
-
return /* @__PURE__ */
|
|
4248
|
+
return /* @__PURE__ */ jsx49(
|
|
3909
4249
|
"div",
|
|
3910
4250
|
{
|
|
3911
4251
|
"data-slot": "settings-section-slot-renderer",
|
|
3912
4252
|
className: cn("yc-SettingsSectionSlotRenderer-root space-y-6", className),
|
|
3913
|
-
children: sectionSlots.map((c) => /* @__PURE__ */
|
|
4253
|
+
children: sectionSlots.map((c) => /* @__PURE__ */ jsxs41(
|
|
3914
4254
|
"div",
|
|
3915
4255
|
{
|
|
3916
4256
|
className: "rounded-xl border border-border bg-surface p-6 shadow-1",
|
|
3917
4257
|
"data-slot": "slot-section",
|
|
3918
4258
|
children: [
|
|
3919
|
-
/* @__PURE__ */
|
|
3920
|
-
/* @__PURE__ */
|
|
4259
|
+
/* @__PURE__ */ jsx49("div", { className: "border-b border-border pb-3 mb-4", children: /* @__PURE__ */ jsx49("h3", { className: "text-base font-semibold text-fg", children: c.title }) }),
|
|
4260
|
+
/* @__PURE__ */ jsx49(SlotRenderer, { contribution: c, slotProps })
|
|
3921
4261
|
]
|
|
3922
4262
|
},
|
|
3923
4263
|
c.id
|
|
@@ -3927,8 +4267,8 @@ function SettingsSectionSlotRenderer({
|
|
|
3927
4267
|
}
|
|
3928
4268
|
|
|
3929
4269
|
// src/shell/AppRail.tsx
|
|
3930
|
-
import * as
|
|
3931
|
-
import { jsx as
|
|
4270
|
+
import * as React31 from "react";
|
|
4271
|
+
import { jsx as jsx50, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
3932
4272
|
function AppRail({
|
|
3933
4273
|
items,
|
|
3934
4274
|
contributions = [],
|
|
@@ -3939,7 +4279,7 @@ function AppRail({
|
|
|
3939
4279
|
collapsed = false,
|
|
3940
4280
|
className
|
|
3941
4281
|
}) {
|
|
3942
|
-
const allItems =
|
|
4282
|
+
const allItems = React31.useMemo(() => {
|
|
3943
4283
|
const list = [...items];
|
|
3944
4284
|
const slotItems = contributions.filter((c) => c.slot === "sidebar.item").map((c) => ({
|
|
3945
4285
|
id: c.id,
|
|
@@ -3950,7 +4290,7 @@ function AppRail({
|
|
|
3950
4290
|
list.push(...slotItems);
|
|
3951
4291
|
return list;
|
|
3952
4292
|
}, [items, contributions]);
|
|
3953
|
-
return /* @__PURE__ */
|
|
4293
|
+
return /* @__PURE__ */ jsxs42(
|
|
3954
4294
|
"aside",
|
|
3955
4295
|
{
|
|
3956
4296
|
"data-slot": "app-rail",
|
|
@@ -3961,11 +4301,11 @@ function AppRail({
|
|
|
3961
4301
|
className
|
|
3962
4302
|
),
|
|
3963
4303
|
children: [
|
|
3964
|
-
/* @__PURE__ */
|
|
3965
|
-
brand && /* @__PURE__ */
|
|
3966
|
-
/* @__PURE__ */
|
|
4304
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex flex-col", children: [
|
|
4305
|
+
brand && /* @__PURE__ */ jsx50("div", { className: "flex items-center gap-3 border-b border-border p-4", "data-slot": "brand", children: brand }),
|
|
4306
|
+
/* @__PURE__ */ jsx50("nav", { className: "flex flex-col gap-1 p-2", "aria-label": "Main Navigation", children: allItems.map((item) => {
|
|
3967
4307
|
const isActive = item.active || item.id === activeItemId;
|
|
3968
|
-
return /* @__PURE__ */
|
|
4308
|
+
return /* @__PURE__ */ jsxs42(
|
|
3969
4309
|
"button",
|
|
3970
4310
|
{
|
|
3971
4311
|
type: "button",
|
|
@@ -3982,23 +4322,23 @@ function AppRail({
|
|
|
3982
4322
|
),
|
|
3983
4323
|
title: collapsed ? item.label : void 0,
|
|
3984
4324
|
children: [
|
|
3985
|
-
item.icon && /* @__PURE__ */
|
|
3986
|
-
!collapsed && /* @__PURE__ */
|
|
3987
|
-
!collapsed && item.badge !== void 0 && /* @__PURE__ */
|
|
4325
|
+
item.icon && /* @__PURE__ */ jsx50("span", { className: "inline-flex shrink-0", children: item.icon }),
|
|
4326
|
+
!collapsed && /* @__PURE__ */ jsx50("span", { className: "truncate flex-1", children: item.label }),
|
|
4327
|
+
!collapsed && item.badge !== void 0 && /* @__PURE__ */ jsx50("span", { className: "rounded-full bg-primary-subtle px-1.5 py-0.5 text-[10px] font-bold text-primary", children: item.badge })
|
|
3988
4328
|
]
|
|
3989
4329
|
},
|
|
3990
4330
|
item.id
|
|
3991
4331
|
);
|
|
3992
4332
|
}) })
|
|
3993
4333
|
] }),
|
|
3994
|
-
footer && /* @__PURE__ */
|
|
4334
|
+
footer && /* @__PURE__ */ jsx50("div", { className: "border-t border-border p-3", "data-slot": "footer", children: footer })
|
|
3995
4335
|
]
|
|
3996
4336
|
}
|
|
3997
4337
|
);
|
|
3998
4338
|
}
|
|
3999
4339
|
|
|
4000
4340
|
// src/shell/MobileTopBar.tsx
|
|
4001
|
-
import { jsx as
|
|
4341
|
+
import { jsx as jsx51, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
4002
4342
|
function MobileTopBar({
|
|
4003
4343
|
title,
|
|
4004
4344
|
startSlot,
|
|
@@ -4009,7 +4349,7 @@ function MobileTopBar({
|
|
|
4009
4349
|
}) {
|
|
4010
4350
|
const leading = startSlot || leftSlot;
|
|
4011
4351
|
const trailing = endSlot || rightSlot;
|
|
4012
|
-
return /* @__PURE__ */
|
|
4352
|
+
return /* @__PURE__ */ jsxs43(
|
|
4013
4353
|
"header",
|
|
4014
4354
|
{
|
|
4015
4355
|
"data-slot": "mobile-top-bar",
|
|
@@ -4018,23 +4358,23 @@ function MobileTopBar({
|
|
|
4018
4358
|
className
|
|
4019
4359
|
),
|
|
4020
4360
|
children: [
|
|
4021
|
-
/* @__PURE__ */
|
|
4022
|
-
title && /* @__PURE__ */
|
|
4023
|
-
/* @__PURE__ */
|
|
4361
|
+
/* @__PURE__ */ jsx51("div", { className: "flex items-center gap-2", "data-slot": "start-slot", children: leading }),
|
|
4362
|
+
title && /* @__PURE__ */ jsx51("h1", { className: "text-base font-bold text-fg truncate text-center flex-1 px-2", "data-slot": "title", children: title }),
|
|
4363
|
+
/* @__PURE__ */ jsx51("div", { className: "flex items-center gap-2", "data-slot": "end-slot", children: trailing })
|
|
4024
4364
|
]
|
|
4025
4365
|
}
|
|
4026
4366
|
);
|
|
4027
4367
|
}
|
|
4028
4368
|
|
|
4029
4369
|
// src/shell/MobileTabBar.tsx
|
|
4030
|
-
import { jsx as
|
|
4370
|
+
import { jsx as jsx52, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
4031
4371
|
function MobileTabBar({
|
|
4032
4372
|
items,
|
|
4033
4373
|
activeItemId,
|
|
4034
4374
|
onSelectItem,
|
|
4035
4375
|
className
|
|
4036
4376
|
}) {
|
|
4037
|
-
return /* @__PURE__ */
|
|
4377
|
+
return /* @__PURE__ */ jsx52(
|
|
4038
4378
|
"nav",
|
|
4039
4379
|
{
|
|
4040
4380
|
"data-slot": "mobile-tab-bar",
|
|
@@ -4045,7 +4385,7 @@ function MobileTabBar({
|
|
|
4045
4385
|
"aria-label": "Mobile Navigation",
|
|
4046
4386
|
children: items.map((item) => {
|
|
4047
4387
|
const isActive = item.active || item.id === activeItemId;
|
|
4048
|
-
return /* @__PURE__ */
|
|
4388
|
+
return /* @__PURE__ */ jsxs44(
|
|
4049
4389
|
"button",
|
|
4050
4390
|
{
|
|
4051
4391
|
type: "button",
|
|
@@ -4060,8 +4400,8 @@ function MobileTabBar({
|
|
|
4060
4400
|
isActive ? "text-primary font-bold" : "text-fg-muted hover:text-fg"
|
|
4061
4401
|
),
|
|
4062
4402
|
children: [
|
|
4063
|
-
item.icon && /* @__PURE__ */
|
|
4064
|
-
/* @__PURE__ */
|
|
4403
|
+
item.icon && /* @__PURE__ */ jsx52("span", { className: "text-lg leading-none mb-0.5", children: item.icon }),
|
|
4404
|
+
/* @__PURE__ */ jsx52("span", { className: "truncate max-w-[64px]", children: item.label })
|
|
4065
4405
|
]
|
|
4066
4406
|
},
|
|
4067
4407
|
item.id
|
|
@@ -4072,7 +4412,7 @@ function MobileTabBar({
|
|
|
4072
4412
|
}
|
|
4073
4413
|
|
|
4074
4414
|
// src/shell/AppLayout.tsx
|
|
4075
|
-
import { jsx as
|
|
4415
|
+
import { jsx as jsx53, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
4076
4416
|
function AppLayout({
|
|
4077
4417
|
items,
|
|
4078
4418
|
contributions = [],
|
|
@@ -4086,7 +4426,7 @@ function AppLayout({
|
|
|
4086
4426
|
className
|
|
4087
4427
|
}) {
|
|
4088
4428
|
const activeItem = items.find((i) => i.id === activeItemId) || items[0];
|
|
4089
|
-
return /* @__PURE__ */
|
|
4429
|
+
return /* @__PURE__ */ jsxs45(
|
|
4090
4430
|
"div",
|
|
4091
4431
|
{
|
|
4092
4432
|
"data-slot": "app-layout",
|
|
@@ -4095,7 +4435,7 @@ function AppLayout({
|
|
|
4095
4435
|
className
|
|
4096
4436
|
),
|
|
4097
4437
|
children: [
|
|
4098
|
-
/* @__PURE__ */
|
|
4438
|
+
/* @__PURE__ */ jsx53("div", { className: "hidden md:flex h-full shrink-0", children: /* @__PURE__ */ jsx53(
|
|
4099
4439
|
AppRail,
|
|
4100
4440
|
{
|
|
4101
4441
|
items,
|
|
@@ -4106,8 +4446,8 @@ function AppLayout({
|
|
|
4106
4446
|
footer: railFooter
|
|
4107
4447
|
}
|
|
4108
4448
|
) }),
|
|
4109
|
-
/* @__PURE__ */
|
|
4110
|
-
/* @__PURE__ */
|
|
4449
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex flex-1 flex-col h-full overflow-hidden", children: [
|
|
4450
|
+
/* @__PURE__ */ jsx53(
|
|
4111
4451
|
MobileTopBar,
|
|
4112
4452
|
{
|
|
4113
4453
|
title: activeItem?.label,
|
|
@@ -4115,7 +4455,7 @@ function AppLayout({
|
|
|
4115
4455
|
rightSlot: mobileTopRight
|
|
4116
4456
|
}
|
|
4117
4457
|
),
|
|
4118
|
-
/* @__PURE__ */
|
|
4458
|
+
/* @__PURE__ */ jsx53(
|
|
4119
4459
|
"main",
|
|
4120
4460
|
{
|
|
4121
4461
|
"data-slot": "main-content",
|
|
@@ -4123,7 +4463,7 @@ function AppLayout({
|
|
|
4123
4463
|
children
|
|
4124
4464
|
}
|
|
4125
4465
|
),
|
|
4126
|
-
/* @__PURE__ */
|
|
4466
|
+
/* @__PURE__ */ jsx53(
|
|
4127
4467
|
MobileTabBar,
|
|
4128
4468
|
{
|
|
4129
4469
|
items: items.slice(0, 5),
|
|
@@ -4174,8 +4514,8 @@ function filterSlotContributions(contributions, options = {}) {
|
|
|
4174
4514
|
}
|
|
4175
4515
|
|
|
4176
4516
|
// src/provider/UiProvider.tsx
|
|
4177
|
-
import { createContext as createContext8, useContext as useContext8, useEffect as useEffect8, useState as
|
|
4178
|
-
import { jsx as
|
|
4517
|
+
import { createContext as createContext8, useContext as useContext8, useEffect as useEffect8, useState as useState25 } from "react";
|
|
4518
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
4179
4519
|
var defaultI18n = {
|
|
4180
4520
|
locale: "en-US",
|
|
4181
4521
|
t: (_id, defaultText) => defaultText || _id
|
|
@@ -4197,8 +4537,8 @@ var UiProvider = ({
|
|
|
4197
4537
|
locale = "en-US",
|
|
4198
4538
|
messages = {}
|
|
4199
4539
|
}) => {
|
|
4200
|
-
const [theme, setThemeState] =
|
|
4201
|
-
const [resolvedTheme, setResolvedTheme] =
|
|
4540
|
+
const [theme, setThemeState] = useState25(defaultTheme);
|
|
4541
|
+
const [resolvedTheme, setResolvedTheme] = useState25("light");
|
|
4202
4542
|
useEffect8(() => {
|
|
4203
4543
|
const root = document.documentElement;
|
|
4204
4544
|
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
@@ -4235,7 +4575,7 @@ var UiProvider = ({
|
|
|
4235
4575
|
storageNamespace,
|
|
4236
4576
|
i18n: { locale, t }
|
|
4237
4577
|
};
|
|
4238
|
-
return /* @__PURE__ */
|
|
4578
|
+
return /* @__PURE__ */ jsx54(UiContext.Provider, { value, children });
|
|
4239
4579
|
};
|
|
4240
4580
|
var useUi = () => useContext8(UiContext);
|
|
4241
4581
|
var useTheme = () => {
|
|
@@ -4332,6 +4672,7 @@ export {
|
|
|
4332
4672
|
ChatThread,
|
|
4333
4673
|
Chip,
|
|
4334
4674
|
CodeBlock,
|
|
4675
|
+
DeliberationRoundtable,
|
|
4335
4676
|
Dialog,
|
|
4336
4677
|
DialogClose,
|
|
4337
4678
|
DialogContent,
|
|
@@ -4365,6 +4706,7 @@ export {
|
|
|
4365
4706
|
RecordSearch,
|
|
4366
4707
|
Reminders,
|
|
4367
4708
|
RoleMatrix,
|
|
4709
|
+
DeliberationRoundtable as RoundtableCard,
|
|
4368
4710
|
Routines,
|
|
4369
4711
|
ScheduleAgenda,
|
|
4370
4712
|
SegmentedControl,
|