@optifye/dashboard-core 5.0.0 → 6.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/dist/index.d.mts CHANGED
@@ -224,6 +224,20 @@ interface DateTimeConfig {
224
224
  timeFormatOptions?: Intl.DateTimeFormatOptions;
225
225
  dateTimeFormatOptions?: Intl.DateTimeFormatOptions;
226
226
  }
227
+ interface SOPCategory {
228
+ /** Unique identifier for the category (maps to S3 folder names) */
229
+ id: string;
230
+ /** Display label for the UI */
231
+ label: string;
232
+ /** Color theme for the category card */
233
+ color: string;
234
+ /** Optional description shown in UI */
235
+ description?: string;
236
+ /** Optional S3 folder name if different from id */
237
+ s3FolderName?: string;
238
+ /** Optional subtitle text for the card */
239
+ subtitle?: string;
240
+ }
227
241
  interface S3Config {
228
242
  bucketName: string;
229
243
  region?: string;
@@ -233,6 +247,13 @@ interface S3Config {
233
247
  secretAccessKey: string;
234
248
  };
235
249
  signedUrlExpiresIn?: number;
250
+ /** SOP categories configuration */
251
+ sopCategories?: {
252
+ /** Default categories for all workspaces */
253
+ default: SOPCategory[];
254
+ /** Workspace-specific category overrides by UUID */
255
+ workspaceOverrides?: Record<string, SOPCategory[]>;
256
+ };
236
257
  }
237
258
  interface VideoCroppingRect {
238
259
  /** X offset as percentage (0-100) from left */
@@ -633,6 +654,7 @@ interface WorkspaceMonthlyMetric {
633
654
  avg_pph: number;
634
655
  pph_threshold: number;
635
656
  workspace_rank: number;
657
+ idle_time: number;
636
658
  }
637
659
  interface LineMonthlyMetric {
638
660
  date: string;
@@ -901,9 +923,9 @@ interface BottleneckVideoData {
901
923
  id: string;
902
924
  src: string;
903
925
  timestamp: string;
904
- severity: 'low' | 'medium' | 'high';
926
+ severity: VideoSeverity;
905
927
  description: string;
906
- type: 'bottleneck' | 'low_value' | 'best_cycle_time' | 'worst_cycle_time' | 'missing_quality_check' | 'cycle_completions';
928
+ type: VideoType;
907
929
  originalUri: string;
908
930
  cycle_time_seconds?: number;
909
931
  creation_timestamp?: string;
@@ -959,7 +981,7 @@ interface VideoMetadata {
959
981
  creation_timestamp?: string;
960
982
  [key: string]: any;
961
983
  }
962
- type VideoType = 'bottleneck' | 'low_value' | 'best_cycle_time' | 'worst_cycle_time' | 'missing_quality_check' | 'cycle_completions';
984
+ type VideoType = string;
963
985
  type VideoSeverity = 'low' | 'medium' | 'high';
964
986
 
965
987
  interface ChatThread {
@@ -1973,6 +1995,48 @@ interface UseActiveBreaksResult {
1973
1995
  */
1974
1996
  declare const useActiveBreaks: (lineIds: string[]) => UseActiveBreaksResult;
1975
1997
 
1998
+ /**
1999
+ * Options for initializing the useAllWorkspaceMetrics hook.
2000
+ */
2001
+ interface UseAllWorkspaceMetricsOptions {
2002
+ /** Specific date (YYYY-MM-DD) to fetch metrics for, overriding the current operational date. */
2003
+ initialDate?: string;
2004
+ /** Specific shift ID to fetch metrics for, overriding the current shift. */
2005
+ initialShiftId?: number;
2006
+ }
2007
+ /**
2008
+ * @hook useAllWorkspaceMetrics
2009
+ * @summary Fetches and subscribes to workspace metrics for all production lines, for a specific date and shift.
2010
+ *
2011
+ * @description This hook retrieves performance metrics for all workspaces across all lines.
2012
+ * It can be initialized with a specific date and shift, or it defaults to the current operational date and shift.
2013
+ * The hook establishes real-time subscriptions to update metrics when relevant changes occur in the database.
2014
+ *
2015
+ * @param {UseAllWorkspaceMetricsOptions} [options] - Optional parameters to specify an initial date and shift.
2016
+ *
2017
+ * @returns {object} An object containing:
2018
+ * @returns {WorkspaceMetrics[]} workspaces - Array of workspace metrics data for all lines.
2019
+ * @returns {boolean} loading - True if data is currently being fetched, false otherwise.
2020
+ * @returns {MetricsError | null} error - An error object if fetching failed, null otherwise.
2021
+ * @returns {() => Promise<void>} refreshWorkspaces - A function to manually trigger a refetch of the workspace metrics.
2022
+ *
2023
+ * @example
2024
+ * // Fetch metrics for the current operational date/shift
2025
+ * const { workspaces, loading, error } = useAllWorkspaceMetrics();
2026
+ *
2027
+ * // Fetch metrics for a specific past date and shift
2028
+ * const { workspaces: pastWorkspaces } = useAllWorkspaceMetrics({
2029
+ * initialDate: '2023-10-15',
2030
+ * initialShiftId: 1,
2031
+ * });
2032
+ */
2033
+ declare const useAllWorkspaceMetrics: (options?: UseAllWorkspaceMetricsOptions) => {
2034
+ workspaces: WorkspaceMetrics[];
2035
+ loading: boolean;
2036
+ error: MetricsError | null;
2037
+ refreshWorkspaces: () => Promise<void>;
2038
+ };
2039
+
1976
2040
  /**
1977
2041
  * Interface for navigation method used across packages
1978
2042
  * Abstracts navigation implementation details from components
@@ -2042,7 +2106,7 @@ interface LineNavigationParams {
2042
2106
  * @summary Provides abstracted navigation utilities and current route state for the dashboard application.
2043
2107
  * @description This hook serves as a wrapper around the Next.js `useRouter` hook, offering a simplified API for common navigation tasks
2044
2108
  * and for accessing dashboard-specific route information. It helps maintain consistency in navigation logic and route patterns.
2045
- * Assumed route patterns include: `/` (dashboard), `/workspace/[id]`, `/kpis/[lineId]`, `/targets`, `/shifts`, `/leaderboard/[lineId]`, `/factory-view`.
2109
+ * Assumed route patterns include: `/` (dashboard), `/workspace/[id]`, `/kpis/[lineId]`, `/targets`, `/shifts`, `/leaderboard`, `/factory-view`.
2046
2110
  * The `activeLineId` property has a fallback to `entityConfig.defaultLineId` when not on a specific line page, which implies a global default line context (see {@link EntityConfigShape} for expected structure).
2047
2111
  *
2048
2112
  * @returns {NavigationHookReturn} An object containing various navigation actions and properties related to the current route.
@@ -2369,7 +2433,6 @@ declare class SSEChatClient {
2369
2433
  }, callbacks: {
2370
2434
  onThreadCreated?: (threadId: string) => void;
2371
2435
  onMessage?: (text: string) => void;
2372
- onReasoning?: (text: string) => void;
2373
2436
  onToolCall?: (tools: any[]) => void;
2374
2437
  onToolResult?: (results: any[]) => void;
2375
2438
  onComplete?: (messageId: number, metrics?: any) => void;
@@ -3467,8 +3530,9 @@ interface BottlenecksContentProps {
3467
3530
  }
3468
3531
  /**
3469
3532
  * Filter type for bottleneck clips - expanded for new video types
3533
+ * Now supports dynamic types from configuration
3470
3534
  */
3471
- type BottleneckFilterType = 'all' | 'high' | 'medium' | 'low' | 'low_value' | 'sop_deviations' | 'best_cycle_time' | 'worst_cycle_time' | 'long_cycle_time' | 'cycle_completions';
3535
+ type BottleneckFilterType = string;
3472
3536
  /**
3473
3537
  * Clip counts for each type/severity - updated for new video types
3474
3538
  */
@@ -3561,7 +3625,6 @@ interface VideoGridViewProps {
3561
3625
  workspaces: WorkspaceMetrics[];
3562
3626
  selectedLine?: number;
3563
3627
  className?: string;
3564
- lineIdMapping?: Record<string, string>;
3565
3628
  videoSources?: {
3566
3629
  defaultHlsUrl?: string;
3567
3630
  workspaceHlsUrls?: Record<string, string>;
@@ -3583,6 +3646,7 @@ interface VideoCardProps {
3583
3646
  canvasFps?: number;
3584
3647
  useRAF?: boolean;
3585
3648
  className?: string;
3649
+ compact?: boolean;
3586
3650
  }
3587
3651
  declare const VideoCard: React__default.FC<VideoCardProps>;
3588
3652
 
@@ -3719,19 +3783,21 @@ declare const KPISection: React__default.FC<KPISectionProps>;
3719
3783
  interface DashboardHeaderProps {
3720
3784
  lineTitle: string;
3721
3785
  className?: string;
3786
+ headerControls?: React__default.ReactNode;
3722
3787
  }
3723
3788
  /**
3724
3789
  * Header component for dashboard pages with title and timer
3725
3790
  */
3726
- declare const DashboardHeader: React__default.MemoExoticComponent<({ lineTitle, className }: DashboardHeaderProps) => react_jsx_runtime.JSX.Element>;
3791
+ declare const DashboardHeader: React__default.MemoExoticComponent<({ lineTitle, className, headerControls }: DashboardHeaderProps) => react_jsx_runtime.JSX.Element>;
3727
3792
 
3728
3793
  interface NoWorkspaceDataProps {
3794
+ message?: string;
3729
3795
  className?: string;
3730
3796
  }
3731
3797
  /**
3732
3798
  * Component to display when no workspace data is available
3733
3799
  */
3734
- declare const NoWorkspaceData: React__default.MemoExoticComponent<({ className }: NoWorkspaceDataProps) => react_jsx_runtime.JSX.Element>;
3800
+ declare const NoWorkspaceData: React__default.MemoExoticComponent<({ message, className }: NoWorkspaceDataProps) => react_jsx_runtime.JSX.Element>;
3735
3801
 
3736
3802
  interface WorkspaceMonthlyDataFetcherProps {
3737
3803
  /**
@@ -4009,6 +4075,10 @@ declare const HelpView: React__default.FC<HelpViewProps>;
4009
4075
  declare const AuthenticatedHelpView: (props: HelpViewProps) => react_jsx_runtime.JSX.Element | null;
4010
4076
 
4011
4077
  interface HomeViewProps {
4078
+ /**
4079
+ * Array of line UUIDs to be managed by the view
4080
+ */
4081
+ lineIds: string[];
4012
4082
  /**
4013
4083
  * UUID of the default line to display
4014
4084
  */
@@ -4018,13 +4088,13 @@ interface HomeViewProps {
4018
4088
  */
4019
4089
  factoryViewId: string;
4020
4090
  /**
4021
- * UUID for Line 1
4091
+ * @deprecated Will be inferred from lineIds and lineNames
4022
4092
  */
4023
- line1Uuid: string;
4093
+ line1Uuid?: string;
4024
4094
  /**
4025
- * UUID for Line 2
4095
+ * @deprecated Will be inferred from lineIds
4026
4096
  */
4027
- line2Uuid: string;
4097
+ line2Uuid?: string;
4028
4098
  /**
4029
4099
  * Names for each line, keyed by UUID
4030
4100
  */
@@ -4044,7 +4114,8 @@ interface HomeViewProps {
4044
4114
  /**
4045
4115
  * HomeView component - Main dashboard landing page showing factory overview with workspace grid
4046
4116
  */
4047
- declare function HomeView({ defaultLineId, factoryViewId, line1Uuid, line2Uuid, lineNames, videoSources, factoryName }: HomeViewProps): React__default.ReactNode;
4117
+ declare function HomeView({ defaultLineId, factoryViewId, lineIds: allLineIds, // Default to empty array
4118
+ lineNames, videoSources, factoryName }: HomeViewProps): React__default.ReactNode;
4048
4119
  declare const AuthenticatedHomeView: (props: HomeViewProps) => react_jsx_runtime.JSX.Element | null;
4049
4120
 
4050
4121
  interface KPIDetailViewProps {
@@ -4118,7 +4189,7 @@ interface KPIsOverviewViewProps {
4118
4189
  declare const KPIsOverviewView: React__default.FC<KPIsOverviewViewProps>;
4119
4190
 
4120
4191
  /**
4121
- * LeaderboardDetailView component for displaying a detailed leaderboard for a specific line
4192
+ * LeaderboardDetailView component for displaying a detailed leaderboard for all lines
4122
4193
  */
4123
4194
  declare const LeaderboardDetailView: React__default.FC<LeaderboardDetailViewProps>;
4124
4195
 
@@ -4291,7 +4362,8 @@ declare const DEFAULT_THEME_CONFIG: ThemeConfig;
4291
4362
  declare const DEFAULT_ANALYTICS_CONFIG: AnalyticsConfig;
4292
4363
  declare const DEFAULT_AUTH_CONFIG: AuthConfig;
4293
4364
  declare const DEFAULT_VIDEO_CONFIG: VideoConfig;
4294
- declare const LINE_1_UUID = "910a224b-0abc-459a-babb-4c899824cfe7";
4365
+ declare const LINE_1_UUID = "98a2287e-8d55-4020-b00d-b9940437e3e1";
4366
+ declare const LINE_2_UUID = "d93997bb-ecac-4478-a4a6-008d536b724c";
4295
4367
  declare const DEFAULT_CONFIG: Omit<DashboardConfig, 'supabaseUrl' | 'supabaseKey'>;
4296
4368
 
4297
4369
  /**
@@ -4528,4 +4600,4 @@ interface ThreadSidebarProps {
4528
4600
  }
4529
4601
  declare const ThreadSidebar: React__default.FC<ThreadSidebarProps>;
4530
4602
 
4531
- export { ACTION_NAMES, AIAgentView, type Action, type ActionName, type ActionService, type ActionThreshold, type ActiveBreak, type AnalyticsConfig, AuthCallback, type AuthCallbackProps, AuthCallbackView, type AuthCallbackViewProps, type AuthConfig, AuthProvider, type AuthUser, AuthenticatedFactoryView, AuthenticatedHelpView, AuthenticatedHomeView, AuthenticatedTargetsView, BarChart, type BarChartDataItem, type BarChartProps, type BarProps, BaseHistoryCalendar, type BaseHistoryCalendarProps, type BaseLineMetric, type BasePerformanceMetric, type BottleneckFilterType, type BottleneckVideo, type BottleneckVideoData, BottlenecksContent, type BottlenecksContentProps, type BreadcrumbItem, type Break, BreakNotificationPopup, type BreakNotificationPopupProps, type BreakRowProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type ChatMessage, type ChatThread, type ClipCounts, type ComponentOverride, type CoreComponents, type CurrentShiftResult, CycleTimeChart, type CycleTimeChartProps, CycleTimeOverTimeChart, type CycleTimeOverTimeChartProps, DEFAULT_ANALYTICS_CONFIG, DEFAULT_AUTH_CONFIG, DEFAULT_CONFIG, DEFAULT_DATABASE_CONFIG, DEFAULT_DATE_TIME_CONFIG, DEFAULT_ENDPOINTS_CONFIG, DEFAULT_ENTITY_CONFIG, DEFAULT_SHIFT_CONFIG, DEFAULT_THEME_CONFIG, DEFAULT_VIDEO_CONFIG, DEFAULT_WORKSPACE_CONFIG, DEFAULT_WORKSPACE_POSITIONS, type DashboardConfig, DashboardHeader, type DashboardKPIs, DashboardLayout, type DashboardLayoutProps, DashboardOverridesProvider, DashboardProvider, type DashboardService, type DatabaseConfig, DateDisplay, type DateTimeConfig, DateTimeDisplay, type DateTimeDisplayProps, type DayHistoryData, type DaySummaryData, DebugAuth, DebugAuthView, EmptyStateMessage, type EmptyStateMessageProps, type EndpointsConfig, type EntityConfig, type FactoryOverviewData, FactoryView, type FactoryViewProps, type FormatNumberOptions, GaugeChart, type GaugeChartProps, GridComponentsPlaceholder, Header, type HeaderProps, HelpView, type HelpViewProps, type HistoryCalendarProps, HomeView, type HookOverride, HourlyOutputChart, type HourlyOutputChartProps, type HourlyPerformance, type ISTDateProps, ISTTimer, type ISTTimerProps, KPICard, type KPICardProps, KPIDetailView, type KPIDetailViewProps, KPIGrid, type KPIGridProps, KPIHeader, type KPIHeaderProps, KPISection, type KPITrend, KPIsOverviewView, type KPIsOverviewViewProps, LINE_1_UUID, LargeOutputProgressChart, type LargeOutputProgressChartProps, LeaderboardDetailView, type LeaderboardDetailViewProps, type LeaderboardEntry, Legend, LineChart, type LineChartDataItem, type LineChartProps, type LineDetails, type LineDisplayData, LineHistoryCalendar, type LineHistoryCalendarProps, type LineInfo, type LineMetrics, LineMonthlyHistory, type LineMonthlyHistoryProps, type LineMonthlyMetric, LineMonthlyPdfGenerator, type LineMonthlyPdfGeneratorProps, type LineNavigationParams, LinePdfExportButton, type LinePdfExportButtonProps, LinePdfGenerator, type LinePdfGeneratorProps, type LineProps, type LineShiftConfig, type LineSnapshot, type LineThreshold, LineWhatsAppShareButton, type LineWhatsAppShareProps, LiveTimer, LoadingOverlay, LoadingPage, LoadingSpinner, LoginPage, type LoginPageProps, LoginView, type LoginViewProps, MainLayout, type MainLayoutProps, type Metric, MetricCard, type MetricCardProps$1 as MetricCardProps, type MetricsError, type NavItem, type NavItemTrackingEvent, NoWorkspaceData, type OperatorData, type OperatorInfo, OptifyeAgentClient, type OptifyeAgentContext, type OptifyeAgentRequest, type OptifyeAgentResponse, OutputProgressChart, type OutputProgressChartProps, type OverridesMap, type OverviewLineMetric, type OverviewWorkspaceMetric, PageHeader, type PageHeaderProps, type PageOverride, PieChart, type PieChartProps, type PoorPerformingWorkspace, type ProfileMenuItem, ProfileView, type QualityMetric, type QualityOverview, type QualityService, type RateLimitOptions, type RateLimitResult, type RealtimeService, RegistryProvider, type RoutePath, type S3ClipsAPIParams, type S3Config, type S3ListObjectsParams, S3Service, type S3ServiceConfig, SOPComplianceChart, type SOPComplianceChartProps, SSEChatClient, type SSEEvent, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type ShiftConfig, type ShiftConfiguration, type ShiftConfigurationRecord, type ShiftData$2 as ShiftData, ShiftDisplay, type ShiftHistoryData, type ShiftHoursMap, type ShiftPanelProps, type ShiftSummaryData, type ShiftTime, ShiftsView, type ShiftsViewProps, SideNavBar, type SideNavBarProps, type SimpleLine, SingleVideoStream, type SingleVideoStreamProps, Skeleton, SlackAPI, type StreamProxyConfig, type SupabaseClient, SupabaseProvider, type Target, TargetWorkspaceGrid, type TargetWorkspaceGridProps, TargetsView, type TargetsViewProps, type ThemeColorValue, type ThemeConfig, ThreadSidebar, TimeDisplay, TimePickerDropdown, type TrackingEventProperties, type TrendDirection, type UnderperformingWorkspace, type UnderperformingWorkspaces, type UseActiveBreaksResult, type UseDashboardMetricsProps, type UseFactoryOverviewOptions, type UseFormatNumberResult, type UseMessagesResult, type UseRealtimeLineMetricsProps, type UseTargetsOptions, type UseThreadsResult, type UseWorkspaceOperatorsOptions, type UserProfileConfig, VideoCard, type VideoConfig, type VideoCroppingConfig, type VideoCroppingRect, VideoGridView, type VideoMetadata, VideoPreloader, type VideoSeverity, type VideoSummary, type VideoType, WORKSPACE_POSITIONS, type WhatsAppSendResult, WhatsAppShareButton, type WhatsAppShareButtonProps, type WhatsappService, type Workspace, type WorkspaceActionUpdate, WorkspaceCard, type WorkspaceCardProps, type WorkspaceConfig, WrappedComponent as WorkspaceDetailView, type WorkspaceDetailedMetrics, WorkspaceDisplayNameExample, WorkspaceGrid, WorkspaceGridItem, type WorkspaceGridItemProps, WorkspaceHistoryCalendar, WorkspaceMetricCards, type WorkspaceMetricCardsProps, type WorkspaceMetrics, WorkspaceMonthlyDataFetcher, type WorkspaceMonthlyDataFetcherProps, type WorkspaceMonthlyMetric, WorkspaceMonthlyPdfGenerator, type WorkspaceMonthlyPdfGeneratorProps, type WorkspaceNavigationParams, WorkspacePdfExportButton, type WorkspacePdfExportButtonProps, WorkspacePdfGenerator, type WorkspacePdfGeneratorProps, type WorkspacePosition, type WorkspaceQualityData, type WorkspaceUrlMapping, WorkspaceWhatsAppShareButton, type WorkspaceWhatsAppShareProps, actionService, apiUtils, authCoreService, authOTPService, authRateLimitService, checkRateLimit, clearAllRateLimits, clearRateLimit, clearS3VideoCache, clearS3VideoFromCache, clearWorkspaceDisplayNamesCache, cn, createStreamProxyHandler, createSupabaseClient, createThrottledReload, dashboardService, deleteThread, forceRefreshWorkspaceDisplayNames, formatDateInZone, formatDateTimeInZone, formatISTDate, formatIdleTime, formatTimeInZone, fromUrlFriendlyName, getAllThreadMessages, getAllWorkspaceDisplayNamesAsync, getAnonClient, getCameraNumber, getCompanyMetricsTableName, getConfigurableShortWorkspaceDisplayName, getConfigurableWorkspaceDisplayName, getCurrentShift, getCurrentTimeInZone, getDashboardHeaderTimeInZone, getDaysDifferenceInZone, getDefaultCameraStreamUrl, getDefaultTabForWorkspace, getManufacturingInsights, getMetricsTablePrefix, getOperationalDate, getS3SignedUrl, getS3VideoSrc, getShortWorkspaceDisplayName, getShortWorkspaceDisplayNameAsync, getStoredWorkspaceMappings, getThreadMessages, getUserThreads, getUserThreadsPaginated, getWorkspaceDisplayName, getWorkspaceDisplayNameAsync, getWorkspaceDisplayNamesMap, getWorkspaceFromUrl, getWorkspaceNavigationParams, identifyCoreUser, initializeCoreMixpanel, isTransitionPeriod, isValidLineInfoPayload, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, mergeWithDefaultConfig, optifyeAgentClient, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, s3VideoPreloader, storeWorkspaceMapping, streamProxyConfig, throttledReloadDashboard, toUrlFriendlyName, trackCoreEvent, trackCorePageView, updateThreadTitle, useActiveBreaks, useAnalyticsConfig, useAuth, useAuthConfig, useComponentOverride, useCustomConfig, useDashboardConfig, useDashboardMetrics, useDatabaseConfig, useDateFormatter, useDateTimeConfig, useEndpointsConfig, useEntityConfig, useFactoryOverviewMetrics, useFeatureFlags, useFormatNumber, useHistoricWorkspaceMetrics, useHlsStream, useHlsStreamWithCropping, useHookOverride, useLeaderboardMetrics, useLineDetailedMetrics, useLineKPIs, useLineMetrics, useLineWorkspaceMetrics, useMessages, useMetrics, useNavigation, useOverrides, usePageOverride, useRealtimeLineMetrics, useRegistry, useShiftConfig, useShifts, useSupabase, useSupabaseClient, useTargets, useTheme, useThemeConfig, useThreads, useVideoConfig, useWorkspaceConfig, useWorkspaceDetailedMetrics, useWorkspaceDisplayName, useWorkspaceDisplayNames, useWorkspaceDisplayNamesMap, useWorkspaceMetrics, useWorkspaceNavigation, useWorkspaceOperators, videoPreloader, whatsappService, withAuth, withRegistry, workspaceService };
4603
+ export { ACTION_NAMES, AIAgentView, type Action, type ActionName, type ActionService, type ActionThreshold, type ActiveBreak, type AnalyticsConfig, AuthCallback, type AuthCallbackProps, AuthCallbackView, type AuthCallbackViewProps, type AuthConfig, AuthProvider, type AuthUser, AuthenticatedFactoryView, AuthenticatedHelpView, AuthenticatedHomeView, AuthenticatedTargetsView, BarChart, type BarChartDataItem, type BarChartProps, type BarProps, BaseHistoryCalendar, type BaseHistoryCalendarProps, type BaseLineMetric, type BasePerformanceMetric, type BottleneckFilterType, type BottleneckVideo, type BottleneckVideoData, BottlenecksContent, type BottlenecksContentProps, type BreadcrumbItem, type Break, BreakNotificationPopup, type BreakNotificationPopupProps, type BreakRowProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type ChatMessage, type ChatThread, type ClipCounts, type ComponentOverride, type CoreComponents, type CurrentShiftResult, CycleTimeChart, type CycleTimeChartProps, CycleTimeOverTimeChart, type CycleTimeOverTimeChartProps, DEFAULT_ANALYTICS_CONFIG, DEFAULT_AUTH_CONFIG, DEFAULT_CONFIG, DEFAULT_DATABASE_CONFIG, DEFAULT_DATE_TIME_CONFIG, DEFAULT_ENDPOINTS_CONFIG, DEFAULT_ENTITY_CONFIG, DEFAULT_SHIFT_CONFIG, DEFAULT_THEME_CONFIG, DEFAULT_VIDEO_CONFIG, DEFAULT_WORKSPACE_CONFIG, DEFAULT_WORKSPACE_POSITIONS, type DashboardConfig, DashboardHeader, type DashboardKPIs, DashboardLayout, type DashboardLayoutProps, DashboardOverridesProvider, DashboardProvider, type DashboardService, type DatabaseConfig, DateDisplay, type DateTimeConfig, DateTimeDisplay, type DateTimeDisplayProps, type DayHistoryData, type DaySummaryData, DebugAuth, DebugAuthView, EmptyStateMessage, type EmptyStateMessageProps, type EndpointsConfig, type EntityConfig, type FactoryOverviewData, FactoryView, type FactoryViewProps, type FormatNumberOptions, GaugeChart, type GaugeChartProps, GridComponentsPlaceholder, Header, type HeaderProps, HelpView, type HelpViewProps, type HistoryCalendarProps, HomeView, type HookOverride, HourlyOutputChart, type HourlyOutputChartProps, type HourlyPerformance, type ISTDateProps, ISTTimer, type ISTTimerProps, KPICard, type KPICardProps, KPIDetailView, type KPIDetailViewProps, KPIGrid, type KPIGridProps, KPIHeader, type KPIHeaderProps, KPISection, type KPITrend, KPIsOverviewView, type KPIsOverviewViewProps, LINE_1_UUID, LINE_2_UUID, LargeOutputProgressChart, type LargeOutputProgressChartProps, LeaderboardDetailView, type LeaderboardDetailViewProps, type LeaderboardEntry, Legend, LineChart, type LineChartDataItem, type LineChartProps, type LineDetails, type LineDisplayData, LineHistoryCalendar, type LineHistoryCalendarProps, type LineInfo, type LineMetrics, LineMonthlyHistory, type LineMonthlyHistoryProps, type LineMonthlyMetric, LineMonthlyPdfGenerator, type LineMonthlyPdfGeneratorProps, type LineNavigationParams, LinePdfExportButton, type LinePdfExportButtonProps, LinePdfGenerator, type LinePdfGeneratorProps, type LineProps, type LineShiftConfig, type LineSnapshot, type LineThreshold, LineWhatsAppShareButton, type LineWhatsAppShareProps, LiveTimer, LoadingOverlay, LoadingPage, LoadingSpinner, LoginPage, type LoginPageProps, LoginView, type LoginViewProps, MainLayout, type MainLayoutProps, type Metric, MetricCard, type MetricCardProps$1 as MetricCardProps, type MetricsError, type NavItem, type NavItemTrackingEvent, NoWorkspaceData, type OperatorData, type OperatorInfo, OptifyeAgentClient, type OptifyeAgentContext, type OptifyeAgentRequest, type OptifyeAgentResponse, OutputProgressChart, type OutputProgressChartProps, type OverridesMap, type OverviewLineMetric, type OverviewWorkspaceMetric, PageHeader, type PageHeaderProps, type PageOverride, PieChart, type PieChartProps, type PoorPerformingWorkspace, type ProfileMenuItem, ProfileView, type QualityMetric, type QualityOverview, type QualityService, type RateLimitOptions, type RateLimitResult, type RealtimeService, RegistryProvider, type RoutePath, type S3ClipsAPIParams, type S3Config, type S3ListObjectsParams, S3Service, type S3ServiceConfig, type SOPCategory, SOPComplianceChart, type SOPComplianceChartProps, SSEChatClient, type SSEEvent, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type ShiftConfig, type ShiftConfiguration, type ShiftConfigurationRecord, type ShiftData$2 as ShiftData, ShiftDisplay, type ShiftHistoryData, type ShiftHoursMap, type ShiftPanelProps, type ShiftSummaryData, type ShiftTime, ShiftsView, type ShiftsViewProps, SideNavBar, type SideNavBarProps, type SimpleLine, SingleVideoStream, type SingleVideoStreamProps, Skeleton, SlackAPI, type StreamProxyConfig, type SupabaseClient, SupabaseProvider, type Target, TargetWorkspaceGrid, type TargetWorkspaceGridProps, TargetsView, type TargetsViewProps, type ThemeColorValue, type ThemeConfig, ThreadSidebar, TimeDisplay, TimePickerDropdown, type TrackingEventProperties, type TrendDirection, type UnderperformingWorkspace, type UnderperformingWorkspaces, type UseActiveBreaksResult, type UseDashboardMetricsProps, type UseFactoryOverviewOptions, type UseFormatNumberResult, type UseMessagesResult, type UseRealtimeLineMetricsProps, type UseTargetsOptions, type UseThreadsResult, type UseWorkspaceOperatorsOptions, type UserProfileConfig, VideoCard, type VideoConfig, type VideoCroppingConfig, type VideoCroppingRect, VideoGridView, type VideoMetadata, VideoPreloader, type VideoSeverity, type VideoSummary, type VideoType, WORKSPACE_POSITIONS, type WhatsAppSendResult, WhatsAppShareButton, type WhatsAppShareButtonProps, type WhatsappService, type Workspace, type WorkspaceActionUpdate, WorkspaceCard, type WorkspaceCardProps, type WorkspaceConfig, WrappedComponent as WorkspaceDetailView, type WorkspaceDetailedMetrics, WorkspaceDisplayNameExample, WorkspaceGrid, WorkspaceGridItem, type WorkspaceGridItemProps, WorkspaceHistoryCalendar, WorkspaceMetricCards, type WorkspaceMetricCardsProps, type WorkspaceMetrics, WorkspaceMonthlyDataFetcher, type WorkspaceMonthlyDataFetcherProps, type WorkspaceMonthlyMetric, WorkspaceMonthlyPdfGenerator, type WorkspaceMonthlyPdfGeneratorProps, type WorkspaceNavigationParams, WorkspacePdfExportButton, type WorkspacePdfExportButtonProps, WorkspacePdfGenerator, type WorkspacePdfGeneratorProps, type WorkspacePosition, type WorkspaceQualityData, type WorkspaceUrlMapping, WorkspaceWhatsAppShareButton, type WorkspaceWhatsAppShareProps, actionService, apiUtils, authCoreService, authOTPService, authRateLimitService, checkRateLimit, clearAllRateLimits, clearRateLimit, clearS3VideoCache, clearS3VideoFromCache, clearWorkspaceDisplayNamesCache, cn, createStreamProxyHandler, createSupabaseClient, createThrottledReload, dashboardService, deleteThread, forceRefreshWorkspaceDisplayNames, formatDateInZone, formatDateTimeInZone, formatISTDate, formatIdleTime, formatTimeInZone, fromUrlFriendlyName, getAllThreadMessages, getAllWorkspaceDisplayNamesAsync, getAnonClient, getCameraNumber, getCompanyMetricsTableName, getConfigurableShortWorkspaceDisplayName, getConfigurableWorkspaceDisplayName, getCurrentShift, getCurrentTimeInZone, getDashboardHeaderTimeInZone, getDaysDifferenceInZone, getDefaultCameraStreamUrl, getDefaultTabForWorkspace, getManufacturingInsights, getMetricsTablePrefix, getOperationalDate, getS3SignedUrl, getS3VideoSrc, getShortWorkspaceDisplayName, getShortWorkspaceDisplayNameAsync, getStoredWorkspaceMappings, getThreadMessages, getUserThreads, getUserThreadsPaginated, getWorkspaceDisplayName, getWorkspaceDisplayNameAsync, getWorkspaceDisplayNamesMap, getWorkspaceFromUrl, getWorkspaceNavigationParams, identifyCoreUser, initializeCoreMixpanel, isTransitionPeriod, isValidLineInfoPayload, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, mergeWithDefaultConfig, optifyeAgentClient, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, s3VideoPreloader, storeWorkspaceMapping, streamProxyConfig, throttledReloadDashboard, toUrlFriendlyName, trackCoreEvent, trackCorePageView, updateThreadTitle, useActiveBreaks, useAllWorkspaceMetrics, useAnalyticsConfig, useAuth, useAuthConfig, useComponentOverride, useCustomConfig, useDashboardConfig, useDashboardMetrics, useDatabaseConfig, useDateFormatter, useDateTimeConfig, useEndpointsConfig, useEntityConfig, useFactoryOverviewMetrics, useFeatureFlags, useFormatNumber, useHistoricWorkspaceMetrics, useHlsStream, useHlsStreamWithCropping, useHookOverride, useLeaderboardMetrics, useLineDetailedMetrics, useLineKPIs, useLineMetrics, useLineWorkspaceMetrics, useMessages, useMetrics, useNavigation, useOverrides, usePageOverride, useRealtimeLineMetrics, useRegistry, useShiftConfig, useShifts, useSupabase, useSupabaseClient, useTargets, useTheme, useThemeConfig, useThreads, useVideoConfig, useWorkspaceConfig, useWorkspaceDetailedMetrics, useWorkspaceDisplayName, useWorkspaceDisplayNames, useWorkspaceDisplayNamesMap, useWorkspaceMetrics, useWorkspaceNavigation, useWorkspaceOperators, videoPreloader, whatsappService, withAuth, withRegistry, workspaceService };
package/dist/index.d.ts CHANGED
@@ -224,6 +224,20 @@ interface DateTimeConfig {
224
224
  timeFormatOptions?: Intl.DateTimeFormatOptions;
225
225
  dateTimeFormatOptions?: Intl.DateTimeFormatOptions;
226
226
  }
227
+ interface SOPCategory {
228
+ /** Unique identifier for the category (maps to S3 folder names) */
229
+ id: string;
230
+ /** Display label for the UI */
231
+ label: string;
232
+ /** Color theme for the category card */
233
+ color: string;
234
+ /** Optional description shown in UI */
235
+ description?: string;
236
+ /** Optional S3 folder name if different from id */
237
+ s3FolderName?: string;
238
+ /** Optional subtitle text for the card */
239
+ subtitle?: string;
240
+ }
227
241
  interface S3Config {
228
242
  bucketName: string;
229
243
  region?: string;
@@ -233,6 +247,13 @@ interface S3Config {
233
247
  secretAccessKey: string;
234
248
  };
235
249
  signedUrlExpiresIn?: number;
250
+ /** SOP categories configuration */
251
+ sopCategories?: {
252
+ /** Default categories for all workspaces */
253
+ default: SOPCategory[];
254
+ /** Workspace-specific category overrides by UUID */
255
+ workspaceOverrides?: Record<string, SOPCategory[]>;
256
+ };
236
257
  }
237
258
  interface VideoCroppingRect {
238
259
  /** X offset as percentage (0-100) from left */
@@ -633,6 +654,7 @@ interface WorkspaceMonthlyMetric {
633
654
  avg_pph: number;
634
655
  pph_threshold: number;
635
656
  workspace_rank: number;
657
+ idle_time: number;
636
658
  }
637
659
  interface LineMonthlyMetric {
638
660
  date: string;
@@ -901,9 +923,9 @@ interface BottleneckVideoData {
901
923
  id: string;
902
924
  src: string;
903
925
  timestamp: string;
904
- severity: 'low' | 'medium' | 'high';
926
+ severity: VideoSeverity;
905
927
  description: string;
906
- type: 'bottleneck' | 'low_value' | 'best_cycle_time' | 'worst_cycle_time' | 'missing_quality_check' | 'cycle_completions';
928
+ type: VideoType;
907
929
  originalUri: string;
908
930
  cycle_time_seconds?: number;
909
931
  creation_timestamp?: string;
@@ -959,7 +981,7 @@ interface VideoMetadata {
959
981
  creation_timestamp?: string;
960
982
  [key: string]: any;
961
983
  }
962
- type VideoType = 'bottleneck' | 'low_value' | 'best_cycle_time' | 'worst_cycle_time' | 'missing_quality_check' | 'cycle_completions';
984
+ type VideoType = string;
963
985
  type VideoSeverity = 'low' | 'medium' | 'high';
964
986
 
965
987
  interface ChatThread {
@@ -1973,6 +1995,48 @@ interface UseActiveBreaksResult {
1973
1995
  */
1974
1996
  declare const useActiveBreaks: (lineIds: string[]) => UseActiveBreaksResult;
1975
1997
 
1998
+ /**
1999
+ * Options for initializing the useAllWorkspaceMetrics hook.
2000
+ */
2001
+ interface UseAllWorkspaceMetricsOptions {
2002
+ /** Specific date (YYYY-MM-DD) to fetch metrics for, overriding the current operational date. */
2003
+ initialDate?: string;
2004
+ /** Specific shift ID to fetch metrics for, overriding the current shift. */
2005
+ initialShiftId?: number;
2006
+ }
2007
+ /**
2008
+ * @hook useAllWorkspaceMetrics
2009
+ * @summary Fetches and subscribes to workspace metrics for all production lines, for a specific date and shift.
2010
+ *
2011
+ * @description This hook retrieves performance metrics for all workspaces across all lines.
2012
+ * It can be initialized with a specific date and shift, or it defaults to the current operational date and shift.
2013
+ * The hook establishes real-time subscriptions to update metrics when relevant changes occur in the database.
2014
+ *
2015
+ * @param {UseAllWorkspaceMetricsOptions} [options] - Optional parameters to specify an initial date and shift.
2016
+ *
2017
+ * @returns {object} An object containing:
2018
+ * @returns {WorkspaceMetrics[]} workspaces - Array of workspace metrics data for all lines.
2019
+ * @returns {boolean} loading - True if data is currently being fetched, false otherwise.
2020
+ * @returns {MetricsError | null} error - An error object if fetching failed, null otherwise.
2021
+ * @returns {() => Promise<void>} refreshWorkspaces - A function to manually trigger a refetch of the workspace metrics.
2022
+ *
2023
+ * @example
2024
+ * // Fetch metrics for the current operational date/shift
2025
+ * const { workspaces, loading, error } = useAllWorkspaceMetrics();
2026
+ *
2027
+ * // Fetch metrics for a specific past date and shift
2028
+ * const { workspaces: pastWorkspaces } = useAllWorkspaceMetrics({
2029
+ * initialDate: '2023-10-15',
2030
+ * initialShiftId: 1,
2031
+ * });
2032
+ */
2033
+ declare const useAllWorkspaceMetrics: (options?: UseAllWorkspaceMetricsOptions) => {
2034
+ workspaces: WorkspaceMetrics[];
2035
+ loading: boolean;
2036
+ error: MetricsError | null;
2037
+ refreshWorkspaces: () => Promise<void>;
2038
+ };
2039
+
1976
2040
  /**
1977
2041
  * Interface for navigation method used across packages
1978
2042
  * Abstracts navigation implementation details from components
@@ -2042,7 +2106,7 @@ interface LineNavigationParams {
2042
2106
  * @summary Provides abstracted navigation utilities and current route state for the dashboard application.
2043
2107
  * @description This hook serves as a wrapper around the Next.js `useRouter` hook, offering a simplified API for common navigation tasks
2044
2108
  * and for accessing dashboard-specific route information. It helps maintain consistency in navigation logic and route patterns.
2045
- * Assumed route patterns include: `/` (dashboard), `/workspace/[id]`, `/kpis/[lineId]`, `/targets`, `/shifts`, `/leaderboard/[lineId]`, `/factory-view`.
2109
+ * Assumed route patterns include: `/` (dashboard), `/workspace/[id]`, `/kpis/[lineId]`, `/targets`, `/shifts`, `/leaderboard`, `/factory-view`.
2046
2110
  * The `activeLineId` property has a fallback to `entityConfig.defaultLineId` when not on a specific line page, which implies a global default line context (see {@link EntityConfigShape} for expected structure).
2047
2111
  *
2048
2112
  * @returns {NavigationHookReturn} An object containing various navigation actions and properties related to the current route.
@@ -2369,7 +2433,6 @@ declare class SSEChatClient {
2369
2433
  }, callbacks: {
2370
2434
  onThreadCreated?: (threadId: string) => void;
2371
2435
  onMessage?: (text: string) => void;
2372
- onReasoning?: (text: string) => void;
2373
2436
  onToolCall?: (tools: any[]) => void;
2374
2437
  onToolResult?: (results: any[]) => void;
2375
2438
  onComplete?: (messageId: number, metrics?: any) => void;
@@ -3467,8 +3530,9 @@ interface BottlenecksContentProps {
3467
3530
  }
3468
3531
  /**
3469
3532
  * Filter type for bottleneck clips - expanded for new video types
3533
+ * Now supports dynamic types from configuration
3470
3534
  */
3471
- type BottleneckFilterType = 'all' | 'high' | 'medium' | 'low' | 'low_value' | 'sop_deviations' | 'best_cycle_time' | 'worst_cycle_time' | 'long_cycle_time' | 'cycle_completions';
3535
+ type BottleneckFilterType = string;
3472
3536
  /**
3473
3537
  * Clip counts for each type/severity - updated for new video types
3474
3538
  */
@@ -3561,7 +3625,6 @@ interface VideoGridViewProps {
3561
3625
  workspaces: WorkspaceMetrics[];
3562
3626
  selectedLine?: number;
3563
3627
  className?: string;
3564
- lineIdMapping?: Record<string, string>;
3565
3628
  videoSources?: {
3566
3629
  defaultHlsUrl?: string;
3567
3630
  workspaceHlsUrls?: Record<string, string>;
@@ -3583,6 +3646,7 @@ interface VideoCardProps {
3583
3646
  canvasFps?: number;
3584
3647
  useRAF?: boolean;
3585
3648
  className?: string;
3649
+ compact?: boolean;
3586
3650
  }
3587
3651
  declare const VideoCard: React__default.FC<VideoCardProps>;
3588
3652
 
@@ -3719,19 +3783,21 @@ declare const KPISection: React__default.FC<KPISectionProps>;
3719
3783
  interface DashboardHeaderProps {
3720
3784
  lineTitle: string;
3721
3785
  className?: string;
3786
+ headerControls?: React__default.ReactNode;
3722
3787
  }
3723
3788
  /**
3724
3789
  * Header component for dashboard pages with title and timer
3725
3790
  */
3726
- declare const DashboardHeader: React__default.MemoExoticComponent<({ lineTitle, className }: DashboardHeaderProps) => react_jsx_runtime.JSX.Element>;
3791
+ declare const DashboardHeader: React__default.MemoExoticComponent<({ lineTitle, className, headerControls }: DashboardHeaderProps) => react_jsx_runtime.JSX.Element>;
3727
3792
 
3728
3793
  interface NoWorkspaceDataProps {
3794
+ message?: string;
3729
3795
  className?: string;
3730
3796
  }
3731
3797
  /**
3732
3798
  * Component to display when no workspace data is available
3733
3799
  */
3734
- declare const NoWorkspaceData: React__default.MemoExoticComponent<({ className }: NoWorkspaceDataProps) => react_jsx_runtime.JSX.Element>;
3800
+ declare const NoWorkspaceData: React__default.MemoExoticComponent<({ message, className }: NoWorkspaceDataProps) => react_jsx_runtime.JSX.Element>;
3735
3801
 
3736
3802
  interface WorkspaceMonthlyDataFetcherProps {
3737
3803
  /**
@@ -4009,6 +4075,10 @@ declare const HelpView: React__default.FC<HelpViewProps>;
4009
4075
  declare const AuthenticatedHelpView: (props: HelpViewProps) => react_jsx_runtime.JSX.Element | null;
4010
4076
 
4011
4077
  interface HomeViewProps {
4078
+ /**
4079
+ * Array of line UUIDs to be managed by the view
4080
+ */
4081
+ lineIds: string[];
4012
4082
  /**
4013
4083
  * UUID of the default line to display
4014
4084
  */
@@ -4018,13 +4088,13 @@ interface HomeViewProps {
4018
4088
  */
4019
4089
  factoryViewId: string;
4020
4090
  /**
4021
- * UUID for Line 1
4091
+ * @deprecated Will be inferred from lineIds and lineNames
4022
4092
  */
4023
- line1Uuid: string;
4093
+ line1Uuid?: string;
4024
4094
  /**
4025
- * UUID for Line 2
4095
+ * @deprecated Will be inferred from lineIds
4026
4096
  */
4027
- line2Uuid: string;
4097
+ line2Uuid?: string;
4028
4098
  /**
4029
4099
  * Names for each line, keyed by UUID
4030
4100
  */
@@ -4044,7 +4114,8 @@ interface HomeViewProps {
4044
4114
  /**
4045
4115
  * HomeView component - Main dashboard landing page showing factory overview with workspace grid
4046
4116
  */
4047
- declare function HomeView({ defaultLineId, factoryViewId, line1Uuid, line2Uuid, lineNames, videoSources, factoryName }: HomeViewProps): React__default.ReactNode;
4117
+ declare function HomeView({ defaultLineId, factoryViewId, lineIds: allLineIds, // Default to empty array
4118
+ lineNames, videoSources, factoryName }: HomeViewProps): React__default.ReactNode;
4048
4119
  declare const AuthenticatedHomeView: (props: HomeViewProps) => react_jsx_runtime.JSX.Element | null;
4049
4120
 
4050
4121
  interface KPIDetailViewProps {
@@ -4118,7 +4189,7 @@ interface KPIsOverviewViewProps {
4118
4189
  declare const KPIsOverviewView: React__default.FC<KPIsOverviewViewProps>;
4119
4190
 
4120
4191
  /**
4121
- * LeaderboardDetailView component for displaying a detailed leaderboard for a specific line
4192
+ * LeaderboardDetailView component for displaying a detailed leaderboard for all lines
4122
4193
  */
4123
4194
  declare const LeaderboardDetailView: React__default.FC<LeaderboardDetailViewProps>;
4124
4195
 
@@ -4291,7 +4362,8 @@ declare const DEFAULT_THEME_CONFIG: ThemeConfig;
4291
4362
  declare const DEFAULT_ANALYTICS_CONFIG: AnalyticsConfig;
4292
4363
  declare const DEFAULT_AUTH_CONFIG: AuthConfig;
4293
4364
  declare const DEFAULT_VIDEO_CONFIG: VideoConfig;
4294
- declare const LINE_1_UUID = "910a224b-0abc-459a-babb-4c899824cfe7";
4365
+ declare const LINE_1_UUID = "98a2287e-8d55-4020-b00d-b9940437e3e1";
4366
+ declare const LINE_2_UUID = "d93997bb-ecac-4478-a4a6-008d536b724c";
4295
4367
  declare const DEFAULT_CONFIG: Omit<DashboardConfig, 'supabaseUrl' | 'supabaseKey'>;
4296
4368
 
4297
4369
  /**
@@ -4528,4 +4600,4 @@ interface ThreadSidebarProps {
4528
4600
  }
4529
4601
  declare const ThreadSidebar: React__default.FC<ThreadSidebarProps>;
4530
4602
 
4531
- export { ACTION_NAMES, AIAgentView, type Action, type ActionName, type ActionService, type ActionThreshold, type ActiveBreak, type AnalyticsConfig, AuthCallback, type AuthCallbackProps, AuthCallbackView, type AuthCallbackViewProps, type AuthConfig, AuthProvider, type AuthUser, AuthenticatedFactoryView, AuthenticatedHelpView, AuthenticatedHomeView, AuthenticatedTargetsView, BarChart, type BarChartDataItem, type BarChartProps, type BarProps, BaseHistoryCalendar, type BaseHistoryCalendarProps, type BaseLineMetric, type BasePerformanceMetric, type BottleneckFilterType, type BottleneckVideo, type BottleneckVideoData, BottlenecksContent, type BottlenecksContentProps, type BreadcrumbItem, type Break, BreakNotificationPopup, type BreakNotificationPopupProps, type BreakRowProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type ChatMessage, type ChatThread, type ClipCounts, type ComponentOverride, type CoreComponents, type CurrentShiftResult, CycleTimeChart, type CycleTimeChartProps, CycleTimeOverTimeChart, type CycleTimeOverTimeChartProps, DEFAULT_ANALYTICS_CONFIG, DEFAULT_AUTH_CONFIG, DEFAULT_CONFIG, DEFAULT_DATABASE_CONFIG, DEFAULT_DATE_TIME_CONFIG, DEFAULT_ENDPOINTS_CONFIG, DEFAULT_ENTITY_CONFIG, DEFAULT_SHIFT_CONFIG, DEFAULT_THEME_CONFIG, DEFAULT_VIDEO_CONFIG, DEFAULT_WORKSPACE_CONFIG, DEFAULT_WORKSPACE_POSITIONS, type DashboardConfig, DashboardHeader, type DashboardKPIs, DashboardLayout, type DashboardLayoutProps, DashboardOverridesProvider, DashboardProvider, type DashboardService, type DatabaseConfig, DateDisplay, type DateTimeConfig, DateTimeDisplay, type DateTimeDisplayProps, type DayHistoryData, type DaySummaryData, DebugAuth, DebugAuthView, EmptyStateMessage, type EmptyStateMessageProps, type EndpointsConfig, type EntityConfig, type FactoryOverviewData, FactoryView, type FactoryViewProps, type FormatNumberOptions, GaugeChart, type GaugeChartProps, GridComponentsPlaceholder, Header, type HeaderProps, HelpView, type HelpViewProps, type HistoryCalendarProps, HomeView, type HookOverride, HourlyOutputChart, type HourlyOutputChartProps, type HourlyPerformance, type ISTDateProps, ISTTimer, type ISTTimerProps, KPICard, type KPICardProps, KPIDetailView, type KPIDetailViewProps, KPIGrid, type KPIGridProps, KPIHeader, type KPIHeaderProps, KPISection, type KPITrend, KPIsOverviewView, type KPIsOverviewViewProps, LINE_1_UUID, LargeOutputProgressChart, type LargeOutputProgressChartProps, LeaderboardDetailView, type LeaderboardDetailViewProps, type LeaderboardEntry, Legend, LineChart, type LineChartDataItem, type LineChartProps, type LineDetails, type LineDisplayData, LineHistoryCalendar, type LineHistoryCalendarProps, type LineInfo, type LineMetrics, LineMonthlyHistory, type LineMonthlyHistoryProps, type LineMonthlyMetric, LineMonthlyPdfGenerator, type LineMonthlyPdfGeneratorProps, type LineNavigationParams, LinePdfExportButton, type LinePdfExportButtonProps, LinePdfGenerator, type LinePdfGeneratorProps, type LineProps, type LineShiftConfig, type LineSnapshot, type LineThreshold, LineWhatsAppShareButton, type LineWhatsAppShareProps, LiveTimer, LoadingOverlay, LoadingPage, LoadingSpinner, LoginPage, type LoginPageProps, LoginView, type LoginViewProps, MainLayout, type MainLayoutProps, type Metric, MetricCard, type MetricCardProps$1 as MetricCardProps, type MetricsError, type NavItem, type NavItemTrackingEvent, NoWorkspaceData, type OperatorData, type OperatorInfo, OptifyeAgentClient, type OptifyeAgentContext, type OptifyeAgentRequest, type OptifyeAgentResponse, OutputProgressChart, type OutputProgressChartProps, type OverridesMap, type OverviewLineMetric, type OverviewWorkspaceMetric, PageHeader, type PageHeaderProps, type PageOverride, PieChart, type PieChartProps, type PoorPerformingWorkspace, type ProfileMenuItem, ProfileView, type QualityMetric, type QualityOverview, type QualityService, type RateLimitOptions, type RateLimitResult, type RealtimeService, RegistryProvider, type RoutePath, type S3ClipsAPIParams, type S3Config, type S3ListObjectsParams, S3Service, type S3ServiceConfig, SOPComplianceChart, type SOPComplianceChartProps, SSEChatClient, type SSEEvent, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type ShiftConfig, type ShiftConfiguration, type ShiftConfigurationRecord, type ShiftData$2 as ShiftData, ShiftDisplay, type ShiftHistoryData, type ShiftHoursMap, type ShiftPanelProps, type ShiftSummaryData, type ShiftTime, ShiftsView, type ShiftsViewProps, SideNavBar, type SideNavBarProps, type SimpleLine, SingleVideoStream, type SingleVideoStreamProps, Skeleton, SlackAPI, type StreamProxyConfig, type SupabaseClient, SupabaseProvider, type Target, TargetWorkspaceGrid, type TargetWorkspaceGridProps, TargetsView, type TargetsViewProps, type ThemeColorValue, type ThemeConfig, ThreadSidebar, TimeDisplay, TimePickerDropdown, type TrackingEventProperties, type TrendDirection, type UnderperformingWorkspace, type UnderperformingWorkspaces, type UseActiveBreaksResult, type UseDashboardMetricsProps, type UseFactoryOverviewOptions, type UseFormatNumberResult, type UseMessagesResult, type UseRealtimeLineMetricsProps, type UseTargetsOptions, type UseThreadsResult, type UseWorkspaceOperatorsOptions, type UserProfileConfig, VideoCard, type VideoConfig, type VideoCroppingConfig, type VideoCroppingRect, VideoGridView, type VideoMetadata, VideoPreloader, type VideoSeverity, type VideoSummary, type VideoType, WORKSPACE_POSITIONS, type WhatsAppSendResult, WhatsAppShareButton, type WhatsAppShareButtonProps, type WhatsappService, type Workspace, type WorkspaceActionUpdate, WorkspaceCard, type WorkspaceCardProps, type WorkspaceConfig, WrappedComponent as WorkspaceDetailView, type WorkspaceDetailedMetrics, WorkspaceDisplayNameExample, WorkspaceGrid, WorkspaceGridItem, type WorkspaceGridItemProps, WorkspaceHistoryCalendar, WorkspaceMetricCards, type WorkspaceMetricCardsProps, type WorkspaceMetrics, WorkspaceMonthlyDataFetcher, type WorkspaceMonthlyDataFetcherProps, type WorkspaceMonthlyMetric, WorkspaceMonthlyPdfGenerator, type WorkspaceMonthlyPdfGeneratorProps, type WorkspaceNavigationParams, WorkspacePdfExportButton, type WorkspacePdfExportButtonProps, WorkspacePdfGenerator, type WorkspacePdfGeneratorProps, type WorkspacePosition, type WorkspaceQualityData, type WorkspaceUrlMapping, WorkspaceWhatsAppShareButton, type WorkspaceWhatsAppShareProps, actionService, apiUtils, authCoreService, authOTPService, authRateLimitService, checkRateLimit, clearAllRateLimits, clearRateLimit, clearS3VideoCache, clearS3VideoFromCache, clearWorkspaceDisplayNamesCache, cn, createStreamProxyHandler, createSupabaseClient, createThrottledReload, dashboardService, deleteThread, forceRefreshWorkspaceDisplayNames, formatDateInZone, formatDateTimeInZone, formatISTDate, formatIdleTime, formatTimeInZone, fromUrlFriendlyName, getAllThreadMessages, getAllWorkspaceDisplayNamesAsync, getAnonClient, getCameraNumber, getCompanyMetricsTableName, getConfigurableShortWorkspaceDisplayName, getConfigurableWorkspaceDisplayName, getCurrentShift, getCurrentTimeInZone, getDashboardHeaderTimeInZone, getDaysDifferenceInZone, getDefaultCameraStreamUrl, getDefaultTabForWorkspace, getManufacturingInsights, getMetricsTablePrefix, getOperationalDate, getS3SignedUrl, getS3VideoSrc, getShortWorkspaceDisplayName, getShortWorkspaceDisplayNameAsync, getStoredWorkspaceMappings, getThreadMessages, getUserThreads, getUserThreadsPaginated, getWorkspaceDisplayName, getWorkspaceDisplayNameAsync, getWorkspaceDisplayNamesMap, getWorkspaceFromUrl, getWorkspaceNavigationParams, identifyCoreUser, initializeCoreMixpanel, isTransitionPeriod, isValidLineInfoPayload, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, mergeWithDefaultConfig, optifyeAgentClient, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, s3VideoPreloader, storeWorkspaceMapping, streamProxyConfig, throttledReloadDashboard, toUrlFriendlyName, trackCoreEvent, trackCorePageView, updateThreadTitle, useActiveBreaks, useAnalyticsConfig, useAuth, useAuthConfig, useComponentOverride, useCustomConfig, useDashboardConfig, useDashboardMetrics, useDatabaseConfig, useDateFormatter, useDateTimeConfig, useEndpointsConfig, useEntityConfig, useFactoryOverviewMetrics, useFeatureFlags, useFormatNumber, useHistoricWorkspaceMetrics, useHlsStream, useHlsStreamWithCropping, useHookOverride, useLeaderboardMetrics, useLineDetailedMetrics, useLineKPIs, useLineMetrics, useLineWorkspaceMetrics, useMessages, useMetrics, useNavigation, useOverrides, usePageOverride, useRealtimeLineMetrics, useRegistry, useShiftConfig, useShifts, useSupabase, useSupabaseClient, useTargets, useTheme, useThemeConfig, useThreads, useVideoConfig, useWorkspaceConfig, useWorkspaceDetailedMetrics, useWorkspaceDisplayName, useWorkspaceDisplayNames, useWorkspaceDisplayNamesMap, useWorkspaceMetrics, useWorkspaceNavigation, useWorkspaceOperators, videoPreloader, whatsappService, withAuth, withRegistry, workspaceService };
4603
+ export { ACTION_NAMES, AIAgentView, type Action, type ActionName, type ActionService, type ActionThreshold, type ActiveBreak, type AnalyticsConfig, AuthCallback, type AuthCallbackProps, AuthCallbackView, type AuthCallbackViewProps, type AuthConfig, AuthProvider, type AuthUser, AuthenticatedFactoryView, AuthenticatedHelpView, AuthenticatedHomeView, AuthenticatedTargetsView, BarChart, type BarChartDataItem, type BarChartProps, type BarProps, BaseHistoryCalendar, type BaseHistoryCalendarProps, type BaseLineMetric, type BasePerformanceMetric, type BottleneckFilterType, type BottleneckVideo, type BottleneckVideoData, BottlenecksContent, type BottlenecksContentProps, type BreadcrumbItem, type Break, BreakNotificationPopup, type BreakNotificationPopupProps, type BreakRowProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type ChatMessage, type ChatThread, type ClipCounts, type ComponentOverride, type CoreComponents, type CurrentShiftResult, CycleTimeChart, type CycleTimeChartProps, CycleTimeOverTimeChart, type CycleTimeOverTimeChartProps, DEFAULT_ANALYTICS_CONFIG, DEFAULT_AUTH_CONFIG, DEFAULT_CONFIG, DEFAULT_DATABASE_CONFIG, DEFAULT_DATE_TIME_CONFIG, DEFAULT_ENDPOINTS_CONFIG, DEFAULT_ENTITY_CONFIG, DEFAULT_SHIFT_CONFIG, DEFAULT_THEME_CONFIG, DEFAULT_VIDEO_CONFIG, DEFAULT_WORKSPACE_CONFIG, DEFAULT_WORKSPACE_POSITIONS, type DashboardConfig, DashboardHeader, type DashboardKPIs, DashboardLayout, type DashboardLayoutProps, DashboardOverridesProvider, DashboardProvider, type DashboardService, type DatabaseConfig, DateDisplay, type DateTimeConfig, DateTimeDisplay, type DateTimeDisplayProps, type DayHistoryData, type DaySummaryData, DebugAuth, DebugAuthView, EmptyStateMessage, type EmptyStateMessageProps, type EndpointsConfig, type EntityConfig, type FactoryOverviewData, FactoryView, type FactoryViewProps, type FormatNumberOptions, GaugeChart, type GaugeChartProps, GridComponentsPlaceholder, Header, type HeaderProps, HelpView, type HelpViewProps, type HistoryCalendarProps, HomeView, type HookOverride, HourlyOutputChart, type HourlyOutputChartProps, type HourlyPerformance, type ISTDateProps, ISTTimer, type ISTTimerProps, KPICard, type KPICardProps, KPIDetailView, type KPIDetailViewProps, KPIGrid, type KPIGridProps, KPIHeader, type KPIHeaderProps, KPISection, type KPITrend, KPIsOverviewView, type KPIsOverviewViewProps, LINE_1_UUID, LINE_2_UUID, LargeOutputProgressChart, type LargeOutputProgressChartProps, LeaderboardDetailView, type LeaderboardDetailViewProps, type LeaderboardEntry, Legend, LineChart, type LineChartDataItem, type LineChartProps, type LineDetails, type LineDisplayData, LineHistoryCalendar, type LineHistoryCalendarProps, type LineInfo, type LineMetrics, LineMonthlyHistory, type LineMonthlyHistoryProps, type LineMonthlyMetric, LineMonthlyPdfGenerator, type LineMonthlyPdfGeneratorProps, type LineNavigationParams, LinePdfExportButton, type LinePdfExportButtonProps, LinePdfGenerator, type LinePdfGeneratorProps, type LineProps, type LineShiftConfig, type LineSnapshot, type LineThreshold, LineWhatsAppShareButton, type LineWhatsAppShareProps, LiveTimer, LoadingOverlay, LoadingPage, LoadingSpinner, LoginPage, type LoginPageProps, LoginView, type LoginViewProps, MainLayout, type MainLayoutProps, type Metric, MetricCard, type MetricCardProps$1 as MetricCardProps, type MetricsError, type NavItem, type NavItemTrackingEvent, NoWorkspaceData, type OperatorData, type OperatorInfo, OptifyeAgentClient, type OptifyeAgentContext, type OptifyeAgentRequest, type OptifyeAgentResponse, OutputProgressChart, type OutputProgressChartProps, type OverridesMap, type OverviewLineMetric, type OverviewWorkspaceMetric, PageHeader, type PageHeaderProps, type PageOverride, PieChart, type PieChartProps, type PoorPerformingWorkspace, type ProfileMenuItem, ProfileView, type QualityMetric, type QualityOverview, type QualityService, type RateLimitOptions, type RateLimitResult, type RealtimeService, RegistryProvider, type RoutePath, type S3ClipsAPIParams, type S3Config, type S3ListObjectsParams, S3Service, type S3ServiceConfig, type SOPCategory, SOPComplianceChart, type SOPComplianceChartProps, SSEChatClient, type SSEEvent, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type ShiftConfig, type ShiftConfiguration, type ShiftConfigurationRecord, type ShiftData$2 as ShiftData, ShiftDisplay, type ShiftHistoryData, type ShiftHoursMap, type ShiftPanelProps, type ShiftSummaryData, type ShiftTime, ShiftsView, type ShiftsViewProps, SideNavBar, type SideNavBarProps, type SimpleLine, SingleVideoStream, type SingleVideoStreamProps, Skeleton, SlackAPI, type StreamProxyConfig, type SupabaseClient, SupabaseProvider, type Target, TargetWorkspaceGrid, type TargetWorkspaceGridProps, TargetsView, type TargetsViewProps, type ThemeColorValue, type ThemeConfig, ThreadSidebar, TimeDisplay, TimePickerDropdown, type TrackingEventProperties, type TrendDirection, type UnderperformingWorkspace, type UnderperformingWorkspaces, type UseActiveBreaksResult, type UseDashboardMetricsProps, type UseFactoryOverviewOptions, type UseFormatNumberResult, type UseMessagesResult, type UseRealtimeLineMetricsProps, type UseTargetsOptions, type UseThreadsResult, type UseWorkspaceOperatorsOptions, type UserProfileConfig, VideoCard, type VideoConfig, type VideoCroppingConfig, type VideoCroppingRect, VideoGridView, type VideoMetadata, VideoPreloader, type VideoSeverity, type VideoSummary, type VideoType, WORKSPACE_POSITIONS, type WhatsAppSendResult, WhatsAppShareButton, type WhatsAppShareButtonProps, type WhatsappService, type Workspace, type WorkspaceActionUpdate, WorkspaceCard, type WorkspaceCardProps, type WorkspaceConfig, WrappedComponent as WorkspaceDetailView, type WorkspaceDetailedMetrics, WorkspaceDisplayNameExample, WorkspaceGrid, WorkspaceGridItem, type WorkspaceGridItemProps, WorkspaceHistoryCalendar, WorkspaceMetricCards, type WorkspaceMetricCardsProps, type WorkspaceMetrics, WorkspaceMonthlyDataFetcher, type WorkspaceMonthlyDataFetcherProps, type WorkspaceMonthlyMetric, WorkspaceMonthlyPdfGenerator, type WorkspaceMonthlyPdfGeneratorProps, type WorkspaceNavigationParams, WorkspacePdfExportButton, type WorkspacePdfExportButtonProps, WorkspacePdfGenerator, type WorkspacePdfGeneratorProps, type WorkspacePosition, type WorkspaceQualityData, type WorkspaceUrlMapping, WorkspaceWhatsAppShareButton, type WorkspaceWhatsAppShareProps, actionService, apiUtils, authCoreService, authOTPService, authRateLimitService, checkRateLimit, clearAllRateLimits, clearRateLimit, clearS3VideoCache, clearS3VideoFromCache, clearWorkspaceDisplayNamesCache, cn, createStreamProxyHandler, createSupabaseClient, createThrottledReload, dashboardService, deleteThread, forceRefreshWorkspaceDisplayNames, formatDateInZone, formatDateTimeInZone, formatISTDate, formatIdleTime, formatTimeInZone, fromUrlFriendlyName, getAllThreadMessages, getAllWorkspaceDisplayNamesAsync, getAnonClient, getCameraNumber, getCompanyMetricsTableName, getConfigurableShortWorkspaceDisplayName, getConfigurableWorkspaceDisplayName, getCurrentShift, getCurrentTimeInZone, getDashboardHeaderTimeInZone, getDaysDifferenceInZone, getDefaultCameraStreamUrl, getDefaultTabForWorkspace, getManufacturingInsights, getMetricsTablePrefix, getOperationalDate, getS3SignedUrl, getS3VideoSrc, getShortWorkspaceDisplayName, getShortWorkspaceDisplayNameAsync, getStoredWorkspaceMappings, getThreadMessages, getUserThreads, getUserThreadsPaginated, getWorkspaceDisplayName, getWorkspaceDisplayNameAsync, getWorkspaceDisplayNamesMap, getWorkspaceFromUrl, getWorkspaceNavigationParams, identifyCoreUser, initializeCoreMixpanel, isTransitionPeriod, isValidLineInfoPayload, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, mergeWithDefaultConfig, optifyeAgentClient, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, s3VideoPreloader, storeWorkspaceMapping, streamProxyConfig, throttledReloadDashboard, toUrlFriendlyName, trackCoreEvent, trackCorePageView, updateThreadTitle, useActiveBreaks, useAllWorkspaceMetrics, useAnalyticsConfig, useAuth, useAuthConfig, useComponentOverride, useCustomConfig, useDashboardConfig, useDashboardMetrics, useDatabaseConfig, useDateFormatter, useDateTimeConfig, useEndpointsConfig, useEntityConfig, useFactoryOverviewMetrics, useFeatureFlags, useFormatNumber, useHistoricWorkspaceMetrics, useHlsStream, useHlsStreamWithCropping, useHookOverride, useLeaderboardMetrics, useLineDetailedMetrics, useLineKPIs, useLineMetrics, useLineWorkspaceMetrics, useMessages, useMetrics, useNavigation, useOverrides, usePageOverride, useRealtimeLineMetrics, useRegistry, useShiftConfig, useShifts, useSupabase, useSupabaseClient, useTargets, useTheme, useThemeConfig, useThreads, useVideoConfig, useWorkspaceConfig, useWorkspaceDetailedMetrics, useWorkspaceDisplayName, useWorkspaceDisplayNames, useWorkspaceDisplayNamesMap, useWorkspaceMetrics, useWorkspaceNavigation, useWorkspaceOperators, videoPreloader, whatsappService, withAuth, withRegistry, workspaceService };