@marver-design/marver 0.31.0 → 0.32.0
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/CHANGELOG.md +12 -0
- package/README.md +2 -2
- package/dist/{anchor-check-B92s9tVv.mjs → anchor-check-DZtX13ly.mjs} +1 -1
- package/dist/{boards-OlAhZ87x.mjs → boards-jHmEPLV7.mjs} +1 -1
- package/dist/{build-BNssmbqd.mjs → build-D2dHEWX-.mjs} +3 -3
- package/dist/cli.mjs +12 -12
- package/dist/{comments-BakJQwaf.mjs → comments-ocvsnt2j.mjs} +2 -2
- package/dist/{daemon-MxoEQajX.mjs → daemon-D6TrdgMi.mjs} +49 -8
- package/dist/{dev-BBZe_brH.mjs → dev-DMQYbw-2.mjs} +9 -9
- package/dist/{link-Cmt9Xy4X.mjs → link-aZq5cExV.mjs} +1 -1
- package/dist/{pdf-CZENT6t3.mjs → pdf-Cf9GIoIM.mjs} +3 -3
- package/dist/{pdf-0m721FFn.mjs → pdf-HB0prF75.mjs} +1 -1
- package/dist/{perf-CIMijND6.mjs → perf-9ZEF5KLO.mjs} +2 -2
- package/dist/{perf-BB0XNt1M.mjs → perf-BA_NDarr.mjs} +1 -0
- package/dist/{plugin-CL8_wL7a.mjs → plugin-DesQP9L5.mjs} +127 -46
- package/dist/{poster-B7uSjlEP.mjs → poster-Bb6WraCA.mjs} +1 -1
- package/dist/{publish-bakes-BjgDNeyS.mjs → publish-bakes-EjMmukJB.mjs} +2 -2
- package/dist/{recover-ByuFQOF9.mjs → recover-B3dmatx4.mjs} +1 -1
- package/dist/{shot-BqwkdtKn.mjs → shot-Bjt2MQe3.mjs} +3 -3
- package/dist/{shot-D2TQGo2V.mjs → shot-BuUCG46-.mjs} +1 -1
- package/dist/{show-B1u3DiJw.mjs → show-DhmiUu01.mjs} +2 -2
- package/dist/{work-Nv-n2_Un.mjs → work-B4tydWnf.mjs} +37 -1
- package/dist/{work-DRdzXPvg.mjs → work-CzIXp7n1.mjs} +3 -3
- package/docs/app.md +109 -21
- package/docs/boards-and-folders.md +6 -3
- package/docs/slides.md +2 -1
- package/package.json +1 -1
- package/src/client/shell/Play.tsx +80 -5
- package/src/client/shell/app-bridge.ts +8 -0
- package/src/client/shell/immersive.ts +123 -0
- package/src/client/shell/inset.ts +29 -3
- package/src/client/shell/recorder-signals.ts +5 -2
- package/src/client/shell/styles.css +25 -6
- package/src/shared/app-api.ts +41 -0
- package/src/shared/immersive.ts +13 -0
- package/src/shared/perf-records.ts +1 -1
|
@@ -792,8 +792,13 @@ body.sh-space .sh-node { pointer-events: none } /* space-drag
|
|
|
792
792
|
|
|
793
793
|
/* ---- Play mode: near-black stage, one centered device, auto-hiding bar.
|
|
794
794
|
Fixed dark palette - the backdrop never follows the board theme, so no tokens here. */
|
|
795
|
-
.sh-play { position: absolute; inset: 0; z-index: 30; background: #0a0a0b; display: flex; padding-top: var(--mv-top, 0px);
|
|
796
|
-
align-items: center; justify-content: center; animation: sh-play-in .28s ease-out; cursor: auto
|
|
795
|
+
.sh-play { position: absolute; inset: 0; z-index: 30; background: #0a0a0b; display: flex; padding-top: var(--mv-play-top, var(--mv-top, 0px));
|
|
796
|
+
align-items: center; justify-content: center; animation: sh-play-in .28s ease-out; cursor: auto;
|
|
797
|
+
/* spec 32 C5.1 (MOTION, src/shared/immersive.ts): the play inset goes in 320 ms and comes back in 300 ms */
|
|
798
|
+
transition: padding-top 300ms cubic-bezier(.2, .8, .2, 1) }
|
|
799
|
+
:root.mv-immersive .sh-play { transition: padding-top 320ms cubic-bezier(.2, .8, .2, 1) }
|
|
800
|
+
/* spec 32 C5.2: while the stage FLIPs, the device's own size transition holds off - one animation resizes it */
|
|
801
|
+
.sh-play.flip .dev { transition: none }
|
|
797
802
|
@keyframes sh-play-in { from { opacity: 0 } }
|
|
798
803
|
/* the device wears the frame-node card language: same theme border tokens, the same
|
|
799
804
|
masked 1px edge-light gradient ring (glass catching light), and a real drop shadow
|
|
@@ -951,15 +956,29 @@ body.sh-kbd .sh-app :focus-visible { outline: 2px solid var(--accent); outline-o
|
|
|
951
956
|
/* Hide-UI: one binary body class (canvas + prototype) drops all operating chrome. Not
|
|
952
957
|
persisted - a page refresh always restores it. Comment pins/threads (the review
|
|
953
958
|
annotations) stay; only the marver chrome hides, for a clean point-and-shoot frame. */
|
|
954
|
-
body.sh-hide-ui .sh-pill,
|
|
955
|
-
body.sh-hide-ui .sh-pill-fab,
|
|
959
|
+
body.sh-hide-ui .sh-pill:not(.sh-play-pill),
|
|
960
|
+
body.sh-hide-ui .sh-pill-fab:not(.sh-play *),
|
|
956
961
|
body.sh-hide-ui .sh-panel,
|
|
957
962
|
body.sh-hide-ui .sh-fab,
|
|
958
963
|
body.sh-hide-ui .sh-ctx,
|
|
959
964
|
body.sh-hide-ui .sh-update,
|
|
960
965
|
body.sh-hide-ui .sh-toasts,
|
|
961
|
-
body.sh-hide-ui .sh-banner:not(.sh-stopped)
|
|
962
|
-
|
|
966
|
+
body.sh-hide-ui .sh-banner:not(.sh-stopped) { display: none !important } /* a stopped canvas stays said: the page holds what only it has */
|
|
967
|
+
|
|
968
|
+
/* spec 32 C5.3 (MOTION.out.pills 160 ms, MOTION.back.pills 200 ms): in play the pills, their fab, the navigator and the
|
|
969
|
+
minimal deck's progress strip fade instead of vanishing - out up (the pills) or down (the nav, the strip), then
|
|
970
|
+
hidden from the pointer and from view; back at once into view, then up to full.
|
|
971
|
+
The pills' 6 px goes on `translate`, so `transform` keeps the pill/fab morph (`.closed`, `.hidden`) and its --morph time
|
|
972
|
+
while the fade's own move takes MOTION's 160 ms out and 200 ms back, ease. */
|
|
973
|
+
.sh-play .sh-play-pill, .sh-play .sh-pill-fab { transition: opacity 200ms ease, translate 200ms ease, transform var(--morph), visibility 0s }
|
|
974
|
+
.sh-play-nav, .sh-slides-strip { transition: opacity 200ms ease, transform 200ms ease, visibility 0s }
|
|
975
|
+
body.sh-hide-ui .sh-play .sh-play-pill, body.sh-hide-ui .sh-play .sh-pill-fab, body.sh-hide-ui .sh-play-nav, body.sh-hide-ui .sh-slides-strip {
|
|
976
|
+
opacity: 0; pointer-events: none; visibility: hidden;
|
|
977
|
+
transition: opacity 160ms ease, transform 160ms ease, visibility 0s linear 160ms }
|
|
978
|
+
body.sh-hide-ui .sh-play .sh-play-pill, body.sh-hide-ui .sh-play .sh-pill-fab {
|
|
979
|
+
translate: 0 -6px; transition: opacity 160ms ease, translate 160ms ease, transform var(--morph), visibility 0s linear 160ms }
|
|
980
|
+
body.sh-hide-ui .sh-play-nav { transform: translateY(6px) }
|
|
981
|
+
body.sh-hide-ui .sh-slides-strip { transform: translateX(-50%) translateY(6px) }
|
|
963
982
|
|
|
964
983
|
/* the prototype pill reuses the shared pill LAYOUT but wears the discreet DARK skin of the
|
|
965
984
|
bottom-left navigator (not the bright canvas glass), so it recedes into the near-black
|
package/src/shared/app-api.ts
CHANGED
|
@@ -24,6 +24,12 @@
|
|
|
24
24
|
* three white-out windows a shell asks for (R8 #38), sent only when `perfInfo().watch` is true - app 1.0.0 would refuse
|
|
25
25
|
* it and spend the tab's bucket; and `mv:menu-click`'s `in`, the menu a relayed item came from (#51), absent from 1.0.0
|
|
26
26
|
* (the shell then records `in: 'app'`). Owners: app-store (`watch`, `perfInfo().watch`), commands (`in`).
|
|
27
|
+
*
|
|
28
|
+
* Spec 32 (app 1.2, marver 0.32.0) amends it in writing (F2, F3b #1), frozen before its streams split and `v` still 1,
|
|
29
|
+
* no new FEATURE name: `mv:immersive` / `mv:immersive-state`, immersive play's wish and main's answer (C2), with the
|
|
30
|
+
* optional `MarverAppV1.immersive` and `onImmersive` (a shell gates on the method); and two optional `LiveEvent` fields,
|
|
31
|
+
* `work` and `titles` (unknown fields are stripped, so a 0.31 app ignores them), the titles bounded by the new
|
|
32
|
+
* `LIVE_TITLES_MAX`. `LIVE_KINDS`, `LIVE_BOUNDS` and `LIVE_WIRE` are unchanged.
|
|
27
33
|
*/
|
|
28
34
|
|
|
29
35
|
export const APP_API_VERSION = 1
|
|
@@ -166,6 +172,10 @@ export const CANVAS_CHANNELS = {
|
|
|
166
172
|
front: 'mv:front',
|
|
167
173
|
/** app 1.1 (spec 31): a finished deck PDF saved where the person says - an invoke carrying only the job id */
|
|
168
174
|
exportPdf: 'mv:export-pdf',
|
|
175
|
+
/** spec 32 C2: immersive play's wish (canvas to main, a held whole-state report like `theme`: `ImmersiveWish`) */
|
|
176
|
+
immersive: 'mv:immersive',
|
|
177
|
+
/** spec 32 C2: main's answer to the wish (main to canvas, `{ doc, ...ImmersiveAnswer }`) */
|
|
178
|
+
immersiveState: 'mv:immersive-state',
|
|
169
179
|
} as const
|
|
170
180
|
|
|
171
181
|
/** Bounds main checks again (A2.14 #19): unknown fields are stripped, a known one of the wrong type or past its bound refuses the message. */
|
|
@@ -294,6 +304,15 @@ export interface LiveEvent {
|
|
|
294
304
|
working: boolean
|
|
295
305
|
/** a Jam session runs (`!!view.session`) */
|
|
296
306
|
session: boolean
|
|
307
|
+
/**
|
|
308
|
+
* spec 32 F2 (0.32.0, optional): since when something has been at work - `marver work`'s CLI leases and the Jam runs
|
|
309
|
+
* the snapshot counts as working - and on which board (the newest working Jam card's, else the first board pinning a
|
|
310
|
+
* `marver work` frame). Absent when nothing works, and from a 0.31 server
|
|
311
|
+
*/
|
|
312
|
+
work?: { board?: string; since: number }
|
|
313
|
+
/** spec 32 F2 (0.32.0, optional): the titles of the boards `items` and `work` name, at most `LIVE_TITLES_MAX` keys,
|
|
314
|
+
* each key a ref (at most `LIVE_BOUNDS.ref`) and each value at most `LIVE_BOUNDS.title` */
|
|
315
|
+
titles?: Record<string, string>
|
|
297
316
|
}
|
|
298
317
|
|
|
299
318
|
/**
|
|
@@ -311,6 +330,8 @@ export const LIVE_BOUNDS = {
|
|
|
311
330
|
eventBytes: 65_536,
|
|
312
331
|
id: /^(ask|review|failed|stalled):[0-9a-f]{20}$/,
|
|
313
332
|
} as const
|
|
333
|
+
/** spec 32 F2: `LiveEvent.titles` has at most this many keys. A constant of its own: `LIVE_BOUNDS` is frozen (A4.6 #11). */
|
|
334
|
+
export const LIVE_TITLES_MAX = 32
|
|
314
335
|
|
|
315
336
|
/**
|
|
316
337
|
* The live stream's wire (A4.6 #5, #6, #14). `GET <origin><path>` with `x-mv-ws`, a fresh `x-mv-nonce` and
|
|
@@ -356,6 +377,19 @@ export type CaptureWhy = (typeof CAPTURE_WHY)[number]
|
|
|
356
377
|
* size in device pixels, its long side at most `BOUNDS.captureLong`. */
|
|
357
378
|
export type CaptureAnswer = { ok: true; png: Uint8Array; width: number; height: number } | { ok: false; why: CaptureWhy }
|
|
358
379
|
|
|
380
|
+
/**
|
|
381
|
+
* Spec 32 C2: `mv:immersive` (canvas to main; on the wire `{ doc, p }`) - the shell's wish that immersive play hide the
|
|
382
|
+
* strip, a whole state held and replayed after `menu`. `n` is the preload's, counting from 1 for each document; the
|
|
383
|
+
* shell never sees it. The bridge takes `on` a boolean and `n` an integer 1..2^31, unknown fields stripped.
|
|
384
|
+
*/
|
|
385
|
+
export interface ImmersiveWish { on: boolean; n: number }
|
|
386
|
+
/**
|
|
387
|
+
* Spec 32 C2: `mv:immersive-state` (main to canvas; on the wire `{ doc, ...ImmersiveAnswer }`) - main's answer to the
|
|
388
|
+
* wish `n`. `on: true`: the strip is hidden, drop the inset; `on: false`: keep or restore the 44 px inset, Hide UI as it
|
|
389
|
+
* is; `end: true`: main took immersive away for this document (restore the inset, and turn Hide UI off if play is on).
|
|
390
|
+
*/
|
|
391
|
+
export interface ImmersiveAnswer { n: number; on: boolean; end?: true }
|
|
392
|
+
|
|
359
393
|
/** A deck PDF job's id (src/server/pdf.ts JOB_ID): 128 random bits, base64url. */
|
|
360
394
|
export const PDF_JOB = /^[A-Za-z0-9_-]{22}$/
|
|
361
395
|
/** The largest PDF main fetches and writes (spec 31: 200 MB). */
|
|
@@ -425,6 +459,13 @@ export interface MarverAppV1 {
|
|
|
425
459
|
* canvas origin, shows the save panel, checks the document again, and writes the file where the panel says
|
|
426
460
|
*/
|
|
427
461
|
exportPdf?(a: ExportPdfAsk): Promise<ExportPdfAnswer>
|
|
462
|
+
/**
|
|
463
|
+
* spec 32 C2 (app 1.2): the shell's wish for immersive play, sent on every change (the preload stamps it with `n`,
|
|
464
|
+
* holds it and replays it at an admit). What the shell shows follows `onImmersive`'s answer, never the wish
|
|
465
|
+
*/
|
|
466
|
+
immersive?(p: { on: boolean }): void
|
|
467
|
+
/** spec 32 C2 (app 1.2): main's answer to the latest wish, for this document alone; an answer to an older wish is dropped */
|
|
468
|
+
onImmersive?(fn: (s: { on: boolean; end?: boolean }) => void): () => void
|
|
428
469
|
}
|
|
429
470
|
|
|
430
471
|
import type { ShowTarget } from './deep-link.ts'
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spec 32 C2, C5, C9, C10: immersive play's motion, one set of numbers for the shell (the stage's padding and FLIP, the
|
|
3
|
+
* pills' fade), main (the strip's hide timer, `MOTION.out.strip`) and the strip's CSS (its transform and opacity, which a
|
|
4
|
+
* unit test checks against these). Copied from the design (tab-strip/_immersive.tsx `MOTION`). Constants only - no
|
|
5
|
+
* imports - so the app's main bundle and the shell both take it as it is.
|
|
6
|
+
*/
|
|
7
|
+
export const MOTION = {
|
|
8
|
+
/** shown to hidden: the strip leaves, the pills fade, the stage grows into the room */
|
|
9
|
+
out: { strip: 240, pills: 160, stage: 320, ease: 'cubic-bezier(.4, 0, .9, .6)', stageEase: 'cubic-bezier(.2, .8, .2, 1)' },
|
|
10
|
+
/** hidden to shown */
|
|
11
|
+
back: { strip: 260, pills: 200, stage: 300, ease: 'cubic-bezier(.15, .7, .2, 1)', stageEase: 'cubic-bezier(.2, .8, .2, 1)' },
|
|
12
|
+
} as const
|
|
13
|
+
export type Motion = typeof MOTION
|
|
@@ -208,7 +208,7 @@ export interface ThemeBody {
|
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
/** #24: a state that changes what input does until left. */
|
|
211
|
-
export const MODES = ['laser', 'inspect', 'comments', 'interact', 'play', 'slides', 'hide-ui', 'jam-session', 'jam-capture', 'jam-review', 'jam-lane'] as const
|
|
211
|
+
export const MODES = ['laser', 'inspect', 'comments', 'interact', 'play', 'slides', 'hide-ui', 'immersive', 'jam-session', 'jam-capture', 'jam-review', 'jam-lane'] as const
|
|
212
212
|
export type ModeName = (typeof MODES)[number]
|
|
213
213
|
/** #25, #26: `enter` carries the shown fields, `exit` the held ones. */
|
|
214
214
|
export interface ModeBody {
|