viberoom 0.6.1 → 0.7.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/NOTICE +14 -0
- package/dist/hub.js +45 -4
- package/package.json +1 -1
- package/ui/app.css +131 -107
- package/ui/app.js +334 -87
- package/ui/avatars.js +7 -14
- package/ui/components.css +116 -21
- package/ui/components.js +202 -1
- package/ui/fonts/anonymous-pro-cyrillic-400.woff2 +0 -0
- package/ui/fonts/anonymous-pro-cyrillic-700.woff2 +0 -0
- package/ui/fonts/anonymous-pro-latin-400.woff2 +0 -0
- package/ui/fonts/anonymous-pro-latin-700.woff2 +0 -0
- package/ui/fonts/anonymous-pro-latin-ext-400.woff2 +0 -0
- package/ui/fonts/anonymous-pro-latin-ext-700.woff2 +0 -0
- package/ui/fonts/anonymous-pro.css +7 -0
- package/ui/fonts/cascadia-code-cyrillic-ext.woff2 +0 -0
- package/ui/fonts/cascadia-code-cyrillic.woff2 +0 -0
- package/ui/fonts/cascadia-code-latin-ext.woff2 +0 -0
- package/ui/fonts/cascadia-code-latin.woff2 +0 -0
- package/ui/fonts/cascadia-code.css +5 -0
- package/ui/fonts/comfortaa-cyrillic-ext.woff2 +0 -0
- package/ui/fonts/comfortaa-cyrillic.woff2 +0 -0
- package/ui/fonts/comfortaa-latin-ext.woff2 +0 -0
- package/ui/fonts/comfortaa-latin.woff2 +0 -0
- package/ui/fonts/comfortaa.css +5 -0
- package/ui/fonts/exo-2-cyrillic-ext.woff2 +0 -0
- package/ui/fonts/exo-2-cyrillic.woff2 +0 -0
- package/ui/fonts/exo-2-latin-ext.woff2 +0 -0
- package/ui/fonts/exo-2-latin.woff2 +0 -0
- package/ui/fonts/exo-2.css +5 -0
- package/ui/fonts/golos-text-cyrillic-ext.woff2 +0 -0
- package/ui/fonts/golos-text-cyrillic.woff2 +0 -0
- package/ui/fonts/golos-text-latin-ext.woff2 +0 -0
- package/ui/fonts/golos-text-latin.woff2 +0 -0
- package/ui/fonts/golos-text.css +5 -0
- package/ui/fonts/ibm-plex-mono-cyrillic-400.woff2 +0 -0
- package/ui/fonts/ibm-plex-mono-cyrillic-600.woff2 +0 -0
- package/ui/fonts/ibm-plex-mono-cyrillic-700.woff2 +0 -0
- package/ui/fonts/ibm-plex-mono-cyrillic-ext-400.woff2 +0 -0
- package/ui/fonts/ibm-plex-mono-cyrillic-ext-600.woff2 +0 -0
- package/ui/fonts/ibm-plex-mono-cyrillic-ext-700.woff2 +0 -0
- package/ui/fonts/ibm-plex-mono-latin-400.woff2 +0 -0
- package/ui/fonts/ibm-plex-mono-latin-600.woff2 +0 -0
- package/ui/fonts/ibm-plex-mono-latin-700.woff2 +0 -0
- package/ui/fonts/ibm-plex-mono-latin-ext-400.woff2 +0 -0
- package/ui/fonts/ibm-plex-mono-latin-ext-600.woff2 +0 -0
- package/ui/fonts/ibm-plex-mono-latin-ext-700.woff2 +0 -0
- package/ui/fonts/ibm-plex-mono.css +13 -0
- package/ui/fonts/ibm-plex-sans-cyrillic-400.woff2 +0 -0
- package/ui/fonts/ibm-plex-sans-cyrillic-600.woff2 +0 -0
- package/ui/fonts/ibm-plex-sans-cyrillic-700.woff2 +0 -0
- package/ui/fonts/ibm-plex-sans-cyrillic-ext-400.woff2 +0 -0
- package/ui/fonts/ibm-plex-sans-cyrillic-ext-600.woff2 +0 -0
- package/ui/fonts/ibm-plex-sans-cyrillic-ext-700.woff2 +0 -0
- package/ui/fonts/ibm-plex-sans-latin-400.woff2 +0 -0
- package/ui/fonts/ibm-plex-sans-latin-600.woff2 +0 -0
- package/ui/fonts/ibm-plex-sans-latin-700.woff2 +0 -0
- package/ui/fonts/ibm-plex-sans-latin-ext-400.woff2 +0 -0
- package/ui/fonts/ibm-plex-sans-latin-ext-600.woff2 +0 -0
- package/ui/fonts/ibm-plex-sans-latin-ext-700.woff2 +0 -0
- package/ui/fonts/ibm-plex-sans.css +13 -0
- package/ui/fonts/manrope-cyrillic-ext.woff2 +0 -0
- package/ui/fonts/manrope-cyrillic.woff2 +0 -0
- package/ui/fonts/manrope-latin-ext.woff2 +0 -0
- package/ui/fonts/manrope-latin.woff2 +0 -0
- package/ui/fonts/manrope.css +5 -0
- package/ui/fonts/montserrat-cyrillic-ext.woff2 +0 -0
- package/ui/fonts/montserrat-cyrillic.woff2 +0 -0
- package/ui/fonts/montserrat-latin-ext.woff2 +0 -0
- package/ui/fonts/montserrat-latin.woff2 +0 -0
- package/ui/fonts/montserrat.css +5 -0
- package/ui/fonts/open-sans-cyrillic-ext.woff2 +0 -0
- package/ui/fonts/open-sans-cyrillic.woff2 +0 -0
- package/ui/fonts/open-sans-latin-ext.woff2 +0 -0
- package/ui/fonts/open-sans-latin.woff2 +0 -0
- package/ui/fonts/open-sans.css +5 -0
- package/ui/fonts/pt-mono-cyrillic-ext.woff2 +0 -0
- package/ui/fonts/pt-mono-cyrillic.woff2 +0 -0
- package/ui/fonts/pt-mono-latin-ext.woff2 +0 -0
- package/ui/fonts/pt-mono-latin.woff2 +0 -0
- package/ui/fonts/pt-mono.css +5 -0
- package/ui/fonts/rubik-cyrillic-ext.woff2 +0 -0
- package/ui/fonts/rubik-cyrillic.woff2 +0 -0
- package/ui/fonts/rubik-latin-ext.woff2 +0 -0
- package/ui/fonts/rubik-latin.woff2 +0 -0
- package/ui/fonts/rubik.css +5 -0
- package/ui/fonts/source-sans-3-cyrillic-ext.woff2 +0 -0
- package/ui/fonts/source-sans-3-cyrillic.woff2 +0 -0
- package/ui/fonts/source-sans-3-latin-ext.woff2 +0 -0
- package/ui/fonts/source-sans-3-latin.woff2 +0 -0
- package/ui/fonts/source-sans-3.css +5 -0
- package/ui/fonts/ubuntu-sans-cyrillic-ext.woff2 +0 -0
- package/ui/fonts/ubuntu-sans-cyrillic.woff2 +0 -0
- package/ui/fonts/ubuntu-sans-latin-ext.woff2 +0 -0
- package/ui/fonts/ubuntu-sans-latin.woff2 +0 -0
- package/ui/fonts/ubuntu-sans.css +5 -0
- package/ui/fonts/victor-mono-cyrillic-ext.woff2 +0 -0
- package/ui/fonts/victor-mono-cyrillic.woff2 +0 -0
- package/ui/fonts/victor-mono-latin-ext.woff2 +0 -0
- package/ui/fonts/victor-mono-latin.woff2 +0 -0
- package/ui/fonts/victor-mono.css +5 -0
- package/ui/index.html +15 -6
- package/ui/looks.css +2446 -0
- package/ui/manifest.json +3 -3
- package/ui/theme.css +114 -84
- package/ui/tokens.js +315 -29
- package/ui/ui.js +2 -0
package/NOTICE
CHANGED
|
@@ -11,6 +11,20 @@ This product bundles the following third-party material:
|
|
|
11
11
|
- JetBrains Mono: Copyright 2020 The JetBrains Mono Project Authors.
|
|
12
12
|
- Fira Code: Copyright 2014-2020 The Fira Code Project Authors.
|
|
13
13
|
- Source Code Pro: Copyright 2010-2019 Adobe (http://www.adobe.com/).
|
|
14
|
+
- Open Sans: Copyright 2020 The Open Sans Project Authors.
|
|
15
|
+
- Source Sans 3: Copyright 2010-2020 Adobe (http://www.adobe.com/).
|
|
16
|
+
- IBM Plex Sans, IBM Plex Mono: Copyright 2017 IBM Corp.
|
|
17
|
+
- Manrope: Copyright 2018 The Manrope Project Authors.
|
|
18
|
+
- Rubik: Copyright 2015 The Rubik Project Authors.
|
|
19
|
+
- Montserrat: Copyright 2011 The Montserrat Project Authors.
|
|
20
|
+
- Golos Text: Copyright 2023 The Golos Text Project Authors.
|
|
21
|
+
- Exo 2: Copyright 2013 The Exo 2 Project Authors.
|
|
22
|
+
- Comfortaa: Copyright 2011 The Comfortaa Project Authors.
|
|
23
|
+
- Ubuntu Sans: Copyright 2022 The Ubuntu Sans Project Authors.
|
|
24
|
+
- PT Mono: Copyright 2011 ParaType Ltd.
|
|
25
|
+
- Victor Mono: Copyright 2019 The Victor Mono Project Authors.
|
|
26
|
+
- Anonymous Pro: Copyright 2009 The Anonymous Pro Project Authors.
|
|
27
|
+
- Cascadia Code: Copyright 2019 Microsoft Corporation.
|
|
14
28
|
|
|
15
29
|
- Vendor icons (assets/vendors/): the logos of Claude, Codex, Gemini, Cursor,
|
|
16
30
|
OpenCode and GitHub Copilot, as published in the Agent Client Protocol
|
package/dist/hub.js
CHANGED
|
@@ -11,9 +11,13 @@ import { DEFAULT_ROOM_SETTINGS } from "./persona.js";
|
|
|
11
11
|
import { Room } from "./room.js";
|
|
12
12
|
import { SkillLibrary } from "./skills.js";
|
|
13
13
|
import { TemplateLibrary, roomSettingsFromTemplate } from "./templates.js";
|
|
14
|
-
export const
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
export const ADJUSTABLE = {
|
|
15
|
+
canvas: "colour", panel: "colour", bubble: "colour", mine: "colour", ring: "colour", ink: "colour", muted: "colour", accent: "colour",
|
|
16
|
+
face: "colour", logo: "colour", logoInk: "colour", corners: "scale",
|
|
17
|
+
};
|
|
18
|
+
export const TEXT_FONTS = ["nunito", "inter", "noto-sans", "open-sans", "source-sans-3", "ibm-plex-sans", "manrope", "rubik", "montserrat", "golos-text", "exo-2", "comfortaa", "ubuntu-sans", "arial", "system"];
|
|
19
|
+
export const MONO_FONTS = ["jetbrains-mono", "fira-code", "source-code-pro", "ibm-plex-mono", "pt-mono", "victor-mono", "anonymous-pro", "cascadia-code", "system"];
|
|
20
|
+
export const DEFAULT_APPEARANCE = { chatFontSize: 14.5, font: "nunito", mono: "jetbrains-mono", look: "classic", custom: {} };
|
|
17
21
|
export const DIAGRAM_PRESETS = ["pop", "lavender", "mint", "sunset", "slate"];
|
|
18
22
|
const ROOM_ID_PATTERN = /^[a-z0-9][a-z0-9-]{0,39}$/;
|
|
19
23
|
const INSTRUCTION_FILES = ["CLAUDE.md", "AGENTS.md", "GEMINI.md", ".cursorrules"];
|
|
@@ -215,7 +219,44 @@ export class Hub extends EventEmitter {
|
|
|
215
219
|
const mono = String(a.mono ?? next.appearance?.mono ?? DEFAULT_APPEARANCE.mono);
|
|
216
220
|
if (!MONO_FONTS.includes(mono))
|
|
217
221
|
throw new Error(`appearance.mono must be one of ${MONO_FONTS.join(", ")}`);
|
|
218
|
-
|
|
222
|
+
const look = String(a.look ?? next.appearance?.look ?? DEFAULT_APPEARANCE.look);
|
|
223
|
+
if (!/^[a-z][a-z0-9-]{0,30}$/.test(look))
|
|
224
|
+
throw new Error("appearance.look must be a short lower-case id");
|
|
225
|
+
const custom = { ...(next.appearance?.custom ?? {}) };
|
|
226
|
+
if (a.custom !== undefined && typeof a.custom === "object" && a.custom) {
|
|
227
|
+
for (const [lookId, values] of Object.entries(a.custom)) {
|
|
228
|
+
if (!/^[a-z][a-z0-9-]{0,30}$/.test(lookId))
|
|
229
|
+
throw new Error("appearance.custom: a look id is a short lower-case id");
|
|
230
|
+
if (values === null) {
|
|
231
|
+
delete custom[lookId];
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
if (typeof values !== "object")
|
|
235
|
+
throw new Error("appearance.custom: each look takes an object of adjustments");
|
|
236
|
+
const clean = {};
|
|
237
|
+
for (const [key, value] of Object.entries(values)) {
|
|
238
|
+
const kind = ADJUSTABLE[key];
|
|
239
|
+
if (!kind)
|
|
240
|
+
throw new Error(`appearance.custom: "${key}" is not adjustable (${Object.keys(ADJUSTABLE).join(", ")})`);
|
|
241
|
+
if (kind === "colour") {
|
|
242
|
+
if (typeof value !== "string" || !/^#[0-9a-fA-F]{6}$/.test(value))
|
|
243
|
+
throw new Error(`appearance.custom.${key} must be a colour like #1a2b3c`);
|
|
244
|
+
clean[key] = value.toLowerCase();
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
const n = typeof value === "string" || typeof value === "number" ? Number(value) : NaN;
|
|
248
|
+
if (!Number.isFinite(n) || n < 0 || n > 2)
|
|
249
|
+
throw new Error(`appearance.custom.${key} must be a number between 0 and 2`);
|
|
250
|
+
clean[key] = String(Math.round(n * 100) / 100);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
if (Object.keys(clean).length)
|
|
254
|
+
custom[lookId] = clean;
|
|
255
|
+
else
|
|
256
|
+
delete custom[lookId];
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
next.appearance = { chatFontSize: Math.round(chatFontSize * 2) / 2, font, mono, look, custom };
|
|
219
260
|
}
|
|
220
261
|
next.appearance = { ...DEFAULT_APPEARANCE, ...(next.appearance ?? {}) };
|
|
221
262
|
if (!next.editor)
|