@vivix-labs/media-tools 1.0.0-beta.3 → 1.0.0-beta.9

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/server.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { ServerContext } from 'vivix-studio/sdk/server';
2
2
  import { MediaToolsConfig } from './shared.js';
3
3
  export { Config } from './shared.js';
4
- import 'vivix-studio/sdk/shared';
5
4
  import 'react';
5
+ import 'vivix-studio/sdk/shared';
6
6
  import '@vivix-labs/ui-system';
7
7
 
8
8
  declare const dependencies: (config: MediaToolsConfig) => string[];
package/dist/shared.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { CallContext as CallContext$1, z } from 'vivix-studio/sdk/shared';
1
+ import * as React from 'react';
2
2
  import { ReactNode } from 'react';
3
+ import { CallContext as CallContext$1, z } from 'vivix-studio/sdk/shared';
3
4
  import { MenuItem } from '@vivix-labs/ui-system';
4
5
 
5
6
  type Scope = {
@@ -78,6 +79,17 @@ interface StagedFile {
78
79
  originalName: string;
79
80
  details: Record<string, any>;
80
81
  }
82
+ interface UploadChunk {
83
+ uploadId: string;
84
+ originalName: string;
85
+ totalBytes: number;
86
+ offset: number;
87
+ bytes: Uint8Array;
88
+ }
89
+ interface UploadProgress {
90
+ nextOffset: number;
91
+ staged?: StagedFile;
92
+ }
81
93
  type SqlScalar = null | string | number;
82
94
  interface SqlInput {
83
95
  sql: string;
@@ -133,6 +145,14 @@ interface Transaction {
133
145
  removeRelations(sourceObjectId: string, kind: 'reference'): void;
134
146
  relation(sourceObjectId: string, sourceVersionId: string | null, target: VersionRef, kind: 'source' | 'input' | 'reference'): void;
135
147
  }
148
+ /** Bytes supplied by an installed plugin, with build-time media metadata and digest. */
149
+ interface BundledFile {
150
+ fileId: string;
151
+ originalName: string;
152
+ mimeType: string;
153
+ sha256: string;
154
+ bytes: Uint8Array;
155
+ }
136
156
  interface DataAPI {
137
157
  readonly storeId: string;
138
158
  readonly scope: Scope;
@@ -160,7 +180,10 @@ interface DataAPI {
160
180
  observedCount: number;
161
181
  }[];
162
182
  stage(source: AsyncIterable<Uint8Array>, originalName: string, actorId: string, options?: StageOptions): Promise<StagedFile>;
183
+ prepareBundledFiles(operationId: string, files: BundledFile[]): Promise<FileValue[]>;
163
184
  stageText(text: string, actorId: string): Promise<StagedFile>;
185
+ /** Bounded JSON transport into the existing staging area; does not publish a version. */
186
+ stageChunk(input: UploadChunk, actorId: string): Promise<UploadProgress>;
164
187
  publish(stagingIds: string[], objectId: string, versionId: string, operationId: string, actorId: string, fileRoles?: string[]): Promise<{
165
188
  files: FileValue[];
166
189
  details: any;
@@ -606,6 +629,27 @@ interface JobPage {
606
629
  items: MediaJob[];
607
630
  nextOffset: number | null;
608
631
  }
632
+ interface VideoExportProps {
633
+ title: string;
634
+ preview: React.ReactNode;
635
+ aspectRatio?: string;
636
+ canvas?: ProcessSequence['canvas'];
637
+ issue?: string;
638
+ legacyTracking?: {
639
+ jobId?: string;
640
+ pending?: {
641
+ key: string;
642
+ request: MediaRequest;
643
+ };
644
+ recoverIntent?(): Promise<{
645
+ key: string;
646
+ request: MediaRequest;
647
+ }>;
648
+ };
649
+ prepare(): Promise<Omit<ProcessSequence, 'outputName'>>;
650
+ resolveDownload(result: VideoFileRef): Promise<string | null | undefined>;
651
+ onClose(): void;
652
+ }
609
653
  interface VideoEditorProps {
610
654
  input: VideoInput;
611
655
  mode: 'crop' | 'trim';
@@ -630,7 +674,10 @@ interface VideoCompareProps {
630
674
  label: string;
631
675
  input: VideoInput;
632
676
  context?: CompareSlot['context'];
677
+ preview?: ReactNode;
633
678
  }[];
679
+ /** Allow an occupied candidate to exchange places with the target column. */
680
+ allowCandidateSwap?: boolean;
634
681
  onRequestReplacement?(slotId: string): Promise<VideoInput | null>;
635
682
  onOpenDetails(input: VideoInput, back: {
636
683
  slots: CompareSlot[];
@@ -664,4 +711,4 @@ interface MediaToolsClient {
664
711
  resolve(input: VideoInput): Promise<ResolvedVideo>;
665
712
  }
666
713
 
667
- export { type AcceptedJob, type CompareSlot, Config, type EditDescriptor, type EditReadData, type Geometry, type JobPage, type JobState, type MediaJob, type MediaJobsProps, type MediaRequest, type MediaToolsClient, type MediaToolsConfig, type MediaToolsService, type PixelRect, type ProcessSequence, type ProcessVideo, type Recipe, type ResolvedVideo, type SaveEdit, type SavedEdit, type SequenceVideoInput, type VideoCompareProps, type VideoEditorProps, type VideoFileRef, type VideoInput, type VideoMetadata, canvas, editDescriptor, geometry, jobStates, jobsQuery, mediaError, mediaRequest, metadata, normalizeRecipe, packageVersion, processSequence, processVideo, readSavedEdit, recipe, sameFile, saveEdit, versionRef, videoFileRef, videoInput };
714
+ export { type AcceptedJob, type CompareSlot, Config, type EditDescriptor, type EditReadData, type Geometry, type JobPage, type JobState, type MediaJob, type MediaJobsProps, type MediaRequest, type MediaToolsClient, type MediaToolsConfig, type MediaToolsService, type PixelRect, type ProcessSequence, type ProcessVideo, type Recipe, type ResolvedVideo, type SaveEdit, type SavedEdit, type SequenceVideoInput, type VideoCompareProps, type VideoEditorProps, type VideoExportProps, type VideoFileRef, type VideoInput, type VideoMetadata, canvas, editDescriptor, geometry, jobStates, jobsQuery, mediaError, mediaRequest, metadata, normalizeRecipe, packageVersion, processSequence, processVideo, readSavedEdit, recipe, sameFile, saveEdit, versionRef, videoFileRef, videoInput };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vivix-labs/media-tools",
3
- "version": "1.0.0-beta.3",
3
+ "version": "1.0.0-beta.9",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",