@blumessage/react-chat 1.3.0 → 1.4.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 CHANGED
@@ -15,10 +15,38 @@ A React TypeScript chat widget component with floating button, theming, and Blum
15
15
 
16
16
  ## Installation
17
17
 
18
+ ### NPM Package (Recommended)
19
+
18
20
  ```bash
19
21
  npm i @blumessage/react-chat
20
22
  ```
21
23
 
24
+ ### Browser Versions
25
+
26
+ #### Option 1: Standalone (Includes React)
27
+
28
+ For the simplest setup with everything included:
29
+
30
+ ```html
31
+ <!-- Load the Blumessage Chat component (includes React) -->
32
+ <script src="path/to/index.js"></script>
33
+ ```
34
+
35
+ #### Option 2: External React (Smaller Bundle)
36
+
37
+ For when you already have React loaded:
38
+
39
+ ```html
40
+ <!-- Load React and ReactDOM from CDN -->
41
+ <script crossorigin src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
42
+ <script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script>
43
+
44
+ <!-- Load the Blumessage Chat component -->
45
+ <script src="path/to/blumessage-chat.browser.js"></script>
46
+ ```
47
+
48
+ See [BROWSER_USAGE.md](./BROWSER_USAGE.md) for complete browser usage documentation.
49
+
22
50
  ## Quick Start
23
51
 
24
52
  ### Floating Chat Widget (Default)
@@ -431,6 +459,32 @@ interface BlumessageChatRef {
431
459
  - React 18+
432
460
  - TypeScript 4.5+
433
461
 
462
+ ## Building
463
+
464
+ ### Standard Build (ES Modules)
465
+
466
+ ```bash
467
+ npm run build
468
+ ```
469
+
470
+ ### Browser Versions
471
+
472
+ #### Standalone (Includes React)
473
+
474
+ ```bash
475
+ npm run build:commonjs
476
+ ```
477
+
478
+ This creates `dist/index.js` which includes React and can be used directly in browsers.
479
+
480
+ #### External React (Smaller Bundle)
481
+
482
+ ```bash
483
+ npm run build:browser
484
+ ```
485
+
486
+ This creates `dist/blumessage-chat.browser.js` which requires React to be loaded separately.
487
+
434
488
  ## License
435
489
 
436
490
  UNLICENSED - For use only by customers with an active Blumessage subscription.