@bootdesk/js-web-adapter-react 0.1.0 → 0.3.4

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 CHANGED
@@ -70,6 +70,23 @@ The card system renders platform-agnostic `PHPCard` objects (sections, fields, a
70
70
  </CardProvider>
71
71
  ```
72
72
 
73
+ ## Pre-Entry Screen
74
+
75
+ Show a custom form (name, email, verification code, etc.) before the conversation starts. The developer controls all logic — validation, API calls, waiting for user confirmation. Call `start(config?)` when ready, and the widget reconfigures the client and transitions to normal chat.
76
+
77
+ ```tsx
78
+ <ChatWidget
79
+ client={client}
80
+ preEntry={({ start }) => (
81
+ <PreEntryForm onReady={(data) => {
82
+ start({ userId: data.id, userName: data.name, verifyToken: data.token });
83
+ }} />
84
+ )}
85
+ />
86
+ ```
87
+
88
+ The `config` passed to `start()` is forwarded to `client.reconfigure()`, which updates `userId`, `userName`, `verifyToken`, `conversationId`, and custom `headers`. Messages only begin loading after `start()` is called.
89
+
73
90
  ## Theming
74
91
 
75
92
  Set CSS variables on your root element: