@rollrook-ai/sdk 0.0.0-stage → 0.1.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/dist/agents.d.ts +9 -0
- package/dist/agents.d.ts.map +1 -0
- package/dist/agents.js +13 -0
- package/dist/agents.js.map +1 -0
- package/dist/assets.d.ts +35 -0
- package/dist/assets.d.ts.map +1 -0
- package/dist/assets.js +66 -0
- package/dist/assets.js.map +1 -0
- package/dist/assistant.d.ts +76 -0
- package/dist/assistant.d.ts.map +1 -0
- package/dist/assistant.js +161 -0
- package/dist/assistant.js.map +1 -0
- package/dist/audio.d.ts +55 -0
- package/dist/audio.d.ts.map +1 -0
- package/dist/audio.js +82 -0
- package/dist/audio.js.map +1 -0
- package/dist/bridge.d.ts +51 -0
- package/dist/bridge.d.ts.map +1 -0
- package/dist/bridge.js +78 -0
- package/dist/bridge.js.map +1 -0
- package/dist/calendar.d.ts +33 -0
- package/dist/calendar.d.ts.map +1 -0
- package/dist/calendar.js +63 -0
- package/dist/calendar.js.map +1 -0
- package/dist/context.d.ts +19 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +25 -0
- package/dist/context.js.map +1 -0
- package/dist/errors.d.ts +74 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +111 -0
- package/dist/errors.js.map +1 -0
- package/dist/events.d.ts +36 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +81 -0
- package/dist/events.js.map +1 -0
- package/dist/files.d.ts +29 -0
- package/dist/files.d.ts.map +1 -0
- package/dist/files.js +43 -0
- package/dist/files.js.map +1 -0
- package/dist/index.d.ts +84 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +78 -0
- package/dist/index.js.map +1 -0
- package/dist/mock/index.d.ts +4 -0
- package/dist/mock/index.d.ts.map +1 -0
- package/dist/mock/index.js +3 -0
- package/dist/mock/index.js.map +1 -0
- package/dist/mock/mock-host.d.ts +255 -0
- package/dist/mock/mock-host.d.ts.map +1 -0
- package/dist/mock/mock-host.js +1274 -0
- package/dist/mock/mock-host.js.map +1 -0
- package/dist/mock/samples.d.ts +56 -0
- package/dist/mock/samples.d.ts.map +1 -0
- package/dist/mock/samples.js +283 -0
- package/dist/mock/samples.js.map +1 -0
- package/dist/mock/toolbar.d.ts +95 -0
- package/dist/mock/toolbar.d.ts.map +1 -0
- package/dist/mock/toolbar.js +279 -0
- package/dist/mock/toolbar.js.map +1 -0
- package/dist/net.d.ts +13 -0
- package/dist/net.d.ts.map +1 -0
- package/dist/net.js +26 -0
- package/dist/net.js.map +1 -0
- package/dist/plugin.d.ts +11 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +13 -0
- package/dist/plugin.js.map +1 -0
- package/dist/raven.d.ts +51 -0
- package/dist/raven.d.ts.map +1 -0
- package/dist/raven.js +100 -0
- package/dist/raven.js.map +1 -0
- package/dist/segment-display.d.ts +93 -0
- package/dist/segment-display.d.ts.map +1 -0
- package/dist/segment-display.js +324 -0
- package/dist/segment-display.js.map +1 -0
- package/dist/settings.d.ts +19 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settings.js +27 -0
- package/dist/settings.js.map +1 -0
- package/dist/storage.d.ts +28 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/storage.js +54 -0
- package/dist/storage.js.map +1 -0
- package/dist/system.d.ts +19 -0
- package/dist/system.d.ts.map +1 -0
- package/dist/system.js +24 -0
- package/dist/system.js.map +1 -0
- package/dist/theme.d.ts +51 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +85 -0
- package/dist/theme.js.map +1 -0
- package/dist/types.d.ts +278 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/ui.d.ts +57 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +78 -0
- package/dist/ui.js.map +1 -0
- package/dist/usage.d.ts +14 -0
- package/dist/usage.d.ts.map +1 -0
- package/dist/usage.js +19 -0
- package/dist/usage.js.map +1 -0
- package/dist/video.d.ts +11 -0
- package/dist/video.d.ts.map +1 -0
- package/dist/video.js +17 -0
- package/dist/video.js.map +1 -0
- package/dist/wire.d.ts +214 -0
- package/dist/wire.d.ts.map +1 -0
- package/dist/wire.js +538 -0
- package/dist/wire.js.map +1 -0
- package/package.json +39 -4
- package/src/agents.ts +14 -0
- package/src/assets.ts +80 -0
- package/src/assistant.ts +185 -0
- package/src/audio.ts +90 -0
- package/src/bridge.ts +96 -0
- package/src/calendar.ts +68 -0
- package/src/context.ts +28 -0
- package/src/errors.ts +131 -0
- package/src/events.ts +90 -0
- package/src/files.ts +47 -0
- package/src/index.ts +152 -0
- package/src/mock/index.ts +3 -0
- package/src/mock/mock-host.ts +1408 -0
- package/src/mock/samples.ts +300 -0
- package/src/mock/toolbar.ts +321 -0
- package/src/net.ts +27 -0
- package/src/plugin.ts +14 -0
- package/src/raven.ts +116 -0
- package/src/segment-display.ts +377 -0
- package/src/settings.ts +29 -0
- package/src/storage.ts +59 -0
- package/src/system.ts +26 -0
- package/src/theme.ts +97 -0
- package/src/types.ts +327 -0
- package/src/ui.ts +88 -0
- package/src/usage.ts +21 -0
- package/src/video.ts +17 -0
- package/src/wire.ts +608 -0
- package/theme.css +407 -0
- package/README.md +0 -3
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The mock host's floating controls: theme and high-contrast switches, a
|
|
3
|
+
* visibility switch, the badge the plugin set, the toasts it shows, and the
|
|
4
|
+
* popovers it opens. They live in a shadow
|
|
5
|
+
* root so the plugin's styles and theirs never meet.
|
|
6
|
+
*/
|
|
7
|
+
export class MockToolbar {
|
|
8
|
+
/** The tag of the element hosting the shadow root. */
|
|
9
|
+
static TAG_NAME = "rollrook-mock-host";
|
|
10
|
+
/** How long a toast stays before it fades. */
|
|
11
|
+
static TOAST_DURATION_MS = 2600;
|
|
12
|
+
/** How long a toast takes to fade in or out. */
|
|
13
|
+
static TOAST_FADE_MS = 220;
|
|
14
|
+
/** A popover's size when its view names none. */
|
|
15
|
+
static POPOVER_DEFAULT_SIZE = 320;
|
|
16
|
+
/** How long a popover takes to appear or go. */
|
|
17
|
+
static POPOVER_FADE_MS = 160;
|
|
18
|
+
/** The tag of the element hosting a popover's shadow root. */
|
|
19
|
+
static POPOVER_TAG_NAME = "rollrook-mock-popover";
|
|
20
|
+
static POPOVER_STYLE = `
|
|
21
|
+
:host { all: initial; }
|
|
22
|
+
.backdrop {
|
|
23
|
+
position: fixed;
|
|
24
|
+
inset: 0;
|
|
25
|
+
z-index: 2147483646;
|
|
26
|
+
}
|
|
27
|
+
.panel {
|
|
28
|
+
position: fixed;
|
|
29
|
+
top: 34px;
|
|
30
|
+
right: 12px;
|
|
31
|
+
z-index: 2147483647;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
border-radius: 12px;
|
|
34
|
+
background: var(--rr-background, #fff);
|
|
35
|
+
border: 0.5px solid var(--rr-separator, rgba(0, 0, 0, 0.1));
|
|
36
|
+
transition-property: opacity, transform, height;
|
|
37
|
+
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.1);
|
|
38
|
+
opacity: 0;
|
|
39
|
+
transform: translateY(-4px) scale(0.97);
|
|
40
|
+
transform-origin: top right;
|
|
41
|
+
transition: opacity ${MockToolbar.POPOVER_FADE_MS}ms ease, transform ${MockToolbar.POPOVER_FADE_MS}ms ease;
|
|
42
|
+
}
|
|
43
|
+
.panel.sheet {
|
|
44
|
+
top: 50%;
|
|
45
|
+
right: auto;
|
|
46
|
+
left: 50%;
|
|
47
|
+
transform: translate(-50%, calc(-50% - 4px)) scale(0.97);
|
|
48
|
+
transform-origin: center;
|
|
49
|
+
}
|
|
50
|
+
.panel.shown { opacity: 1; transform: none; }
|
|
51
|
+
.panel.sheet.shown { transform: translate(-50%, -50%); }
|
|
52
|
+
iframe { display: block; border: 0; width: 100%; height: 100%; background: transparent; }
|
|
53
|
+
`;
|
|
54
|
+
static STYLE = `
|
|
55
|
+
:host { all: initial; }
|
|
56
|
+
.toolbar {
|
|
57
|
+
position: fixed;
|
|
58
|
+
right: 12px;
|
|
59
|
+
bottom: 12px;
|
|
60
|
+
z-index: 2147483647;
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: 2px;
|
|
64
|
+
padding: 3px;
|
|
65
|
+
border-radius: 999px;
|
|
66
|
+
background: var(--rr-surface, #fff);
|
|
67
|
+
border: 0.5px solid var(--rr-separator, rgba(0, 0, 0, 0.1));
|
|
68
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
|
|
69
|
+
font: 500 12px/1 var(--rr-font, -apple-system, sans-serif);
|
|
70
|
+
color: var(--rr-text, #1d1d1f);
|
|
71
|
+
opacity: 0.72;
|
|
72
|
+
transition: opacity 160ms ease;
|
|
73
|
+
}
|
|
74
|
+
.toolbar:hover { opacity: 1; }
|
|
75
|
+
button {
|
|
76
|
+
all: unset;
|
|
77
|
+
display: grid;
|
|
78
|
+
place-items: center;
|
|
79
|
+
width: 26px;
|
|
80
|
+
height: 26px;
|
|
81
|
+
border-radius: 999px;
|
|
82
|
+
color: var(--rr-secondary-text, rgba(0, 0, 0, 0.6));
|
|
83
|
+
cursor: default;
|
|
84
|
+
transition: background-color 120ms ease, color 120ms ease, transform 120ms ease;
|
|
85
|
+
}
|
|
86
|
+
button:hover { background: var(--rr-separator, rgba(0, 0, 0, 0.08)); color: var(--rr-text, #1d1d1f); }
|
|
87
|
+
button:active { transform: scale(0.92); }
|
|
88
|
+
button:focus-visible { outline: 2px solid var(--rr-accent, #1d1d1f); outline-offset: 1px; }
|
|
89
|
+
svg { width: 15px; height: 15px; }
|
|
90
|
+
.badge {
|
|
91
|
+
min-width: 8px;
|
|
92
|
+
padding: 5px 8px;
|
|
93
|
+
margin-left: 2px;
|
|
94
|
+
border-radius: 999px;
|
|
95
|
+
background: var(--rr-accent, #1d1d1f);
|
|
96
|
+
color: var(--rr-on-accent, #fff);
|
|
97
|
+
text-align: center;
|
|
98
|
+
transition: opacity 160ms ease, transform 160ms ease;
|
|
99
|
+
}
|
|
100
|
+
.badge[hidden] { display: none; }
|
|
101
|
+
.badge.dot { min-width: 0; width: 7px; height: 7px; padding: 0; margin: 0 6px; }
|
|
102
|
+
.toasts {
|
|
103
|
+
position: fixed;
|
|
104
|
+
left: 0;
|
|
105
|
+
right: 0;
|
|
106
|
+
bottom: 56px;
|
|
107
|
+
z-index: 2147483647;
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
align-items: center;
|
|
111
|
+
gap: 6px;
|
|
112
|
+
pointer-events: none;
|
|
113
|
+
}
|
|
114
|
+
.toast {
|
|
115
|
+
max-width: min(320px, calc(100vw - 32px));
|
|
116
|
+
padding: 8px 14px;
|
|
117
|
+
border-radius: 10px;
|
|
118
|
+
background: var(--rr-text, #1d1d1f);
|
|
119
|
+
color: var(--rr-background, #fff);
|
|
120
|
+
font: 400 13px/1.35 var(--rr-font, -apple-system, sans-serif);
|
|
121
|
+
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
|
|
122
|
+
opacity: 0;
|
|
123
|
+
transform: translateY(6px) scale(0.98);
|
|
124
|
+
transition: opacity ${MockToolbar.TOAST_FADE_MS}ms ease, transform ${MockToolbar.TOAST_FADE_MS}ms ease;
|
|
125
|
+
}
|
|
126
|
+
.toast.shown { opacity: 1; transform: none; }
|
|
127
|
+
`;
|
|
128
|
+
static ICON_THEME = `<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" aria-hidden="true"><circle cx="8" cy="8" r="5.6"/><path d="M8 2.4a5.6 5.6 0 0 1 0 11.2z" fill="currentColor"/></svg>`;
|
|
129
|
+
static ICON_SETTINGS = `<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" aria-hidden="true"><path d="M2.5 4.5h6M11.5 4.5h2M2.5 11.5h2M7.5 11.5h6"/><circle cx="10" cy="4.5" r="1.5"/><circle cx="6" cy="11.5" r="1.5"/></svg>`;
|
|
130
|
+
static ICON_CONTRAST = `<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" aria-hidden="true"><rect x="2.4" y="2.4" width="11.2" height="11.2" rx="2.6"/><path d="M8 2.4h3a2.6 2.6 0 0 1 2.6 2.6v6a2.6 2.6 0 0 1-2.6 2.6H8z" fill="currentColor"/></svg>`;
|
|
131
|
+
static ICON_SHOWN = `<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" aria-hidden="true"><path d="M1.6 8s2.4-4.6 6.4-4.6S14.4 8 14.4 8s-2.4 4.6-6.4 4.6S1.6 8 1.6 8z"/><circle cx="8" cy="8" r="1.9"/></svg>`;
|
|
132
|
+
static ICON_HIDDEN = `<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" aria-hidden="true"><path d="M1.6 8s2.4-4.6 6.4-4.6S14.4 8 14.4 8s-2.4 4.6-6.4 4.6S1.6 8 1.6 8z"/><path d="M2.6 13.4 13.4 2.6"/></svg>`;
|
|
133
|
+
actions;
|
|
134
|
+
host_element;
|
|
135
|
+
badge_element;
|
|
136
|
+
visibility_button;
|
|
137
|
+
toasts_element;
|
|
138
|
+
/**
|
|
139
|
+
* @param actions - what the buttons do
|
|
140
|
+
*/
|
|
141
|
+
constructor(actions) {
|
|
142
|
+
this.actions = actions;
|
|
143
|
+
this.host_element = document.createElement(MockToolbar.TAG_NAME);
|
|
144
|
+
const shadow = this.host_element.attachShadow({ mode: "open" });
|
|
145
|
+
const style = document.createElement("style");
|
|
146
|
+
style.textContent = MockToolbar.STYLE;
|
|
147
|
+
const toolbar = document.createElement("div");
|
|
148
|
+
toolbar.className = "toolbar";
|
|
149
|
+
toolbar.setAttribute("role", "toolbar");
|
|
150
|
+
const theme_button = MockToolbar.button("Switch light and dark", MockToolbar.ICON_THEME);
|
|
151
|
+
theme_button.addEventListener("click", () => this.actions.on_toggle_theme());
|
|
152
|
+
const contrast_button = MockToolbar.button("Switch high contrast", MockToolbar.ICON_CONTRAST);
|
|
153
|
+
contrast_button.addEventListener("click", () => this.actions.on_toggle_contrast());
|
|
154
|
+
this.visibility_button = MockToolbar.button("Hide the tab", MockToolbar.ICON_SHOWN);
|
|
155
|
+
this.visibility_button.addEventListener("click", () => this.actions.on_toggle_visibility());
|
|
156
|
+
this.badge_element = document.createElement("span");
|
|
157
|
+
this.badge_element.className = "badge";
|
|
158
|
+
this.badge_element.hidden = true;
|
|
159
|
+
toolbar.append(theme_button, contrast_button, this.visibility_button);
|
|
160
|
+
const on_open_settings = this.actions.on_open_settings;
|
|
161
|
+
if (on_open_settings !== undefined) {
|
|
162
|
+
const settings_button = MockToolbar.button("Open the plugin's settings", MockToolbar.ICON_SETTINGS);
|
|
163
|
+
settings_button.addEventListener("click", () => on_open_settings());
|
|
164
|
+
toolbar.append(settings_button);
|
|
165
|
+
}
|
|
166
|
+
toolbar.append(this.badge_element);
|
|
167
|
+
this.toasts_element = document.createElement("div");
|
|
168
|
+
this.toasts_element.className = "toasts";
|
|
169
|
+
this.toasts_element.setAttribute("aria-live", "polite");
|
|
170
|
+
shadow.append(style, toolbar, this.toasts_element);
|
|
171
|
+
}
|
|
172
|
+
/** Put the toolbar on the page. */
|
|
173
|
+
attach() {
|
|
174
|
+
document.documentElement.append(this.host_element);
|
|
175
|
+
}
|
|
176
|
+
/** Take the toolbar off the page. */
|
|
177
|
+
remove() {
|
|
178
|
+
this.host_element.remove();
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* @param text - the badge; `""` shows a dot, undefined hides it
|
|
182
|
+
*/
|
|
183
|
+
render_badge(text) {
|
|
184
|
+
this.badge_element.textContent = text ?? "";
|
|
185
|
+
this.badge_element.hidden = text === undefined;
|
|
186
|
+
this.badge_element.classList.toggle("dot", text === "");
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Open a popover view's page in a panel over this page.
|
|
190
|
+
*
|
|
191
|
+
* @param options - the page, its size and what dismissing it does
|
|
192
|
+
* @returns the element holding the popover, for `dismiss_popover`
|
|
193
|
+
*/
|
|
194
|
+
static popover(options) {
|
|
195
|
+
const host_element = document.createElement(MockToolbar.POPOVER_TAG_NAME);
|
|
196
|
+
const shadow = host_element.attachShadow({ mode: "open" });
|
|
197
|
+
const style = document.createElement("style");
|
|
198
|
+
style.textContent = MockToolbar.POPOVER_STYLE;
|
|
199
|
+
const backdrop = document.createElement("div");
|
|
200
|
+
backdrop.className = "backdrop";
|
|
201
|
+
backdrop.addEventListener("click", () => options.on_dismiss());
|
|
202
|
+
const panel = document.createElement("div");
|
|
203
|
+
panel.className = options.is_sheet ? "panel sheet" : "panel";
|
|
204
|
+
panel.style.width = `${options.width}px`;
|
|
205
|
+
panel.style.height = `${options.height}px`;
|
|
206
|
+
const frame = document.createElement("iframe");
|
|
207
|
+
frame.src = options.url;
|
|
208
|
+
frame.title = options.is_sheet ? "Settings" : "Popover";
|
|
209
|
+
panel.append(frame);
|
|
210
|
+
shadow.append(style, backdrop, panel);
|
|
211
|
+
const on_key = (event) => {
|
|
212
|
+
if (event.key === "Escape") {
|
|
213
|
+
options.on_dismiss();
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
document.addEventListener("keydown", on_key);
|
|
217
|
+
host_element.addEventListener("rollrook-mock-dismiss", () => document.removeEventListener("keydown", on_key));
|
|
218
|
+
document.documentElement.append(host_element);
|
|
219
|
+
requestAnimationFrame(() => panel.classList.add("shown"));
|
|
220
|
+
return host_element;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Change a popover's or settings sheet's height, as `ui.height` asks.
|
|
224
|
+
*
|
|
225
|
+
* @param host_element - what `popover` returned
|
|
226
|
+
* @param height - the height in points
|
|
227
|
+
*/
|
|
228
|
+
static resize_popover(host_element, height) {
|
|
229
|
+
const panel = host_element.shadowRoot?.querySelector(".panel");
|
|
230
|
+
if (panel !== null && panel !== undefined) {
|
|
231
|
+
panel.style.height = `${height}px`;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Fade a popover out and remove it; it takes no clicks while it fades.
|
|
236
|
+
*
|
|
237
|
+
* @param host_element - what `popover` returned
|
|
238
|
+
*/
|
|
239
|
+
static dismiss_popover(host_element) {
|
|
240
|
+
host_element.dispatchEvent(new Event("rollrook-mock-dismiss"));
|
|
241
|
+
host_element.style.pointerEvents = "none";
|
|
242
|
+
host_element.shadowRoot?.querySelector(".panel")?.classList.remove("shown");
|
|
243
|
+
setTimeout(() => host_element.remove(), MockToolbar.POPOVER_FADE_MS);
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* @param is_shown - whether the plugin's tab now counts as shown
|
|
247
|
+
*/
|
|
248
|
+
render_visibility(is_shown) {
|
|
249
|
+
this.visibility_button.innerHTML = is_shown ? MockToolbar.ICON_SHOWN : MockToolbar.ICON_HIDDEN;
|
|
250
|
+
const label = is_shown ? "Hide the tab" : "Show the tab";
|
|
251
|
+
this.visibility_button.title = label;
|
|
252
|
+
this.visibility_button.setAttribute("aria-label", label);
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Show a toast that fades after a moment.
|
|
256
|
+
*
|
|
257
|
+
* @param text - the message
|
|
258
|
+
*/
|
|
259
|
+
toast(text) {
|
|
260
|
+
const toast = document.createElement("div");
|
|
261
|
+
toast.className = "toast";
|
|
262
|
+
toast.textContent = text;
|
|
263
|
+
this.toasts_element.append(toast);
|
|
264
|
+
requestAnimationFrame(() => toast.classList.add("shown"));
|
|
265
|
+
setTimeout(() => {
|
|
266
|
+
toast.classList.remove("shown");
|
|
267
|
+
setTimeout(() => toast.remove(), MockToolbar.TOAST_FADE_MS);
|
|
268
|
+
}, MockToolbar.TOAST_DURATION_MS);
|
|
269
|
+
}
|
|
270
|
+
static button(label, icon) {
|
|
271
|
+
const button = document.createElement("button");
|
|
272
|
+
button.type = "button";
|
|
273
|
+
button.title = label;
|
|
274
|
+
button.setAttribute("aria-label", label);
|
|
275
|
+
button.innerHTML = icon;
|
|
276
|
+
return button;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
//# sourceMappingURL=toolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar.js","sourceRoot":"","sources":["../../src/mock/toolbar.ts"],"names":[],"mappings":"AAqBA;;;;;GAKG;AACH,MAAM,OAAO,WAAW;IACpB,sDAAsD;IACtD,MAAM,CAAU,QAAQ,GAAG,oBAAoB,CAAC;IAEhD,8CAA8C;IAC9C,MAAM,CAAU,iBAAiB,GAAG,IAAI,CAAC;IAEzC,gDAAgD;IAChD,MAAM,CAAU,aAAa,GAAG,GAAG,CAAC;IAEpC,iDAAiD;IACjD,MAAM,CAAU,oBAAoB,GAAG,GAAG,CAAC;IAE3C,gDAAgD;IAChD,MAAM,CAAU,eAAe,GAAG,GAAG,CAAC;IAEtC,8DAA8D;IAC9D,MAAM,CAAU,gBAAgB,GAAG,uBAAuB,CAAC;IAEnD,MAAM,CAAU,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;0BAqBlB,WAAW,CAAC,eAAe,sBAAsB,WAAW,CAAC,eAAe;;;;;;;;;;;;CAYrG,CAAC;IAEU,MAAM,CAAU,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAsEV,WAAW,CAAC,aAAa,sBAAsB,WAAW,CAAC,aAAa;;;CAGjG,CAAC;IAEU,MAAM,CAAU,UAAU,GAAG,oMAAoM,CAAC;IAElO,MAAM,CAAU,aAAa,GAAG,2PAA2P,CAAC;IAC5R,MAAM,CAAU,aAAa,GAAG,6PAA6P,CAAC;IAE9R,MAAM,CAAU,UAAU,GAAG,6OAA6O,CAAC;IAE3Q,MAAM,CAAU,WAAW,GA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C,MAAM,EAAE,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC;QAChE,CAAC,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAC;IACtC,CAAC;IAEO,MAAM,CAAC,MAAM,CAAC,KAAa,EAAE,IAAY;QAC7C,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAChD,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;QACvB,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACzC,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;QACxB,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ"}
|
package/dist/net.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FetchRequest, FetchResponse } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Fetch over https through RollRook. The page itself cannot reach the
|
|
4
|
+
* network; each host must be granted with a `net:<host>` permission.
|
|
5
|
+
*/
|
|
6
|
+
export declare class NetApi {
|
|
7
|
+
/**
|
|
8
|
+
* @param request - the request to send
|
|
9
|
+
* @returns the response, its body as text
|
|
10
|
+
*/
|
|
11
|
+
fetch(request: FetchRequest): Promise<FetchResponse>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=net.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"net.d.ts","sourceRoot":"","sources":["../src/net.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAc,MAAM,YAAY,CAAC;AAG1E;;;GAGG;AACH,qBAAa,MAAM;IACf;;;OAGG;IACG,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC,CAYzD;CACJ"}
|
package/dist/net.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Bridge } from "./bridge.js";
|
|
2
|
+
import { Wire } from "./wire.js";
|
|
3
|
+
/**
|
|
4
|
+
* Fetch over https through RollRook. The page itself cannot reach the
|
|
5
|
+
* network; each host must be granted with a `net:<host>` permission.
|
|
6
|
+
*/
|
|
7
|
+
export class NetApi {
|
|
8
|
+
/**
|
|
9
|
+
* @param request - the request to send
|
|
10
|
+
* @returns the response, its body as text
|
|
11
|
+
*/
|
|
12
|
+
async fetch(request) {
|
|
13
|
+
const params = { url: request.url };
|
|
14
|
+
if (request.method !== undefined) {
|
|
15
|
+
params["method"] = request.method;
|
|
16
|
+
}
|
|
17
|
+
if (request.map_headers !== undefined) {
|
|
18
|
+
params["headers"] = { ...request.map_headers };
|
|
19
|
+
}
|
|
20
|
+
if (request.body !== undefined) {
|
|
21
|
+
params["body"] = request.body;
|
|
22
|
+
}
|
|
23
|
+
return Wire.fetch_response(await Bridge.call("net.fetch", params));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=net.js.map
|
package/dist/net.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"net.js","sourceRoot":"","sources":["../src/net.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC;;;GAGG;AACH,MAAM,OAAO,MAAM;IACf;;;OAGG;IACH,KAAK,CAAC,KAAK,CAAC,OAAqB;QAC7B,MAAM,MAAM,GAAe,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;QAChD,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YAC/B,MAAM,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;QACtC,CAAC;QACD,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YACpC,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;QACnD,CAAC;QACD,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC7B,MAAM,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;QAClC,CAAC;QACD,OAAO,IAAI,CAAC,cAAc,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IACvE,CAAC;CACJ"}
|
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { JsonValue } from "./types.js";
|
|
2
|
+
/** The plugin's other running views; their messages arrive as the `message` event. */
|
|
3
|
+
export declare class PluginApi {
|
|
4
|
+
/**
|
|
5
|
+
* Send a message to every other instance of the plugin's views.
|
|
6
|
+
*
|
|
7
|
+
* @param message - any JSON value
|
|
8
|
+
*/
|
|
9
|
+
broadcast(message: JsonValue): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,sFAAsF;AACtF,qBAAa,SAAS;IAClB;;;;OAIG;IACG,SAAS,CAAC,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAEjD;CACJ"}
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Bridge } from "./bridge.js";
|
|
2
|
+
/** The plugin's other running views; their messages arrive as the `message` event. */
|
|
3
|
+
export class PluginApi {
|
|
4
|
+
/**
|
|
5
|
+
* Send a message to every other instance of the plugin's views.
|
|
6
|
+
*
|
|
7
|
+
* @param message - any JSON value
|
|
8
|
+
*/
|
|
9
|
+
async broadcast(message) {
|
|
10
|
+
await Bridge.call("plugin.broadcast", { message });
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,sFAAsF;AACtF,MAAM,OAAO,SAAS;IAClB;;;;OAIG;IACH,KAAK,CAAC,SAAS,CAAC,OAAkB;QAC9B,MAAM,MAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IACvD,CAAC;CACJ"}
|
package/dist/raven.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Events } from "./events.js";
|
|
2
|
+
import type { RavenAnswer } from "./types.js";
|
|
3
|
+
/** Options for waiting on Raven's answer. */
|
|
4
|
+
export interface RavenWaitOptions {
|
|
5
|
+
/** Stops the wait; the promise then rejects with the signal's reason. */
|
|
6
|
+
signal?: AbortSignal;
|
|
7
|
+
/** Called with each partial answer while Raven works. */
|
|
8
|
+
on_progress?: (answer: RavenAnswer) => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Ask Raven, RollRook's assistant, in conversations the plugin starts or
|
|
12
|
+
* continues. They appear in Raven's list as the plugin's. Needs the `raven`
|
|
13
|
+
* permission.
|
|
14
|
+
*/
|
|
15
|
+
export declare class RavenApi {
|
|
16
|
+
/** How often a wait checks the answer, besides listening for `raven.turn`. */
|
|
17
|
+
static readonly POLL_INTERVAL_MS = 3000;
|
|
18
|
+
private readonly events;
|
|
19
|
+
/**
|
|
20
|
+
* @param events - the event hub `raven.turn` arrives on
|
|
21
|
+
*/
|
|
22
|
+
constructor(events: Events);
|
|
23
|
+
/**
|
|
24
|
+
* Send a prompt as the user would.
|
|
25
|
+
*
|
|
26
|
+
* @param prompt - what to ask
|
|
27
|
+
* @param conversation_id - a conversation the plugin started, to continue it; a new one otherwise
|
|
28
|
+
* @returns the conversation's id
|
|
29
|
+
*/
|
|
30
|
+
ask(prompt: string, conversation_id?: string): Promise<string>;
|
|
31
|
+
/**
|
|
32
|
+
* @param conversation_id - a conversation the plugin started
|
|
33
|
+
* @returns Raven's last answer in it and whether a turn still runs
|
|
34
|
+
*/
|
|
35
|
+
answer(conversation_id: string): Promise<RavenAnswer>;
|
|
36
|
+
/**
|
|
37
|
+
* Show the conversation in Raven.
|
|
38
|
+
*
|
|
39
|
+
* @param conversation_id - a conversation the plugin started
|
|
40
|
+
*/
|
|
41
|
+
open(conversation_id: string): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Wait until Raven finishes the conversation's current turn.
|
|
44
|
+
*
|
|
45
|
+
* @param conversation_id - a conversation the plugin started
|
|
46
|
+
* @param options - an abort signal and a progress callback
|
|
47
|
+
* @returns the finished answer
|
|
48
|
+
*/
|
|
49
|
+
wait(conversation_id: string, options?: RavenWaitOptions): Promise<RavenAnswer>;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=raven.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raven.d.ts","sourceRoot":"","sources":["../src/raven.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAc,WAAW,EAAa,MAAM,YAAY,CAAC;AAGrE,6CAA6C;AAC7C,MAAM,WAAW,gBAAgB;IAC7B,yEAAyE;IACzE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,yDAAyD;IACzD,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CAC/C;AAED;;;;GAIG;AACH,qBAAa,QAAQ;IACjB,8EAA8E;IAC9E,MAAM,CAAC,QAAQ,CAAC,gBAAgB,QAAQ;IAExC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAEhC;;OAEG;IACH,YAAY,MAAM,EAAE,MAAM,EAEzB;IAED;;;;;;OAMG;IACG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAOnE;IAED;;;OAGG;IACG,MAAM,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAE1D;IAED;;;;OAIG;IACG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEjD;IAED;;;;;;OAMG;IACH,IAAI,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,WAAW,CAAC,CA2ClF;CACJ"}
|
package/dist/raven.js
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Bridge } from "./bridge.js";
|
|
2
|
+
import { Wire } from "./wire.js";
|
|
3
|
+
/**
|
|
4
|
+
* Ask Raven, RollRook's assistant, in conversations the plugin starts or
|
|
5
|
+
* continues. They appear in Raven's list as the plugin's. Needs the `raven`
|
|
6
|
+
* permission.
|
|
7
|
+
*/
|
|
8
|
+
export class RavenApi {
|
|
9
|
+
/** How often a wait checks the answer, besides listening for `raven.turn`. */
|
|
10
|
+
static POLL_INTERVAL_MS = 3000;
|
|
11
|
+
events;
|
|
12
|
+
/**
|
|
13
|
+
* @param events - the event hub `raven.turn` arrives on
|
|
14
|
+
*/
|
|
15
|
+
constructor(events) {
|
|
16
|
+
this.events = events;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Send a prompt as the user would.
|
|
20
|
+
*
|
|
21
|
+
* @param prompt - what to ask
|
|
22
|
+
* @param conversation_id - a conversation the plugin started, to continue it; a new one otherwise
|
|
23
|
+
* @returns the conversation's id
|
|
24
|
+
*/
|
|
25
|
+
async ask(prompt, conversation_id) {
|
|
26
|
+
const params = { prompt };
|
|
27
|
+
if (conversation_id !== undefined) {
|
|
28
|
+
params["conversationId"] = conversation_id;
|
|
29
|
+
}
|
|
30
|
+
const record = Wire.record(await Bridge.call("raven.ask", params), "raven.ask reply");
|
|
31
|
+
return Wire.string(record, "conversationId", "raven.ask reply");
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @param conversation_id - a conversation the plugin started
|
|
35
|
+
* @returns Raven's last answer in it and whether a turn still runs
|
|
36
|
+
*/
|
|
37
|
+
async answer(conversation_id) {
|
|
38
|
+
return Wire.raven_answer(await Bridge.call("raven.answer", { conversationId: conversation_id }));
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Show the conversation in Raven.
|
|
42
|
+
*
|
|
43
|
+
* @param conversation_id - a conversation the plugin started
|
|
44
|
+
*/
|
|
45
|
+
async open(conversation_id) {
|
|
46
|
+
await Bridge.call("raven.open", { conversationId: conversation_id });
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Wait until Raven finishes the conversation's current turn.
|
|
50
|
+
*
|
|
51
|
+
* @param conversation_id - a conversation the plugin started
|
|
52
|
+
* @param options - an abort signal and a progress callback
|
|
53
|
+
* @returns the finished answer
|
|
54
|
+
*/
|
|
55
|
+
wait(conversation_id, options = {}) {
|
|
56
|
+
return new Promise((resolve, reject) => {
|
|
57
|
+
const signal = options.signal;
|
|
58
|
+
if (signal?.aborted === true) {
|
|
59
|
+
reject(signal.reason);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
let unsubscribe = undefined;
|
|
63
|
+
let poll_timer = undefined;
|
|
64
|
+
const finish = () => {
|
|
65
|
+
unsubscribe?.();
|
|
66
|
+
clearInterval(poll_timer);
|
|
67
|
+
signal?.removeEventListener("abort", on_abort);
|
|
68
|
+
};
|
|
69
|
+
const on_abort = () => {
|
|
70
|
+
finish();
|
|
71
|
+
reject(signal?.reason);
|
|
72
|
+
};
|
|
73
|
+
const on_answer = (answer) => {
|
|
74
|
+
options.on_progress?.(answer);
|
|
75
|
+
if (!answer.is_running) {
|
|
76
|
+
finish();
|
|
77
|
+
resolve(answer);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const on_turn = (turn) => {
|
|
81
|
+
if (turn.conversation_id === conversation_id) {
|
|
82
|
+
on_answer({
|
|
83
|
+
is_running: turn.is_running,
|
|
84
|
+
answer: turn.answer,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
const poll = () => {
|
|
89
|
+
this.answer(conversation_id).then(on_answer, (err) => {
|
|
90
|
+
finish();
|
|
91
|
+
reject(err);
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
signal?.addEventListener("abort", on_abort);
|
|
95
|
+
unsubscribe = this.events.on("raven.turn", on_turn);
|
|
96
|
+
poll_timer = setInterval(poll, RavenApi.POLL_INTERVAL_MS);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=raven.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raven.js","sourceRoot":"","sources":["../src/raven.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAUjC;;;;GAIG;AACH,MAAM,OAAO,QAAQ;IACjB,8EAA8E;IAC9E,MAAM,CAAU,gBAAgB,GAAG,IAAI,CAAC;IAEvB,MAAM,CAAS;IAEhC;;OAEG;IACH,YAAY,MAAc;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,GAAG,CAAC,MAAc,EAAE,eAAwB;QAC9C,MAAM,MAAM,GAAe,EAAE,MAAM,EAAE,CAAC;QACtC,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,gBAAgB,CAAC,GAAG,eAAe,CAAC;QAC/C,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,EA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WAAW,EAAE,CAAC,MAAM,CAAC,CAAC;gBAC9B,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;oBACrB,MAAM,EAAE,CAAC;oBACT,OAAO,CAAC,MAAM,CAAC,CAAC;gBACpB,CAAC;YACL,CAAC,CAAC;YACF,MAAM,OAAO,GAAG,CAAC,IAAe,EAAQ,EAAE;gBACtC,IAAI,IAAI,CAAC,eAAe,KAAK,eAAe,EAAE,CAAC;oBAC3C,SAAS,CAAC;wBACN,UAAU,EAAE,IAAI,CAAC,UAAU;wBAC3B,MAAM,EAAE,IAAI,CAAC,MAAM;qBACtB,CAAC,CAAC;gBACP,CAAC;YACL,CAAC,CAAC;YACF,MAAM,IAAI,GAAG,GAAS,EAAE;gBACpB,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,GAAY,EAAE,EAAE;oBAC1D,MAAM,EAAE,CAAC;oBACT,MAAM,CAAC,GAAG,CAAC,CAAC;gBAChB,CAAC,CAAC,CAAC;YACP,CAAC,CAAC;YACF,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAC5C,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;YACpD,UAAU,GAAG,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/** A segment of a character cell: the seven of a digit, and for letters the middle split in two, a center stroke in two halves and four diagonals. */
|
|
2
|
+
export type Segment = "top" | "top_right" | "bottom_right" | "bottom" | "bottom_left" | "top_left" | "middle" | "middle_left" | "middle_right" | "center_top" | "center_bottom" | "diagonal_top_left" | "diagonal_top_right" | "diagonal_bottom_left" | "diagonal_bottom_right";
|
|
3
|
+
/** A point of a segment's outline, before the display leans. */
|
|
4
|
+
export interface SegmentPoint {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}
|
|
8
|
+
/** How a display is drawn. */
|
|
9
|
+
export interface SegmentDisplayOptions {
|
|
10
|
+
/** A digit's height in CSS pixels. */
|
|
11
|
+
digit_height: number;
|
|
12
|
+
/** Whether the colons blink with the seconds, lit on even ones. */
|
|
13
|
+
is_blinking?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Text drawn as RollRook's segment displays draw it, as on a digital clock:
|
|
17
|
+
* digits on seven segments, letters on fourteen as an alphanumeric display
|
|
18
|
+
* draws them, colons and dashes between; unlit segments faintly showing in
|
|
19
|
+
* the lit color, and in the dark theme a glow around what is lit. The
|
|
20
|
+
* drawing is an SVG in `currentColor`, which `theme.css` sets to
|
|
21
|
+
* `--rr-segment`; set `color` on it for another.
|
|
22
|
+
*/
|
|
23
|
+
export declare class SegmentDisplay {
|
|
24
|
+
/** Every segment of a cell, in drawing order. */
|
|
25
|
+
static readonly LIST_SEGMENTS: readonly Segment[];
|
|
26
|
+
/** The seven segments of a digit's cell. */
|
|
27
|
+
static readonly LIST_DIGIT_SEGMENTS: readonly Segment[];
|
|
28
|
+
/** The segments each character lights; a character drawn only with digit segments gets a digit's cell. */
|
|
29
|
+
static readonly map_glyph_segments: Record<string, readonly Segment[]>;
|
|
30
|
+
/** A digit's width, as a share of its height. */
|
|
31
|
+
static readonly WIDTH_RATIO = 0.58;
|
|
32
|
+
/** A segment's thickness, as a share of the height. */
|
|
33
|
+
static readonly THICKNESS_RATIO = 0.115;
|
|
34
|
+
/** The thinnest a segment gets, so small displays stay legible. */
|
|
35
|
+
static readonly MINIMUM_THICKNESS = 1.1;
|
|
36
|
+
/** The space between cells, as a share of the height. */
|
|
37
|
+
static readonly SPACING_RATIO = 0.2;
|
|
38
|
+
/** A colon's cell width, as a share of the height. */
|
|
39
|
+
static readonly COLON_WIDTH_RATIO = 0.26;
|
|
40
|
+
/** A dash's cell width, as a share of the height. */
|
|
41
|
+
static readonly DASH_WIDTH_RATIO = 0.34;
|
|
42
|
+
/** How far the display leans, as a share of its height. */
|
|
43
|
+
static readonly SLANT = 0.08;
|
|
44
|
+
/** The glow's radius in the dark theme, as a share of the height. */
|
|
45
|
+
static readonly GLOW_RADIUS_RATIO = 0.18;
|
|
46
|
+
/** The gap where two segments meet, as a share of the thickness. */
|
|
47
|
+
static readonly GAP_RATIO = 0.3;
|
|
48
|
+
/** The heights of a colon's two dots, as shares of the height. */
|
|
49
|
+
static readonly LIST_COLON_HEIGHTS: number[];
|
|
50
|
+
/** The period of the colons' blink: lit for one second, dark for the next. */
|
|
51
|
+
static readonly BLINK_PERIOD_MS = 2000;
|
|
52
|
+
/** The class of the drawing. */
|
|
53
|
+
static readonly CLASS_NAME = "rr-segment-display";
|
|
54
|
+
private static readonly SVG_NAMESPACE;
|
|
55
|
+
private readonly digit_height;
|
|
56
|
+
private readonly is_blinking;
|
|
57
|
+
/**
|
|
58
|
+
* @param options - the digit height and whether the colons blink
|
|
59
|
+
*/
|
|
60
|
+
constructor(options: SegmentDisplayOptions);
|
|
61
|
+
/**
|
|
62
|
+
* The width some text takes, without its glow, for lining displays up in columns.
|
|
63
|
+
*
|
|
64
|
+
* @param text - the text
|
|
65
|
+
* @returns the width in CSS pixels
|
|
66
|
+
*/
|
|
67
|
+
width_of(text: string): number;
|
|
68
|
+
/**
|
|
69
|
+
* Draw text as an SVG the size of the display; the glow spills outside it.
|
|
70
|
+
*
|
|
71
|
+
* @param text - digits, the letters the display knows, colons and dashes
|
|
72
|
+
* @returns the drawing
|
|
73
|
+
*/
|
|
74
|
+
render(text: string): SVGSVGElement;
|
|
75
|
+
/**
|
|
76
|
+
* The delay that starts the colons' blink on an even second of the wall clock.
|
|
77
|
+
*
|
|
78
|
+
* @param now_ms - the time now, in milliseconds since the epoch
|
|
79
|
+
* @returns a negative CSS animation delay, in milliseconds
|
|
80
|
+
*/
|
|
81
|
+
static blink_delay_ms(now_ms: number): number;
|
|
82
|
+
private cell_width;
|
|
83
|
+
private spacing;
|
|
84
|
+
private thickness;
|
|
85
|
+
private colon_paths;
|
|
86
|
+
private segment_path;
|
|
87
|
+
private diagonal;
|
|
88
|
+
private horizontal;
|
|
89
|
+
private vertical;
|
|
90
|
+
private outline;
|
|
91
|
+
private static path_element;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=segment-display.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segment-display.d.ts","sourceRoot":"","sources":["../src/segment-display.ts"],"names":[],"mappings":"AAAA,sJAAsJ;AACtJ,MAAM,MAAM,OAAO,GACb,KAAK,GACL,WAAW,GACX,cAAc,GACd,QAAQ,GACR,aAAa,GACb,UAAU,GACV,QAAQ,GACR,aAAa,GACb,cAAc,GACd,YAAY,GACZ,eAAe,GACf,mBAAmB,GACnB,oBAAoB,GACpB,sBAAsB,GACtB,uBAAuB,CAAC;AAE9B,gEAAgE;AAChE,MAAM,WAAW,YAAY;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb;AAED,8BAA8B;AAC9B,MAAM,WAAW,qBAAqB;IAClC,sCAAsC;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,mEAAmE;IACnE,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,qBAAa,cAAc;IACvB,iDAAiD;IACjD,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAE,SAAS,OAAO,EAAE,CAgB/C;IAEF,4CAA4C;IAC5C,MAAM,CAAC,QAAQ,CAAC,mBAAmB,EAAE,SAAS,OAAO,EAAE,CAQrD;IAEF,0GAA0G;IAC1G,MAAM,CAAC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC,CAmCpE;IAEF,iDAAiD;IACjD,MAAM,CAAC,QAAQ,CAAC,WAAW,QAAQ;IACnC,uDAAuD;I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