@twinmatrix/ui-sdk 0.0.1
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 +49 -0
- package/THEME_CUSTOMIZATION.md +221 -0
- package/lib/cjs/index.js +224 -0
- package/lib/esm/index.js +224 -0
- package/lib/types/index.d.ts +33 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/internal/alerts/AlertItem.d.ts +9 -0
- package/lib/types/internal/alerts/AlertItem.d.ts.map +1 -0
- package/lib/types/internal/alerts/AlertsList.d.ts +12 -0
- package/lib/types/internal/alerts/AlertsList.d.ts.map +1 -0
- package/lib/types/internal/alerts/index.d.ts +5 -0
- package/lib/types/internal/alerts/index.d.ts.map +1 -0
- package/lib/types/internal/alerts/types.d.ts +11 -0
- package/lib/types/internal/alerts/types.d.ts.map +1 -0
- package/lib/types/internal/alerts/utils.d.ts +2 -0
- package/lib/types/internal/alerts/utils.d.ts.map +1 -0
- package/lib/types/internal/charts/Chart.d.ts +28 -0
- package/lib/types/internal/charts/Chart.d.ts.map +1 -0
- package/lib/types/internal/charts/WidgetContainer.d.ts +16 -0
- package/lib/types/internal/charts/WidgetContainer.d.ts.map +1 -0
- package/lib/types/internal/charts/index.d.ts +5 -0
- package/lib/types/internal/charts/index.d.ts.map +1 -0
- package/lib/types/internal/stores/themeStore.d.ts +13 -0
- package/lib/types/internal/stores/themeStore.d.ts.map +1 -0
- package/lib/types/internal/theme/index.d.ts +26 -0
- package/lib/types/internal/theme/index.d.ts.map +1 -0
- package/lib/types/internal/theme/theme.d.ts +113 -0
- package/lib/types/internal/theme/theme.d.ts.map +1 -0
- package/lib/types/internal/theme/useAppTheme.d.ts +2 -0
- package/lib/types/internal/theme/useAppTheme.d.ts.map +1 -0
- package/lib/types/internal/ui/BottomBar.d.ts +9 -0
- package/lib/types/internal/ui/BottomBar.d.ts.map +1 -0
- package/lib/types/internal/ui/Button.d.ts +17 -0
- package/lib/types/internal/ui/Button.d.ts.map +1 -0
- package/lib/types/internal/ui/Card.d.ts +52 -0
- package/lib/types/internal/ui/Card.d.ts.map +1 -0
- package/lib/types/internal/ui/Dropdown.d.ts +12 -0
- package/lib/types/internal/ui/Dropdown.d.ts.map +1 -0
- package/lib/types/internal/ui/Modal.d.ts +45 -0
- package/lib/types/internal/ui/Modal.d.ts.map +1 -0
- package/lib/types/internal/ui/Panel.d.ts +30 -0
- package/lib/types/internal/ui/Panel.d.ts.map +1 -0
- package/lib/types/internal/ui/RadioButton.d.ts +13 -0
- package/lib/types/internal/ui/RadioButton.d.ts.map +1 -0
- package/lib/types/internal/ui/SidePanel.d.ts +10 -0
- package/lib/types/internal/ui/SidePanel.d.ts.map +1 -0
- package/lib/types/internal/ui/ThemeEditor.d.ts +21 -0
- package/lib/types/internal/ui/ThemeEditor.d.ts.map +1 -0
- package/lib/types/internal/ui/TopBar.d.ts +64 -0
- package/lib/types/internal/ui/TopBar.d.ts.map +1 -0
- package/lib/types/internal/ui/bottombar/Item.d.ts +9 -0
- package/lib/types/internal/ui/bottombar/Item.d.ts.map +1 -0
- package/lib/types/internal/ui/bottombar/Root.d.ts +8 -0
- package/lib/types/internal/ui/bottombar/Root.d.ts.map +1 -0
- package/lib/types/internal/ui/bottombar/styles.d.ts +19 -0
- package/lib/types/internal/ui/bottombar/styles.d.ts.map +1 -0
- package/lib/types/internal/ui/dropdown/Group.d.ts +9 -0
- package/lib/types/internal/ui/dropdown/Group.d.ts.map +1 -0
- package/lib/types/internal/ui/dropdown/Item.d.ts +12 -0
- package/lib/types/internal/ui/dropdown/Item.d.ts.map +1 -0
- package/lib/types/internal/ui/dropdown/Menu.d.ts +12 -0
- package/lib/types/internal/ui/dropdown/Menu.d.ts.map +1 -0
- package/lib/types/internal/ui/dropdown/Root.d.ts +11 -0
- package/lib/types/internal/ui/dropdown/Root.d.ts.map +1 -0
- package/lib/types/internal/ui/dropdown/Trigger.d.ts +11 -0
- package/lib/types/internal/ui/dropdown/Trigger.d.ts.map +1 -0
- package/lib/types/internal/ui/dropdown/styles.d.ts +67 -0
- package/lib/types/internal/ui/dropdown/styles.d.ts.map +1 -0
- package/lib/types/internal/ui/sidepanel/Body.d.ts +15 -0
- package/lib/types/internal/ui/sidepanel/Body.d.ts.map +1 -0
- package/lib/types/internal/ui/sidepanel/DrawerPanel.d.ts +13 -0
- package/lib/types/internal/ui/sidepanel/DrawerPanel.d.ts.map +1 -0
- package/lib/types/internal/ui/sidepanel/Footer.d.ts +5 -0
- package/lib/types/internal/ui/sidepanel/Footer.d.ts.map +1 -0
- package/lib/types/internal/ui/sidepanel/Header.d.ts +10 -0
- package/lib/types/internal/ui/sidepanel/Header.d.ts.map +1 -0
- package/lib/types/internal/ui/sidepanel/SidePanel.d.ts +11 -0
- package/lib/types/internal/ui/sidepanel/SidePanel.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/Actions.d.ts +5 -0
- package/lib/types/internal/ui/topbar/Actions.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/Badge.d.ts +5 -0
- package/lib/types/internal/ui/topbar/Badge.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/Divider.d.ts +5 -0
- package/lib/types/internal/ui/topbar/Divider.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/IconButton.d.ts +10 -0
- package/lib/types/internal/ui/topbar/IconButton.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/LevelSelector.d.ts +6 -0
- package/lib/types/internal/ui/topbar/LevelSelector.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/LocationSelector.d.ts +9 -0
- package/lib/types/internal/ui/topbar/LocationSelector.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/Logo.d.ts +8 -0
- package/lib/types/internal/ui/topbar/Logo.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/Root.d.ts +12 -0
- package/lib/types/internal/ui/topbar/Root.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/Section.d.ts +11 -0
- package/lib/types/internal/ui/topbar/Section.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/SelectBase.d.ts +19 -0
- package/lib/types/internal/ui/topbar/SelectBase.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/Spacer.d.ts +3 -0
- package/lib/types/internal/ui/topbar/Spacer.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/Title.d.ts +5 -0
- package/lib/types/internal/ui/topbar/Title.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/ToggleGroup.d.ts +14 -0
- package/lib/types/internal/ui/topbar/ToggleGroup.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/addons/BackButton.d.ts +6 -0
- package/lib/types/internal/ui/topbar/addons/BackButton.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/addons/EventsBar.d.ts +17 -0
- package/lib/types/internal/ui/topbar/addons/EventsBar.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/addons/LevelSelect.d.ts +6 -0
- package/lib/types/internal/ui/topbar/addons/LevelSelect.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/addons/ListTypeToggle.d.ts +6 -0
- package/lib/types/internal/ui/topbar/addons/ListTypeToggle.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/addons/LocationSelect.d.ts +9 -0
- package/lib/types/internal/ui/topbar/addons/LocationSelect.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/addons/SidebarToggleButton.d.ts +6 -0
- package/lib/types/internal/ui/topbar/addons/SidebarToggleButton.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/addons/ThemeToggleButton.d.ts +5 -0
- package/lib/types/internal/ui/topbar/addons/ThemeToggleButton.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/addons/TimelineToggleButton.d.ts +6 -0
- package/lib/types/internal/ui/topbar/addons/TimelineToggleButton.d.ts.map +1 -0
- package/lib/types/internal/ui/topbar/styles.d.ts +148 -0
- package/lib/types/internal/ui/topbar/styles.d.ts.map +1 -0
- package/lib/types/internal/utils/colorShades.d.ts +12 -0
- package/lib/types/internal/utils/colorShades.d.ts.map +1 -0
- package/lib/types/internal/webrtc/WebRTCManager.d.ts +28 -0
- package/lib/types/internal/webrtc/WebRTCManager.d.ts.map +1 -0
- package/lib/types/internal/webrtc/WebRTCStreamPlayer.d.ts +8 -0
- package/lib/types/internal/webrtc/WebRTCStreamPlayer.d.ts.map +1 -0
- package/lib/types/layout/DashboardBottomRegion.d.ts +17 -0
- package/lib/types/layout/DashboardBottomRegion.d.ts.map +1 -0
- package/lib/types/layout/DashboardMain.d.ts +16 -0
- package/lib/types/layout/DashboardMain.d.ts.map +1 -0
- package/lib/types/layout/DashboardMobileDrawer.d.ts +38 -0
- package/lib/types/layout/DashboardMobileDrawer.d.ts.map +1 -0
- package/lib/types/layout/DashboardShell.d.ts +18 -0
- package/lib/types/layout/DashboardShell.d.ts.map +1 -0
- package/lib/types/layout/DashboardSidePanel.d.ts +30 -0
- package/lib/types/layout/DashboardSidePanel.d.ts.map +1 -0
- package/lib/types/layout/index.d.ts +21 -0
- package/lib/types/layout/index.d.ts.map +1 -0
- package/lib/types/types/generic.d.ts +73 -0
- package/lib/types/types/generic.d.ts.map +1 -0
- package/lib/types/types/index.d.ts +7 -0
- package/lib/types/types/index.d.ts.map +1 -0
- package/lib/types/ui/index.d.ts +21 -0
- package/lib/types/ui/index.d.ts.map +1 -0
- package/lib/types/widgets/AIAnalysisPanel.d.ts +33 -0
- package/lib/types/widgets/AIAnalysisPanel.d.ts.map +1 -0
- package/lib/types/widgets/AlertCameraChart.d.ts +18 -0
- package/lib/types/widgets/AlertCameraChart.d.ts.map +1 -0
- package/lib/types/widgets/AlertSeverityChart.d.ts +20 -0
- package/lib/types/widgets/AlertSeverityChart.d.ts.map +1 -0
- package/lib/types/widgets/AlertTimelineChart.d.ts +18 -0
- package/lib/types/widgets/AlertTimelineChart.d.ts.map +1 -0
- package/lib/types/widgets/AlertTriggerChart.d.ts +18 -0
- package/lib/types/widgets/AlertTriggerChart.d.ts.map +1 -0
- package/lib/types/widgets/AlertsPanel.d.ts +22 -0
- package/lib/types/widgets/AlertsPanel.d.ts.map +1 -0
- package/lib/types/widgets/CameraStreamWidget.d.ts +39 -0
- package/lib/types/widgets/CameraStreamWidget.d.ts.map +1 -0
- package/lib/types/widgets/ChatbotPanel.d.ts +16 -0
- package/lib/types/widgets/ChatbotPanel.d.ts.map +1 -0
- package/lib/types/widgets/RecentActivityFeed.d.ts +18 -0
- package/lib/types/widgets/RecentActivityFeed.d.ts.map +1 -0
- package/lib/types/widgets/TopCamerasList.d.ts +17 -0
- package/lib/types/widgets/TopCamerasList.d.ts.map +1 -0
- package/lib/types/widgets/index.d.ts +27 -0
- package/lib/types/widgets/index.d.ts.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertTimelineChart.d.ts","sourceRoot":"","sources":["../../../src/widgets/AlertTimelineChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,MAAM,WAAW,uBAAuB;IACtC,gDAAgD;IAChD,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAsDhE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ChartData } from '../types/generic';
|
|
3
|
+
export interface AlertTriggerChartProps {
|
|
4
|
+
/** Chart data: labels and values (e.g. category/count pairs) */
|
|
5
|
+
data: ChartData;
|
|
6
|
+
variant?: 'light' | 'dark';
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* AlertTriggerChart - Dashboard widget showing distribution by category (e.g. trigger type)
|
|
12
|
+
*
|
|
13
|
+
* Accepts generic ChartData. Consumers transform their data into { labels, values }.
|
|
14
|
+
* Colors can be provided via data.colors (Record<string, string> or string[]).
|
|
15
|
+
* If not provided, shades of accent.primary will be generated.
|
|
16
|
+
*/
|
|
17
|
+
export declare const AlertTriggerChart: React.FC<AlertTriggerChartProps>;
|
|
18
|
+
//# sourceMappingURL=AlertTriggerChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertTriggerChart.d.ts","sourceRoot":"","sources":["../../../src/widgets/AlertTriggerChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAI7C,MAAM,WAAW,sBAAsB;IACrC,gEAAgE;IAChE,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA+D9D,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AlertListItem } from '../types/generic';
|
|
3
|
+
export interface AlertsPanelProps {
|
|
4
|
+
/** List of alerts to display (generic shape) */
|
|
5
|
+
items: AlertListItem[];
|
|
6
|
+
onItemClick?: (item: AlertListItem) => void;
|
|
7
|
+
variant?: 'light' | 'dark';
|
|
8
|
+
maxItems?: number;
|
|
9
|
+
/** Card title */
|
|
10
|
+
title?: string;
|
|
11
|
+
/** Card description */
|
|
12
|
+
description?: string;
|
|
13
|
+
/** Message when no items */
|
|
14
|
+
emptyMessage?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* AlertsPanel - Dashboard widget for displaying a list of alerts/items
|
|
18
|
+
*
|
|
19
|
+
* Accepts generic AlertListItem[]. Consumers transform their data into this shape.
|
|
20
|
+
*/
|
|
21
|
+
export declare const AlertsPanel: React.FC<AlertsPanelProps>;
|
|
22
|
+
//# sourceMappingURL=AlertsPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertsPanel.d.ts","sourceRoot":"","sources":["../../../src/widgets/AlertsPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAIvC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,WAAW,gBAAgB;IAC/B,gDAAgD;IAChD,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA0ClD,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Camera } from '../types/generic';
|
|
3
|
+
export type StreamType = 'webrtc' | 'hls' | 'rtsp' | 'dash' | 'unknown';
|
|
4
|
+
export interface StreamComponentProps {
|
|
5
|
+
url: string;
|
|
6
|
+
cameraName: string;
|
|
7
|
+
streamType?: StreamType;
|
|
8
|
+
onOpenFullscreen?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export type StreamComponent = React.ComponentType<StreamComponentProps>;
|
|
11
|
+
export interface CameraStreamWidgetProps {
|
|
12
|
+
camera: Camera;
|
|
13
|
+
streamUrl?: string;
|
|
14
|
+
onClose?: () => void;
|
|
15
|
+
onFullscreen?: (url: string, cameraName: string) => void;
|
|
16
|
+
variant?: 'light' | 'dark';
|
|
17
|
+
/**
|
|
18
|
+
* Type of stream used by this widget. Determines default renderer behavior.
|
|
19
|
+
* If a custom StreamComponent is not provided and streamType is "webrtc",
|
|
20
|
+
* the SDK's built-in WebRTCStreamPlayer will be used.
|
|
21
|
+
*/
|
|
22
|
+
streamType?: StreamType;
|
|
23
|
+
/**
|
|
24
|
+
* Optional: Consumers can provide their own stream component which receives
|
|
25
|
+
* the URL, camera name, and streamType. This allows full customization for
|
|
26
|
+
* WebRTC, HLS, RTSP, etc.
|
|
27
|
+
*/
|
|
28
|
+
StreamComponent?: StreamComponent;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* CameraStreamWidget - Dashboard widget for displaying camera live stream
|
|
32
|
+
*
|
|
33
|
+
* Props-based component that accepts camera and streamUrl as props.
|
|
34
|
+
* By default, when streamType is "webrtc" and no custom StreamComponent is provided,
|
|
35
|
+
* the SDK's internal WebRTCStreamPlayer is used. For other stream types, consumers
|
|
36
|
+
* can provide their own StreamComponent implementation.
|
|
37
|
+
*/
|
|
38
|
+
export declare const CameraStreamWidget: React.FC<CameraStreamWidgetProps>;
|
|
39
|
+
//# sourceMappingURL=CameraStreamWidget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CameraStreamWidget.d.ts","sourceRoot":"","sources":["../../../src/widgets/CameraStreamWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAM1C,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAExE,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC;AAExE,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B;;;;OAIG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;OAIG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA8GhE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ChatbotPanelProps {
|
|
3
|
+
variant?: 'light' | 'dark';
|
|
4
|
+
onOpenChat?: () => void;
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
placeholderText?: string;
|
|
8
|
+
buttonLabel?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* ChatbotPanel - Dashboard widget for chatbot CTA
|
|
12
|
+
*
|
|
13
|
+
* Generic placeholder. Consumers provide their own copy and handler.
|
|
14
|
+
*/
|
|
15
|
+
export declare const ChatbotPanel: React.FC<ChatbotPanelProps>;
|
|
16
|
+
//# sourceMappingURL=ChatbotPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatbotPanel.d.ts","sourceRoot":"","sources":["../../../src/widgets/ChatbotPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAuBpD,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AlertListItem } from '../types/generic';
|
|
3
|
+
export interface RecentActivityFeedProps {
|
|
4
|
+
/** List of recent items (generic shape) */
|
|
5
|
+
items: AlertListItem[];
|
|
6
|
+
variant?: 'light' | 'dark';
|
|
7
|
+
maxItems?: number;
|
|
8
|
+
onItemClick?: (id: string | number) => void;
|
|
9
|
+
title?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* RecentActivityFeed - Dashboard widget showing recent activity/events
|
|
14
|
+
*
|
|
15
|
+
* Accepts generic AlertListItem[]. Consumers transform their data into this shape.
|
|
16
|
+
*/
|
|
17
|
+
export declare const RecentActivityFeed: React.FC<RecentActivityFeedProps>;
|
|
18
|
+
//# sourceMappingURL=RecentActivityFeed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecentActivityFeed.d.ts","sourceRoot":"","sources":["../../../src/widgets/RecentActivityFeed.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,MAAM,WAAW,uBAAuB;IACtC,2CAA2C;IAC3C,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAqHhE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SourceStatsItem } from '../types/generic';
|
|
3
|
+
export interface TopCamerasListProps {
|
|
4
|
+
/** Ranked list of sources (e.g. cameras) with counts */
|
|
5
|
+
items: SourceStatsItem[];
|
|
6
|
+
variant?: 'light' | 'dark';
|
|
7
|
+
onItemClick?: (id: string) => void;
|
|
8
|
+
title?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* TopCamerasList - Dashboard widget showing ranked sources by count
|
|
13
|
+
*
|
|
14
|
+
* Accepts generic SourceStatsItem[]. Consumers provide pre-ranked data.
|
|
15
|
+
*/
|
|
16
|
+
export declare const TopCamerasList: React.FC<TopCamerasListProps>;
|
|
17
|
+
//# sourceMappingURL=TopCamerasList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TopCamerasList.d.ts","sourceRoot":"","sources":["../../../src/widgets/TopCamerasList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAInD,MAAM,WAAW,mBAAmB;IAClC,wDAAwD;IACxD,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkHxD,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dashboard SDK - Widget Components
|
|
3
|
+
*
|
|
4
|
+
* Props-based dashboard widgets for displaying alerts, analytics, cameras, etc.
|
|
5
|
+
* All widgets accept data as props - no store dependencies.
|
|
6
|
+
*/
|
|
7
|
+
export { AlertsPanel } from './AlertsPanel';
|
|
8
|
+
export type { AlertsPanelProps } from './AlertsPanel';
|
|
9
|
+
export { AIAnalysisPanel } from './AIAnalysisPanel';
|
|
10
|
+
export type { AIAnalysisPanelProps, TopCategoryItem } from './AIAnalysisPanel';
|
|
11
|
+
export { ChatbotPanel } from './ChatbotPanel';
|
|
12
|
+
export type { ChatbotPanelProps } from './ChatbotPanel';
|
|
13
|
+
export { AlertTriggerChart } from './AlertTriggerChart';
|
|
14
|
+
export type { AlertTriggerChartProps } from './AlertTriggerChart';
|
|
15
|
+
export { AlertCameraChart } from './AlertCameraChart';
|
|
16
|
+
export type { AlertCameraChartProps } from './AlertCameraChart';
|
|
17
|
+
export { AlertTimelineChart } from './AlertTimelineChart';
|
|
18
|
+
export type { AlertTimelineChartProps } from './AlertTimelineChart';
|
|
19
|
+
export { AlertSeverityChart } from './AlertSeverityChart';
|
|
20
|
+
export type { AlertSeverityChartProps } from './AlertSeverityChart';
|
|
21
|
+
export { TopCamerasList } from './TopCamerasList';
|
|
22
|
+
export type { TopCamerasListProps } from './TopCamerasList';
|
|
23
|
+
export { RecentActivityFeed } from './RecentActivityFeed';
|
|
24
|
+
export type { RecentActivityFeedProps } from './RecentActivityFeed';
|
|
25
|
+
export { CameraStreamWidget } from './CameraStreamWidget';
|
|
26
|
+
export type { CameraStreamWidgetProps } from './CameraStreamWidget';
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/widgets/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE/E,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAGpE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAGpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@twinmatrix/ui-sdk",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "TwinMatrix UI SDK - Dashboard components, widgets, and UI primitives",
|
|
5
|
+
"main": "lib/cjs/index.js",
|
|
6
|
+
"module": "lib/esm/index.js",
|
|
7
|
+
"types": "lib/types/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"lib",
|
|
10
|
+
"README.md",
|
|
11
|
+
"THEME_CUSTOMIZATION.md"
|
|
12
|
+
],
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/TwinMatrixOrg/twinmatrix-ui-sdk.git"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"react",
|
|
19
|
+
"dashboard",
|
|
20
|
+
"ui",
|
|
21
|
+
"components",
|
|
22
|
+
"widgets",
|
|
23
|
+
"twinmatrix"
|
|
24
|
+
],
|
|
25
|
+
"author": {
|
|
26
|
+
"name": "TwinMatrix",
|
|
27
|
+
"email": "info@twinmatrix.net",
|
|
28
|
+
"url": "https://www.twinmatrix.net"
|
|
29
|
+
},
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/TwinMatrixOrg/twinmatrix-ui-sdk/issues"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://github.com/TwinMatrixOrg/twinmatrix-ui-sdk#readme",
|
|
34
|
+
"scripts": {
|
|
35
|
+
"clean": "rimraf lib",
|
|
36
|
+
"declarations": "tsc -p tsconfig.json",
|
|
37
|
+
"build:esm": "rollup -c rollup.config.js --environment FORMAT:esm",
|
|
38
|
+
"build:cjs": "rollup -c rollup.config.js --environment FORMAT:cjs",
|
|
39
|
+
"build": "npm-run-all -l clean -p build:esm build:cjs declarations"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@babel/core": "^7.28.6",
|
|
43
|
+
"@babel/preset-env": "^7.28.6",
|
|
44
|
+
"@babel/preset-react": "^7.28.5",
|
|
45
|
+
"@babel/preset-typescript": "^7.28.5",
|
|
46
|
+
"@rollup/plugin-babel": "^5.2.3",
|
|
47
|
+
"@rollup/plugin-commonjs": "^23.0.4",
|
|
48
|
+
"@rollup/plugin-json": "^6.0.0",
|
|
49
|
+
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
50
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
51
|
+
"cross-env": "^7.0.3",
|
|
52
|
+
"npm-run-all": "^4.1.5",
|
|
53
|
+
"rimraf": "^3.0.2",
|
|
54
|
+
"rollup": "^2.38.4",
|
|
55
|
+
"rollup-plugin-import-css": "^4.1.2",
|
|
56
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
57
|
+
"typescript": "^5.9.3"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
61
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
62
|
+
"react-chartjs-2": "^5.0.0",
|
|
63
|
+
"chart.js": "^4.0.0",
|
|
64
|
+
"zustand": "^4.0.0 || ^5.0.0"
|
|
65
|
+
},
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"@iconify/react": "^6.0.2",
|
|
68
|
+
"dayjs": "^1.11.19"
|
|
69
|
+
}
|
|
70
|
+
}
|