@liip/liipgpt 3.14.0-rc.4 → 3.14.0-rc.5
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 +31 -25
- package/chat/{chat-logic.svelte-BIzNv4N2.js → chat-logic.svelte-BPddwvT5.js} +18 -18
- package/chat/{chat-panel-BAJtD_vT.js → chat-panel-BPX5S1ea.js} +2 -2
- package/chat/{context-menu-DWJrgbm2.js → context-menu-hlCENbIg.js} +1 -1
- package/chat/{embed-buttons-BUVv9ux8.js → embed-buttons-DKj9vA-1.js} +1 -1
- package/chat/{embed-combobox-D-znfWMb.js → embed-combobox-D_bAxShi.js} +1 -1
- package/chat/{fake-typing-html-C-qFlUgj.js → fake-typing-html-DA9ZZ_4B.js} +1 -1
- package/chat/liipgpt-chat.iife.js +1 -1
- package/chat/liipgpt-chat.js +1 -1
- package/chat/{menu-trigger-CxBomvWQ.js → menu-trigger-BWyHbrHL.js} +1 -1
- package/chat/{selectors-BbK89-1R.js → selectors-BaGTy3yc.js} +1 -1
- package/chat/{transition-CWwZz2p5.js → transition-LPIVmLBp.js} +1 -1
- package/configurator/_app/env.js +1 -1
- package/configurator/_app/immutable/chunks/{DB04rEax.js → B32W_Dsa.js} +2 -2
- package/configurator/_app/immutable/chunks/{CjE9hWVv.js → B3a6HGoe.js} +1 -1
- package/configurator/_app/immutable/chunks/{CcTV600C2.js → B3pEs5da2.js} +1 -1
- package/configurator/_app/immutable/chunks/{dgyLimOR2.js → BKA1zfIz2.js} +1 -1
- package/configurator/_app/immutable/chunks/Bj5JcU6m.js +1 -0
- package/configurator/_app/immutable/chunks/{D9UDQ0p92.js → Bu14FuxZ2.js} +1 -1
- package/configurator/_app/immutable/chunks/{DWzVaeL52.js → BzIUquDb2.js} +3 -3
- package/configurator/_app/immutable/chunks/{j8KVwinu.js → C0D00UGs.js} +1 -1
- package/configurator/_app/immutable/chunks/CDfqTiXk.js +1 -0
- package/configurator/_app/immutable/chunks/{BjIvS8rz2.js → CKQAcXe72.js} +1 -1
- package/configurator/_app/immutable/chunks/{D1au9hKC.js → CL_JPJIx.js} +1 -1
- package/configurator/_app/immutable/chunks/{EhsIZE74.js → CMNkk1G0.js} +1 -1
- package/configurator/_app/immutable/chunks/{CZU-KKsp.js → CN42Adfx.js} +1 -1
- package/configurator/_app/immutable/chunks/{B6Ro7z17.js → CfxnfSzA.js} +1 -1
- package/configurator/_app/immutable/chunks/{D87HRwAZ2.js → DAPaVlMa2.js} +1 -1
- package/configurator/_app/immutable/chunks/{D8Yp8jl_2.js → DRrvYHBh2.js} +1 -1
- package/configurator/_app/immutable/chunks/{Y__DBylx.js → EpR-uKr3.js} +1 -1
- package/configurator/_app/immutable/chunks/{Zm3phpz8.js → O5Fhekzt.js} +1 -1
- package/configurator/_app/immutable/chunks/{BCCelMZF2.js → nJOWwmmn2.js} +1 -1
- package/configurator/_app/immutable/chunks/{B8R_Wvyc2.js → o63Yrn5j2.js} +2 -2
- package/configurator/_app/immutable/entry/{app.D863Esgq.js → app.C_xcOaQG.js} +2 -2
- package/configurator/_app/immutable/entry/start.viGcxJTd.js +1 -0
- package/configurator/_app/immutable/nodes/{0.BBKFJAVA.js → 0.8Na2So_r.js} +2 -2
- package/configurator/_app/immutable/nodes/{1.DrWYGkZb.js → 1.BLxhS957.js} +1 -1
- package/configurator/_app/immutable/nodes/{2.DKzoV7Qu.js → 2.CdX0yIoP.js} +3 -3
- package/configurator/_app/immutable/nodes/{3.CSitBuy9.js → 3.BsilrN49.js} +1 -1
- package/configurator/_app/version.json +1 -1
- package/configurator/index.html +6 -6
- package/configurator/sidebar.html +6 -6
- package/index.cjs +1 -4
- package/index.js +1 -4
- package/package.json +1 -1
- package/search-summary/liipgpt-search-summary.iife.js +1 -1
- package/search-summary/liipgpt-search-summary.js +1 -1
- package/configurator/_app/immutable/chunks/BsMIlxnI.js +0 -1
- package/configurator/_app/immutable/chunks/CGvxbgqi.js +0 -1
- package/configurator/_app/immutable/entry/start.BU0Fq4AF.js +0 -1
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.
|
|
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.
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
| gzipped, what a browser downloads before any interaction | IIFE | module |
|
|
38
|
+
| -------------------------------------------------------- | -------- | -------------------- |
|
|
39
|
+
| chat, flyout never opened | 206.2 kB | **52.4 kB** |
|
|
40
|
+
| button | 48.8 kB | **40.2 kB** |
|
|
41
|
+
| search summary, styled through host CSS | 91.8 kB | **72.8 kB** |
|
|
38
42
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
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
|
-
|
|
72
|
-
|
|
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
|
|