@cimulate/copilot-widget 1.41.0 → 1.41.1
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/CHANGELOG.md +4 -0
- package/README.md +31 -1
- package/dist/cimulate-copilot-widget.es.js +13590 -19182
- package/dist/copilot.es.js +13589 -19181
- package/dist/messaging.es.js +14466 -20072
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
`@cimulate/copilot-widget` follows [Semantic Versioning](https://semver.org/). Each entry is a released `package.json` version (deployed on merge to `master`), newest first.
|
|
4
4
|
|
|
5
|
+
## 1.41.1 — 2026-09-21
|
|
6
|
+
|
|
7
|
+
- ESM/NPM builds now externalize `react` and `react-dom` so host bundlers dedupe against a single React copy. CDN/UMD `<script>` bundles are unchanged and still include React.
|
|
8
|
+
|
|
5
9
|
## 1.41.0 — 2026-09-21
|
|
6
10
|
|
|
7
11
|
- Agentforce messaging mode now exposes `sendMessage()` for storefronts (CDN and NPM). Hosts can submit a shopper query from a search bar or embedded question before the widget is open; the query is queued until the widget opens and the agent's welcome message has arrived. Pair with `eventHandlers.components.toggleWidgetOpen(true)` to show the widget. Exposed as `window.CimulateMessaging.sendMessage()` and `eventHandlers.session.sendMessage()`. React hosts continue to use `useMessaging().sendMessage()`.
|
package/README.md
CHANGED
|
@@ -10,7 +10,37 @@ Cimulate's Copilot Widget SDK is a React component library which allows you to e
|
|
|
10
10
|
npm install @cimulate/copilot-widget
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
NPM hosts must provide `react` and `react-dom` (`^18.3 || ^19`). CDN/UMD `<script>` installs are unchanged and still bundle React.
|
|
13
|
+
NPM hosts must provide `react` and `react-dom` (`^18.3 || ^19`). The published ESM artifacts import those peers from the host (they are not bundled). CDN/UMD `<script>` installs are unchanged and still bundle React.
|
|
14
|
+
|
|
15
|
+
## Bundle size snapshots
|
|
16
|
+
|
|
17
|
+
Use `npm run measure:bundle-sizes` to capture before/after gzip sizes for an optimization. Run everything from this directory after a fresh `npm run build` so `dist/` matches the code under test.
|
|
18
|
+
|
|
19
|
+
One session = one timestamp folder under `.tmp/bundle-sizes/<DD-MM-YYYY-HHmmss>/` with `bundle-sizes.before.json` and `bundle-sizes.after.json`. `.tmp/` is gitignored — paste the `--diff` table into the PR if you need a durable record.
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
# 1. Baseline (before the change)
|
|
23
|
+
npm run build
|
|
24
|
+
npm run measure:bundle-sizes -- --before
|
|
25
|
+
|
|
26
|
+
# 2. Apply the change, rebuild, capture after
|
|
27
|
+
npm run build
|
|
28
|
+
npm run measure:bundle-sizes -- --after
|
|
29
|
+
|
|
30
|
+
# 3. Diff the latest session
|
|
31
|
+
npm run measure:bundle-sizes -- --diff
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
- Build before every capture; a stale `dist/` produces wrong numbers.
|
|
35
|
+
- One change per session — run a new `--before` for each optimization/PR.
|
|
36
|
+
- Don’t start another `--before` until you’ve finished `--after` / `--diff` for the current pair; `--after` and bare `--diff` always use the **latest** timestamp directory.
|
|
37
|
+
- To diff an older pair explicitly:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
npm run measure:bundle-sizes -- --diff \
|
|
41
|
+
.tmp/bundle-sizes/<timestamp>/bundle-sizes.before.json \
|
|
42
|
+
.tmp/bundle-sizes/<timestamp>/bundle-sizes.after.json
|
|
43
|
+
```
|
|
14
44
|
|
|
15
45
|
## Playgrounds
|
|
16
46
|
|