@edusight/notification-widget 1.0.40 → 1.0.41
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/{components-DqQ0ehzG.js → components-CWbjrQKA.js} +129 -137
- package/dist/{components-DqQ0ehzG.js.map → components-CWbjrQKA.js.map} +1 -1
- package/dist/{components-D9Q1H53S.cjs → components-Cr9Sf7Cz.cjs} +9 -9
- package/dist/{components-D9Q1H53S.cjs.map → components-Cr9Sf7Cz.cjs.map} +1 -1
- package/dist/hooks-C6Z38jT_.cjs +2 -0
- package/dist/hooks-C6Z38jT_.cjs.map +1 -0
- package/dist/{hooks-C7dzVxIU.js → hooks-S0z2_-4B.js} +63 -50
- package/dist/hooks-S0z2_-4B.js.map +1 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.esm.js +177 -156
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/hooks-C7dzVxIU.js.map +0 -1
- package/dist/hooks-kLhwdW29.cjs +0 -2
- package/dist/hooks-kLhwdW29.cjs.map +0 -1
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../src/hooks/usePreferencesSync.ts","../src/hooks/useSpecificPreferences.ts","../src/components/ErrorBoundary.tsx","../src/components/NotificationWidget.tsx","../src/index.ts"],"sourcesContent":["import { useEffect, useState, useCallback } from 'react';\n\nimport { NotificationPreferences } from '../types/core';\n\nconst useNotificationsClient = () => {\n return (window as any).__notificationSDK?.client;\n};\n\nexport interface UsePreferencesSyncProps {\n onPreferencesLoaded: (preferences: NotificationPreferences) => void;\n onError?: (error: Error) => void;\n}\n\nexport interface UsePreferencesSyncResult {\n isLoading: boolean;\n error: Error | null;\n preferences: NotificationPreferences | null;\n}\n\nexport const usePreferencesSync = ({\n onPreferencesLoaded,\n onError,\n}: UsePreferencesSyncProps): UsePreferencesSyncResult => {\n const notificationClient = useNotificationsClient();\n const [isLoading, setIsLoading] = useState(true);\n const [error, setError] = useState<Error | null>(null);\n const [preferences, setPreferences] = useState<NotificationPreferences | null>(null);\n\n const loadPreferences = useCallback(async () => {\n try {\n setIsLoading(true);\n setError(null);\n\n if (!notificationClient) {\n throw new Error('Notification client not available');\n }\n\n const config = (window as any).__notificationSDK?.config;\n\n if (!config) {\n throw new Error('SDK configuration not available');\n }\n\n const { subscriberId, tenantId, environmentId } = config;\n\n if (!subscriberId || !tenantId || !environmentId) {\n throw new Error('SubscriberId, TenantId or EnvironmentId not available in config');\n }\n\n const servicePreferences = await notificationClient.preferences.get(\n tenantId,\n subscriberId,\n environmentId,\n );\n\n const mappedPreferences: NotificationPreferences = {\n channels: {\n email: servicePreferences.emailEnabled ?? true,\n push: servicePreferences.pushEnabled ?? true,\n sms: servicePreferences.smsEnabled ?? false,\n inApp: servicePreferences.inAppEnabled ?? true,\n },\n subscriptions: [],\n deliverySchedule: {\n timezone: 'UTC',\n quietHours: {\n start: servicePreferences.quietHoursStart ?? '22:00',\n end: servicePreferences.quietHoursEnd ?? '08:00',\n },\n weekdays: [true, true, true, true, true, false, false],\n },\n };\n\n if (servicePreferences.categories) {\n Object.entries(servicePreferences.categories).forEach(([workflowId, categoryPrefs]) => {\n mappedPreferences.subscriptions.push({\n workflowId,\n name: workflowId,\n enabled: true,\n channels: {\n email: (categoryPrefs as any).emailEnabled ?? true,\n push: (categoryPrefs as any).pushEnabled ?? true,\n sms: (categoryPrefs as any).smsEnabled ?? false,\n inApp: (categoryPrefs as any).inAppEnabled ?? true,\n },\n });\n });\n }\n\n setPreferences(mappedPreferences);\n onPreferencesLoaded(mappedPreferences);\n } catch (err: any) {\n const error = err instanceof Error ? err : new Error('Failed to load preferences');\n\n // If 404, it means preferences don't exist yet for this user.\n // We'll use defaults and suppress the error callback.\n const isNotFound = (err as any)?.response?.status === 404 || (err as any)?.status === 404;\n\n if (!isNotFound) {\n setError(error);\n onError?.(error);\n } else {\n console.warn('Preferences not found for user (404), using defaults.');\n }\n\n const defaultPreferences: NotificationPreferences = {\n channels: {\n email: true,\n push: true,\n sms: false,\n inApp: true,\n },\n subscriptions: [],\n deliverySchedule: {\n timezone: 'UTC',\n quietHours: {\n start: '22:00',\n end: '08:00',\n },\n weekdays: [true, true, true, true, true, false, false],\n },\n };\n setPreferences(defaultPreferences);\n onPreferencesLoaded(defaultPreferences);\n } finally {\n setIsLoading(false);\n }\n }, [notificationClient, onPreferencesLoaded, onError]);\n\n useEffect(() => {\n if (notificationClient) {\n loadPreferences();\n }\n }, [notificationClient, loadPreferences]);\n\n return {\n isLoading,\n error,\n preferences,\n };\n};\n","import { useState, useCallback, useEffect } from 'react';\n\nimport { WorkflowSubscription } from '../types/core';\n\nconst useNotificationsClient = () => {\n return (window as any).__notificationSDK?.client;\n};\n\nexport interface UseSpecificPreferencesResult {\n specificPreferences: WorkflowSubscription[];\n isLoading: boolean;\n hasMore: boolean;\n loadMore: () => Promise<void>;\n refetch: () => Promise<void>;\n}\n\nexport const useSpecificPreferences = (): UseSpecificPreferencesResult => {\n const client = useNotificationsClient();\n const [items, setItems] = useState<WorkflowSubscription[]>([]);\n const [isLoading, setIsLoading] = useState(false);\n const [hasMore, setHasMore] = useState(true);\n const [offset, setOffset] = useState(0);\n const LIMIT = 5;\n\n const loadMore = useCallback(async () => {\n if (!client || isLoading || !hasMore) return;\n\n try {\n setIsLoading(true);\n const sdkConfig = (window as any).__notificationSDK?.config;\n if (!sdkConfig) return;\n\n const response = await client.preferences.listSpecific(\n sdkConfig.tenantId,\n sdkConfig.subscriberId,\n {\n includeWorkflows: true,\n includeTemplates: false,\n activeOnly: true,\n limit: LIMIT,\n offset: offset,\n },\n );\n\n const newItems = (response.items || []).map((item: any) => ({\n workflowId: item.identifier,\n name: item.name,\n enabled: item.preference.enabled,\n channels: item.preference.channels,\n }));\n\n setItems((prev) => {\n // Determine uniqueness by workflowId to avoid duplicates if offset logic overlaps or double fetch\n const existingIds = new Set(prev.map((i) => i.workflowId));\n const uniqueNewItems = newItems.filter((i: any) => !existingIds.has(i.workflowId));\n return [...prev, ...uniqueNewItems];\n });\n\n setOffset((prev) => prev + LIMIT);\n\n // Check if we reached the end\n if (\n newItems.length < LIMIT ||\n (response.total !== undefined && items.length + newItems.length >= response.total)\n ) {\n setHasMore(false);\n }\n } catch (error) {\n console.error('Failed to load specific preferences:', error);\n // Don't disable hasMore on error, user can retry by scrolling\n } finally {\n setIsLoading(false);\n }\n }, [client, offset, hasMore, isLoading, items.length]);\n\n // Initial load\n useEffect(() => {\n if (client && offset === 0 && items.length === 0) {\n loadMore();\n }\n }, [client, loadMore, offset, items.length]);\n\n const refetch = async () => {\n setItems([]);\n setOffset(0);\n setHasMore(true);\n // Note: The effect will trigger loadMore because offset becomes 0 and items becomes empty\n };\n\n return {\n specificPreferences: items,\n isLoading,\n hasMore,\n loadMore,\n refetch,\n };\n};\n","import React, { Component, ErrorInfo, ReactNode } from 'react';\nimport { MdError, MdRefresh } from 'react-icons/md';\n\nimport { ErrorBoundaryState } from '../types/core';\n\ninterface ErrorBoundaryProps {\n children: ReactNode;\n onError?: (error: Error, errorInfo: ErrorInfo) => void;\n}\n\nconst ErrorFallback: React.FC<{\n error: Error | null;\n onRetry: () => void;\n}> = ({ error, onRetry }) => (\n <div\n className=\"p-4 bg-[var(--widget-error)]/10 border border-[var(--widget-error)]/20 rounded-lg\"\n role=\"alert\"\n data-testid=\"error-boundary-fallback\"\n >\n <div className=\"flex items-center mb-2\">\n <MdError className=\"w-6 h-6 text-[var(--widget-error)] mr-2\" aria-hidden=\"true\" />\n <h3 className=\"text-sm font-medium text-[var(--widget-error)]\">Something went wrong</h3>\n </div>\n\n <p className=\"text-sm mb-3 text-[var(--widget-error)]/80\">\n The notification widget encountered an error and couldn't load properly.\n </p>\n\n {process.env.NODE_ENV === 'development' && error && (\n <details className=\"mb-3\">\n <summary className=\"text-xs cursor-pointer text-[var(--widget-error)] hover:text-[var(--widget-error)]/80 transition-colors\">\n Error details (development only)\n </summary>\n <pre className=\"mt-2 text-xs bg-[var(--widget-error)]/5 p-2 rounded overflow-auto max-h-32 text-[var(--widget-error)]\">\n {error.message}\n {error.stack && `\\n\\n${error.stack}`}\n </pre>\n </details>\n )}\n\n <button\n type=\"button\"\n className=\"inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md text-[var(--widget-error)] bg-[var(--widget-error)]/10 hover:bg-[var(--widget-error)]/20 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[var(--widget-error)] transition-colors\"\n onClick={onRetry}\n data-testid=\"error-retry-button\"\n >\n <MdRefresh className=\"mr-1 w-4 h-4\" aria-hidden=\"true\" />\n Try again\n </button>\n </div>\n);\n\nexport class NotificationWidgetErrorBoundary extends Component<\n ErrorBoundaryProps,\n ErrorBoundaryState\n> {\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = {\n hasError: false,\n error: null,\n errorInfo: null,\n };\n }\n\n static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState> {\n return {\n hasError: true,\n error,\n };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n this.setState({\n errorInfo,\n });\n\n console.error('NotificationWidget Error Boundary caught an error:', {\n message: error.message,\n stack: error.stack,\n componentStack: errorInfo.componentStack,\n timestamp: new Date().toISOString(),\n });\n\n if (this.props.onError) {\n this.props.onError(error, errorInfo);\n }\n }\n\n handleRetry = () => {\n this.setState({\n hasError: false,\n error: null,\n errorInfo: null,\n });\n };\n\n render() {\n if (this.state.hasError) {\n return <ErrorFallback error={this.state.error} onRetry={this.handleRetry} />;\n }\n\n return this.props.children;\n }\n}\n\nexport const useErrorHandler = () => {\n return (error: Error, errorInfo?: ErrorInfo) => {\n console.error('Widget error:', {\n message: error.message,\n stack: error.stack,\n errorInfo,\n timestamp: new Date().toISOString(),\n });\n };\n};\n","import { NotificationClient } from '@edusight/notification-sdk';\nimport React, {\n useReducer,\n useEffect,\n useCallback,\n createContext,\n useContext,\n useRef,\n} from 'react';\nimport { io as ioClient } from 'socket.io-client';\n\nimport { useLivePreferences } from '../hooks/useLivePreferences';\nimport { usePreferencesSync } from '../hooks/usePreferencesSync';\nimport { useSpecificPreferences } from '../hooks/useSpecificPreferences';\nimport {\n NotificationWidgetProps,\n WidgetState,\n WidgetAction,\n SDKConfiguration,\n} from '../types/core';\nimport { createNotificationMapper } from '../utils/notification-mapper';\n\nimport { BellComponent } from './BellComponent';\nimport { ComponentErrorBoundary } from './ComponentErrorBoundary';\nimport { NotificationWidgetErrorBoundary } from './ErrorBoundary';\nimport { SDKConnectionFallback, LoadingFallback } from './FallbackComponents';\nimport { InboxPopover } from './InboxPopover';\n\ninterface SDKContextType {\n client: any;\n isInitialized: boolean;\n error: Error | null;\n}\n\nconst SDKContext = createContext<SDKContextType | null>(null);\n\nexport const useSDK = () => {\n const context = useContext(SDKContext);\n if (!context) {\n throw new Error('useSDK must be used within a NotificationWidget');\n }\n return context;\n};\n\nconst initialState: WidgetState = {\n notifications: [],\n unreadCount: 0,\n preferences: {\n channels: {\n email: true,\n push: true,\n sms: false,\n inApp: true,\n },\n subscriptions: [],\n deliverySchedule: {\n timezone: 'UTC',\n quietHours: {\n start: '22:00',\n end: '08:00',\n },\n weekdays: [true, true, true, true, true, false, false],\n },\n },\n ui: {\n isOpen: false,\n currentView: 'notifications',\n selectedNotifications: [],\n isLoading: false,\n error: null,\n },\n websocket: {\n connected: false,\n reconnecting: false,\n },\n};\n\nconst SDKProvider: React.FC<{ config: SDKConfiguration; children: React.ReactNode }> = ({\n config,\n children,\n}) => {\n const [sdkState, setSdkState] = React.useState<SDKContextType>({\n client: null,\n isInitialized: false,\n error: null,\n });\n\n useEffect(() => {\n let isMounted = true;\n\n const initializeSDK = async () => {\n try {\n const existingSDK = (window as any).__notificationSDK;\n\n // Check if we can reuse the existing SDK instance\n if (existingSDK?.client) {\n // Compare new config with existing config to determine if we need to re-initialize\n // We use simple JSON stringify as configs are simple objects with strings/numbers\n const isConfigMatch = JSON.stringify(existingSDK.config) === JSON.stringify(config);\n\n if (isConfigMatch) {\n if (isMounted) {\n setSdkState({\n client: existingSDK.client,\n isInitialized: true,\n error: null,\n });\n }\n return;\n } else {\n console.log('[NotificationWidget] Config changed, re-initializing SDK', {\n old: existingSDK.config,\n new: config,\n });\n }\n }\n\n const client = new NotificationClient({\n apiUrl: config.baseUrl,\n apiKey: config.apiKey,\n tenantId: config.tenantId,\n environmentId: config.environmentId,\n });\n\n (window as any).__notificationSDK = { client, config };\n\n if (isMounted) {\n setSdkState({\n client,\n isInitialized: true,\n error: null,\n });\n }\n } catch (error) {\n console.error('Failed to initialize SDK:', error);\n if (isMounted) {\n setSdkState({\n client: null,\n isInitialized: false,\n error: error as Error,\n });\n }\n }\n };\n\n initializeSDK();\n\n return () => {\n isMounted = false;\n };\n }, [config]);\n\n return <SDKContext.Provider value={sdkState}>{children}</SDKContext.Provider>;\n};\n\nconst widgetReducer = (state: WidgetState, action: WidgetAction): WidgetState => {\n switch (action.type) {\n case 'SET_NOTIFICATIONS':\n return {\n ...state,\n notifications: action.payload,\n unreadCount: action.payload.filter((n) => !n.isRead).length,\n };\n\n case 'ADD_NOTIFICATION':\n const newNotifications = [action.payload, ...state.notifications];\n return {\n ...state,\n notifications: newNotifications,\n unreadCount: newNotifications.filter((n) => !n.isRead).length,\n };\n\n case 'UPDATE_NOTIFICATION':\n const updatedNotifications = state.notifications.map((n) =>\n n.id === action.payload.id ? { ...n, ...action.payload.updates } : n,\n );\n return {\n ...state,\n notifications: updatedNotifications,\n unreadCount: updatedNotifications.filter((n) => !n.isRead).length,\n };\n\n case 'DELETE_NOTIFICATION':\n const filteredNotifications = state.notifications.filter((n) => n.id !== action.payload);\n return {\n ...state,\n notifications: filteredNotifications,\n unreadCount: filteredNotifications.filter((n) => !n.isRead).length,\n };\n\n case 'SET_PREFERENCES':\n return {\n ...state,\n preferences: action.payload,\n };\n\n case 'SET_UI_STATE':\n return {\n ...state,\n ui: { ...state.ui, ...action.payload },\n };\n\n case 'SET_WEBSOCKET_STATE':\n return {\n ...state,\n websocket: { ...state.websocket, ...action.payload },\n };\n\n default:\n return state;\n }\n};\n\nconst NotificationWidgetInternal: React.FC<Omit<NotificationWidgetProps, 'sdkConfig'>> = ({\n position = 'right',\n size = 'medium',\n theme = 'light',\n className = '',\n\n onError,\n onMorePreferencesClick,\n}) => {\n const [state, dispatch] = useReducer(widgetReducer, initialState);\n const { client, isInitialized, error: sdkError } = useSDK();\n const websocketRef = useRef<any>(null);\n\n const handlePreferencesChange = useCallback((preferences: any) => {\n dispatch({\n type: 'SET_PREFERENCES',\n payload: preferences,\n });\n }, []);\n\n const handleWidgetError = useCallback(\n (error: Error) => {\n console.error('Widget error:', error);\n if (onError) {\n onError(error);\n }\n },\n [onError],\n );\n\n const { error: preferencesLoadError } = usePreferencesSync({\n onPreferencesLoaded: handlePreferencesChange,\n onError: handleWidgetError,\n });\n\n const {\n specificPreferences,\n isLoading: isSpecificLoading,\n hasMore: hasMoreSpecific,\n loadMore: loadMoreSpecific,\n } = useSpecificPreferences();\n\n const {\n updatePreference,\n isSaving,\n error: preferencesError,\n } = useLivePreferences({\n preferences: state.preferences,\n onPreferencesChange: handlePreferencesChange,\n onError: handleWidgetError,\n });\n\n // Merge specific preferences into state when they load\n useEffect(() => {\n if (specificPreferences.length > 0) {\n const currentSubs = state.preferences.subscriptions;\n const newSubs = [...currentSubs];\n let changed = false;\n\n specificPreferences.forEach((sp) => {\n const existingIdx = newSubs.findIndex((s) => s.workflowId === sp.workflowId);\n\n // If not in state, add it\n if (existingIdx === -1) {\n newSubs.push(sp);\n changed = true;\n } else {\n // If existing name is just the ID (default), update with real name from specific prefs\n const existing = newSubs[existingIdx];\n if (existing.name === existing.workflowId && sp.name && sp.name !== sp.workflowId) {\n newSubs[existingIdx] = { ...existing, name: sp.name };\n changed = true;\n }\n }\n });\n\n if (changed) {\n dispatch({\n type: 'SET_PREFERENCES',\n payload: {\n ...state.preferences,\n subscriptions: newSubs,\n },\n });\n }\n }\n }, [specificPreferences]); // Depend on specificPreferences list changes (load more)\n\n // Create display list that respects order from hook but values from state\n const displaySpecificPreferences = React.useMemo(() => {\n return specificPreferences.map((sp) => {\n const found = state.preferences.subscriptions.find((s) => s.workflowId === sp.workflowId);\n return found || sp;\n });\n }, [specificPreferences, state.preferences.subscriptions]);\n\n const handleWebSocketEvent = useCallback((event: any) => {\n try {\n const notificationMapper = createNotificationMapper();\n\n switch (event.type) {\n case 'notification_received': {\n const wsPayload = event.data;\n\n if (!notificationMapper.validateWebSocketPayload(wsPayload)) {\n console.error('Invalid WebSocket notification payload, skipping', wsPayload);\n break;\n }\n\n const mappedNotification =\n notificationMapper.toWidgetNotificationFromWebSocket(wsPayload);\n dispatch({\n type: 'ADD_NOTIFICATION',\n payload: mappedNotification,\n });\n break;\n }\n\n case 'notification_updated':\n dispatch({\n type: 'UPDATE_NOTIFICATION',\n payload: {\n id: event.data.id || event.data.notificationId,\n updates: event.data,\n },\n });\n break;\n\n case 'notification_deleted':\n dispatch({\n type: 'DELETE_NOTIFICATION',\n payload: event.data.id || event.data.notificationId,\n });\n break;\n\n case 'preferences_updated':\n dispatch({\n type: 'SET_PREFERENCES',\n payload: event.data,\n });\n break;\n\n default:\n console.log('Unknown WebSocket event type:', event.type);\n }\n } catch (error) {\n console.error('Error handling WebSocket event:', error);\n }\n }, []);\n\n const connectWebSocket = useCallback(async () => {\n if (!client || !isInitialized || websocketRef.current) return;\n\n try {\n dispatch({\n type: 'SET_WEBSOCKET_STATE',\n payload: { reconnecting: true },\n });\n\n const sdkConfig = (window as any).__notificationSDK?.config;\n if (!sdkConfig) {\n throw new Error('SDK configuration not available for WebSocket connection');\n }\n\n const baseUrl = client.getApiHost();\n const namespace = '/v1/notifications';\n const fullUrl = `${baseUrl}${namespace}`;\n\n console.log('Connecting to Socket.IO at:', fullUrl);\n\n const socket = ioClient(fullUrl, {\n query: {\n tenantId: sdkConfig.tenantId,\n subscriberId: sdkConfig.subscriberId,\n environmentId: sdkConfig.environmentId,\n },\n transports: ['websocket'],\n autoConnect: false,\n reconnection: true,\n reconnectionAttempts: 10,\n reconnectionDelay: 1000,\n reconnectionDelayMax: 5000,\n });\n\n websocketRef.current = socket;\n\n socket.on('notification', (payload: any) => {\n console.log('Received notification:', payload);\n handleWebSocketEvent({\n type: 'notification_received',\n data: payload,\n });\n });\n\n socket.on('connect', () => {\n console.log('Socket.IO connected successfully');\n dispatch({\n type: 'SET_WEBSOCKET_STATE',\n payload: { connected: true, reconnecting: false },\n });\n });\n\n socket.on('disconnect', (reason: any) => {\n console.log('Socket.IO disconnected:', reason);\n dispatch({\n type: 'SET_WEBSOCKET_STATE',\n payload: { connected: false, reconnecting: false },\n });\n });\n\n socket.on('reconnect_attempt', (attempt: any) => {\n console.log('Socket.IO reconnection attempt:', attempt);\n dispatch({\n type: 'SET_WEBSOCKET_STATE',\n payload: { connected: false, reconnecting: true },\n });\n });\n\n socket.on('connect_error', (error: any) => {\n console.error('Socket.IO connection error:', error);\n dispatch({\n type: 'SET_WEBSOCKET_STATE',\n payload: { connected: false, reconnecting: false },\n });\n if (onError) {\n onError(error);\n }\n });\n\n socket.connect();\n } catch (error) {\n console.error('Failed to connect WebSocket:', error);\n dispatch({\n type: 'SET_WEBSOCKET_STATE',\n payload: { connected: false, reconnecting: false },\n });\n if (onError) {\n onError(error as Error);\n }\n }\n }, [client, isInitialized, handleWebSocketEvent, onError]);\n\n const disconnectWebSocket = useCallback(() => {\n if (websocketRef.current) {\n try {\n if (websocketRef.current.disconnect) {\n websocketRef.current.disconnect();\n }\n websocketRef.current = null;\n dispatch({\n type: 'SET_WEBSOCKET_STATE',\n payload: { connected: false, reconnecting: false },\n });\n } catch (error) {\n console.error('Error disconnecting WebSocket:', error);\n }\n }\n }, []);\n\n const handleBellClick = useCallback(() => {\n dispatch({\n type: 'SET_UI_STATE',\n payload: { isOpen: !state.ui.isOpen },\n });\n }, [state.ui.isOpen]);\n\n const handlePopoverClose = useCallback(() => {\n dispatch({\n type: 'SET_UI_STATE',\n payload: { isOpen: false },\n });\n }, []);\n\n const handleViewChange = useCallback((view: 'notifications' | 'preferences') => {\n dispatch({\n type: 'SET_UI_STATE',\n payload: { currentView: view },\n });\n }, []);\n\n const handleNotificationAction = useCallback(\n async (id: string, action: any) => {\n if (!client || !isInitialized) {\n console.error('SDK not initialized');\n return;\n }\n\n const sdkConfig = (window as any).__notificationSDK?.config;\n if (!sdkConfig) {\n console.error('SDK configuration not available');\n return;\n }\n\n if (!id) {\n console.error('notificationId is required');\n throw new Error('notificationId is required');\n }\n\n try {\n switch (action.type) {\n case 'mark_read':\n await client.inbox.markAsRead(\n id,\n sdkConfig.tenantId,\n sdkConfig.environmentId,\n sdkConfig.subscriberId,\n );\n break;\n case 'mark_unread':\n await client.inbox.markAsUnread(\n id,\n sdkConfig.tenantId,\n sdkConfig.environmentId,\n sdkConfig.subscriberId,\n );\n break;\n case 'archive':\n await client.inbox.archive(\n id,\n sdkConfig.tenantId,\n sdkConfig.environmentId,\n sdkConfig.subscriberId,\n );\n break;\n case 'delete':\n await client.inbox.delete(\n id,\n sdkConfig.tenantId,\n sdkConfig.environmentId,\n sdkConfig.subscriberId,\n );\n break;\n default:\n if (action.handler) {\n await action.handler(id);\n }\n break;\n }\n\n switch (action.type) {\n case 'mark_read':\n dispatch({\n type: 'UPDATE_NOTIFICATION',\n payload: { id, updates: { isRead: true } },\n });\n break;\n case 'mark_unread':\n dispatch({\n type: 'UPDATE_NOTIFICATION',\n payload: { id, updates: { isRead: false } },\n });\n break;\n case 'archive':\n dispatch({\n type: 'UPDATE_NOTIFICATION',\n payload: { id, updates: { isArchived: true } },\n });\n break;\n case 'delete':\n dispatch({\n type: 'DELETE_NOTIFICATION',\n payload: id,\n });\n break;\n }\n } catch (error) {\n console.error('Error performing notification action:', error);\n if (onError) {\n onError(error as Error);\n }\n }\n },\n [client],\n );\n\n useEffect(() => {\n if (!client || !isInitialized) return;\n\n const loadNotifications = async () => {\n try {\n dispatch({\n type: 'SET_UI_STATE',\n payload: { isLoading: true },\n });\n\n const sdkConfig = (window as any).__notificationSDK?.config;\n if (!sdkConfig) {\n throw new Error('SDK configuration not available');\n }\n\n const notificationMapper = createNotificationMapper();\n const response = await client.inbox.getRenderedNotifications(\n {\n channel: 'in_app',\n limit: 50,\n offset: 0,\n },\n sdkConfig.tenantId,\n sdkConfig.environmentId,\n sdkConfig.subscriberId,\n );\n\n const coreNotifications = (response?.items || []).map((item: any) =>\n notificationMapper.toWidgetNotification(item),\n );\n\n dispatch({\n type: 'SET_NOTIFICATIONS',\n payload: coreNotifications,\n });\n\n dispatch({\n type: 'SET_UI_STATE',\n payload: { isLoading: false, error: null },\n });\n } catch (error) {\n console.error('Failed to load notifications:', error);\n dispatch({\n type: 'SET_UI_STATE',\n payload: {\n isLoading: false,\n error: error as Error,\n },\n });\n if (onError) {\n onError(error as Error);\n }\n }\n };\n\n loadNotifications();\n }, [client, isInitialized, onError]);\n\n useEffect(() => {\n if (client && isInitialized) {\n connectWebSocket();\n }\n\n return () => {\n disconnectWebSocket();\n };\n }, [client]);\n\n useEffect(() => {\n if (!client || !isInitialized) return;\n\n if (state.websocket.connected) return;\n\n const pollInterval = setInterval(async () => {\n try {\n const sdkConfig = (window as any).__notificationSDK?.config;\n if (!sdkConfig) {\n return;\n }\n\n const notificationMapper = createNotificationMapper();\n const response = await client.inbox.getRenderedNotifications(\n {\n channel: 'in_app',\n limit: 50,\n offset: 0,\n },\n sdkConfig.tenantId,\n sdkConfig.environmentId,\n sdkConfig.subscriberId,\n );\n\n const coreNotifications = (response?.items || []).map((item: any) =>\n notificationMapper.toWidgetNotification(item),\n );\n\n dispatch({\n type: 'SET_NOTIFICATIONS',\n payload: coreNotifications,\n });\n } catch (error) {\n console.error('Polling failed:', error);\n }\n }, 30000);\n\n return () => clearInterval(pollInterval);\n }, [client, state.websocket.connected]);\n\n useEffect(() => {\n const handleStorageChange = (event: StorageEvent) => {\n if (event.key === 'notification_widget_sync' && event.newValue) {\n try {\n const syncData = JSON.parse(event.newValue);\n handleWebSocketEvent(syncData);\n } catch (error) {\n console.error('Error parsing sync data:', error);\n }\n }\n };\n\n window.addEventListener('storage', handleStorageChange);\n return () => window.removeEventListener('storage', handleStorageChange);\n }, [handleWebSocketEvent]);\n\n useEffect(() => {\n dispatch({\n type: 'SET_UI_STATE',\n payload: { isLoading: isSaving },\n });\n }, [isSaving]);\n\n useEffect(() => {\n const error = sdkError || preferencesError || preferencesLoadError;\n if (error) {\n dispatch({\n type: 'SET_UI_STATE',\n payload: { error: error },\n });\n }\n }, [sdkError, preferencesError, preferencesLoadError]);\n\n if (!isInitialized && !sdkError) {\n return (\n <div\n className={`mx-widget-root relative inline-block ${className}`}\n data-mx-widget=\"root\"\n data-widget-size={size || 'small'}\n data-theme={theme}\n data-testid=\"notification-widget\"\n >\n <ComponentErrorBoundary componentName=\"BellComponent\">\n <BellComponent unreadCount={0} onClick={() => { }} size={size} disabled={true} />\n </ComponentErrorBoundary>\n </div>\n );\n }\n\n if (sdkError) {\n return (\n <div\n className={`mx-widget-root relative inline-block ${className}`}\n data-mx-widget=\"root\"\n data-widget-size={size || 'small'}\n data-theme={theme}\n data-testid=\"notification-widget\"\n >\n <ComponentErrorBoundary\n componentName=\"BellComponent\"\n fallback={\n <SDKConnectionFallback\n error={sdkError.message}\n onRetry={() => window.location.reload()}\n />\n }\n >\n <BellComponent unreadCount={0} onClick={() => { }} size={size} disabled={true} />\n </ComponentErrorBoundary>\n </div>\n );\n }\n\n return (\n <div\n className={`mx-widget-root relative inline-block ${className}`}\n data-mx-widget=\"root\"\n data-widget-size={size || 'small'}\n data-theme={theme}\n data-testid=\"notification-widget\"\n >\n <ComponentErrorBoundary componentName=\"BellComponent\">\n <BellComponent\n unreadCount={state.unreadCount}\n onClick={handleBellClick}\n size={size}\n disabled={state.ui.isLoading}\n />\n </ComponentErrorBoundary>\n\n <ComponentErrorBoundary\n componentName=\"InboxPopover\"\n fallback={<LoadingFallback message=\"Unable to load notifications\" />}\n >\n <InboxPopover\n isOpen={state.ui.isOpen}\n onClose={handlePopoverClose}\n position={position}\n currentView={state.ui.currentView}\n onViewChange={handleViewChange}\n notifications={state.notifications}\n onNotificationAction={handleNotificationAction}\n preferences={state.preferences}\n onPreferenceChange={updatePreference}\n isPreferencesLoading={isSaving}\n specificPreferences={displaySpecificPreferences}\n onLoadMoreSpecific={loadMoreSpecific}\n hasMoreSpecific={hasMoreSpecific}\n isListLoading={isSpecificLoading}\n onMorePreferencesClick={onMorePreferencesClick}\n />\n </ComponentErrorBoundary>\n </div>\n );\n};\n\nexport const NotificationWidget: React.FC<NotificationWidgetProps> = ({ sdkConfig, ...props }) => {\n return (\n <NotificationWidgetErrorBoundary onError={props.onError}>\n <SDKProvider config={sdkConfig}>\n <NotificationWidgetInternal {...props} />\n </SDKProvider>\n </NotificationWidgetErrorBoundary>\n );\n};\n","export { NotificationWidget } from './components/NotificationWidget';\n\nexport { BellComponent } from './components/BellComponent';\nexport { InboxPopover } from './components/InboxPopover';\nexport { NotificationItem } from './components/NotificationItem';\nexport { PreferencesView } from './components/PreferencesView';\n\nexport { NotificationWidgetErrorBoundary } from './components/ErrorBoundary';\n\nexport type * from './types/core';\n\nexport type {\n Notification as SDKNotification,\n NotificationFilters,\n} from '@edusight/notification-sdk';\n\nimport '../src/styles/index.css';\n\nexport const VERSION = '3.0.0';\nexport const WIDGET_NAME = '@edusight/notification-widget';\n"],"names":["useNotificationsClient","usePreferencesSync","onPreferencesLoaded","onError","notificationClient","isLoading","setIsLoading","useState","error","setError","preferences","setPreferences","loadPreferences","useCallback","config","subscriberId","tenantId","environmentId","servicePreferences","mappedPreferences","workflowId","categoryPrefs","err","defaultPreferences","useEffect","useSpecificPreferences","client","items","setItems","hasMore","setHasMore","offset","setOffset","LIMIT","loadMore","sdkConfig","response","newItems","item","prev","existingIds","i","uniqueNewItems","ErrorFallback","onRetry","jsxs","jsx","MdError","MdRefresh","NotificationWidgetErrorBoundary","Component","props","errorInfo","SDKContext","createContext","useSDK","context","useContext","initialState","SDKProvider","children","sdkState","setSdkState","React","isMounted","existingSDK","NotificationClient","widgetReducer","state","action","n","newNotifications","updatedNotifications","filteredNotifications","NotificationWidgetInternal","position","size","theme","className","onMorePreferencesClick","dispatch","useReducer","isInitialized","sdkError","websocketRef","useRef","handlePreferencesChange","handleWidgetError","preferencesLoadError","specificPreferences","isSpecificLoading","hasMoreSpecific","loadMoreSpecific","updatePreference","isSaving","preferencesError","useLivePreferences","newSubs","changed","sp","existingIdx","s","existing","displaySpecificPreferences","handleWebSocketEvent","event","notificationMapper","createNotificationMapper","wsPayload","mappedNotification","connectWebSocket","fullUrl","socket","ioClient","payload","reason","attempt","disconnectWebSocket","handleBellClick","handlePopoverClose","handleViewChange","view","handleNotificationAction","id","coreNotifications","pollInterval","handleStorageChange","syncData","ComponentErrorBoundary","BellComponent","SDKConnectionFallback","LoadingFallback","InboxPopover","NotificationWidget","VERSION","WIDGET_NAME"],"mappings":"uRAIMA,EAAyB,IACrB,OAAe,mBAAmB,OAc/BC,EAAqB,CAAC,CACjC,oBAAAC,EACA,QAAAC,CACF,IAAyD,CACvD,MAAMC,EAAqBJ,EAAA,EACrB,CAACK,EAAWC,CAAY,EAAIC,EAAAA,SAAS,EAAI,EACzC,CAACC,EAAOC,CAAQ,EAAIF,EAAAA,SAAuB,IAAI,EAC/C,CAACG,EAAaC,CAAc,EAAIJ,EAAAA,SAAyC,IAAI,EAE7EK,EAAkBC,EAAAA,YAAY,SAAY,CAC9C,GAAI,CAIF,GAHAP,EAAa,EAAI,EACjBG,EAAS,IAAI,EAET,CAACL,EACH,MAAM,IAAI,MAAM,mCAAmC,EAGrD,MAAMU,EAAU,OAAe,mBAAmB,OAElD,GAAI,CAACA,EACH,MAAM,IAAI,MAAM,iCAAiC,EAGnD,KAAM,CAAE,aAAAC,EAAc,SAAAC,EAAU,cAAAC,CAAA,EAAkBH,EAElD,GAAI,CAACC,GAAgB,CAAC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AsBsD,EACtB,YAAatD,EAAM,YACnB,mBAAoByB,EACpB,qBAAsBC,EACtB,oBAAqBS,EACrB,mBAAoBX,EACpB,gBAAAD,EACA,cAAeD,EACf,uBAAAX,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CAAA,CAGN,EAEasD,GAAwD,CAAC,CAAE,UAAAlG,EAAW,GAAGgB,KAElFL,EAAAA,IAACG,EAAA,CAAgC,QAASE,EAAM,QAC9C,SAAAL,EAAAA,IAACa,EAAA,CAAY,OAAQxB,EACnB,SAAAW,MAAC4B,EAAA,CAA4B,GAAGvB,CAAA,CAAO,EACzC,EACF,EChyBSmF,GAAU,QACVC,GAAc"}
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../src/hooks/usePreferencesSync.ts","../src/hooks/useSpecificPreferences.ts","../src/components/ErrorBoundary.tsx","../src/components/NotificationWidget.tsx","../src/index.ts"],"sourcesContent":["import { useEffect, useState, useCallback } from 'react';\n\nimport { NotificationPreferences } from '../types/core';\n\nconst useNotificationsClient = () => {\n return (window as any).__notificationSDK?.client;\n};\n\nexport interface UsePreferencesSyncProps {\n onPreferencesLoaded: (preferences: NotificationPreferences) => void;\n onError?: (error: Error) => void;\n}\n\nexport interface UsePreferencesSyncResult {\n isLoading: boolean;\n error: Error | null;\n preferences: NotificationPreferences | null;\n}\n\nexport const usePreferencesSync = ({\n onPreferencesLoaded,\n onError,\n}: UsePreferencesSyncProps): UsePreferencesSyncResult => {\n const notificationClient = useNotificationsClient();\n const [isLoading, setIsLoading] = useState(true);\n const [error, setError] = useState<Error | null>(null);\n const [preferences, setPreferences] = useState<NotificationPreferences | null>(null);\n\n const loadPreferences = useCallback(async () => {\n try {\n setIsLoading(true);\n setError(null);\n\n if (!notificationClient) {\n throw new Error('Notification client not available');\n }\n\n const config = (window as any).__notificationSDK?.config;\n\n if (!config) {\n throw new Error('SDK configuration not available');\n }\n\n const { subscriberId, tenantId, environmentId } = config;\n\n if (!subscriberId || !tenantId || !environmentId) {\n throw new Error('SubscriberId, TenantId or EnvironmentId not available in config');\n }\n\n const servicePreferences = await notificationClient.preferences.get(\n tenantId,\n subscriberId,\n environmentId,\n );\n\n // Fetch schedule separately\n let schedule = null;\n try {\n schedule = await notificationClient.preferences.getSchedule(\n tenantId,\n subscriberId,\n environmentId,\n );\n } catch (e) {\n console.warn('Failed to fetch schedule, using defaults:', e);\n }\n\n const mappedPreferences: NotificationPreferences = {\n channels: {\n email: servicePreferences.emailEnabled ?? true,\n push: servicePreferences.pushEnabled ?? true,\n sms: servicePreferences.smsEnabled ?? false,\n inApp: servicePreferences.inAppEnabled ?? true,\n },\n subscriptions: [],\n deliverySchedule: {\n enabled: schedule?.isEnabled || false,\n timezone: 'UTC',\n quietHours: {\n start: servicePreferences.quietHoursStart ?? '22:00',\n end: servicePreferences.quietHoursEnd ?? '08:00',\n },\n weekdays: schedule?.weeklySchedule\n ? [\n !!schedule.weeklySchedule.monday,\n !!schedule.weeklySchedule.tuesday,\n !!schedule.weeklySchedule.wednesday,\n !!schedule.weeklySchedule.thursday,\n !!schedule.weeklySchedule.friday,\n !!schedule.weeklySchedule.saturday,\n !!schedule.weeklySchedule.sunday,\n ]\n : [true, true, true, true, true, false, false],\n weeklySchedule: schedule?.weeklySchedule || undefined,\n },\n };\n\n if (servicePreferences.categories) {\n Object.entries(servicePreferences.categories).forEach(([workflowId, categoryPrefs]) => {\n mappedPreferences.subscriptions.push({\n workflowId,\n name: workflowId,\n enabled: true,\n channels: {\n email: (categoryPrefs as any).emailEnabled ?? true,\n push: (categoryPrefs as any).pushEnabled ?? true,\n sms: (categoryPrefs as any).smsEnabled ?? false,\n inApp: (categoryPrefs as any).inAppEnabled ?? true,\n },\n });\n });\n }\n\n setPreferences(mappedPreferences);\n onPreferencesLoaded(mappedPreferences);\n } catch (err: any) {\n const error = err instanceof Error ? err : new Error('Failed to load preferences');\n\n // If 404, it means preferences don't exist yet for this user.\n // We'll use defaults and suppress the error callback.\n const isNotFound = (err as any)?.response?.status === 404 || (err as any)?.status === 404;\n\n if (!isNotFound) {\n setError(error);\n onError?.(error);\n } else {\n console.warn('Preferences not found for user (404), using defaults.');\n }\n\n const defaultPreferences: NotificationPreferences = {\n channels: {\n email: true,\n push: true,\n sms: false,\n inApp: true,\n },\n subscriptions: [],\n deliverySchedule: {\n enabled: false,\n timezone: 'UTC',\n quietHours: {\n start: '22:00',\n end: '08:00',\n },\n weekdays: [true, true, true, true, true, false, false],\n },\n };\n setPreferences(defaultPreferences);\n onPreferencesLoaded(defaultPreferences);\n } finally {\n setIsLoading(false);\n }\n }, [notificationClient, onPreferencesLoaded, onError]);\n\n useEffect(() => {\n if (notificationClient) {\n loadPreferences();\n }\n }, [notificationClient, loadPreferences]);\n\n return {\n isLoading,\n error,\n preferences,\n };\n};\n","import { useState, useCallback, useEffect } from 'react';\n\nimport { WorkflowSubscription } from '../types/core';\n\nconst useNotificationsClient = () => {\n return (window as any).__notificationSDK?.client;\n};\n\nexport interface UseSpecificPreferencesResult {\n specificPreferences: WorkflowSubscription[];\n isLoading: boolean;\n hasMore: boolean;\n loadMore: () => Promise<void>;\n refetch: () => Promise<void>;\n}\n\nexport const useSpecificPreferences = (): UseSpecificPreferencesResult => {\n const client = useNotificationsClient();\n const [items, setItems] = useState<WorkflowSubscription[]>([]);\n const [isLoading, setIsLoading] = useState(false);\n const [hasMore, setHasMore] = useState(true);\n const [offset, setOffset] = useState(0);\n const LIMIT = 5;\n\n const loadMore = useCallback(async () => {\n if (!client || isLoading || !hasMore) return;\n\n try {\n setIsLoading(true);\n const sdkConfig = (window as any).__notificationSDK?.config;\n if (!sdkConfig) return;\n\n const response = await client.preferences.listSpecific(\n sdkConfig.tenantId,\n sdkConfig.subscriberId,\n {\n includeWorkflows: true,\n includeTemplates: false,\n activeOnly: true,\n limit: LIMIT,\n offset: offset,\n },\n );\n\n const newItems = (response.items || []).map((item: any) => ({\n workflowId: item.identifier,\n name: item.name,\n enabled: item.preference.enabled,\n channels: item.preference.channels,\n }));\n\n setItems((prev) => {\n // Determine uniqueness by workflowId to avoid duplicates if offset logic overlaps or double fetch\n const existingIds = new Set(prev.map((i) => i.workflowId));\n const uniqueNewItems = newItems.filter((i: any) => !existingIds.has(i.workflowId));\n return [...prev, ...uniqueNewItems];\n });\n\n setOffset((prev) => prev + LIMIT);\n\n // Check if we reached the end\n if (\n newItems.length < LIMIT ||\n (response.total !== undefined && items.length + newItems.length >= response.total)\n ) {\n setHasMore(false);\n }\n } catch (error) {\n console.error('Failed to load specific preferences:', error);\n // Don't disable hasMore on error, user can retry by scrolling\n } finally {\n setIsLoading(false);\n }\n }, [client, offset, hasMore, isLoading, items.length]);\n\n // Initial load\n useEffect(() => {\n if (client && offset === 0 && items.length === 0) {\n loadMore();\n }\n }, [client, loadMore, offset, items.length]);\n\n const refetch = async () => {\n setItems([]);\n setOffset(0);\n setHasMore(true);\n // Note: The effect will trigger loadMore because offset becomes 0 and items becomes empty\n };\n\n return {\n specificPreferences: items,\n isLoading,\n hasMore,\n loadMore,\n refetch,\n };\n};\n","import React, { Component, ErrorInfo, ReactNode } from 'react';\nimport { MdError, MdRefresh } from 'react-icons/md';\n\nimport { ErrorBoundaryState } from '../types/core';\n\ninterface ErrorBoundaryProps {\n children: ReactNode;\n onError?: (error: Error, errorInfo: ErrorInfo) => void;\n}\n\nconst ErrorFallback: React.FC<{\n error: Error | null;\n onRetry: () => void;\n}> = ({ error, onRetry }) => (\n <div\n className=\"p-4 bg-[var(--widget-error)]/10 border border-[var(--widget-error)]/20 rounded-lg\"\n role=\"alert\"\n data-testid=\"error-boundary-fallback\"\n >\n <div className=\"flex items-center mb-2\">\n <MdError className=\"w-6 h-6 text-[var(--widget-error)] mr-2\" aria-hidden=\"true\" />\n <h3 className=\"text-sm font-medium text-[var(--widget-error)]\">Something went wrong</h3>\n </div>\n\n <p className=\"text-sm mb-3 text-[var(--widget-error)]/80\">\n The notification widget encountered an error and couldn't load properly.\n </p>\n\n {process.env.NODE_ENV === 'development' && error && (\n <details className=\"mb-3\">\n <summary className=\"text-xs cursor-pointer text-[var(--widget-error)] hover:text-[var(--widget-error)]/80 transition-colors\">\n Error details (development only)\n </summary>\n <pre className=\"mt-2 text-xs bg-[var(--widget-error)]/5 p-2 rounded overflow-auto max-h-32 text-[var(--widget-error)]\">\n {error.message}\n {error.stack && `\\n\\n${error.stack}`}\n </pre>\n </details>\n )}\n\n <button\n type=\"button\"\n className=\"inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md text-[var(--widget-error)] bg-[var(--widget-error)]/10 hover:bg-[var(--widget-error)]/20 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[var(--widget-error)] transition-colors\"\n onClick={onRetry}\n data-testid=\"error-retry-button\"\n >\n <MdRefresh className=\"mr-1 w-4 h-4\" aria-hidden=\"true\" />\n Try again\n </button>\n </div>\n);\n\nexport class NotificationWidgetErrorBoundary extends Component<\n ErrorBoundaryProps,\n ErrorBoundaryState\n> {\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = {\n hasError: false,\n error: null,\n errorInfo: null,\n };\n }\n\n static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState> {\n return {\n hasError: true,\n error,\n };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n this.setState({\n errorInfo,\n });\n\n console.error('NotificationWidget Error Boundary caught an error:', {\n message: error.message,\n stack: error.stack,\n componentStack: errorInfo.componentStack,\n timestamp: new Date().toISOString(),\n });\n\n if (this.props.onError) {\n this.props.onError(error, errorInfo);\n }\n }\n\n handleRetry = () => {\n this.setState({\n hasError: false,\n error: null,\n errorInfo: null,\n });\n };\n\n render() {\n if (this.state.hasError) {\n return <ErrorFallback error={this.state.error} onRetry={this.handleRetry} />;\n }\n\n return this.props.children;\n }\n}\n\nexport const useErrorHandler = () => {\n return (error: Error, errorInfo?: ErrorInfo) => {\n console.error('Widget error:', {\n message: error.message,\n stack: error.stack,\n errorInfo,\n timestamp: new Date().toISOString(),\n });\n };\n};\n","import { NotificationClient } from '@edusight/notification-sdk';\nimport React, {\n useReducer,\n useEffect,\n useCallback,\n createContext,\n useContext,\n useRef,\n} from 'react';\nimport { io as ioClient } from 'socket.io-client';\n\nimport { useLivePreferences } from '../hooks/useLivePreferences';\nimport { usePreferencesSync } from '../hooks/usePreferencesSync';\nimport { useSpecificPreferences } from '../hooks/useSpecificPreferences';\nimport {\n NotificationWidgetProps,\n WidgetState,\n WidgetAction,\n SDKConfiguration,\n} from '../types/core';\nimport { createNotificationMapper } from '../utils/notification-mapper';\n\nimport { BellComponent } from './BellComponent';\nimport { ComponentErrorBoundary } from './ComponentErrorBoundary';\nimport { NotificationWidgetErrorBoundary } from './ErrorBoundary';\nimport { SDKConnectionFallback, LoadingFallback } from './FallbackComponents';\nimport { InboxPopover } from './InboxPopover';\n\ninterface SDKContextType {\n client: any;\n isInitialized: boolean;\n error: Error | null;\n}\n\nconst SDKContext = createContext<SDKContextType | null>(null);\n\nexport const useSDK = () => {\n const context = useContext(SDKContext);\n if (!context) {\n throw new Error('useSDK must be used within a NotificationWidget');\n }\n return context;\n};\n\nconst initialState: WidgetState = {\n notifications: [],\n unreadCount: 0,\n preferences: {\n channels: {\n email: true,\n push: true,\n sms: false,\n inApp: true,\n },\n subscriptions: [],\n deliverySchedule: {\n timezone: 'UTC',\n quietHours: {\n start: '22:00',\n end: '08:00',\n },\n weekdays: [true, true, true, true, true, false, false],\n },\n },\n ui: {\n isOpen: false,\n currentView: 'notifications',\n selectedNotifications: [],\n isLoading: false,\n error: null,\n },\n websocket: {\n connected: false,\n reconnecting: false,\n },\n};\n\nconst SDKProvider: React.FC<{ config: SDKConfiguration; children: React.ReactNode }> = ({\n config,\n children,\n}) => {\n const [sdkState, setSdkState] = React.useState<SDKContextType>({\n client: null,\n isInitialized: false,\n error: null,\n });\n\n useEffect(() => {\n let isMounted = true;\n\n const initializeSDK = async () => {\n try {\n const existingSDK = (window as any).__notificationSDK;\n\n // Check if we can reuse the existing SDK instance\n if (existingSDK?.client) {\n // Compare new config with existing config to determine if we need to re-initialize\n // We use simple JSON stringify as configs are simple objects with strings/numbers\n const isConfigMatch = JSON.stringify(existingSDK.config) === JSON.stringify(config);\n\n if (isConfigMatch) {\n if (isMounted) {\n setSdkState({\n client: existingSDK.client,\n isInitialized: true,\n error: null,\n });\n }\n return;\n } else {\n console.log('[NotificationWidget] Config changed, re-initializing SDK', {\n old: existingSDK.config,\n new: config,\n });\n }\n }\n\n const client = new NotificationClient({\n apiUrl: config.baseUrl,\n apiKey: config.apiKey,\n tenantId: config.tenantId,\n environmentId: config.environmentId,\n });\n\n (window as any).__notificationSDK = { client, config };\n\n if (isMounted) {\n setSdkState({\n client,\n isInitialized: true,\n error: null,\n });\n }\n } catch (error) {\n console.error('Failed to initialize SDK:', error);\n if (isMounted) {\n setSdkState({\n client: null,\n isInitialized: false,\n error: error as Error,\n });\n }\n }\n };\n\n initializeSDK();\n\n return () => {\n isMounted = false;\n };\n }, [config]);\n\n return <SDKContext.Provider value={sdkState}>{children}</SDKContext.Provider>;\n};\n\nconst widgetReducer = (state: WidgetState, action: WidgetAction): WidgetState => {\n switch (action.type) {\n case 'SET_NOTIFICATIONS':\n return {\n ...state,\n notifications: action.payload,\n unreadCount: action.payload.filter((n) => !n.isRead).length,\n };\n\n case 'ADD_NOTIFICATION':\n const newNotifications = [action.payload, ...state.notifications];\n return {\n ...state,\n notifications: newNotifications,\n unreadCount: newNotifications.filter((n) => !n.isRead).length,\n };\n\n case 'UPDATE_NOTIFICATION':\n const updatedNotifications = state.notifications.map((n) =>\n n.id === action.payload.id ? { ...n, ...action.payload.updates } : n,\n );\n return {\n ...state,\n notifications: updatedNotifications,\n unreadCount: updatedNotifications.filter((n) => !n.isRead).length,\n };\n\n case 'DELETE_NOTIFICATION':\n const filteredNotifications = state.notifications.filter((n) => n.id !== action.payload);\n return {\n ...state,\n notifications: filteredNotifications,\n unreadCount: filteredNotifications.filter((n) => !n.isRead).length,\n };\n\n case 'SET_PREFERENCES':\n return {\n ...state,\n preferences: action.payload,\n };\n\n case 'SET_UI_STATE':\n return {\n ...state,\n ui: { ...state.ui, ...action.payload },\n };\n\n case 'SET_WEBSOCKET_STATE':\n return {\n ...state,\n websocket: { ...state.websocket, ...action.payload },\n };\n\n default:\n return state;\n }\n};\n\nconst NotificationWidgetInternal: React.FC<Omit<NotificationWidgetProps, 'sdkConfig'>> = ({\n position = 'right',\n size = 'medium',\n theme = 'light',\n className = '',\n\n onError,\n onMorePreferencesClick,\n}) => {\n const [state, dispatch] = useReducer(widgetReducer, initialState);\n const { client, isInitialized, error: sdkError } = useSDK();\n const websocketRef = useRef<any>(null);\n\n const handlePreferencesChange = useCallback((preferences: any) => {\n dispatch({\n type: 'SET_PREFERENCES',\n payload: preferences,\n });\n }, []);\n\n const handleWidgetError = useCallback(\n (error: Error) => {\n console.error('Widget error:', error);\n if (onError) {\n onError(error);\n }\n },\n [onError],\n );\n\n const { error: preferencesLoadError } = usePreferencesSync({\n onPreferencesLoaded: handlePreferencesChange,\n onError: handleWidgetError,\n });\n\n const {\n specificPreferences,\n isLoading: isSpecificLoading,\n hasMore: hasMoreSpecific,\n loadMore: loadMoreSpecific,\n } = useSpecificPreferences();\n\n const {\n updatePreference,\n isSaving,\n error: preferencesError,\n } = useLivePreferences({\n preferences: state.preferences,\n onPreferencesChange: handlePreferencesChange,\n onError: handleWidgetError,\n });\n\n // Merge specific preferences into state when they load\n useEffect(() => {\n if (specificPreferences.length > 0) {\n const currentSubs = state.preferences.subscriptions;\n const newSubs = [...currentSubs];\n let changed = false;\n\n specificPreferences.forEach((sp) => {\n const existingIdx = newSubs.findIndex((s) => s.workflowId === sp.workflowId);\n\n // If not in state, add it\n if (existingIdx === -1) {\n newSubs.push(sp);\n changed = true;\n } else {\n // If existing name is just the ID (default), update with real name from specific prefs\n const existing = newSubs[existingIdx];\n if (existing.name === existing.workflowId && sp.name && sp.name !== sp.workflowId) {\n newSubs[existingIdx] = { ...existing, name: sp.name };\n changed = true;\n }\n }\n });\n\n if (changed) {\n dispatch({\n type: 'SET_PREFERENCES',\n payload: {\n ...state.preferences,\n subscriptions: newSubs,\n },\n });\n }\n }\n }, [specificPreferences]); // Depend on specificPreferences list changes (load more)\n\n // Create display list that respects order from hook but values from state\n const displaySpecificPreferences = React.useMemo(() => {\n return specificPreferences.map((sp) => {\n const found = state.preferences.subscriptions.find((s) => s.workflowId === sp.workflowId);\n return found || sp;\n });\n }, [specificPreferences, state.preferences.subscriptions]);\n\n const handleWebSocketEvent = useCallback((event: any) => {\n try {\n const notificationMapper = createNotificationMapper();\n\n switch (event.type) {\n case 'notification_received': {\n const wsPayload = event.data;\n\n if (!notificationMapper.validateWebSocketPayload(wsPayload)) {\n console.error('Invalid WebSocket notification payload, skipping', wsPayload);\n break;\n }\n\n const mappedNotification =\n notificationMapper.toWidgetNotificationFromWebSocket(wsPayload);\n dispatch({\n type: 'ADD_NOTIFICATION',\n payload: mappedNotification,\n });\n break;\n }\n\n case 'notification_updated':\n dispatch({\n type: 'UPDATE_NOTIFICATION',\n payload: {\n id: event.data.id || event.data.notificationId,\n updates: event.data,\n },\n });\n break;\n\n case 'notification_deleted':\n dispatch({\n type: 'DELETE_NOTIFICATION',\n payload: event.data.id || event.data.notificationId,\n });\n break;\n\n case 'preferences_updated':\n dispatch({\n type: 'SET_PREFERENCES',\n payload: event.data,\n });\n break;\n\n default:\n console.log('Unknown WebSocket event type:', event.type);\n }\n } catch (error) {\n console.error('Error handling WebSocket event:', error);\n }\n }, []);\n\n const connectWebSocket = useCallback(async () => {\n if (!client || !isInitialized || websocketRef.current) return;\n\n try {\n dispatch({\n type: 'SET_WEBSOCKET_STATE',\n payload: { reconnecting: true },\n });\n\n const sdkConfig = (window as any).__notificationSDK?.config;\n if (!sdkConfig) {\n throw new Error('SDK configuration not available for WebSocket connection');\n }\n\n const baseUrl = client.getApiHost();\n const namespace = '/v1/notifications';\n const fullUrl = `${baseUrl}${namespace}`;\n\n console.log('Connecting to Socket.IO at:', fullUrl);\n\n const socket = ioClient(fullUrl, {\n query: {\n tenantId: sdkConfig.tenantId,\n subscriberId: sdkConfig.subscriberId,\n environmentId: sdkConfig.environmentId,\n },\n transports: ['websocket'],\n autoConnect: false,\n reconnection: true,\n reconnectionAttempts: 10,\n reconnectionDelay: 1000,\n reconnectionDelayMax: 5000,\n });\n\n websocketRef.current = socket;\n\n socket.on('notification', (payload: any) => {\n console.log('Received notification:', payload);\n handleWebSocketEvent({\n type: 'notification_received',\n data: payload,\n });\n });\n\n socket.on('connect', () => {\n console.log('Socket.IO connected successfully');\n dispatch({\n type: 'SET_WEBSOCKET_STATE',\n payload: { connected: true, reconnecting: false },\n });\n });\n\n socket.on('disconnect', (reason: any) => {\n console.log('Socket.IO disconnected:', reason);\n dispatch({\n type: 'SET_WEBSOCKET_STATE',\n payload: { connected: false, reconnecting: false },\n });\n });\n\n socket.on('reconnect_attempt', (attempt: any) => {\n console.log('Socket.IO reconnection attempt:', attempt);\n dispatch({\n type: 'SET_WEBSOCKET_STATE',\n payload: { connected: false, reconnecting: true },\n });\n });\n\n socket.on('connect_error', (error: any) => {\n console.error('Socket.IO connection error:', error);\n dispatch({\n type: 'SET_WEBSOCKET_STATE',\n payload: { connected: false, reconnecting: false },\n });\n if (onError) {\n onError(error);\n }\n });\n\n socket.connect();\n } catch (error) {\n console.error('Failed to connect WebSocket:', error);\n dispatch({\n type: 'SET_WEBSOCKET_STATE',\n payload: { connected: false, reconnecting: false },\n });\n if (onError) {\n onError(error as Error);\n }\n }\n }, [client, isInitialized, handleWebSocketEvent, onError]);\n\n const disconnectWebSocket = useCallback(() => {\n if (websocketRef.current) {\n try {\n if (websocketRef.current.disconnect) {\n websocketRef.current.disconnect();\n }\n websocketRef.current = null;\n dispatch({\n type: 'SET_WEBSOCKET_STATE',\n payload: { connected: false, reconnecting: false },\n });\n } catch (error) {\n console.error('Error disconnecting WebSocket:', error);\n }\n }\n }, []);\n\n const handleBellClick = useCallback(() => {\n dispatch({\n type: 'SET_UI_STATE',\n payload: { isOpen: !state.ui.isOpen },\n });\n }, [state.ui.isOpen]);\n\n const handlePopoverClose = useCallback(() => {\n dispatch({\n type: 'SET_UI_STATE',\n payload: { isOpen: false },\n });\n }, []);\n\n const handleViewChange = useCallback((view: 'notifications' | 'preferences') => {\n dispatch({\n type: 'SET_UI_STATE',\n payload: { currentView: view },\n });\n }, []);\n\n const handleNotificationAction = useCallback(\n async (id: string, action: any) => {\n if (!client || !isInitialized) {\n console.error('SDK not initialized');\n return;\n }\n\n const sdkConfig = (window as any).__notificationSDK?.config;\n if (!sdkConfig) {\n console.error('SDK configuration not available');\n return;\n }\n\n if (!id) {\n console.error('notificationId is required');\n throw new Error('notificationId is required');\n }\n\n try {\n switch (action.type) {\n case 'mark_read':\n await client.inbox.markAsRead(\n id,\n sdkConfig.tenantId,\n sdkConfig.environmentId,\n sdkConfig.subscriberId,\n );\n break;\n case 'mark_unread':\n await client.inbox.markAsUnread(\n id,\n sdkConfig.tenantId,\n sdkConfig.environmentId,\n sdkConfig.subscriberId,\n );\n break;\n case 'archive':\n await client.inbox.archive(\n id,\n sdkConfig.tenantId,\n sdkConfig.environmentId,\n sdkConfig.subscriberId,\n );\n break;\n case 'delete':\n await client.inbox.delete(\n id,\n sdkConfig.tenantId,\n sdkConfig.environmentId,\n sdkConfig.subscriberId,\n );\n break;\n default:\n if (action.handler) {\n await action.handler(id);\n }\n break;\n }\n\n switch (action.type) {\n case 'mark_read':\n dispatch({\n type: 'UPDATE_NOTIFICATION',\n payload: { id, updates: { isRead: true } },\n });\n break;\n case 'mark_unread':\n dispatch({\n type: 'UPDATE_NOTIFICATION',\n payload: { id, updates: { isRead: false } },\n });\n break;\n case 'archive':\n dispatch({\n type: 'UPDATE_NOTIFICATION',\n payload: { id, updates: { isArchived: true } },\n });\n break;\n case 'delete':\n dispatch({\n type: 'DELETE_NOTIFICATION',\n payload: id,\n });\n break;\n }\n } catch (error) {\n console.error('Error performing notification action:', error);\n if (onError) {\n onError(error as Error);\n }\n }\n },\n [client],\n );\n\n useEffect(() => {\n if (!client || !isInitialized) return;\n\n const loadNotifications = async () => {\n try {\n dispatch({\n type: 'SET_UI_STATE',\n payload: { isLoading: true },\n });\n\n const sdkConfig = (window as any).__notificationSDK?.config;\n if (!sdkConfig) {\n throw new Error('SDK configuration not available');\n }\n\n const notificationMapper = createNotificationMapper();\n const response = await client.inbox.getRenderedNotifications(\n {\n channel: 'in_app',\n limit: 50,\n offset: 0,\n },\n sdkConfig.tenantId,\n sdkConfig.environmentId,\n sdkConfig.subscriberId,\n );\n\n const coreNotifications = (response?.items || []).map((item: any) =>\n notificationMapper.toWidgetNotification(item),\n );\n\n dispatch({\n type: 'SET_NOTIFICATIONS',\n payload: coreNotifications,\n });\n\n dispatch({\n type: 'SET_UI_STATE',\n payload: { isLoading: false, error: null },\n });\n } catch (error) {\n console.error('Failed to load notifications:', error);\n dispatch({\n type: 'SET_UI_STATE',\n payload: {\n isLoading: false,\n error: error as Error,\n },\n });\n if (onError) {\n onError(error as Error);\n }\n }\n };\n\n loadNotifications();\n }, [client, isInitialized, onError]);\n\n useEffect(() => {\n if (client && isInitialized) {\n connectWebSocket();\n }\n\n return () => {\n disconnectWebSocket();\n };\n }, [client]);\n\n useEffect(() => {\n if (!client || !isInitialized) return;\n\n if (state.websocket.connected) return;\n\n const pollInterval = setInterval(async () => {\n try {\n const sdkConfig = (window as any).__notificationSDK?.config;\n if (!sdkConfig) {\n return;\n }\n\n const notificationMapper = createNotificationMapper();\n const response = await client.inbox.getRenderedNotifications(\n {\n channel: 'in_app',\n limit: 50,\n offset: 0,\n },\n sdkConfig.tenantId,\n sdkConfig.environmentId,\n sdkConfig.subscriberId,\n );\n\n const coreNotifications = (response?.items || []).map((item: any) =>\n notificationMapper.toWidgetNotification(item),\n );\n\n dispatch({\n type: 'SET_NOTIFICATIONS',\n payload: coreNotifications,\n });\n } catch (error) {\n console.error('Polling failed:', error);\n }\n }, 30000);\n\n return () => clearInterval(pollInterval);\n }, [client, state.websocket.connected]);\n\n useEffect(() => {\n const handleStorageChange = (event: StorageEvent) => {\n if (event.key === 'notification_widget_sync' && event.newValue) {\n try {\n const syncData = JSON.parse(event.newValue);\n handleWebSocketEvent(syncData);\n } catch (error) {\n console.error('Error parsing sync data:', error);\n }\n }\n };\n\n window.addEventListener('storage', handleStorageChange);\n return () => window.removeEventListener('storage', handleStorageChange);\n }, [handleWebSocketEvent]);\n\n useEffect(() => {\n dispatch({\n type: 'SET_UI_STATE',\n payload: { isLoading: isSaving },\n });\n }, [isSaving]);\n\n useEffect(() => {\n const error = sdkError || preferencesError || preferencesLoadError;\n if (error) {\n dispatch({\n type: 'SET_UI_STATE',\n payload: { error: error },\n });\n }\n }, [sdkError, preferencesError, preferencesLoadError]);\n\n if (!isInitialized && !sdkError) {\n return (\n <div\n className={`mx-widget-root relative inline-block ${className}`}\n data-mx-widget=\"root\"\n data-widget-size={size || 'small'}\n data-theme={theme}\n data-testid=\"notification-widget\"\n >\n <ComponentErrorBoundary componentName=\"BellComponent\">\n <BellComponent unreadCount={0} onClick={() => { }} size={size} disabled={true} />\n </ComponentErrorBoundary>\n </div>\n );\n }\n\n if (sdkError) {\n return (\n <div\n className={`mx-widget-root relative inline-block ${className}`}\n data-mx-widget=\"root\"\n data-widget-size={size || 'small'}\n data-theme={theme}\n data-testid=\"notification-widget\"\n >\n <ComponentErrorBoundary\n componentName=\"BellComponent\"\n fallback={\n <SDKConnectionFallback\n error={sdkError.message}\n onRetry={() => window.location.reload()}\n />\n }\n >\n <BellComponent unreadCount={0} onClick={() => { }} size={size} disabled={true} />\n </ComponentErrorBoundary>\n </div>\n );\n }\n\n return (\n <div\n className={`mx-widget-root relative inline-block ${className}`}\n data-mx-widget=\"root\"\n data-widget-size={size || 'small'}\n data-theme={theme}\n data-testid=\"notification-widget\"\n >\n <ComponentErrorBoundary componentName=\"BellComponent\">\n <BellComponent\n unreadCount={state.unreadCount}\n onClick={handleBellClick}\n size={size}\n disabled={state.ui.isLoading}\n />\n </ComponentErrorBoundary>\n\n <ComponentErrorBoundary\n componentName=\"InboxPopover\"\n fallback={<LoadingFallback message=\"Unable to load notifications\" />}\n >\n <InboxPopover\n isOpen={state.ui.isOpen}\n onClose={handlePopoverClose}\n position={position}\n currentView={state.ui.currentView}\n onViewChange={handleViewChange}\n notifications={state.notifications}\n onNotificationAction={handleNotificationAction}\n preferences={state.preferences}\n onPreferenceChange={updatePreference}\n isPreferencesLoading={isSaving}\n specificPreferences={displaySpecificPreferences}\n onLoadMoreSpecific={loadMoreSpecific}\n hasMoreSpecific={hasMoreSpecific}\n isListLoading={isSpecificLoading}\n onMorePreferencesClick={onMorePreferencesClick}\n />\n </ComponentErrorBoundary>\n </div>\n );\n};\n\nexport const NotificationWidget: React.FC<NotificationWidgetProps> = ({ sdkConfig, ...props }) => {\n return (\n <NotificationWidgetErrorBoundary onError={props.onError}>\n <SDKProvider config={sdkConfig}>\n <NotificationWidgetInternal {...props} />\n </SDKProvider>\n </NotificationWidgetErrorBoundary>\n );\n};\n","export { NotificationWidget } from './components/NotificationWidget';\n\nexport { BellComponent } from './components/BellComponent';\nexport { InboxPopover } from './components/InboxPopover';\nexport { NotificationItem } from './components/NotificationItem';\nexport { PreferencesView } from './components/PreferencesView';\n\nexport { NotificationWidgetErrorBoundary } from './components/ErrorBoundary';\n\nexport type * from './types/core';\n\nexport type {\n Notification as SDKNotification,\n NotificationFilters,\n} from '@edusight/notification-sdk';\n\nimport '../src/styles/index.css';\n\nexport const VERSION = '3.0.0';\nexport const WIDGET_NAME = '@edusight/notification-widget';\n"],"names":["useNotificationsClient","usePreferencesSync","onPreferencesLoaded","onError","notificationClient","isLoading","setIsLoading","useState","error","setError","preferences","setPreferences","loadPreferences","useCallback","config","subscriberId","tenantId","environmentId","servicePreferences","schedule","mappedPreferences","workflowId","categoryPrefs","err","defaultPreferences","useEffect","useSpecificPreferences","client","items","setItems","hasMore","setHasMore","offset","setOffset","LIMIT","loadMore","sdkConfig","response","newItems","item","prev","existingIds","i","uniqueNewItems","ErrorFallback","onRetry","jsxs","jsx","MdError","MdRefresh","NotificationWidgetErrorBoundary","Component","props","errorInfo","SDKContext","createContext","useSDK","context","useContext","initialState","SDKProvider","children","sdkState","setSdkState","React","isMounted","existingSDK","NotificationClient","widgetReducer","state","action","n","newNotifications","updatedNotifications","filteredNotifications","NotificationWidgetInternal","position","size","theme","className","onMorePreferencesClick","dispatch","useReducer","isInitialized","sdkError","websocketRef","useRef","handlePreferencesChange","handleWidgetError","preferencesLoadError","specificPreferences","isSpecificLoading","hasMoreSpecific","loadMoreSpecific","updatePreference","isSaving","preferencesError","useLivePreferences","newSubs","changed","sp","existingIdx","s","existing","displaySpecificPreferences","handleWebSocketEvent","event","notificationMapper","createNotificationMapper","wsPayload","mappedNotification","connectWebSocket","fullUrl","socket","ioClient","payload","reason","attempt","disconnectWebSocket","handleBellClick","handlePopoverClose","handleViewChange","view","handleNotificationAction","id","coreNotifications","pollInterval","handleStorageChange","syncData","ComponentErrorBoundary","BellComponent","SDKConnectionFallback","LoadingFallback","InboxPopover","NotificationWidget","VERSION","WIDGET_NAME"],"mappings":"uRAIMA,EAAyB,IACrB,OAAe,mBAAmB,OAc/BC,EAAqB,CAAC,CACjC,oBAAAC,EACA,QAAAC,CACF,IAAyD,CACvD,MAAMC,EAAqBJ,EAAA,EACrB,CAACK,EAAWC,CAAY,EAAIC,EAAAA,SAAS,EAAI,EACzC,CAACC,EAAOC,CAAQ,EAAIF,EAAAA,SAAuB,IAAI,EAC/C,CAACG,EAAaC,CAAc,EAAIJ,EAAAA,SAAyC,IAAI,EAE7EK,EAAkBC,EAAAA,YAAY,SAAY,CAC9C,GAAI,CAIF,GAHAP,EAAa,EAAI,EACjBG,EAAS,IAAI,EAET,CAACL,EACH,MAAM,IAAI,MAAM,mCAAmC,EAGrD,MAAMU,EAAU,OAAe,mBAAmB,OAElD,GAAI,CAACA,EACH,MAAM,IAAI,MAAM,iCAAiC,EAGnD,KAAM,CAAE,aAAAC,EAAc,SAAAC,EAAU,cAAAC,CAAA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B,EAAAA,IAACkF,EAAAA,uBAAA,CAAuB,cAAc,gBACpC,SAAAlF,EAAAA,IAACmF,EAAAA,cAAA,CACC,YAAa7D,EAAM,YACnB,QAASkD,EACT,KAAA1C,EACA,SAAUR,EAAM,GAAG,SAAA,CAAA,EAEvB,EAEAtB,EAAAA,IAACkF,EAAAA,uBAAA,CACC,cAAc,eACd,SAAUlF,EAAAA,IAACqF,EAAAA,gBAAA,CAAgB,QAAQ,8BAAA,CAA+B,EAElE,SAAArF,EAAAA,IAACsF,EAAAA,aAAA,CACC,OAAQhE,EAAM,GAAG,OACjB,QAASmD,EACT,SAAA5C,EACA,YAAaP,EAAM,GAAG,YACtB,aAAcoD,EACd,cAAepD,EAAM,cACrB,qBAAsBsD,EACtB,YAAatD,EAAM,YACnB,mBAAoByB,EACpB,qBAAsBC,EACtB,oBAAqBS,EACrB,mBAAoBX,EACpB,gBAAAD,EACA,cAAeD,EACf,uBAAAX,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CAAA,CAGN,EAEasD,GAAwD,CAAC,CAAE,UAAAlG,EAAW,GAAGgB,KAElFL,EAAAA,IAACG,EAAA,CAAgC,QAASE,EAAM,QAC9C,SAAAL,EAAAA,IAACa,EAAA,CAAY,OAAQxB,EACnB,SAAAW,MAAC4B,EAAA,CAA4B,GAAGvB,CAAA,CAAO,EACzC,EACF,EChyBSmF,GAAU,QACVC,GAAc"}
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--widget-font-family, -apple-system),BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--widget-primary: #cecece;--widget-primary-hover: rgb(212, 212, 212);--widget-primary-light: #eef2ff;--widget-background: #ffffff;--widget-bg: var(--widget-background);--widget-bg-secondary: #f9fafb;--widget-bg-hover: #f3f4f6;--widget-hover: var(--widget-bg-hover);--widget-text: #111827;--widget-text-secondary: #6b7280;--widget-text-tertiary: #9ca3af;--widget-border: #e5e7eb;--widget-border-light: #f3f4f6;--widget-unread-bg: #af50d4;--widget-unread-dot: #c26dbb;--widget-unread-badge-bg: #ef4444;--widget-success: #10b981;--widget-warning: #f59e0b;--widget-error: #ef4444;--widget-font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;--widget-popover-width: 480px;--widget-popover-max-height: 600px;--widget-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05);--widget-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--widget-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--widget-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1)}[data-theme=dark]{--widget-background: #1f2937;--widget-bg: var(--widget-background);--widget-bg-secondary: #111827;--widget-bg-hover: #374151;--widget-hover: var(--widget-bg-hover);--widget-text: #f9fafb;--widget-text-secondary: #d1d5db;--widget-text-tertiary: #9ca3af;--widget-border: #374151;--widget-border-light: #1f2937;--widget-primary: #dbdbdb;--widget-primary-hover: #a5b4fc;--widget-primary-light: rgba(99, 102, 241, .1);--widget-unread-bg: rgba(59, 130, 246, .1);--widget-unread-dot: #bdc3c9;--widget-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .3);--widget-shadow: 0 4px 6px -1px rgb(0 0 0 / .3), 0 2px 4px -2px rgb(0 0 0 / .3);--widget-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .4), 0 4px 6px -4px rgb(0 0 0 / .4);--widget-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .5), 0 8px 10px -6px rgb(0 0 0 / .5)}.notification-item{height:var(--widget-item-height, 80px);display:flex;align-items:flex-start;transition:background-color .2s ease-in-out;cursor:pointer}.notification-item:hover{background-color:var(--widget-hover, #f9fafb)}.notification-item.unread{background-color:var(--widget-unread-bg, #f0f4ff)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-y-0{top:0;bottom:0}.-right-2{right:-16px}.-top-2{top:-16px}.left-0{left:0}.right-0{right:0}.top-full{top:100%}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.col-span-2{grid-column:span 2 / span 2}.mx-auto{margin-left:auto;margin-right:auto}.mb-0\.5{margin-bottom:4px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}.mb-4{margin-bottom:32px}.ml-1{margin-left:8px}.mr-1{margin-right:8px}.mr-2{margin-right:16px}.mt-1\.5{margin-top:12px}.mt-2{margin-top:16px}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-10{height:80px}.h-12{height:96px}.h-2{height:16px}.h-3{height:24px}.h-4{height:32px}.h-5{height:40px}.h-6{height:48px}.h-7{height:1.75rem}.h-8{height:64px}.h-\[16px\]{height:16px}.h-full{height:100%}.max-h-32{max-height:8rem}.max-h-\[calc\(var\(--widget-popover-max-height\)-200px\)\]{max-height:calc(var(--widget-popover-max-height) - 200px)}.max-h-\[var\(--widget-popover-max-height\,580px\)\]{max-height:var(--widget-popover-max-height,580px)}.min-h-\[20px\]{min-height:20px}.w-10{width:80px}.w-12{width:96px}.w-16{width:128px}.w-2{width:16px}.w-3\/4{width:75%}.w-4{width:32px}.w-5{width:40px}.w-5\/6{width:83.333333%}.w-6{width:48px}.w-7{width:1.75rem}.w-8{width:64px}.w-9{width:2.25rem}.w-\[16px\]{width:16px}.w-\[88px\]{width:88px}.w-\[var\(--widget-popover-width\,400px\)\]{width:var(--widget-popover-width,400px)}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[20rem\]{min-width:20rem}.max-w-\[180px\]{max-width:180px}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.origin-top-left{transform-origin:top left}.origin-top-right{transform-origin:top right}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-4{--tw-translate-x: 32px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.grid-cols-\[auto_1fr_auto_auto\]{grid-template-columns:auto 1fr auto auto}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:8px}.gap-2{gap:16px}.gap-3{gap:24px}.gap-x-4{-moz-column-gap:32px;column-gap:32px}.gap-y-3{row-gap:24px}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(16px * var(--tw-space-x-reverse));margin-left:calc(16px * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(8px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(8px * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(16px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(16px * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-border-light>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(243 244 246 / var(--tw-divide-opacity, 1))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:var(--widget-radius-card, 8px)}.rounded-2xl{border-radius:16px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:8px}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-t{border-top-width:1px}.border-\[var\(--widget-border\)\]{border-color:var(--widget-border)}.border-\[var\(--widget-primary\)\]{border-color:var(--widget-primary)}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-border{border-color:var(--widget-border, #e5e7eb)}.border-border-light{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.border-t-blue-500{--tw-border-opacity: 1;border-top-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-t-transparent{border-top-color:transparent}.bg-\[var\(--widget-background\)\]{background-color:var(--widget-background)}.bg-\[var\(--widget-bg-hover\)\]{background-color:var(--widget-bg-hover)}.bg-\[var\(--widget-bg-secondary\)\]{background-color:var(--widget-bg-secondary)}.bg-\[var\(--widget-primary\)\]{background-color:var(--widget-primary)}.bg-\[var\(--widget-text\)\]{background-color:var(--widget-text)}.bg-\[var\(--widget-warning\)\]{background-color:var(--widget-warning)}.bg-black\/20{background-color:#0003}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-unread-indicator{background-color:var(--widget-unread-indicator, #2563eb)}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-widget-background{background-color:var(--widget-background, #ffffff)}.bg-widget-hover{background-color:var(--widget-hover, #f9fafb)}.bg-widget-primary{background-color:var(--widget-primary, #2563eb)}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-widget-primary{--tw-gradient-from: var(--widget-primary, #2563eb) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:8px}.p-2{padding:16px}.p-3{padding:24px}.p-4{padding:32px}.px-1{padding-left:8px;padding-right:8px}.px-2{padding-left:16px;padding-right:16px}.px-3{padding-left:24px;padding-right:24px}.px-4{padding-left:32px;padding-right:32px}.py-1{padding-top:8px;padding-bottom:8px}.py-1\.5{padding-top:12px;padding-bottom:12px}.py-12{padding-top:96px;padding-bottom:96px}.py-2{padding-top:16px;padding-bottom:16px}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:24px;padding-bottom:24px}.py-8{padding-top:64px;padding-bottom:64px}.pb-1{padding-bottom:8px}.pb-1\.5{padding-bottom:12px}.pl-1{padding-left:8px}.pl-10{padding-left:80px}.pl-3{padding-left:24px}.pr-3{padding-right:24px}.pt-0\.5{padding-top:4px}.pt-2{padding-top:16px}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\[10px\]{font-size:10px}.text-base{font-size:var(--widget-font-size-subject, 14px);line-height:20px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:var(--widget-font-size-body, 13px);line-height:18px}.text-xs{font-size:var(--widget-font-size-timestamp, 12px);line-height:16px}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.text-\[var\(--widget-error\)\]{color:var(--widget-error)}.text-\[var\(--widget-primary\)\]{color:var(--widget-primary)}.text-\[var\(--widget-success\)\]{color:var(--widget-success)}.text-\[var\(--widget-text\)\]{color:var(--widget-text)}.text-\[var\(--widget-text-secondary\)\]{color:var(--widget-text-secondary)}.text-\[var\(--widget-text-tertiary\)\]{color:var(--widget-text-tertiary)}.text-\[var\(--widget-warning\)\]{color:var(--widget-warning)}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-text-primary{color:var(--widget-text, #1f2937)}.text-text-secondary{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-text-tertiary{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-widget-primary{color:var(--widget-primary, #2563eb)}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-80{opacity:.8}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[var\(--widget-shadow-xl\)\]{--tw-shadow-color: var(--widget-shadow-xl);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:ease-in-out;transition-duration:.2s}.transition-all{transition-property:all;transition-timing-function:ease-in-out;transition-duration:.2s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:ease-in-out;transition-duration:.2s}.transition-opacity{transition-property:opacity;transition-timing-function:ease-in-out;transition-duration:.2s}.transition-transform{transition-property:transform;transition-timing-function:ease-in-out;transition-duration:.2s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.placeholder\:text-\[var\(--widget-text-tertiary\)\]::-moz-placeholder{color:var(--widget-text-tertiary)}.placeholder\:text-\[var\(--widget-text-tertiary\)\]::placeholder{color:var(--widget-text-tertiary)}.hover\:bg-\[var\(--widget-bg-hover\)\]:hover{background-color:var(--widget-bg-hover)}.hover\:bg-\[var\(--widget-primary-hover\)\]:hover{background-color:var(--widget-primary-hover)}.hover\:bg-\[var\(--widget-primary-light\)\]:hover{background-color:var(--widget-primary-light)}.hover\:bg-blue-50:hover{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-widget-hover:hover{background-color:var(--widget-hover, #f9fafb)}.hover\:text-\[var\(--widget-primary-hover\)\]:hover{color:var(--widget-primary-hover)}.hover\:text-\[var\(--widget-text\)\]:hover{color:var(--widget-text)}.hover\:text-text-primary:hover{color:var(--widget-text, #1f2937)}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-transparent:focus{border-color:transparent}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-\[var\(--widget-error\)\]:focus{--tw-ring-color: var(--widget-error)}.focus\:ring-\[var\(--widget-primary\)\]:focus{--tw-ring-color: var(--widget-primary)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.focus\:ring-text-secondary:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity, 1))}.focus\:ring-widget-primary:focus{--tw-ring-color: var(--widget-primary, #2563eb)}.focus\:ring-offset-0:focus{--tw-ring-offset-width: 0px}.focus\:ring-offset-1:focus{--tw-ring-offset-width: 1px}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-widget-hover:disabled{background-color:var(--widget-hover, #f9fafb)}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-70:disabled{opacity:.7}.dark\:border-gray-600:is([data-theme=dark] *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.dark\:border-gray-900:is([data-theme=dark] *){--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity, 1))}.dark\:border-t-blue-400:is([data-theme=dark] *){--tw-border-opacity: 1;border-top-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.dark\:bg-gray-600:is([data-theme=dark] *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.dark\:text-gray-400:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:hover\:bg-gray-800:hover:is([data-theme=dark] *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}@media not all and (min-width:640px){.max-sm\:fixed{position:fixed}.max-sm\:inset-x-4{left:32px;right:32px}.max-sm\:bottom-4{bottom:32px}.max-sm\:top-16{top:128px}.max-sm\:max-h-\[calc\(100vh-120px\)\]{max-height:calc(100vh - 120px)}.max-sm\:w-auto{width:auto}.max-sm\:max-w-none{max-width:none}}@media(min-width:768px){.md\:hidden{display:none}}
|
|
1
|
+
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--widget-font-family, -apple-system),BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--widget-primary: #cecece;--widget-primary-hover: rgb(212, 212, 212);--widget-primary-light: #eef2ff;--widget-background: #ffffff;--widget-bg: var(--widget-background);--widget-bg-secondary: #f9fafb;--widget-bg-hover: #f3f4f6;--widget-hover: var(--widget-bg-hover);--widget-text: #111827;--widget-text-secondary: #6b7280;--widget-text-tertiary: #9ca3af;--widget-border: #e5e7eb;--widget-border-light: #f3f4f6;--widget-unread-bg: #af50d4;--widget-unread-dot: #c26dbb;--widget-unread-badge-bg: #ef4444;--widget-success: #10b981;--widget-warning: #f59e0b;--widget-error: #ef4444;--widget-font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;--widget-popover-width: 480px;--widget-popover-max-height: 600px;--widget-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05);--widget-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--widget-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--widget-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1)}[data-theme=dark]{--widget-background: #1f2937;--widget-bg: var(--widget-background);--widget-bg-secondary: #111827;--widget-bg-hover: #374151;--widget-hover: var(--widget-bg-hover);--widget-text: #f9fafb;--widget-text-secondary: #d1d5db;--widget-text-tertiary: #9ca3af;--widget-border: #374151;--widget-border-light: #1f2937;--widget-primary: #dbdbdb;--widget-primary-hover: #a5b4fc;--widget-primary-light: rgba(99, 102, 241, .1);--widget-unread-bg: rgba(59, 130, 246, .1);--widget-unread-dot: #bdc3c9;--widget-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .3);--widget-shadow: 0 4px 6px -1px rgb(0 0 0 / .3), 0 2px 4px -2px rgb(0 0 0 / .3);--widget-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .4), 0 4px 6px -4px rgb(0 0 0 / .4);--widget-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .5), 0 8px 10px -6px rgb(0 0 0 / .5)}.notification-item{height:var(--widget-item-height, 80px);display:flex;align-items:flex-start;transition:background-color .2s ease-in-out;cursor:pointer}.notification-item:hover{background-color:var(--widget-hover, #f9fafb)}.notification-item.unread{background-color:var(--widget-unread-bg, #f0f4ff)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-y-0{top:0;bottom:0}.-right-2{right:-16px}.-top-2{top:-16px}.left-0{left:0}.right-0{right:0}.top-full{top:100%}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.mb-0\.5{margin-bottom:4px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}.mb-4{margin-bottom:32px}.ml-1{margin-left:8px}.mr-1{margin-right:8px}.mr-2{margin-right:16px}.mt-1\.5{margin-top:12px}.mt-2{margin-top:16px}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.h-10{height:80px}.h-12{height:96px}.h-2{height:16px}.h-3{height:24px}.h-4{height:32px}.h-5{height:40px}.h-6{height:48px}.h-7{height:1.75rem}.h-8{height:64px}.h-\[16px\]{height:16px}.h-full{height:100%}.max-h-32{max-height:8rem}.max-h-\[calc\(var\(--widget-popover-max-height\)-200px\)\]{max-height:calc(var(--widget-popover-max-height) - 200px)}.max-h-\[var\(--widget-popover-max-height\,580px\)\]{max-height:var(--widget-popover-max-height,580px)}.min-h-\[20px\]{min-height:20px}.w-10{width:80px}.w-12{width:96px}.w-16{width:128px}.w-2{width:16px}.w-3\/4{width:75%}.w-4{width:32px}.w-5{width:40px}.w-5\/6{width:83.333333%}.w-6{width:48px}.w-7{width:1.75rem}.w-8{width:64px}.w-9{width:2.25rem}.w-\[16px\]{width:16px}.w-\[var\(--widget-popover-width\,400px\)\]{width:var(--widget-popover-width,400px)}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[20rem\]{min-width:20rem}.max-w-\[180px\]{max-width:180px}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.origin-top-left{transform-origin:top left}.origin-top-right{transform-origin:top right}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-4{--tw-translate-x: 32px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:8px}.gap-2{gap:16px}.gap-3{gap:24px}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(16px * var(--tw-space-x-reverse));margin-left:calc(16px * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(8px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(8px * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(16px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(16px * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-border-light>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(243 244 246 / var(--tw-divide-opacity, 1))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:var(--widget-radius-card, 8px)}.rounded-2xl{border-radius:16px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:8px}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-t{border-top-width:1px}.border-\[var\(--widget-border\)\]{border-color:var(--widget-border)}.border-\[var\(--widget-primary\)\]{border-color:var(--widget-primary)}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-border{border-color:var(--widget-border, #e5e7eb)}.border-border-light{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.border-t-blue-500{--tw-border-opacity: 1;border-top-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-t-transparent{border-top-color:transparent}.bg-\[var\(--widget-background\)\]{background-color:var(--widget-background)}.bg-\[var\(--widget-bg-hover\)\]{background-color:var(--widget-bg-hover)}.bg-\[var\(--widget-bg-secondary\)\]{background-color:var(--widget-bg-secondary)}.bg-\[var\(--widget-primary\)\]{background-color:var(--widget-primary)}.bg-\[var\(--widget-warning\)\]{background-color:var(--widget-warning)}.bg-black\/20{background-color:#0003}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-unread-indicator{background-color:var(--widget-unread-indicator, #2563eb)}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-widget-background{background-color:var(--widget-background, #ffffff)}.bg-widget-hover{background-color:var(--widget-hover, #f9fafb)}.bg-widget-primary{background-color:var(--widget-primary, #2563eb)}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-widget-primary{--tw-gradient-from: var(--widget-primary, #2563eb) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:8px}.p-2{padding:16px}.p-3{padding:24px}.p-4{padding:32px}.px-1{padding-left:8px;padding-right:8px}.px-1\.5{padding-left:12px;padding-right:12px}.px-2{padding-left:16px;padding-right:16px}.px-3{padding-left:24px;padding-right:24px}.px-4{padding-left:32px;padding-right:32px}.py-1{padding-top:8px;padding-bottom:8px}.py-1\.5{padding-top:12px;padding-bottom:12px}.py-12{padding-top:96px;padding-bottom:96px}.py-2{padding-top:16px;padding-bottom:16px}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:24px;padding-bottom:24px}.py-8{padding-top:64px;padding-bottom:64px}.pb-1{padding-bottom:8px}.pb-1\.5{padding-bottom:12px}.pl-10{padding-left:80px}.pl-3{padding-left:24px}.pr-3{padding-right:24px}.pt-0\.5{padding-top:4px}.pt-2{padding-top:16px}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\[10px\]{font-size:10px}.text-base{font-size:var(--widget-font-size-subject, 14px);line-height:20px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:var(--widget-font-size-body, 13px);line-height:18px}.text-xs{font-size:var(--widget-font-size-timestamp, 12px);line-height:16px}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.text-\[var\(--widget-error\)\]{color:var(--widget-error)}.text-\[var\(--widget-primary\)\]{color:var(--widget-primary)}.text-\[var\(--widget-success\)\]{color:var(--widget-success)}.text-\[var\(--widget-text\)\]{color:var(--widget-text)}.text-\[var\(--widget-text-secondary\)\]{color:var(--widget-text-secondary)}.text-\[var\(--widget-text-tertiary\)\]{color:var(--widget-text-tertiary)}.text-\[var\(--widget-warning\)\]{color:var(--widget-warning)}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-text-primary{color:var(--widget-text, #1f2937)}.text-text-secondary{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-text-tertiary{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-widget-primary{color:var(--widget-primary, #2563eb)}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-80{opacity:.8}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[var\(--widget-shadow-xl\)\]{--tw-shadow-color: var(--widget-shadow-xl);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:ease-in-out;transition-duration:.2s}.transition-all{transition-property:all;transition-timing-function:ease-in-out;transition-duration:.2s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:ease-in-out;transition-duration:.2s}.transition-opacity{transition-property:opacity;transition-timing-function:ease-in-out;transition-duration:.2s}.transition-transform{transition-property:transform;transition-timing-function:ease-in-out;transition-duration:.2s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.placeholder\:text-\[var\(--widget-text-tertiary\)\]::-moz-placeholder{color:var(--widget-text-tertiary)}.placeholder\:text-\[var\(--widget-text-tertiary\)\]::placeholder{color:var(--widget-text-tertiary)}.hover\:bg-\[var\(--widget-bg-hover\)\]:hover{background-color:var(--widget-bg-hover)}.hover\:bg-\[var\(--widget-primary-hover\)\]:hover{background-color:var(--widget-primary-hover)}.hover\:bg-\[var\(--widget-primary-light\)\]:hover{background-color:var(--widget-primary-light)}.hover\:bg-blue-50:hover{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-widget-hover:hover{background-color:var(--widget-hover, #f9fafb)}.hover\:text-\[var\(--widget-primary-hover\)\]:hover{color:var(--widget-primary-hover)}.hover\:text-\[var\(--widget-text\)\]:hover{color:var(--widget-text)}.hover\:text-text-primary:hover{color:var(--widget-text, #1f2937)}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-transparent:focus{border-color:transparent}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-\[var\(--widget-error\)\]:focus{--tw-ring-color: var(--widget-error)}.focus\:ring-\[var\(--widget-primary\)\]:focus{--tw-ring-color: var(--widget-primary)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.focus\:ring-text-secondary:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity, 1))}.focus\:ring-widget-primary:focus{--tw-ring-color: var(--widget-primary, #2563eb)}.focus\:ring-offset-0:focus{--tw-ring-offset-width: 0px}.focus\:ring-offset-1:focus{--tw-ring-offset-width: 1px}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-widget-hover:disabled{background-color:var(--widget-hover, #f9fafb)}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-70:disabled{opacity:.7}.dark\:border-gray-600:is([data-theme=dark] *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.dark\:border-gray-900:is([data-theme=dark] *){--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity, 1))}.dark\:border-t-blue-400:is([data-theme=dark] *){--tw-border-opacity: 1;border-top-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.dark\:bg-gray-600:is([data-theme=dark] *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.dark\:text-gray-400:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:hover\:bg-gray-800:hover:is([data-theme=dark] *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}@media not all and (min-width:640px){.max-sm\:fixed{position:fixed}.max-sm\:inset-x-4{left:32px;right:32px}.max-sm\:bottom-4{bottom:32px}.max-sm\:top-16{top:128px}.max-sm\:max-h-\[calc\(100vh-120px\)\]{max-height:calc(100vh - 120px)}.max-sm\:w-auto{width:auto}.max-sm\:max-w-none{max-width:none}}@media(min-width:768px){.md\:hidden{display:none}}
|
package/dist/index.d.ts
CHANGED
|
@@ -17,12 +17,17 @@ export declare interface BellComponentProps {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export declare interface DeliverySchedule {
|
|
20
|
+
enabled?: boolean;
|
|
20
21
|
timezone: string;
|
|
21
22
|
quietHours: {
|
|
22
23
|
start: string;
|
|
23
24
|
end: string;
|
|
24
25
|
};
|
|
25
26
|
weekdays: boolean[];
|
|
27
|
+
weeklySchedule?: Record<string, {
|
|
28
|
+
start: string;
|
|
29
|
+
end: string;
|
|
30
|
+
}>;
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
declare interface ErrorBoundaryProps {
|