viberoom 0.4.2 → 0.5.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/README.md +1 -1
- package/dist/acp-client.js +3 -0
- package/dist/commands.js +31 -0
- package/dist/edit.js +10 -1
- package/dist/files.js +60 -0
- package/dist/hub.js +73 -2
- package/dist/persona.js +82 -12
- package/dist/room.js +213 -25
- package/dist/server.js +102 -5
- package/dist/skills.js +4 -0
- package/dist/templates.js +76 -0
- package/package.json +2 -1
- package/templates/design-critique/template.json +24 -0
- package/templates/explainer/template.json +17 -0
- package/templates/forge-and-lumen/template.json +28 -0
- package/templates/pair-programmer/template.json +17 -0
- package/ui/app.css +175 -20
- package/ui/app.js +868 -116
- package/ui/icons.js +13 -10
- package/ui/index.html +31 -3
- package/ui/theme.css +2 -2
package/ui/icons.js
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
at: `<circle cx="12" cy="12" r="4"/><path d="M16 12v1.5a2.5 2.5 0 0 0 5 0V12a9 9 0 1 0-3.5 7.1"/>`,
|
|
30
30
|
trash: `<path d="M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3"/>`,
|
|
31
31
|
pencil: `<path d="M17 3a2.8 2.8 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"/>`,
|
|
32
|
+
pin: `<path d="M9 4h6l-.8 6.5L17 13v2H7v-2l2.8-2.5L9 4z"/><path d="M12 15v6"/>`,
|
|
32
33
|
send: `<path d="M4 12l16-8-6 16-2.5-6.5L4 12z"/>`,
|
|
33
34
|
folder: `<path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7z"/>`,
|
|
34
35
|
spark: `<path d="M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8L12 3z"/><path d="M19 15l.6 1.6 1.6.6-1.6.6L19 19.4l-.6-1.6-1.6-.6 1.6-.6z"/>`,
|
|
@@ -56,20 +57,22 @@
|
|
|
56
57
|
|
|
57
58
|
function install() {
|
|
58
59
|
if (document.getElementById("viberoom-icons")) return;
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
const style = document.createElement("style");
|
|
61
|
+
style.id = "viberoom-icons";
|
|
62
|
+
style.textContent = Object.entries(ICONS)
|
|
63
|
+
.map(([name, body]) => `.i-${name}{--icon:url("${dataUri(body)}")}`)
|
|
64
|
+
.join("\n");
|
|
65
|
+
document.head.appendChild(style);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function dataUri(body) {
|
|
69
|
+
const markup = `<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='#000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'>${body.replace(/"/g, "'").replace(/currentColor/g, "#000")}</svg>`;
|
|
70
|
+
return "data:image/svg+xml," + markup.replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E");
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
function svg(name, cls) {
|
|
71
74
|
if (!ICONS[name]) name = "info";
|
|
72
|
-
return `<
|
|
75
|
+
return `<span class="i i-${name}${cls ? ` ${cls}` : ""}" aria-hidden="true"></span>`;
|
|
73
76
|
}
|
|
74
77
|
|
|
75
78
|
window.Icons = { install, svg, names: Object.keys(ICONS) };
|
package/ui/index.html
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<div class="rail-items">
|
|
23
23
|
<button class="rail-item new" id="rail-new-room" title="Open a room"><span class="ico" data-icon="plus"></span><span class="label">Open a room</span></button>
|
|
24
24
|
<button class="rail-item" data-nav="rooms" title="Rooms"><span class="ico" data-icon="rooms"></span><span class="label">Rooms</span></button>
|
|
25
|
-
<
|
|
25
|
+
<div class="rail-rooms-wrap" id="rail-rooms-wrap" hidden><span class="rail-hr"></span><div class="rail-rooms" id="rail-rooms" aria-label="Open rooms"></div><span class="rail-hr"></span></div>
|
|
26
26
|
<button class="rail-item" data-nav="skills" title="Skills"><span class="ico" data-icon="skills"></span><span class="label">Skills</span></button>
|
|
27
27
|
<button class="rail-item" data-nav="settings" title="Settings"><span class="ico" data-icon="settings"></span><span class="label">Settings</span></button>
|
|
28
28
|
</div>
|
|
@@ -70,15 +70,25 @@
|
|
|
70
70
|
<header class="main-head chat-head">
|
|
71
71
|
<div class="chat-title">
|
|
72
72
|
<h1 id="chat-room-name">…</h1>
|
|
73
|
+
<div id="working-now" class="working-now" hidden></div>
|
|
73
74
|
<div class="chat-sub" id="chat-room-sub"></div>
|
|
74
75
|
</div>
|
|
75
76
|
<div class="chat-actions">
|
|
77
|
+
<button id="pins-btn" class="chip pins-chip" type="button" hidden title="Pinned messages"></button>
|
|
76
78
|
<label class="search"><span class="search-icon" data-icon="search"></span><input id="search" type="search" placeholder="Search in this room…" autocomplete="off"></label>
|
|
77
79
|
<button id="chat-info-btn" class="icon-btn" title="Room settings"><span data-icon="settings"></span></button>
|
|
78
80
|
</div>
|
|
79
81
|
</header>
|
|
82
|
+
<div id="cast-banner" class="cast-banner" hidden></div>
|
|
80
83
|
<div id="messages" class="messages"></div>
|
|
84
|
+
<div id="pins-panel" class="pins-panel" hidden></div>
|
|
85
|
+
<div id="timeline-left" class="timeline left" hidden>
|
|
86
|
+
<div class="tl-view"></div>
|
|
87
|
+
<div class="tl-ticks"></div>
|
|
88
|
+
<div class="tl-pop" hidden></div>
|
|
89
|
+
</div>
|
|
81
90
|
<button type="button" id="jump-latest" class="jump-latest" title="Back to the latest messages" hidden><span data-icon="arrow-down"></span>Latest</button>
|
|
91
|
+
<div id="done-notes" class="done-notes" hidden></div>
|
|
82
92
|
<div id="timeline" class="timeline" hidden>
|
|
83
93
|
<div class="tl-view"></div>
|
|
84
94
|
<div class="tl-ticks"></div>
|
|
@@ -87,10 +97,13 @@
|
|
|
87
97
|
<div id="mention-menu" class="mention-menu" hidden></div>
|
|
88
98
|
<div id="emoji-menu" class="mention-menu emoji-menu" hidden></div>
|
|
89
99
|
<form id="composer" class="composer">
|
|
100
|
+
<div class="composer-grip" id="composer-grip" title="Drag to make the box taller; double-click to reset"></div>
|
|
90
101
|
<button type="button" class="smile-btn" id="emoji-btn" title="Add an emoji"><span data-icon="smile"></span></button>
|
|
91
102
|
<div class="composer-box">
|
|
92
|
-
<
|
|
103
|
+
<div class="shots-tray" id="shots-tray" hidden></div>
|
|
104
|
+
<textarea id="input" rows="1" placeholder="Message the room… @Name or /skill" title="Enter sends, Shift+Enter is a new line; paste or drop an image"></textarea>
|
|
93
105
|
</div>
|
|
106
|
+
<button type="button" id="composer-clear" class="composer-clear" title="Clear the message" hidden>×</button>
|
|
94
107
|
<button type="submit" class="send-btn" title="Send"><span data-icon="send"></span></button>
|
|
95
108
|
</form>
|
|
96
109
|
</section>
|
|
@@ -100,7 +113,6 @@
|
|
|
100
113
|
</main>
|
|
101
114
|
<aside class="details" id="details" hidden>
|
|
102
115
|
<div class="resizer" id="details-resizer" title="Drag to resize; double-click to fit"></div>
|
|
103
|
-
<button type="button" class="details-handle" id="details-handle" title="Close the panel"><span data-icon="forward"></span></button>
|
|
104
116
|
<div class="details-inner" id="details-inner"></div>
|
|
105
117
|
</aside>
|
|
106
118
|
</div>
|
|
@@ -137,6 +149,21 @@
|
|
|
137
149
|
<div class="actions"><button type="button" class="btn ghost" data-close>Cancel</button><button type="submit" class="btn primary">Open the room</button></div>
|
|
138
150
|
</form>
|
|
139
151
|
</dialog>
|
|
152
|
+
<dialog id="template-dialog" class="dialog wide">
|
|
153
|
+
<form id="template-form" method="dialog">
|
|
154
|
+
<h3><span class="h-ico" data-icon="rooms"></span>Start from a template</h3>
|
|
155
|
+
<p class="lead">A template is a room's rules and its vibemates, ready to summon. Pick one, choose who runs each vibemate, name the room.</p>
|
|
156
|
+
<div class="tpl-layout">
|
|
157
|
+
<div class="tpl-list" id="tpl-list"></div>
|
|
158
|
+
<div class="tpl-detail" id="tpl-detail"></div>
|
|
159
|
+
</div>
|
|
160
|
+
<label>Room name<input id="tpl-room-name" type="text" maxlength="60" required placeholder="e.g. Payments refactor"></label>
|
|
161
|
+
<label>Working directory <span class="hint">(optional)</span>
|
|
162
|
+
<span class="dir-row"><input id="tpl-room-dir" type="text" placeholder="C:\projects\my-app"><button type="button" class="btn ghost browse-btn" id="tpl-dir-browse" title="Choose a folder"><span data-icon="folder"></span>Browse</button></span></label>
|
|
163
|
+
<p class="error" id="tpl-error" hidden></p>
|
|
164
|
+
<div class="actions"><button type="button" class="btn ghost" data-close>Cancel</button><button type="submit" class="btn primary" id="tpl-create">Create the room</button></div>
|
|
165
|
+
</form>
|
|
166
|
+
</dialog>
|
|
140
167
|
<dialog id="invite-dialog" class="dialog wide">
|
|
141
168
|
<form id="invite-form" method="dialog">
|
|
142
169
|
<h3><span class="h-ico" data-icon="spark"></span>Summon a Vibemate</h3>
|
|
@@ -176,6 +203,7 @@
|
|
|
176
203
|
</div>
|
|
177
204
|
</form>
|
|
178
205
|
</dialog>
|
|
206
|
+
<div id="lightbox" class="lightbox" hidden><img alt=""></div>
|
|
179
207
|
<dialog id="edit-dialog" class="dialog">
|
|
180
208
|
<form id="edit-form" method="dialog">
|
|
181
209
|
<h3><span class="h-ico" data-icon="pencil"></span>Edit your message</h3>
|
package/ui/theme.css
CHANGED
|
@@ -108,7 +108,7 @@ pre { background: var(--code-bg); color: #f4f2ff; padding: 10px 12px; border-rad
|
|
|
108
108
|
*::-webkit-scrollbar-thumb { background: var(--sb-thumb); border-radius: var(--r-pill); border: 2px solid transparent; background-clip: padding-box; }
|
|
109
109
|
*::-webkit-scrollbar-thumb:hover { background: var(--sb-thumb-hover); background-clip: padding-box; }
|
|
110
110
|
*::-webkit-scrollbar-corner { background: transparent; }
|
|
111
|
-
.i { width: 1.2em; height: 1.2em; flex: none;
|
|
111
|
+
.i { width: 1.2em; height: 1.2em; flex: none; vertical-align: -0.25em; display: inline-block; background-color: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
|
|
112
112
|
.i.lg { width: 20px; height: 20px; }
|
|
113
113
|
.i.xl { width: 24px; height: 24px; }
|
|
114
114
|
[data-icon] { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
|
|
@@ -321,7 +321,7 @@ p .geek-tip, .hint > .geek-tip, .switch .label > .geek-tip { margin-left: 8px; }
|
|
|
321
321
|
.avatar-status.status-error { background: var(--rose-ink); }
|
|
322
322
|
.avatar-status.status-starting { background: #7aa7ff; }
|
|
323
323
|
.avatar-status.status-queued { background: #7aa7ff; }
|
|
324
|
-
.avatar-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; margin: 4px 0 8px; }
|
|
324
|
+
.avatar-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; margin: 4px 0 8px; max-height: 148px; overflow-y: auto; padding: 2px 4px 2px 2px; scroll-padding: 4px; }
|
|
325
325
|
.avatar-picker button { aspect-ratio: 1; width: 100%; border-radius: 12px; border: 2px solid transparent; background: var(--soft); font-size: 20px; padding: 0; display: inline-flex; align-items: center; justify-content: center; transition: transform var(--t-fast) var(--ease-pop), border-color var(--t-fast), background var(--t-fast); }
|
|
326
326
|
.avatar-picker button:hover { transform: translateY(-1px); background: var(--lav); }
|
|
327
327
|
.avatar-picker button.selected { border-color: var(--primary); background: var(--lav); }
|