@trycourier/courier-react 8.0.29 → 8.1.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 +16 -406
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -1
- package/dist/jest.setup.d.ts +0 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,42 +1,27 @@
|
|
|
1
1
|
<img width="1040" alt="courier-react" src="https://github.com/user-attachments/assets/e886b445-d106-4dab-afca-82183e0fcbe7" />
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Using React 17?** Use the [@trycourier/courier-react-17](../courier-react-17/) package.
|
|
4
|
+
|
|
5
|
+
**Not using React?** Use the [@trycourier/courier-ui-inbox](../courier-ui-inbox/) package.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
4
8
|
|
|
5
9
|
```sh
|
|
6
10
|
npm install @trycourier/courier-react
|
|
7
11
|
```
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## 2. Authenticate
|
|
12
|
-
|
|
13
|
-
To use the SDK, you need to generate a JWT (JSON Web Token) for your user. **This JWT should always be generated by your backend server, never in client-side code.**
|
|
14
|
-
|
|
15
|
-
**How it works:**
|
|
13
|
+
## Usage
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
- When your app needs to authenticate a user, your frontend should make a request to your own backend (e.g., `/api/generate-courier-jwt`).
|
|
15
|
+
Check out the [Courier documentation](https://www.courier.com/docs/sdk-libraries/courier-react-web) for a full guide to Courier React.
|
|
19
16
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
If you’re coming from an earlier version of the Courier React SDK,
|
|
18
|
+
check out [the v8 migration guide](https://www.courier.com/docs/sdk-libraries/courier-react-v8-migration-guide)
|
|
19
|
+
for what’s changed, how to upgrade your app,
|
|
20
|
+
and links to documentation for past versions of the React SDK.
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
## Examples
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
curl --request POST \
|
|
28
|
-
--url https://api.courier.com/auth/issue-token \
|
|
29
|
-
--header 'Accept: application/json' \
|
|
30
|
-
--header 'Authorization: Bearer $YOUR_API_KEY' \
|
|
31
|
-
--header 'Content-Type: application/json' \
|
|
32
|
-
--data \
|
|
33
|
-
'{
|
|
34
|
-
"scope": "user_id:$YOUR_USER_ID write:user-tokens inbox:read:messages inbox:write:events read:preferences write:preferences read:brands",
|
|
35
|
-
"expires_in": "$YOUR_NUMBER days"
|
|
36
|
-
}'
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## 3. Add Inbox Component
|
|
24
|
+
Below are a few examples of the Courier Inbox. Visit the [Courier documentation](https://www.courier.com/docs/sdk-libraries/courier-react-web) for more examples.
|
|
40
25
|
|
|
41
26
|
### `CourierInbox`
|
|
42
27
|
|
|
@@ -98,383 +83,8 @@ export default function App() {
|
|
|
98
83
|
}
|
|
99
84
|
```
|
|
100
85
|
|
|
101
|
-
##
|
|
102
|
-
|
|
103
|
-
`courier-react` only supports client side rendering. You will need to add `'use client'` to the top of any file that will use `CourierInbox` or `CourierInboxPopupMenu`.
|
|
104
|
-
|
|
105
|
-
```ts
|
|
106
|
-
'use client'
|
|
107
|
-
|
|
108
|
-
...
|
|
109
|
-
import { ..., CourierInboxPopupMenu } from '@trycourier/courier-react';
|
|
110
|
-
|
|
111
|
-
export default function Page() {
|
|
112
|
-
|
|
113
|
-
...
|
|
114
|
-
|
|
115
|
-
return <CourierInboxPopupMenu />;
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
## Handle Clicks and Presses
|
|
121
|
-
|
|
122
|
-
```ts
|
|
123
|
-
import { useEffect } from 'react';
|
|
124
|
-
import { CourierInbox, useCourier, type CourierInboxListItemFactoryProps, type CourierInboxListItemActionFactoryProps } from '@trycourier/courier-react';
|
|
125
|
-
|
|
126
|
-
export default function App() {
|
|
127
|
-
|
|
128
|
-
const courier = useCourier();
|
|
129
|
-
|
|
130
|
-
useEffect(() => {
|
|
131
|
-
// Generate a JWT for your user (do this on your backend server)
|
|
132
|
-
const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT
|
|
133
|
-
|
|
134
|
-
// Authenticate the user with the inbox
|
|
135
|
-
courier.shared.signIn({
|
|
136
|
-
userId: $YOUR_USER_ID,
|
|
137
|
-
jwt: jwt,
|
|
138
|
-
});
|
|
139
|
-
}, []);
|
|
140
|
-
|
|
141
|
-
return (
|
|
142
|
-
<CourierInbox
|
|
143
|
-
onMessageClick={({ message, index }: CourierInboxListItemFactoryProps) => {
|
|
144
|
-
alert("Message clicked at index " + index + ":\n" + JSON.stringify(message, null, 2));
|
|
145
|
-
}}
|
|
146
|
-
onMessageActionClick={({ message, action, index }: CourierInboxListItemActionFactoryProps) => {
|
|
147
|
-
alert(
|
|
148
|
-
"Message action clicked at index " + index + ":\n" +
|
|
149
|
-
"Action: " + JSON.stringify(action, null, 2) + "\n" +
|
|
150
|
-
"Message: " + JSON.stringify(message, null, 2)
|
|
151
|
-
);
|
|
152
|
-
}}
|
|
153
|
-
onMessageLongPress={({ message, index }: CourierInboxListItemFactoryProps) => {
|
|
154
|
-
// Handle message long presses. **Only works on devices that support javascript's touch events. This will not work with a mouse cursor.**
|
|
155
|
-
alert("Message long pressed at index " + index + ":\n" + JSON.stringify(message, null, 2));
|
|
156
|
-
}}
|
|
157
|
-
/>
|
|
158
|
-
);
|
|
159
|
-
|
|
160
|
-
}
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
## Styles and Theming
|
|
164
|
-
|
|
165
|
-
### Light & Dark Themes
|
|
166
|
-
|
|
167
|
-
The fastest way to style the Inbox to match your app. This example shows unread indicator styling, but you can customize fonts, icons, text, and more.
|
|
168
|
-
|
|
169
|
-
> **🎨 Theme Reference:** [All available theme values](../courier-ui-inbox/docs/theme.md)
|
|
170
|
-
|
|
171
|
-
<img width="688" alt="Screenshot 2025-06-25 at 5 38 07 PM" src="https://github.com/user-attachments/assets/d1440494-ee66-4ff6-850b-c1a13691cf2f" />
|
|
172
|
-
|
|
173
|
-
```ts
|
|
174
|
-
import { CourierInbox, ..., type CourierInboxTheme } from '@trycourier/courier-react';
|
|
175
|
-
|
|
176
|
-
export default function App() {
|
|
177
|
-
...
|
|
178
|
-
|
|
179
|
-
const theme: CourierInboxTheme = {
|
|
180
|
-
inbox: {
|
|
181
|
-
header: {
|
|
182
|
-
filters: {
|
|
183
|
-
unreadIndicator: {
|
|
184
|
-
backgroundColor: '#8B5CF6',
|
|
185
|
-
},
|
|
186
|
-
},
|
|
187
|
-
},
|
|
188
|
-
list: {
|
|
189
|
-
item: {
|
|
190
|
-
unreadIndicatorColor: '#8B5CF6',
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
return <CourierInbox lightTheme={theme} darkTheme={theme} mode="light" />;
|
|
197
|
-
}
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### Popup Alignment, Positioning, and Dimensions
|
|
201
|
-
|
|
202
|
-
```ts
|
|
203
|
-
export default function App() {
|
|
204
|
-
|
|
205
|
-
...
|
|
206
|
-
|
|
207
|
-
return (
|
|
208
|
-
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', padding: '100px' }}>
|
|
209
|
-
<CourierInboxPopupMenu
|
|
210
|
-
popupAlignment="top-right" // 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center' | 'center-right' | 'center-left' | 'center-center'
|
|
211
|
-
popupWidth="340px"
|
|
212
|
-
popupHeight="400px"
|
|
213
|
-
top="44px"
|
|
214
|
-
right="44px"
|
|
215
|
-
/>
|
|
216
|
-
</div>
|
|
217
|
-
);
|
|
218
|
-
|
|
219
|
-
}
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
### Custom height `CourierInbox`
|
|
223
|
-
|
|
224
|
-
> **Important:** The default `CourierInbox` height is auto. It will set it's height based on it's children.
|
|
225
|
-
|
|
226
|
-
```ts
|
|
227
|
-
<CourierInbox height='50vh' />
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
## Custom Elements
|
|
231
|
-
|
|
232
|
-
Customize the inbox UI with any element you want.
|
|
233
|
-
|
|
234
|
-
### List Items
|
|
235
|
-
|
|
236
|
-
<img width="688" alt="Screenshot 2025-06-25 at 6 25 17 PM" src="https://github.com/user-attachments/assets/075a568b-5538-4116-bb3d-752ecc5dea2c" />
|
|
237
|
-
|
|
238
|
-
```ts
|
|
239
|
-
import { CourierInbox, ..., type CourierInboxListItemFactoryProps } from '@trycourier/courier-react'
|
|
240
|
-
|
|
241
|
-
const CustomListItem = ({ message, index }: CourierInboxListItemFactoryProps) => (
|
|
242
|
-
<pre style={{
|
|
243
|
-
padding: '24px',
|
|
244
|
-
borderBottom: '1px solid #e0e0e0',
|
|
245
|
-
margin: '0'
|
|
246
|
-
}}>
|
|
247
|
-
{JSON.stringify({ message, index }, null, 2)}
|
|
248
|
-
</pre>
|
|
249
|
-
);
|
|
250
|
-
|
|
251
|
-
export default function App() {
|
|
252
|
-
|
|
253
|
-
...
|
|
254
|
-
|
|
255
|
-
return (
|
|
256
|
-
<CourierInbox
|
|
257
|
-
renderListItem={(props: CourierInboxListItemFactoryProps) => {
|
|
258
|
-
return <CustomListItem {...props} />
|
|
259
|
-
}}
|
|
260
|
-
/>
|
|
261
|
-
);
|
|
262
|
-
|
|
263
|
-
}
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
### Header
|
|
267
|
-
|
|
268
|
-
<img width="688" alt="Screenshot 2025-06-25 at 6 35 59 PM" src="https://github.com/user-attachments/assets/25d45ac1-32e6-4e98-baf1-d0df34cef72a" />
|
|
269
|
-
|
|
270
|
-
```ts
|
|
271
|
-
import { CourierInbox, ..., type CourierInboxHeaderFactoryProps } from '@trycourier/courier-react'
|
|
272
|
-
|
|
273
|
-
const CustomHeader = (props: CourierInboxHeaderFactoryProps) => (
|
|
274
|
-
<div style={{
|
|
275
|
-
background: 'red',
|
|
276
|
-
fontSize: '24px',
|
|
277
|
-
padding: '24px',
|
|
278
|
-
width: '100%'
|
|
279
|
-
}}>
|
|
280
|
-
{props.feedType}
|
|
281
|
-
</div>
|
|
282
|
-
);
|
|
283
|
-
|
|
284
|
-
export default function App() {
|
|
285
|
-
|
|
286
|
-
...
|
|
287
|
-
|
|
288
|
-
return (
|
|
289
|
-
<CourierInbox
|
|
290
|
-
renderHeader={(props: CourierInboxHeaderFactoryProps) => {
|
|
291
|
-
return <CustomHeader {...props} />
|
|
292
|
-
}}
|
|
293
|
-
/>
|
|
294
|
-
);
|
|
295
|
-
|
|
296
|
-
}
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
### Popup Menu Button
|
|
300
|
-
|
|
301
|
-
<img width="606" alt="Screenshot 2025-06-25 at 6 40 38 PM" src="https://github.com/user-attachments/assets/dfb0daca-f11d-420f-9dc7-0c14b49ab7db" />
|
|
302
|
-
|
|
303
|
-
```ts
|
|
304
|
-
import { CourierInboxPopupMenu, ..., type CourierInboxMenuButtonFactoryProps } from '@trycourier/courier-react'
|
|
305
|
-
|
|
306
|
-
const CustomMenuButton = ({ unreadCount }: CourierInboxMenuButtonFactoryProps) => (
|
|
307
|
-
<button>
|
|
308
|
-
Open the Inbox Popup. Unread message count: {unreadCount}
|
|
309
|
-
</button>
|
|
310
|
-
);
|
|
311
|
-
|
|
312
|
-
export default function App() {
|
|
313
|
-
|
|
314
|
-
...
|
|
315
|
-
|
|
316
|
-
return (
|
|
317
|
-
<div style={{ padding: '24px' }}>
|
|
318
|
-
<CourierInboxPopupMenu
|
|
319
|
-
renderMenuButton={(props: CourierInboxMenuButtonFactoryProps) => {
|
|
320
|
-
return <CustomMenuButton {...props} />
|
|
321
|
-
}}
|
|
322
|
-
/>
|
|
323
|
-
</div>
|
|
324
|
-
);
|
|
325
|
-
|
|
326
|
-
}
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
### Loading, Empty, Error & Pagination
|
|
330
|
-
|
|
331
|
-
```ts
|
|
332
|
-
import {
|
|
333
|
-
CourierInbox,
|
|
334
|
-
...,
|
|
335
|
-
type CourierInboxStateEmptyFactoryProps,
|
|
336
|
-
type CourierInboxStateLoadingFactoryProps,
|
|
337
|
-
type CourierInboxStateErrorFactoryProps,
|
|
338
|
-
type CourierInboxPaginationItemFactoryProps
|
|
339
|
-
} from '@trycourier/courier-react'
|
|
340
|
-
|
|
341
|
-
const CustomLoadingState = ({ feedType }: CourierInboxStateLoadingFactoryProps) => (
|
|
342
|
-
<div style={{
|
|
343
|
-
padding: '24px',
|
|
344
|
-
background: 'red',
|
|
345
|
-
textAlign: 'center'
|
|
346
|
-
}}>
|
|
347
|
-
Custom Loading State
|
|
348
|
-
</div>
|
|
349
|
-
);
|
|
350
|
-
|
|
351
|
-
const CustomEmptyState = ({ feedType }: CourierInboxStateEmptyFactoryProps) => (
|
|
352
|
-
<div style={{
|
|
353
|
-
padding: '24px',
|
|
354
|
-
background: 'green',
|
|
355
|
-
textAlign: 'center'
|
|
356
|
-
}}>
|
|
357
|
-
Custom Empty State
|
|
358
|
-
</div>
|
|
359
|
-
);
|
|
360
|
-
|
|
361
|
-
const CustomErrorState = ({ feedType, error }: CourierInboxStateErrorFactoryProps) => (
|
|
362
|
-
<div style={{
|
|
363
|
-
padding: '24px',
|
|
364
|
-
background: 'blue',
|
|
365
|
-
textAlign: 'center'
|
|
366
|
-
}}>
|
|
367
|
-
Custom Error State: {error.message}
|
|
368
|
-
</div>
|
|
369
|
-
);
|
|
370
|
-
|
|
371
|
-
const CustomPaginationItem = ({ feedType }: CourierInboxPaginationItemFactoryProps) => (
|
|
372
|
-
<div style={{
|
|
373
|
-
padding: '24px',
|
|
374
|
-
background: 'yellow',
|
|
375
|
-
textAlign: 'center'
|
|
376
|
-
}}>
|
|
377
|
-
Custom Pagination Item
|
|
378
|
-
</div>
|
|
379
|
-
);
|
|
380
|
-
|
|
381
|
-
export default function App() {
|
|
382
|
-
|
|
383
|
-
...
|
|
384
|
-
|
|
385
|
-
return (
|
|
386
|
-
<CourierInbox
|
|
387
|
-
renderLoadingState={(props: CourierInboxStateLoadingFactoryProps) => {
|
|
388
|
-
return <CustomLoadingState {...props} />
|
|
389
|
-
}}
|
|
390
|
-
renderEmptyState={(props: CourierInboxStateEmptyFactoryProps) => {
|
|
391
|
-
return <CustomEmptyState {...props} />
|
|
392
|
-
}}
|
|
393
|
-
renderErrorState={(props: CourierInboxStateErrorFactoryProps) => {
|
|
394
|
-
return <CustomErrorState {...props} />
|
|
395
|
-
}}
|
|
396
|
-
renderPaginationItem={(props: CourierInboxPaginationItemFactoryProps) => {
|
|
397
|
-
return <CustomPaginationItem {...props} />
|
|
398
|
-
}}
|
|
399
|
-
/>
|
|
400
|
-
);
|
|
401
|
-
|
|
402
|
-
}
|
|
403
|
-
```
|
|
404
|
-
|
|
405
|
-
### Available Hooks
|
|
406
|
-
|
|
407
|
-
```ts
|
|
408
|
-
import { useCourier } from '@trycourier/courier-react';
|
|
409
|
-
|
|
410
|
-
const { auth, inbox } = useCourier();
|
|
411
|
-
|
|
412
|
-
// Sign in & Sign out
|
|
413
|
-
useEffect(() => {
|
|
414
|
-
auth.signIn({
|
|
415
|
-
userId: '$YOUR_USER_ID',
|
|
416
|
-
jwt: jwt,
|
|
417
|
-
});
|
|
418
|
-
|
|
419
|
-
// To sign out, call:
|
|
420
|
-
auth.signOut();
|
|
421
|
-
}, [auth]);
|
|
422
|
-
|
|
423
|
-
// Log the signed-in user
|
|
424
|
-
useEffect(() => {
|
|
425
|
-
console.log('Current Courier User: ', auth.userId);
|
|
426
|
-
}, [auth.userId]);
|
|
427
|
-
|
|
428
|
-
// Inbox Hooks
|
|
429
|
-
useEffect(() => {
|
|
430
|
-
|
|
431
|
-
// Set how many messages get fetched when getting another page
|
|
432
|
-
inbox.setPaginationLimit(20);
|
|
433
|
-
|
|
434
|
-
// Reload a specific dataset in the inbox
|
|
435
|
-
inbox.load({ feedType: 'inbox', canUseCache: true });
|
|
436
|
-
|
|
437
|
-
// Fetch the next page of messages
|
|
438
|
-
inbox.fetchNextPageOfMessages({ feedType: 'inbox' }).then((data) => {
|
|
439
|
-
if (data) {
|
|
440
|
-
console.log('Next page of messages:', data);
|
|
441
|
-
}
|
|
442
|
-
});
|
|
443
|
-
|
|
444
|
-
// Mark all messages as read
|
|
445
|
-
inbox.readAllMessages();
|
|
446
|
-
|
|
447
|
-
// Log unread count and errors
|
|
448
|
-
if (inbox.unreadCount !== undefined) {
|
|
449
|
-
console.log('Unread messages:', inbox.unreadCount);
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
if (inbox.error) {
|
|
453
|
-
console.error('Inbox error:', inbox.error);
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
// Log inbox and archive datasets
|
|
457
|
-
if (inbox.inbox) {
|
|
458
|
-
console.log('Inbox dataset:', inbox.inbox);
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
if (inbox.archive) {
|
|
462
|
-
console.log('Archive dataset:', inbox.archive);
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
}, [
|
|
466
|
-
inbox,
|
|
467
|
-
inbox.inbox,
|
|
468
|
-
inbox.archive,
|
|
469
|
-
inbox.unreadCount,
|
|
470
|
-
inbox.error,
|
|
471
|
-
]);
|
|
472
|
-
```
|
|
473
|
-
|
|
474
|
-
> **Not using React?** We suggest you use [@trycourier/courier-ui-inbox](../courier-ui-inbox/README.md) package instead.
|
|
475
|
-
|
|
476
|
-
## **Share feedback with Courier**
|
|
86
|
+
## Share feedback with Courier
|
|
477
87
|
|
|
478
|
-
|
|
88
|
+
Have an idea or feedback about our SDKs? Let us know!
|
|
479
89
|
|
|
480
|
-
[Courier Web Issues](https://github.com/trycourier/courier-web/issues)
|
|
90
|
+
Open an issue: [Courier Web Issues](https://github.com/trycourier/courier-web/issues)
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@trycourier/courier-js"),r=require("react/jsx-runtime"),t=require("react"),o=require("@trycourier/courier-react-components"),n=require("react-dom"),i=require("react-dom/client"),u=require("@trycourier/courier-ui-inbox");function s(e){const r=document.createElement("div"),t=i.createRoot(r);n.flushSync((()=>{t.render(e)}));const o=r.firstElementChild;if(!(o instanceof HTMLElement))throw new Error("renderListItem must return a single JSX element that renders to an HTMLElement (e.g., <div>)");return o}const a=t.forwardRef(((e,t)=>r.jsx(o.CourierRenderContext.Provider,{value:s,children:r.jsx(o.CourierInboxComponent,{...e,ref:t})})));a.displayName="CourierInbox";const c=t.forwardRef(((e,t)=>r.jsx(o.CourierRenderContext.Provider,{value:s,children:r.jsx(o.CourierInboxPopupMenuComponent,{...e,ref:t})})));c.displayName="CourierInboxPopupMenu",e.Courier.shared.courierUserAgentName="courier-react",e.Courier.shared.courierUserAgentVersion="8.1.0",Object.defineProperty(exports,"useCourier",{enumerable:!0,get:()=>o.useCourier}),Object.defineProperty(exports,"archiveMessage",{enumerable:!0,get:()=>u.archiveMessage}),Object.defineProperty(exports,"clickMessage",{enumerable:!0,get:()=>u.clickMessage}),Object.defineProperty(exports,"defaultDarkTheme",{enumerable:!0,get:()=>u.defaultDarkTheme}),Object.defineProperty(exports,"defaultLightTheme",{enumerable:!0,get:()=>u.defaultLightTheme}),Object.defineProperty(exports,"markAsRead",{enumerable:!0,get:()=>u.markAsRead}),Object.defineProperty(exports,"markAsUnread",{enumerable:!0,get:()=>u.markAsUnread}),Object.defineProperty(exports,"mergeTheme",{enumerable:!0,get:()=>u.mergeTheme}),Object.defineProperty(exports,"openMessage",{enumerable:!0,get:()=>u.openMessage}),exports.CourierInbox=a,exports.CourierInboxPopupMenu=c;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/utils/render.tsx","../src/components/courier-inbox.tsx","../src/components/courier-inbox-popup-menu.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport { flushSync } from \"react-dom\";\nimport { createRoot } from \"react-dom/client\";\n\n/**\n * Converts a React node to an HTMLElement.\n * This function uses flushSync to ensure the DOM is updated synchronously.\n * @param node - The React node to convert.\n * @returns The converted HTMLElement.\n */\nexport function reactNodeToHTMLElement(node: ReactNode): HTMLElement {\n const container = document.createElement('div');\n\n // Use React 18 root\n const root = createRoot(container);\n flushSync(() => {\n root.render(node);\n });\n\n // Wait until React mounts the content synchronously\n const element = container.firstElementChild;\n if (!(element instanceof HTMLElement)) {\n throw new Error(\n 'renderListItem must return a single JSX element that renders to an HTMLElement (e.g., <div>)'\n );\n }\n\n return element;\n}\n","import { forwardRef } from \"react\";\nimport { CourierInbox as CourierInboxElement } from \"@trycourier/courier-ui-inbox\";\nimport { CourierInboxComponent, CourierInboxProps, CourierRenderContext } from \"@trycourier/courier-react-components\";\nimport { reactNodeToHTMLElement } from \"../utils/render\";\n\n/**\n * CourierInbox React component.\n *\n * @example\n * ```tsx\n * const courier = useCourier();\n *\n * useEffect(() => {\n * // Generate a JWT for your user (do this on your backend server)\n * const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT\n *\n * // Authenticate the user with the inbox\n * courier.shared.signIn({\n * userId: $YOUR_USER_ID,\n * jwt: jwt,\n * });\n * }, []);\n *\n * return <CourierInbox />;\n * ```\n */\nexport const CourierInbox = forwardRef<CourierInboxElement, CourierInboxProps>((props, ref) => {\n return (\n <CourierRenderContext.Provider value={reactNodeToHTMLElement}>\n <CourierInboxComponent {...props} ref={ref} />\n </CourierRenderContext.Provider>\n );\n});\n\nCourierInbox.displayName = 'CourierInbox';\n","import { forwardRef } from \"react\";\nimport { CourierInboxPopupMenu as CourierInboxPopupMenuElement } from \"@trycourier/courier-ui-inbox\";\nimport { CourierInboxPopupMenuComponent, CourierInboxPopupMenuProps, CourierRenderContext } from \"@trycourier/courier-react-components\";\nimport { reactNodeToHTMLElement } from \"../utils/render\";\n\n/**\n * CourierInboxPopupMenu React component.\n *\n * This component is used to display a popup menu for a message in the inbox.\n *\n * @example\n * ```tsx\n * const courier = useCourier();\n *\n * useEffect(() => {\n * // Generate a JWT for your user (do this on your backend server)\n * const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT\n *\n * // Authenticate the user with the inbox\n * courier.shared.signIn({\n * userId: $YOUR_USER_ID,\n * jwt: jwt,\n * });\n * }, []);\n *\n * return <CourierInboxPopupMenu />;\n * ```\n */\nexport const CourierInboxPopupMenu = forwardRef<CourierInboxPopupMenuElement, CourierInboxPopupMenuProps>((props, ref) => {\n return (\n <CourierRenderContext.Provider value={reactNodeToHTMLElement}>\n <CourierInboxPopupMenuComponent {...props} ref={ref} />\n </CourierRenderContext.Provider>\n );\n});\n\nCourierInboxPopupMenu.displayName = 'CourierInboxPopupMenu';\n"],"names":["reactNodeToHTMLElement","node","container","document","createElement","root","createRoot","flushSync","render","element","firstElementChild","HTMLElement","Error","CourierInbox","forwardRef","props","ref","jsx","CourierRenderContext","Provider","value","children","CourierInboxComponent","displayName","CourierInboxPopupMenu","CourierInboxPopupMenuComponent"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/utils/render.tsx","../src/components/courier-inbox.tsx","../src/components/courier-inbox-popup-menu.tsx","../src/index.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport { flushSync } from \"react-dom\";\nimport { createRoot } from \"react-dom/client\";\n\n/**\n * Converts a React node to an HTMLElement.\n * This function uses flushSync to ensure the DOM is updated synchronously.\n * @param node - The React node to convert.\n * @returns The converted HTMLElement.\n */\nexport function reactNodeToHTMLElement(node: ReactNode): HTMLElement {\n const container = document.createElement('div');\n\n // Use React 18 root\n const root = createRoot(container);\n flushSync(() => {\n root.render(node);\n });\n\n // Wait until React mounts the content synchronously\n const element = container.firstElementChild;\n if (!(element instanceof HTMLElement)) {\n throw new Error(\n 'renderListItem must return a single JSX element that renders to an HTMLElement (e.g., <div>)'\n );\n }\n\n return element;\n}\n","import { forwardRef } from \"react\";\nimport { CourierInbox as CourierInboxElement } from \"@trycourier/courier-ui-inbox\";\nimport { CourierInboxComponent, CourierInboxProps, CourierRenderContext } from \"@trycourier/courier-react-components\";\nimport { reactNodeToHTMLElement } from \"../utils/render\";\n\n/**\n * CourierInbox React component.\n *\n * @example\n * ```tsx\n * const courier = useCourier();\n *\n * useEffect(() => {\n * // Generate a JWT for your user (do this on your backend server)\n * const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT\n *\n * // Authenticate the user with the inbox\n * courier.shared.signIn({\n * userId: $YOUR_USER_ID,\n * jwt: jwt,\n * });\n * }, []);\n *\n * return <CourierInbox />;\n * ```\n */\nexport const CourierInbox = forwardRef<CourierInboxElement, CourierInboxProps>((props, ref) => {\n return (\n <CourierRenderContext.Provider value={reactNodeToHTMLElement}>\n <CourierInboxComponent {...props} ref={ref} />\n </CourierRenderContext.Provider>\n );\n});\n\nCourierInbox.displayName = 'CourierInbox';\n","import { forwardRef } from \"react\";\nimport { CourierInboxPopupMenu as CourierInboxPopupMenuElement } from \"@trycourier/courier-ui-inbox\";\nimport { CourierInboxPopupMenuComponent, CourierInboxPopupMenuProps, CourierRenderContext } from \"@trycourier/courier-react-components\";\nimport { reactNodeToHTMLElement } from \"../utils/render\";\n\n/**\n * CourierInboxPopupMenu React component.\n *\n * This component is used to display a popup menu for a message in the inbox.\n *\n * @example\n * ```tsx\n * const courier = useCourier();\n *\n * useEffect(() => {\n * // Generate a JWT for your user (do this on your backend server)\n * const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT\n *\n * // Authenticate the user with the inbox\n * courier.shared.signIn({\n * userId: $YOUR_USER_ID,\n * jwt: jwt,\n * });\n * }, []);\n *\n * return <CourierInboxPopupMenu />;\n * ```\n */\nexport const CourierInboxPopupMenu = forwardRef<CourierInboxPopupMenuElement, CourierInboxPopupMenuProps>((props, ref) => {\n return (\n <CourierRenderContext.Provider value={reactNodeToHTMLElement}>\n <CourierInboxPopupMenuComponent {...props} ref={ref} />\n </CourierRenderContext.Provider>\n );\n});\n\nCourierInboxPopupMenu.displayName = 'CourierInboxPopupMenu';\n","import { Courier } from '@trycourier/courier-js';\n\nCourier.shared.courierUserAgentName = \"courier-react\";\nCourier.shared.courierUserAgentVersion = __PACKAGE_VERSION__;\n\nexport { CourierInbox } from './components/courier-inbox';\nexport { CourierInboxPopupMenu } from './components/courier-inbox-popup-menu';\n\nexport { useCourier } from '@trycourier/courier-react-components';\n\nexport type {\n CourierInboxProps,\n CourierInboxPopupMenuProps,\n} from '@trycourier/courier-react-components';\n\n// Re-export types from courier-js\nexport type {\n CourierProps,\n CourierClientOptions,\n CourierBrand,\n CourierApiUrls,\n CourierUserPreferences,\n CourierUserPreferencesStatus,\n CourierUserPreferencesChannel,\n CourierUserPreferencesPaging,\n CourierUserPreferencesTopic,\n CourierUserPreferencesTopicResponse,\n CourierDevice,\n CourierToken,\n CourierGetInboxMessageResponse,\n CourierGetInboxMessagesResponse,\n InboxMessage,\n InboxAction,\n InboxMessageEventEnvelope,\n} from '@trycourier/courier-js';\n\n// Re-export utility functions from courier-ui-inbox\nexport {\n markAsRead,\n markAsUnread,\n clickMessage,\n archiveMessage,\n openMessage\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export factory prop types from courier-ui-inbox\nexport type {\n CourierInboxHeaderFactoryProps,\n CourierInboxStateLoadingFactoryProps,\n CourierInboxStateEmptyFactoryProps,\n CourierInboxStateErrorFactoryProps,\n CourierInboxListItemFactoryProps,\n CourierInboxListItemActionFactoryProps,\n CourierInboxPaginationItemFactoryProps,\n CourierInboxMenuButtonFactoryProps,\n CourierInboxFeedType\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export theme types from courier-ui-inbox\nexport type {\n CourierInboxTheme,\n CourierInboxFontTheme,\n CourierInboxIconTheme,\n CourierInboxFilterItemTheme,\n CourierInboxUnreadCountIndicatorTheme,\n CourierInboxUnreadDotIndicatorTheme,\n CourierInboxIconButtonTheme,\n CourierInboxButtonTheme,\n CourierInboxMenuButtonTheme,\n CourierInboxPopupTheme,\n CourierInboxListItemTheme,\n CourierInboxSkeletonLoadingStateTheme,\n CourierInboxInfoStateTheme,\n CourierMenuItemTheme,\n CourierFilterMenuTheme,\n CourierActionMenuTheme\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export theme utilities from courier-ui-inbox\nexport {\n defaultLightTheme,\n defaultDarkTheme,\n mergeTheme\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export element types from courier-ui-inbox\nexport type { CourierInbox as CourierInboxElement } from '@trycourier/courier-ui-inbox';\nexport type { CourierInboxPopupMenu as CourierInboxPopupMenuElement } from '@trycourier/courier-ui-inbox';\n\n// Re-export types from courier-ui-core\nexport type {\n CourierComponentThemeMode\n} from '@trycourier/courier-ui-core'\n"],"names":["reactNodeToHTMLElement","node","container","document","createElement","root","createRoot","flushSync","render","element","firstElementChild","HTMLElement","Error","CourierInbox","forwardRef","props","ref","jsx","CourierRenderContext","Provider","value","children","CourierInboxComponent","displayName","CourierInboxPopupMenu","CourierInboxPopupMenuComponent","Courier","shared","courierUserAgentName","courierUserAgentVersion"],"mappings":"6TAUO,SAASA,EAAuBC,GACrC,MAAMC,EAAYC,SAASC,cAAc,OAGnCC,EAAOC,EAAAA,WAAWJ,GACxBK,EAAAA,WAAU,KACRF,EAAKG,OAAOP,EAAI,IAIlB,MAAMQ,EAAUP,EAAUQ,kBAC1B,KAAMD,aAAmBE,aACvB,MAAM,IAAIC,MACR,gGAIJ,OAAOH,CACT,CCFO,MAAMI,EAAeC,EAAAA,YAAmD,CAACC,EAAOC,MAEnFC,IAACC,EAAAA,qBAAqBC,SAArB,CAA8BC,MAAOpB,EACpCqB,WAAAJ,IAACK,EAAAA,sBAAA,IAA0BP,EAAOC,YAKxCH,EAAaU,YAAc,eCNpB,MAAMC,EAAwBV,EAAAA,YAAqE,CAACC,EAAOC,MAE9GC,IAACC,EAAAA,qBAAqBC,SAArB,CAA8BC,MAAOpB,EACpCqB,WAAAJ,IAACQ,EAAAA,+BAAA,IAAmCV,EAAOC,YAKjDQ,EAAsBD,YAAc,wBClCpCG,EAAAA,QAAQC,OAAOC,qBAAuB,gBACtCF,EAAAA,QAAQC,OAAOE,wBAA0B"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Courier } from "@trycourier/courier-js";
|
|
1
2
|
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { forwardRef } from "react";
|
|
3
4
|
import { CourierRenderContext, CourierInboxComponent, CourierInboxPopupMenuComponent } from "@trycourier/courier-react-components";
|
|
@@ -27,6 +28,8 @@ const CourierInboxPopupMenu = forwardRef((props, ref) => {
|
|
|
27
28
|
return /* @__PURE__ */ jsx(CourierRenderContext.Provider, { value: reactNodeToHTMLElement, children: /* @__PURE__ */ jsx(CourierInboxPopupMenuComponent, { ...props, ref }) });
|
|
28
29
|
});
|
|
29
30
|
CourierInboxPopupMenu.displayName = "CourierInboxPopupMenu";
|
|
31
|
+
Courier.shared.courierUserAgentName = "courier-react";
|
|
32
|
+
Courier.shared.courierUserAgentVersion = "8.1.0";
|
|
30
33
|
export {
|
|
31
34
|
CourierInbox,
|
|
32
35
|
CourierInboxPopupMenu,
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/utils/render.tsx","../src/components/courier-inbox.tsx","../src/components/courier-inbox-popup-menu.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport { flushSync } from \"react-dom\";\nimport { createRoot } from \"react-dom/client\";\n\n/**\n * Converts a React node to an HTMLElement.\n * This function uses flushSync to ensure the DOM is updated synchronously.\n * @param node - The React node to convert.\n * @returns The converted HTMLElement.\n */\nexport function reactNodeToHTMLElement(node: ReactNode): HTMLElement {\n const container = document.createElement('div');\n\n // Use React 18 root\n const root = createRoot(container);\n flushSync(() => {\n root.render(node);\n });\n\n // Wait until React mounts the content synchronously\n const element = container.firstElementChild;\n if (!(element instanceof HTMLElement)) {\n throw new Error(\n 'renderListItem must return a single JSX element that renders to an HTMLElement (e.g., <div>)'\n );\n }\n\n return element;\n}\n","import { forwardRef } from \"react\";\nimport { CourierInbox as CourierInboxElement } from \"@trycourier/courier-ui-inbox\";\nimport { CourierInboxComponent, CourierInboxProps, CourierRenderContext } from \"@trycourier/courier-react-components\";\nimport { reactNodeToHTMLElement } from \"../utils/render\";\n\n/**\n * CourierInbox React component.\n *\n * @example\n * ```tsx\n * const courier = useCourier();\n *\n * useEffect(() => {\n * // Generate a JWT for your user (do this on your backend server)\n * const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT\n *\n * // Authenticate the user with the inbox\n * courier.shared.signIn({\n * userId: $YOUR_USER_ID,\n * jwt: jwt,\n * });\n * }, []);\n *\n * return <CourierInbox />;\n * ```\n */\nexport const CourierInbox = forwardRef<CourierInboxElement, CourierInboxProps>((props, ref) => {\n return (\n <CourierRenderContext.Provider value={reactNodeToHTMLElement}>\n <CourierInboxComponent {...props} ref={ref} />\n </CourierRenderContext.Provider>\n );\n});\n\nCourierInbox.displayName = 'CourierInbox';\n","import { forwardRef } from \"react\";\nimport { CourierInboxPopupMenu as CourierInboxPopupMenuElement } from \"@trycourier/courier-ui-inbox\";\nimport { CourierInboxPopupMenuComponent, CourierInboxPopupMenuProps, CourierRenderContext } from \"@trycourier/courier-react-components\";\nimport { reactNodeToHTMLElement } from \"../utils/render\";\n\n/**\n * CourierInboxPopupMenu React component.\n *\n * This component is used to display a popup menu for a message in the inbox.\n *\n * @example\n * ```tsx\n * const courier = useCourier();\n *\n * useEffect(() => {\n * // Generate a JWT for your user (do this on your backend server)\n * const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT\n *\n * // Authenticate the user with the inbox\n * courier.shared.signIn({\n * userId: $YOUR_USER_ID,\n * jwt: jwt,\n * });\n * }, []);\n *\n * return <CourierInboxPopupMenu />;\n * ```\n */\nexport const CourierInboxPopupMenu = forwardRef<CourierInboxPopupMenuElement, CourierInboxPopupMenuProps>((props, ref) => {\n return (\n <CourierRenderContext.Provider value={reactNodeToHTMLElement}>\n <CourierInboxPopupMenuComponent {...props} ref={ref} />\n </CourierRenderContext.Provider>\n );\n});\n\nCourierInboxPopupMenu.displayName = 'CourierInboxPopupMenu';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/utils/render.tsx","../src/components/courier-inbox.tsx","../src/components/courier-inbox-popup-menu.tsx","../src/index.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport { flushSync } from \"react-dom\";\nimport { createRoot } from \"react-dom/client\";\n\n/**\n * Converts a React node to an HTMLElement.\n * This function uses flushSync to ensure the DOM is updated synchronously.\n * @param node - The React node to convert.\n * @returns The converted HTMLElement.\n */\nexport function reactNodeToHTMLElement(node: ReactNode): HTMLElement {\n const container = document.createElement('div');\n\n // Use React 18 root\n const root = createRoot(container);\n flushSync(() => {\n root.render(node);\n });\n\n // Wait until React mounts the content synchronously\n const element = container.firstElementChild;\n if (!(element instanceof HTMLElement)) {\n throw new Error(\n 'renderListItem must return a single JSX element that renders to an HTMLElement (e.g., <div>)'\n );\n }\n\n return element;\n}\n","import { forwardRef } from \"react\";\nimport { CourierInbox as CourierInboxElement } from \"@trycourier/courier-ui-inbox\";\nimport { CourierInboxComponent, CourierInboxProps, CourierRenderContext } from \"@trycourier/courier-react-components\";\nimport { reactNodeToHTMLElement } from \"../utils/render\";\n\n/**\n * CourierInbox React component.\n *\n * @example\n * ```tsx\n * const courier = useCourier();\n *\n * useEffect(() => {\n * // Generate a JWT for your user (do this on your backend server)\n * const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT\n *\n * // Authenticate the user with the inbox\n * courier.shared.signIn({\n * userId: $YOUR_USER_ID,\n * jwt: jwt,\n * });\n * }, []);\n *\n * return <CourierInbox />;\n * ```\n */\nexport const CourierInbox = forwardRef<CourierInboxElement, CourierInboxProps>((props, ref) => {\n return (\n <CourierRenderContext.Provider value={reactNodeToHTMLElement}>\n <CourierInboxComponent {...props} ref={ref} />\n </CourierRenderContext.Provider>\n );\n});\n\nCourierInbox.displayName = 'CourierInbox';\n","import { forwardRef } from \"react\";\nimport { CourierInboxPopupMenu as CourierInboxPopupMenuElement } from \"@trycourier/courier-ui-inbox\";\nimport { CourierInboxPopupMenuComponent, CourierInboxPopupMenuProps, CourierRenderContext } from \"@trycourier/courier-react-components\";\nimport { reactNodeToHTMLElement } from \"../utils/render\";\n\n/**\n * CourierInboxPopupMenu React component.\n *\n * This component is used to display a popup menu for a message in the inbox.\n *\n * @example\n * ```tsx\n * const courier = useCourier();\n *\n * useEffect(() => {\n * // Generate a JWT for your user (do this on your backend server)\n * const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT\n *\n * // Authenticate the user with the inbox\n * courier.shared.signIn({\n * userId: $YOUR_USER_ID,\n * jwt: jwt,\n * });\n * }, []);\n *\n * return <CourierInboxPopupMenu />;\n * ```\n */\nexport const CourierInboxPopupMenu = forwardRef<CourierInboxPopupMenuElement, CourierInboxPopupMenuProps>((props, ref) => {\n return (\n <CourierRenderContext.Provider value={reactNodeToHTMLElement}>\n <CourierInboxPopupMenuComponent {...props} ref={ref} />\n </CourierRenderContext.Provider>\n );\n});\n\nCourierInboxPopupMenu.displayName = 'CourierInboxPopupMenu';\n","import { Courier } from '@trycourier/courier-js';\n\nCourier.shared.courierUserAgentName = \"courier-react\";\nCourier.shared.courierUserAgentVersion = __PACKAGE_VERSION__;\n\nexport { CourierInbox } from './components/courier-inbox';\nexport { CourierInboxPopupMenu } from './components/courier-inbox-popup-menu';\n\nexport { useCourier } from '@trycourier/courier-react-components';\n\nexport type {\n CourierInboxProps,\n CourierInboxPopupMenuProps,\n} from '@trycourier/courier-react-components';\n\n// Re-export types from courier-js\nexport type {\n CourierProps,\n CourierClientOptions,\n CourierBrand,\n CourierApiUrls,\n CourierUserPreferences,\n CourierUserPreferencesStatus,\n CourierUserPreferencesChannel,\n CourierUserPreferencesPaging,\n CourierUserPreferencesTopic,\n CourierUserPreferencesTopicResponse,\n CourierDevice,\n CourierToken,\n CourierGetInboxMessageResponse,\n CourierGetInboxMessagesResponse,\n InboxMessage,\n InboxAction,\n InboxMessageEventEnvelope,\n} from '@trycourier/courier-js';\n\n// Re-export utility functions from courier-ui-inbox\nexport {\n markAsRead,\n markAsUnread,\n clickMessage,\n archiveMessage,\n openMessage\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export factory prop types from courier-ui-inbox\nexport type {\n CourierInboxHeaderFactoryProps,\n CourierInboxStateLoadingFactoryProps,\n CourierInboxStateEmptyFactoryProps,\n CourierInboxStateErrorFactoryProps,\n CourierInboxListItemFactoryProps,\n CourierInboxListItemActionFactoryProps,\n CourierInboxPaginationItemFactoryProps,\n CourierInboxMenuButtonFactoryProps,\n CourierInboxFeedType\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export theme types from courier-ui-inbox\nexport type {\n CourierInboxTheme,\n CourierInboxFontTheme,\n CourierInboxIconTheme,\n CourierInboxFilterItemTheme,\n CourierInboxUnreadCountIndicatorTheme,\n CourierInboxUnreadDotIndicatorTheme,\n CourierInboxIconButtonTheme,\n CourierInboxButtonTheme,\n CourierInboxMenuButtonTheme,\n CourierInboxPopupTheme,\n CourierInboxListItemTheme,\n CourierInboxSkeletonLoadingStateTheme,\n CourierInboxInfoStateTheme,\n CourierMenuItemTheme,\n CourierFilterMenuTheme,\n CourierActionMenuTheme\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export theme utilities from courier-ui-inbox\nexport {\n defaultLightTheme,\n defaultDarkTheme,\n mergeTheme\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export element types from courier-ui-inbox\nexport type { CourierInbox as CourierInboxElement } from '@trycourier/courier-ui-inbox';\nexport type { CourierInboxPopupMenu as CourierInboxPopupMenuElement } from '@trycourier/courier-ui-inbox';\n\n// Re-export types from courier-ui-core\nexport type {\n CourierComponentThemeMode\n} from '@trycourier/courier-ui-core'\n"],"names":[],"mappings":";;;;;;;;AAUO,SAAS,uBAAuB,MAA8B;AACnE,QAAM,YAAY,SAAS,cAAc,KAAK;AAG9C,QAAM,OAAO,WAAW,SAAS;AACjC,YAAU,MAAM;AACd,SAAK,OAAO,IAAI;AAAA,EAClB,CAAC;AAGD,QAAM,UAAU,UAAU;AAC1B,MAAI,EAAE,mBAAmB,cAAc;AACrC,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AAEA,SAAO;AACT;ACFO,MAAM,eAAe,WAAmD,CAAC,OAAO,QAAQ;AAC7F,SACE,oBAAC,qBAAqB,UAArB,EAA8B,OAAO,wBACpC,UAAA,oBAAC,uBAAA,EAAuB,GAAG,OAAO,IAAA,CAAU,EAAA,CAC9C;AAEJ,CAAC;AAED,aAAa,cAAc;ACNpB,MAAM,wBAAwB,WAAqE,CAAC,OAAO,QAAQ;AACxH,SACE,oBAAC,qBAAqB,UAArB,EAA8B,OAAO,wBACpC,UAAA,oBAAC,gCAAA,EAAgC,GAAG,OAAO,IAAA,CAAU,EAAA,CACvD;AAEJ,CAAC;AAED,sBAAsB,cAAc;AClCpC,QAAQ,OAAO,uBAAuB;AACtC,QAAQ,OAAO,0BAA0B;"}
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trycourier/courier-react",
|
|
3
|
-
"version": "8.0
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "The React components for the Courier web UI",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"author": "Courier",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@trycourier/courier-js": "2.0
|
|
31
|
-
"@trycourier/courier-react-components": "1.0
|
|
30
|
+
"@trycourier/courier-js": "2.1.0",
|
|
31
|
+
"@trycourier/courier-react-components": "1.1.0",
|
|
32
32
|
"@trycourier/courier-ui-core": "1.0.13",
|
|
33
|
-
"@trycourier/courier-ui-inbox": "1.0
|
|
33
|
+
"@trycourier/courier-ui-inbox": "1.1.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": ">=18.0.0",
|