clavarium 0.2.281-next.1 → 0.2.282-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.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.281-next.1",
3
+ "version": "0.2.282-next.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "clavarium",
9
- "version": "0.2.281-next.1",
9
+ "version": "0.2.282-next.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.281-next.1",
3
+ "version": "0.2.282-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.",
package/web/app.js CHANGED
@@ -145,6 +145,18 @@
145
145
  const was = m.dataset.pose ?? '';
146
146
  /* Trying to wake (03-11): it lifts its head, and lies back, again, until it is up (a restart, a build). */
147
147
  if (pose === 'trying') { m.classList.remove('waking', 'stirring', 'asleep'); m.classList.add('trying'); m.dataset.pose = 'trying'; return; }
148
+ /* From trying to waking (03-11, no jolt): wait till its head lies down again -- the end of a try, the
149
+ very pose it wakes from -- then rise. At most one try's length (with less motion: no try, no wait). */
150
+ if (pose === 'waking' && was === 'trying') {
151
+ if (m.dataset.rising) return;
152
+ m.dataset.rising = 'yes';
153
+ /* Where it is in its try (2.6 s: lying until 15 %, lying again from 80 %), read from the animation itself. */
154
+ const tryNow = m.querySelector('.m-head')?.getAnimations?.().find((x) => x.animationName === 'm-try');
155
+ const at = Number(tryNow?.currentTime ?? 0) % 2600;
156
+ const rise = () => { delete m.dataset.rising; m.dataset.pose = 'tried'; mascot('waking'); };
157
+ if (at <= 390 || at >= 2080) rise(); else setTimeout(rise, 2080 - at);
158
+ return;
159
+ }
148
160
  m.classList.remove('trying');
149
161
  if (pose === 'waking') {
150
162
  if (was === 'waking') return;
@@ -261,8 +273,9 @@
261
273
  const s = Math.max(0, Math.floor((Date.now() - (Date.parse(p.since ?? '') || Date.now())) / 1000));
262
274
  $('notice-title').textContent = PROGRESS_TITLES[p.kind] ?? 'Starting';
263
275
  /* 03-11, less is more: the sheep trying to wake (a wake, a restart, a build), the step under way in one
264
- line; the list of the steps stays one tap away, and the usual time is said only when it is passed. */
265
- mascot(p.kind === 'wake' ? 'waking' : 'trying');
276
+ line; the list of the steps stays one tap away, and the usual time is said only when it is passed.
277
+ It wakes for real at the last step only (03-11, his idea): until then, it tries. */
278
+ mascot(at >= p.steps.length - 1 ? 'waking' : 'trying');
266
279
  $('notice-steps').hidden = !panel.open; $('notice-spin').hidden = true;
267
280
  $('notice-count').textContent = `${at + 1} / ${p.steps.length} \u00b7 ${clockOf(s)}`;
268
281
  $('notice-text').textContent = `${stepNow(p, tool)}${s >= 180 ? ` \u2014 ${usualFor(p.kind, s)}` : ''}`;