@bitmagic/cli 0.1.70-dev.0 → 0.1.70-dev.2

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.
Files changed (155) hide show
  1. package/README.md +47 -1
  2. package/assets/skills/publishing-to-poki/SKILL.md +50 -0
  3. package/dist/bin.js +5 -4
  4. package/dist/bin.js.map +1 -1
  5. package/dist/cli.d.ts +8 -0
  6. package/dist/cli.js +6 -5
  7. package/dist/cli.js.map +1 -1
  8. package/dist/commands/publish.d.ts +11 -0
  9. package/dist/commands/publish.js +18 -0
  10. package/dist/commands/publish.js.map +1 -1
  11. package/dist/commands/trailer.js +6 -10
  12. package/dist/commands/trailer.js.map +1 -1
  13. package/dist/editor/recording-sink.d.ts +2 -9
  14. package/dist/editor/recording-sink.js +3 -15
  15. package/dist/editor/recording-sink.js.map +1 -1
  16. package/dist/editor/recording-stream.d.ts +3 -2
  17. package/dist/editor/recording-stream.js +14 -48
  18. package/dist/editor/recording-stream.js.map +1 -1
  19. package/dist/editor/shell-page.js +1 -1
  20. package/dist/editor/shell-page.js.map +1 -1
  21. package/dist/errors.d.ts +8 -0
  22. package/dist/errors.js +16 -0
  23. package/dist/errors.js.map +1 -1
  24. package/dist/generate/video-review.js +1 -1
  25. package/dist/generate/video-review.js.map +1 -1
  26. package/dist/ios/collect-urls.d.ts +1 -75
  27. package/dist/ios/collect-urls.js +2 -219
  28. package/dist/ios/collect-urls.js.map +1 -1
  29. package/dist/ios/local-server.d.ts +1 -11
  30. package/dist/ios/local-server.js +2 -87
  31. package/dist/ios/local-server.js.map +1 -1
  32. package/dist/ios/transform.d.ts +4 -45
  33. package/dist/ios/transform.js +3 -59
  34. package/dist/ios/transform.js.map +1 -1
  35. package/dist/ios/vendor.d.ts +1 -29
  36. package/dist/ios/vendor.js +2 -112
  37. package/dist/ios/vendor.js.map +1 -1
  38. package/dist/package/collect-urls.d.ts +75 -0
  39. package/dist/package/collect-urls.js +220 -0
  40. package/dist/package/collect-urls.js.map +1 -0
  41. package/dist/package/local-server.d.ts +13 -0
  42. package/dist/package/local-server.js +102 -0
  43. package/dist/package/local-server.js.map +1 -0
  44. package/dist/package/transform.d.ts +47 -0
  45. package/dist/package/transform.js +62 -0
  46. package/dist/package/transform.js.map +1 -0
  47. package/dist/package/vendor.d.ts +33 -0
  48. package/dist/package/vendor.js +114 -0
  49. package/dist/package/vendor.js.map +1 -0
  50. package/dist/poki/assets.d.ts +20 -0
  51. package/dist/poki/assets.js +154 -0
  52. package/dist/poki/assets.js.map +1 -0
  53. package/dist/poki/check.d.ts +21 -0
  54. package/dist/poki/check.js +134 -0
  55. package/dist/poki/check.js.map +1 -0
  56. package/dist/poki/publish.d.ts +22 -0
  57. package/dist/poki/publish.js +207 -0
  58. package/dist/poki/publish.js.map +1 -0
  59. package/dist/poki/transform.d.ts +6 -0
  60. package/dist/poki/transform.js +30 -0
  61. package/dist/poki/transform.js.map +1 -0
  62. package/dist/publish/bundle.d.ts +1 -0
  63. package/dist/publish/bundle.js +2 -2
  64. package/dist/publish/bundle.js.map +1 -1
  65. package/dist/render/qr-png.d.ts +3 -6
  66. package/dist/render/qr-png.js +4 -33
  67. package/dist/render/qr-png.js.map +1 -1
  68. package/dist/scaffold/asset-pipeline-skill-files.d.ts +1 -1
  69. package/dist/scaffold/asset-pipeline-skill-files.js +3 -3
  70. package/dist/scaffold/poki-skill-files.d.ts +2 -0
  71. package/dist/scaffold/poki-skill-files.js +7 -0
  72. package/dist/scaffold/poki-skill-files.js.map +1 -0
  73. package/dist/scaffold/project-files.js +1 -1
  74. package/dist/scaffold/project.js +2 -0
  75. package/dist/scaffold/project.js.map +1 -1
  76. package/dist/scaffold/skill-files.js +6 -4
  77. package/dist/scaffold/skill-files.js.map +1 -1
  78. package/dist/trailer/chrome-rasterizers.d.ts +7 -0
  79. package/dist/trailer/chrome-rasterizers.js +7 -0
  80. package/dist/trailer/chrome-rasterizers.js.map +1 -0
  81. package/dist/trailer/game-name.d.ts +2 -0
  82. package/dist/trailer/game-name.js +20 -0
  83. package/dist/trailer/game-name.js.map +1 -0
  84. package/dist/trailer/hud-raster.d.ts +1 -1
  85. package/dist/trailer/hud-raster.js +1 -1
  86. package/dist/trailer/hud-raster.js.map +1 -1
  87. package/dist/trailer/record-session.js +1 -2
  88. package/dist/trailer/record-session.js.map +1 -1
  89. package/dist/trailer/title-raster.d.ts +9 -2
  90. package/dist/trailer/title-raster.js +17 -3
  91. package/dist/trailer/title-raster.js.map +1 -1
  92. package/dist/verify/browser.d.ts +3 -1
  93. package/dist/verify/browser.js +14 -9
  94. package/dist/verify/browser.js.map +1 -1
  95. package/dist/verify/classify.d.ts +2 -0
  96. package/dist/verify/classify.js +4 -1
  97. package/dist/verify/classify.js.map +1 -1
  98. package/package.json +4 -4
  99. package/dist/editor/capture-file.d.ts +0 -70
  100. package/dist/editor/capture-file.js +0 -204
  101. package/dist/editor/capture-file.js.map +0 -1
  102. package/dist/trailer/analyze.d.ts +0 -23
  103. package/dist/trailer/analyze.js +0 -186
  104. package/dist/trailer/analyze.js.map +0 -1
  105. package/dist/trailer/auto-edl.d.ts +0 -50
  106. package/dist/trailer/auto-edl.js +0 -267
  107. package/dist/trailer/auto-edl.js.map +0 -1
  108. package/dist/trailer/beat-cut.d.ts +0 -57
  109. package/dist/trailer/beat-cut.js +0 -232
  110. package/dist/trailer/beat-cut.js.map +0 -1
  111. package/dist/trailer/edl-time.d.ts +0 -61
  112. package/dist/trailer/edl-time.js +0 -105
  113. package/dist/trailer/edl-time.js.map +0 -1
  114. package/dist/trailer/ffmpeg.d.ts +0 -18
  115. package/dist/trailer/ffmpeg.js +0 -100
  116. package/dist/trailer/ffmpeg.js.map +0 -1
  117. package/dist/trailer/hud-state.d.ts +0 -181
  118. package/dist/trailer/hud-state.js +0 -525
  119. package/dist/trailer/hud-state.js.map +0 -1
  120. package/dist/trailer/io.d.ts +0 -22
  121. package/dist/trailer/io.js +0 -20
  122. package/dist/trailer/io.js.map +0 -1
  123. package/dist/trailer/link.d.ts +0 -1
  124. package/dist/trailer/link.js +0 -15
  125. package/dist/trailer/link.js.map +0 -1
  126. package/dist/trailer/make.d.ts +0 -56
  127. package/dist/trailer/make.js +0 -212
  128. package/dist/trailer/make.js.map +0 -1
  129. package/dist/trailer/merge.d.ts +0 -7
  130. package/dist/trailer/merge.js +0 -165
  131. package/dist/trailer/merge.js.map +0 -1
  132. package/dist/trailer/music-beats.d.ts +0 -123
  133. package/dist/trailer/music-beats.js +0 -672
  134. package/dist/trailer/music-beats.js.map +0 -1
  135. package/dist/trailer/paths.d.ts +0 -28
  136. package/dist/trailer/paths.js +0 -101
  137. package/dist/trailer/paths.js.map +0 -1
  138. package/dist/trailer/render.d.ts +0 -59
  139. package/dist/trailer/render.js +0 -521
  140. package/dist/trailer/render.js.map +0 -1
  141. package/dist/trailer/revision.d.ts +0 -8
  142. package/dist/trailer/revision.js +0 -31
  143. package/dist/trailer/revision.js.map +0 -1
  144. package/dist/trailer/synth.d.ts +0 -9
  145. package/dist/trailer/synth.js +0 -120
  146. package/dist/trailer/synth.js.map +0 -1
  147. package/dist/trailer/timeline-types.d.ts +0 -195
  148. package/dist/trailer/timeline-types.js +0 -419
  149. package/dist/trailer/timeline-types.js.map +0 -1
  150. package/dist/trailer/titles.d.ts +0 -44
  151. package/dist/trailer/titles.js +0 -124
  152. package/dist/trailer/titles.js.map +0 -1
  153. package/dist/trailer/video-chain.d.ts +0 -129
  154. package/dist/trailer/video-chain.js +0 -261
  155. package/dist/trailer/video-chain.js.map +0 -1
@@ -1,181 +0,0 @@
1
- /**
2
- * HUD replay: turn the recorded `hud[]` op track back into UI state.
3
- *
4
- * Captured frames are UI-less (the HUD is DOM, not WebGL), so the engine logs
5
- * semantic HUD *state changes* instead of pixels. This module reduces that
6
- * sparse op stream back to the complete UI state at any source frame
7
- * (`reduceHudState`), and picks the frames worth rasterizing per EDL clip
8
- * (`collectUiKeyframes`). Output-timeline placement comes from edl-time.ts —
9
- * this file never re-derives crossfade/speed math.
10
- *
11
- * Timers are the one derived value: they are logged as start/pause/reset ops,
12
- * never per tick, and the displayed value is computed from FRAME time (which
13
- * is more correct than the widget's wall clock under a dilated recording).
14
- */
15
- import type { ClipTiming } from './edl-time.js';
16
- import type { HudElementKind, HudOp } from './timeline-types.js';
17
- /**
18
- * Engine-owned chrome that lives in the HUD element registry but must never
19
- * reach a trailer: interactive controls the viewer can't click in a video.
20
- * `mute-button` is `MuteControl`'s custom element (engine/ui/MuteControl.ts).
21
- */
22
- export declare const CHROME_ELEMENT_IDS: ReadonlySet<string>;
23
- export interface HudHealthState {
24
- current: number;
25
- max: number;
26
- visible: boolean;
27
- /** Pixel width from showHealth({width}); absent = the engine default. */
28
- width?: number;
29
- }
30
- /**
31
- * One HUD element. Keys beyond id/type/anchor/visible are per-kind and are
32
- * omitted when the recording never set them.
33
- */
34
- export interface HudElementState {
35
- id: string;
36
- type: HudElementKind;
37
- anchor: string;
38
- visible: boolean;
39
- label?: string;
40
- color?: string;
41
- width?: number;
42
- showText?: boolean;
43
- percent?: number;
44
- icon?: string;
45
- text?: string;
46
- iconSize?: number;
47
- /** Timer only: the DERIVED displayed seconds; the harness formats it. */
48
- seconds?: number;
49
- countDown?: boolean;
50
- format?: string;
51
- html?: string;
52
- css?: string;
53
- }
54
- export interface HudToastState {
55
- message: string;
56
- variant?: string;
57
- /** IGameHUD anchor; absent on recordings that predate anchor capture. */
58
- anchor?: string;
59
- }
60
- export interface HudReplayState {
61
- version: 1;
62
- hudVisible: boolean;
63
- /** null until the recording touches health at all. */
64
- health: HudHealthState | null;
65
- /** Verbatim from the `theme` op; null when the recording carried none. */
66
- theme: unknown;
67
- /** Creation order (= stacking order within an anchor); removed ones dropped. */
68
- elements: HudElementState[];
69
- toasts: HudToastState[];
70
- /**
71
- * Game-authored head stylesheets, first-logged order, last write per id.
72
- * The harness injects these before drawing — they are what turn
73
- * custom-element class names into pixels.
74
- *
75
- * Shared between snapshots while unchanged, so treat it as frozen: never
76
- * mutate the array or its entries in place.
77
- */
78
- stylesheets: ReadonlyArray<HudStylesheetState>;
79
- }
80
- export interface HudStylesheetState {
81
- id: string;
82
- css: string;
83
- }
84
- export interface RasterGeometry {
85
- /** CSS-pixel viewport for the harness browser context. */
86
- viewportWidth: number;
87
- viewportHeight: number;
88
- deviceScaleFactor: number;
89
- }
90
- /**
91
- * Where to lay the HUD out for rasterization.
92
- *
93
- * During capture only the CANVAS is resized to the recording resolution — the
94
- * DOM HUD keeps laying out against the player's window. Rastering at the
95
- * recording size therefore renders every fixed-pixel HUD metric too small
96
- * relative to the footage (and flips vw-clamps and media queries). With the
97
- * recorded window known, raster at an ASPECT-CORRECTED viewport: the window's
98
- * height (so element size relative to screen height matches what the player
99
- * saw) at the recording's aspect (raw window dimensions would stretch glyphs
100
- * non-uniformly under the final scale whenever the aspects differ). The
101
- * deviceScaleFactor keeps the PNG at or above the recording resolution so
102
- * ffmpeg only ever downscales.
103
- *
104
- * No recorded window → the recording resolution at 1x, bit-for-bit the old
105
- * behavior.
106
- */
107
- export declare function computeRasterGeometry(recordingWidth: number, recordingHeight: number, window?: {
108
- innerWidth: number;
109
- innerHeight: number;
110
- devicePixelRatio: number;
111
- }): RasterGeometry;
112
- /** The engine records `frame` on a 60fps source clock. */
113
- export declare const DEFAULT_HUD_FPS = 60;
114
- /** IGameHUD.showToast's default duration. */
115
- export declare const DEFAULT_TOAST_MS = 2500;
116
- /**
117
- * The complete HUD state at `frame`. Ops after `frame` are ignored; unknown
118
- * op names are skipped rather than throwing.
119
- */
120
- export declare function reduceHudState(ops: readonly HudOp[], frame: number, fps?: number): HudReplayState;
121
- /** True when a state would rasterize to a fully transparent frame. */
122
- export declare function isBlankHudState(state: HudReplayState): boolean;
123
- export interface UiKeyframe {
124
- /** Source frame whose state this is. */
125
- sourceFrame: number;
126
- /**
127
- * `sourceFrame` as milliseconds on the SOURCE clock. The harness seeds
128
- * animation phase from it, so motion stays locked to the footage through a
129
- * speed ramp — output time would run it fast or slow against the frames.
130
- */
131
- frameTimeMs: number;
132
- clipIndex: number;
133
- /** Output-timeline seconds this overlay becomes visible. */
134
- outputStartSec: number;
135
- /** Output-timeline seconds it stops being visible (next keyframe / clip end). */
136
- outputEndSec: number;
137
- state: HudReplayState;
138
- }
139
- export interface CollectUiKeyframesOptions {
140
- /** Source-clock fps. Default 60. */
141
- fps?: number;
142
- /** Ceiling on keyframes per second of OUTPUT time. Default 30. 0 disables. */
143
- maxPerSecond?: number;
144
- /** Hard ceiling per clip. Defaults to what the clip's duration allows at `maxPerSecond`. */
145
- maxPerClip?: number;
146
- /** Per-clip opt-out; defaults to every clip. */
147
- clipEnabled?: (clipIndex: number) => boolean;
148
- /** Where truncation notices go. Defaults to stderr. */
149
- log?: (line: string) => void;
150
- }
151
- /**
152
- * 30, not 15: measured on a real cut, the selected footage held 227 distinct
153
- * HUD states across 15.3 s of output (14.8/s average, four of seven clips over
154
- * 15/s), so a 15/s ceiling was discarding roughly 45% of the HUD motion the
155
- * game actually rendered.
156
- *
157
- * ffmpeg used to be the reason for a low ceiling — one PNG input plus one
158
- * serial overlay node per keyframe cost ~23 MB of RSS each and corrupted the
159
- * render above ~400. The overlays now ride one densified image2 sequence whose
160
- * cost is flat in keyframe count (measured 2.83 s / 0.94 GB at both 126 and
161
- * 902 distinct rasters), so the remaining cost is ~25 ms of Playwright per
162
- * keyframe plus its PNG on disk. 0 disables the limit entirely.
163
- */
164
- export declare const DEFAULT_MAX_KEYFRAMES_PER_SECOND = 30;
165
- /**
166
- * Sole per-clip ceiling, a backstop for `--ui-keyframe-rate 0`: at any real
167
- * rate the limiter below admits at most rate·duration+1 keyframes per clip on
168
- * its own, so nothing else can bind. A fixed 240 used to freeze the overlay
169
- * after 16 s of any clip busy enough to sustain the default rate — exactly the
170
- * clip a trailer is cut from. 60 s of output at 60/s.
171
- */
172
- export declare const MAX_KEYFRAMES_PER_CLIP_CEILING = 3600;
173
- /**
174
- * Walk every enabled clip's source range and emit a keyframe wherever the
175
- * reduced HUD state changes.
176
- *
177
- * A clip's overlays stop at `exclusiveOutputEnd`, so during a crossfade the
178
- * incoming clip's UI takes over at the fade start and exactly one overlay is
179
- * ever active — two stacked HUDs would double-draw every element.
180
- */
181
- export declare function collectUiKeyframes(ops: readonly HudOp[], clips: readonly ClipTiming[], opts?: CollectUiKeyframesOptions): UiKeyframe[];