rvlib-shipkit 2.20.0 → 2.21.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 +16 -0
- package/package.json +1 -1
- package/src/checks/SK004-gitignore-policy.check.ts +6 -3
- package/src/cli/cmd_GlobalProcesses.ts +2 -107
- package/src/cli/cmd_Home.ts +1 -1
- package/src/cli/cmd_Overview.ts +2 -1
- package/src/cli/cmd_Releases.ts +39 -3
- package/src/cli/cmd_Review.ts +22 -13
- package/src/cli/cmd_Social.ts +13 -7
- package/src/cli/cmd_Sound.ts +17 -4
- package/src/cli/cmd_Trailer.ts +67 -1
- package/src/cli/registry.ts +2 -1
- package/src/collections/collection-types.ts +1 -1
- package/src/collections/review.ts +23 -4
- package/src/core/layout.ts +6 -0
- package/src/home/gui-app/ShipkitGui.swift +35 -0
- package/src/home/gui-app.ts +1 -0
- package/src/home/pm-switch.ts +112 -0
- package/src/identities/identities.ts +11 -6
- package/src/messages/brief.ts +3 -3
- package/src/messages/score.ts +2 -0
- package/src/releases/add.ts +33 -5
- package/src/releases/before.ts +31 -0
- package/src/releases/from-card.ts +104 -19
- package/src/releases/model.ts +73 -13
- package/src/releases/pictures.ts +29 -8
- package/src/review/http.ts +1 -1
- package/src/review/model.ts +12 -2
- package/src/review/stage-card.ts +1 -1
- package/src/review/store.ts +12 -2
- package/src/review/trailer-desk.ts +19 -0
- package/src/review/trailer-model.ts +65 -0
- package/src/review/trailer-routes.ts +98 -1
- package/src/review/trailer-voices.ts +144 -0
- package/src/review/watchers.ts +58 -1
- package/src/serve/hub-app/benign-errors.ts +22 -0
- package/src/serve/hub-app/hash-route.ts +27 -15
- package/src/serve/hub-app/home-st.ts +8 -0
- package/src/serve/hub-app/hub-app.tsx +2 -0
- package/src/serve/hub-app/project-list.css +7 -2
- package/src/serve/hub-app/project-list.tsx +9 -0
- package/src/serve/hub-app/projects-svc.ts +16 -6
- package/src/serve/hub-app/releases/releases-page.tsx +121 -28
- package/src/serve/hub-app/releases/releases-st.ts +46 -4
- package/src/serve/hub-app/releases.css +30 -3
- package/src/serve/hub-app/repo-sections.ts +1 -1
- package/src/serve/hub-app/repo-st.ts +15 -10
- package/src/serve/hub-app/review/clip-st.ts +3 -1
- package/src/serve/hub-app/review/kit.tsx +3 -3
- package/src/serve/hub-app/review/trailer-page.tsx +31 -6
- package/src/serve/hub-app/review/trailer-st.ts +168 -8
- package/src/serve/hub-app/review/trailer-timeline.tsx +36 -4
- package/src/serve/hub-app/review/trailer-voices-st.ts +370 -0
- package/src/serve/hub-app/review/trailer-voices.tsx +574 -0
- package/src/serve/hub-app/review.css +88 -0
- package/src/serve/hub-app/social/comms-page.tsx +10 -5
- package/src/serve/hub-app/social/next-release.tsx +118 -0
- package/src/serve/hub-app/social/social-model.ts +2 -0
- package/src/serve/hub-app/social/social-st.ts +38 -1
- package/src/serve/hub-app/social.css +8 -0
- package/src/serve/hub-app/tree-build.ts +2 -0
- package/src/serve/project-gutter-route.ts +8 -0
- package/src/serve/project-gutter.ts +4 -2
- package/src/shot/box.ts +33 -12
- package/src/shot/client.ts +1 -1
- package/src/shot/shooter.ts +19 -9
- package/src/social/desk-index.ts +49 -8
- package/src/social/discord-layout.ts +6 -2
- package/src/social/drafts.ts +1 -1
- package/src/social/kinds.ts +3 -2
- package/src/social/load.ts +26 -7
- package/src/social/publish/index.ts +24 -9
- package/src/social/release-stage.ts +133 -29
- package/src/social/routes.ts +2 -1
- package/src/social/stage.ts +39 -20
- package/src/trailer/bed.ts +111 -0
- package/src/trailer/build.ts +57 -38
- package/src/trailer/ffmpeg.ts +6 -0
- package/src/trailer/grammar.ts +23 -2
- package/src/trailer/graph.ts +12 -1
- package/src/trailer/shot-plan.ts +75 -0
- package/src/trailer/shot-state.ts +191 -0
- package/src/trailer/sound/audio.ts +28 -0
- package/src/trailer/sound/brand.ts +53 -3
- package/src/trailer/sound/gen.ts +61 -2
- package/src/trailer/sound/index.ts +25 -11
- package/src/trailer/sound/presets.ts +86 -5
- package/src/trailer/sound/run.ts +1 -1
- package/src/trailer/sound/takes.ts +94 -0
- package/src/trailer/titles.ts +36 -0
- package/src/trailer/url.ts +1 -1
|
@@ -1,45 +1,140 @@
|
|
|
1
|
-
// a repo's releases page (`#page:releases[:<version>]`, wiki tools/shipkit/units.md, The release files):
|
|
2
|
-
// a row, next first; the one shown as its title, its date, then
|
|
3
|
-
//
|
|
1
|
+
// a repo's releases page (`#page:releases[:<version>][?view=notes]`, wiki tools/shipkit/units.md, The release files):
|
|
2
|
+
// the versions on a row, next first; the one shown as its title, its date, then two views of the same parsed release.
|
|
3
|
+
// Cards: each category with its changes as cards, each its picture (its before a tab beside it), its words, its
|
|
4
|
+
// bullets and a link to the review card it came from. Notes: the release as one long page to read, as a GitHub release shows its markdown. Read only:
|
|
5
|
+
// the files are its source
|
|
4
6
|
import { observer } from 'mobx-react-lite'
|
|
5
7
|
import { useEffect } from 'react'
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
+
import { POST_RATINGS } from '../../../identities/rating.ts'
|
|
9
|
+
import { changeKey, isClip, isPrivate, NEXT, picturesOf, ratingOf, type Change, type Picture, type Release } from '../../../releases/model.ts'
|
|
10
|
+
import { hashFor, type ReleasesTab } from '../hash-route.ts'
|
|
11
|
+
import { renderMd } from '../md.ts'
|
|
8
12
|
import type { RepoSt } from '../repo-st.ts'
|
|
9
13
|
import type { ReleasesSt } from './releases-st.ts'
|
|
10
14
|
|
|
11
|
-
const CLIP = /\.(mp4|webm|mov)(\?|$)/i
|
|
12
15
|
|
|
13
|
-
const
|
|
14
|
-
|
|
16
|
+
const TABS: [ReleasesTab, string][] = [
|
|
17
|
+
['cards', 'Cards'],
|
|
18
|
+
['notes', 'Notes'],
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
/** a picture's rating as the private page names it: an unrated one says how it reads */
|
|
22
|
+
const ratingLabel = (p: Picture): string => p.rating ?? 'unrated, reads explicit'
|
|
23
|
+
|
|
24
|
+
/** a change's shots through the hub: a private one never by a public url. With more than one, a tab a rating over it,
|
|
25
|
+
* the safe one first; with a before, two small tabs over it, the after picked first; a file is asked only once its tab
|
|
26
|
+
* is. Every shot's rating on it: the page is private, so it shows every shot */
|
|
27
|
+
const ChangePicture = observer(({ rs, ch }: { rs: ReleasesSt; ch: Change }) => {
|
|
28
|
+
const shots = [...ch.shots].sort((a, b) => POST_RATINGS.indexOf(ratingOf(a.picture)) - POST_RATINGS.indexOf(ratingOf(b.picture)))
|
|
29
|
+
const shot = shots.find((s) => s.picture.url === rs.shots.get(changeKey(ch))) ?? shots[0]
|
|
30
|
+
if (!shot) return null
|
|
31
|
+
const before = shot.before && rs.befores.has(shot.before.url) ? shot.before : null
|
|
32
|
+
const shown = before ?? shot.picture
|
|
33
|
+
return (
|
|
34
|
+
<>
|
|
35
|
+
{shots.length > 1 ? (
|
|
36
|
+
<div className="rel-ratings" role="tablist" aria-label="its pictures by rating">
|
|
37
|
+
{shots.map((s) => (
|
|
38
|
+
<button key={s.picture.url} type="button" role="tab" aria-selected={s === shot} className={`${ratingOf(s.picture)}${s === shot ? ' on' : ''}`} onClick={() => rs.showShot(changeKey(ch), s.picture.url)}>
|
|
39
|
+
{s.picture.rating ?? 'unrated'}
|
|
40
|
+
</button>
|
|
41
|
+
))}
|
|
42
|
+
</div>
|
|
43
|
+
) : null}
|
|
44
|
+
{shot.before ? (
|
|
45
|
+
<div className="rel-sides" role="tablist" aria-label="before and after">
|
|
46
|
+
<button type="button" role="tab" aria-selected={!before} className={`after${before ? '' : ' on'}`} onClick={() => rs.showBefore(shot.before!.url, false)}>
|
|
47
|
+
After
|
|
48
|
+
</button>
|
|
49
|
+
<button type="button" role="tab" aria-selected={!!before} className={`before${before ? ' on' : ''}`} onClick={() => rs.showBefore(shot.before!.url, true)}>
|
|
50
|
+
Before
|
|
51
|
+
</button>
|
|
52
|
+
</div>
|
|
53
|
+
) : null}
|
|
54
|
+
<span className={`rel-rating ${ratingOf(shown)}`} title="what this picture shows: a venue takes it only up to its ceiling">
|
|
55
|
+
{ratingLabel(shown)}
|
|
56
|
+
</span>
|
|
57
|
+
{isClip(shown.url) ? <video key={shown.url} src={rs.src(shown.url)} muted loop autoPlay playsInline /> : <img key={shown.url} src={rs.src(shown.url)} alt={shown.alt} loading="lazy" />}
|
|
58
|
+
</>
|
|
59
|
+
)
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
/** a change's description: markdown, through the hub's safe renderer */
|
|
63
|
+
const ChangeText = ({ ch }: { ch: Change }) => (ch.text ? <div className="rel-text" dangerouslySetInnerHTML={{ __html: renderMd(ch.text) }} /> : null)
|
|
64
|
+
|
|
65
|
+
const Bullets = ({ ch }: { ch: Change }) =>
|
|
66
|
+
ch.bullets.length > 0 ? (
|
|
67
|
+
<ul>
|
|
68
|
+
{ch.bullets.map((b) => (
|
|
69
|
+
<li key={b}>{b}</li>
|
|
70
|
+
))}
|
|
71
|
+
</ul>
|
|
72
|
+
) : null
|
|
73
|
+
|
|
74
|
+
/** one change as a card: its picture, its words, its card; Communications draws the next release with it too */
|
|
75
|
+
export const ChangeCard = observer(({ rs, ch }: { rs: ReleasesSt; ch: Change }) => {
|
|
76
|
+
const pic = ch.shots[0]?.picture
|
|
15
77
|
const card = ch.card ? hashFor({ t: 'review', id: ch.card }) : null
|
|
16
78
|
return (
|
|
17
79
|
<article className="rel-card">
|
|
18
80
|
{pic ? (
|
|
19
81
|
<div className="rel-pic">
|
|
20
|
-
|
|
82
|
+
<ChangePicture rs={rs} ch={ch} />
|
|
21
83
|
</div>
|
|
22
84
|
) : null}
|
|
23
85
|
<div className="rel-words">
|
|
24
86
|
<h3>{ch.title}</h3>
|
|
25
|
-
|
|
26
|
-
{ch
|
|
27
|
-
<ul>
|
|
28
|
-
{ch.bullets.map((b) => (
|
|
29
|
-
<li key={b}>{b}</li>
|
|
30
|
-
))}
|
|
31
|
-
</ul>
|
|
32
|
-
) : null}
|
|
87
|
+
<ChangeText ch={ch} />
|
|
88
|
+
<Bullets ch={ch} />
|
|
33
89
|
<footer>
|
|
34
90
|
{card ? <a href={`#${card}`}>review card</a> : <span>written by hand</span>}
|
|
35
91
|
{ch.commit ? <code>{ch.commit.slice(0, 8)}</code> : null}
|
|
36
|
-
{
|
|
92
|
+
{picturesOf(ch).some((p) => isPrivate(p) && ratingOf(p) === 'safe') ? <span className="rel-private" title="kept private in the Space: sk bump makes it public">private until released</span> : null}
|
|
37
93
|
</footer>
|
|
38
94
|
</div>
|
|
39
95
|
</article>
|
|
40
96
|
)
|
|
41
97
|
})
|
|
42
98
|
|
|
99
|
+
const Cards = observer(({ rs, r }: { rs: ReleasesSt; r: Release }) => (
|
|
100
|
+
<>
|
|
101
|
+
{r.categories.map((c) => (
|
|
102
|
+
<div key={c.name} className="rel-category">
|
|
103
|
+
<h3 className="rel-cat">{c.name}</h3>
|
|
104
|
+
<div className="rel-grid">
|
|
105
|
+
{c.changes.map((ch) => (
|
|
106
|
+
<ChangeCard key={`${ch.card ?? ''}${ch.title}`} rs={rs} ch={ch} />
|
|
107
|
+
))}
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
))}
|
|
111
|
+
</>
|
|
112
|
+
))
|
|
113
|
+
|
|
114
|
+
/** the release as one document in one reading column: each category a heading, each change its title, its words, its
|
|
115
|
+
* bullets, its picture at the column's width; the card and the commit stay on the cards */
|
|
116
|
+
const Notes = observer(({ rs, r }: { rs: ReleasesSt; r: Release }) => (
|
|
117
|
+
<article className="rel-notes">
|
|
118
|
+
{r.categories.map((c) => (
|
|
119
|
+
<section key={c.name}>
|
|
120
|
+
<h2>{c.name}</h2>
|
|
121
|
+
{c.changes.map((ch) => (
|
|
122
|
+
<div key={`${ch.card ?? ''}${ch.title}`} className="rel-note">
|
|
123
|
+
<h3>{ch.title}</h3>
|
|
124
|
+
<ChangeText ch={ch} />
|
|
125
|
+
<Bullets ch={ch} />
|
|
126
|
+
{ch.shots.length > 0 ? (
|
|
127
|
+
<figure>
|
|
128
|
+
<ChangePicture rs={rs} ch={ch} />
|
|
129
|
+
</figure>
|
|
130
|
+
) : null}
|
|
131
|
+
</div>
|
|
132
|
+
))}
|
|
133
|
+
</section>
|
|
134
|
+
))}
|
|
135
|
+
</article>
|
|
136
|
+
))
|
|
137
|
+
|
|
43
138
|
export const ReleasesPage = observer(({ app }: { app: RepoSt }) => {
|
|
44
139
|
const rs = app.releases
|
|
45
140
|
useEffect(() => {
|
|
@@ -77,16 +172,14 @@ export const ReleasesPage = observer(({ app }: { app: RepoSt }) => {
|
|
|
77
172
|
<p className="rel-hint">
|
|
78
173
|
{r.version === NEXT ? `being filled${r.kind ? `, a ${r.kind} release` : ', its kind unsaid'}` : r.date}, {changes} change{changes === 1 ? '' : 's'}
|
|
79
174
|
</p>
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
</div>
|
|
89
|
-
))}
|
|
175
|
+
<div className="rtabs rel-tabs">
|
|
176
|
+
{TABS.map(([t, label]) => (
|
|
177
|
+
<button key={t} type="button" className={`rtab${rs.tab === t ? ' on' : ''}`} onClick={() => rs.showTab(t)}>
|
|
178
|
+
{label}
|
|
179
|
+
</button>
|
|
180
|
+
))}
|
|
181
|
+
</div>
|
|
182
|
+
{rs.tab === 'notes' ? <Notes rs={rs} r={r} /> : <Cards rs={rs} r={r} />}
|
|
90
183
|
</section>
|
|
91
184
|
)}
|
|
92
185
|
</div>
|
|
@@ -1,17 +1,36 @@
|
|
|
1
1
|
// a repo's releases page as state (wiki tools/shipkit/units.md, The release files): every release file read from the
|
|
2
|
-
// hub, the version shown in the address
|
|
3
|
-
// written by an approval, `sk releases add` or a
|
|
2
|
+
// hub, the version shown in the address, its view (cards or notes) from the address or this browser's last pick. Read
|
|
3
|
+
// when the page opens and when the window comes back; the files are written by an approval, `sk releases add` or a
|
|
4
|
+
// hand, so the page never writes
|
|
4
5
|
import { makeAutoObservable, runInAction } from 'mobx'
|
|
5
6
|
import { pictureRoute, type Release } from '../../../releases/model.ts'
|
|
7
|
+
import type { ReleasesTab } from '../hash-route.ts'
|
|
6
8
|
import type { ReleasesView } from '../../../releases/routes.ts'
|
|
7
9
|
import { reach } from '../reach.ts'
|
|
8
10
|
import type { RepoSt } from '../repo-st.ts'
|
|
9
11
|
|
|
12
|
+
/** the view this browser picked last, for every repo's page */
|
|
13
|
+
const TAB_KEY = 'shipkit.releases.tab'
|
|
14
|
+
|
|
15
|
+
function keptTab(): ReleasesTab {
|
|
16
|
+
try {
|
|
17
|
+
return globalThis.localStorage?.getItem(TAB_KEY) === 'notes' ? 'notes' : 'cards'
|
|
18
|
+
} catch {
|
|
19
|
+
return 'cards'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
10
23
|
export class ReleasesSt {
|
|
11
24
|
view: ReleasesView | null = null
|
|
12
25
|
error: string | null = null
|
|
13
26
|
/** the version the address names, null for the first */
|
|
14
27
|
version: string | null = null
|
|
28
|
+
/** the view shown: the address's when it names one, else this browser's last pick */
|
|
29
|
+
tab: ReleasesTab = keptTab()
|
|
30
|
+
/** the shot each change shows, its picture's url by `changeKey`: unset, its first by rating (the safe one) */
|
|
31
|
+
shots = new Map<string, string>()
|
|
32
|
+
/** the changes showing their before, by `sideKey`: every other change shows its after, the tab picked first */
|
|
33
|
+
befores = new Set<string>()
|
|
15
34
|
private started = 0
|
|
16
35
|
|
|
17
36
|
constructor(private readonly st: RepoSt) {
|
|
@@ -52,15 +71,38 @@ export class ReleasesSt {
|
|
|
52
71
|
}
|
|
53
72
|
}
|
|
54
73
|
|
|
55
|
-
|
|
74
|
+
/** a view null keeps the one shown */
|
|
75
|
+
select(version: string | null, tab: ReleasesTab | null = null): void {
|
|
56
76
|
this.version = version
|
|
77
|
+
if (tab) this.tab = tab
|
|
57
78
|
}
|
|
58
79
|
|
|
59
|
-
/** a click on a version: the address follows */
|
|
80
|
+
/** a click on a version: the address follows, the view stays */
|
|
60
81
|
show(version: string): void {
|
|
61
82
|
this.st.showReleases(version)
|
|
62
83
|
}
|
|
63
84
|
|
|
85
|
+
/** a click on a view: kept for this browser, the address follows */
|
|
86
|
+
showTab(tab: ReleasesTab): void {
|
|
87
|
+
try {
|
|
88
|
+
globalThis.localStorage?.setItem(TAB_KEY, tab)
|
|
89
|
+
} catch {
|
|
90
|
+
/* private window: the pick lasts the tab */
|
|
91
|
+
}
|
|
92
|
+
this.st.showReleases(this.version, tab)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** a change's picture tab: its before or its after, the same in both views */
|
|
96
|
+
showBefore(key: string, on: boolean): void {
|
|
97
|
+
if (on) this.befores.add(key)
|
|
98
|
+
else this.befores.delete(key)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** a change's rating tab: the shot it shows */
|
|
102
|
+
showShot(change: string, url: string): void {
|
|
103
|
+
this.shots.set(change, url)
|
|
104
|
+
}
|
|
105
|
+
|
|
64
106
|
/** a picture's address on this hub */
|
|
65
107
|
src(url: string): string {
|
|
66
108
|
const path = pictureRoute(url)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* the releases page (hub-app/releases/, wiki tools/shipkit/units.md, The release files): white cards on the gray
|
|
2
|
-
ground, the hub's tokens; each change a card, its picture on top */
|
|
2
|
+
ground, the hub's tokens; each change a card, its picture on top, or the notes view's one reading column */
|
|
3
3
|
.rel-page{flex:1;min-width:0;max-width:1280px;display:flex;flex-direction:column;gap:var(--s4);font-size:14px;line-height:1.45}
|
|
4
4
|
.rel-page header{display:flex;flex-wrap:wrap;gap:var(--s3);align-items:center}
|
|
5
5
|
.rel-page h1{font-size:20px;margin:0}
|
|
@@ -11,11 +11,38 @@
|
|
|
11
11
|
.rel-cat{font-size:13px;text-transform:uppercase;letter-spacing:.08em;color:var(--dim);margin:0}
|
|
12
12
|
.rel-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:var(--s3)}
|
|
13
13
|
.rel-card{background:var(--panel);border:1px solid var(--line);border-radius:10px;overflow:hidden;display:flex;flex-direction:column;min-width:0}
|
|
14
|
-
.rel-pic{background:var(--line);aspect-ratio:16/10;display:flex;align-items:center;justify-content:center}
|
|
14
|
+
.rel-pic{background:var(--line);aspect-ratio:16/10;display:flex;align-items:center;justify-content:center;position:relative}
|
|
15
15
|
.rel-pic img,.rel-pic video{width:100%;height:100%;object-fit:cover;display:block}
|
|
16
|
+
/* a change with a before: two small tabs over its picture, the after green and picked first, the before red */
|
|
17
|
+
.rel-sides{position:absolute;top:var(--s2);left:var(--s2);display:flex;gap:2px;padding:2px;border-radius:7px;background:var(--panel);border:1px solid var(--line);box-shadow:0 2px 8px var(--shadow);z-index:1}
|
|
18
|
+
.rel-sides button{font:inherit;font-size:11px;font-weight:600;line-height:1;padding:4px 8px;border-radius:5px;border:1px solid transparent;background:none;color:var(--dim);cursor:pointer}
|
|
19
|
+
.rel-sides button:hover{color:var(--ink)}
|
|
20
|
+
.rel-sides button.after.on{background:var(--ok);border-color:var(--ok);color:var(--panel)}
|
|
21
|
+
.rel-sides button.before.on{background:var(--red);border-color:var(--red);color:var(--panel)}
|
|
22
|
+
/* a change with a shot a rating: a tab each over its top right corner, the safe one first; every shot names its rating */
|
|
23
|
+
.rel-ratings{position:absolute;top:var(--s2);right:var(--s2);display:flex;gap:2px;padding:2px;border-radius:7px;background:var(--panel);border:1px solid var(--line);box-shadow:0 2px 8px var(--shadow);z-index:1}
|
|
24
|
+
.rel-ratings button{font:inherit;font-size:11px;font-weight:600;line-height:1;padding:4px 8px;border-radius:5px;border:1px solid transparent;background:none;color:var(--dim);cursor:pointer}
|
|
25
|
+
.rel-ratings button.on{background:var(--ink);border-color:var(--ink);color:var(--panel)}
|
|
26
|
+
.rel-rating{position:absolute;bottom:var(--s2);left:var(--s2);z-index:1;font-size:11px;font-weight:600;line-height:1;padding:4px 8px;border-radius:999px;background:var(--panel);border:1px solid var(--line);color:var(--ok)}
|
|
27
|
+
.rel-rating.mild{color:var(--warn);border-color:var(--warn)}
|
|
28
|
+
.rel-rating.explicit{color:var(--red);border-color:var(--red)}
|
|
29
|
+
.rel-note figure{position:relative}
|
|
16
30
|
.rel-words{padding:var(--s3) var(--s4);display:grid;gap:var(--s2)}
|
|
17
31
|
.rel-words h3{margin:0;font-size:15px}
|
|
18
|
-
.rel-
|
|
32
|
+
.rel-text{display:grid;gap:var(--s2)}
|
|
33
|
+
.rel-text p{margin:0}
|
|
34
|
+
.rel-tabs{margin-top:var(--s3)}
|
|
35
|
+
.rel-tabs .rtab{font-size:13px;cursor:pointer}
|
|
36
|
+
/* the notes: one reading column, as a GitHub release shows its markdown; pictures at the column's width */
|
|
37
|
+
.rel-notes{max-width:720px;margin-top:var(--s4);background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:var(--s4) var(--s4) var(--s4) var(--s4);display:grid;gap:var(--s4);font-size:15px;line-height:1.6}
|
|
38
|
+
.rel-notes section{display:grid;gap:var(--s4);padding:var(--s2) var(--s3) 0}
|
|
39
|
+
.rel-notes section+section{padding-top:var(--s4)}
|
|
40
|
+
.rel-notes h2{font-size:20px;margin:0;padding-bottom:var(--s2);border-bottom:1px solid var(--line)}
|
|
41
|
+
.rel-note{padding-top:var(--s2)}
|
|
42
|
+
.rel-note h3{font-size:16px;margin:0 0 var(--s2)}
|
|
43
|
+
.rel-note ul{margin:var(--s2) 0 0;padding-left:var(--s4)}
|
|
44
|
+
.rel-note figure{margin:var(--s3) 0 0}
|
|
45
|
+
.rel-note figure img,.rel-note figure video{display:block;width:100%;height:auto;border-radius:8px;border:1px solid var(--line)}
|
|
19
46
|
.rel-words ul{margin:0;padding-left:var(--s4)}
|
|
20
47
|
.rel-words footer{display:flex;flex-wrap:wrap;gap:var(--s3);align-items:center;font-size:12px;color:var(--dim)}
|
|
21
48
|
.rel-words footer a{color:var(--accent)}
|
|
@@ -134,7 +134,7 @@ export function repoSections(app: RepoSt): RepoSection[] {
|
|
|
134
134
|
// review and trailer sit right under the readme: the pages he answers
|
|
135
135
|
out.push(line('review', 'the review cards agents send you: approve, fix, reject, circle a detail', counted(res.filter((r) => r.type === 'card').length, 'warn'),
|
|
136
136
|
unless(has(REVIEW_COL), 'no review card yet: an agent sends one with sk review add')))
|
|
137
|
-
out.push(line('trailer', 'the trailer cuts: play one with its timeline, pin a note on any frame',
|
|
137
|
+
out.push(line('trailer', 'the trailer cuts: play one with its timeline, pin a note on any frame, record the lines your own voice reads', counted(res.filter((r) => r.type === 'voice').length, 'warn'),
|
|
138
138
|
unless(has(TRAILER_COL), 'no trailer: write trailer/<name>/main.trailer, then sk trailer')))
|
|
139
139
|
out.push(line('stores', 'the store pages (Steam, itch): every text to paste, every picture to upload, a note on each', none,
|
|
140
140
|
unless(has(STORES_COL), 'no store page: write .shipkit/steam/store.md or .shipkit/itch/listing.md')))
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { makeAutoObservable, reaction } from 'mobx'
|
|
9
9
|
import { ClockSvc } from './clock-svc.ts'
|
|
10
10
|
import { ColsSvc } from './cols-svc.ts'
|
|
11
|
-
import { canonicalSel, currentHash, hashFor, parseHash, selOf, type CheckOwner, type HashSel } from './hash-route.ts'
|
|
11
|
+
import { canonicalSel, currentHash, hashFor, parseHash, selOf, type CheckOwner, type HashSel, type ReleasesTab } from './hash-route.ts'
|
|
12
12
|
import { ComfySvc } from './comfy-svc.ts'
|
|
13
13
|
import { HealthSvc } from './health-svc.ts'
|
|
14
14
|
import { ReadmeSvc } from './readme-svc.ts'
|
|
@@ -363,6 +363,10 @@ export class RepoSt {
|
|
|
363
363
|
const [trailer = null, cut = null] = r.id.replace(/^cut:/, '').split('/')
|
|
364
364
|
return this.showTrailer(trailer, cut)
|
|
365
365
|
}
|
|
366
|
+
if (r.type === 'voice') {
|
|
367
|
+
const [trailer = null, key = ''] = r.id.replace(/^voice:/, '').split('/')
|
|
368
|
+
return this.showTrailer(trailer, null, null, null, key)
|
|
369
|
+
}
|
|
366
370
|
const assetId = r.id.replace(/^media:/, '')
|
|
367
371
|
if (r.collection === 'media' && this.media.assets.some((a) => a.id === assetId)) {
|
|
368
372
|
this.selectAsset(assetId)
|
|
@@ -432,9 +436,9 @@ export class RepoSt {
|
|
|
432
436
|
return (this.sel?.t === 'review' && this.review.key(e)) || (this.sel?.t === 'trailer' && this.trailer.key(e)) || (this.sel?.t === 'stores' && this.stores.key(e)) || (this.sel?.t === 'veille' && this.veille.key(e)) || (this.sel?.t === 'comms' && this.social.key(e, 'comms')) || (this.sel?.t === 'social' && this.social.key(e, 'social'))
|
|
433
437
|
}
|
|
434
438
|
/** the trailer page on a trailer folder and one of its cuts, null for the first */
|
|
435
|
-
showTrailer(trailer: string | null, cut: string | null, note: string | null = null, filter: 'open' | 'all' | null = null): void {
|
|
436
|
-
this.trailer.select(trailer, cut, note, filter)
|
|
437
|
-
this.setSel({ t: 'trailer', trailer, cut, note, filter })
|
|
439
|
+
showTrailer(trailer: string | null, cut: string | null, note: string | null = null, filter: 'open' | 'all' | null = null, voices?: string): void {
|
|
440
|
+
this.trailer.select(trailer, cut, note, filter, voices)
|
|
441
|
+
this.setSel({ t: 'trailer', trailer, cut, note, filter, ...(voices !== undefined ? { voices } : {}) })
|
|
438
442
|
if (this.polling) this.trailer.start()
|
|
439
443
|
}
|
|
440
444
|
/** the stores page on a store, null for the first; `asset` a thing of it to scroll to, its note box open */
|
|
@@ -443,11 +447,12 @@ export class RepoSt {
|
|
|
443
447
|
this.setSel({ t: 'stores', store, ...(asset ? { asset } : {}) })
|
|
444
448
|
}
|
|
445
449
|
|
|
446
|
-
/** the releases page on a version (`next` or X.Y.Z), null for the first
|
|
447
|
-
|
|
448
|
-
|
|
450
|
+
/** the releases page on a version (`next` or X.Y.Z), null for the first, in a view, null for the one shown; its
|
|
451
|
+
* versions are rows under the section */
|
|
452
|
+
showReleases(version: string | null, tab: ReleasesTab | null = null): void {
|
|
453
|
+
this.releases.select(version, tab)
|
|
449
454
|
this.tree.reveal(sectionKey('releases'))
|
|
450
|
-
this.setSel({ t: 'releases', version })
|
|
455
|
+
this.setSel({ t: 'releases', version, ...(this.releases.tab === 'notes' ? { tab: 'notes' as const } : {}) })
|
|
451
456
|
}
|
|
452
457
|
|
|
453
458
|
/** the messages page on a tab, `run` the run it scores by, null for the newest */
|
|
@@ -516,9 +521,9 @@ export class RepoSt {
|
|
|
516
521
|
case 'when': return this.showWhen()
|
|
517
522
|
case 'checks': return this.showChecks(sel.from)
|
|
518
523
|
case 'review': return this.showReview(sel.id, sel.q ?? '')
|
|
519
|
-
case 'trailer': return this.showTrailer(sel.trailer, sel.cut, sel.note ?? null, sel.filter ?? null)
|
|
524
|
+
case 'trailer': return this.showTrailer(sel.trailer, sel.cut, sel.note ?? null, sel.filter ?? null, sel.voices)
|
|
520
525
|
case 'stores': return this.showStores(sel.store, sel.asset ?? null)
|
|
521
|
-
case 'releases': return this.showReleases(sel.version)
|
|
526
|
+
case 'releases': return this.showReleases(sel.version, sel.tab ?? null)
|
|
522
527
|
case 'messages': return this.showMessages(sel.tab, sel.run ?? null)
|
|
523
528
|
case 'veille': return this.showVeille(sel.post, sel.q ?? '')
|
|
524
529
|
case 'comms': return this.showComms(sel.draft, sel.part ?? null, sel.q ?? '')
|
|
@@ -171,12 +171,14 @@ export class ClipSt {
|
|
|
171
171
|
|
|
172
172
|
/** a video of the view on screen; it returns its release */
|
|
173
173
|
attach(el: ClipEl): () => void {
|
|
174
|
+
// a video playing already leads; alone, the clock's time (a source swapped mid play starts its element at 0)
|
|
175
|
+
const lead = this.els[0]
|
|
174
176
|
this.els.push(el)
|
|
175
177
|
owners.set(el, this)
|
|
176
178
|
el.muted = !this.sound || this.els[0] !== el
|
|
177
179
|
el.volume = heard.level
|
|
178
180
|
el.playbackRate = this.rate
|
|
179
|
-
el.currentTime = this.paused ? this.time :
|
|
181
|
+
el.currentTime = this.paused || !lead ? this.time : lead.currentTime
|
|
180
182
|
if (this.paused) el.pause()
|
|
181
183
|
else this.start(el)
|
|
182
184
|
if (this.raf === 0 && typeof requestAnimationFrame === 'function') this.raf = requestAnimationFrame(this.follow)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { observer } from 'mobx-react-lite'
|
|
4
4
|
import { useEffect, useState } from 'react'
|
|
5
5
|
import type { ThreadRow } from '../../../review/cells.ts'
|
|
6
|
-
import type
|
|
6
|
+
import { listenWords, type ReviewStatus, type ShownStatus, type Side } from '../../../review/model.ts'
|
|
7
7
|
import type { ReviewSt } from './review-st.ts'
|
|
8
8
|
|
|
9
9
|
/** a status's tone, as a class review.css colours: its tint, its line, its badge */
|
|
@@ -84,7 +84,7 @@ export const Rework = ({ r }: { r: ThreadRow['rework'] }) => {
|
|
|
84
84
|
)
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
/** who listens: the
|
|
87
|
+
/** who listens, in words: the live `sk review watch` processes that read his answer on these cards; their pids only in the tooltip */
|
|
88
88
|
export const Listeners = observer(({ rv, heads }: { rv: ReviewSt; heads: readonly { lane?: string | undefined; session?: string | undefined }[] }) => {
|
|
89
89
|
const ws = rv.listenersOf(heads)
|
|
90
90
|
const on = ws.length > 0
|
|
@@ -97,7 +97,7 @@ export const Listeners = observer(({ rv, heads }: { rv: ReviewSt; heads: readonl
|
|
|
97
97
|
: 'no sk review watch reads these cards: your answer will wait'
|
|
98
98
|
}
|
|
99
99
|
>
|
|
100
|
-
◉ {
|
|
100
|
+
◉ {listenWords(ws)}
|
|
101
101
|
</span>
|
|
102
102
|
)
|
|
103
103
|
})
|
|
@@ -13,9 +13,10 @@ import type { RepoSt } from '../repo-st.ts'
|
|
|
13
13
|
import { keepFocus } from './kit.tsx'
|
|
14
14
|
import { PANEL, PhoneTop } from './review-page.tsx'
|
|
15
15
|
import { ClipSound, DragBox, dragBox, NoteRect, pct } from './review-views.tsx'
|
|
16
|
-
import { hueOf, secsOf, ShotCards, TrailerTimeline } from './trailer-timeline.tsx'
|
|
16
|
+
import { hueOf, secsOf, ShotCards, ShotSummary, TrailerTimeline } from './trailer-timeline.tsx'
|
|
17
17
|
import { captionText, type PlacedNote, type TrailerSt } from './trailer-st.ts'
|
|
18
18
|
import { Caret } from '../icons.tsx'
|
|
19
|
+
import { VoiceOpen, VoicesButton, VoicesList } from './trailer-voices.tsx'
|
|
19
20
|
|
|
20
21
|
export const TrailerPage = observer(({ app }: { app: RepoSt }) => {
|
|
21
22
|
const tr = app.trailer
|
|
@@ -23,12 +24,13 @@ export const TrailerPage = observer(({ app }: { app: RepoSt }) => {
|
|
|
23
24
|
tr.start()
|
|
24
25
|
return () => tr.stop()
|
|
25
26
|
}, [tr])
|
|
27
|
+
const voices = tr.voices.on
|
|
26
28
|
if (app.review.phone.on)
|
|
27
29
|
return (
|
|
28
30
|
<div className="tr-phone">
|
|
29
31
|
<PhoneTop app={app} />
|
|
30
|
-
<PlayerColumn tr={tr} app={app} />
|
|
31
|
-
<NotesColumn tr={tr} />
|
|
32
|
+
{voices ? <VoiceOpen tr={tr} /> : <PlayerColumn tr={tr} app={app} />}
|
|
33
|
+
{voices ? <VoicesList tr={tr} /> : <NotesColumn tr={tr} />}
|
|
32
34
|
<CutList tr={tr} />
|
|
33
35
|
</div>
|
|
34
36
|
)
|
|
@@ -39,11 +41,11 @@ export const TrailerPage = observer(({ app }: { app: RepoSt }) => {
|
|
|
39
41
|
</Panel>
|
|
40
42
|
<Separator className="rsep" />
|
|
41
43
|
<Panel id="trailer-player" defaultSize="57%" minSize={420} className="rv-pane" style={PANEL}>
|
|
42
|
-
<div className="rv-scroll"
|
|
44
|
+
<div className="rv-scroll">{voices ? <VoiceOpen tr={tr} /> : <PlayerColumn tr={tr} app={app} />}</div>
|
|
43
45
|
</Panel>
|
|
44
46
|
<Separator className="rsep" />
|
|
45
47
|
<Panel id="trailer-notes" defaultSize="28%" minSize={300} className="rv-pane" style={PANEL}>
|
|
46
|
-
<NotesColumn tr={tr} />
|
|
48
|
+
{voices ? <VoicesList tr={tr} /> : <NotesColumn tr={tr} />}
|
|
47
49
|
</Panel>
|
|
48
50
|
</KeptCols>
|
|
49
51
|
)
|
|
@@ -66,12 +68,13 @@ const CutList = observer(({ tr }: { tr: TrailerSt }) => (
|
|
|
66
68
|
<div className="tr-cuts">
|
|
67
69
|
{tr.deskError ? <div className="rv-err">{tr.deskError}</div> : null}
|
|
68
70
|
{tr.trailers.length > 1 ? (
|
|
69
|
-
<select value={tr.trailer?.id ?? ''} onChange={(e) => tr.pick(e.currentTarget.value, null)}>
|
|
71
|
+
<select value={tr.trailer?.id ?? ''} onChange={(e) => tr.pick(e.currentTarget.value, null)} title="the trailer folder: trailer/<name>/, its cuts below">
|
|
70
72
|
{tr.trailers.map((t) => <option key={t.id} value={t.id}>{t.id}</option>)}
|
|
71
73
|
</select>
|
|
72
74
|
) : (
|
|
73
75
|
<div className="tr-trailername">🎬 {tr.trailer?.id ?? 'trailer'}</div>
|
|
74
76
|
)}
|
|
77
|
+
{tr.trailer ? <VoicesButton tr={tr} /> : null}
|
|
75
78
|
{!tr.desk && !tr.deskError ? <div className="rv-empty"><span className="spin" /> reading the cuts…</div> : null}
|
|
76
79
|
{tr.desk && tr.trailers.length === 0 ? <div className="rv-empty">No trailer under trailer/: write trailer/<name>/main.trailer, then sk trailer.</div> : null}
|
|
77
80
|
<div className="tr-cutrows">
|
|
@@ -153,7 +156,9 @@ export const PlayerColumn = observer(({ tr, app, host, under }: { tr: TrailerSt;
|
|
|
153
156
|
) : null}
|
|
154
157
|
<Player tr={tr} host={host} />
|
|
155
158
|
<Transport tr={tr} app={app} />
|
|
159
|
+
{tr.voiceError ? <div className="rv-err">{tr.heard === 'takes' ? 'my voice' : tr.ownHere?.standin}: {tr.voiceError}</div> : null}
|
|
156
160
|
<NowLine tr={tr} />
|
|
161
|
+
<ShotSummary st={tr} />
|
|
157
162
|
<TrailerTimeline st={tr} />
|
|
158
163
|
{under}
|
|
159
164
|
<ShotCards st={tr} />
|
|
@@ -255,6 +260,7 @@ const Transport = observer(({ tr, app }: { tr: TrailerSt; app: RepoSt }) => {
|
|
|
255
260
|
</div>
|
|
256
261
|
<span className="sp" />
|
|
257
262
|
<span className="seg">{RATES.map((r) => <button key={r} className={c.rate === r ? 'on' : ''} onMouseDown={keepFocus} onClick={() => c.setRate(r)}>×{r}</button>)}</span>
|
|
263
|
+
<VoiceToggle tr={tr} />
|
|
258
264
|
<ClipSound clip={c} keyHint="M" />
|
|
259
265
|
{href && file ? <a className="tr-file" href={href} title={`open ${file} in the editor`}>{file.split('/').pop()}</a> : null}
|
|
260
266
|
{tr.shown ? <button className="tr-tbtn" title={`show ${tr.cut?.files.video ?? 'the render'} in the Finder`} aria-label="show the render in the Finder" onMouseDown={keepFocus} onClick={() => void tr.reveal()}>📂</button> : null}
|
|
@@ -263,6 +269,25 @@ const Transport = observer(({ tr, app }: { tr: TrailerSt; app: RepoSt }) => {
|
|
|
263
269
|
)
|
|
264
270
|
})
|
|
265
271
|
|
|
272
|
+
/** the whole cut in his voice or its standin's, on a working cut with lines of his voice; a side being made holds the
|
|
273
|
+
* play until it is */
|
|
274
|
+
const VoiceToggle = observer(({ tr }: { tr: TrailerSt }) => {
|
|
275
|
+
const o = tr.ownHere
|
|
276
|
+
if (!o) return null
|
|
277
|
+
const side = (s: 'standin' | 'takes', label: string) => (
|
|
278
|
+
<button className={tr.heard === s ? 'on' : ''} onMouseDown={keepFocus} onClick={() => tr.setVoice(s)}>{label}</button>
|
|
279
|
+
)
|
|
280
|
+
return (
|
|
281
|
+
<>
|
|
282
|
+
<span className="tv-hear" title={`the whole cut read by ${o.standin}, or by ${o.who}: his takes, ${o.standin} on the lines he has not recorded`}>
|
|
283
|
+
{side('standin', o.standin)}
|
|
284
|
+
{side('takes', 'my voice')}
|
|
285
|
+
</span>
|
|
286
|
+
{tr.voicing ? <span className="tr-dim tr-small"><span className="spin" /> making…</span> : null}
|
|
287
|
+
</>
|
|
288
|
+
)
|
|
289
|
+
})
|
|
290
|
+
|
|
266
291
|
/** what is on screen: the section, the shot and the time into it, the caption shown */
|
|
267
292
|
const NowLine = observer(({ tr }: { tr: TrailerSt }) => {
|
|
268
293
|
const s = tr.shot
|