bstp-agent-widget 0.2.5 → 0.2.7

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
@@ -60,21 +60,27 @@ export function Page() {
60
60
  - `react` and `react-dom` are defined as `peerDependencies`.
61
61
  - Library outputs are generated under `dist/`.
62
62
 
63
- ## Angular Integration
63
+ ## Angular Integration (Step by Step)
64
64
 
65
- Install the package in your Angular app:
65
+ 1. Build the npm package in this repository:
66
66
 
67
67
  ```bash
68
- npm i bstp-agent-widget
68
+ bun run build:lib && npm pack
69
69
  ```
70
70
 
71
- Add the widget stylesheet once (for example in `src/styles.scss`):
71
+ 2. Install the generated tarball in your Angular app:
72
+
73
+ ```bash
74
+ npm i /path/to/bstp-agent-widget-0.2.5.tgz
75
+ ```
76
+
77
+ 3. Add widget stylesheet once in Angular global styles (`src/styles.scss`):
72
78
 
73
79
  ```scss
74
80
  @import 'bstp-agent-widget/style.css';
75
81
  ```
76
82
 
77
- Create a wrapper component:
83
+ 4. Mount the widget from an Angular component:
78
84
 
79
85
  ```ts
80
86
  import { AfterViewInit, Component, ElementRef, OnDestroy, ViewChild } from '@angular/core';
@@ -95,7 +101,7 @@ export class AgentChatWidgetComponent implements AfterViewInit, OnDestroy {
95
101
  customerToken: 'jwt-token',
96
102
  language: 'en-US',
97
103
  },
98
- // Optional: defaults to /environment.json
104
+ // Optional. Default: /environment.json
99
105
  // environmentUrl: '/environment.json',
100
106
  });
101
107
  }
@@ -106,7 +112,7 @@ export class AgentChatWidgetComponent implements AfterViewInit, OnDestroy {
106
112
  }
107
113
  ```
108
114
 
109
- The function reads `genai.config` from `environment.json`:
115
+ 5. Provide `genai.config` in Angular app `public/environment.json`:
110
116
 
111
117
  ```json
112
118
  {