rvlib-shipkit 2.16.0 → 2.17.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/CHANGELOG.md +21 -0
- package/package.json +1 -1
- package/src/assets/kit-config.ts +19 -1
- package/src/assets/run-assets.ts +18 -0
- package/src/cli/cmd_Review.ts +26 -7
- package/src/cli/cmd_Secret.ts +127 -0
- package/src/cli/cmd_Wiki.ts +4 -4
- package/src/cli/family-pages.ts +1 -0
- package/src/cli/registry.ts +4 -0
- package/src/core/discover-checks.ts +18 -5
- package/src/core/scope.ts +42 -0
- package/src/home/beat.ts +30 -0
- package/src/home/home-paths.ts +1 -0
- package/src/home/pm.ts +3 -1
- package/src/home/run-daemon.ts +5 -2
- package/src/home/run-web.ts +4 -2
- package/src/home/supervise.ts +18 -1
- package/src/repo-config.ts +3 -0
- package/src/review/auto.ts +7 -2
- package/src/review/cells.ts +1 -1
- package/src/review/format.ts +2 -2
- package/src/review/model.ts +57 -13
- package/src/review/previews.ts +1 -1
- package/src/review/routes.ts +11 -0
- package/src/review/store.ts +18 -10
- package/src/secrets/list.ts +40 -0
- package/src/serve/hub-app/hub-app.tsx +28 -2
- package/src/serve/hub-app/icons.tsx +1 -0
- package/src/serve/hub-app/identities-view.tsx +1 -1
- package/src/serve/hub-app/kept-cols.tsx +47 -8
- package/src/serve/hub-app/layout-st.ts +37 -3
- package/src/serve/hub-app/review/review-kit.ts +12 -0
- package/src/serve/hub-app/review/review-page.tsx +1 -1
- package/src/serve/hub-app/review/review-st.ts +63 -4
- package/src/serve/hub-app/review/review-thread.tsx +1 -0
- package/src/serve/hub-app/review/review-views.tsx +215 -63
- package/src/serve/hub-app/review/thread-st.ts +82 -16
- package/src/serve/hub-app/review/trailer-page.tsx +1 -1
- package/src/serve/hub-app/review.css +41 -2
- package/src/serve/hub-app/social/comms-page.tsx +1 -1
- package/src/serve/hub-app/social/social-page.tsx +1 -1
- package/src/serve/hub-app/stores/stores-page.tsx +1 -1
- package/src/serve/hub-app/veille/veille-page.tsx +1 -1
- package/src/shipkit.ts +1 -1
- package/src/shot/box.ts +9 -1
- package/src/shot/shooter.ts +24 -2
- package/src/social/load.ts +3 -1
- package/src/trailer/grammar.ts +2 -0
- package/src/trailer/sound/presets.ts +3 -3
- package/src/trailer/sound/run.ts +22 -14
- package/src/trailer/titles.ts +1 -1
- package/src/wiki/lint-md.ts +4 -2
- package/src/wiki/run-wiki.ts +22 -6
- package/src/wiki/scan-md.ts +3 -1
|
@@ -6,6 +6,18 @@ import { reach } from '../reach.ts'
|
|
|
6
6
|
export const ZOOMS = ['fit', '1', '1.5', '2'] as const
|
|
7
7
|
export type Zoom = (typeof ZOOMS)[number]
|
|
8
8
|
|
|
9
|
+
/** how a gallery draws: a side list of its images with the picked one large, one image a row at full width, or the
|
|
10
|
+
* wrapping grid of tiles at the slider's height */
|
|
11
|
+
export const GALLERY_MODES = ['tabs', 'list', 'grid'] as const
|
|
12
|
+
export type GalleryMode = (typeof GALLERY_MODES)[number]
|
|
13
|
+
/** a large gallery image fills the column's width (it scrolls), or fits the screen whole */
|
|
14
|
+
export const GALLERY_FITS = ['width', 'screen'] as const
|
|
15
|
+
export type GalleryFit = (typeof GALLERY_FITS)[number]
|
|
16
|
+
|
|
17
|
+
/** a gallery tile's image height in px: his slider's range and its start; past THUMB a tile reads the fit preview, the
|
|
18
|
+
* list thumb is too small for it */
|
|
19
|
+
export const TILE_H = { min: 80, max: 480, start: 170, thumb: 220 } as const
|
|
20
|
+
|
|
9
21
|
/** what a reload must not lose: a blocked storage only loses persistence */
|
|
10
22
|
export const kept = {
|
|
11
23
|
get(k: string): string | null {
|
|
@@ -33,7 +33,7 @@ export const ReviewPage = observer(({ app }: { app: RepoSt }) => {
|
|
|
33
33
|
return (
|
|
34
34
|
<>
|
|
35
35
|
<Toast rv={rv} />
|
|
36
|
-
<KeptCols id="review">
|
|
36
|
+
<KeptCols id="review" folds={{ left: 'review-list' }} layout={app.home.layout}>
|
|
37
37
|
<Panel id="review-list" defaultSize="24%" minSize={180} className="rv-pane" style={PANEL}>
|
|
38
38
|
<ReviewList rv={rv} />
|
|
39
39
|
</Panel>
|
|
@@ -8,7 +8,7 @@ import { MOVE_LABEL, pasteBlock, STATUS_LABEL, type Move, type ShownStatus, type
|
|
|
8
8
|
import type { PasteHosts } from '../../../review/paste.ts'
|
|
9
9
|
import type { Role } from '../../../review/role.ts'
|
|
10
10
|
import type { RepoSt } from '../repo-st.ts'
|
|
11
|
-
import { copyText, etagLoader, kept, postJson, ZOOMS, type EtagLoader, type Zoom } from './review-kit.ts'
|
|
11
|
+
import { copyText, etagLoader, GALLERY_FITS, GALLERY_MODES, kept, postJson, TILE_H, ZOOMS, type EtagLoader, type GalleryFit, type GalleryMode, type Zoom } from './review-kit.ts'
|
|
12
12
|
import { ThreadSt, type Draft } from './thread-st.ts'
|
|
13
13
|
|
|
14
14
|
/** a live `sk review watch`: its process, the session or lane it keeps, when it started */
|
|
@@ -60,6 +60,10 @@ export class CompareSt {
|
|
|
60
60
|
if (m && (COMPARE_MODES as readonly string[]).includes(m)) this.mode = m as CompareMode
|
|
61
61
|
makeAutoObservable<this, 'key'>(this, { key: false })
|
|
62
62
|
}
|
|
63
|
+
/** the mode a pair draws in: the changes read pixels from two images, so a pair of clips shows side by side */
|
|
64
|
+
modeFor(clip: boolean): CompareMode {
|
|
65
|
+
return clip && this.mode === 'diff' ? 'side' : this.mode
|
|
66
|
+
}
|
|
63
67
|
setMode(m: CompareMode): void {
|
|
64
68
|
this.mode = m
|
|
65
69
|
kept.put(this.key, m)
|
|
@@ -133,6 +137,13 @@ export class ReviewSt {
|
|
|
133
137
|
/** the subject rings over the image (M) */
|
|
134
138
|
marksOn = true
|
|
135
139
|
zoom: Zoom = 'fit'
|
|
140
|
+
/** a gallery tile's height, his slider */
|
|
141
|
+
tileH: number = TILE_H.start
|
|
142
|
+
/** each gallery tile also drawn at 16, 32 and 64 px, the sizes an icon lives at */
|
|
143
|
+
tileSmall = false
|
|
144
|
+
/** how a gallery draws (tabs, list, grid), and how its large image fits */
|
|
145
|
+
galleryMode: GalleryMode = 'tabs'
|
|
146
|
+
galleryFit: GalleryFit = 'width'
|
|
136
147
|
/** the contents strip beside the cells, when the column is wide enough; folded by hand */
|
|
137
148
|
railOn = true
|
|
138
149
|
/** the contents as a sheet over the cells: a narrow column or the phone */
|
|
@@ -141,6 +152,8 @@ export class ReviewSt {
|
|
|
141
152
|
width = 0
|
|
142
153
|
/** what the last copy put on the clipboard, in words, shown a moment */
|
|
143
154
|
toast: string | null = null
|
|
155
|
+
/** a card file's public url once published, `sending` while it goes up; keyed `<id>/<file>` */
|
|
156
|
+
shared = new Map<string, string | 'sending'>()
|
|
144
157
|
readonly compare: CompareSt
|
|
145
158
|
readonly phone = new PhoneSt()
|
|
146
159
|
/** the view a link names before its card is made */
|
|
@@ -164,12 +177,16 @@ export class ReviewSt {
|
|
|
164
177
|
this.loadBoard = etagLoader(() => st.url('/api/review/board'))
|
|
165
178
|
this.compare = new CompareSt(`${this.prefix}compare`)
|
|
166
179
|
try {
|
|
167
|
-
const p = JSON.parse(kept.get(`${this.prefix}prefs`) ?? '{}') as { hideHandled?: boolean; byLane?: boolean; zoom?: string; marks?: boolean; rail?: boolean }
|
|
180
|
+
const p = JSON.parse(kept.get(`${this.prefix}prefs`) ?? '{}') as { hideHandled?: boolean; byLane?: boolean; zoom?: string; marks?: boolean; rail?: boolean; tileH?: number; tileSmall?: boolean; galleryMode?: string; galleryFit?: string }
|
|
168
181
|
if (p.hideHandled === false) this.hideHandled = false
|
|
169
182
|
if (p.byLane === true) this.byLane = true
|
|
170
183
|
if (p.marks === false) this.marksOn = false
|
|
171
184
|
if (p.rail === false) this.railOn = false
|
|
172
185
|
if ((ZOOMS as readonly string[]).includes(p.zoom ?? '')) this.zoom = p.zoom as Zoom
|
|
186
|
+
if (typeof p.tileH === 'number') this.setTileH(p.tileH)
|
|
187
|
+
if (p.tileSmall === true) this.tileSmall = true
|
|
188
|
+
if ((GALLERY_MODES as readonly string[]).includes(p.galleryMode ?? '')) this.galleryMode = p.galleryMode as GalleryMode
|
|
189
|
+
if ((GALLERY_FITS as readonly string[]).includes(p.galleryFit ?? '')) this.galleryFit = p.galleryFit as GalleryFit
|
|
173
190
|
} catch {
|
|
174
191
|
// a broken pref is the default
|
|
175
192
|
}
|
|
@@ -193,7 +210,7 @@ export class ReviewSt {
|
|
|
193
210
|
boardRows: observableRef,
|
|
194
211
|
})
|
|
195
212
|
reaction(
|
|
196
|
-
() => JSON.stringify({ hideHandled: this.hideHandled, byLane: this.byLane, zoom: this.zoom, marks: this.marksOn, rail: this.railOn }),
|
|
213
|
+
() => JSON.stringify({ hideHandled: this.hideHandled, byLane: this.byLane, zoom: this.zoom, marks: this.marksOn, rail: this.railOn, tileH: this.tileH, tileSmall: this.tileSmall, galleryMode: this.galleryMode, galleryFit: this.galleryFit }),
|
|
197
214
|
(s) => kept.put(`${this.prefix}prefs`, s),
|
|
198
215
|
)
|
|
199
216
|
// the card the address names, else the list's first: a new one is a new thread state, the old one disposed
|
|
@@ -459,6 +476,15 @@ export class ReviewSt {
|
|
|
459
476
|
return this.railOn && !this.phone.on && this.width >= RAIL_PX
|
|
460
477
|
}
|
|
461
478
|
|
|
479
|
+
/** the card drawn alone, the sidebar and the cards folded away; a phone shows one pane anyway */
|
|
480
|
+
get wide(): boolean {
|
|
481
|
+
return this.st.home.layout.foldedOn('review', 'left') && !this.phone.on
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
toggleWide(): void {
|
|
485
|
+
this.st.home.layout.toggleFold('review', 'left')
|
|
486
|
+
}
|
|
487
|
+
|
|
462
488
|
toggleRail(): void {
|
|
463
489
|
if (this.phone.on || this.width < RAIL_PX) this.sheet = !this.sheet
|
|
464
490
|
else this.railOn = !this.railOn
|
|
@@ -472,6 +498,22 @@ export class ReviewSt {
|
|
|
472
498
|
this.zoom = z
|
|
473
499
|
}
|
|
474
500
|
|
|
501
|
+
setGalleryMode(m: GalleryMode): void {
|
|
502
|
+
this.galleryMode = m
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
setGalleryFit(f: GalleryFit): void {
|
|
506
|
+
this.galleryFit = f
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
toggleTileSmall(): void {
|
|
510
|
+
this.tileSmall = !this.tileSmall
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
setTileH(h: number): void {
|
|
514
|
+
this.tileH = Math.max(TILE_H.min, Math.min(TILE_H.max, Math.round(h)))
|
|
515
|
+
}
|
|
516
|
+
|
|
475
517
|
toggleMarks(): void {
|
|
476
518
|
this.marksOn = !this.marksOn
|
|
477
519
|
}
|
|
@@ -521,6 +563,23 @@ export class ReviewSt {
|
|
|
521
563
|
}
|
|
522
564
|
}
|
|
523
565
|
|
|
566
|
+
/** one of a card's files published in the Space, its permanent cdn url to the clipboard: anyone with it downloads */
|
|
567
|
+
async share(id: string, file: string): Promise<void> {
|
|
568
|
+
const k = `${id}/${file}`
|
|
569
|
+
const known = this.shared.get(k)
|
|
570
|
+
if (known === 'sending') return
|
|
571
|
+
if (known) return this.copied(known, `link copied: ${known}`)
|
|
572
|
+
this.shared.set(k, 'sending')
|
|
573
|
+
try {
|
|
574
|
+
const r = await postJson<{ url: string }>(this.st.url(`/api/review/${id}/share`), { file })
|
|
575
|
+
runInAction(() => this.shared.set(k, r.url))
|
|
576
|
+
await this.copied(r.url, `link copied: ${r.url}`)
|
|
577
|
+
} catch (e) {
|
|
578
|
+
runInAction(() => this.shared.delete(k))
|
|
579
|
+
this.say(`not shared: ${(e as Error).message}`)
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
|
|
524
583
|
/** the open card as one paste a fresh agent session in any repo acts on: what it is, its repo, the command that shows
|
|
525
584
|
* it whole, its link here and on the phone (C) */
|
|
526
585
|
async copyCard(): Promise<void> {
|
|
@@ -561,7 +620,7 @@ export class ReviewSt {
|
|
|
561
620
|
|
|
562
621
|
/** the page's keys, as the atelier takes its own: true when it used the key. V approves, F ok with a fix, R rejects,
|
|
563
622
|
* A archives, N the next waiting card, C copies the card for an agent, M the rings, T the contents, D the next
|
|
564
|
-
* compare mode of every pair (⇧D the one before), ↑ ↓ the list; the card takes
|
|
623
|
+
* compare mode of every pair (⇧D the one before), ↑ ↓ the list (W the card wide is the hub's, kept-cols.tsx); the card takes
|
|
565
624
|
* the rest (ThreadSt.key). A digit is read from its physical key (`code`), so ⇧ and an AZERTY keyboard read the same */
|
|
566
625
|
key(e: Pick<KeyboardEvent, 'key' | 'shiftKey'> & { code?: string }): boolean {
|
|
567
626
|
const card = this.card
|
|
@@ -126,6 +126,7 @@ const TopBar = observer(({ rv, card, back }: { rv: ReviewSt; card: ThreadSt; bac
|
|
|
126
126
|
<Rework r={v.rework} />
|
|
127
127
|
<span className="sp" />
|
|
128
128
|
<PostAsk rv={rv} card={card} />
|
|
129
|
+
<button className={`rv-iconbtn${rv.wide ? ' on' : ''}`} aria-pressed={rv.wide} title={rv.wide ? 'back to the sidebar and the cards (W)' : 'wide: fold the sidebar and the cards, the card takes the page (W)'} aria-label="wide" onMouseDown={keepFocus} onClick={() => rv.toggleWide()}><Icon d={ICON.wide} /></button>
|
|
129
130
|
<span className="seg">
|
|
130
131
|
<button className="rv-iconbtn" title="fold every cell" aria-label="fold every cell" onMouseDown={keepFocus} onClick={() => card.foldAll(false)}><Icon d={ICON.foldAll} /></button>
|
|
131
132
|
<button className="rv-iconbtn" title="unfold every cell (it loads every image)" aria-label="unfold every cell" onMouseDown={keepFocus} onClick={() => card.foldAll(true)}><Icon d={ICON.unfoldAll} /></button>
|