clavarium 0.2.335-next.1 → 0.2.337-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 +6 -3
- package/web/index.html +1 -1
- package/web/kit.js +6 -3
- package/web/manifest.webmanifest +4 -0
- package/web/style.css +6 -2
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.337-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.337-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
|
@@ -10730,11 +10730,12 @@
|
|
|
10730
10730
|
page ask (Chrome, Edge, Android), the button asks. On an iPhone or an
|
|
10731
10731
|
iPad no page can ask: the button explains the two taps it takes.
|
|
10732
10732
|
Already running as an app: there is nothing to offer. */
|
|
10733
|
-
const asApp = matchMedia('(display-mode: standalone)').matches || navigator.standalone === true;
|
|
10733
|
+
const asApp = matchMedia('(display-mode: standalone)').matches || matchMedia('(display-mode: fullscreen)').matches || navigator.standalone === true;
|
|
10734
10734
|
const apple = /iPad|iPhone|iPod/.test(navigator.userAgent) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
|
|
10735
10735
|
let installEvent = null;
|
|
10736
10736
|
let installOffered = false;
|
|
10737
|
-
|
|
10737
|
+
/* 06-11: offered where it is seen -- a button at the top of the list too, not only in Settings › This device. */
|
|
10738
|
+
const offerInstall = () => { installOffered = true; $('install').hidden = false; $('install-row').hidden = false; if (!DEVICE) $('install-top').hidden = false; };
|
|
10738
10739
|
/* Chrome reads the manifest again when its address changes, and may then
|
|
10739
10740
|
offer the install anew: that offer, if it comes soon, is the one used. */
|
|
10740
10741
|
let freshOffer = null;
|
|
@@ -10742,7 +10743,9 @@
|
|
|
10742
10743
|
event.preventDefault(); installEvent = event; offerInstall();
|
|
10743
10744
|
if (freshOffer) { const take = freshOffer; freshOffer = null; take(event); }
|
|
10744
10745
|
});
|
|
10745
|
-
addEventListener('appinstalled', () => { installEvent = null; installOffered = false; $('install').hidden = true; $('install-row').hidden = true; $('install-name-form').hidden = true; });
|
|
10746
|
+
addEventListener('appinstalled', () => { installEvent = null; installOffered = false; $('install').hidden = true; $('install-row').hidden = true; $('install-name-form').hidden = true; $('install-top').hidden = true; });
|
|
10747
|
+
/* The top button is the same gesture: Settings at This device, its Install pressed. */
|
|
10748
|
+
$('install-top').addEventListener('click', () => { $('nav-settings').click(); openChapter('s-screen'); $('install-row').scrollIntoView({ block: 'center' }); $('install').click(); });
|
|
10746
10749
|
if (apple && !asApp) offerInstall();
|
|
10747
10750
|
/* FIRST A NAME FOR THIS DEVICE, then the browser's own question. */
|
|
10748
10751
|
$('install').addEventListener('click', async () => {
|
package/web/index.html
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<link rel="stylesheet" href="/vendor/diff2html.css">
|
|
15
15
|
<div id="app" data-place="conversations">
|
|
16
16
|
<aside id="list" hidden>
|
|
17
|
-
<div class="top"><b id="list-title" title="Conversations">Clavarium</b><span class="top-acts"><button type="button" id="list-pin" class="icon-btn" aria-pressed="false" aria-label="Keep the list open" title="Keep the list open: it no longer folds when a conversation is opened"><svg class="ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 17v5"/><path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z"/></svg></button><button type="button" id="search-open" class="icon-btn" aria-label="Search conversations" title="Search (/ or Ctrl+K)" aria-expanded="false" aria-controls="search"><svg class="ic" viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg></button><button type="button" id="new" class="icon-btn new-btn" aria-label="New conversation" title="New conversation"><svg class="ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 5v14"/><path d="M5 12h14"/></svg></button></span></div>
|
|
17
|
+
<div class="top"><b id="list-title" title="Conversations">Clavarium</b><span class="top-acts"><button type="button" id="list-pin" class="icon-btn" aria-pressed="false" aria-label="Keep the list open" title="Keep the list open: it no longer folds when a conversation is opened"><svg class="ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 17v5"/><path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z"/></svg></button><button type="button" id="install-top" class="icon-btn" hidden aria-label="Install as an app" title="Install as an app: its own icon, full screen, no browser bar"><svg class="ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 3v12"/><path d="m7 10 5 5 5-5"/><path d="M5 21h14"/></svg></button><button type="button" id="search-open" class="icon-btn" aria-label="Search conversations" title="Search (/ or Ctrl+K)" aria-expanded="false" aria-controls="search"><svg class="ic" viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg></button><button type="button" id="new" class="icon-btn new-btn" aria-label="New conversation" title="New conversation"><svg class="ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 5v14"/><path d="M5 12h14"/></svg></button></span></div>
|
|
18
18
|
<!-- SEARCH, discreet: opened by the magnifier, "/" or Ctrl+K; filters as it is typed. -->
|
|
19
19
|
<div id="search" role="search" hidden><input id="search-field" type="search" placeholder="Search" aria-label="Search conversations: name, folder, identifier, tool" autocomplete="off" spellcheck="false" maxlength="60" aria-controls="items"></div>
|
|
20
20
|
<!-- Needs you and Recent: copies of rows of the list below, by when they were last used (app.js, paint). -->
|
package/web/kit.js
CHANGED
|
@@ -118,6 +118,8 @@
|
|
|
118
118
|
member says only what waits for you (tone 'need' or 'count').
|
|
119
119
|
`tag`: 'button' (opens it: `onOpen`) or 'div' (a member: its gestures are `actions`). `cls`: the
|
|
120
120
|
page's own classes, kept for its rules and tests. */
|
|
121
|
+
/* A line of a message as plain words: Markdown's marks taken off (**, __, `, #, > , links' addresses). */
|
|
122
|
+
const plainLine = (t) => String(t ?? '').replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, '$1').replace(/(\*\*|__|\*|_|`+|~~)(?=\S)([^\n]*?\S)\1/g, '$2').replace(/^\s*(#{1,6}|>|[-*+]|\d+\.)\s+/gm, '').replace(/\*\*|`/g, '').replace(/\s+/g, ' ').trim();
|
|
121
123
|
function ConvCard(m, { size = 'row', tag, cls = '', onOpen = null, actions = [] } = {}) {
|
|
122
124
|
const t = tag ?? (size === 'member' ? 'div' : 'button');
|
|
123
125
|
const root = node(t, `kit-conv kit-conv-${size}${cls ? ` ${cls}` : ''}`);
|
|
@@ -142,9 +144,10 @@
|
|
|
142
144
|
else if (marks) lines.push(marks);
|
|
143
145
|
else lines.push(...sub);
|
|
144
146
|
} else if (size === 'card') {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
if (
|
|
147
|
+
/* 06-11 (the owner's review): its last words without their Markdown marks; what it does now only when it
|
|
148
|
+
says something the point does not (asleep: the grey point says it); its tool in the details, not here. */
|
|
149
|
+
if (m.last) lines.push(node('small', 'last', plainLine(m.last)));
|
|
150
|
+
if (m.now && state !== 'sleep') lines.push(node('small', 'kit-conv-now', m.now));
|
|
148
151
|
} else {
|
|
149
152
|
const what = [m.who, m.now].filter(Boolean).join(' · ');
|
|
150
153
|
if (what) lines.push(node('small', 'kit-conv-now', what));
|
package/web/manifest.webmanifest
CHANGED
package/web/style.css
CHANGED
|
@@ -2288,7 +2288,8 @@ body.as-dragging #assets-rows .as-row { touch-action: none; }
|
|
|
2288
2288
|
/* THE CONVERSATIONS AS CARDS (02-11): playing cards, one per conversation, and one to add. */
|
|
2289
2289
|
#list-title { cursor: pointer; }
|
|
2290
2290
|
#deck { overflow-y: auto; }
|
|
2291
|
-
|
|
2291
|
+
/* 06-11 (the owner's tablet: 7 narrow columns, names cut): wider cards, fewer columns. */
|
|
2292
|
+
.deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 248px), 1fr)); gap: 14px; padding: 14px 16px 24px; }
|
|
2292
2293
|
.conv-card { position: relative; min-height: 120px; display: flex; flex-direction: column; gap: 6px; padding: 12px; 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; }
|
|
2293
2294
|
.conv-card:hover, .conv-card:focus-visible { transform: translateY(-3px); border-color: var(--brass); }
|
|
2294
2295
|
.conv-card-new { align-items: center; justify-content: center; border-style: dashed; border-width: 1.5px; background: transparent; box-shadow: none; color: var(--ink2); }
|
|
@@ -2732,7 +2733,10 @@ button.kit-switch[aria-checked="true"]::after { left: 18px; background: var(--ok
|
|
|
2732
2733
|
.kit-conv-card .kit-conv-main > small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink2); font-size: .8125rem; }
|
|
2733
2734
|
.kit-conv-card .kit-conv-main > .last { color: var(--ink); opacity: .9; }
|
|
2734
2735
|
.kit-conv-card .kit-conv-main > .last { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
|
|
2735
|
-
|
|
2736
|
+
/* A name wraps between its words only (06-11: « Assistant / s » was cut anywhere); a word too long for the card is hyphenated where the language allows, else cut. */
|
|
2737
|
+
.kit-conv-card .kit-conv-head > b { font-size: .9375rem; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: normal; word-break: normal; hyphens: auto; line-height: 1.25; }
|
|
2738
|
+
.kit-conv-card .kit-chips { flex-wrap: nowrap; overflow: hidden; }
|
|
2739
|
+
.kit-conv-card .kit-chip { flex: 0 1 auto; min-width: 0; }
|
|
2736
2740
|
.kit-conv-member { --kc-ring: var(--panel); align-items: center; padding: 8px 12px; }
|
|
2737
2741
|
.kit-conv-member .kit-conv-head > b { font-size: .8125rem; }
|
|
2738
2742
|
.kit-conv-member .kit-conv-main > small { font-size: .75rem; }
|