@handled-ai/design-system 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -4
- package/dist/charts/bar-chart-component.d.ts +24 -0
- package/dist/charts/bar-chart-component.js +123 -0
- package/dist/charts/bar-chart-component.js.map +1 -0
- package/dist/charts/chart-tooltip.d.ts +26 -0
- package/dist/charts/chart-tooltip.js +69 -0
- package/dist/charts/chart-tooltip.js.map +1 -0
- package/dist/charts/chart.d.ts +64 -0
- package/dist/charts/chart.js +285 -0
- package/dist/charts/chart.js.map +1 -0
- package/dist/charts/donut-chart.d.ts +21 -0
- package/dist/charts/donut-chart.js +96 -0
- package/dist/charts/donut-chart.js.map +1 -0
- package/dist/charts/index.d.ts +11 -0
- package/dist/charts/index.js +10 -0
- package/dist/charts/index.js.map +1 -0
- package/dist/charts/pipeline-overview.d.ts +76 -0
- package/dist/charts/pipeline-overview.js +372 -0
- package/dist/charts/pipeline-overview.js.map +1 -0
- package/dist/charts/sankey-chart.d.ts +52 -0
- package/dist/charts/sankey-chart.js +219 -0
- package/dist/charts/sankey-chart.js.map +1 -0
- package/dist/charts/top-line-metrics.d.ts +26 -0
- package/dist/charts/top-line-metrics.js +224 -0
- package/dist/charts/top-line-metrics.js.map +1 -0
- package/dist/charts/trend-area-chart.d.ts +21 -0
- package/dist/charts/trend-area-chart.js +150 -0
- package/dist/charts/trend-area-chart.js.map +1 -0
- package/dist/charts/volume-analysis-chart.d.ts +19 -0
- package/dist/charts/volume-analysis-chart.js +121 -0
- package/dist/charts/volume-analysis-chart.js.map +1 -0
- package/dist/components/activity-detail.d.ts +38 -0
- package/dist/components/activity-detail.js +163 -0
- package/dist/components/activity-detail.js.map +1 -0
- package/dist/components/activity-log.d.ts +21 -0
- package/dist/components/activity-log.js +61 -0
- package/dist/components/activity-log.js.map +1 -0
- package/dist/components/agent-popover.d.ts +71 -0
- package/dist/components/agent-popover.js +282 -0
- package/dist/components/agent-popover.js.map +1 -0
- package/dist/components/agent-widget.d.ts +24 -0
- package/dist/components/agent-widget.js +117 -0
- package/dist/components/agent-widget.js.map +1 -0
- package/dist/components/avatar.d.ts +13 -0
- package/dist/components/avatar.js +140 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +12 -0
- package/dist/components/badge.js +75 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/button.d.ts +13 -0
- package/dist/components/button.js +83 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/card.d.ts +11 -0
- package/dist/components/card.js +119 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/contact-list.d.ts +34 -0
- package/dist/components/contact-list.js +84 -0
- package/dist/components/contact-list.js.map +1 -0
- package/dist/components/dashboard-cards.d.ts +10 -0
- package/dist/components/dashboard-cards.js +164 -0
- package/dist/components/dashboard-cards.js.map +1 -0
- package/dist/components/data-table-display.d.ts +19 -0
- package/dist/components/data-table-display.js +109 -0
- package/dist/components/data-table-display.js.map +1 -0
- package/dist/components/data-table-filter.d.ts +18 -0
- package/dist/components/data-table-filter.js +107 -0
- package/dist/components/data-table-filter.js.map +1 -0
- package/dist/components/data-table-quick-views.d.ts +13 -0
- package/dist/components/data-table-quick-views.js +90 -0
- package/dist/components/data-table-quick-views.js.map +1 -0
- package/dist/components/data-table-toolbar.d.ts +18 -0
- package/dist/components/data-table-toolbar.js +45 -0
- package/dist/components/data-table-toolbar.js.map +1 -0
- package/dist/components/data-table.d.ts +39 -0
- package/dist/components/data-table.js +821 -0
- package/dist/components/data-table.js.map +1 -0
- package/dist/components/detail-view.d.ts +44 -0
- package/dist/components/detail-view.js +165 -0
- package/dist/components/detail-view.js.map +1 -0
- package/dist/components/dialog.d.ts +19 -0
- package/dist/components/dialog.js +188 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +27 -0
- package/dist/components/dropdown-menu.js +279 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/entity-panel.d.ts +69 -0
- package/dist/components/entity-panel.js +584 -0
- package/dist/components/entity-panel.js.map +1 -0
- package/dist/components/inbox-row.d.ts +27 -0
- package/dist/components/inbox-row.js +139 -0
- package/dist/components/inbox-row.js.map +1 -0
- package/dist/components/inbox-toolbar.d.ts +21 -0
- package/dist/components/inbox-toolbar.js +203 -0
- package/dist/components/inbox-toolbar.js.map +1 -0
- package/dist/components/input.d.ts +5 -0
- package/dist/components/input.js +50 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/insights-filter-bar.d.ts +21 -0
- package/dist/components/insights-filter-bar.js +99 -0
- package/dist/components/insights-filter-bar.js.map +1 -0
- package/dist/components/item-list-display.d.ts +22 -0
- package/dist/components/item-list-display.js +240 -0
- package/dist/components/item-list-display.js.map +1 -0
- package/dist/components/item-list-filter.d.ts +16 -0
- package/dist/components/item-list-filter.js +87 -0
- package/dist/components/item-list-filter.js.map +1 -0
- package/dist/components/item-list-toolbar.d.ts +25 -0
- package/dist/components/item-list-toolbar.js +79 -0
- package/dist/components/item-list-toolbar.js.map +1 -0
- package/dist/components/item-list.d.ts +20 -0
- package/dist/components/item-list.js +702 -0
- package/dist/components/item-list.js.map +1 -0
- package/dist/components/label.d.ts +6 -0
- package/dist/components/label.js +55 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/message.d.ts +23 -0
- package/dist/components/message.js +117 -0
- package/dist/components/message.js.map +1 -0
- package/dist/components/metric-card.d.ts +25 -0
- package/dist/components/metric-card.js +107 -0
- package/dist/components/metric-card.js.map +1 -0
- package/dist/components/performance-metrics-table.d.ts +38 -0
- package/dist/components/performance-metrics-table.js +342 -0
- package/dist/components/performance-metrics-table.js.map +1 -0
- package/dist/components/preview-list.d.ts +14 -0
- package/dist/components/preview-list.js +83 -0
- package/dist/components/preview-list.js.map +1 -0
- package/dist/components/progress.d.ts +6 -0
- package/dist/components/progress.js +69 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/quick-action-chat-area.d.ts +24 -0
- package/dist/components/quick-action-chat-area.js +178 -0
- package/dist/components/quick-action-chat-area.js.map +1 -0
- package/dist/components/quick-action-modal.d.ts +30 -0
- package/dist/components/quick-action-modal.js +288 -0
- package/dist/components/quick-action-modal.js.map +1 -0
- package/dist/components/quick-action-sidebar-nav.d.ts +51 -0
- package/dist/components/quick-action-sidebar-nav.js +528 -0
- package/dist/components/quick-action-sidebar-nav.js.map +1 -0
- package/dist/components/recommended-actions-section.d.ts +23 -0
- package/dist/components/recommended-actions-section.js +215 -0
- package/dist/components/recommended-actions-section.js.map +1 -0
- package/dist/components/report-card.d.ts +26 -0
- package/dist/components/report-card.js +69 -0
- package/dist/components/report-card.js.map +1 -0
- package/dist/components/score-analysis-modal.d.ts +26 -0
- package/dist/components/score-analysis-modal.js +141 -0
- package/dist/components/score-analysis-modal.js.map +1 -0
- package/dist/components/score-breakdown.d.ts +17 -0
- package/dist/components/score-breakdown.js +162 -0
- package/dist/components/score-breakdown.js.map +1 -0
- package/dist/components/score-feedback.d.ts +40 -0
- package/dist/components/score-feedback.js +209 -0
- package/dist/components/score-feedback.js.map +1 -0
- package/dist/components/score-ring.d.ts +14 -0
- package/dist/components/score-ring.js +79 -0
- package/dist/components/score-ring.js.map +1 -0
- package/dist/components/scroll-area.d.ts +7 -0
- package/dist/components/scroll-area.js +101 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/select.d.ts +17 -0
- package/dist/components/select.js +228 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +6 -0
- package/dist/components/separator.js +61 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/sheet.d.ts +16 -0
- package/dist/components/sheet.js +168 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/sidebar.d.ts +73 -0
- package/dist/components/sidebar.js +723 -0
- package/dist/components/sidebar.js.map +1 -0
- package/dist/components/signal-feedback-inline.d.ts +51 -0
- package/dist/components/signal-feedback-inline.js +548 -0
- package/dist/components/signal-feedback-inline.js.map +1 -0
- package/dist/components/simple-data-table.d.ts +15 -0
- package/dist/components/simple-data-table.js +91 -0
- package/dist/components/simple-data-table.js.map +1 -0
- package/dist/components/skeleton.d.ts +5 -0
- package/dist/components/skeleton.js +44 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/status-badge.d.ts +10 -0
- package/dist/components/status-badge.js +82 -0
- package/dist/components/status-badge.js.map +1 -0
- package/dist/components/styled-bar-list.d.ts +20 -0
- package/dist/components/styled-bar-list.js +59 -0
- package/dist/components/styled-bar-list.js.map +1 -0
- package/dist/components/suggested-actions.d.ts +110 -0
- package/dist/components/suggested-actions.js +1538 -0
- package/dist/components/suggested-actions.js.map +1 -0
- package/dist/components/table.d.ts +12 -0
- package/dist/components/table.js +147 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +14 -0
- package/dist/components/tabs.js +129 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/textarea.d.ts +5 -0
- package/dist/components/textarea.js +47 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/timeline-activity.d.ts +34 -0
- package/dist/components/timeline-activity.js +181 -0
- package/dist/components/timeline-activity.js.map +1 -0
- package/dist/components/tooltip.d.ts +9 -0
- package/dist/components/tooltip.js +93 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/components/view-mode-toggle.d.ts +16 -0
- package/dist/components/view-mode-toggle.js +24 -0
- package/dist/components/view-mode-toggle.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-mobile.js +21 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/index.d.ts +68 -1878
- package/dist/index.js +69 -10918
- package/dist/index.js.map +1 -1
- package/dist/lib/icons.d.ts +18 -0
- package/dist/lib/icons.js +21 -0
- package/dist/lib/icons.js.map +1 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +9 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/prototype/index.d.ts +20 -0
- package/dist/prototype/index.js +8 -0
- package/dist/prototype/index.js.map +1 -0
- package/dist/prototype/prototype-accounts-view.d.ts +22 -0
- package/dist/prototype/prototype-accounts-view.js +70 -0
- package/dist/prototype/prototype-accounts-view.js.map +1 -0
- package/dist/prototype/prototype-admin-view.d.ts +21 -0
- package/dist/prototype/prototype-admin-view.js +53 -0
- package/dist/prototype/prototype-admin-view.js.map +1 -0
- package/dist/prototype/prototype-config.d.ts +226 -0
- package/dist/prototype/prototype-config.js +1 -0
- package/dist/prototype/prototype-config.js.map +1 -0
- package/dist/prototype/prototype-inbox-view.d.ts +48 -0
- package/dist/prototype/prototype-inbox-view.js +701 -0
- package/dist/prototype/prototype-inbox-view.js.map +1 -0
- package/dist/prototype/prototype-insights-view.d.ts +23 -0
- package/dist/prototype/prototype-insights-view.js +335 -0
- package/dist/prototype/prototype-insights-view.js.map +1 -0
- package/dist/prototype/prototype-shell.d.ts +40 -0
- package/dist/prototype/prototype-shell.js +190 -0
- package/dist/prototype/prototype-shell.js.map +1 -0
- package/dist/prototype/prototype-work-queue-view.d.ts +8 -0
- package/dist/prototype/prototype-work-queue-view.js +17 -0
- package/dist/prototype/prototype-work-queue-view.js.map +1 -0
- package/dist/three/agent-orb.d.ts +39 -0
- package/dist/three/agent-orb.js +500 -0
- package/dist/three/agent-orb.js.map +1 -0
- package/dist/three/index.d.ts +2 -0
- package/dist/three/index.js +2 -0
- package/dist/three/index.js.map +1 -0
- package/package.json +98 -17
- package/src/charts/bar-chart-component.tsx +150 -0
- package/src/charts/chart-tooltip.tsx +86 -0
- package/src/charts/chart.tsx +371 -0
- package/src/charts/donut-chart.tsx +112 -0
- package/src/charts/index.ts +13 -0
- package/src/charts/pipeline-overview.tsx +476 -0
- package/src/charts/sankey-chart.tsx +290 -0
- package/src/charts/top-line-metrics.tsx +261 -0
- package/src/charts/trend-area-chart.tsx +150 -0
- package/src/charts/volume-analysis-chart.tsx +124 -0
- package/src/components/activity-detail.tsx +233 -0
- package/src/components/activity-log.tsx +89 -0
- package/src/components/agent-popover.tsx +373 -0
- package/src/components/agent-widget.tsx +163 -0
- package/src/components/avatar.tsx +109 -0
- package/src/components/badge.tsx +48 -0
- package/src/components/button.tsx +59 -0
- package/src/components/card.tsx +92 -0
- package/src/components/contact-list.tsx +121 -0
- package/src/components/dashboard-cards.tsx +170 -0
- package/src/components/data-table-display.tsx +139 -0
- package/src/components/data-table-filter.tsx +138 -0
- package/src/components/data-table-quick-views.tsx +103 -0
- package/src/components/data-table-toolbar.tsx +56 -0
- package/src/components/data-table.tsx +915 -0
- package/src/components/detail-view.tsx +237 -0
- package/src/components/dialog.tsx +158 -0
- package/src/components/dropdown-menu.tsx +257 -0
- package/src/components/entity-panel.tsx +767 -0
- package/src/components/inbox-row.tsx +132 -0
- package/src/components/inbox-toolbar.tsx +213 -0
- package/src/components/input.tsx +21 -0
- package/src/components/insights-filter-bar.tsx +132 -0
- package/src/components/item-list-display.tsx +278 -0
- package/src/components/item-list-filter.tsx +118 -0
- package/src/components/item-list-toolbar.tsx +97 -0
- package/src/components/item-list.tsx +843 -0
- package/src/components/label.tsx +24 -0
- package/src/components/message.tsx +83 -0
- package/src/components/metric-card.tsx +178 -0
- package/src/components/performance-metrics-table.tsx +442 -0
- package/src/components/preview-list.tsx +62 -0
- package/src/components/progress.tsx +31 -0
- package/src/components/quick-action-chat-area.tsx +156 -0
- package/src/components/quick-action-modal.tsx +331 -0
- package/src/components/quick-action-sidebar-nav.tsx +592 -0
- package/src/components/recommended-actions-section.tsx +258 -0
- package/src/components/report-card.tsx +106 -0
- package/src/components/score-analysis-modal.tsx +172 -0
- package/src/components/score-breakdown.tsx +179 -0
- package/src/components/score-feedback.tsx +288 -0
- package/src/components/score-ring.tsx +87 -0
- package/src/components/scroll-area.tsx +58 -0
- package/src/components/select.tsx +190 -0
- package/src/components/separator.tsx +28 -0
- package/src/components/sheet.tsx +143 -0
- package/src/components/sidebar.tsx +726 -0
- package/src/components/signal-feedback-inline.tsx +591 -0
- package/src/components/simple-data-table.tsx +124 -0
- package/src/components/skeleton.tsx +15 -0
- package/src/components/status-badge.tsx +63 -0
- package/src/components/styled-bar-list.tsx +70 -0
- package/src/components/suggested-actions.tsx +1985 -0
- package/src/components/table.tsx +116 -0
- package/src/components/tabs.tsx +91 -0
- package/src/components/textarea.tsx +18 -0
- package/src/components/timeline-activity.tsx +234 -0
- package/src/components/tooltip.tsx +57 -0
- package/src/components/view-mode-toggle.tsx +39 -0
- package/src/hooks/use-mobile.ts +21 -0
- package/src/index.ts +77 -0
- package/src/lib/icons.ts +18 -0
- package/src/lib/utils.ts +6 -0
- package/src/prototype/index.ts +11 -0
- package/src/prototype/prototype-accounts-view.tsx +112 -0
- package/src/prototype/prototype-admin-view.tsx +67 -0
- package/src/prototype/prototype-config.ts +243 -0
- package/src/prototype/prototype-inbox-view.tsx +810 -0
- package/src/prototype/prototype-insights-view.tsx +379 -0
- package/src/prototype/prototype-shell.tsx +219 -0
- package/src/prototype/prototype-work-queue-view.tsx +30 -0
- package/src/styles/globals.css +299 -0
- package/src/three/agent-orb.tsx +557 -0
- package/src/three/index.ts +5 -0
- package/src/types/r3f.d.ts +8 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
"use client";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defProps = Object.defineProperties;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
24
|
+
import * as React from "react";
|
|
25
|
+
import {
|
|
26
|
+
QuickActionSidebarNav
|
|
27
|
+
} from "../components/quick-action-sidebar-nav.js";
|
|
28
|
+
import {
|
|
29
|
+
EntityPanel,
|
|
30
|
+
EntityDetails,
|
|
31
|
+
PotentialContacts,
|
|
32
|
+
RecentActivity,
|
|
33
|
+
ConnectedApps,
|
|
34
|
+
SystemActivity
|
|
35
|
+
} from "../components/entity-panel.js";
|
|
36
|
+
import { PrototypeInboxView } from "./prototype-inbox-view.js";
|
|
37
|
+
import { PrototypeInsightsView } from "./prototype-insights-view.js";
|
|
38
|
+
import { PrototypeAccountsView } from "./prototype-accounts-view.js";
|
|
39
|
+
import { PrototypeWorkQueueView } from "./prototype-work-queue-view.js";
|
|
40
|
+
import { PrototypeAdminView } from "./prototype-admin-view.js";
|
|
41
|
+
const VIEW_KEY_MAP = {
|
|
42
|
+
inbox: "inbox",
|
|
43
|
+
dashboard: "insights",
|
|
44
|
+
insights: "insights",
|
|
45
|
+
accounts: "accounts",
|
|
46
|
+
activity: "workQueue",
|
|
47
|
+
workQueue: "workQueue",
|
|
48
|
+
"work-queue": "workQueue",
|
|
49
|
+
admin: "admin",
|
|
50
|
+
settings: "admin"
|
|
51
|
+
};
|
|
52
|
+
const DEFAULT_ENTITY_SECTIONS = [
|
|
53
|
+
{ type: "details" },
|
|
54
|
+
{ type: "contacts" },
|
|
55
|
+
{ type: "recentActivity" },
|
|
56
|
+
{ type: "connectedApps" },
|
|
57
|
+
{ type: "systemActivity" }
|
|
58
|
+
];
|
|
59
|
+
function PrototypeShell({
|
|
60
|
+
config,
|
|
61
|
+
headerActions,
|
|
62
|
+
entityPanelChildren,
|
|
63
|
+
onNavigate
|
|
64
|
+
}) {
|
|
65
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
66
|
+
const [currentView, setCurrentView] = React.useState(config.defaultView);
|
|
67
|
+
const [isEntityPanelOpen, setIsEntityPanelOpen] = React.useState(false);
|
|
68
|
+
const navigableViews = React.useMemo(() => {
|
|
69
|
+
if (config.navigableViews) return config.navigableViews;
|
|
70
|
+
const keys = [];
|
|
71
|
+
if (config.views.inbox) keys.push("inbox");
|
|
72
|
+
if (config.views.accounts) keys.push("accounts");
|
|
73
|
+
if (config.views.workQueue) keys.push("activity", "workQueue", "work-queue");
|
|
74
|
+
if (config.views.insights) keys.push("dashboard", "insights");
|
|
75
|
+
if (config.views.admin) keys.push("admin", "settings");
|
|
76
|
+
return keys;
|
|
77
|
+
}, [config.navigableViews, config.views]);
|
|
78
|
+
const handleNavigate = React.useCallback(
|
|
79
|
+
(id) => {
|
|
80
|
+
if (navigableViews.includes(id)) {
|
|
81
|
+
setCurrentView(id);
|
|
82
|
+
}
|
|
83
|
+
onNavigate == null ? void 0 : onNavigate(id);
|
|
84
|
+
},
|
|
85
|
+
[navigableViews, onNavigate]
|
|
86
|
+
);
|
|
87
|
+
const handleOpenEntityPanel = React.useCallback((_entity) => setIsEntityPanelOpen(true), []);
|
|
88
|
+
const handleOpenRecentActivity = React.useCallback(() => {
|
|
89
|
+
setIsEntityPanelOpen(true);
|
|
90
|
+
setTimeout(() => {
|
|
91
|
+
var _a2;
|
|
92
|
+
(_a2 = document.getElementById("entity-recent-activity")) == null ? void 0 : _a2.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
93
|
+
}, 150);
|
|
94
|
+
}, []);
|
|
95
|
+
const resolvedViewKey = (_a = VIEW_KEY_MAP[currentView]) != null ? _a : currentView;
|
|
96
|
+
const entitySections = (_c = (_b = config.entityPanel) == null ? void 0 : _b.sections) != null ? _c : DEFAULT_ENTITY_SECTIONS;
|
|
97
|
+
const entityIcons = (_e = (_d = config.entityPanel) == null ? void 0 : _d.icons) != null ? _e : {};
|
|
98
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex h-screen w-full overflow-hidden bg-background font-sans", children: [
|
|
99
|
+
/* @__PURE__ */ jsx(
|
|
100
|
+
QuickActionSidebarNav,
|
|
101
|
+
{
|
|
102
|
+
className: "z-20 h-screen shrink-0",
|
|
103
|
+
brandLabel: (_f = config.brand) == null ? void 0 : _f.name,
|
|
104
|
+
brandSubtitle: "",
|
|
105
|
+
navSections: config.sidebar,
|
|
106
|
+
activeItemId: currentView,
|
|
107
|
+
onNavigate: handleNavigate,
|
|
108
|
+
onCreateTask: (draft) => {
|
|
109
|
+
console.log("Quick action created:", draft);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
),
|
|
113
|
+
/* @__PURE__ */ jsx("main", { className: "flex min-w-0 flex-1 flex-col overflow-hidden bg-background", children: /* @__PURE__ */ jsx("div", { className: "relative h-full flex-1 overflow-auto", children: resolvedViewKey === "insights" && config.views.insights ? /* @__PURE__ */ jsx(
|
|
114
|
+
PrototypeInsightsView,
|
|
115
|
+
__spreadProps(__spreadValues({}, config.views.insights), {
|
|
116
|
+
assistantName: (_g = config.brand) == null ? void 0 : _g.assistantName,
|
|
117
|
+
headerActions,
|
|
118
|
+
onNavigateToInbox: () => setCurrentView("inbox")
|
|
119
|
+
})
|
|
120
|
+
) : resolvedViewKey === "inbox" && config.views.inbox ? /* @__PURE__ */ jsx(
|
|
121
|
+
PrototypeInboxView,
|
|
122
|
+
__spreadProps(__spreadValues({}, config.views.inbox), {
|
|
123
|
+
headerActions,
|
|
124
|
+
onOpenEntityPanel: handleOpenEntityPanel,
|
|
125
|
+
onOpenRecentActivity: handleOpenRecentActivity
|
|
126
|
+
})
|
|
127
|
+
) : resolvedViewKey === "accounts" && config.views.accounts ? /* @__PURE__ */ jsx(
|
|
128
|
+
PrototypeAccountsView,
|
|
129
|
+
__spreadProps(__spreadValues({}, config.views.accounts), {
|
|
130
|
+
headerActions,
|
|
131
|
+
onRowClick: handleOpenEntityPanel
|
|
132
|
+
})
|
|
133
|
+
) : resolvedViewKey === "workQueue" && config.views.workQueue ? /* @__PURE__ */ jsx(
|
|
134
|
+
PrototypeWorkQueueView,
|
|
135
|
+
{
|
|
136
|
+
headerActions
|
|
137
|
+
}
|
|
138
|
+
) : resolvedViewKey === "admin" && config.views.admin ? /* @__PURE__ */ jsx(
|
|
139
|
+
PrototypeAdminView,
|
|
140
|
+
__spreadProps(__spreadValues({}, config.views.admin), {
|
|
141
|
+
headerActions
|
|
142
|
+
})
|
|
143
|
+
) : null }) }),
|
|
144
|
+
/* @__PURE__ */ jsx(EntityPanel, { isOpen: isEntityPanelOpen, onClose: setIsEntityPanelOpen, children: (_h = typeof entityPanelChildren === "function" ? entityPanelChildren({ onClose: () => setIsEntityPanelOpen(false) }) : entityPanelChildren) != null ? _h : /* @__PURE__ */ jsx(Fragment, { children: entitySections.map((section, i) => {
|
|
145
|
+
var _a2, _b2;
|
|
146
|
+
switch (section.type) {
|
|
147
|
+
case "details":
|
|
148
|
+
return /* @__PURE__ */ jsx(EntityDetails, { onClose: () => setIsEntityPanelOpen(false) }, i);
|
|
149
|
+
case "contacts":
|
|
150
|
+
return /* @__PURE__ */ jsx(
|
|
151
|
+
PotentialContacts,
|
|
152
|
+
{
|
|
153
|
+
icons: {
|
|
154
|
+
linkedin: entityIcons.linkedin,
|
|
155
|
+
gmail: entityIcons.gmail
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
i
|
|
159
|
+
);
|
|
160
|
+
case "recentActivity":
|
|
161
|
+
return /* @__PURE__ */ jsx(
|
|
162
|
+
RecentActivity,
|
|
163
|
+
{
|
|
164
|
+
items: (_b2 = (_a2 = section.props) == null ? void 0 : _a2.items) != null ? _b2 : []
|
|
165
|
+
},
|
|
166
|
+
i
|
|
167
|
+
);
|
|
168
|
+
case "connectedApps":
|
|
169
|
+
return /* @__PURE__ */ jsx(
|
|
170
|
+
ConnectedApps,
|
|
171
|
+
{
|
|
172
|
+
icons: {
|
|
173
|
+
slack: entityIcons.slack,
|
|
174
|
+
gdoc: entityIcons.gdoc
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
i
|
|
178
|
+
);
|
|
179
|
+
case "systemActivity":
|
|
180
|
+
return /* @__PURE__ */ jsx(SystemActivity, {}, i);
|
|
181
|
+
default:
|
|
182
|
+
return null;
|
|
183
|
+
}
|
|
184
|
+
}) }) })
|
|
185
|
+
] });
|
|
186
|
+
}
|
|
187
|
+
export {
|
|
188
|
+
PrototypeShell
|
|
189
|
+
};
|
|
190
|
+
//# sourceMappingURL=prototype-shell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/prototype/prototype-shell.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport {\n QuickActionSidebarNav,\n} from \"../components/quick-action-sidebar-nav\"\nimport {\n EntityPanel,\n EntityDetails,\n PotentialContacts,\n RecentActivity,\n ConnectedApps,\n SystemActivity,\n} from \"../components/entity-panel\"\nimport { PrototypeInboxView } from \"./prototype-inbox-view\"\nimport { PrototypeInsightsView } from \"./prototype-insights-view\"\nimport { PrototypeAccountsView } from \"./prototype-accounts-view\"\nimport { PrototypeWorkQueueView } from \"./prototype-work-queue-view\"\nimport { PrototypeAdminView } from \"./prototype-admin-view\"\nimport type { PrototypeConfig, EntityPanelSection } from \"./prototype-config\"\nimport type { DataRow } from \"../components/data-table\"\n\n// ---------------------------------------------------------------------------\n// Props\n// ---------------------------------------------------------------------------\n\nexport interface PrototypeShellProps {\n config: PrototypeConfig\n /**\n * Optional ReactNode rendered in the header area of each view.\n * Useful for adding an \"Exit Preview\" button in the design system showcase.\n */\n headerActions?: React.ReactNode\n /**\n * Custom content to render inside the EntityPanel.\n * When provided, overrides the default section-based rendering.\n * Receives `onClose` so children can close the panel.\n */\n entityPanelChildren?: React.ReactNode | ((ctx: { onClose: () => void }) => React.ReactNode)\n /**\n * Fired on every sidebar navigation click (both navigable and non-navigable views).\n * Useful for intercepting clicks on product-specific views like \"settings\"\n * that live outside the shell.\n */\n onNavigate?: (viewId: string) => void\n}\n\n// ---------------------------------------------------------------------------\n// View ID → config key mapping\n// ---------------------------------------------------------------------------\n\nconst VIEW_KEY_MAP: Record<string, keyof PrototypeConfig[\"views\"]> = {\n inbox: \"inbox\",\n dashboard: \"insights\",\n insights: \"insights\",\n accounts: \"accounts\",\n activity: \"workQueue\",\n workQueue: \"workQueue\",\n \"work-queue\": \"workQueue\",\n admin: \"admin\",\n settings: \"admin\",\n}\n\n// ---------------------------------------------------------------------------\n// Default entity panel sections\n// ---------------------------------------------------------------------------\n\nconst DEFAULT_ENTITY_SECTIONS: EntityPanelSection[] = [\n { type: \"details\" },\n { type: \"contacts\" },\n { type: \"recentActivity\" },\n { type: \"connectedApps\" },\n { type: \"systemActivity\" },\n]\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport function PrototypeShell({\n config,\n headerActions,\n entityPanelChildren,\n onNavigate,\n}: PrototypeShellProps) {\n const [currentView, setCurrentView] = React.useState(config.defaultView)\n const [isEntityPanelOpen, setIsEntityPanelOpen] = React.useState(false)\n\n const navigableViews = React.useMemo(() => {\n if (config.navigableViews) return config.navigableViews\n const keys: string[] = []\n if (config.views.inbox) keys.push(\"inbox\")\n if (config.views.accounts) keys.push(\"accounts\")\n if (config.views.workQueue) keys.push(\"activity\", \"workQueue\", \"work-queue\")\n if (config.views.insights) keys.push(\"dashboard\", \"insights\")\n if (config.views.admin) keys.push(\"admin\", \"settings\")\n return keys\n }, [config.navigableViews, config.views])\n\n const handleNavigate = React.useCallback(\n (id: string) => {\n if (navigableViews.includes(id)) {\n setCurrentView(id)\n }\n onNavigate?.(id)\n },\n [navigableViews, onNavigate],\n )\n\n const handleOpenEntityPanel = React.useCallback((_entity?: DataRow) => setIsEntityPanelOpen(true), [])\n const handleOpenRecentActivity = React.useCallback(() => {\n setIsEntityPanelOpen(true)\n setTimeout(() => {\n document.getElementById(\"entity-recent-activity\")?.scrollIntoView({ behavior: \"smooth\", block: \"start\" })\n }, 150)\n }, [])\n\n const resolvedViewKey = VIEW_KEY_MAP[currentView] ?? currentView\n\n const entitySections = config.entityPanel?.sections ?? DEFAULT_ENTITY_SECTIONS\n const entityIcons = config.entityPanel?.icons ?? {}\n\n return (\n <div className=\"flex h-screen w-full overflow-hidden bg-background font-sans\">\n <QuickActionSidebarNav\n className=\"z-20 h-screen shrink-0\"\n brandLabel={config.brand?.name}\n brandSubtitle=\"\"\n navSections={config.sidebar}\n activeItemId={currentView}\n onNavigate={handleNavigate}\n onCreateTask={(draft) => {\n console.log(\"Quick action created:\", draft)\n }}\n />\n\n <main className=\"flex min-w-0 flex-1 flex-col overflow-hidden bg-background\">\n <div className=\"relative h-full flex-1 overflow-auto\">\n {resolvedViewKey === \"insights\" && config.views.insights ? (\n <PrototypeInsightsView\n {...config.views.insights}\n assistantName={config.brand?.assistantName}\n headerActions={headerActions}\n onNavigateToInbox={() => setCurrentView(\"inbox\")}\n />\n ) : resolvedViewKey === \"inbox\" && config.views.inbox ? (\n <PrototypeInboxView\n {...config.views.inbox}\n headerActions={headerActions}\n onOpenEntityPanel={handleOpenEntityPanel}\n onOpenRecentActivity={handleOpenRecentActivity}\n />\n ) : resolvedViewKey === \"accounts\" && config.views.accounts ? (\n <PrototypeAccountsView\n {...config.views.accounts}\n headerActions={headerActions}\n onRowClick={handleOpenEntityPanel}\n />\n ) : resolvedViewKey === \"workQueue\" && config.views.workQueue ? (\n <PrototypeWorkQueueView\n headerActions={headerActions}\n />\n ) : resolvedViewKey === \"admin\" && config.views.admin ? (\n <PrototypeAdminView\n {...config.views.admin}\n headerActions={headerActions}\n />\n ) : null}\n </div>\n </main>\n\n <EntityPanel isOpen={isEntityPanelOpen} onClose={setIsEntityPanelOpen}>\n {(typeof entityPanelChildren === \"function\"\n ? entityPanelChildren({ onClose: () => setIsEntityPanelOpen(false) })\n : entityPanelChildren) ?? (\n <>\n {entitySections.map((section, i) => {\n switch (section.type) {\n case \"details\":\n return <EntityDetails key={i} onClose={() => setIsEntityPanelOpen(false)} />\n case \"contacts\":\n return (\n <PotentialContacts\n key={i}\n icons={{\n linkedin: entityIcons.linkedin,\n gmail: entityIcons.gmail,\n }}\n />\n )\n case \"recentActivity\":\n return (\n <RecentActivity\n key={i}\n items={(section.props?.items as React.ComponentProps<typeof RecentActivity>[\"items\"]) ?? []}\n />\n )\n case \"connectedApps\":\n return (\n <ConnectedApps\n key={i}\n icons={{\n slack: entityIcons.slack,\n gdoc: entityIcons.gdoc,\n }}\n />\n )\n case \"systemActivity\":\n return <SystemActivity key={i} />\n default:\n return null\n }\n })}\n </>\n )}\n </EntityPanel>\n </div>\n )\n}\n"],"mappings":"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","names":["_a","_b"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface PrototypeWorkQueueViewProps {
|
|
4
|
+
headerActions?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare function PrototypeWorkQueueView({ headerActions, }: PrototypeWorkQueueViewProps): React.JSX.Element;
|
|
7
|
+
|
|
8
|
+
export { PrototypeWorkQueueView, type PrototypeWorkQueueViewProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
"use client";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { ItemList } from "../components/item-list.js";
|
|
6
|
+
function PrototypeWorkQueueView({
|
|
7
|
+
headerActions
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative flex h-full w-full flex-col bg-background", children: [
|
|
10
|
+
headerActions && /* @__PURE__ */ jsx("div", { className: "absolute top-4 right-4 z-10", children: headerActions }),
|
|
11
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsx(ItemList, {}) })
|
|
12
|
+
] });
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
PrototypeWorkQueueView
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=prototype-work-queue-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/prototype/prototype-work-queue-view.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { ItemList } from \"../components/item-list\"\n// ---------------------------------------------------------------------------\n// Props\n// ---------------------------------------------------------------------------\n\nexport interface PrototypeWorkQueueViewProps {\n headerActions?: React.ReactNode\n}\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport function PrototypeWorkQueueView({\n headerActions,\n}: PrototypeWorkQueueViewProps) {\n return (\n <div className=\"relative flex h-full w-full flex-col bg-background\">\n {headerActions && (\n <div className=\"absolute top-4 right-4 z-10\">{headerActions}</div>\n )}\n <div className=\"flex-1 overflow-auto\">\n <ItemList />\n </div>\n </div>\n )\n}\n"],"mappings":";AAoBI,SAEI,KAFJ;AAjBJ,SAAS,gBAAgB;AAalB,SAAS,uBAAuB;AAAA,EACrC;AACF,GAAgC;AAC9B,SACE,qBAAC,SAAI,WAAU,sDACZ;AAAA,qBACC,oBAAC,SAAI,WAAU,+BAA+B,yBAAc;AAAA,IAE9D,oBAAC,SAAI,WAAU,wBACb,8BAAC,YAAS,GACZ;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type AgentOrbState = null | "thinking" | "listening" | "talking";
|
|
4
|
+
interface AgentOrbProps {
|
|
5
|
+
state?: AgentOrbState;
|
|
6
|
+
colors?: [string, string];
|
|
7
|
+
volumeMode?: "auto" | "manual";
|
|
8
|
+
manualInput?: number;
|
|
9
|
+
manualOutput?: number;
|
|
10
|
+
inputVolumeRef?: React.RefObject<number>;
|
|
11
|
+
outputVolumeRef?: React.RefObject<number>;
|
|
12
|
+
getInputVolume?: () => number;
|
|
13
|
+
getOutputVolume?: () => number;
|
|
14
|
+
seed?: number;
|
|
15
|
+
showGlow?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Full AgentOrb with optional CSS glow wrapper.
|
|
20
|
+
* Colors default to CSS `--primary` via computed style at mount time.
|
|
21
|
+
*/
|
|
22
|
+
declare function AgentOrb({ state, colors, volumeMode, manualInput, manualOutput, inputVolumeRef, outputVolumeRef, getInputVolume, getOutputVolume, seed, showGlow, className, }: AgentOrbProps): React.JSX.Element;
|
|
23
|
+
interface AgentOrbCanvasProps {
|
|
24
|
+
colors?: [string, string];
|
|
25
|
+
seed?: number;
|
|
26
|
+
agentState?: AgentOrbState;
|
|
27
|
+
volumeMode?: "auto" | "manual";
|
|
28
|
+
manualInput?: number;
|
|
29
|
+
manualOutput?: number;
|
|
30
|
+
inputVolumeRef?: React.RefObject<number>;
|
|
31
|
+
outputVolumeRef?: React.RefObject<number>;
|
|
32
|
+
getInputVolume?: () => number;
|
|
33
|
+
getOutputVolume?: () => number;
|
|
34
|
+
className?: string;
|
|
35
|
+
resizeDebounce?: number;
|
|
36
|
+
}
|
|
37
|
+
declare function AgentOrbCanvas({ colors, seed, agentState, volumeMode, manualInput, manualOutput, inputVolumeRef, outputVolumeRef, getInputVolume, getOutputVolume, className, resizeDebounce, }: AgentOrbCanvasProps): React.JSX.Element;
|
|
38
|
+
|
|
39
|
+
export { AgentOrb, AgentOrbCanvas, type AgentOrbProps, type AgentOrbState };
|