@usereq/widget 0.2.10 → 0.2.12
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/widget.js +71 -44
- package/package.json +2 -2
- package/src/styles/widget.css.ts +27 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usereq/widget",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"@streamdown/mermaid": "^1.0.2",
|
|
79
|
-
"@usereq/ui": "^0.2.
|
|
79
|
+
"@usereq/ui": "^0.2.16",
|
|
80
80
|
"lucide-react": "^0.553.0",
|
|
81
81
|
"motion": "^12.23.24",
|
|
82
82
|
"react": "^19.2.0",
|
package/src/styles/widget.css.ts
CHANGED
|
@@ -5,6 +5,33 @@ export const widgetCss = `
|
|
|
5
5
|
pointer-events: none;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
/*
|
|
9
|
+
* Touch-scroll the conversation list reliably inside the shadow-root portal.
|
|
10
|
+
*
|
|
11
|
+
* The .chat-conv-scroll hook is attached by @usereq/ui to the actual
|
|
12
|
+
* scrollable div inside Conversation (use-stick-to-bottom's inner scroller
|
|
13
|
+
* has no data-slot of its own, so we use a class).
|
|
14
|
+
*
|
|
15
|
+
* - overflow-y: auto is a belt-and-suspenders against environments where
|
|
16
|
+
* use-stick-to-bottom's runtime overflow-promote effect hasn't fired yet
|
|
17
|
+
* (it only runs once on mount; if the initial computed overflow isn't
|
|
18
|
+
* "visible" the lib leaves the element alone). Setting it here ensures
|
|
19
|
+
* the element is always scrollable.
|
|
20
|
+
* - -webkit-overflow-scrolling: touch enables iOS momentum scroll on older
|
|
21
|
+
* Safari and is a no-op on modern engines.
|
|
22
|
+
* - touch-action: pan-y tells iOS to only handle vertical pans here, so
|
|
23
|
+
* pinch-zoom / horizontal swipes don't fight with scroll.
|
|
24
|
+
* - overscroll-behavior: contain keeps the host page from scrolling when
|
|
25
|
+
* the user hits the top or bottom of the conversation — important for the
|
|
26
|
+
* mobile fullscreen panel where the page sits behind the overlay.
|
|
27
|
+
*/
|
|
28
|
+
.chat-conv-scroll {
|
|
29
|
+
overflow-y: auto !important;
|
|
30
|
+
-webkit-overflow-scrolling: touch;
|
|
31
|
+
touch-action: pan-y;
|
|
32
|
+
overscroll-behavior: contain;
|
|
33
|
+
}
|
|
34
|
+
|
|
8
35
|
/* Hide the scrollbar in the chat-input textarea (it still scrolls past max height). */
|
|
9
36
|
[data-slot="chat-composer"] [data-slot="textarea"] {
|
|
10
37
|
scrollbar-width: none;
|