clavarium 0.2.247-next.1 → 0.2.248-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 +6 -6
- package/package.json +2 -2
- package/web/app.js +9 -3
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.248-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.248-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.49-next.1",
|
|
15
15
|
"clavarium-docket": "0.1.1",
|
|
16
16
|
"clavarium-parley": "0.17.35-next.1",
|
|
17
17
|
"clavarium-tether": "0.1.0-next.46",
|
|
@@ -761,9 +761,9 @@
|
|
|
761
761
|
}
|
|
762
762
|
},
|
|
763
763
|
"node_modules/clavarium-binder": {
|
|
764
|
-
"version": "0.1.
|
|
765
|
-
"resolved": "https://registry.npmjs.org/clavarium-binder/-/clavarium-binder-0.1.
|
|
766
|
-
"integrity": "sha512-
|
|
764
|
+
"version": "0.1.49-next.1",
|
|
765
|
+
"resolved": "https://registry.npmjs.org/clavarium-binder/-/clavarium-binder-0.1.49-next.1.tgz",
|
|
766
|
+
"integrity": "sha512-PyPXP5C66Xs98pNvI6BDjVNeoB/PF3IdUsbcMCXWGhVm4uM68OfKBC6Ph9eWRBHg/hiS5eiBt6fydZgZLCHZOw==",
|
|
767
767
|
"license": "MIT",
|
|
768
768
|
"bin": {
|
|
769
769
|
"binder": "bin/binder.mjs",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.248-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,7 +44,7 @@
|
|
|
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.49-next.1",
|
|
48
48
|
"clavarium-docket": "0.1.1",
|
|
49
49
|
"clavarium-parley": "0.17.35-next.1",
|
|
50
50
|
"clavarium-tether": "0.1.0-next.46",
|
package/web/app.js
CHANGED
|
@@ -5246,7 +5246,7 @@
|
|
|
5246
5246
|
/* Where it is: a step of this page's Back (below). */
|
|
5247
5247
|
place: at, onPlace: steps?.onPlace, onBack: steps?.onBack,
|
|
5248
5248
|
/* ACT (02-11): quick actions suggested for a card (server/suggest.mjs); done here. */
|
|
5249
|
-
...(DEVICE ? {} : { actions: (r, l) => cardActions(r, l, whose), discuss: (r, l) => discussCard(r, l, whose) }),
|
|
5249
|
+
...(DEVICE ? {} : { actions: (r, l) => cardActions(r, l, whose), discuss: (r, l) => discussCard(r, l, whose), endings: (r, l, kind) => endCard(r, l, kind) }),
|
|
5250
5250
|
});
|
|
5251
5251
|
binderViews.add({ box: holder.firstElementChild, view });
|
|
5252
5252
|
watchBinders();
|
|
@@ -5255,12 +5255,18 @@
|
|
|
5255
5255
|
/* The conversation that carries a card: an assistant among its owners, else the one the binder is given to. */
|
|
5256
5256
|
const carrierOf = (r, whose) => (r.owners ?? []).find((o) => o.startsWith('conversation:'))?.slice('conversation:'.length) || whose();
|
|
5257
5257
|
const dayAfter = (days) => { const d = new Date(Date.now() + days * 86_400_000); return new Date(d.getTime() - d.getTimezoneOffset() * 60_000).toISOString().slice(0, 10); };
|
|
5258
|
+
/* A card's two endings, archived either way: done (to its done state), or dropped (a note says so). */
|
|
5259
|
+
async function endCard(r, l, kind, why = '') {
|
|
5260
|
+
if (kind === 'done') { const end = (l.states ?? []).find((x) => x.done); if (end) await binderCall('move', { id: r.id, state: end.id }); }
|
|
5261
|
+
else await binderCall('note', { id: r.id, text: `Dropped: no longer relevant${why ? ` (${why})` : ''}.` });
|
|
5262
|
+
await binderCall('archive', { id: r.id });
|
|
5263
|
+
}
|
|
5258
5264
|
async function cardActions(r, l, whose) {
|
|
5259
5265
|
const got = await post(`${API}/binder/suggest`, { id: r.id }).catch(() => null);
|
|
5260
5266
|
return (got?.actions ?? []).map((a) => ({ label: a.label, why: a.why, run: async () => {
|
|
5261
5267
|
if (a.key === 'done') { const end = (l.states ?? []).find((x) => x.done); if (end) await binderCall('move', { id: r.id, state: end.id }); return; }
|
|
5262
|
-
if (a.key === 'done-archive') {
|
|
5263
|
-
if (a.key === 'drop') { await
|
|
5268
|
+
if (a.key === 'done-archive') { await endCard(r, l, 'done'); return; }
|
|
5269
|
+
if (a.key === 'drop') { await endCard(r, l, 'drop', a.why); return; }
|
|
5264
5270
|
if (a.key === 'postpone-day' || a.key === 'postpone-week') { await binderCall('edit', { id: r.id, due: dayAfter(a.key === 'postpone-day' ? 1 : 7) }); return; }
|
|
5265
5271
|
if (a.key === 'urgency-up' || a.key === 'urgency-down') { const u = Number(r.fields?.urgence ?? 50); await binderCall('edit', { id: r.id, fields: { urgence: Math.max(0, Math.min(100, u + (a.key === 'urgency-up' ? 20 : -20))) } }); return; }
|
|
5266
5272
|
/* Work for an assistant: asked in its chat, where the person follows and approves. */
|