@tmls-ai/support 0.1.0 → 0.1.1
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 +9 -2
- package/package.json +26 -7
package/dist/index.js
CHANGED
|
@@ -117,7 +117,14 @@ function SupportWidget(props) {
|
|
|
117
117
|
}, []);
|
|
118
118
|
const captureShot = useCallback(async () => {
|
|
119
119
|
try {
|
|
120
|
-
const
|
|
120
|
+
const root = document.documentElement;
|
|
121
|
+
const blob = await domToBlob(root, {
|
|
122
|
+
quality: 0.8,
|
|
123
|
+
scale: 0.75,
|
|
124
|
+
width: root.clientWidth || window.innerWidth,
|
|
125
|
+
height: root.clientHeight || window.innerHeight,
|
|
126
|
+
filter: (node) => !(node instanceof HTMLElement && node.dataset.tmlsSupportRoot === "true")
|
|
127
|
+
});
|
|
121
128
|
setShotPreview(URL.createObjectURL(blob));
|
|
122
129
|
captureShot._blob = blob;
|
|
123
130
|
} catch {
|
|
@@ -178,7 +185,7 @@ function SupportWidget(props) {
|
|
|
178
185
|
background: active ? accent : "transparent",
|
|
179
186
|
color: active ? "#fff" : "#c8c8d0"
|
|
180
187
|
});
|
|
181
|
-
return /* @__PURE__ */ jsxs("div", { style: { position: "fixed", bottom: 20, right: 20, zIndex: 2147483e3, fontFamily: "system-ui, sans-serif" }, children: [
|
|
188
|
+
return /* @__PURE__ */ jsxs("div", { "data-tmls-support-root": "true", style: { position: "fixed", bottom: 20, right: 20, zIndex: 2147483e3, fontFamily: "system-ui, sans-serif" }, children: [
|
|
182
189
|
open && /* @__PURE__ */ jsxs("div", { style: {
|
|
183
190
|
position: "absolute",
|
|
184
191
|
bottom: 60,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tmls-ai/support",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Embeddable Timeless support widget — bottom-right report overlay (type / severity / screenshot) + ticket thread. Auto-captures context, talks to tmls-support-api.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -8,12 +8,31 @@
|
|
|
8
8
|
"main": "./dist/index.js",
|
|
9
9
|
"module": "./dist/index.js",
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
|
-
"exports": {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/tmls-ai/tmls-support-widget.git"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"support",
|
|
26
|
+
"widget",
|
|
27
|
+
"timeless",
|
|
28
|
+
"tmls"
|
|
29
|
+
],
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=18"
|
|
35
|
+
},
|
|
17
36
|
"scripts": {
|
|
18
37
|
"build": "tsup src/index.ts --format esm --dts --clean",
|
|
19
38
|
"typecheck": "tsc --noEmit",
|