@wallavi/widget 1.6.2 → 1.6.4
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/index.js +21 -1
- package/dist/index.mjs +21 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1333,6 +1333,26 @@ function ChatWidget({
|
|
|
1333
1333
|
chat.reset();
|
|
1334
1334
|
onReset?.();
|
|
1335
1335
|
};
|
|
1336
|
+
const isDark = theme === "dark";
|
|
1337
|
+
const cssVars = {
|
|
1338
|
+
colorScheme: theme,
|
|
1339
|
+
// Inline style has higher specificity than any host-site stylesheet,
|
|
1340
|
+
// so background-color set here cannot be overridden by host CSS.
|
|
1341
|
+
backgroundColor: isDark ? "hsl(240 10% 3.9%)" : "hsl(0 0% 100%)",
|
|
1342
|
+
color: isDark ? "hsl(0 0% 98%)" : "hsl(240 10% 3.9%)",
|
|
1343
|
+
["--background"]: isDark ? "240 10% 3.9%" : "0 0% 100%",
|
|
1344
|
+
["--foreground"]: isDark ? "0 0% 98%" : "240 10% 3.9%",
|
|
1345
|
+
["--muted"]: isDark ? "240 3.7% 15.9%" : "240 4.8% 95.9%",
|
|
1346
|
+
["--muted-foreground"]: isDark ? "240 5% 64.9%" : "240 3.8% 46.1%",
|
|
1347
|
+
["--accent"]: isDark ? "240 3.7% 15.9%" : "240 4.8% 95.9%",
|
|
1348
|
+
["--accent-foreground"]: isDark ? "0 0% 98%" : "240 5.9% 10%",
|
|
1349
|
+
["--border"]: isDark ? "240 3.7% 15.9%" : "240 5.9% 90%",
|
|
1350
|
+
["--input"]: isDark ? "240 3.7% 15.9%" : "240 5.9% 90%",
|
|
1351
|
+
["--primary"]: isDark ? "0 0% 98%" : "240 5.9% 10%",
|
|
1352
|
+
["--primary-foreground"]: isDark ? "240 5.9% 10%" : "0 0% 98%",
|
|
1353
|
+
["--ring"]: isDark ? "240 4.9% 83.9%" : "240 10% 3.9%",
|
|
1354
|
+
["--radius"]: "0.5rem"
|
|
1355
|
+
};
|
|
1336
1356
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1337
1357
|
"div",
|
|
1338
1358
|
{
|
|
@@ -1341,7 +1361,7 @@ function ChatWidget({
|
|
|
1341
1361
|
isDragOver && "ring-2 ring-inset ring-primary/60",
|
|
1342
1362
|
className
|
|
1343
1363
|
),
|
|
1344
|
-
style:
|
|
1364
|
+
style: cssVars,
|
|
1345
1365
|
onDragOver: handleDragOver,
|
|
1346
1366
|
onDragEnter: handleDragOver,
|
|
1347
1367
|
onDragLeave: handleDragLeave,
|
package/dist/index.mjs
CHANGED
|
@@ -1307,6 +1307,26 @@ function ChatWidget({
|
|
|
1307
1307
|
chat.reset();
|
|
1308
1308
|
onReset?.();
|
|
1309
1309
|
};
|
|
1310
|
+
const isDark = theme === "dark";
|
|
1311
|
+
const cssVars = {
|
|
1312
|
+
colorScheme: theme,
|
|
1313
|
+
// Inline style has higher specificity than any host-site stylesheet,
|
|
1314
|
+
// so background-color set here cannot be overridden by host CSS.
|
|
1315
|
+
backgroundColor: isDark ? "hsl(240 10% 3.9%)" : "hsl(0 0% 100%)",
|
|
1316
|
+
color: isDark ? "hsl(0 0% 98%)" : "hsl(240 10% 3.9%)",
|
|
1317
|
+
["--background"]: isDark ? "240 10% 3.9%" : "0 0% 100%",
|
|
1318
|
+
["--foreground"]: isDark ? "0 0% 98%" : "240 10% 3.9%",
|
|
1319
|
+
["--muted"]: isDark ? "240 3.7% 15.9%" : "240 4.8% 95.9%",
|
|
1320
|
+
["--muted-foreground"]: isDark ? "240 5% 64.9%" : "240 3.8% 46.1%",
|
|
1321
|
+
["--accent"]: isDark ? "240 3.7% 15.9%" : "240 4.8% 95.9%",
|
|
1322
|
+
["--accent-foreground"]: isDark ? "0 0% 98%" : "240 5.9% 10%",
|
|
1323
|
+
["--border"]: isDark ? "240 3.7% 15.9%" : "240 5.9% 90%",
|
|
1324
|
+
["--input"]: isDark ? "240 3.7% 15.9%" : "240 5.9% 90%",
|
|
1325
|
+
["--primary"]: isDark ? "0 0% 98%" : "240 5.9% 10%",
|
|
1326
|
+
["--primary-foreground"]: isDark ? "240 5.9% 10%" : "0 0% 98%",
|
|
1327
|
+
["--ring"]: isDark ? "240 4.9% 83.9%" : "240 10% 3.9%",
|
|
1328
|
+
["--radius"]: "0.5rem"
|
|
1329
|
+
};
|
|
1310
1330
|
return /* @__PURE__ */ jsxs(
|
|
1311
1331
|
"div",
|
|
1312
1332
|
{
|
|
@@ -1315,7 +1335,7 @@ function ChatWidget({
|
|
|
1315
1335
|
isDragOver && "ring-2 ring-inset ring-primary/60",
|
|
1316
1336
|
className
|
|
1317
1337
|
),
|
|
1318
|
-
style:
|
|
1338
|
+
style: cssVars,
|
|
1319
1339
|
onDragOver: handleDragOver,
|
|
1320
1340
|
onDragEnter: handleDragOver,
|
|
1321
1341
|
onDragLeave: handleDragLeave,
|