@mengine/medeo-tool 1.3.1-alpha.11 → 1.3.1-alpha.13
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/index.d.mts +21 -1
- package/dist/index.mjs +135 -49
- package/dist/index.mjs.map +1 -1
- package/dist/sandbox-api.d.mts +34 -44
- package/dist/{script-session-DLBhoA1R.mjs → script-session-IqAIVBCM.mjs} +3 -9
- package/dist/script-session-IqAIVBCM.mjs.map +1 -0
- package/dist/worker-entry.mjs +70 -5
- package/dist/worker-entry.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/script-session-DLBhoA1R.mjs.map +0 -1
package/dist/sandbox-api.d.mts
CHANGED
|
@@ -25,6 +25,35 @@ interface BoundedNativeSequencePayload extends JsonObject {
|
|
|
25
25
|
sampling: 'native';
|
|
26
26
|
coordinateSpace: JsonValue;
|
|
27
27
|
}
|
|
28
|
+
/** Business editing surface. Infrastructure Assets are assembled by the host. */
|
|
29
|
+
interface BusinessEntityFacade {
|
|
30
|
+
list(): SandboxEntity[];
|
|
31
|
+
get(entityId: string): SandboxEntity | null;
|
|
32
|
+
readCaptionContent(entityId: string): ComposedScriptContent;
|
|
33
|
+
readPhoneticScriptContent(entityId: string): ComposedPhoneticContent;
|
|
34
|
+
create(input: Exclude<CreateEntityInput, {
|
|
35
|
+
entity_kind: 'asset';
|
|
36
|
+
}>): string;
|
|
37
|
+
update(input: UpdateEntityInput): void;
|
|
38
|
+
declareFields(input: UpdateEntityInput): void;
|
|
39
|
+
delete(input: DeleteEntityInput): void;
|
|
40
|
+
ensureMedia(fact: MediaAssetFact): {
|
|
41
|
+
contentEntityId: string;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/** Physical Asset bindings are maintained outside the sandbox. */
|
|
45
|
+
interface BusinessRelationFacade {
|
|
46
|
+
list(): SandboxRelation[];
|
|
47
|
+
of(entityId: string, relationKind?: KnownRelationKind): SandboxRelation[];
|
|
48
|
+
link(input: Exclude<LinkRelationInput, {
|
|
49
|
+
relation_kind: 'physical-asset';
|
|
50
|
+
}>): string;
|
|
51
|
+
linkGenerated(input: LinkGeneratedRelationInput): string;
|
|
52
|
+
linkClipAnchor(input: LinkClipAnchorRelationInput): string;
|
|
53
|
+
linkPhoneticScriptRender(input: LinkPhoneticScriptRenderRelationInput): string;
|
|
54
|
+
linkAudioScriptSource(input: LinkAudioScriptSourceRelationInput): string;
|
|
55
|
+
unlink(input: UnlinkRelationInput): void;
|
|
56
|
+
}
|
|
28
57
|
interface CaptionFontDescriptor {
|
|
29
58
|
readonly system: 'font-library';
|
|
30
59
|
readonly key: string;
|
|
@@ -114,28 +143,6 @@ interface DeleteVoiceoverInput {
|
|
|
114
143
|
readonly voiceoverClipEntityIds: readonly string[];
|
|
115
144
|
}
|
|
116
145
|
type EmptyRelationKind = 'timeline-track' | 'track-clip' | 'clip-marker' | 'marker-content' | 'axvideo-marker' | 'marker-timeline' | 'audio-script-marker';
|
|
117
|
-
interface EntityFacade {
|
|
118
|
-
/** Read complete assembled fields; returned objects are snapshots. Use update to persist edits. */
|
|
119
|
-
list(): SandboxEntity[];
|
|
120
|
-
get(entityId: string): SandboxEntity | null;
|
|
121
|
-
/** Find document resources by external Memota asset id, including directly composed media variants. */
|
|
122
|
-
findByAssetId(assetId: string): SandboxEntity<ResourceEntityKind>[];
|
|
123
|
-
/** Assemble selected Caption text; missing composition is an error. */
|
|
124
|
-
readCaptionContent(entityId: string): ComposedScriptContent;
|
|
125
|
-
/** Assemble base text and pronunciation fields before generating Voice. */
|
|
126
|
-
readPhoneticScriptContent(entityId: string): ComposedPhoneticContent;
|
|
127
|
-
create(input: CreateEntityInput): string;
|
|
128
|
-
/** Patch assembled fields, routing inherited fields to their declaring entity. */
|
|
129
|
-
update(input: UpdateEntityInput): void;
|
|
130
|
-
/** Explicitly declare own fields, overriding unambiguous bases without modifying them. Ordinary edits use update. */
|
|
131
|
-
declareFields(input: UpdateEntityInput): void;
|
|
132
|
-
/** Delete an Entity only after all of its incident Relations have been explicitly unlinked. */
|
|
133
|
-
delete(input: DeleteEntityInput): void;
|
|
134
|
-
/** Get or create one typed Asset by factual external id and return its single content identity. Never creates a Clip. */
|
|
135
|
-
ensureMedia(fact: MediaAssetFact): {
|
|
136
|
-
contentEntityId: string;
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
146
|
type EntityId = string;
|
|
140
147
|
interface EntityPayloadByKind {
|
|
141
148
|
axvideo: BoundedDerivedSequencePayload;
|
|
@@ -206,6 +213,8 @@ interface ImageMediaAssetFact {
|
|
|
206
213
|
}
|
|
207
214
|
interface InsertCaptionClipInput {
|
|
208
215
|
readonly timelineEntityId: string;
|
|
216
|
+
/** Existing generation identity for newly materialized Caption content, distinct from its Clip. */
|
|
217
|
+
readonly captionEntityId?: string;
|
|
209
218
|
/** Stable placed caption identity, distinct from the Caption content identity. */
|
|
210
219
|
readonly captionClipEntityId?: string;
|
|
211
220
|
/** Existing bases composed by this variant; includes an AudioScript text owner. */
|
|
@@ -353,23 +362,6 @@ interface PatchCaptionStyleInput {
|
|
|
353
362
|
readonly timelineEntityId: string;
|
|
354
363
|
readonly style: CaptionStyleFields;
|
|
355
364
|
}
|
|
356
|
-
interface RelationFacade {
|
|
357
|
-
list(): SandboxRelation[];
|
|
358
|
-
/** Incident lookup is endpoint-agnostic; persisted endpoint positions stay unchanged. */
|
|
359
|
-
of(entityId: string, relationKind?: KnownRelationKind): SandboxRelation[];
|
|
360
|
-
/** Link existing entities through ordinary associations; variant bases are stored directly on the variant. */
|
|
361
|
-
link(input: LinkRelationInput): string;
|
|
362
|
-
/** Author ordered generated(output,input); generic link() deliberately rejects this kind. */
|
|
363
|
-
linkGenerated(input: LinkGeneratedRelationInput): string;
|
|
364
|
-
/** Author ordered clip-anchor(child,host) without positional endpoint ambiguity. */
|
|
365
|
-
linkClipAnchor(input: LinkClipAnchorRelationInput): string;
|
|
366
|
-
/** Author ordered phonetic-script-render(output,script) without positional endpoint ambiguity. */
|
|
367
|
-
linkPhoneticScriptRender(input: LinkPhoneticScriptRenderRelationInput): string;
|
|
368
|
-
/** Author ordered audio-script-source(script,source) without positional endpoint ambiguity. */
|
|
369
|
-
linkAudioScriptSource(input: LinkAudioScriptSourceRelationInput): string;
|
|
370
|
-
/** Remove a Relation by identity; endpoint replacement is an explicit unlink plus link. */
|
|
371
|
-
unlink(input: UnlinkRelationInput): void;
|
|
372
|
-
}
|
|
373
365
|
interface ReplaceClipContentInput {
|
|
374
366
|
readonly clipEntityId: string;
|
|
375
367
|
/** Existing Sequence media Entity id. Asset ids and URLs are not content ids. */
|
|
@@ -396,8 +388,6 @@ interface ReplacementMediaClipInput {
|
|
|
396
388
|
readonly sourceRange: SequenceRange<number>;
|
|
397
389
|
readonly volume?: number;
|
|
398
390
|
}
|
|
399
|
-
/** Asset identity, either an old physical-only row or a directly composed media variant. */
|
|
400
|
-
type ResourceEntityKind = 'image' | 'video' | 'audio' | 'voice';
|
|
401
391
|
interface SandboxEntity<K extends KnownEntityKind = KnownEntityKind> {
|
|
402
392
|
entity_id: string;
|
|
403
393
|
entity_kind: K;
|
|
@@ -589,11 +579,11 @@ interface SandboxCheckpoint {
|
|
|
589
579
|
}
|
|
590
580
|
declare const edit: EditApi;
|
|
591
581
|
declare const timeline: TimelineApi;
|
|
592
|
-
declare const entities:
|
|
593
|
-
declare const relations:
|
|
582
|
+
declare const entities: BusinessEntityFacade;
|
|
583
|
+
declare const relations: BusinessRelationFacade;
|
|
594
584
|
declare function checkpoint(): SandboxCheckpoint;
|
|
595
585
|
declare function rollbackTo(cp: SandboxCheckpoint): void;
|
|
596
586
|
declare const inputs: Readonly<Record<string, unknown>>;
|
|
597
587
|
//#endregion
|
|
598
|
-
export type { AudioMediaAssetFact, BoundedDerivedSequencePayload, BoundedNativeSequencePayload, CaptionFontDescriptor, CaptionSegmentSelection, CaptionStyleFields, CaptionTextRange, CaptionTextSelection, ClipEntityId, ClipPlacement, ComposedPhoneticContent, ComposedScriptContent, CreateEntityInput, DeleteBgmInput, DeleteClipInput, DeleteClipTreeInput, DeleteEntityInput, DeleteVoiceoverInput, EditApi, EmptyRelationKind,
|
|
588
|
+
export type { AudioMediaAssetFact, BoundedDerivedSequencePayload, BoundedNativeSequencePayload, BusinessEntityFacade, BusinessRelationFacade, CaptionFontDescriptor, CaptionSegmentSelection, CaptionStyleFields, CaptionTextRange, CaptionTextSelection, ClipEntityId, ClipPlacement, ComposedPhoneticContent, ComposedScriptContent, CreateEntityInput, DeleteBgmInput, DeleteClipInput, DeleteClipTreeInput, DeleteEntityInput, DeleteVoiceoverInput, EditApi, EmptyRelationKind, EntityId, EntityPayloadByKind, EntityStoreSnapshot, ImageMediaAssetFact, InsertCaptionClipInput, InsertClipInput, InsertMediaClipInput, InsertMediaClipsInput, InsertPlacedClipInput, JsonObject, JsonPrimitive, JsonValue, KnownEntityKind, KnownRelationKind, LinearClipSpeed, LinkAudioScriptSourceRelationInput, LinkClipAnchorRelationInput, LinkGeneratedRelationInput, LinkPhoneticScriptRenderRelationInput, LinkRelationInput, MediaAssetFact, MediaAssetPayload, MediaClipInsertion, MoveClipInput, MoveClipsToStartsInput, MoveSequentialClipsInput, MoveVoiceoverInput, PatchCaptionStyleInput, ReplaceClipContentInput, ReplaceMediaClipInput, ReplaceSequentialClipsInput, ReplacementMediaClipInput, SandboxCheckpoint, SandboxEntity, SandboxRelation, ScriptTextSegment, SequenceDuration, SequenceRange, SequentialClipAnchor, SetBgmInput, SetCaptionVisibilityInput, SetClipPlacementInput, SetClipSpeedInput, SetClipVolumeInput, StoredEntityPayload, TimelineApi, TrimClipInput, UnboundedConstantSequencePayload, UnlinkRelationInput, UpdateClipInput, UpdateClipMarkerInput, UpdateEntityInput, VideoMediaAssetFact, VisualMediaAssetFact, VoiceDescriptor, VoiceMediaAssetFact, VoiceoverCaptionFact, VoiceoverTakeInput, VoiceoverTakeResult, checkpoint, edit, entities, inputs, relations, rollbackTo, timeline };
|
|
599
589
|
//# sourceMappingURL=sandbox-api.d.mts.map
|
|
@@ -422,9 +422,8 @@ function entityToRow(entity) {
|
|
|
422
422
|
//#region ../medeo-dsl/src/invariants.ts
|
|
423
423
|
/**
|
|
424
424
|
* Media variants own their Asset identity directly: a `physical-asset`
|
|
425
|
-
* Relation may not bind them. Caption
|
|
426
|
-
*
|
|
427
|
-
* open for future physical pipeline semantics.
|
|
425
|
+
* Relation may not bind them. Caption may associate with a physical text Asset
|
|
426
|
+
* independently of its AudioScript composition.
|
|
428
427
|
*/
|
|
429
428
|
function validateMediaAssetIdentity(entity, index) {
|
|
430
429
|
return [...index.relationsOf(entity)].filter((relation) => relation.kind === "physical-asset").map(() => ({
|
|
@@ -583,11 +582,6 @@ function validatePhoneticComposition(phonetic, index, entities = []) {
|
|
|
583
582
|
}
|
|
584
583
|
function validateVariantComposition(variant, index, entities, kind) {
|
|
585
584
|
const issues = [];
|
|
586
|
-
if (kind === "caption" && ofKind([...index.relationsOf(variant)], "physical-asset").length > 0) issues.push({
|
|
587
|
-
code: "caption_physical_asset_forbidden",
|
|
588
|
-
entityId: variant.entityId,
|
|
589
|
-
message: "Caption text is composed from its AudioScript; Caption must not bind a Physical Asset"
|
|
590
|
-
});
|
|
591
585
|
const rows = {
|
|
592
586
|
entities: collectRelatedEntities([...entities, variant], index).entities.map((ref) => entityToRow(ref.current())),
|
|
593
587
|
relations: []
|
|
@@ -2388,4 +2382,4 @@ function replayJournalSync(adapter, journal) {
|
|
|
2388
2382
|
//#endregion
|
|
2389
2383
|
export { isMediaAssetVariantKind as a, renderCompactProjection as c, createRelationId as i, EntitySandbox as n, collectAffectedPartIds as o, createEntityId as r, renderPreview as s, EditSandboxSession as t };
|
|
2390
2384
|
|
|
2391
|
-
//# sourceMappingURL=script-session-
|
|
2385
|
+
//# sourceMappingURL=script-session-IqAIVBCM.mjs.map
|