@vibefield/rosetta-room 0.1.5 → 0.1.7
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/LICENSE +21 -0
- package/README.md +53 -2
- package/dist/HistoryRoom.js +21 -5
- package/dist/components/ColdStart.d.ts +15 -0
- package/dist/components/ColdStart.js +27 -0
- package/dist/components/IngestStatus.js +43 -6
- package/dist/components/Transcript.js +8 -2
- package/dist/components/transcript/Attachments.d.ts +2 -0
- package/dist/components/transcript/Attachments.js +35 -10
- package/dist/components/transcript/AuthoredMessage.js +2 -1
- package/dist/components/transcript/DayPill.d.ts +8 -4
- package/dist/components/transcript/DayPill.js +13 -12
- package/dist/components/transcript/Document.js +8 -2
- package/dist/components/transcript/PromptJump.d.ts +14 -0
- package/dist/components/transcript/PromptJump.js +116 -0
- package/dist/components/transcript/TranscriptLoading.js +9 -0
- package/dist/components/transcript/VideoTile.d.ts +28 -0
- package/dist/components/transcript/VideoTile.js +99 -0
- package/dist/components/transcript/attachment-file-source.d.ts +9 -1
- package/dist/components/transcript/attachment-file-source.js +9 -1
- package/dist/components/transcript/document-model.js +6 -4
- package/dist/components/transcript/video-source.d.ts +39 -0
- package/dist/components/transcript/video-source.js +110 -0
- package/dist/components/transcript/viewer-day.d.ts +7 -0
- package/dist/components/transcript/viewer-day.js +44 -0
- package/dist/components/ui/Hold.d.ts +25 -0
- package/dist/components/ui/Hold.js +44 -0
- package/dist/components/ui/Meter.d.ts +1 -1
- package/dist/components/ui/Meter.js +10 -0
- package/dist/components/ui/index.d.ts +2 -0
- package/dist/components/ui/index.js +1 -0
- package/dist/fixtures/index.d.ts +2 -1
- package/dist/fixtures/index.js +53 -4
- package/dist/host-inputs.d.ts +25 -0
- package/dist/host-inputs.js +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/lib/image-media.d.ts +5 -0
- package/dist/lib/image-media.js +17 -0
- package/dist/lib/ingest-activity.d.ts +6 -0
- package/dist/lib/ingest-activity.js +6 -0
- package/dist/lib/transcript/images.d.ts +6 -2
- package/dist/lib/transcript/images.js +10 -4
- package/dist/lib/transcript/index.d.ts +3 -1
- package/dist/lib/transcript/index.js +2 -1
- package/dist/lib/transcript/prompt-jump.d.ts +30 -0
- package/dist/lib/transcript/prompt-jump.js +65 -0
- package/dist/lib/transcript/sittings.d.ts +26 -0
- package/dist/lib/transcript/sittings.js +46 -1
- package/dist/lib/use-standing-hold.d.ts +17 -0
- package/dist/lib/use-standing-hold.js +70 -0
- package/dist/ports.d.ts +15 -1
- package/dist/styles/attachments.css +13 -0
- package/dist/styles/hold.css +47 -0
- package/dist/styles/ingest.css +14 -0
- package/dist/styles/room.css +18 -0
- package/package.json +3 -3
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// How long a hold stands (R10): it is late (nothing for 120ms, so a wait
|
|
2
|
+
// answered at once shows no hold at all), and a hold that has begun to show
|
|
3
|
+
// stands at least 800ms — its mark's 400 in, then a beat to read the line —
|
|
4
|
+
// before it fades away over 280ms (120ms under reduced motion, as hold.css
|
|
5
|
+
// fades it). What comes next waits for it, so the room's next face never draws
|
|
6
|
+
// under a hold that is still there. A carried hold (the host's own stood where
|
|
7
|
+
// it stands) is shown from its first frame.
|
|
8
|
+
import { useEffect, useRef, useState } from "react";
|
|
9
|
+
import { REDUCED_MOTION_QUERY } from "./motion.js";
|
|
10
|
+
export const HOLD_LATE_MS = 120;
|
|
11
|
+
export const HOLD_FLOOR_MS = 800;
|
|
12
|
+
export const HOLD_LEAVE_MS = 280;
|
|
13
|
+
export const HOLD_LEAVE_REDUCED_MS = 120;
|
|
14
|
+
/** The leave as hold.css draws it: one short fade under reduced motion. */
|
|
15
|
+
function leaveMs() {
|
|
16
|
+
const reduced = typeof window !== "undefined" && window.matchMedia?.(REDUCED_MOTION_QUERY).matches === true;
|
|
17
|
+
return reduced ? HOLD_LEAVE_REDUCED_MS : HOLD_LEAVE_MS;
|
|
18
|
+
}
|
|
19
|
+
/** What a hold does when its wait is over at `now`: a hold that never began
|
|
20
|
+
* to show is gone at once; one that has stands out its floor; past its floor
|
|
21
|
+
* it leaves. */
|
|
22
|
+
export function afterWait(now, shownAt) {
|
|
23
|
+
if (now < shownAt)
|
|
24
|
+
return "gone";
|
|
25
|
+
return now < shownAt + HOLD_FLOOR_MS ? "floor" : "leave";
|
|
26
|
+
}
|
|
27
|
+
/** The hold that stands now — the one asked for, or the last one while its
|
|
28
|
+
* floor and its leave run — whether it is leaving, and whether it is carried
|
|
29
|
+
* (only the room's first hold can be: one that comes back after it went is
|
|
30
|
+
* late again); null when none stands. */
|
|
31
|
+
export function useStandingHold(hold, carried) {
|
|
32
|
+
const last = useRef(hold);
|
|
33
|
+
if (hold !== null)
|
|
34
|
+
last.current = hold;
|
|
35
|
+
const shownOnce = useRef(false);
|
|
36
|
+
const wentAway = useRef(false);
|
|
37
|
+
const asked = hold !== null;
|
|
38
|
+
const [standing, setStanding] = useState(() => ({
|
|
39
|
+
phase: asked ? "hold" : "gone",
|
|
40
|
+
shownAt: Date.now() + (carried ? 0 : HOLD_LATE_MS),
|
|
41
|
+
}));
|
|
42
|
+
if (asked && standing.phase !== "hold") {
|
|
43
|
+
// a wait (again): a hold that was gone is late again; one still standing keeps its clock
|
|
44
|
+
setStanding({
|
|
45
|
+
phase: "hold",
|
|
46
|
+
shownAt: standing.phase === "gone" ? Date.now() + HOLD_LATE_MS : standing.shownAt,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
else if (!asked && standing.phase === "hold") {
|
|
50
|
+
setStanding({ phase: afterWait(Date.now(), standing.shownAt), shownAt: standing.shownAt });
|
|
51
|
+
}
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
if (standing.phase === "floor") {
|
|
54
|
+
const timer = setTimeout(() => setStanding((now) => (now.phase === "floor" ? { ...now, phase: "leave" } : now)), Math.max(0, standing.shownAt + HOLD_FLOOR_MS - Date.now()));
|
|
55
|
+
return () => clearTimeout(timer);
|
|
56
|
+
}
|
|
57
|
+
if (standing.phase === "leave") {
|
|
58
|
+
const timer = setTimeout(() => setStanding((now) => (now.phase === "leave" ? { ...now, phase: "gone" } : now)), leaveMs());
|
|
59
|
+
return () => clearTimeout(timer);
|
|
60
|
+
}
|
|
61
|
+
return undefined;
|
|
62
|
+
}, [standing.phase, standing.shownAt]);
|
|
63
|
+
if (standing.phase === "gone" || last.current === null) {
|
|
64
|
+
if (shownOnce.current)
|
|
65
|
+
wentAway.current = true;
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
shownOnce.current = true;
|
|
69
|
+
return { hold: last.current, leaving: standing.phase === "leave", carried: carried && !wentAway.current };
|
|
70
|
+
}
|
package/dist/ports.d.ts
CHANGED
|
@@ -202,7 +202,7 @@ export interface HostPort {
|
|
|
202
202
|
/** Absent: the worktree guest stays closed and says why. */
|
|
203
203
|
readonly worktree?: WorktreeHostPort | undefined;
|
|
204
204
|
}
|
|
205
|
-
/** An address an `<img>` can load: now, later, or not at all. */
|
|
205
|
+
/** An address an `<img>` or a `<video>` can load: now, later, or not at all. */
|
|
206
206
|
export type AssetUrl = string | null | PromiseLike<string | null>;
|
|
207
207
|
/** Where every stored image and attachment is addressed. */
|
|
208
208
|
export interface AssetSource {
|
|
@@ -224,6 +224,20 @@ export interface AssetSource {
|
|
|
224
224
|
* room should not offer it. The room uses it as the attachment's identity
|
|
225
225
|
* and to decide it can be opened; it never loads it. */
|
|
226
226
|
attachmentAssetUrl(asset: AssetRef): string | null;
|
|
227
|
+
/**
|
|
228
|
+
* An address a `<video src>` can load for one recorded video member (MP4
|
|
229
|
+
* or QuickTime), or null. Optional. The room asks only after the reader
|
|
230
|
+
* presses play, never for a poster or a thumbnail. Answer one only for an
|
|
231
|
+
* address that honours byte ranges: an address served whole, without
|
|
232
|
+
* ranges, plays but cannot seek, and raises no error for the room to fall
|
|
233
|
+
* back on. The daemon serves a member whole, so rosetta's app leaves this
|
|
234
|
+
* door out. A host without this door, one that answers null, or one whose
|
|
235
|
+
* address the element then fails to load is not an error: the room reads
|
|
236
|
+
* the member's bytes through the reading session's client (`readAsset`)
|
|
237
|
+
* and plays an object URL it makes and revokes itself, which seeks.
|
|
238
|
+
* `attachmentAssetUrl` stays the member's identity and is never loaded.
|
|
239
|
+
*/
|
|
240
|
+
mediaAssetUrl?(asset: AssetRef): AssetUrl;
|
|
227
241
|
}
|
|
228
242
|
/** Everything a host hands the room. */
|
|
229
243
|
export interface IngestionPort {
|
|
@@ -27,3 +27,16 @@ button.tr-att__tile { padding: 0; border: 0; color: inherit; cursor: pointer; ap
|
|
|
27
27
|
@container (max-width: 300px) { .tr-att__tile--missing svg, .tr-att__tile--loading svg { display: none; } .tr-att__tile--missing, .tr-att__tile--loading { padding: 10px; } .tr-att figure { flex-basis: 96px; width: 96px; } .tr-att__tile { border-radius: 13px; } }
|
|
28
28
|
.tr-ledger > .tr-attachments { margin-top: 8px; margin-bottom: 12px; }
|
|
29
29
|
.tr-prompt-message + .tr-prompt-message:has(.tr-attachments), .tr-prompt-message:has(.tr-attachments) + .tr-prompt-message { margin-top: 8px; }
|
|
30
|
+
/* §06A · sent videos, 2026-11-12: the rail's height and the video's own shape (16:9 when unmeasured); name and size stand in for a poster. */
|
|
31
|
+
.tr-att { --tr-att-size: 144px; }
|
|
32
|
+
.tr-att figure.tr-att__video { flex: 0 0 auto; width: calc(var(--tr-att-size) * var(--tr-video-aspect, 1.7778)); }
|
|
33
|
+
.tr-att__video .tr-att__tile { aspect-ratio: auto; height: var(--tr-att-size); align-content: center; gap: 4px; padding: 12px; color: var(--vf-text-secondary); font-size: 11px; line-height: 1.4; text-align: center; }
|
|
34
|
+
.tr-att__video .tr-att__tile--missing, .tr-att__video .tr-att__tile--loading { color: var(--vf-text-tertiary); }
|
|
35
|
+
.tr-att__name, .tr-att__facts { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
36
|
+
.tr-att__name { color: var(--vf-text-primary); font-weight: 500; }
|
|
37
|
+
.tr-att__facts { color: var(--vf-text-tertiary); font-variant-numeric: tabular-nums; }
|
|
38
|
+
.tr-att__video .tr-att__tile--playing { padding: 0; background: #000; }
|
|
39
|
+
.tr-att__tile video { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
|
|
40
|
+
.tr-att__tile video:focus-visible { outline: 2px solid var(--vf-select); outline-offset: -2px; }
|
|
41
|
+
@container (max-width: 440px) { .tr-att { --tr-att-size: 112px; } }
|
|
42
|
+
@container (max-width: 300px) { .tr-att { --tr-att-size: 96px; } .tr-att__video .tr-att__tile { padding: 8px; gap: 2px; } }
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* The hold (R10, `components/ui/Hold.tsx`): a wait that fills a place, in the
|
|
2
|
+
host's mark. Rows `1fr | the mark | 1fr`: the mark at the place's centre and
|
|
3
|
+
its words 26 under it — the line 14/1.4 in the ramp's second ink, its count
|
|
4
|
+
4 under that, 12/1.4 in the third, its 17 kept so a count arriving moves
|
|
5
|
+
nothing — in tabular figures. Late, as the veil is (120ms, then the words
|
|
6
|
+
over 180ms and the mark over 400ms); carried, at once. The mark only fades.
|
|
7
|
+
Loading is colourless: the mark's own lights are the hold's only hue. */
|
|
8
|
+
.ah-hold {
|
|
9
|
+
position: absolute; inset: 0; z-index: 6;
|
|
10
|
+
display: grid; grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr); justify-items: center;
|
|
11
|
+
padding: 0 24px; text-align: center; pointer-events: none;
|
|
12
|
+
}
|
|
13
|
+
.ah-hold__mark {
|
|
14
|
+
grid-row: 2; display: flex; align-items: center; justify-content: center; min-height: 44px;
|
|
15
|
+
animation: ah-hold-in 400ms ease 120ms both;
|
|
16
|
+
}
|
|
17
|
+
.ah-hold__words {
|
|
18
|
+
grid-row: 3; display: flex; flex-direction: column; align-items: center; padding-top: 26px;
|
|
19
|
+
animation: ah-hold-in 180ms ease 120ms both;
|
|
20
|
+
}
|
|
21
|
+
.ah-hold__line {
|
|
22
|
+
margin: 0; color: var(--vf-text-secondary);
|
|
23
|
+
font-size: 14px; font-weight: 400; line-height: 1.4; font-variant-numeric: tabular-nums;
|
|
24
|
+
}
|
|
25
|
+
.ah-hold__sub {
|
|
26
|
+
margin: 4px 0 0; min-height: 17px; color: var(--vf-text-tertiary);
|
|
27
|
+
font-size: 12px; line-height: 1.4; font-variant-numeric: tabular-nums;
|
|
28
|
+
}
|
|
29
|
+
.ah-hold__act { margin-top: 18px; pointer-events: auto; }
|
|
30
|
+
.ah-hold[data-carried] .ah-hold__mark,
|
|
31
|
+
.ah-hold[data-carried] .ah-hold__words { animation: none; }
|
|
32
|
+
/* A new line: the words leave (140ms), then the new ones come in (240ms). */
|
|
33
|
+
.ah-hold__words[data-line="out"] { animation: ah-hold-out 140ms ease both; }
|
|
34
|
+
.ah-hold__words[data-line="in"] { animation: ah-hold-in 240ms ease both; }
|
|
35
|
+
/* The wait is over: the hold fades (280ms) before what comes next. */
|
|
36
|
+
.ah-hold[data-leaving] .ah-hold__mark,
|
|
37
|
+
.ah-hold[data-leaving] .ah-hold__words { animation: ah-hold-out 280ms ease both; }
|
|
38
|
+
@keyframes ah-hold-in { from { opacity: 0; } }
|
|
39
|
+
@keyframes ah-hold-out { to { opacity: 0; } }
|
|
40
|
+
@media (prefers-reduced-motion: reduce) {
|
|
41
|
+
.ah-hold__mark { animation-duration: 160ms; }
|
|
42
|
+
.ah-hold__words { animation-duration: 120ms; }
|
|
43
|
+
.ah-hold__words[data-line="out"] { animation-duration: 60ms; }
|
|
44
|
+
.ah-hold__words[data-line="in"] { animation-duration: 120ms; }
|
|
45
|
+
.ah-hold[data-leaving] .ah-hold__mark,
|
|
46
|
+
.ah-hold[data-leaving] .ah-hold__words { animation-duration: 120ms; }
|
|
47
|
+
}
|
package/dist/styles/ingest.css
CHANGED
|
@@ -36,6 +36,20 @@
|
|
|
36
36
|
.ah-ingest-status[data-state="complete"] .ah-ingest-meter i { background: var(--vf-green); }
|
|
37
37
|
.ah-ingest-status[data-state="disconnected"] .ah-ingest-meter i,
|
|
38
38
|
.ah-ingest-status[data-state="search_failed"] .ah-ingest-meter i { background: var(--vf-orange); }
|
|
39
|
+
/* R10 — the card in the host's mark: the mark where IMPORTING HISTORY stood,
|
|
40
|
+
the step beside it; the step's title, its count under it; a colourless 2px
|
|
41
|
+
hairline for a fraction the step knows, none for one it does not, and no
|
|
42
|
+
meter in it sweeps (the mark is the sign of working). The rest is under
|
|
43
|
+
Agent details. Loading is colourless: no step's colour fills it. */
|
|
44
|
+
.ah-ingest-status[data-marked] .ah-ingest-status__eyebrow { font-size: 10px; font-weight: 500; letter-spacing: 0; color: var(--vf-text-tertiary); }
|
|
45
|
+
.ah-ingest-status__mark { display: flex; align-items: center; min-height: 18px; }
|
|
46
|
+
.ah-ingest-status[data-marked] h3 { margin: 10px 0 0; font-size: 13px; font-weight: 500; line-height: 1.35; letter-spacing: -.01em; }
|
|
47
|
+
.ah-ingest-status__sub { margin: 3px 0 0; color: var(--vf-text-secondary); font-size: 11px; line-height: 1.45; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
|
|
48
|
+
.ah-ingest-status[data-marked] .ah-ingest-meter { height: 2px; margin-top: 11px; background: var(--vf-hairline-strong); }
|
|
49
|
+
.ah-ingest-status[data-marked][data-state] .ah-ingest-meter i { background: var(--vf-text-secondary); }
|
|
50
|
+
.ah-ingest-status[data-marked] .ah-ingest-meter[data-indeterminate] { display: none; }
|
|
51
|
+
.ah-ingest-status[data-marked] .ah-ingest-status__agents { margin-top: 10px; }
|
|
52
|
+
.ah-ingest-status[data-marked] .ah-ingest-status__agents > .ah-ingest-status__detail { margin: 6px 0 8px; }
|
|
39
53
|
.ah-cold-start { flex: 1; }
|
|
40
54
|
.ah-cold-start > .ah-ingest-status { width: min(100%, 340px); box-sizing: border-box; margin: 22px auto 0; padding: 18px 20px 10px; }
|
|
41
55
|
.ah-cold-start .ah-ingest-status h3 { font-size: 15px; }
|
package/dist/styles/room.css
CHANGED
|
@@ -492,6 +492,24 @@
|
|
|
492
492
|
.ah-newpill svg { flex: none; }
|
|
493
493
|
.ah-newpill span { overflow: hidden; text-overflow: ellipsis; }
|
|
494
494
|
.ah-newpill i { flex: none; width: 6px; height: 6px; border-radius: 999px; background: var(--vf-green); }
|
|
495
|
+
|
|
496
|
+
/* A button at the side goes to the message before:
|
|
497
|
+
round glass on the island shadow and hairline, 16px in from the transcript
|
|
498
|
+
column's edge, its centre on the Latest pill's (that pill is 36px high, this
|
|
499
|
+
32). It fades over 200ms; hidden, it takes no press. */
|
|
500
|
+
.tr-prompt-jump {
|
|
501
|
+
position: absolute; right: 16px; bottom: calc(var(--composer-h) + 28px); z-index: 6;
|
|
502
|
+
display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
|
|
503
|
+
border: 1px solid var(--vf-hairline-strong); border-radius: 999px;
|
|
504
|
+
background: var(--vf-chrome-surface); backdrop-filter: blur(24px) saturate(1.25);
|
|
505
|
+
box-shadow: var(--vf-shadow-island);
|
|
506
|
+
color: var(--vf-text-primary);
|
|
507
|
+
opacity: 0; visibility: hidden; pointer-events: none;
|
|
508
|
+
transition: opacity 200ms ease, background-color 160ms ease, visibility 0s linear 200ms;
|
|
509
|
+
}
|
|
510
|
+
.tr-prompt-jump[data-visible] { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
|
|
511
|
+
.tr-prompt-jump:hover { background: var(--vf-chrome-solid); }
|
|
512
|
+
.tr-prompt-jump svg { flex: none; }
|
|
495
513
|
.ah-tail-announcement {
|
|
496
514
|
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
|
|
497
515
|
overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibefield/rosetta-room",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "rosetta's History room as a package: the projects, sessions and worktree columns, the panels and charts, and the transcript, behind injected ports. It dials nothing.",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@radix-ui/react-context-menu": "^2.3.7",
|
|
36
36
|
"@radix-ui/react-dialog": "^1.1.23",
|
|
37
37
|
"@radix-ui/react-tooltip": "^1.2.16",
|
|
38
|
-
"@vibefield/rosetta-protocol": "^0.1.
|
|
38
|
+
"@vibefield/rosetta-protocol": "^0.1.7",
|
|
39
39
|
"@tanstack/react-virtual": "^3.14.10",
|
|
40
40
|
"@vibecook/mille": "^0.3.4",
|
|
41
41
|
"@vibecook/mille-ui": "^0.3.4"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"files": [
|
|
51
51
|
"dist"
|
|
52
52
|
],
|
|
53
|
-
"license": "
|
|
53
|
+
"license": "MIT",
|
|
54
54
|
"repository": {
|
|
55
55
|
"type": "git",
|
|
56
56
|
"url": "git+https://github.com/vibefield/rosetta.git",
|