@signalcore/ui 1.0.0-beta.0 → 1.0.0-beta.2
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 +8 -1
- package/dist/AgentAbout.js +7 -4
- package/dist/AgentAbout.js.map +1 -1
- package/dist/AgentChat.js +10 -2
- package/dist/AgentChat.js.map +1 -1
- package/dist/AgentTasks.js +2 -1
- package/dist/AgentTasks.js.map +1 -1
- package/dist/VoiceCall.js +1 -1
- package/dist/VoiceCall.js.map +1 -1
- package/dist/about.d.ts +34 -144
- package/dist/about.js +6 -8
- package/dist/about.js.map +1 -1
- package/dist/automation/cron.d.ts +1 -1
- package/dist/automation/cron.js.map +1 -1
- package/dist/automation/marks.js +7 -3
- package/dist/automation/marks.js.map +1 -1
- package/dist/automation/messages.d.ts +2 -0
- package/dist/automation/messages.js +2 -0
- package/dist/automation/messages.js.map +1 -1
- package/dist/automation/types.d.ts +25 -128
- package/dist/automation/types.js +36 -0
- package/dist/automation/types.js.map +1 -0
- package/dist/automation/when.d.ts +1 -1
- package/dist/automation/when.js +5 -1
- package/dist/automation/when.js.map +1 -1
- package/dist/blocks.d.ts +23 -1
- package/dist/browser.js +2 -2
- package/dist/browser.js.map +1 -1
- package/dist/call.d.ts +1 -1
- package/dist/call.js.map +1 -1
- package/dist/contract.d.ts +262 -0
- package/dist/credentials.js.map +1 -1
- package/dist/dev.js +1 -1
- package/dist/dev.js.map +1 -1
- package/dist/es.js +9 -1
- package/dist/es.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -1
- package/dist/kit/AudioPlayer.js +1 -1
- package/dist/kit/AudioPlayer.js.map +1 -1
- package/dist/kit/Choices.js +1 -1
- package/dist/kit/Choices.js.map +1 -1
- package/dist/kit/FileField.js +1 -1
- package/dist/kit/FileField.js.map +1 -1
- package/dist/kit/Popover.js.map +1 -1
- package/dist/kit/Tile.d.ts +1 -1
- package/dist/kit/Tile.js +1 -1
- package/dist/kit/Tile.js.map +1 -1
- package/dist/kit/messages.d.ts +13 -0
- package/dist/kit/messages.js +7 -1
- package/dist/kit/messages.js.map +1 -1
- package/dist/kit/uploads.d.ts +2 -1
- package/dist/kit/uploads.js +1 -1
- package/dist/kit/uploads.js.map +1 -1
- package/dist/kit/waveform.js.map +1 -1
- package/dist/markdown.js.map +1 -1
- package/dist/marks.js +2 -3
- package/dist/marks.js.map +1 -1
- package/dist/surface/Markdown.js +1 -1
- package/dist/surface/Markdown.js.map +1 -1
- package/dist/surface/Surface.js +43 -4
- package/dist/surface/Surface.js.map +1 -1
- package/dist/surface/scope.d.ts +1 -1
- package/dist/surface/scope.js.map +1 -1
- package/dist/surface/values.js +1 -1
- package/dist/surface/values.js.map +1 -1
- package/dist/tint.d.ts +1 -1
- package/dist/tint.js +1 -1
- package/dist/tint.js.map +1 -1
- package/dist/types.d.ts +7 -0
- package/dist/types.js.map +1 -1
- package/dist/usePolled.js +1 -1
- package/dist/usePolled.js.map +1 -1
- package/dist/voice/webgl.js +1 -1
- package/dist/voice/webgl.js.map +1 -1
- package/dist/widget.js +14 -14
- package/package.json +1 -1
- package/src/AgentAbout.tsx +10 -3
- package/src/AgentChat.tsx +20 -3
- package/src/AgentTasks.tsx +2 -2
- package/src/VoiceCall.tsx +1 -1
- package/src/about.ts +42 -144
- package/src/automation/cron.ts +1 -1
- package/src/automation/marks.tsx +6 -2
- package/src/automation/messages.ts +4 -0
- package/src/automation/types.ts +58 -118
- package/src/automation/when.ts +3 -1
- package/src/blocks.ts +25 -0
- package/src/browser.ts +4 -4
- package/src/call.ts +1 -1
- package/src/contract.ts +1720 -0
- package/src/credentials.ts +2 -2
- package/src/dev.ts +1 -1
- package/src/es.ts +8 -0
- package/src/index.ts +2 -0
- package/src/kit/AudioPlayer.tsx +1 -1
- package/src/kit/Choices.tsx +1 -1
- package/src/kit/FileField.tsx +1 -1
- package/src/kit/Popover.tsx +1 -1
- package/src/kit/Tile.tsx +1 -1
- package/src/kit/messages.ts +20 -0
- package/src/kit/uploads.ts +2 -2
- package/src/kit/waveform.ts +1 -1
- package/src/markdown.ts +1 -1
- package/src/marks.tsx +3 -123
- package/src/styles.css +24 -0
- package/src/surface/Markdown.tsx +1 -1
- package/src/surface/Surface.tsx +53 -4
- package/src/surface/scope.ts +3 -1
- package/src/surface/values.ts +5 -5
- package/src/tint.ts +1 -1
- package/src/types.ts +8 -0
- package/src/usePolled.ts +2 -2
- package/src/voice/webgl.ts +1 -1
package/src/blocks.ts
CHANGED
|
@@ -100,6 +100,30 @@ export interface AutomationBlock {
|
|
|
100
100
|
view: AutomationView | null;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
/**
|
|
104
|
+
* How the connection an app's card asked for stands: its name and logo, and where the person
|
|
105
|
+
* authorizes it while it waits for them.
|
|
106
|
+
*/
|
|
107
|
+
export interface ConnectView {
|
|
108
|
+
title: string;
|
|
109
|
+
icon: string | null;
|
|
110
|
+
status: "pending" | "active" | "error" | "disconnected";
|
|
111
|
+
url: string | null;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* An app for the person to connect, drawn by the platform alone (the agent's `connect_app`,
|
|
116
|
+
* never composed): its name and logo, the line the agent wrote of what it will do with it, and
|
|
117
|
+
* the button that opens its consent page; the API fills in `connection`, and the card changes
|
|
118
|
+
* live as it does (waiting, working, failed). Null while there is none yet.
|
|
119
|
+
*/
|
|
120
|
+
export interface ConnectBlock {
|
|
121
|
+
type: "connect";
|
|
122
|
+
app: string;
|
|
123
|
+
purpose: string;
|
|
124
|
+
connection: ConnectView | null;
|
|
125
|
+
}
|
|
126
|
+
|
|
103
127
|
// --- Action -------------------------------------------------------------------------------
|
|
104
128
|
|
|
105
129
|
/** One thing the person can do: pressing it sends `action`, or, with `url`, opens that page. */
|
|
@@ -238,6 +262,7 @@ export type Block =
|
|
|
238
262
|
| ImageBlock
|
|
239
263
|
| AutomationBlock
|
|
240
264
|
| FileBlock
|
|
265
|
+
| ConnectBlock
|
|
241
266
|
| ButtonBlock
|
|
242
267
|
| ChoiceBlock
|
|
243
268
|
| FormBlock;
|
package/src/browser.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import type { BrowserFrame, BrowserInput, Message } from "./types";
|
|
7
7
|
|
|
8
8
|
/** The action that hands the person the browser; the turn waits on it until they give it back. */
|
|
9
|
-
|
|
9
|
+
const HAND_OVER = "browser_hand_over";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* The browser's screen as it comes: the latest picture, and whoever watches. Kept out of the
|
|
@@ -66,7 +66,7 @@ export function siteOf(url: string): { host: string; rest: string } {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
interface Size {
|
|
70
70
|
width: number;
|
|
71
71
|
height: number;
|
|
72
72
|
}
|
|
@@ -86,7 +86,7 @@ export function pointOf(
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
/** DevTools' mask of the keys held with another: Alt 1, Ctrl 2, Meta 4, Shift 8. */
|
|
89
|
-
|
|
89
|
+
function modifiersOf(event: {
|
|
90
90
|
altKey: boolean;
|
|
91
91
|
ctrlKey: boolean;
|
|
92
92
|
metaKey: boolean;
|
|
@@ -268,7 +268,7 @@ export function bytesOf(base64: string): Uint8Array<ArrayBuffer> {
|
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
/** Draws a picture on a canvas, unless a newer one comes while it is still being decoded. */
|
|
271
|
-
|
|
271
|
+
interface Painter {
|
|
272
272
|
paint: (jpeg: string) => void;
|
|
273
273
|
dispose: () => void;
|
|
274
274
|
}
|
package/src/call.ts
CHANGED
|
@@ -34,7 +34,7 @@ export type CallProblem =
|
|
|
34
34
|
| "unsupported"
|
|
35
35
|
/** Calls aren't set up where the agent works (the API refused with `no_calls`). */
|
|
36
36
|
| "off"
|
|
37
|
-
/** The agent takes no calls:
|
|
37
|
+
/** The agent takes no calls: the builder (`builder`). */
|
|
38
38
|
| "builder"
|
|
39
39
|
/** The API wouldn't make the call, for any other reason it named. */
|
|
40
40
|
| "refused"
|