@repzo/widget-react-native 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +482 -0
- package/lib/commonjs/agent-ui-blocks.js +159 -0
- package/lib/commonjs/agent-ui-blocks.js.map +1 -0
- package/lib/commonjs/api/client.js +267 -0
- package/lib/commonjs/api/client.js.map +1 -0
- package/lib/commonjs/api/realtime.js +193 -0
- package/lib/commonjs/api/realtime.js.map +1 -0
- package/lib/commonjs/api/sse-parser.js +58 -0
- package/lib/commonjs/api/sse-parser.js.map +1 -0
- package/lib/commonjs/controller.js +23 -0
- package/lib/commonjs/controller.js.map +1 -0
- package/lib/commonjs/device-id.js +75 -0
- package/lib/commonjs/device-id.js.map +1 -0
- package/lib/commonjs/events.js +49 -0
- package/lib/commonjs/events.js.map +1 -0
- package/lib/commonjs/i18n.js +106 -0
- package/lib/commonjs/i18n.js.map +1 -0
- package/lib/commonjs/index.js +98 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/locales.js +85 -0
- package/lib/commonjs/locales.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/push/push-notifications.js +208 -0
- package/lib/commonjs/push/push-notifications.js.map +1 -0
- package/lib/commonjs/state/use-widget-state.js +23 -0
- package/lib/commonjs/state/use-widget-state.js.map +1 -0
- package/lib/commonjs/state/widget-store.js +1682 -0
- package/lib/commonjs/state/widget-store.js.map +1 -0
- package/lib/commonjs/storage.js +147 -0
- package/lib/commonjs/storage.js.map +1 -0
- package/lib/commonjs/types.js +44 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/commonjs/ui/WidgetProvider.js +404 -0
- package/lib/commonjs/ui/WidgetProvider.js.map +1 -0
- package/lib/commonjs/ui/components/AgentUiBlocks.js +864 -0
- package/lib/commonjs/ui/components/AgentUiBlocks.js.map +1 -0
- package/lib/commonjs/ui/components/Avatar.js +76 -0
- package/lib/commonjs/ui/components/Avatar.js.map +1 -0
- package/lib/commonjs/ui/components/ConversationRow.js +155 -0
- package/lib/commonjs/ui/components/ConversationRow.js.map +1 -0
- package/lib/commonjs/ui/components/ErrorBoundary.js +44 -0
- package/lib/commonjs/ui/components/ErrorBoundary.js.map +1 -0
- package/lib/commonjs/ui/components/Gradient.js +168 -0
- package/lib/commonjs/ui/components/Gradient.js.map +1 -0
- package/lib/commonjs/ui/components/Launcher.js +125 -0
- package/lib/commonjs/ui/components/Launcher.js.map +1 -0
- package/lib/commonjs/ui/components/Markdown.js +257 -0
- package/lib/commonjs/ui/components/Markdown.js.map +1 -0
- package/lib/commonjs/ui/components/OutboundMessageCard.js +157 -0
- package/lib/commonjs/ui/components/OutboundMessageCard.js.map +1 -0
- package/lib/commonjs/ui/components/WidgetPanel.js +131 -0
- package/lib/commonjs/ui/components/WidgetPanel.js.map +1 -0
- package/lib/commonjs/ui/components/icons.js +383 -0
- package/lib/commonjs/ui/components/icons.js.map +1 -0
- package/lib/commonjs/ui/hooks/use-keyboard-overlap.js +113 -0
- package/lib/commonjs/ui/hooks/use-keyboard-overlap.js.map +1 -0
- package/lib/commonjs/ui/hooks/use-reduce-motion.js +38 -0
- package/lib/commonjs/ui/hooks/use-reduce-motion.js.map +1 -0
- package/lib/commonjs/ui/hooks/use-widget-insets.js +41 -0
- package/lib/commonjs/ui/hooks/use-widget-insets.js.map +1 -0
- package/lib/commonjs/ui/screens/chat/ChatView.js +590 -0
- package/lib/commonjs/ui/screens/chat/ChatView.js.map +1 -0
- package/lib/commonjs/ui/screens/chat/ChatView.styles.js +362 -0
- package/lib/commonjs/ui/screens/chat/ChatView.styles.js.map +1 -0
- package/lib/commonjs/ui/screens/chat/ChatView.types.js +6 -0
- package/lib/commonjs/ui/screens/chat/ChatView.types.js.map +1 -0
- package/lib/commonjs/ui/screens/conversations/ConversationsList.js +150 -0
- package/lib/commonjs/ui/screens/conversations/ConversationsList.js.map +1 -0
- package/lib/commonjs/ui/screens/conversations/ConversationsList.styles.js +118 -0
- package/lib/commonjs/ui/screens/conversations/ConversationsList.styles.js.map +1 -0
- package/lib/commonjs/ui/screens/conversations/ConversationsList.types.js +6 -0
- package/lib/commonjs/ui/screens/conversations/ConversationsList.types.js.map +1 -0
- package/lib/commonjs/ui/screens/home/HomeView.js +336 -0
- package/lib/commonjs/ui/screens/home/HomeView.js.map +1 -0
- package/lib/commonjs/ui/screens/home/HomeView.styles.js +245 -0
- package/lib/commonjs/ui/screens/home/HomeView.styles.js.map +1 -0
- package/lib/commonjs/ui/screens/home/HomeView.types.js +6 -0
- package/lib/commonjs/ui/screens/home/HomeView.types.js.map +1 -0
- package/lib/commonjs/ui/screens/home/greeting.js +49 -0
- package/lib/commonjs/ui/screens/home/greeting.js.map +1 -0
- package/lib/commonjs/ui/screens/pre-chat/PreChatForm.js +229 -0
- package/lib/commonjs/ui/screens/pre-chat/PreChatForm.js.map +1 -0
- package/lib/commonjs/ui/screens/pre-chat/PreChatForm.styles.js +125 -0
- package/lib/commonjs/ui/screens/pre-chat/PreChatForm.styles.js.map +1 -0
- package/lib/commonjs/ui/screens/pre-chat/PreChatForm.types.js +6 -0
- package/lib/commonjs/ui/screens/pre-chat/PreChatForm.types.js.map +1 -0
- package/lib/commonjs/ui/styles/global.js +55 -0
- package/lib/commonjs/ui/styles/global.js.map +1 -0
- package/lib/commonjs/ui/styles/theme.js +148 -0
- package/lib/commonjs/ui/styles/theme.js.map +1 -0
- package/lib/commonjs/ui/utils/conversations.js +125 -0
- package/lib/commonjs/ui/utils/conversations.js.map +1 -0
- package/lib/commonjs/ui/utils/html.js +44 -0
- package/lib/commonjs/ui/utils/html.js.map +1 -0
- package/lib/commonjs/ui/utils/native-gradient.js +65 -0
- package/lib/commonjs/ui/utils/native-gradient.js.map +1 -0
- package/lib/commonjs/ui/utils/rtl.js +56 -0
- package/lib/commonjs/ui/utils/rtl.js.map +1 -0
- package/lib/commonjs/ui/utils/safe-url.js +67 -0
- package/lib/commonjs/ui/utils/safe-url.js.map +1 -0
- package/lib/module/agent-ui-blocks.js +152 -0
- package/lib/module/agent-ui-blocks.js.map +1 -0
- package/lib/module/api/client.js +261 -0
- package/lib/module/api/client.js.map +1 -0
- package/lib/module/api/realtime.js +189 -0
- package/lib/module/api/realtime.js.map +1 -0
- package/lib/module/api/sse-parser.js +53 -0
- package/lib/module/api/sse-parser.js.map +1 -0
- package/lib/module/controller.js +19 -0
- package/lib/module/controller.js.map +1 -0
- package/lib/module/device-id.js +69 -0
- package/lib/module/device-id.js.map +1 -0
- package/lib/module/events.js +44 -0
- package/lib/module/events.js.map +1 -0
- package/lib/module/i18n.js +99 -0
- package/lib/module/i18n.js.map +1 -0
- package/lib/module/index.js +55 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/locales.js +80 -0
- package/lib/module/locales.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/push/push-notifications.js +204 -0
- package/lib/module/push/push-notifications.js.map +1 -0
- package/lib/module/state/use-widget-state.js +18 -0
- package/lib/module/state/use-widget-state.js.map +1 -0
- package/lib/module/state/widget-store.js +1677 -0
- package/lib/module/state/widget-store.js.map +1 -0
- package/lib/module/storage.js +141 -0
- package/lib/module/storage.js.map +1 -0
- package/lib/module/types.js +40 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/ui/WidgetProvider.js +400 -0
- package/lib/module/ui/WidgetProvider.js.map +1 -0
- package/lib/module/ui/components/AgentUiBlocks.js +857 -0
- package/lib/module/ui/components/AgentUiBlocks.js.map +1 -0
- package/lib/module/ui/components/Avatar.js +71 -0
- package/lib/module/ui/components/Avatar.js.map +1 -0
- package/lib/module/ui/components/ConversationRow.js +150 -0
- package/lib/module/ui/components/ConversationRow.js.map +1 -0
- package/lib/module/ui/components/ErrorBoundary.js +39 -0
- package/lib/module/ui/components/ErrorBoundary.js.map +1 -0
- package/lib/module/ui/components/Gradient.js +165 -0
- package/lib/module/ui/components/Gradient.js.map +1 -0
- package/lib/module/ui/components/Launcher.js +121 -0
- package/lib/module/ui/components/Launcher.js.map +1 -0
- package/lib/module/ui/components/Markdown.js +253 -0
- package/lib/module/ui/components/Markdown.js.map +1 -0
- package/lib/module/ui/components/OutboundMessageCard.js +153 -0
- package/lib/module/ui/components/OutboundMessageCard.js.map +1 -0
- package/lib/module/ui/components/WidgetPanel.js +127 -0
- package/lib/module/ui/components/WidgetPanel.js.map +1 -0
- package/lib/module/ui/components/icons.js +370 -0
- package/lib/module/ui/components/icons.js.map +1 -0
- package/lib/module/ui/hooks/use-keyboard-overlap.js +109 -0
- package/lib/module/ui/hooks/use-keyboard-overlap.js.map +1 -0
- package/lib/module/ui/hooks/use-reduce-motion.js +34 -0
- package/lib/module/ui/hooks/use-reduce-motion.js.map +1 -0
- package/lib/module/ui/hooks/use-widget-insets.js +37 -0
- package/lib/module/ui/hooks/use-widget-insets.js.map +1 -0
- package/lib/module/ui/screens/chat/ChatView.js +586 -0
- package/lib/module/ui/screens/chat/ChatView.js.map +1 -0
- package/lib/module/ui/screens/chat/ChatView.styles.js +358 -0
- package/lib/module/ui/screens/chat/ChatView.styles.js.map +1 -0
- package/lib/module/ui/screens/chat/ChatView.types.js +4 -0
- package/lib/module/ui/screens/chat/ChatView.types.js.map +1 -0
- package/lib/module/ui/screens/conversations/ConversationsList.js +146 -0
- package/lib/module/ui/screens/conversations/ConversationsList.js.map +1 -0
- package/lib/module/ui/screens/conversations/ConversationsList.styles.js +114 -0
- package/lib/module/ui/screens/conversations/ConversationsList.styles.js.map +1 -0
- package/lib/module/ui/screens/conversations/ConversationsList.types.js +4 -0
- package/lib/module/ui/screens/conversations/ConversationsList.types.js.map +1 -0
- package/lib/module/ui/screens/home/HomeView.js +332 -0
- package/lib/module/ui/screens/home/HomeView.js.map +1 -0
- package/lib/module/ui/screens/home/HomeView.styles.js +242 -0
- package/lib/module/ui/screens/home/HomeView.styles.js.map +1 -0
- package/lib/module/ui/screens/home/HomeView.types.js +4 -0
- package/lib/module/ui/screens/home/HomeView.types.js.map +1 -0
- package/lib/module/ui/screens/home/greeting.js +44 -0
- package/lib/module/ui/screens/home/greeting.js.map +1 -0
- package/lib/module/ui/screens/pre-chat/PreChatForm.js +225 -0
- package/lib/module/ui/screens/pre-chat/PreChatForm.js.map +1 -0
- package/lib/module/ui/screens/pre-chat/PreChatForm.styles.js +121 -0
- package/lib/module/ui/screens/pre-chat/PreChatForm.styles.js.map +1 -0
- package/lib/module/ui/screens/pre-chat/PreChatForm.types.js +4 -0
- package/lib/module/ui/screens/pre-chat/PreChatForm.types.js.map +1 -0
- package/lib/module/ui/styles/global.js +51 -0
- package/lib/module/ui/styles/global.js.map +1 -0
- package/lib/module/ui/styles/theme.js +137 -0
- package/lib/module/ui/styles/theme.js.map +1 -0
- package/lib/module/ui/utils/conversations.js +115 -0
- package/lib/module/ui/utils/conversations.js.map +1 -0
- package/lib/module/ui/utils/html.js +39 -0
- package/lib/module/ui/utils/html.js.map +1 -0
- package/lib/module/ui/utils/native-gradient.js +60 -0
- package/lib/module/ui/utils/native-gradient.js.map +1 -0
- package/lib/module/ui/utils/rtl.js +49 -0
- package/lib/module/ui/utils/rtl.js.map +1 -0
- package/lib/module/ui/utils/safe-url.js +59 -0
- package/lib/module/ui/utils/safe-url.js.map +1 -0
- package/lib/typescript/commonjs/agent-ui-blocks.d.ts +20 -0
- package/lib/typescript/commonjs/agent-ui-blocks.d.ts.map +1 -0
- package/lib/typescript/commonjs/api/client.d.ts +115 -0
- package/lib/typescript/commonjs/api/client.d.ts.map +1 -0
- package/lib/typescript/commonjs/api/realtime.d.ts +39 -0
- package/lib/typescript/commonjs/api/realtime.d.ts.map +1 -0
- package/lib/typescript/commonjs/api/sse-parser.d.ts +13 -0
- package/lib/typescript/commonjs/api/sse-parser.d.ts.map +1 -0
- package/lib/typescript/commonjs/controller.d.ts +15 -0
- package/lib/typescript/commonjs/controller.d.ts.map +1 -0
- package/lib/typescript/commonjs/device-id.d.ts +15 -0
- package/lib/typescript/commonjs/device-id.d.ts.map +1 -0
- package/lib/typescript/commonjs/events.d.ts +41 -0
- package/lib/typescript/commonjs/events.d.ts.map +1 -0
- package/lib/typescript/commonjs/i18n.d.ts +78 -0
- package/lib/typescript/commonjs/i18n.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +103 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/locales.d.ts +18 -0
- package/lib/typescript/commonjs/locales.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/push/push-notifications.d.ts +71 -0
- package/lib/typescript/commonjs/push/push-notifications.d.ts.map +1 -0
- package/lib/typescript/commonjs/state/use-widget-state.d.ts +10 -0
- package/lib/typescript/commonjs/state/use-widget-state.d.ts.map +1 -0
- package/lib/typescript/commonjs/state/widget-store.d.ts +227 -0
- package/lib/typescript/commonjs/state/widget-store.d.ts.map +1 -0
- package/lib/typescript/commonjs/storage.d.ts +42 -0
- package/lib/typescript/commonjs/storage.d.ts.map +1 -0
- package/lib/typescript/commonjs/types.d.ts +391 -0
- package/lib/typescript/commonjs/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/WidgetProvider.d.ts +15 -0
- package/lib/typescript/commonjs/ui/WidgetProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/AgentUiBlocks.d.ts +27 -0
- package/lib/typescript/commonjs/ui/components/AgentUiBlocks.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/Avatar.d.ts +19 -0
- package/lib/typescript/commonjs/ui/components/Avatar.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ConversationRow.d.ts +26 -0
- package/lib/typescript/commonjs/ui/components/ConversationRow.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ErrorBoundary.d.ts +27 -0
- package/lib/typescript/commonjs/ui/components/ErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/Gradient.d.ts +33 -0
- package/lib/typescript/commonjs/ui/components/Gradient.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/Launcher.d.ts +18 -0
- package/lib/typescript/commonjs/ui/components/Launcher.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/Markdown.d.ts +19 -0
- package/lib/typescript/commonjs/ui/components/Markdown.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/OutboundMessageCard.d.ts +20 -0
- package/lib/typescript/commonjs/ui/components/OutboundMessageCard.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/WidgetPanel.d.ts +26 -0
- package/lib/typescript/commonjs/ui/components/WidgetPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/icons.d.ts +38 -0
- package/lib/typescript/commonjs/ui/components/icons.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/use-keyboard-overlap.d.ts +33 -0
- package/lib/typescript/commonjs/ui/hooks/use-keyboard-overlap.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/use-reduce-motion.d.ts +11 -0
- package/lib/typescript/commonjs/ui/hooks/use-reduce-motion.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/use-widget-insets.d.ts +16 -0
- package/lib/typescript/commonjs/ui/hooks/use-widget-insets.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/chat/ChatView.d.ts +11 -0
- package/lib/typescript/commonjs/ui/screens/chat/ChatView.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/chat/ChatView.styles.d.ts +349 -0
- package/lib/typescript/commonjs/ui/screens/chat/ChatView.styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/chat/ChatView.types.d.ts +48 -0
- package/lib/typescript/commonjs/ui/screens/chat/ChatView.types.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/conversations/ConversationsList.d.ts +10 -0
- package/lib/typescript/commonjs/ui/screens/conversations/ConversationsList.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/conversations/ConversationsList.styles.d.ts +113 -0
- package/lib/typescript/commonjs/ui/screens/conversations/ConversationsList.styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/conversations/ConversationsList.types.d.ts +31 -0
- package/lib/typescript/commonjs/ui/screens/conversations/ConversationsList.types.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/home/HomeView.d.ts +17 -0
- package/lib/typescript/commonjs/ui/screens/home/HomeView.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/home/HomeView.styles.d.ts +227 -0
- package/lib/typescript/commonjs/ui/screens/home/HomeView.styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/home/HomeView.types.d.ts +40 -0
- package/lib/typescript/commonjs/ui/screens/home/HomeView.types.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/home/greeting.d.ts +19 -0
- package/lib/typescript/commonjs/ui/screens/home/greeting.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/pre-chat/PreChatForm.d.ts +7 -0
- package/lib/typescript/commonjs/ui/screens/pre-chat/PreChatForm.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/pre-chat/PreChatForm.styles.d.ts +115 -0
- package/lib/typescript/commonjs/ui/screens/pre-chat/PreChatForm.styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/pre-chat/PreChatForm.types.d.ts +20 -0
- package/lib/typescript/commonjs/ui/screens/pre-chat/PreChatForm.types.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/styles/global.d.ts +46 -0
- package/lib/typescript/commonjs/ui/styles/global.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/styles/theme.d.ts +103 -0
- package/lib/typescript/commonjs/ui/styles/theme.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/conversations.d.ts +41 -0
- package/lib/typescript/commonjs/ui/utils/conversations.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/html.d.ts +10 -0
- package/lib/typescript/commonjs/ui/utils/html.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/native-gradient.d.ts +61 -0
- package/lib/typescript/commonjs/ui/utils/native-gradient.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/rtl.d.ts +33 -0
- package/lib/typescript/commonjs/ui/utils/rtl.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/safe-url.d.ts +21 -0
- package/lib/typescript/commonjs/ui/utils/safe-url.d.ts.map +1 -0
- package/lib/typescript/module/agent-ui-blocks.d.ts +20 -0
- package/lib/typescript/module/agent-ui-blocks.d.ts.map +1 -0
- package/lib/typescript/module/api/client.d.ts +115 -0
- package/lib/typescript/module/api/client.d.ts.map +1 -0
- package/lib/typescript/module/api/realtime.d.ts +39 -0
- package/lib/typescript/module/api/realtime.d.ts.map +1 -0
- package/lib/typescript/module/api/sse-parser.d.ts +13 -0
- package/lib/typescript/module/api/sse-parser.d.ts.map +1 -0
- package/lib/typescript/module/controller.d.ts +15 -0
- package/lib/typescript/module/controller.d.ts.map +1 -0
- package/lib/typescript/module/device-id.d.ts +15 -0
- package/lib/typescript/module/device-id.d.ts.map +1 -0
- package/lib/typescript/module/events.d.ts +41 -0
- package/lib/typescript/module/events.d.ts.map +1 -0
- package/lib/typescript/module/i18n.d.ts +78 -0
- package/lib/typescript/module/i18n.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +103 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/locales.d.ts +18 -0
- package/lib/typescript/module/locales.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/push/push-notifications.d.ts +71 -0
- package/lib/typescript/module/push/push-notifications.d.ts.map +1 -0
- package/lib/typescript/module/state/use-widget-state.d.ts +10 -0
- package/lib/typescript/module/state/use-widget-state.d.ts.map +1 -0
- package/lib/typescript/module/state/widget-store.d.ts +227 -0
- package/lib/typescript/module/state/widget-store.d.ts.map +1 -0
- package/lib/typescript/module/storage.d.ts +42 -0
- package/lib/typescript/module/storage.d.ts.map +1 -0
- package/lib/typescript/module/types.d.ts +391 -0
- package/lib/typescript/module/types.d.ts.map +1 -0
- package/lib/typescript/module/ui/WidgetProvider.d.ts +15 -0
- package/lib/typescript/module/ui/WidgetProvider.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/AgentUiBlocks.d.ts +27 -0
- package/lib/typescript/module/ui/components/AgentUiBlocks.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/Avatar.d.ts +19 -0
- package/lib/typescript/module/ui/components/Avatar.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ConversationRow.d.ts +26 -0
- package/lib/typescript/module/ui/components/ConversationRow.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ErrorBoundary.d.ts +27 -0
- package/lib/typescript/module/ui/components/ErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/Gradient.d.ts +33 -0
- package/lib/typescript/module/ui/components/Gradient.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/Launcher.d.ts +18 -0
- package/lib/typescript/module/ui/components/Launcher.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/Markdown.d.ts +19 -0
- package/lib/typescript/module/ui/components/Markdown.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/OutboundMessageCard.d.ts +20 -0
- package/lib/typescript/module/ui/components/OutboundMessageCard.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/WidgetPanel.d.ts +26 -0
- package/lib/typescript/module/ui/components/WidgetPanel.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/icons.d.ts +38 -0
- package/lib/typescript/module/ui/components/icons.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/use-keyboard-overlap.d.ts +33 -0
- package/lib/typescript/module/ui/hooks/use-keyboard-overlap.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/use-reduce-motion.d.ts +11 -0
- package/lib/typescript/module/ui/hooks/use-reduce-motion.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/use-widget-insets.d.ts +16 -0
- package/lib/typescript/module/ui/hooks/use-widget-insets.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/chat/ChatView.d.ts +11 -0
- package/lib/typescript/module/ui/screens/chat/ChatView.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/chat/ChatView.styles.d.ts +349 -0
- package/lib/typescript/module/ui/screens/chat/ChatView.styles.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/chat/ChatView.types.d.ts +48 -0
- package/lib/typescript/module/ui/screens/chat/ChatView.types.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/conversations/ConversationsList.d.ts +10 -0
- package/lib/typescript/module/ui/screens/conversations/ConversationsList.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/conversations/ConversationsList.styles.d.ts +113 -0
- package/lib/typescript/module/ui/screens/conversations/ConversationsList.styles.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/conversations/ConversationsList.types.d.ts +31 -0
- package/lib/typescript/module/ui/screens/conversations/ConversationsList.types.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/home/HomeView.d.ts +17 -0
- package/lib/typescript/module/ui/screens/home/HomeView.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/home/HomeView.styles.d.ts +227 -0
- package/lib/typescript/module/ui/screens/home/HomeView.styles.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/home/HomeView.types.d.ts +40 -0
- package/lib/typescript/module/ui/screens/home/HomeView.types.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/home/greeting.d.ts +19 -0
- package/lib/typescript/module/ui/screens/home/greeting.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/pre-chat/PreChatForm.d.ts +7 -0
- package/lib/typescript/module/ui/screens/pre-chat/PreChatForm.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/pre-chat/PreChatForm.styles.d.ts +115 -0
- package/lib/typescript/module/ui/screens/pre-chat/PreChatForm.styles.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/pre-chat/PreChatForm.types.d.ts +20 -0
- package/lib/typescript/module/ui/screens/pre-chat/PreChatForm.types.d.ts.map +1 -0
- package/lib/typescript/module/ui/styles/global.d.ts +46 -0
- package/lib/typescript/module/ui/styles/global.d.ts.map +1 -0
- package/lib/typescript/module/ui/styles/theme.d.ts +103 -0
- package/lib/typescript/module/ui/styles/theme.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/conversations.d.ts +41 -0
- package/lib/typescript/module/ui/utils/conversations.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/html.d.ts +10 -0
- package/lib/typescript/module/ui/utils/html.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/native-gradient.d.ts +61 -0
- package/lib/typescript/module/ui/utils/native-gradient.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/rtl.d.ts +33 -0
- package/lib/typescript/module/ui/utils/rtl.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/safe-url.d.ts +21 -0
- package/lib/typescript/module/ui/utils/safe-url.d.ts.map +1 -0
- package/metro.js +40 -0
- package/package.json +116 -0
- package/src/agent-ui-blocks.ts +302 -0
- package/src/api/client.ts +332 -0
- package/src/api/realtime.ts +225 -0
- package/src/api/sse-parser.ts +51 -0
- package/src/controller.ts +20 -0
- package/src/device-id.ts +71 -0
- package/src/events.ts +74 -0
- package/src/i18n.ts +114 -0
- package/src/index.tsx +199 -0
- package/src/locales.ts +80 -0
- package/src/push/push-notifications.ts +254 -0
- package/src/state/use-widget-state.ts +20 -0
- package/src/state/widget-store.ts +1815 -0
- package/src/storage.ts +153 -0
- package/src/types.ts +445 -0
- package/src/ui/WidgetProvider.tsx +434 -0
- package/src/ui/components/AgentUiBlocks.tsx +912 -0
- package/src/ui/components/Avatar.tsx +86 -0
- package/src/ui/components/ConversationRow.tsx +163 -0
- package/src/ui/components/ErrorBoundary.tsx +49 -0
- package/src/ui/components/Gradient.tsx +165 -0
- package/src/ui/components/Launcher.tsx +128 -0
- package/src/ui/components/Markdown.tsx +291 -0
- package/src/ui/components/OutboundMessageCard.tsx +154 -0
- package/src/ui/components/WidgetPanel.tsx +133 -0
- package/src/ui/components/icons.tsx +315 -0
- package/src/ui/hooks/use-keyboard-overlap.ts +134 -0
- package/src/ui/hooks/use-reduce-motion.ts +39 -0
- package/src/ui/hooks/use-widget-insets.ts +44 -0
- package/src/ui/screens/chat/ChatView.styles.ts +357 -0
- package/src/ui/screens/chat/ChatView.tsx +690 -0
- package/src/ui/screens/chat/ChatView.types.ts +46 -0
- package/src/ui/screens/conversations/ConversationsList.styles.ts +111 -0
- package/src/ui/screens/conversations/ConversationsList.tsx +144 -0
- package/src/ui/screens/conversations/ConversationsList.types.ts +33 -0
- package/src/ui/screens/home/HomeView.styles.ts +246 -0
- package/src/ui/screens/home/HomeView.tsx +336 -0
- package/src/ui/screens/home/HomeView.types.ts +42 -0
- package/src/ui/screens/home/greeting.ts +50 -0
- package/src/ui/screens/pre-chat/PreChatForm.styles.ts +120 -0
- package/src/ui/screens/pre-chat/PreChatForm.tsx +221 -0
- package/src/ui/screens/pre-chat/PreChatForm.types.ts +22 -0
- package/src/ui/styles/global.ts +50 -0
- package/src/ui/styles/theme.ts +155 -0
- package/src/ui/utils/conversations.ts +122 -0
- package/src/ui/utils/html.ts +58 -0
- package/src/ui/utils/native-gradient.ts +60 -0
- package/src/ui/utils/rtl.ts +43 -0
- package/src/ui/utils/safe-url.ts +63 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/** Styles for the Messages space: centered header, row list and the floating pill. */
|
|
2
|
+
export declare const styles: {
|
|
3
|
+
header: {
|
|
4
|
+
alignItems: "center";
|
|
5
|
+
justifyContent: "center";
|
|
6
|
+
paddingHorizontal: number;
|
|
7
|
+
paddingTop: 16;
|
|
8
|
+
paddingBottom: 12;
|
|
9
|
+
borderBottomWidth: number;
|
|
10
|
+
borderBottomColor: "#f3f4f6";
|
|
11
|
+
};
|
|
12
|
+
headerCopy: {
|
|
13
|
+
alignItems: "center";
|
|
14
|
+
gap: number;
|
|
15
|
+
};
|
|
16
|
+
title: {
|
|
17
|
+
fontSize: 17;
|
|
18
|
+
fontWeight: "600";
|
|
19
|
+
color: "#1a1a1a";
|
|
20
|
+
};
|
|
21
|
+
statusLine: {
|
|
22
|
+
flexDirection: "row";
|
|
23
|
+
alignItems: "center";
|
|
24
|
+
gap: number;
|
|
25
|
+
};
|
|
26
|
+
statusDot: {
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
borderRadius: number;
|
|
30
|
+
};
|
|
31
|
+
statusText: {
|
|
32
|
+
fontSize: 12;
|
|
33
|
+
color: "#6b7280";
|
|
34
|
+
};
|
|
35
|
+
close: {
|
|
36
|
+
position: "absolute";
|
|
37
|
+
end: 16;
|
|
38
|
+
top: number;
|
|
39
|
+
bottom: number;
|
|
40
|
+
justifyContent: "center";
|
|
41
|
+
paddingHorizontal: 4;
|
|
42
|
+
};
|
|
43
|
+
listContent: {
|
|
44
|
+
flexGrow: number;
|
|
45
|
+
};
|
|
46
|
+
listContentEmpty: {
|
|
47
|
+
justifyContent: "center";
|
|
48
|
+
};
|
|
49
|
+
divider: {
|
|
50
|
+
marginStart: number;
|
|
51
|
+
};
|
|
52
|
+
empty: {
|
|
53
|
+
alignItems: "center";
|
|
54
|
+
paddingHorizontal: 24;
|
|
55
|
+
paddingVertical: number;
|
|
56
|
+
};
|
|
57
|
+
emptyIcon: {
|
|
58
|
+
width: number;
|
|
59
|
+
height: number;
|
|
60
|
+
borderRadius: number;
|
|
61
|
+
alignItems: "center";
|
|
62
|
+
justifyContent: "center";
|
|
63
|
+
marginBottom: 16;
|
|
64
|
+
};
|
|
65
|
+
emptyTitle: {
|
|
66
|
+
fontSize: 15;
|
|
67
|
+
fontWeight: "600";
|
|
68
|
+
color: "#1a1a1a";
|
|
69
|
+
textAlign: "center";
|
|
70
|
+
};
|
|
71
|
+
emptySubtitle: {
|
|
72
|
+
fontSize: 13;
|
|
73
|
+
color: "#9ca3af";
|
|
74
|
+
marginTop: 4;
|
|
75
|
+
textAlign: "center";
|
|
76
|
+
};
|
|
77
|
+
fabWrapper: {
|
|
78
|
+
position: "absolute";
|
|
79
|
+
left: number;
|
|
80
|
+
right: number;
|
|
81
|
+
bottom: 16;
|
|
82
|
+
alignItems: "center";
|
|
83
|
+
};
|
|
84
|
+
fab: {
|
|
85
|
+
shadowColor: "#000000";
|
|
86
|
+
shadowOffset: {
|
|
87
|
+
readonly width: 0;
|
|
88
|
+
readonly height: 4;
|
|
89
|
+
};
|
|
90
|
+
shadowOpacity: 0.15;
|
|
91
|
+
shadowRadius: 12;
|
|
92
|
+
elevation: 6;
|
|
93
|
+
flexDirection: "row";
|
|
94
|
+
alignItems: "center";
|
|
95
|
+
gap: 8;
|
|
96
|
+
minHeight: number;
|
|
97
|
+
paddingHorizontal: 20;
|
|
98
|
+
paddingVertical: 12;
|
|
99
|
+
borderRadius: 999;
|
|
100
|
+
};
|
|
101
|
+
fabPressed: {
|
|
102
|
+
opacity: number;
|
|
103
|
+
transform: {
|
|
104
|
+
scale: number;
|
|
105
|
+
}[];
|
|
106
|
+
};
|
|
107
|
+
fabLabel: {
|
|
108
|
+
color: "#ffffff";
|
|
109
|
+
fontSize: 13;
|
|
110
|
+
fontWeight: "600";
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=ConversationsList.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConversationsList.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/conversations/ConversationsList.styles.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAOtF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuGjB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Props and label bundle for the Messages space. */
|
|
2
|
+
import type { Conversation } from '../../../types';
|
|
3
|
+
import type { RelativeTimeLabels } from '../../utils/conversations';
|
|
4
|
+
export interface ConversationsListLabels {
|
|
5
|
+
messages: string;
|
|
6
|
+
noMessages: string;
|
|
7
|
+
historyHidden: string;
|
|
8
|
+
startBelow: string;
|
|
9
|
+
close: string;
|
|
10
|
+
team: string;
|
|
11
|
+
statusOnline: string;
|
|
12
|
+
statusAway: string;
|
|
13
|
+
time: RelativeTimeLabels;
|
|
14
|
+
/** Template with a `{count}` token. */
|
|
15
|
+
unread: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ConversationsListProps {
|
|
18
|
+
conversations: Conversation[];
|
|
19
|
+
unreadByConversation: Record<string, number>;
|
|
20
|
+
color: string;
|
|
21
|
+
allowNewConversations: boolean;
|
|
22
|
+
showPreviousConversations: boolean;
|
|
23
|
+
isOnline: boolean;
|
|
24
|
+
startConversationLabel: string;
|
|
25
|
+
labels: ConversationsListLabels;
|
|
26
|
+
onSelect: (conversationId: string) => void;
|
|
27
|
+
onNewConversation: () => void;
|
|
28
|
+
onRefresh: () => Promise<void> | void;
|
|
29
|
+
onClose: () => void;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=ConversationsList.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConversationsList.types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/conversations/ConversationsList.types.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,kBAAkB,CAAC;IACzB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB,EAAE,OAAO,CAAC;IAC/B,yBAAyB,EAAE,OAAO,CAAC;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,MAAM,EAAE,uBAAuB,CAAC;IAChC,QAAQ,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Home space — branded greeting header, the "start a conversation" card, a
|
|
3
|
+
* preview of recent threads and a team/availability strip.
|
|
4
|
+
* Port of `client/src/widget/components/HomeView.tsx`.
|
|
5
|
+
*
|
|
6
|
+
* The header meets the white body on a straight seam, the same as the web
|
|
7
|
+
* widget. Whether that seam is a hard edge or the background washing out into
|
|
8
|
+
* white is the dashboard's `homeBackgroundFade` toggle, and the start card sits
|
|
9
|
+
* astride it either way: top over the brand background, bottom over white.
|
|
10
|
+
*
|
|
11
|
+
* Everything on this screen comes from the widget config or the conversations
|
|
12
|
+
* the visitor already has; nothing here assumes a field the backend does not
|
|
13
|
+
* send today.
|
|
14
|
+
*/
|
|
15
|
+
import type { HomeViewProps } from './HomeView.types';
|
|
16
|
+
export declare function HomeView({ config, color, visitorName, conversationCount, recentConversations, unreadByConversation, teamAgents, isOnline, offlineMessage, startConversationLabel, replyTimeLabel, allowNewConversations, showPreviousConversations, labels, onClose, onStartConversation, onViewConversations, onOpenConversation, }: HomeViewProps): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=HomeView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HomeView.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/home/HomeView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAqCH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAiBtD,wBAAgB,QAAQ,CAAC,EACvB,MAAM,EACN,KAAK,EACL,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,UAAU,EACV,QAAQ,EACR,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,qBAAqB,EACrB,yBAAyB,EACzB,MAAM,EACN,OAAO,EACP,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,GACnB,EAAE,aAAa,+BAkNf"}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Styles and layout constants for the Home space. The constants live next to
|
|
3
|
+
* the sheet so the component and the styles can never disagree about them.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Header geometry in dp, measured off the web widget so the two surfaces line
|
|
7
|
+
* up: a tall header with the greeting pinned low, a start card that overhangs
|
|
8
|
+
* the seam by a fixed amount rather than half its height, and a fade that is a
|
|
9
|
+
* straight white ramp over the bottom of the header, starting just under the
|
|
10
|
+
* heading.
|
|
11
|
+
*/
|
|
12
|
+
export declare const HEADER_MIN_HEIGHT = 228;
|
|
13
|
+
/** Between the greeting and whatever comes next: the seam, or the start card. */
|
|
14
|
+
export declare const HEADER_BOTTOM_PADDING = 36;
|
|
15
|
+
export declare const START_CARD_LIFT = 28;
|
|
16
|
+
export declare const START_CARD_MIN_HEIGHT = 76;
|
|
17
|
+
export declare const HEADER_FADE_HEIGHT = 90;
|
|
18
|
+
export declare const CLOSE_BUTTON_SIZE = 28;
|
|
19
|
+
export declare const CLOSE_ICON_SIZE = 14;
|
|
20
|
+
export declare const styles: {
|
|
21
|
+
contentContainer: {
|
|
22
|
+
flexGrow: number;
|
|
23
|
+
};
|
|
24
|
+
header: {
|
|
25
|
+
minHeight: number;
|
|
26
|
+
paddingHorizontal: 20;
|
|
27
|
+
paddingTop: 20;
|
|
28
|
+
paddingBottom: number;
|
|
29
|
+
overflow: "hidden";
|
|
30
|
+
};
|
|
31
|
+
imageScrim: {
|
|
32
|
+
backgroundColor: string;
|
|
33
|
+
position: "absolute";
|
|
34
|
+
left: 0;
|
|
35
|
+
right: 0;
|
|
36
|
+
top: 0;
|
|
37
|
+
bottom: 0;
|
|
38
|
+
};
|
|
39
|
+
headerTop: {
|
|
40
|
+
flexDirection: "row";
|
|
41
|
+
alignItems: "flex-start";
|
|
42
|
+
justifyContent: "space-between";
|
|
43
|
+
minHeight: number;
|
|
44
|
+
};
|
|
45
|
+
headerSpacer: {
|
|
46
|
+
flex: number;
|
|
47
|
+
minHeight: number;
|
|
48
|
+
};
|
|
49
|
+
logo: {
|
|
50
|
+
width: number;
|
|
51
|
+
height: number;
|
|
52
|
+
};
|
|
53
|
+
closeButton: {
|
|
54
|
+
marginStart: "auto";
|
|
55
|
+
padding: number;
|
|
56
|
+
borderRadius: 999;
|
|
57
|
+
backgroundColor: string;
|
|
58
|
+
};
|
|
59
|
+
heading: {
|
|
60
|
+
textAlign: "left" | "right";
|
|
61
|
+
fontSize: 28;
|
|
62
|
+
lineHeight: number;
|
|
63
|
+
fontWeight: "600";
|
|
64
|
+
marginBottom: 12;
|
|
65
|
+
};
|
|
66
|
+
subheading: {
|
|
67
|
+
textAlign: "left" | "right";
|
|
68
|
+
fontSize: 15;
|
|
69
|
+
lineHeight: number;
|
|
70
|
+
};
|
|
71
|
+
body: {
|
|
72
|
+
flex: number;
|
|
73
|
+
backgroundColor: "#ffffff";
|
|
74
|
+
paddingHorizontal: 20;
|
|
75
|
+
paddingBottom: 24;
|
|
76
|
+
};
|
|
77
|
+
bodyContent: {
|
|
78
|
+
flex: number;
|
|
79
|
+
paddingTop: 20;
|
|
80
|
+
};
|
|
81
|
+
offlineNotice: {
|
|
82
|
+
flexDirection: "row";
|
|
83
|
+
alignItems: "flex-start";
|
|
84
|
+
gap: number;
|
|
85
|
+
padding: 12;
|
|
86
|
+
borderRadius: 10;
|
|
87
|
+
backgroundColor: "#fef3c7";
|
|
88
|
+
borderWidth: number;
|
|
89
|
+
borderColor: "#fde68a";
|
|
90
|
+
marginBottom: 16;
|
|
91
|
+
};
|
|
92
|
+
offlineText: {
|
|
93
|
+
textAlign: "left" | "right";
|
|
94
|
+
flex: number;
|
|
95
|
+
fontSize: 13;
|
|
96
|
+
lineHeight: number;
|
|
97
|
+
color: "#92400e";
|
|
98
|
+
};
|
|
99
|
+
startCardSlot: {
|
|
100
|
+
marginTop: number;
|
|
101
|
+
};
|
|
102
|
+
startCard: {
|
|
103
|
+
shadowColor: "#0f172a";
|
|
104
|
+
shadowOffset: {
|
|
105
|
+
readonly width: 0;
|
|
106
|
+
readonly height: 4;
|
|
107
|
+
};
|
|
108
|
+
shadowOpacity: 0.08;
|
|
109
|
+
shadowRadius: 14;
|
|
110
|
+
elevation: 3;
|
|
111
|
+
flexDirection: "row";
|
|
112
|
+
alignItems: "center";
|
|
113
|
+
gap: 12;
|
|
114
|
+
minHeight: number;
|
|
115
|
+
paddingHorizontal: 20;
|
|
116
|
+
paddingVertical: number;
|
|
117
|
+
borderRadius: 12;
|
|
118
|
+
borderWidth: number;
|
|
119
|
+
borderColor: "#e5e7eb";
|
|
120
|
+
backgroundColor: "#f9fafb";
|
|
121
|
+
};
|
|
122
|
+
startCardPressed: {
|
|
123
|
+
opacity: number;
|
|
124
|
+
};
|
|
125
|
+
startIcon: {
|
|
126
|
+
width: number;
|
|
127
|
+
height: number;
|
|
128
|
+
borderRadius: number;
|
|
129
|
+
alignItems: "center";
|
|
130
|
+
justifyContent: "center";
|
|
131
|
+
};
|
|
132
|
+
startCopy: {
|
|
133
|
+
flex: number;
|
|
134
|
+
minWidth: number;
|
|
135
|
+
};
|
|
136
|
+
startTitle: {
|
|
137
|
+
textAlign: "left" | "right";
|
|
138
|
+
fontSize: 17;
|
|
139
|
+
fontWeight: "600";
|
|
140
|
+
color: "#1a1a1a";
|
|
141
|
+
};
|
|
142
|
+
startSubtitle: {
|
|
143
|
+
textAlign: "left" | "right";
|
|
144
|
+
fontSize: 13;
|
|
145
|
+
color: "#9ca3af";
|
|
146
|
+
marginTop: number;
|
|
147
|
+
};
|
|
148
|
+
recentHeader: {
|
|
149
|
+
flexDirection: "row";
|
|
150
|
+
alignItems: "center";
|
|
151
|
+
justifyContent: "space-between";
|
|
152
|
+
minHeight: number;
|
|
153
|
+
marginBottom: 8;
|
|
154
|
+
};
|
|
155
|
+
recentTitle: {
|
|
156
|
+
textAlign: "left" | "right";
|
|
157
|
+
fontSize: 12;
|
|
158
|
+
fontWeight: "700";
|
|
159
|
+
color: "#6b7280";
|
|
160
|
+
letterSpacing: number;
|
|
161
|
+
textTransform: "uppercase";
|
|
162
|
+
};
|
|
163
|
+
viewAllButton: {
|
|
164
|
+
minHeight: number;
|
|
165
|
+
paddingHorizontal: 4;
|
|
166
|
+
justifyContent: "center";
|
|
167
|
+
};
|
|
168
|
+
viewAllLabel: {
|
|
169
|
+
textAlign: "left" | "right";
|
|
170
|
+
fontSize: 13;
|
|
171
|
+
fontWeight: "600";
|
|
172
|
+
};
|
|
173
|
+
recentCard: {
|
|
174
|
+
overflow: "hidden";
|
|
175
|
+
};
|
|
176
|
+
recentDivider: {
|
|
177
|
+
marginStart: number;
|
|
178
|
+
};
|
|
179
|
+
spacer: {
|
|
180
|
+
flex: number;
|
|
181
|
+
minHeight: 16;
|
|
182
|
+
justifyContent: "center";
|
|
183
|
+
};
|
|
184
|
+
emptyHint: {
|
|
185
|
+
alignItems: "center";
|
|
186
|
+
gap: 8;
|
|
187
|
+
paddingVertical: 20;
|
|
188
|
+
};
|
|
189
|
+
emptyHintText: {
|
|
190
|
+
fontSize: 13;
|
|
191
|
+
color: "#9ca3af";
|
|
192
|
+
textAlign: "center";
|
|
193
|
+
};
|
|
194
|
+
statusStrip: {
|
|
195
|
+
flexDirection: "row";
|
|
196
|
+
alignItems: "center";
|
|
197
|
+
gap: number;
|
|
198
|
+
minHeight: number;
|
|
199
|
+
paddingTop: 16;
|
|
200
|
+
marginTop: 16;
|
|
201
|
+
borderTopWidth: number;
|
|
202
|
+
borderTopColor: "#f3f4f6";
|
|
203
|
+
};
|
|
204
|
+
avatarStack: {
|
|
205
|
+
flexDirection: "row";
|
|
206
|
+
alignItems: "center";
|
|
207
|
+
};
|
|
208
|
+
avatarStackItem: {
|
|
209
|
+
borderWidth: number;
|
|
210
|
+
borderColor: "#ffffff";
|
|
211
|
+
};
|
|
212
|
+
avatarStackOverlap: {
|
|
213
|
+
marginStart: number;
|
|
214
|
+
};
|
|
215
|
+
statusDot: {
|
|
216
|
+
width: number;
|
|
217
|
+
height: number;
|
|
218
|
+
borderRadius: number;
|
|
219
|
+
};
|
|
220
|
+
statusText: {
|
|
221
|
+
textAlign: "left" | "right";
|
|
222
|
+
flex: number;
|
|
223
|
+
fontSize: 13;
|
|
224
|
+
color: "#6b7280";
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
//# sourceMappingURL=HomeView.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HomeView.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/home/HomeView.styles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0NjB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** Props and label bundle for the Home space. */
|
|
2
|
+
import type { Conversation, WidgetConfig } from '../../../types';
|
|
3
|
+
import type { RelativeTimeLabels, TeamAgent } from '../../utils/conversations';
|
|
4
|
+
export interface HomeViewLabels {
|
|
5
|
+
close: string;
|
|
6
|
+
/** Accessibility label for the "view all" control. */
|
|
7
|
+
viewPrevious: string;
|
|
8
|
+
viewAll: string;
|
|
9
|
+
recentTitle: string;
|
|
10
|
+
noConversations: string;
|
|
11
|
+
statusOnline: string;
|
|
12
|
+
statusAway: string;
|
|
13
|
+
/** Stand-in name while a conversation has no agent assigned. */
|
|
14
|
+
team: string;
|
|
15
|
+
time: RelativeTimeLabels;
|
|
16
|
+
/** Template with a `{count}` token. */
|
|
17
|
+
unread: string;
|
|
18
|
+
}
|
|
19
|
+
export interface HomeViewProps {
|
|
20
|
+
config: WidgetConfig | null;
|
|
21
|
+
color: string;
|
|
22
|
+
visitorName?: string;
|
|
23
|
+
conversationCount: number;
|
|
24
|
+
/** Already sorted newest-first and capped by the provider. */
|
|
25
|
+
recentConversations: Conversation[];
|
|
26
|
+
unreadByConversation: Record<string, number>;
|
|
27
|
+
teamAgents: TeamAgent[];
|
|
28
|
+
isOnline: boolean;
|
|
29
|
+
offlineMessage?: string;
|
|
30
|
+
startConversationLabel: string;
|
|
31
|
+
replyTimeLabel: string;
|
|
32
|
+
allowNewConversations: boolean;
|
|
33
|
+
showPreviousConversations: boolean;
|
|
34
|
+
labels: HomeViewLabels;
|
|
35
|
+
onClose: () => void;
|
|
36
|
+
onStartConversation: () => void;
|
|
37
|
+
onViewConversations: () => void;
|
|
38
|
+
onOpenConversation: (conversationId: string) => void;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=HomeView.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HomeView.types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/home/HomeView.types.ts"],"names":[],"mappings":"AAAA,iDAAiD;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE/E,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,kBAAkB,CAAC;IACzB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,8DAA8D;IAC9D,mBAAmB,EAAE,YAAY,EAAE,CAAC;IACpC,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,yBAAyB,EAAE,OAAO,CAAC;IACnC,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,kBAAkB,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;CACtD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Greeting helpers for the Home space. The admin's heading renders exactly as
|
|
3
|
+
* the dashboard sent it, with one exception: an explicit name token, which is
|
|
4
|
+
* the admin asking for the visitor's first name to be filled in.
|
|
5
|
+
* Deliberately free of React and React Native so they stay trivial to test.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* First name suitable for greeting someone by. Hosts sometimes put an email or
|
|
9
|
+
* a phone number in the name field, and greeting "Hi rep@acme.com" is worse
|
|
10
|
+
* than not personalizing at all.
|
|
11
|
+
*/
|
|
12
|
+
export declare function firstName(fullName?: string | null): string | null;
|
|
13
|
+
/**
|
|
14
|
+
* Resolve the admin's heading against the visitor's name. Only an explicit
|
|
15
|
+
* token is substituted: a generic "Hi there" stays "Hi there", because that is
|
|
16
|
+
* what the dashboard preview shows the admin and the phone has to match it.
|
|
17
|
+
*/
|
|
18
|
+
export declare function personalizeGreeting(template: string | null | undefined, visitorName: string | null | undefined, fallback: string): string;
|
|
19
|
+
//# sourceMappingURL=greeting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"greeting.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/home/greeting.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAOjE;AAWD;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACtC,QAAQ,EAAE,MAAM,GACf,MAAM,CAIR"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pre-chat form — collects visitor info before the first message.
|
|
3
|
+
* Port of `client/src/widget/components/PreChatForm.tsx`.
|
|
4
|
+
*/
|
|
5
|
+
import type { PreChatFormProps } from './PreChatForm.types';
|
|
6
|
+
export declare function PreChatForm({ fields, color, labels, onSubmit, onSkip, onClose, }: PreChatFormProps): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=PreChatForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreChatForm.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/pre-chat/PreChatForm.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAaH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAK5D,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,KAAK,EACL,MAAM,EACN,QAAQ,EACR,MAAM,EACN,OAAO,GACR,EAAE,gBAAgB,+BAgMlB"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/** Styles for the pre-chat form: brand header, fields and the skip/submit row. */
|
|
2
|
+
export declare const styles: {
|
|
3
|
+
header: {
|
|
4
|
+
flexDirection: "row";
|
|
5
|
+
alignItems: "flex-start";
|
|
6
|
+
gap: 12;
|
|
7
|
+
paddingHorizontal: 20;
|
|
8
|
+
paddingVertical: 16;
|
|
9
|
+
minHeight: number;
|
|
10
|
+
};
|
|
11
|
+
headerCopy: {
|
|
12
|
+
flex: number;
|
|
13
|
+
minWidth: number;
|
|
14
|
+
};
|
|
15
|
+
headerTitle: {
|
|
16
|
+
textAlign: "left" | "right";
|
|
17
|
+
fontSize: 22;
|
|
18
|
+
fontWeight: "700";
|
|
19
|
+
marginBottom: 4;
|
|
20
|
+
};
|
|
21
|
+
headerSubtitle: {
|
|
22
|
+
textAlign: "left" | "right";
|
|
23
|
+
fontSize: 13;
|
|
24
|
+
lineHeight: number;
|
|
25
|
+
};
|
|
26
|
+
content: {
|
|
27
|
+
flexGrow: number;
|
|
28
|
+
padding: 24;
|
|
29
|
+
};
|
|
30
|
+
field: {
|
|
31
|
+
marginBottom: 16;
|
|
32
|
+
};
|
|
33
|
+
label: {
|
|
34
|
+
textAlign: "left" | "right";
|
|
35
|
+
fontSize: 13;
|
|
36
|
+
fontWeight: "600";
|
|
37
|
+
color: string;
|
|
38
|
+
marginBottom: 4;
|
|
39
|
+
};
|
|
40
|
+
required: {
|
|
41
|
+
color: "#ef4444";
|
|
42
|
+
};
|
|
43
|
+
input: {
|
|
44
|
+
textAlign: "left" | "right";
|
|
45
|
+
borderWidth: number;
|
|
46
|
+
borderColor: "#d1d5db";
|
|
47
|
+
borderRadius: 8;
|
|
48
|
+
paddingHorizontal: 12;
|
|
49
|
+
paddingVertical: number;
|
|
50
|
+
fontSize: 16;
|
|
51
|
+
color: "#1a1a1a";
|
|
52
|
+
minHeight: number;
|
|
53
|
+
};
|
|
54
|
+
inputError: {
|
|
55
|
+
borderColor: "#ef4444";
|
|
56
|
+
};
|
|
57
|
+
options: {
|
|
58
|
+
gap: 8;
|
|
59
|
+
};
|
|
60
|
+
option: {
|
|
61
|
+
flexDirection: "row";
|
|
62
|
+
alignItems: "center";
|
|
63
|
+
justifyContent: "space-between";
|
|
64
|
+
borderWidth: number;
|
|
65
|
+
borderColor: "#d1d5db";
|
|
66
|
+
borderRadius: 8;
|
|
67
|
+
paddingHorizontal: 12;
|
|
68
|
+
paddingVertical: 12;
|
|
69
|
+
minHeight: number;
|
|
70
|
+
};
|
|
71
|
+
optionLabel: {
|
|
72
|
+
fontSize: 15;
|
|
73
|
+
color: "#1a1a1a";
|
|
74
|
+
};
|
|
75
|
+
errorText: {
|
|
76
|
+
textAlign: "left" | "right";
|
|
77
|
+
fontSize: 12;
|
|
78
|
+
color: "#ef4444";
|
|
79
|
+
marginTop: 4;
|
|
80
|
+
};
|
|
81
|
+
actions: {
|
|
82
|
+
flexDirection: "row";
|
|
83
|
+
gap: 8;
|
|
84
|
+
marginTop: 16;
|
|
85
|
+
};
|
|
86
|
+
skipButton: {
|
|
87
|
+
flex: number;
|
|
88
|
+
alignItems: "center";
|
|
89
|
+
justifyContent: "center";
|
|
90
|
+
borderWidth: number;
|
|
91
|
+
borderColor: "#d1d5db";
|
|
92
|
+
borderRadius: 8;
|
|
93
|
+
paddingVertical: 12;
|
|
94
|
+
minHeight: number;
|
|
95
|
+
};
|
|
96
|
+
skipLabel: {
|
|
97
|
+
fontSize: 15;
|
|
98
|
+
fontWeight: "600";
|
|
99
|
+
color: string;
|
|
100
|
+
};
|
|
101
|
+
submitButton: {
|
|
102
|
+
flex: number;
|
|
103
|
+
alignItems: "center";
|
|
104
|
+
justifyContent: "center";
|
|
105
|
+
borderRadius: 8;
|
|
106
|
+
paddingVertical: 12;
|
|
107
|
+
minHeight: number;
|
|
108
|
+
};
|
|
109
|
+
submitLabel: {
|
|
110
|
+
fontSize: 15;
|
|
111
|
+
fontWeight: "600";
|
|
112
|
+
color: "#ffffff";
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=PreChatForm.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreChatForm.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/pre-chat/PreChatForm.styles.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAOlF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgHjB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Props and label bundle for the pre-chat form. */
|
|
2
|
+
import type { PreChatField } from '../../../types';
|
|
3
|
+
export interface PreChatFormLabels {
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle: string;
|
|
6
|
+
skip: string;
|
|
7
|
+
submit: string;
|
|
8
|
+
close: string;
|
|
9
|
+
fieldRequired: string;
|
|
10
|
+
invalidEmail: string;
|
|
11
|
+
}
|
|
12
|
+
export interface PreChatFormProps {
|
|
13
|
+
fields: PreChatField[];
|
|
14
|
+
color: string;
|
|
15
|
+
labels: PreChatFormLabels;
|
|
16
|
+
onSubmit: (data: Record<string, string>) => void;
|
|
17
|
+
onSkip: () => void;
|
|
18
|
+
onClose: () => void;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=PreChatForm.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreChatForm.types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/pre-chat/PreChatForm.types.ts"],"names":[],"mappings":"AAAA,oDAAoD;AAEpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACjD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Style rules shared by more than one screen or component, so a fingertip-sized
|
|
3
|
+
* icon button or a hairline divider is written once and looks the same
|
|
4
|
+
* everywhere. Screens layer their own sheet on top:
|
|
5
|
+
* `style={[globalStyles.divider, styles.inset]}`.
|
|
6
|
+
*
|
|
7
|
+
* Only rules that are identical at every call site belong here. A style that is
|
|
8
|
+
* "almost the same" stays with its screen: hoisting it would either fork it
|
|
9
|
+
* into variants or quietly change one screen to match another.
|
|
10
|
+
*/
|
|
11
|
+
export declare const globalStyles: {
|
|
12
|
+
/** Full-height white surface every screen starts from. */
|
|
13
|
+
screen: {
|
|
14
|
+
flex: number;
|
|
15
|
+
backgroundColor: "#ffffff";
|
|
16
|
+
};
|
|
17
|
+
/** Grows to take whatever space its parent has left. */
|
|
18
|
+
fill: {
|
|
19
|
+
flex: number;
|
|
20
|
+
};
|
|
21
|
+
/** Round icon target in a header bar, sized for a fingertip. */
|
|
22
|
+
iconButton: {
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
borderRadius: number;
|
|
26
|
+
alignItems: "center";
|
|
27
|
+
justifyContent: "center";
|
|
28
|
+
};
|
|
29
|
+
/** Pressed feedback for icon buttons and text links. */
|
|
30
|
+
pressed: {
|
|
31
|
+
opacity: number;
|
|
32
|
+
};
|
|
33
|
+
/** Hairline between list rows; the caller adds the start inset. */
|
|
34
|
+
divider: {
|
|
35
|
+
height: number;
|
|
36
|
+
backgroundColor: "#f3f4f6";
|
|
37
|
+
};
|
|
38
|
+
/** Bordered white card that lists and previews sit in. */
|
|
39
|
+
card: {
|
|
40
|
+
borderRadius: 12;
|
|
41
|
+
borderWidth: number;
|
|
42
|
+
borderColor: "#e5e7eb";
|
|
43
|
+
backgroundColor: "#ffffff";
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=global.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../../../src/ui/styles/global.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,eAAO,MAAM,YAAY;IACvB,0DAA0D;;;;;IAK1D,wDAAwD;;;;IAIxD,gEAAgE;;;;;;;;IAQhE,wDAAwD;;;;IAIxD,mEAAmE;;;;;IAKnE,0DAA0D;;;;;;;CAO1D,CAAC"}
|