@snf/access-qa-bot 2.4.0 → 2.4.2
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 +23 -2
- package/build/static/js/main.js +1 -1
- package/build/static/js/main.js.map +1 -1
- package/dist/access-qa-bot.js +1 -1
- package/dist/access-qa-bot.js.map +1 -1
- package/dist/access-qa-bot.standalone.js +1 -1
- package/dist/access-qa-bot.standalone.js.map +1 -1
- package/dist/access-qa-bot.umd.cjs +1 -1
- package/dist/access-qa-bot.umd.cjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -153,8 +153,10 @@ function MyApp() {
|
|
|
153
153
|
|
|
154
154
|
### Standalone Javascript
|
|
155
155
|
|
|
156
|
+
**Recommended approach** - use the self-contained standalone bundle:
|
|
157
|
+
|
|
156
158
|
```html
|
|
157
|
-
<script src="https://unpkg.com/@snf/access-qa-bot@2.
|
|
159
|
+
<script src="https://unpkg.com/@snf/access-qa-bot@2.4.0/dist/access-qa-bot.standalone.js"></script>
|
|
158
160
|
|
|
159
161
|
<div id="qa-bot"></div>
|
|
160
162
|
|
|
@@ -168,6 +170,8 @@ qaBot({
|
|
|
168
170
|
</script>
|
|
169
171
|
```
|
|
170
172
|
|
|
173
|
+
> **Note**: Early versions (v0.1.x) supported a "three files" CDN approach using `/build/` directory files. This approach is no longer supported as the build architecture changed from auto-executing scripts to library exports. Use the standalone bundle above instead.
|
|
174
|
+
|
|
171
175
|
#### Programmatic Control
|
|
172
176
|
|
|
173
177
|
When using the JavaScript API in plain HTML/JS (requires standalone bundle), you get a controller object with imperative methods:
|
|
@@ -254,6 +258,23 @@ This creates the distribution files in the `dist/` directory:
|
|
|
254
258
|
- `access-qa-bot.umd.cjs` (UMD/CommonJS)
|
|
255
259
|
- `access-qa-bot.standalone.js` (Standalone version)
|
|
256
260
|
|
|
261
|
+
### Build Directory
|
|
262
|
+
|
|
263
|
+
The package includes both `/dist/` and `/build/` directories:
|
|
264
|
+
|
|
265
|
+
- **`/dist/`**: Library files for npm consumers and CDN usage
|
|
266
|
+
- `access-qa-bot.js` (ES module for React apps)
|
|
267
|
+
- `access-qa-bot.umd.cjs` (CommonJS)
|
|
268
|
+
- `access-qa-bot.standalone.js` (Self-contained for plain HTML)
|
|
269
|
+
|
|
270
|
+
- **`/build/`**: React app build files
|
|
271
|
+
- **Not for standalone CDN usage** (use `/dist/access-qa-bot.standalone.js` instead)
|
|
272
|
+
- Required for shadow DOM implementations that need to import CSS directly
|
|
273
|
+
- Example: `import qaStyle from '@snf/access-qa-bot/build/static/css/main.css?inline'`
|
|
274
|
+
- Maintained for backward compatibility with existing integrations
|
|
275
|
+
|
|
276
|
+
Both directories are published to npm to support different integration patterns.
|
|
277
|
+
|
|
257
278
|
### NPM Beta Release
|
|
258
279
|
|
|
259
280
|
To release a beta version:
|
|
@@ -380,7 +401,7 @@ npm install @snf/access-qa-bot@beta
|
|
|
380
401
|
- Removed unused helper functions (`getCurrentPriority`, `getCurrentAccessId`)
|
|
381
402
|
- Cleaned up debug console statements for production
|
|
382
403
|
- Added markdown renderer plugin alongside HTML renderer
|
|
383
|
-
- Improved build configuration and
|
|
404
|
+
- Improved build configuration and updated build directory handling
|
|
384
405
|
|
|
385
406
|
#### 📚 Documentation
|
|
386
407
|
- Updated README with comprehensive feature list and integration examples
|