@lightworkai.official/debug-capture 0.14.2 → 0.15.0
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 +33 -3
- package/dist/config.d.ts +11 -0
- package/dist/debug-capture.js +135 -8
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +67 -17
- package/dist/live.d.ts +19 -0
- package/dist/portal.d.ts +5 -0
- package/dist/ui/ring.d.ts +19 -0
- package/dist/ui/strings.d.ts +21 -2
- package/dist/ui/styles.d.ts +1 -1
- package/package.json +1 -1
- package/src/config.ts +12 -0
- package/src/index.ts +2 -0
- package/src/install.ts +9 -0
- package/src/live.ts +227 -0
- package/src/portal.ts +3 -0
- package/src/ui/element.ts +84 -38
- package/src/ui/ring.ts +248 -0
- package/src/ui/strings.ts +58 -9
- package/src/ui/styles.ts +16 -5
package/README.md
CHANGED
|
@@ -86,11 +86,14 @@ Where the support desk opens request types to its reporters (ใครขอไ
|
|
|
86
86
|
- **แจ้งปัญหา**: the screen share starts inside that press, then the report
|
|
87
87
|
form, as it has always been.
|
|
88
88
|
- **คำขอ**: the request form straight away, with **no screen share asked
|
|
89
|
-
for**. The person picks what they need from the desk's types
|
|
90
|
-
|
|
89
|
+
for**. The person picks what they need from the desk's types — the one chosen
|
|
90
|
+
shows its description and how long the team aims to take, the rest stay one
|
|
91
|
+
line, and from 7 types there is a search — a title and details; the page's
|
|
91
92
|
address travels with it, the page's logs do not.
|
|
92
93
|
|
|
93
|
-
The form
|
|
94
|
+
The form then names the choice in its heading (รายงานปัญหา or
|
|
95
|
+
ขอให้ทีมดำเนินการ) and keeps one quiet line to switch — **เป็นคำขอ?
|
|
96
|
+
เลือกเรื่องที่ขอ** or **เป็นปัญหาที่ต้องแก้? แจ้งปัญหาแทน** — with nothing typed
|
|
94
97
|
lost: from a report to คำขอ the screenshot comes along (and can be unticked);
|
|
95
98
|
from a request to แจ้งปัญหา the share is asked for at that press — refused, the
|
|
96
99
|
request stays as it was. A request is filed typed, its steps begun on the
|
|
@@ -191,6 +194,8 @@ knowing before you ship:
|
|
|
191
194
|
secret the defaults do not know about.
|
|
192
195
|
- **`module(pathname)`** — becomes the ticket's category. Defaults to the first
|
|
193
196
|
path segment.
|
|
197
|
+
- **`ring`** — a call from the support team rings in your app (see below).
|
|
198
|
+
Default `true`; `false` leaves calls to the support host.
|
|
194
199
|
|
|
195
200
|
## The other half: letting people track what they reported
|
|
196
201
|
|
|
@@ -336,6 +341,31 @@ thrown for you to handle.
|
|
|
336
341
|
|
|
337
342
|
`supportPortalUrl(host, realmKey, token, returnTo?)` is pure and safe to call on a server.
|
|
338
343
|
|
|
344
|
+
### A call from the support team rings here (0.15)
|
|
345
|
+
|
|
346
|
+
The support team can call a reporter from their ticket — voice, and their screen
|
|
347
|
+
if they choose to share it. The call happens on the support host; what this
|
|
348
|
+
package adds is the **ring, in your app**: with `identity` configured and calls
|
|
349
|
+
switched on for the desk, the widget holds the person's own live connection to
|
|
350
|
+
the support host (the one their portal tab holds, proven with the same signed
|
|
351
|
+
token, told about their own tickets and calls and nothing else). A call then
|
|
352
|
+
shows as a card — *ทีมงานกำลังโทรหาคุณ · เรื่อง ACME-12* — with **ไม่รับ** and
|
|
353
|
+
**เปิดเพื่อรับสาย**, a soft ring and the tab's title. Opening it takes them to
|
|
354
|
+
that ticket on the support host, signed in, where they answer.
|
|
355
|
+
|
|
356
|
+
Nothing to wire: it starts with `installDebugCapture()`, once the page has
|
|
357
|
+
settled. It stays silent — no connection, no card, no console noise — without
|
|
358
|
+
`identity`, with calls off for the desk, against a support host older than 0.15,
|
|
359
|
+
or when the token is refused. To leave calls to the support host and its
|
|
360
|
+
invitation instead:
|
|
361
|
+
|
|
362
|
+
```ts
|
|
363
|
+
configureDebugCapture({ /* … */, ring: false });
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
A host that renders its own UI (`installDebugCapture({ ui: false })`) can start
|
|
367
|
+
and stop it itself with `startLiveRing()` / `stopLiveRing()`.
|
|
368
|
+
|
|
339
369
|
|
|
340
370
|
## Installing
|
|
341
371
|
|
package/dist/config.d.ts
CHANGED
|
@@ -139,6 +139,17 @@ export interface DebugCaptureConfig {
|
|
|
139
139
|
screenshotFallback?: () => Promise<ToPng | null>;
|
|
140
140
|
/** UI language. Only affects the built-in reporter's own strings. */
|
|
141
141
|
locale?: "th" | "en";
|
|
142
|
+
/**
|
|
143
|
+
* The ring for a call from the support team. Default true.
|
|
144
|
+
*
|
|
145
|
+
* With `identity` set and calls switched on for the desk, the reporter's own
|
|
146
|
+
* live connection to the support host is held here — the one their portal
|
|
147
|
+
* tab holds, proven with the same signed token — so a call from the team
|
|
148
|
+
* rings in this app, as a card, and opens the reporter's request on the
|
|
149
|
+
* support host to answer it (the call itself happens there). `false` leaves
|
|
150
|
+
* calls to the support host and the invitation the team sends.
|
|
151
|
+
*/
|
|
152
|
+
ring?: boolean;
|
|
142
153
|
/**
|
|
143
154
|
* Where this library's own notifications go.
|
|
144
155
|
*
|