@liip/liipgpt 3.9.2 → 3.10.0-rc.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.
Files changed (59) hide show
  1. package/README.md +41 -0
  2. package/button/liipgpt-button.iife.js +7 -45
  3. package/button/liipgpt-button.js +342 -0
  4. package/chat/liipgpt-chat.iife.js +34 -72
  5. package/chat/liipgpt-chat.js +559 -0
  6. package/config/index.cjs +559 -14076
  7. package/config/index.d.ts +2620 -6199
  8. package/config/index.js +559 -14091
  9. package/configurator/_app/env.js +1 -1
  10. package/configurator/_app/immutable/chunks/BDBbhPa3.js +1 -0
  11. package/configurator/_app/immutable/chunks/BaFk5JeE.js +1 -0
  12. package/configurator/_app/immutable/chunks/{7mY4OJGU.js → C5-Xjgie.js} +1 -1
  13. package/configurator/_app/immutable/chunks/CLWqXHLZ.js +1 -0
  14. package/configurator/_app/immutable/chunks/CehiXGW0.js +1 -0
  15. package/configurator/_app/immutable/chunks/{ZVK8Dk3M.js → CgnKIljY.js} +1 -1
  16. package/configurator/_app/immutable/chunks/{B7iNpEKB.js → CiRZ9UnK.js} +2 -2
  17. package/configurator/_app/immutable/chunks/{CZzAbm1q.js → CsGLkWF6.js} +1 -1
  18. package/configurator/_app/immutable/chunks/{C5QUeOT4.js → DAKT0Hmi.js} +5 -5
  19. package/configurator/_app/immutable/chunks/{CA38AHEC.js → DCaDs1kM.js} +1 -1
  20. package/configurator/_app/immutable/chunks/{B9Sj_kOF.js → DOmHuVAd.js} +2 -2
  21. package/configurator/_app/immutable/chunks/DUEYj7Tq.js +1 -0
  22. package/configurator/_app/immutable/chunks/DZ7HiB-Q.js +61 -0
  23. package/configurator/_app/immutable/chunks/Dgkk1Fhx.js +1 -0
  24. package/configurator/_app/immutable/chunks/DkBX8x2a.js +1 -0
  25. package/configurator/_app/immutable/chunks/{Qr3QoTpa.js → Dojw3mHu.js} +1 -1
  26. package/configurator/_app/immutable/chunks/IH_3DU1Z.js +1 -0
  27. package/configurator/_app/immutable/chunks/g-mSZff4.js +1 -0
  28. package/configurator/_app/immutable/chunks/k0QB3my2.js +75 -0
  29. package/configurator/_app/immutable/entry/{app.CNOaE4a-.js → app.FlyB4DsO.js} +2 -2
  30. package/configurator/_app/immutable/entry/start.DGSyFGK8.js +1 -0
  31. package/configurator/_app/immutable/nodes/{0.5_GG2VVz.js → 0.CTF3xmQA.js} +2 -2
  32. package/configurator/_app/immutable/nodes/{1.CC4YG4vs.js → 1.BSQ6HX7R.js} +1 -1
  33. package/configurator/_app/immutable/nodes/{2.Bsn6JT-r.js → 2.C6z1AFjm.js} +3 -3
  34. package/configurator/_app/immutable/nodes/{3.BGFB6L4G.js → 3.D5oG7yIJ.js} +1 -1
  35. package/configurator/_app/version.json +1 -1
  36. package/configurator/index.html +6 -6
  37. package/configurator/sidebar.html +6 -6
  38. package/index.cjs +611 -14125
  39. package/index.d.ts +7115 -10767
  40. package/index.js +819 -14348
  41. package/package.json +8 -5
  42. package/search-summary/liipgpt-search-summary.iife.js +23 -61
  43. package/search-summary/liipgpt-search-summary.js +63 -0
  44. package/search-summary/load-chat-config-D1K0jXrB.js +326 -0
  45. package/search-summary/translations-utils-E4InubIu.js +1 -0
  46. package/configurator/_app/immutable/chunks/BX7oppMQ.js +0 -1
  47. package/configurator/_app/immutable/chunks/Bo_I9OnC.js +0 -1
  48. package/configurator/_app/immutable/chunks/C4jvtK34.js +0 -1
  49. package/configurator/_app/immutable/chunks/CFeIeoV1.js +0 -1
  50. package/configurator/_app/immutable/chunks/CIPNu9Fk.js +0 -1
  51. package/configurator/_app/immutable/chunks/D1JxtiVt.js +0 -75
  52. package/configurator/_app/immutable/chunks/DGQ954rx.js +0 -1
  53. package/configurator/_app/immutable/chunks/DKyUMEyV.js +0 -39
  54. package/configurator/_app/immutable/chunks/DY91rqbt.js +0 -61
  55. package/configurator/_app/immutable/chunks/DYa1ApbB.js +0 -1
  56. package/configurator/_app/immutable/entry/start.Dt2jlaUG.js +0 -1
  57. /package/configurator/_app/immutable/chunks/{tFLMI64R.js → BFwiU0IZ.js} +0 -0
  58. /package/configurator/_app/immutable/chunks/{CPPDi2Fg.js → CYtlA8cd.js} +0 -0
  59. /package/configurator/_app/immutable/chunks/{BiTRwaVm.js → oxab-KY5.js} +0 -0
package/README.md CHANGED
@@ -30,6 +30,47 @@ This package provides the following:
30
30
  ></liipgpt-search-summary>
31
31
  ```
32
32
 
33
+ ### ESM builds (optional)
34
+
35
+ Every widget is also published as an ES module next to its IIFE bundle. Same components, same
36
+ attributes — only the module format differs. Drop the `.iife` from the file name and add
37
+ `type="module"`:
38
+
39
+ ```html
40
+ <!-- Chat -->
41
+ <script type="module" src="https://cdn.example.com/@liip/liipgpt/chat/liipgpt-chat.js"></script>
42
+
43
+ <!-- Button -->
44
+ <script type="module" src="https://cdn.example.com/@liip/liipgpt/button/liipgpt-button.js"></script>
45
+
46
+ <!-- Search summary -->
47
+ <script type="module" src="https://cdn.example.com/@liip/liipgpt/search-summary/liipgpt-search-summary.js"></script>
48
+ ```
49
+
50
+ Chat and button weigh the same either way. The search summary is smaller as a module: an IIFE cannot
51
+ code-split, so its ChatConfig support had to be inlined, while the module fetches that part only when
52
+ `use-chat-config` is set — an embed styled through host CSS downloads about a quarter less.
53
+
54
+ Importing from npm resolves to the module build as well, so `import "@liip/liipgpt/search-summary"`
55
+ registers the element _and_ gives you the named exports (`LiipGPTSearchSummary`, `PiiChecks`) — with
56
+ the IIFE the namespace came back empty. `require()` still resolves to the IIFE.
57
+
58
+ The IIFE builds stay supported and unchanged; nothing needs to migrate. Two things to check before
59
+ switching:
60
+
61
+ - **Content-Security-Policy** — a module can load additional files from the host it was served from,
62
+ and that host is `cdn.jsdelivr.net` for both embed variants: the fixed CDN URL points there
63
+ directly, and the backend's `/cdn/npm` route redirects there. The on-demand files are imported
64
+ relative to the entry, so they resolve against jsdelivr in either case. Add
65
+ `https://cdn.jsdelivr.net` to your `script-src` — also when the script tag points at your own
66
+ domain — or the widget will fail to load.
67
+ - **Pin the version.** Serve the module from a version-pinned URL. With a floating "latest" URL a
68
+ release can land between the entry and its companion files being fetched, and the two no longer
69
+ match.
70
+
71
+ Subresource Integrity covers only the file you name in the tag, so the on-demand files are not
72
+ integrity-checked. Stay on the IIFE build if you rely on SRI.
73
+
33
74
  > **Note:** The standalone `@liip/liipgpt-search-summary` package is superseded by `@liip/liipgpt/search-summary` from this package.
34
75
 
35
76
  For more information please refer to: [docs.liipgpt.ch](https://docs.liipgpt.ch)