@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 @@
|
|
|
1
|
+
{"version":3,"names":["NAME_TOKEN","EMAIL_LIKE","PHONE_LIKE","firstName","fullName","trimmed","trim","test","candidate","split","replace","length","tidy","value","personalizeGreeting","template","visitorName","fallback","base","tokenized"],"sourceRoot":"../../../../../src","sources":["ui/screens/home/greeting.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMA,UAAU,GAAG,wCAAwC;AAE3D,MAAMC,UAAU,GAAG,GAAG;AACtB,MAAMC,UAAU,GAAG,iBAAiB;;AAEpC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,SAASA,CAACC,QAAwB,EAAiB;EACjE,MAAMC,OAAO,GAAG,CAACD,QAAQ,IAAI,EAAE,EAAEE,IAAI,CAAC,CAAC;EACvC,IAAI,CAACD,OAAO,IAAIJ,UAAU,CAACM,IAAI,CAACF,OAAO,CAAC,IAAIH,UAAU,CAACK,IAAI,CAACF,OAAO,CAAC,EAAE,OAAO,IAAI;EACjF,MAAMG,SAAS,GAAG,CAACH,OAAO,CAACI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAEC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;EACzE;EACA,IAAIF,SAAS,CAACG,MAAM,GAAG,CAAC,IAAIH,SAAS,CAACG,MAAM,GAAG,EAAE,EAAE,OAAO,IAAI;EAC9D,OAAOH,SAAS;AAClB;;AAEA;AACA,SAASI,IAAIA,CAACC,KAAa,EAAU;EACnC,OAAOA,KAAK,CACTH,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CACpBA,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAC/BA,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CACtBJ,IAAI,CAAC,CAAC;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASQ,mBAAmBA,CACjCC,QAAmC,EACnCC,WAAsC,EACtCC,QAAgB,EACR;EACR,MAAMC,IAAI,GAAG,CAACH,QAAQ,IAAI,EAAE,EAAET,IAAI,CAAC,CAAC,IAAIW,QAAQ;EAChD,MAAME,SAAS,GAAGD,IAAI,CAACR,OAAO,CAACV,UAAU,EAAEG,SAAS,CAACa,WAAW,CAAC,IAAI,EAAE,CAAC;EACxE,OAAOG,SAAS,KAAKD,IAAI,GAAGA,IAAI,GAAGN,IAAI,CAACO,SAAS,CAAC;AACpD","ignoreList":[]}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Pre-chat form — collects visitor info before the first message.
|
|
5
|
+
* Port of `client/src/widget/components/PreChatForm.tsx`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { useCallback, useRef, useState } from 'react';
|
|
9
|
+
import { Pressable, ScrollView, Text, TextInput, View } from 'react-native';
|
|
10
|
+
import { formatLabel } from "../../../i18n.js";
|
|
11
|
+
import { GradientBackground } from "../../components/Gradient.js";
|
|
12
|
+
import { ChevronIcon } from "../../components/icons.js";
|
|
13
|
+
import { globalStyles } from "../../styles/global.js";
|
|
14
|
+
import { contrastingTextColor, mixHex, palette, withAlpha } from "../../styles/theme.js";
|
|
15
|
+
import { forwardDirection } from "../../utils/rtl.js";
|
|
16
|
+
import { styles } from "./PreChatForm.styles.js";
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
+
/** Breathing room kept under a focused field when it is scrolled into view. */
|
|
19
|
+
const FIELD_GUTTER = 16;
|
|
20
|
+
export function PreChatForm({
|
|
21
|
+
fields,
|
|
22
|
+
color,
|
|
23
|
+
labels,
|
|
24
|
+
onSubmit,
|
|
25
|
+
onSkip,
|
|
26
|
+
onClose
|
|
27
|
+
}) {
|
|
28
|
+
const [values, setValues] = useState({});
|
|
29
|
+
const [errors, setErrors] = useState({});
|
|
30
|
+
const scrollRef = useRef(null);
|
|
31
|
+
const scrollOffset = useRef(0);
|
|
32
|
+
const viewportHeight = useRef(0);
|
|
33
|
+
const fieldRefs = useRef({});
|
|
34
|
+
const focusedField = useRef(null);
|
|
35
|
+
|
|
36
|
+
// The keyboard shortens the form instead of scrolling it, so a field low in
|
|
37
|
+
// the list ends up behind it. Once the viewport has shrunk, lift the focused
|
|
38
|
+
// field back above the fold. Both edges are measured the same way, so the
|
|
39
|
+
// offset a modal adds to either cancels out, and RN folds the scroll position
|
|
40
|
+
// into the field's own measurement.
|
|
41
|
+
const revealFocusedField = useCallback(() => {
|
|
42
|
+
const name = focusedField.current;
|
|
43
|
+
const field = name ? fieldRefs.current[name] : null;
|
|
44
|
+
const viewport = scrollRef.current?.getNativeScrollRef();
|
|
45
|
+
if (!field || !viewport) return;
|
|
46
|
+
viewport.measureInWindow((_vx, viewportY, _vw, height) => {
|
|
47
|
+
field.measureInWindow((_fx, fieldY, _fw, fieldHeight) => {
|
|
48
|
+
const hidden = fieldY + fieldHeight + FIELD_GUTTER - (viewportY + height);
|
|
49
|
+
if (hidden <= 0) return;
|
|
50
|
+
scrollRef.current?.scrollTo({
|
|
51
|
+
y: scrollOffset.current + hidden,
|
|
52
|
+
animated: false
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
}, []);
|
|
57
|
+
const handleViewportLayout = useCallback(event => {
|
|
58
|
+
const {
|
|
59
|
+
height
|
|
60
|
+
} = event.nativeEvent.layout;
|
|
61
|
+
const shrank = viewportHeight.current - height > 1;
|
|
62
|
+
viewportHeight.current = height;
|
|
63
|
+
if (shrank) revealFocusedField();
|
|
64
|
+
}, [revealFocusedField]);
|
|
65
|
+
const handleScroll = useCallback(event => {
|
|
66
|
+
scrollOffset.current = event.nativeEvent.contentOffset.y;
|
|
67
|
+
}, []);
|
|
68
|
+
const hasRequired = fields.some(field => field.required);
|
|
69
|
+
const handleSubmit = () => {
|
|
70
|
+
const nextErrors = {};
|
|
71
|
+
for (const field of fields) {
|
|
72
|
+
const value = values[field.name]?.trim() || '';
|
|
73
|
+
if (field.required && !value) {
|
|
74
|
+
nextErrors[field.name] = formatLabel(labels.fieldRequired, {
|
|
75
|
+
field: field.label
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
if (field.type === 'email' && value && !value.includes('@')) {
|
|
79
|
+
nextErrors[field.name] = labels.invalidEmail;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (Object.keys(nextErrors).length > 0) {
|
|
83
|
+
setErrors(nextErrors);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
onSubmit(values);
|
|
87
|
+
};
|
|
88
|
+
const headerTextColor = contrastingTextColor(color);
|
|
89
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
90
|
+
style: globalStyles.screen,
|
|
91
|
+
children: [/*#__PURE__*/_jsxs(GradientBackground, {
|
|
92
|
+
colors: [color, mixHex(color, '#000000', 0.16)],
|
|
93
|
+
style: styles.header,
|
|
94
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
95
|
+
style: styles.headerCopy,
|
|
96
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
97
|
+
style: [styles.headerTitle, {
|
|
98
|
+
color: headerTextColor
|
|
99
|
+
}],
|
|
100
|
+
children: labels.title
|
|
101
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
102
|
+
style: [styles.headerSubtitle, {
|
|
103
|
+
color: withAlpha(headerTextColor, 0.75)
|
|
104
|
+
}],
|
|
105
|
+
numberOfLines: 2,
|
|
106
|
+
children: labels.subtitle
|
|
107
|
+
})]
|
|
108
|
+
}), /*#__PURE__*/_jsx(Pressable, {
|
|
109
|
+
onPress: onClose,
|
|
110
|
+
accessibilityRole: "button",
|
|
111
|
+
accessibilityLabel: labels.close,
|
|
112
|
+
hitSlop: 12,
|
|
113
|
+
style: ({
|
|
114
|
+
pressed
|
|
115
|
+
}) => [globalStyles.iconButton, {
|
|
116
|
+
backgroundColor: withAlpha(headerTextColor, 0.16)
|
|
117
|
+
}, pressed && globalStyles.pressed],
|
|
118
|
+
children: /*#__PURE__*/_jsx(ChevronIcon, {
|
|
119
|
+
size: 20,
|
|
120
|
+
direction: "down",
|
|
121
|
+
color: headerTextColor
|
|
122
|
+
})
|
|
123
|
+
})]
|
|
124
|
+
}), /*#__PURE__*/_jsxs(ScrollView, {
|
|
125
|
+
ref: scrollRef,
|
|
126
|
+
style: globalStyles.fill,
|
|
127
|
+
contentContainerStyle: styles.content,
|
|
128
|
+
keyboardShouldPersistTaps: "handled",
|
|
129
|
+
keyboardDismissMode: "on-drag",
|
|
130
|
+
onLayout: handleViewportLayout,
|
|
131
|
+
onScroll: handleScroll,
|
|
132
|
+
scrollEventThrottle: 16,
|
|
133
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
134
|
+
style: globalStyles.fill,
|
|
135
|
+
children: fields.map(field => /*#__PURE__*/_jsxs(View, {
|
|
136
|
+
ref: node => {
|
|
137
|
+
fieldRefs.current[field.name] = node;
|
|
138
|
+
},
|
|
139
|
+
collapsable: false,
|
|
140
|
+
style: styles.field,
|
|
141
|
+
children: [/*#__PURE__*/_jsxs(Text, {
|
|
142
|
+
style: styles.label,
|
|
143
|
+
children: [field.label, field.required ? /*#__PURE__*/_jsx(Text, {
|
|
144
|
+
style: styles.required,
|
|
145
|
+
children: " *"
|
|
146
|
+
}) : null]
|
|
147
|
+
}), field.type === 'select' ? /*#__PURE__*/_jsx(View, {
|
|
148
|
+
style: styles.options,
|
|
149
|
+
children: (field.options ?? []).map(option => {
|
|
150
|
+
const selected = values[field.name] === option;
|
|
151
|
+
return /*#__PURE__*/_jsxs(Pressable, {
|
|
152
|
+
onPress: () => setValues(current => ({
|
|
153
|
+
...current,
|
|
154
|
+
[field.name]: option
|
|
155
|
+
})),
|
|
156
|
+
accessibilityRole: "button",
|
|
157
|
+
accessibilityState: {
|
|
158
|
+
selected
|
|
159
|
+
},
|
|
160
|
+
style: [styles.option, selected && {
|
|
161
|
+
borderColor: color,
|
|
162
|
+
backgroundColor: palette.surface
|
|
163
|
+
}],
|
|
164
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
165
|
+
style: [styles.optionLabel, selected && {
|
|
166
|
+
color
|
|
167
|
+
}],
|
|
168
|
+
children: option
|
|
169
|
+
}), selected ? /*#__PURE__*/_jsx(ChevronIcon, {
|
|
170
|
+
size: 14,
|
|
171
|
+
direction: forwardDirection(),
|
|
172
|
+
color: color
|
|
173
|
+
}) : null]
|
|
174
|
+
}, option);
|
|
175
|
+
})
|
|
176
|
+
}) : /*#__PURE__*/_jsx(TextInput, {
|
|
177
|
+
value: values[field.name] || '',
|
|
178
|
+
onChangeText: text => setValues(current => ({
|
|
179
|
+
...current,
|
|
180
|
+
[field.name]: text
|
|
181
|
+
})),
|
|
182
|
+
placeholder: field.label,
|
|
183
|
+
placeholderTextColor: palette.textSubtle,
|
|
184
|
+
keyboardType: field.type === 'email' ? 'email-address' : field.type === 'phone' ? 'phone-pad' : 'default',
|
|
185
|
+
autoCapitalize: field.type === 'email' ? 'none' : 'sentences',
|
|
186
|
+
autoCorrect: field.type !== 'email',
|
|
187
|
+
onFocus: () => {
|
|
188
|
+
focusedField.current = field.name;
|
|
189
|
+
revealFocusedField();
|
|
190
|
+
},
|
|
191
|
+
onBlur: () => {
|
|
192
|
+
if (focusedField.current === field.name) focusedField.current = null;
|
|
193
|
+
},
|
|
194
|
+
style: [styles.input, errors[field.name] ? styles.inputError : null]
|
|
195
|
+
}), errors[field.name] ? /*#__PURE__*/_jsx(Text, {
|
|
196
|
+
style: styles.errorText,
|
|
197
|
+
children: errors[field.name]
|
|
198
|
+
}) : null]
|
|
199
|
+
}, field.name))
|
|
200
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
201
|
+
style: styles.actions,
|
|
202
|
+
children: [!hasRequired ? /*#__PURE__*/_jsx(Pressable, {
|
|
203
|
+
onPress: onSkip,
|
|
204
|
+
accessibilityRole: "button",
|
|
205
|
+
style: styles.skipButton,
|
|
206
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
207
|
+
style: styles.skipLabel,
|
|
208
|
+
children: labels.skip
|
|
209
|
+
})
|
|
210
|
+
}) : null, /*#__PURE__*/_jsx(Pressable, {
|
|
211
|
+
onPress: handleSubmit,
|
|
212
|
+
accessibilityRole: "button",
|
|
213
|
+
style: [styles.submitButton, {
|
|
214
|
+
backgroundColor: color
|
|
215
|
+
}],
|
|
216
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
217
|
+
style: styles.submitLabel,
|
|
218
|
+
children: labels.submit
|
|
219
|
+
})
|
|
220
|
+
})]
|
|
221
|
+
})]
|
|
222
|
+
})]
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
//# sourceMappingURL=PreChatForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useRef","useState","Pressable","ScrollView","Text","TextInput","View","formatLabel","GradientBackground","ChevronIcon","globalStyles","contrastingTextColor","mixHex","palette","withAlpha","forwardDirection","styles","jsx","_jsx","jsxs","_jsxs","FIELD_GUTTER","PreChatForm","fields","color","labels","onSubmit","onSkip","onClose","values","setValues","errors","setErrors","scrollRef","scrollOffset","viewportHeight","fieldRefs","focusedField","revealFocusedField","name","current","field","viewport","getNativeScrollRef","measureInWindow","_vx","viewportY","_vw","height","_fx","fieldY","_fw","fieldHeight","hidden","scrollTo","y","animated","handleViewportLayout","event","nativeEvent","layout","shrank","handleScroll","contentOffset","hasRequired","some","required","handleSubmit","nextErrors","value","trim","fieldRequired","label","type","includes","invalidEmail","Object","keys","length","headerTextColor","style","screen","children","colors","header","headerCopy","headerTitle","title","headerSubtitle","numberOfLines","subtitle","onPress","accessibilityRole","accessibilityLabel","close","hitSlop","pressed","iconButton","backgroundColor","size","direction","ref","fill","contentContainerStyle","content","keyboardShouldPersistTaps","keyboardDismissMode","onLayout","onScroll","scrollEventThrottle","map","node","collapsable","options","option","selected","accessibilityState","borderColor","surface","optionLabel","onChangeText","text","placeholder","placeholderTextColor","textSubtle","keyboardType","autoCapitalize","autoCorrect","onFocus","onBlur","input","inputError","errorText","actions","skipButton","skipLabel","skip","submitButton","submitLabel","submit"],"sourceRoot":"../../../../../src","sources":["ui/screens/pre-chat/PreChatForm.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACrD,SAASC,SAAS,EAAEC,UAAU,EAAEC,IAAI,EAAEC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AAG3E,SAASC,WAAW,QAAQ,kBAAe;AAC3C,SAASC,kBAAkB,QAAQ,8BAA2B;AAC9D,SAASC,WAAW,QAAQ,2BAAwB;AACpD,SAASC,YAAY,QAAQ,wBAAqB;AAClD,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mH,UAAU,GAAG,IAAI;UAAE,CACtE,CACF,EAEApG,MAAM,CAACU,KAAK,CAACF,IAAI,CAAC,gBACjBrB,IAAA,CAACd,IAAI;YAAC4E,KAAK,EAAEhE,MAAM,CAACoH,SAAU;YAAAlD,QAAA,EAAEnD,MAAM,CAACU,KAAK,CAACF,IAAI;UAAC,CAAO,CAAC,GACxD,IAAI;QAAA,GAjEHE,KAAK,CAACF,IAkEP,CACP;MAAC,CACE,CAAC,eAEPnB,KAAA,CAACd,IAAI;QAAC0E,KAAK,EAAEhE,MAAM,CAACqH,OAAQ;QAAAnD,QAAA,GACzB,CAAClB,WAAW,gBACX9C,IAAA,CAAChB,SAAS;UAACyF,OAAO,EAAEhE,MAAO;UAACiE,iBAAiB,EAAC,QAAQ;UAACZ,KAAK,EAAEhE,MAAM,CAACsH,UAAW;UAAApD,QAAA,eAC9EhE,IAAA,CAACd,IAAI;YAAC4E,KAAK,EAAEhE,MAAM,CAACuH,SAAU;YAAArD,QAAA,EAAEzD,MAAM,CAAC+G;UAAI,CAAO;QAAC,CAC1C,CAAC,GACV,IAAI,eACRtH,IAAA,CAAChB,SAAS;UACRyF,OAAO,EAAExB,YAAa;UACtByB,iBAAiB,EAAC,QAAQ;UAC1BZ,KAAK,EAAE,CAAChE,MAAM,CAACyH,YAAY,EAAE;YAAEvC,eAAe,EAAE1E;UAAM,CAAC,CAAE;UAAA0D,QAAA,eACzDhE,IAAA,CAACd,IAAI;YAAC4E,KAAK,EAAEhE,MAAM,CAAC0H,WAAY;YAAAxD,QAAA,EAAEzD,MAAM,CAACkH;UAAM,CAAO;QAAC,CAC9C,CAAC;MAAA,CACR,CAAC;IAAA,CACG,CAAC;EAAA,CACT,CAAC;AAEX","ignoreList":[]}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/** Styles for the pre-chat form: brand header, fields and the skip/submit row. */
|
|
4
|
+
|
|
5
|
+
import { StyleSheet } from 'react-native';
|
|
6
|
+
import { fontSize, palette, radius, spacing } from "../../styles/theme.js";
|
|
7
|
+
import { START_ALIGN } from "../../utils/rtl.js";
|
|
8
|
+
export const styles = StyleSheet.create({
|
|
9
|
+
header: {
|
|
10
|
+
flexDirection: 'row',
|
|
11
|
+
alignItems: 'flex-start',
|
|
12
|
+
gap: spacing.md,
|
|
13
|
+
paddingHorizontal: spacing.xl,
|
|
14
|
+
paddingVertical: spacing.lg,
|
|
15
|
+
minHeight: 96
|
|
16
|
+
},
|
|
17
|
+
headerCopy: {
|
|
18
|
+
flex: 1,
|
|
19
|
+
minWidth: 0
|
|
20
|
+
},
|
|
21
|
+
headerTitle: {
|
|
22
|
+
textAlign: START_ALIGN,
|
|
23
|
+
fontSize: fontSize.heading,
|
|
24
|
+
fontWeight: '700',
|
|
25
|
+
marginBottom: spacing.xs
|
|
26
|
+
},
|
|
27
|
+
headerSubtitle: {
|
|
28
|
+
textAlign: START_ALIGN,
|
|
29
|
+
fontSize: fontSize.meta,
|
|
30
|
+
lineHeight: fontSize.meta * 1.4
|
|
31
|
+
},
|
|
32
|
+
content: {
|
|
33
|
+
flexGrow: 1,
|
|
34
|
+
padding: spacing.xxl
|
|
35
|
+
},
|
|
36
|
+
field: {
|
|
37
|
+
marginBottom: spacing.lg
|
|
38
|
+
},
|
|
39
|
+
label: {
|
|
40
|
+
textAlign: START_ALIGN,
|
|
41
|
+
fontSize: fontSize.meta,
|
|
42
|
+
fontWeight: '600',
|
|
43
|
+
color: '#374151',
|
|
44
|
+
marginBottom: spacing.xs
|
|
45
|
+
},
|
|
46
|
+
required: {
|
|
47
|
+
color: palette.danger
|
|
48
|
+
},
|
|
49
|
+
input: {
|
|
50
|
+
textAlign: START_ALIGN,
|
|
51
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
52
|
+
borderColor: palette.disabled,
|
|
53
|
+
borderRadius: radius.sm,
|
|
54
|
+
paddingHorizontal: spacing.md,
|
|
55
|
+
paddingVertical: spacing.sm + 2,
|
|
56
|
+
fontSize: fontSize.input,
|
|
57
|
+
color: palette.ink,
|
|
58
|
+
minHeight: 46
|
|
59
|
+
},
|
|
60
|
+
inputError: {
|
|
61
|
+
borderColor: palette.danger
|
|
62
|
+
},
|
|
63
|
+
options: {
|
|
64
|
+
gap: spacing.sm
|
|
65
|
+
},
|
|
66
|
+
option: {
|
|
67
|
+
flexDirection: 'row',
|
|
68
|
+
alignItems: 'center',
|
|
69
|
+
justifyContent: 'space-between',
|
|
70
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
71
|
+
borderColor: palette.disabled,
|
|
72
|
+
borderRadius: radius.sm,
|
|
73
|
+
paddingHorizontal: spacing.md,
|
|
74
|
+
paddingVertical: spacing.md,
|
|
75
|
+
minHeight: 46
|
|
76
|
+
},
|
|
77
|
+
optionLabel: {
|
|
78
|
+
fontSize: fontSize.body,
|
|
79
|
+
color: palette.ink
|
|
80
|
+
},
|
|
81
|
+
errorText: {
|
|
82
|
+
textAlign: START_ALIGN,
|
|
83
|
+
fontSize: fontSize.caption,
|
|
84
|
+
color: palette.danger,
|
|
85
|
+
marginTop: spacing.xs
|
|
86
|
+
},
|
|
87
|
+
actions: {
|
|
88
|
+
flexDirection: 'row',
|
|
89
|
+
gap: spacing.sm,
|
|
90
|
+
marginTop: spacing.lg
|
|
91
|
+
},
|
|
92
|
+
skipButton: {
|
|
93
|
+
flex: 1,
|
|
94
|
+
alignItems: 'center',
|
|
95
|
+
justifyContent: 'center',
|
|
96
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
97
|
+
borderColor: palette.disabled,
|
|
98
|
+
borderRadius: radius.sm,
|
|
99
|
+
paddingVertical: spacing.md,
|
|
100
|
+
minHeight: 46
|
|
101
|
+
},
|
|
102
|
+
skipLabel: {
|
|
103
|
+
fontSize: fontSize.body,
|
|
104
|
+
fontWeight: '600',
|
|
105
|
+
color: '#374151'
|
|
106
|
+
},
|
|
107
|
+
submitButton: {
|
|
108
|
+
flex: 1,
|
|
109
|
+
alignItems: 'center',
|
|
110
|
+
justifyContent: 'center',
|
|
111
|
+
borderRadius: radius.sm,
|
|
112
|
+
paddingVertical: spacing.md,
|
|
113
|
+
minHeight: 46
|
|
114
|
+
},
|
|
115
|
+
submitLabel: {
|
|
116
|
+
fontSize: fontSize.body,
|
|
117
|
+
fontWeight: '600',
|
|
118
|
+
color: palette.white
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
//# sourceMappingURL=PreChatForm.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","fontSize","palette","radius","spacing","START_ALIGN","styles","create","header","flexDirection","alignItems","gap","md","paddingHorizontal","xl","paddingVertical","lg","minHeight","headerCopy","flex","minWidth","headerTitle","textAlign","heading","fontWeight","marginBottom","xs","headerSubtitle","meta","lineHeight","content","flexGrow","padding","xxl","field","label","color","required","danger","input","borderWidth","hairlineWidth","borderColor","disabled","borderRadius","sm","ink","inputError","options","option","justifyContent","optionLabel","body","errorText","caption","marginTop","actions","skipButton","skipLabel","submitButton","submitLabel","white"],"sourceRoot":"../../../../../src","sources":["ui/screens/pre-chat/PreChatForm.styles.ts"],"mappings":";;AAAA;;AAEA,SAASA,UAAU,QAAQ,cAAc;AAEzC,SAASC,QAAQ,EAAEC,OAAO,EAAEC,MAAM,EAAEC,OAAO,QAAQ,uBAAoB;AACvE,SAASC,WAAW,QAAQ,oBAAiB;AAE7C,OAAO,MAAMC,MAAM,GAAGN,UAAU,CAACO,MAAM,CAAC;EACtCC,MAAM,EAAE;IACNC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,YAAY;IACxBC,GAAG,EAAEP,OAAO,CAACQ,EAAE;IACfC,iBAAiB,EAAET,OAAO,CAACU,EAAE;IAC7BC,eAAe,EAAEX,OAAO,CAACY,EAAE;IAC3BC,SAAS,EAAE;EACb,CAAC;EACDC,UAAU,EAAE;IACVC,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE;EACZ,CAAC;EACDC,WAAW,EAAE;I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;IACxBN,YAAY,EAAEzC,MAAM,CAAC0C,EAAE;IACvB9B,eAAe,EAAEX,OAAO,CAACQ,EAAE;IAC3BK,SAAS,EAAE;EACb,CAAC;EACD2C,WAAW,EAAE;IACX3D,QAAQ,EAAEA,QAAQ,CAACmD,IAAI;IACvB5B,UAAU,EAAE,KAAK;IACjBY,KAAK,EAAElC,OAAO,CAAC2D;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["ui/screens/pre-chat/PreChatForm.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Style rules shared by more than one screen or component, so a fingertip-sized
|
|
5
|
+
* icon button or a hairline divider is written once and looks the same
|
|
6
|
+
* everywhere. Screens layer their own sheet on top:
|
|
7
|
+
* `style={[globalStyles.divider, styles.inset]}`.
|
|
8
|
+
*
|
|
9
|
+
* Only rules that are identical at every call site belong here. A style that is
|
|
10
|
+
* "almost the same" stays with its screen: hoisting it would either fork it
|
|
11
|
+
* into variants or quietly change one screen to match another.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { StyleSheet } from 'react-native';
|
|
15
|
+
import { palette, radius } from "./theme.js";
|
|
16
|
+
export const globalStyles = StyleSheet.create({
|
|
17
|
+
/** Full-height white surface every screen starts from. */
|
|
18
|
+
screen: {
|
|
19
|
+
flex: 1,
|
|
20
|
+
backgroundColor: palette.white
|
|
21
|
+
},
|
|
22
|
+
/** Grows to take whatever space its parent has left. */
|
|
23
|
+
fill: {
|
|
24
|
+
flex: 1
|
|
25
|
+
},
|
|
26
|
+
/** Round icon target in a header bar, sized for a fingertip. */
|
|
27
|
+
iconButton: {
|
|
28
|
+
width: 34,
|
|
29
|
+
height: 34,
|
|
30
|
+
borderRadius: 17,
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
justifyContent: 'center'
|
|
33
|
+
},
|
|
34
|
+
/** Pressed feedback for icon buttons and text links. */
|
|
35
|
+
pressed: {
|
|
36
|
+
opacity: 0.6
|
|
37
|
+
},
|
|
38
|
+
/** Hairline between list rows; the caller adds the start inset. */
|
|
39
|
+
divider: {
|
|
40
|
+
height: StyleSheet.hairlineWidth,
|
|
41
|
+
backgroundColor: palette.borderSoft
|
|
42
|
+
},
|
|
43
|
+
/** Bordered white card that lists and previews sit in. */
|
|
44
|
+
card: {
|
|
45
|
+
borderRadius: radius.lg,
|
|
46
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
47
|
+
borderColor: palette.border,
|
|
48
|
+
backgroundColor: palette.white
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=global.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","palette","radius","globalStyles","create","screen","flex","backgroundColor","white","fill","iconButton","width","height","borderRadius","alignItems","justifyContent","pressed","opacity","divider","hairlineWidth","borderSoft","card","lg","borderWidth","borderColor","border"],"sourceRoot":"../../../../src","sources":["ui/styles/global.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,QAAQ,cAAc;AAEzC,SAASC,OAAO,EAAEC,MAAM,QAAQ,YAAS;AAEzC,OAAO,MAAMC,YAAY,GAAGH,UAAU,CAACI,MAAM,CAAC;EAC5C;EACAC,MAAM,EAAE;IACNC,IAAI,EAAE,CAAC;IACPC,eAAe,EAAEN,OAAO,CAACO;EAC3B,CAAC;EACD;EACAC,IAAI,EAAE;IACJH,IAAI,EAAE;EACR,CAAC;EACD;EACAI,UAAU,EAAE;IACVC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACD;EACAC,OAAO,EAAE;IACPC,OAAO,EAAE;EACX,CAAC;EACD;EACAC,OAAO,EAAE;IACPN,MAAM,EAAEZ,UAAU,CAACmB,aAAa;IAChCZ,eAAe,EAAEN,OAAO,CAACmB;EAC3B,CAAC;EACD;EACAC,IAAI,EAAE;IACJR,YAAY,EAAEX,MAAM,CAACoB,EAAE;IACvBC,WAAW,EAAEvB,UAAU,CAACmB,aAAa;IACrCK,WAAW,EAAEvB,OAAO,CAACwB,MAAM;IAC3BlB,eAAe,EAAEN,OAAO,CAACO;EAC3B;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Maps the widget's `GET /config` theming fields onto React Native styles.
|
|
5
|
+
*
|
|
6
|
+
* The palette mirrors the web widget so a workspace looks the same on both
|
|
7
|
+
* surfaces; type scales are nudged up because 13px body copy is unreadable on
|
|
8
|
+
* a phone (minimum readable body size is 15–16px).
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export const palette = {
|
|
12
|
+
white: '#ffffff',
|
|
13
|
+
ink: '#1a1a1a',
|
|
14
|
+
text: '#111827',
|
|
15
|
+
textMuted: '#6b7280',
|
|
16
|
+
textSubtle: '#9ca3af',
|
|
17
|
+
textFaint: '#b0b0b0',
|
|
18
|
+
border: '#e5e7eb',
|
|
19
|
+
borderSoft: '#f3f4f6',
|
|
20
|
+
surface: '#f9fafb',
|
|
21
|
+
surfaceAlt: '#f3f4f6',
|
|
22
|
+
danger: '#ef4444',
|
|
23
|
+
warningBg: '#fef3c7',
|
|
24
|
+
warningBorder: '#fde68a',
|
|
25
|
+
warningText: '#92400e',
|
|
26
|
+
warningIcon: '#d97706',
|
|
27
|
+
online: '#22c55e',
|
|
28
|
+
disabled: '#d1d5db'
|
|
29
|
+
};
|
|
30
|
+
export const radius = {
|
|
31
|
+
sm: 8,
|
|
32
|
+
md: 10,
|
|
33
|
+
lg: 12,
|
|
34
|
+
xl: 14,
|
|
35
|
+
pill: 999
|
|
36
|
+
};
|
|
37
|
+
export const spacing = {
|
|
38
|
+
xs: 4,
|
|
39
|
+
sm: 8,
|
|
40
|
+
md: 12,
|
|
41
|
+
lg: 16,
|
|
42
|
+
xl: 20,
|
|
43
|
+
xxl: 24
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** Mobile type scale — one step larger than the web widget's. */
|
|
47
|
+
export const fontSize = {
|
|
48
|
+
micro: 10,
|
|
49
|
+
caption: 12,
|
|
50
|
+
meta: 13,
|
|
51
|
+
body: 15,
|
|
52
|
+
input: 16,
|
|
53
|
+
title: 17,
|
|
54
|
+
heading: 22,
|
|
55
|
+
display: 28
|
|
56
|
+
};
|
|
57
|
+
export const DEFAULT_PRIMARY_COLOR = '#0d9488';
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* `override` supplies a translation for the active locale when one exists.
|
|
61
|
+
* Without it the workspace's single-language config fields are used, which is
|
|
62
|
+
* correct for the default locale and wrong for every other one.
|
|
63
|
+
*/
|
|
64
|
+
// Copy the dashboard owns — the greeting, the card labels — is rendered
|
|
65
|
+
// exactly as the workspace typed it. Translating it is the dashboard's job.
|
|
66
|
+
export function buildTheme(config) {
|
|
67
|
+
return {
|
|
68
|
+
primaryColor: config?.primaryColor || DEFAULT_PRIMARY_COLOR,
|
|
69
|
+
position: config?.position || 'right',
|
|
70
|
+
isOnline: config?.isOnline ?? true,
|
|
71
|
+
offlineMessage: config && !config.isOnline && config.businessHoursEnabled && config.offlineMessage ? config.offlineMessage : undefined,
|
|
72
|
+
startConversationLabel: config?.startConversationLabel || 'Send us a message',
|
|
73
|
+
replyTimeLabel: config?.replyTimeLabel || 'We usually reply within a few minutes',
|
|
74
|
+
allowNewConversations: config?.allowNewConversations ?? true,
|
|
75
|
+
showPreviousConversations: config?.showPreviousConversations ?? true,
|
|
76
|
+
attachmentsEnabled: config?.attachmentsEnabled ?? true,
|
|
77
|
+
preChatEnabled: config?.preChatEnabled ?? false
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** `#rrggbb` → `rgba(r, g, b, alpha)`; passes non-hex colors straight through. */
|
|
82
|
+
export function withAlpha(color, alpha) {
|
|
83
|
+
const rgb = hexToRgb(color);
|
|
84
|
+
if (!rgb) return color;
|
|
85
|
+
return `rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, ${alpha})`;
|
|
86
|
+
}
|
|
87
|
+
export function hexToRgb(color) {
|
|
88
|
+
const match = /^#?([a-f\d]{3}|[a-f\d]{6})$/i.exec(color.trim());
|
|
89
|
+
if (!match) return null;
|
|
90
|
+
let hex = match[1];
|
|
91
|
+
if (hex.length === 3) {
|
|
92
|
+
hex = hex.split('').map(char => char + char).join('');
|
|
93
|
+
}
|
|
94
|
+
const value = parseInt(hex, 16);
|
|
95
|
+
return [value >> 16 & 255, value >> 8 & 255, value & 255];
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** Linear blend between two hex colors, used to fake gradients without a native lib. */
|
|
99
|
+
export function mixHex(from, to, ratio) {
|
|
100
|
+
const a = hexToRgb(from);
|
|
101
|
+
const b = hexToRgb(to);
|
|
102
|
+
if (!a || !b) return from;
|
|
103
|
+
const channel = index => Math.round(a[index] + (b[index] - a[index]) * ratio);
|
|
104
|
+
return `rgb(${channel(0)}, ${channel(1)}, ${channel(2)})`;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** Pick readable foreground text for an arbitrary brand color. */
|
|
108
|
+
export function contrastingTextColor(background) {
|
|
109
|
+
const rgb = hexToRgb(background);
|
|
110
|
+
if (!rgb) return palette.white;
|
|
111
|
+
const [r, g, b] = rgb;
|
|
112
|
+
const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
|
|
113
|
+
return luminance > 0.7 ? palette.ink : palette.white;
|
|
114
|
+
}
|
|
115
|
+
export const shadows = {
|
|
116
|
+
card: {
|
|
117
|
+
shadowColor: '#0f172a',
|
|
118
|
+
shadowOffset: {
|
|
119
|
+
width: 0,
|
|
120
|
+
height: 4
|
|
121
|
+
},
|
|
122
|
+
shadowOpacity: 0.08,
|
|
123
|
+
shadowRadius: 14,
|
|
124
|
+
elevation: 3
|
|
125
|
+
},
|
|
126
|
+
floating: {
|
|
127
|
+
shadowColor: '#000000',
|
|
128
|
+
shadowOffset: {
|
|
129
|
+
width: 0,
|
|
130
|
+
height: 4
|
|
131
|
+
},
|
|
132
|
+
shadowOpacity: 0.15,
|
|
133
|
+
shadowRadius: 12,
|
|
134
|
+
elevation: 6
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["palette","white","ink","text","textMuted","textSubtle","textFaint","border","borderSoft","surface","surfaceAlt","danger","warningBg","warningBorder","warningText","warningIcon","online","disabled","radius","sm","md","lg","xl","pill","spacing","xs","xxl","fontSize","micro","caption","meta","body","input","title","heading","display","DEFAULT_PRIMARY_COLOR","buildTheme","config","primaryColor","position","isOnline","offlineMessage","businessHoursEnabled","undefined","startConversationLabel","replyTimeLabel","allowNewConversations","showPreviousConversations","attachmentsEnabled","preChatEnabled","withAlpha","color","alpha","rgb","hexToRgb","match","exec","trim","hex","length","split","map","char","join","value","parseInt","mixHex","from","to","ratio","a","b","channel","index","Math","round","contrastingTextColor","background","r","g","luminance","shadows","card","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","floating"],"sourceRoot":"../../../../src","sources":["ui/styles/theme.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,MAAMA,OAAO,GAAG;EACrBC,KAAK,EAAE,SAAS;EAChBC,GAAG,EAAE,SAAS;EACdC,IAAI,EAAE,SAAS;EACfC,SAAS,EAAE,SAAS;EACpBC,UAAU,EAAE,SAAS;EACrBC,SAAS,EAAE,SAAS;EACpBC,MAAM,EAAE,SAAS;EACjBC,UAAU,EAAE,SAAS;EACrB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