@paramms/chat-widget 1.0.46 → 1.0.47
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/dist/chatlist.js +15 -15
- package/dist/chatlist.js.map +1 -1
- package/dist/embed-lite.js +6 -6
- package/dist/embed-lite.js.map +1 -1
- package/dist/embed.d.ts +1 -1
- package/dist/embed.js +6 -6
- package/dist/embed.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/renderer.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export interface MountOptions {
|
|
|
50
50
|
/** Secondary accent (guest bubble + send button). Defaults to the design
|
|
51
51
|
* blue; omit and it follows `accent` for a cohesive single-token retheme. */
|
|
52
52
|
accent2?: string;
|
|
53
|
-
/** Colour scheme
|
|
53
|
+
/** Colour scheme. Default 'light'. 'auto' follows the OS; 'dark'/'light' force it. */
|
|
54
54
|
theme?: 'auto' | 'light' | 'dark';
|
|
55
55
|
/** Load Baloo 2 + Nunito webfonts (default true). false = system fonts only. */
|
|
56
56
|
webfont?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ const Ue = `
|
|
|
11
11
|
position:relative;
|
|
12
12
|
display:flex; flex-direction:column; height:100%; min-height:320px; background:var(--ocw-bg);
|
|
13
13
|
font-family:var(--ocw-fb); color:var(--ocw-ink); overflow:hidden; }
|
|
14
|
-
@media (prefers-color-scheme: dark) { .ocw
|
|
14
|
+
@media (prefers-color-scheme: dark) { .ocw[data-theme="auto"] { ${ge("ocw")} } }
|
|
15
15
|
.ocw[data-theme="dark"] { ${ge("ocw")} }
|
|
16
16
|
/* ── Responsive sizing ──────────────────────────────────────────────────────
|
|
17
17
|
* Sizing is driven by the WIDGET'S OWN width (ResizeObserver toggles
|
|
@@ -118,7 +118,7 @@ const Ue = `
|
|
|
118
118
|
.ocw button:focus-visible, .ocw textarea:focus-visible, .ocw a:focus-visible, .ocw [tabindex]:focus-visible { outline:2px solid var(--ocw-accent); outline-offset:2px; border-radius:8px; }
|
|
119
119
|
.ocw-sendbtn:active { transform:scale(.92); }
|
|
120
120
|
.ocw-quick button:active, .ocw-chip:active { transform:scale(.97); }
|
|
121
|
-
@media (prefers-color-scheme: dark) { .ocw
|
|
121
|
+
@media (prefers-color-scheme: dark) { .ocw[data-theme="auto"] .ocw-away { background:#3a3018; border-color:#5a4a1f; color:#e8d9a8; } .ocw[data-theme="auto"] .ocw-note .ocw-bubble { background:#332b12; border-color:#7a5c17; color:#f0e2bd; } .ocw[data-theme="auto"] .ocw-note .ocw-bubble::before { color:#e0c060; } }
|
|
122
122
|
.ocw[data-theme="dark"] .ocw-away { background:#3a3018; border-color:#5a4a1f; color:#e8d9a8; }
|
|
123
123
|
.ocw[data-theme="dark"] .ocw-note .ocw-bubble { background:#332b12; border-color:#7a5c17; color:#f0e2bd; }
|
|
124
124
|
.ocw[data-theme="dark"] .ocw-note .ocw-bubble::before { color:#e0c060; }
|
|
@@ -277,7 +277,7 @@ class Xe {
|
|
|
277
277
|
var r, C, v, u, f, R, B, A, k, S, D;
|
|
278
278
|
this.root = e, this.me = l, this.h = c, this.cfg = i, Ke(), i.webfont !== !1 && Ve(), e.replaceChildren(), e.classList.add("ocw"), i.accent && e.style.setProperty("--ocw-accent", i.accent);
|
|
279
279
|
const x = i.accent2 ?? i.accent;
|
|
280
|
-
x && e.style.setProperty("--ocw-accent2", x), this.cfgAccent2 = i.accent2,
|
|
280
|
+
x && e.style.setProperty("--ocw-accent2", x), this.cfgAccent2 = i.accent2, e.dataset.theme = i.theme ?? "light";
|
|
281
281
|
const w = n("div", "ocw-head");
|
|
282
282
|
if (this.h.onBack) {
|
|
283
283
|
const g = n("button", "ocw-back", "‹");
|