@odori/cli 0.0.3 → 0.0.4

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/dist/cli.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  checkFlags,
3
3
  parseArgs,
4
4
  run
5
- } from "./chunk-RXLB2CXH.js";
5
+ } from "./chunk-NYXWEZU2.js";
6
6
  export {
7
7
  checkFlags,
8
8
  parseArgs,
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ViteDevServer } from 'vite';
2
2
  import * as odori from 'odori';
3
- import { VideoEntry, RenderManifest, AudioCue, ManifestAudioCue, ExportJob } from 'odori';
3
+ import { VideoEntry, RenderManifest, AudioCue, ManifestAudioCue, ExportJob, Duration } from 'odori';
4
4
  import { Browser, Page } from 'playwright-core';
5
5
  export { parseArgs, run } from './cli.js';
6
6
 
@@ -72,6 +72,8 @@ type DiscoveredPreview = {
72
72
  relativeFile: string;
73
73
  importPath: string;
74
74
  identifier: string;
75
+ /** Video ids whose composition imports this component. Derived, not declared. */
76
+ usedBy?: string[];
75
77
  };
76
78
  type DiscoveredBrandModule = {
77
79
  name: string;
@@ -87,11 +89,25 @@ type DiscoveredAudio = {
87
89
  relativeFile: string;
88
90
  bytes: number;
89
91
  };
92
+ /**
93
+ * A directory naming itself, from a `category.json` beside the components it
94
+ * holds. The path is what the filesystem already says; this is only how that
95
+ * level should read and where it should sit among its siblings.
96
+ */
97
+ type DiscoveredCategory = {
98
+ /** Directory path under the components directory: `product-ui/forms`. */
99
+ path: string;
100
+ /** What to call it. Without one, the directory name is read as words. */
101
+ name?: string;
102
+ /** Sort position among siblings. Unset sorts after, alphabetically. */
103
+ order?: number;
104
+ };
90
105
  type ProjectGraph = {
91
106
  videos: DiscoveredVideo[];
92
107
  previews: DiscoveredPreview[];
93
108
  brands: DiscoveredBrandModule[];
94
109
  audio: DiscoveredAudio[];
110
+ categories: DiscoveredCategory[];
95
111
  sourceHash: string;
96
112
  };
97
113
  /**
@@ -244,7 +260,10 @@ type RenderPage = {
244
260
  declare const openRenderPage: (origin: string, target: RenderTarget, config: ResolvedConfig) => Promise<RenderPage>;
245
261
  /** Seek through the readiness handshake instead of guessing with timeouts. */
246
262
  declare const seekTo: (page: Page, frame: number) => Promise<void>;
247
- declare const readTimeline: (page: Page) => Promise<odori.CompiledTimeline>;
263
+ declare const readTimeline: (page: Page) => Promise<odori.CompiledTimeline | {
264
+ scenes: never[];
265
+ durationInFrames: number;
266
+ }>;
248
267
  declare const readAudio: (page: Page) => Promise<odori.AudioTrack>;
249
268
  declare const probeSignatures: (page: Page, frames: number[]) => Promise<string[]>;
250
269
  /** Kept for callers that only want to know an encoder exists. */
@@ -568,8 +587,18 @@ type PlanOptions = {
568
587
  declare const planChunks: ({ durationInFrames, scenes, concurrency, maxChunkFrames, }: PlanOptions) => ChunkPlan;
569
588
  declare const chunkFrames: (chunk: FrameChunk) => number[];
570
589
 
571
- declare const stillCommand: (id: string, options?: {
572
- frame?: number;
590
+ /**
591
+ * One frame of a video, as a PNG.
592
+ *
593
+ * `at` is a duration like everything else in Odori: a bare number is seconds,
594
+ * and `120f` is frame 120. Which frame that resolves to depends on the
595
+ * video's frame rate, and the frame rate belongs to the video's layout, so
596
+ * the position is checked for shape first and resolved once the video is
597
+ * loaded. A typo still costs nothing: no discovery, no dev server, no
598
+ * browser.
599
+ */
600
+ declare const frameCommand: (id: string, options?: {
601
+ at?: Duration;
573
602
  output?: string;
574
603
  input?: Record<string, unknown>;
575
604
  }) => Promise<string>;
@@ -645,4 +674,4 @@ declare const newCommand: (name: string, options?: {
645
674
  /** Add the videos source root and configuration to an existing project. */
646
675
  declare const initCommand: (root?: string) => Promise<void>;
647
676
 
648
- export { CHROME_BUILD, type ChunkPlan, type CompileResult, type ComponentStatus, type Context, type DeterminismFinding, type DiffLine, FORMATS, type FrameChunk, JobQueue, type JobRecord, type LoadedVideo, type MixInput, type OdoriConfig, type ProjectGraph, type RenderOptions, type RenderTarget, type RenderTimings, type ResolvedBinary, type ResolvedConfig, type StudioServer, type VideoFormat, addCommand, alphaWarning, appendJobLog, buildAudioFilter, cacheRoot, cancelJob, checkDeterminism, chunkFrames, clearPrepareCache, compileInBrowser, componentStatus, countChanges, createContext, createIntegrityResolver, createJob, defaultConcurrency, defineConfig, devCommand, diffCommand, diffLines, discoverProject, ensureFfmpeg, exportCommand, exportQueue, fileKey, findVideo, formatDiff, formatNames, freezeManifest, generateImports, initCommand, inspectCommand, installBrowser, installFfmpeg, jobsCommand, listCommand, listJobs, loadConfig, loadVideos, localCandidates, newCommand, openRenderPage, outputName, planChunks, prepareCacheKey, probeSignatures, readAudio, readJob, readPrepareCache, readTimeline, reconcileJobs, renderMovie, renderStill, renderToolchain, resolveBrowser, resolveChromePath, resolveCueFile, resolveFfmpeg, resolveFormat, runJob, runPrepare, seekTo, startStudioServer, stillCommand, targetFor, testCommand, updateCommand, updateJob, withServer, writeGenerated, writePrepareCache };
677
+ export { CHROME_BUILD, type ChunkPlan, type CompileResult, type ComponentStatus, type Context, type DeterminismFinding, type DiffLine, FORMATS, type FrameChunk, JobQueue, type JobRecord, type LoadedVideo, type MixInput, type OdoriConfig, type ProjectGraph, type RenderOptions, type RenderTarget, type RenderTimings, type ResolvedBinary, type ResolvedConfig, type StudioServer, type VideoFormat, addCommand, alphaWarning, appendJobLog, buildAudioFilter, cacheRoot, cancelJob, checkDeterminism, chunkFrames, clearPrepareCache, compileInBrowser, componentStatus, countChanges, createContext, createIntegrityResolver, createJob, defaultConcurrency, defineConfig, devCommand, diffCommand, diffLines, discoverProject, ensureFfmpeg, exportCommand, exportQueue, fileKey, findVideo, formatDiff, formatNames, frameCommand, freezeManifest, generateImports, initCommand, inspectCommand, installBrowser, installFfmpeg, jobsCommand, listCommand, listJobs, loadConfig, loadVideos, localCandidates, newCommand, openRenderPage, outputName, planChunks, prepareCacheKey, probeSignatures, readAudio, readJob, readPrepareCache, readTimeline, reconcileJobs, renderMovie, renderStill, renderToolchain, resolveBrowser, resolveChromePath, resolveCueFile, resolveFfmpeg, resolveFormat, runJob, runPrepare, seekTo, startStudioServer, targetFor, testCommand, updateCommand, updateJob, withServer, writeGenerated, writePrepareCache };
package/dist/index.js CHANGED
@@ -30,6 +30,7 @@ import {
30
30
  findVideo,
31
31
  formatDiff,
32
32
  formatNames,
33
+ frameCommand,
33
34
  freezeManifest,
34
35
  generateImports,
35
36
  initCommand,
@@ -67,7 +68,6 @@ import {
67
68
  runPrepare,
68
69
  seekTo,
69
70
  startStudioServer,
70
- stillCommand,
71
71
  targetFor,
72
72
  testCommand,
73
73
  updateCommand,
@@ -75,7 +75,7 @@ import {
75
75
  withServer,
76
76
  writeGenerated,
77
77
  writePrepareCache
78
- } from "./chunk-RXLB2CXH.js";
78
+ } from "./chunk-NYXWEZU2.js";
79
79
  export {
80
80
  CHROME_BUILD,
81
81
  FORMATS,
@@ -108,6 +108,7 @@ export {
108
108
  findVideo,
109
109
  formatDiff,
110
110
  formatNames,
111
+ frameCommand,
111
112
  freezeManifest,
112
113
  generateImports,
113
114
  initCommand,
@@ -145,7 +146,6 @@ export {
145
146
  runPrepare,
146
147
  seekTo,
147
148
  startStudioServer,
148
- stillCommand,
149
149
  targetFor,
150
150
  testCommand,
151
151
  updateCommand,