clavarium 0.2.266-next.1 → 0.2.267-next.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/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/web/app.js +42 -0
- package/web/index.html +5 -0
- package/web/style.css +30 -8
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.267-next.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "clavarium",
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.267-next.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/package.json
CHANGED
package/web/app.js
CHANGED
|
@@ -4959,6 +4959,46 @@
|
|
|
4959
4959
|
await paintAssets();
|
|
4960
4960
|
}
|
|
4961
4961
|
async function openAssets() { await openAssetsPlace(); }
|
|
4962
|
+
/* ---------- the conversations as cards (02-11) ---------- */
|
|
4963
|
+
/* ONE CONVERSATION AS A CARD, as a playing card: its name and its state on a plate, a picture of its own
|
|
4964
|
+
(its colours drawn from its name, its initial), its agent and its tool, its last word. Reusable: any
|
|
4965
|
+
page that shows conversations as things to pick or move takes it. `onOpen(c)`. */
|
|
4966
|
+
function convCard(c, onOpen) {
|
|
4967
|
+
let h = 0; for (const ch of String(c.name)) h = (h * 31 + ch.codePointAt(0)) >>> 0;
|
|
4968
|
+
const hue = h % 360;
|
|
4969
|
+
const card = el('button', 'conv-card'); card.type = 'button'; card.dataset.name = c.name;
|
|
4970
|
+
const state = c.asleep ? 'asleep' : c.talk?.state === 'waiting' || (c.talk?.waiting ?? 0) > 0 ? 'waits' : c.phase === 'ready' ? 'ready' : 'busy';
|
|
4971
|
+
const plate = el('span', 'conv-card-plate'); const dot = el('span', 'conv-card-dot'); dot.dataset.state = state;
|
|
4972
|
+
plate.append(dot, el('b', '', shownName(c)));
|
|
4973
|
+
const art = el('span', 'conv-card-art'); art.style.setProperty('--h', String(hue));
|
|
4974
|
+
art.append(el('span', 'conv-card-initial', (shownName(c).trim()[0] ?? '?').toUpperCase()));
|
|
4975
|
+
const kind = el('span', 'conv-card-type', [c.chatName, c.toolLabel ?? c.tool].filter(Boolean).join(' · '));
|
|
4976
|
+
const text = el('span', 'conv-card-text');
|
|
4977
|
+
if (c.talk?.lastText) text.append(el('i', '', c.talk.lastText));
|
|
4978
|
+
text.append(el('small', '', c.asleep ? 'Asleep' : state === 'waits' ? 'Waits for you' : c.talk?.lastAt ? cardAgo(c.talk.lastAt) : c.phase === 'ready' ? 'Ready' : (c.step || c.phase || '')));
|
|
4979
|
+
card.append(plate, art, kind, text);
|
|
4980
|
+
card.setAttribute('aria-label', `${shownName(c)}, ${kind.textContent}`);
|
|
4981
|
+
card.addEventListener('click', () => onOpen(c));
|
|
4982
|
+
return card;
|
|
4983
|
+
}
|
|
4984
|
+
const cardAgo = (at) => { const s = Math.max(0, (Date.now() - Date.parse(at)) / 1000); return s < 90 ? 'Just now' : s < 5400 ? `${Math.round(s / 60)} min ago` : s < 129600 ? `${Math.round(s / 3600)} h ago` : `${Math.round(s / 86400)} days ago`; };
|
|
4985
|
+
function paintDeck() {
|
|
4986
|
+
$('deck-title').textContent = appName;
|
|
4987
|
+
const list = [...conversations];
|
|
4988
|
+
const add = el('button', 'conv-card conv-card-new'); add.type = 'button';
|
|
4989
|
+
add.append(el('span', 'conv-card-plus', '+'), el('small', '', 'New conversation'));
|
|
4990
|
+
add.addEventListener('click', () => { void openNew(); });
|
|
4991
|
+
$('deck-cards').replaceChildren(...list.map((c) => convCard(c, (x) => { leavePlace(); select(x.name); })), add);
|
|
4992
|
+
$('deck-cards').hidden = list.length === 0; $('deck-empty').hidden = list.length > 0;
|
|
4993
|
+
}
|
|
4994
|
+
function openDeck(push = true) { if (DEVICE) return; enterPlace('deck', push); paintDeck(); }
|
|
4995
|
+
$('deck-close').addEventListener('click', () => leavePlace());
|
|
4996
|
+
$('deck-empty-new').addEventListener('click', () => { void openNew(); });
|
|
4997
|
+
/* Import a configuration: the import of the map (Access, Flows), a file chosen at once. */
|
|
4998
|
+
$('deck-empty-import').addEventListener('click', () => { void openAccessPage('map', { mode: 'flows' }).then(() => document.getElementById('flows-import')?.click()).catch(() => {}); });
|
|
4999
|
+
$('list-title').addEventListener('click', () => openDeck());
|
|
5000
|
+
$('list-title').setAttribute('role', 'button'); $('list-title').tabIndex = 0;
|
|
5001
|
+
$('list-title').addEventListener('keydown', (e) => { if (e.key === 'Enter') openDeck(); });
|
|
4962
5002
|
/* ---------- private repositories: how this server gets in ---------- */
|
|
4963
5003
|
/* The host of an address, whatever its form (user@host:path has no URL form). */
|
|
4964
5004
|
const hostOf = (from) => { try { return new URL(from).hostname; } catch { return /@([^:/]+):/.exec(String(from))?.[1] ?? String(from); } };
|
|
@@ -5130,6 +5170,7 @@
|
|
|
5130
5170
|
$('access').hidden = which !== 'access';
|
|
5131
5171
|
$('settings').hidden = which !== 'settings';
|
|
5132
5172
|
$('assets').hidden = which !== 'assets';
|
|
5173
|
+
$('deck').hidden = which !== 'deck';
|
|
5133
5174
|
$('newconv').hidden = which !== 'new';
|
|
5134
5175
|
if (which !== 'access') composing = false;
|
|
5135
5176
|
/* What the conversation had open (its tab) waits under the place, as it was. */
|
|
@@ -5445,6 +5486,7 @@
|
|
|
5445
5486
|
if (home && wanted !== current && conversations.some((c) => c.name === wanted)) select(wanted);
|
|
5446
5487
|
const open = q.get('open') ?? '';
|
|
5447
5488
|
if (open === 'new') { await openNew({ push: false }); return; }
|
|
5489
|
+
if (open === 'deck') { openDeck(false); return; }
|
|
5448
5490
|
if (open === 'settings') {
|
|
5449
5491
|
await openSettings({ push: false });
|
|
5450
5492
|
/* A link to one chapter of Settings (?open=settings&at=resources): that one opened, and shown. */
|
package/web/index.html
CHANGED
|
@@ -480,6 +480,11 @@
|
|
|
480
480
|
right: who uses it, its state, its settings. The forms that make
|
|
481
481
|
one, and a repository's remote, wait in #assets-forms and are moved
|
|
482
482
|
into the detail when asked for. -->
|
|
483
|
+
<div id="deck" class="sheet as-place" hidden>
|
|
484
|
+
<div class="panel-top"><b id="deck-title">Conversations</b><button type="button" id="deck-close" class="as-link place-back">‹ Back</button></div>
|
|
485
|
+
<div id="deck-cards" class="deck"></div>
|
|
486
|
+
<div id="deck-empty" class="deck-empty" hidden><p>No conversation yet.</p><div class="deck-empty-acts"><button type="button" id="deck-empty-new" class="primary">+ Create a conversation</button><button type="button" id="deck-empty-import">Import a configuration</button></div></div>
|
|
487
|
+
</div>
|
|
483
488
|
<div id="assets" class="sheet as-place" hidden>
|
|
484
489
|
<div class="panel-top"><b>Assets</b><button type="button" id="assets-close" class="as-link place-back">‹ Conversations</button></div>
|
|
485
490
|
<p id="assets-error" class="error" role="alert" hidden></p>
|
package/web/style.css
CHANGED
|
@@ -23,7 +23,7 @@ body { height: 100dvh; padding: env(safe-area-inset-top, 0) 0 env(safe-area-inse
|
|
|
23
23
|
[hidden] { display: none !important; }
|
|
24
24
|
button { font: 600 .8125rem var(--sans); color: var(--ink); background: var(--button, #222c38); border: 1px solid var(--line); border-radius: 7px; padding: 7px 11px; cursor: pointer; }
|
|
25
25
|
/* The main button (02-11): its words and outline in brass, no fill -- quieter, like a suggestion. */
|
|
26
|
-
button.primary { background: transparent; border-color: var(--brass); color: var(--brass); }
|
|
26
|
+
button.primary { background: transparent; border-color: var(--brass); color: var(--brass-ink); }
|
|
27
27
|
button.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--brass) 12%, transparent); }
|
|
28
28
|
button:focus-visible, input:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
|
|
29
29
|
/* The list on the left, the three places under it, the conversation beside them. */
|
|
@@ -111,7 +111,7 @@ main { position: relative; flex: 1; min-height: 0; }
|
|
|
111
111
|
#notice button { padding: 10px 18px; font-size: .9375rem; }
|
|
112
112
|
footer { display: flex; gap: 6px; padding: 6px 8px; background: var(--bar); border-top: 1px solid var(--line); overflow-x: auto; }
|
|
113
113
|
footer button { flex: 0 0 auto; min-width: 44px; padding: 9px 12px; }
|
|
114
|
-
footer button.wide { flex: 1 0 auto; background: transparent; border-color: var(--brass); color: var(--brass); }
|
|
114
|
+
footer button.wide { flex: 1 0 auto; background: transparent; border-color: var(--brass); color: var(--brass-ink); }
|
|
115
115
|
@media (max-width: 700px) {
|
|
116
116
|
#app { grid-template-columns: minmax(0, 1fr); }
|
|
117
117
|
#list, #room { grid-column: 1; grid-row: 1; border-right: 0; }
|
|
@@ -194,7 +194,7 @@ html[data-door="device"] #room { height: 100%; }
|
|
|
194
194
|
.chip[data-access="offline"] { color: var(--warn); border-color: var(--warn); }
|
|
195
195
|
#signin-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: rgba(210, 169, 78, .14); border-bottom: 1px solid var(--brass); font-size: .8125rem; }
|
|
196
196
|
#signin-text { flex: 1; min-width: 160px; }
|
|
197
|
-
a.button { font: 600 .8125rem var(--sans); text-decoration: none; border-radius: 7px; padding: 7px 11px; background: transparent; border: 1px solid var(--brass); color: var(--brass); }
|
|
197
|
+
a.button { font: 600 .8125rem var(--sans); text-decoration: none; border-radius: 7px; padding: 7px 11px; background: transparent; border: 1px solid var(--brass); color: var(--brass-ink); }
|
|
198
198
|
#signin-form input { flex: 1; min-width: 130px; font: .875rem var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; }
|
|
199
199
|
/* On a narrow screen the key row wraps instead of hiding its end, and
|
|
200
200
|
dictation comes first: by voice is how a phone is used. */
|
|
@@ -245,7 +245,7 @@ footer button.careful { border-style: dashed; color: var(--ink2); }
|
|
|
245
245
|
#viewer .row { align-items: center; gap: 8px; flex-wrap: wrap; }
|
|
246
246
|
#viewer .sp { flex: 1; }
|
|
247
247
|
#viewer #preview-name { overflow-wrap: anywhere; }
|
|
248
|
-
#viewer a.button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 8px; background: transparent; border: 1px solid var(--brass); color: var(--brass); font-weight: 600; text-decoration: none; }
|
|
248
|
+
#viewer a.button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 8px; background: transparent; border: 1px solid var(--brass); color: var(--brass-ink); font-weight: 600; text-decoration: none; }
|
|
249
249
|
#viewer button { min-height: 40px; }
|
|
250
250
|
#viewer p { margin: 0; }
|
|
251
251
|
#preview-body { overflow: auto; flex: 1; min-height: 0; }
|
|
@@ -379,7 +379,7 @@ footer button.careful { border-style: dashed; color: var(--ink2); }
|
|
|
379
379
|
#viewer .md-switch button { min-height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ink2); font-weight: 600; }
|
|
380
380
|
#viewer .md-switch button[aria-pressed="true"] { background: var(--bar); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
|
|
381
381
|
#preview-body .md-view { display: block; container: none; min-height: 0; padding: 0 2px 24px; font-size: .9375rem; line-height: 1.55;
|
|
382
|
-
--parley-bg: var(--panel); --parley-text: var(--ink); --parley-dim: var(--ink2); --parley-line: var(--line); --parley-agent: var(--bar); --parley-action: var(--brass); --parley-measure: 80ch; }
|
|
382
|
+
--parley-bg: var(--panel); --parley-text: var(--ink); --parley-dim: var(--ink2); --parley-line: var(--line); --parley-agent: var(--bar); --parley-action: var(--brass-ink); --parley-measure: 80ch; }
|
|
383
383
|
:root[data-theme="light"] #preview-body .md-view { --parley-action: #8a5d00; }
|
|
384
384
|
#preview-body .md-view .parley-md { max-width: 80ch; }
|
|
385
385
|
#preview-body .md-view .parley-md > * + * { margin-top: .8em; }
|
|
@@ -446,7 +446,7 @@ footer button.careful { border-style: dashed; color: var(--ink2); }
|
|
|
446
446
|
#chat-off p { margin: 0 0 10px; font-size: 1rem; }
|
|
447
447
|
#chat-off p + p { color: var(--ink2); }
|
|
448
448
|
#simple[data-chat] { display: flex; flex-direction: column; overflow: hidden; padding: 10px 14px 12px; }
|
|
449
|
-
#simple-thread { flex: 1; min-height: 0; --parley-bg: var(--bg); --parley-text: var(--ink); --parley-dim: var(--ink2); --parley-line: var(--line); --parley-agent: var(--panel); --parley-person: var(--bar); --parley-ask: var(--brass); --parley-action: var(--brass); --parley-on-action: #1b1405; --parley-live: var(--danger); }
|
|
449
|
+
#simple-thread { flex: 1; min-height: 0; --parley-bg: var(--bg); --parley-text: var(--ink); --parley-dim: var(--ink2); --parley-line: var(--line); --parley-agent: var(--panel); --parley-person: var(--bar); --parley-ask: var(--brass-ink); --parley-action: var(--brass-ink); --parley-on-action: #1b1405; --parley-live: var(--danger); }
|
|
450
450
|
|
|
451
451
|
|
|
452
452
|
/* Private repositories: how the server gets in, and the keys made here. */
|
|
@@ -1953,7 +1953,7 @@ details.chapter[data-attention] > summary .chapter-title::after, #settings-nav b
|
|
|
1953
1953
|
/* Its whole height: a long card neither runs past its ground nor under what follows it (Assets). */
|
|
1954
1954
|
.binder-holder > .binder, .as-binder { flex-shrink: 0; }
|
|
1955
1955
|
body .binder-holder .binder { --binder-bg: var(--bg); --binder-text: var(--ink); --binder-dim: var(--ink2); --binder-line: var(--line); --binder-panel: var(--panel);
|
|
1956
|
-
--binder-action: var(--brass); --binder-on-action: #1b1405; --binder-ok: var(--ok); --binder-ask: var(--warn); --binder-danger: var(--danger); }
|
|
1956
|
+
--binder-action: var(--brass-ink); --binder-on-action: #1b1405; --binder-ok: var(--ok); --binder-ask: var(--warn); --binder-danger: var(--danger); }
|
|
1957
1957
|
.binder-holder .binder-new-list, .binder-holder .binder-empty .binder-primary { display: none; }
|
|
1958
1958
|
/* One list opened in Assets: no row of tabs for it alone. */
|
|
1959
1959
|
.as-binder .binder-top { display: none; }
|
|
@@ -2021,7 +2021,7 @@ details.commit > pre { margin: 6px 0 0 1.6em; white-space: pre-wrap; overflow-wr
|
|
|
2021
2021
|
Download stands out. Full screen: the file takes the whole screen. */
|
|
2022
2022
|
#viewer .ico { display: inline-flex; align-items: center; justify-content: center; width: 38px; min-width: 38px; height: 34px; padding: 0; }
|
|
2023
2023
|
#viewer .ico svg { width: 18px; height: 18px; }
|
|
2024
|
-
#viewer .ico.primary { background: transparent; border-color: var(--brass); color: var(--brass); }
|
|
2024
|
+
#viewer .ico.primary { background: transparent; border-color: var(--brass); color: var(--brass-ink); }
|
|
2025
2025
|
#viewer #preview-copy[data-done="true"] { color: var(--ok); border-color: currentColor; }
|
|
2026
2026
|
#viewer #preview-full[aria-pressed="true"] { border-color: var(--brass); }
|
|
2027
2027
|
#viewer.viewer-full { padding: 0; }
|
|
@@ -2169,3 +2169,25 @@ body.as-dragging #assets-rows .as-row { touch-action: none; }
|
|
|
2169
2169
|
.sheet-table th { position: sticky; background: var(--bar); color: var(--ink2); font-weight: 600; }
|
|
2170
2170
|
.sheet-table thead th { top: 0; z-index: 1; } .sheet-table tbody th { left: 0; }
|
|
2171
2171
|
.doc-frame { width: 100%; min-height: 70vh; border: 0; border-radius: 8px; background: transparent; }
|
|
2172
|
+
|
|
2173
|
+
/* THE CONVERSATIONS AS CARDS (02-11): playing cards, one per conversation, and one to add. */
|
|
2174
|
+
#list-title { cursor: pointer; }
|
|
2175
|
+
#deck { overflow-y: auto; }
|
|
2176
|
+
.deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px; padding: 14px 2px 24px; }
|
|
2177
|
+
.conv-card { position: relative; aspect-ratio: 63 / 88; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(160deg, var(--bar), var(--panel)); color: var(--ink); text-align: left; font: inherit; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); cursor: pointer; transition: transform .15s, border-color .15s; min-height: 0; }
|
|
2178
|
+
.conv-card:hover, .conv-card:focus-visible { transform: translateY(-3px); border-color: var(--brass); }
|
|
2179
|
+
.conv-card-plate { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); min-width: 0; }
|
|
2180
|
+
.conv-card-plate b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
|
|
2181
|
+
.conv-card-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--ink2); }
|
|
2182
|
+
.conv-card-dot[data-state="ready"] { background: var(--ok); } .conv-card-dot[data-state="waits"] { background: var(--wait); } .conv-card-dot[data-state="busy"] { background: var(--ink2); }
|
|
2183
|
+
.conv-card-dot[data-state="asleep"] { background: transparent; border: 1.5px solid var(--ink2); } .conv-card-dot[data-state="problem"] { background: var(--danger); }
|
|
2184
|
+
.conv-card-art { flex: 1.2; min-height: 0; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: linear-gradient(135deg, hsl(var(--h) 38% 30%), hsl(calc(var(--h) + 40) 42% 14%)); }
|
|
2185
|
+
.conv-card-initial { font: 700 2.4rem/1 var(--sans); color: rgba(255, 255, 255, .82); }
|
|
2186
|
+
.conv-card-type { font-size: .74rem; color: var(--ink2); padding: 2px 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2187
|
+
.conv-card-text { flex: .9; min-height: 0; display: flex; flex-direction: column; gap: 3px; padding: 2px 6px; font-size: .78rem; color: var(--ink2); overflow: hidden; }
|
|
2188
|
+
.conv-card-text i { font-style: normal; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
|
2189
|
+
.conv-card-new { align-items: center; justify-content: center; border-style: dashed; border-width: 1.5px; background: transparent; box-shadow: none; color: var(--ink2); }
|
|
2190
|
+
.conv-card-plus { font-size: 2.6rem; line-height: 1; color: var(--brass); }
|
|
2191
|
+
.deck-empty { text-align: center; padding: 48px 16px; color: var(--ink2); }
|
|
2192
|
+
.deck-empty-acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
|
|
2193
|
+
@media (max-width: 520px) { .deck { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
|