clavarium 0.2.119-next.1 → 0.2.121-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 +10 -10
- package/package.json +3 -3
- package/web/app.js +10 -4
- package/web/index.html +1 -1
- package/web/style.css +10 -0
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.121-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.121-next.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
|
13
13
|
"@xterm/xterm": "^6.0.0",
|
|
14
|
-
"clavarium-binder": "0.1.
|
|
14
|
+
"clavarium-binder": "0.1.31-next.1",
|
|
15
15
|
"clavarium-docket": "0.1.1",
|
|
16
|
-
"clavarium-parley": "0.17.
|
|
16
|
+
"clavarium-parley": "0.17.14-next.1",
|
|
17
17
|
"clavarium-tether": "0.1.0-next.29",
|
|
18
18
|
"mermaid": "11.17.2",
|
|
19
19
|
"node-pty": "^1.1.0",
|
|
@@ -716,9 +716,9 @@
|
|
|
716
716
|
}
|
|
717
717
|
},
|
|
718
718
|
"node_modules/clavarium-binder": {
|
|
719
|
-
"version": "0.1.
|
|
720
|
-
"resolved": "https://registry.npmjs.org/clavarium-binder/-/clavarium-binder-0.1.
|
|
721
|
-
"integrity": "sha512-
|
|
719
|
+
"version": "0.1.31-next.1",
|
|
720
|
+
"resolved": "https://registry.npmjs.org/clavarium-binder/-/clavarium-binder-0.1.31-next.1.tgz",
|
|
721
|
+
"integrity": "sha512-r6nsAJxKzwv7zMIOiPzrOFIPApC2DCXjLaO6zCi9mOPMNuK016EWH9+jtTJsEbWvyCatFIbl5pyxZLs13P6d4g==",
|
|
722
722
|
"license": "MIT",
|
|
723
723
|
"bin": {
|
|
724
724
|
"binder": "bin/binder.mjs",
|
|
@@ -742,9 +742,9 @@
|
|
|
742
742
|
}
|
|
743
743
|
},
|
|
744
744
|
"node_modules/clavarium-parley": {
|
|
745
|
-
"version": "0.17.
|
|
746
|
-
"resolved": "https://registry.npmjs.org/clavarium-parley/-/clavarium-parley-0.17.
|
|
747
|
-
"integrity": "sha512
|
|
745
|
+
"version": "0.17.14-next.1",
|
|
746
|
+
"resolved": "https://registry.npmjs.org/clavarium-parley/-/clavarium-parley-0.17.14-next.1.tgz",
|
|
747
|
+
"integrity": "sha512-AFYoyBHK2NKEuFmIv5rtPy4rSeohUY14LKxMrbMYoqyzyc6VsXg8dLiHdA0VaWjjMMoRiSv6rMQV0cmaArtt6w==",
|
|
748
748
|
"license": "MIT",
|
|
749
749
|
"bin": {
|
|
750
750
|
"parley": "bin/parley.mjs",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.121-next.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "A conversation is a VM with a terminal in it. Everything else is a folder.",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@xterm/addon-fit": "^0.11.0",
|
|
46
46
|
"@xterm/xterm": "^6.0.0",
|
|
47
|
-
"clavarium-binder": "0.1.
|
|
47
|
+
"clavarium-binder": "0.1.31-next.1",
|
|
48
48
|
"clavarium-docket": "0.1.1",
|
|
49
|
-
"clavarium-parley": "0.17.
|
|
49
|
+
"clavarium-parley": "0.17.14-next.1",
|
|
50
50
|
"clavarium-tether": "0.1.0-next.29",
|
|
51
51
|
"mermaid": "11.17.2",
|
|
52
52
|
"node-pty": "^1.1.0",
|
package/web/app.js
CHANGED
|
@@ -7285,6 +7285,7 @@
|
|
|
7285
7285
|
/* The file is shown in a WINDOW over the screen, wherever it was asked
|
|
7286
7286
|
from: closing it leaves the terminal, or the list, as it was. */
|
|
7287
7287
|
function closePreview() {
|
|
7288
|
+
if ($('viewer').classList.contains('viewer-full')) { $('viewer').classList.remove('viewer-full'); $('preview-full').setAttribute('aria-pressed', 'false'); try { if (document.fullscreenElement === $('viewer')) document.exitFullscreen?.(); } catch { /* already out */ } }
|
|
7288
7289
|
if (shownUrl) { URL.revokeObjectURL(shownUrl); shownUrl = null; }
|
|
7289
7290
|
for (const url of mdUrls) URL.revokeObjectURL(url);
|
|
7290
7291
|
mdUrls.clear();
|
|
@@ -7314,12 +7315,14 @@
|
|
|
7314
7315
|
const can = what && (what.text !== undefined || (what.picture && pictures));
|
|
7315
7316
|
button.hidden = !can;
|
|
7316
7317
|
copyLabel = what?.picture ? 'Copy image' : 'Copy';
|
|
7317
|
-
|
|
7318
|
+
/* An icon: its word is its name (hover, long press, reader); "Copied" shows a moment as a tick of colour. */
|
|
7319
|
+
const word = (w) => { button.title = w; button.setAttribute('aria-label', w); if (w === 'Copied') button.dataset.done = 'true'; else delete button.dataset.done; };
|
|
7320
|
+
word(copyLabel);
|
|
7318
7321
|
button.onclick = !can ? null : () => {
|
|
7319
7322
|
const done = (ok, why) => {
|
|
7320
|
-
|
|
7323
|
+
word(ok ? 'Copied' : copyLabel);
|
|
7321
7324
|
if (!ok && why) { $('preview-note').textContent = why; $('preview-note').hidden = false; }
|
|
7322
|
-
if (ok) setTimeout(() => { if (button.
|
|
7325
|
+
if (ok) setTimeout(() => { if (button.dataset.done) word(copyLabel); }, 1800);
|
|
7323
7326
|
};
|
|
7324
7327
|
if (what.text !== undefined) {
|
|
7325
7328
|
const fallback = () => { const at = select?.(); done(false, at ? 'The browser did not let this page copy: the text is selected, copy it yourself (Ctrl+C, or a long press).' : 'The browser did not let this page copy.'); };
|
|
@@ -7498,7 +7501,7 @@
|
|
|
7498
7501
|
/* From the terminal, a way to the folder it sits in. */
|
|
7499
7502
|
/* From the terminal or the chat, a way to the folder it sits in: the Assets tab, on it (Files, on a device). */
|
|
7500
7503
|
$('preview-where').hidden = Boolean(from) || (!$('files').hidden && !$('files').classList.contains('embedded')) || noTerminal() || (!DEVICE && assetsShown);
|
|
7501
|
-
|
|
7504
|
+
{ const word = DEVICE ? 'Show in Files' : 'Show in Assets'; $('preview-where').title = word; $('preview-where').setAttribute('aria-label', word); }
|
|
7502
7505
|
$('preview-where').onclick = async () => {
|
|
7503
7506
|
closePreview();
|
|
7504
7507
|
const folder = inner.split('/').slice(0, -1).join('/');
|
|
@@ -7518,6 +7521,9 @@
|
|
|
7518
7521
|
$('preview-edit').onclick = () => { void editFile(tab, inner, name); };
|
|
7519
7522
|
/* A file of the shared folders: attached to a card from here (#180). */
|
|
7520
7523
|
$('preview-attach').hidden = Boolean(from) || DEVICE;
|
|
7524
|
+
/* Full screen: the file takes the whole screen (the real API where granted, else a cover); kept while it is open. */
|
|
7525
|
+
const full = (on) => { $('viewer').classList.toggle('viewer-full', on); $('preview-full').setAttribute('aria-pressed', String(on)); const w2 = on ? 'Leave full screen' : 'Full screen'; $('preview-full').title = w2; $('preview-full').setAttribute('aria-label', w2); try { if (on) $('viewer').requestFullscreen?.().catch(() => {}); else if (document.fullscreenElement === $('viewer')) document.exitFullscreen?.(); } catch { /* the cover stands in */ } };
|
|
7526
|
+
$('preview-full').onclick = () => full(!$('viewer').classList.contains('viewer-full'));
|
|
7521
7527
|
$('preview-attach').onclick = () => void attachToCard({ kind: 'file', ref: tab === 'work' ? `/work/${inner}` : `/resources/${tab}/${inner}`, title: name });
|
|
7522
7528
|
/* A file read from the machine's disk says so, whatever else is said. */
|
|
7523
7529
|
const origin = from ? 'Read from the disk of the machine: this file is not kept here, and goes with the machine.' : '';
|
package/web/index.html
CHANGED
|
@@ -1071,7 +1071,7 @@
|
|
|
1071
1071
|
<!-- A file, shown over whatever is on the screen; closing it leaves you where you were. -->
|
|
1072
1072
|
<div id="viewer" role="dialog" aria-modal="true" aria-labelledby="preview-name" hidden>
|
|
1073
1073
|
<div id="viewer-card">
|
|
1074
|
-
<div class="row"><b id="preview-name"></b><span class="sp"></span><button type="button" id="preview-where" hidden
|
|
1074
|
+
<div class="row"><b id="preview-name"></b><span class="sp"></span><button type="button" id="preview-where" class="ico" hidden title="Show in Assets" aria-label="Show in Assets"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 2 2 7l10 5 10-5-10-5z"/><path d="M2 17l10 5 10-5M2 12l10 5 10-5"/></svg></button><button type="button" id="preview-attach" class="ico" hidden title="Attach to a card" aria-label="Attach to a card"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"/></svg></button><button type="button" id="preview-edit" class="ico" hidden title="Edit" aria-label="Edit"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"/></svg></button><button type="button" id="preview-copy" class="ico" hidden title="Copy" aria-label="Copy"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V5a2 2 0 0 1 2-2h10"/></svg></button><button type="button" id="preview-full" class="ico" title="Full screen" aria-label="Full screen" aria-pressed="false"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 3H5a2 2 0 0 0-2 2v3M21 8V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3M16 21h3a2 2 0 0 0 2-2v-3"/></svg></button><a id="preview-download" class="button ico primary" title="Download" aria-label="Download"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 3v12M7 11l5 5 5-5"/><path d="M5 21h14"/></svg></a><button type="button" id="preview-close" aria-label="Close" title="Close">×</button></div>
|
|
1075
1075
|
<p id="preview-note" class="hint" hidden></p>
|
|
1076
1076
|
<div id="preview-body"></div>
|
|
1077
1077
|
</div>
|
package/web/style.css
CHANGED
|
@@ -1888,3 +1888,13 @@ details.commit > pre { margin: 6px 0 0 1.6em; white-space: pre-wrap; overflow-wr
|
|
|
1888
1888
|
#attach-pick .attach-item small { color: var(--dim); }
|
|
1889
1889
|
#attach-pick .attach-said { margin: 0; font-weight: 600; }
|
|
1890
1890
|
#attach-pick .attach-said.bad { color: var(--bad, #c0392b); }
|
|
1891
|
+
|
|
1892
|
+
/* The file viewer's buttons are icons (#89): each says its name on hover, a long press, a reader;
|
|
1893
|
+
Download stands out. Full screen: the file takes the whole screen. */
|
|
1894
|
+
#viewer .ico { display: inline-flex; align-items: center; justify-content: center; width: 38px; min-width: 38px; height: 34px; padding: 0; }
|
|
1895
|
+
#viewer .ico svg { width: 18px; height: 18px; }
|
|
1896
|
+
#viewer .ico.primary { background: var(--brass); border-color: var(--brass); color: var(--on-brass); }
|
|
1897
|
+
#viewer #preview-copy[data-done="true"] { color: var(--ok); border-color: currentColor; }
|
|
1898
|
+
#viewer #preview-full[aria-pressed="true"] { border-color: var(--brass); }
|
|
1899
|
+
#viewer.viewer-full { padding: 0; }
|
|
1900
|
+
#viewer.viewer-full #viewer-card { width: 100%; max-width: none; border-radius: 0; border: 0; padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
|