@liip/liipgpt 3.14.0-rc.4 → 3.14.0-rc.6

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 (68) hide show
  1. package/README.md +31 -25
  2. package/chat/{chat-logic.svelte-BIzNv4N2.js → chat-logic.svelte-Ch4C_vn1.js} +18 -18
  3. package/chat/{chat-panel-BAJtD_vT.js → chat-panel-DMQMA6GL.js} +2 -2
  4. package/chat/{context-menu-DWJrgbm2.js → context-menu-12uTEQGW.js} +1 -1
  5. package/chat/embed-buttons-CeKC4X2u.js +2 -0
  6. package/chat/embed-combobox-C4vUrC24.js +3 -0
  7. package/chat/{fake-typing-html-C-qFlUgj.js → fake-typing-html-Ckuyip1o.js} +1 -1
  8. package/chat/liipgpt-chat.iife.js +1 -1
  9. package/chat/liipgpt-chat.js +3 -3
  10. package/chat/{load-default-translations-a30ZO3-V.js → load-default-translations-BuD9xHUi.js} +1 -1
  11. package/chat/{menu-trigger-CxBomvWQ.js → menu-trigger-BBRcUk1D.js} +1 -1
  12. package/chat/{selector-radio-BBid9c4L.js → selector-radio-CFDET-16.js} +1 -1
  13. package/chat/{selectors-BbK89-1R.js → selectors-BjZ6MVrq.js} +1 -1
  14. package/chat/{svg-sCu6NrKC.js → svg-DtWMjI7R.js} +1 -1
  15. package/chat/{transition-CWwZz2p5.js → transition-XkiSng3X.js} +1 -1
  16. package/configurator/_app/env.js +1 -1
  17. package/configurator/_app/immutable/chunks/{CZU-KKsp.js → B-y9X2-8.js} +1 -1
  18. package/configurator/_app/immutable/chunks/{DB04rEax.js → B32W_Dsa.js} +2 -2
  19. package/configurator/_app/immutable/chunks/{CjE9hWVv.js → B3a6HGoe.js} +1 -1
  20. package/configurator/_app/immutable/chunks/{CcTV600C2.js → B3pEs5da2.js} +1 -1
  21. package/configurator/_app/immutable/chunks/{dgyLimOR2.js → BKA1zfIz2.js} +1 -1
  22. package/configurator/_app/immutable/chunks/{D1au9hKC.js → BVt1hRS1.js} +1 -1
  23. package/configurator/_app/immutable/chunks/{D9UDQ0p92.js → Bu14FuxZ2.js} +1 -1
  24. package/configurator/_app/immutable/chunks/{DWzVaeL52.js → BzIUquDb2.js} +3 -3
  25. package/configurator/_app/immutable/chunks/{j8KVwinu.js → C0D00UGs.js} +1 -1
  26. package/configurator/_app/immutable/chunks/CDfqTiXk.js +1 -0
  27. package/configurator/_app/immutable/chunks/{BjIvS8rz2.js → CKQAcXe72.js} +1 -1
  28. package/configurator/_app/immutable/chunks/{B6Ro7z17.js → CfxnfSzA.js} +1 -1
  29. package/configurator/_app/immutable/chunks/{D87HRwAZ2.js → DAPaVlMa2.js} +1 -1
  30. package/configurator/_app/immutable/chunks/{EhsIZE74.js → DJkWfLiY.js} +1 -1
  31. package/configurator/_app/immutable/chunks/{D8Yp8jl_2.js → DRrvYHBh2.js} +1 -1
  32. package/configurator/_app/immutable/chunks/{CGvxbgqi.js → Dqce3tm9.js} +1 -1
  33. package/configurator/_app/immutable/chunks/{Y__DBylx.js → EpR-uKr3.js} +1 -1
  34. package/configurator/_app/immutable/chunks/{Zm3phpz8.js → O5Fhekzt.js} +1 -1
  35. package/configurator/_app/immutable/chunks/{BCCelMZF2.js → nJOWwmmn2.js} +1 -1
  36. package/configurator/_app/immutable/chunks/{B8R_Wvyc2.js → o63Yrn5j2.js} +2 -2
  37. package/configurator/_app/immutable/entry/{app.D863Esgq.js → app.C_DECwZY.js} +2 -2
  38. package/configurator/_app/immutable/entry/start.CfccBmAW.js +1 -0
  39. package/configurator/_app/immutable/nodes/{0.BBKFJAVA.js → 0.By4OoRjs.js} +2 -2
  40. package/configurator/_app/immutable/nodes/{1.DrWYGkZb.js → 1.BSdglIqj.js} +1 -1
  41. package/configurator/_app/immutable/nodes/{2.DKzoV7Qu.js → 2.DtYCUqQJ.js} +3 -3
  42. package/configurator/_app/immutable/nodes/{3.CSitBuy9.js → 3.C5ar34a0.js} +1 -1
  43. package/configurator/_app/version.json +1 -1
  44. package/configurator/index.html +6 -6
  45. package/configurator/sidebar.html +6 -6
  46. package/index.cjs +1 -4
  47. package/index.js +1 -4
  48. package/package.json +1 -1
  49. package/search-summary/liipgpt-search-summary.iife.js +1 -1
  50. package/search-summary/liipgpt-search-summary.js +21 -19
  51. package/search-summary/{load-chat-config-rIrJxcYJ.js → load-chat-config-BKJ4eg8F.js} +2 -2
  52. package/chat/absolute-fade-out-XxeZPth0.js +0 -2
  53. package/chat/button-or-link-J8pmWrVn.js +0 -2
  54. package/chat/easing-DUD_Cjk6.js +0 -2
  55. package/chat/embed-buttons-BUVv9ux8.js +0 -2
  56. package/chat/embed-combobox-D-znfWMb.js +0 -3
  57. package/configurator/_app/immutable/chunks/BsMIlxnI.js +0 -1
  58. package/configurator/_app/immutable/entry/start.BU0Fq4AF.js +0 -1
  59. package/search-summary/translations-utils-Du2dWNi1.js +0 -4
  60. /package/chat/{de-B-rWS9iD.js → de-D1oUJG1T.js} +0 -0
  61. /package/chat/{en-uBnzwhZ-.js → en-Bg1csyv-.js} +0 -0
  62. /package/chat/{fr-navcG-i0.js → fr-CTl7kz6p.js} +0 -0
  63. /package/chat/{it-BdI1rBuy.js → it-BSFK0HUL.js} +0 -0
  64. /package/chat/{tooltip-BNPdEZ1v.js → tooltip-16JN-qn8.js} +0 -0
  65. /package/search-summary/{de-Beh2sxQV.js → de-CLq0dR54.js} +0 -0
  66. /package/search-summary/{en-Cqq6muzM.js → en-GeqcPzjE.js} +0 -0
  67. /package/search-summary/{fr-BRC1Jf3V.js → fr-C_RFjDCQ.js} +0 -0
  68. /package/search-summary/{it-Csghbz5d.js → it-DsMTe5jt.js} +0 -0
package/README.md CHANGED
@@ -11,15 +11,15 @@ This package provides the following:
11
11
 
12
12
  ```html
13
13
  <!-- Chat -->
14
- <script src="https://cdn.example.com/@liip/liipgpt/chat/liipgpt-chat.iife.js"></script>
14
+ <script type="module" src="https://cdn.example.com/@liip/liipgpt/chat/liipgpt-chat.js"></script>
15
15
  <liipgpt-chat api-url="https://your-api.example.com/org" lang="en"></liipgpt-chat>
16
16
 
17
17
  <!-- Button -->
18
- <script src="https://cdn.example.com/@liip/liipgpt/button/liipgpt-button.iife.js"></script>
18
+ <script type="module" src="https://cdn.example.com/@liip/liipgpt/button/liipgpt-button.js"></script>
19
19
  <liipgpt-button api-url="https://your-api.example.com/org" lang="en"></liipgpt-button>
20
20
 
21
21
  <!-- Search summary -->
22
- <script src="https://cdn.example.com/@liip/liipgpt/search-summary/liipgpt-search-summary.iife.js"></script>
22
+ <script type="module" src="https://cdn.example.com/@liip/liipgpt/search-summary/liipgpt-search-summary.js"></script>
23
23
  <h2 id="ai-overview">AI overview</h2>
24
24
  <liipgpt-search-summary
25
25
  labelled-by="ai-overview"
@@ -30,33 +30,25 @@ This package provides the following:
30
30
  ></liipgpt-search-summary>
31
31
  ```
32
32
 
33
- ### ESM builds (optional)
33
+ The module build is the recommended one, and the one to reach for unless something below rules it
34
+ out. Only a module can load code on demand, and that is most of what a widget ships: a chat flyout
35
+ that is never opened now downloads about a quarter of what it used to.
34
36
 
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"`:
37
+ | gzipped, what a browser downloads before any interaction | IIFE | module |
38
+ | -------------------------------------------------------- | -------- | -------------------- |
39
+ | chat, flyout never opened | 206.2 kB | **51.6 kB** |
40
+ | button | 48.8 kB | **40.2 kB** |
41
+ | search summary, styled through host CSS | 91.8 kB | **71.6 kB** |
38
42
 
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.
43
+ The rest arrives when it is actually needed — the chat panel and engine on first open (prefetched on
44
+ hover, so the click stays instant), a language when it is selected, an embed when the backend sends
45
+ one. Only the language the visitor sees is ever downloaded, not all four.
53
46
 
54
47
  Importing from npm resolves to the module build as well, so `import "@liip/liipgpt/search-summary"`
55
48
  registers the element _and_ gives you the named exports (`LiipGPTSearchSummary`, `PiiChecks`) — with
56
49
  the IIFE the namespace came back empty. `require()` still resolves to the IIFE.
57
50
 
58
- The IIFE builds stay supported and unchanged; nothing needs to migrate. Two things to check before
59
- switching:
51
+ Three things to check:
60
52
 
61
53
  - **Content-Security-Policy** — a module can load additional files from the host it was served from,
62
54
  and that host is `cdn.jsdelivr.net` for both embed variants: the fixed CDN URL points there
@@ -67,9 +59,23 @@ switching:
67
59
  - **Pin the version.** Serve the module from a version-pinned URL. With a floating "latest" URL a
68
60
  release can land between the entry and its companion files being fetched, and the two no longer
69
61
  match.
62
+ - **Serve the whole directory if you self-host.** The entry is no longer the only file: it ships
63
+ alongside content-hashed companions (`chat-panel-*.js`, `de-*.js`, …) that it fetches at runtime.
64
+ Copying only `liipgpt-chat.js` to your own server gives you a button that never opens a chat.
65
+
66
+ ### IIFE build (single file)
67
+
68
+ Every widget is also published as a single-file IIFE bundle, and it stays supported — existing
69
+ embeds do not have to migrate. Drop `type="module"` and add `.iife` to the file name:
70
+
71
+ ```html
72
+ <script src="https://cdn.example.com/@liip/liipgpt/chat/liipgpt-chat.iife.js"></script>
73
+ ```
70
74
 
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.
75
+ It cannot code-split, so it always downloads everything upfront, including all four languages. Use
76
+ it when you need **Subresource Integrity**: SRI covers only the file you name in the tag, so with a
77
+ module the on-demand companions are not integrity-checked, while the IIFE _is_ the whole widget. It
78
+ is also the simpler answer for a site that cannot add `cdn.jsdelivr.net` to its `script-src`.
73
79
 
74
80
  > **Note:** The standalone `@liip/liipgpt-search-summary` package is superseded by `@liip/liipgpt/search-summary` from this package.
75
81