@bevyl-ai/adobe-prgraphic
v0.2.6
Published
Typed contract for the Adobe Premiere project payload embedded in a MOGRT
Readme
Adobe PRGRAPHIC
This package owns the typed contract for the Premiere project XML embedded in a Premiere-authored MOGRT.
schema/adobe-prgraphic.xsd describes the inspected text, media, sequence, and
audio-routing object graph. Other Premiere data remains opaque; this is not a
second timeline model or a complete Adobe format specification.
Truth boundary
TrackType[] is Truth 1. MogrtRenderGraph is the internal typed Truth 2
representation of one constructed MOGRT:
Truth 1 TrackType[]
-> MogrtRenderGraph { canvas, capsuleId, frameRate, durationInFrames, layers, project }
-> definition.json
-> project.prgraphiclayers is an ordered, non-empty collection. N co-timed canonical text items
become one MOGRT with N internal text layers. The definition and project writers
consume the same graph, including the layer IDs and resolved fonts allocated
during construction. They do not independently reinterpret Truth 1.
A logical text layer may contain multiple Adobe text fragments when faithfully constructing wrapped inline backgrounds requires them. Each fragment may own an Adobe Shape background. Those fragments and shapes are construction details of the same canonical item, not additional logical layers or timeline items.
buildMogrt is the package boundary. It accepts canonical Bevyl tracks plus
their sequence and font context, then generates the complete deterministic MOGRT,
including definition.json, project.prgraphic, and the embedded
project.prproj. No Premiere-authored seed is read or modified at runtime.
The XSD generates both TypeScript interfaces and serializers for filter
components, their nested parameter references, the three parameter types, and
binary envelopes, and the inspected file-media/source/stream subset.
buildImageSource owns still metadata for both local probes; IDs, timeline
placement, and master-clip registration remain with the outer builder.
buildAvSource handles the inspected normalized H.264 and mono/stereo audio
metadata. Images, video, and audio share file registration and source references;
clip trims, links, mute, and volume remain outside these source builders.
All source, clip, sequence, settings, routing, and media-effect builders return
schema values rather than DOM nodes or dispatch envelopes. write-project-graph.ts
owns scaffold IDs and ordered project composition, calling the known serializers
directly. serialize-project.ts creates and encodes the XML document. There is no
global object union or runtime dispatcher. GraphicsComponents describes the
filter/parameter collection produced by AdobeProjectBuilder, not a complete
Premiere document. project-xml.ts owns final XML encoding (including restoration
of explicit empty binary text after parsing) and the small DOM helpers used by
the probes. Imported-graphic ID remapping remains fixture-specific.
The XSD's wire: annotations record Adobe's compact
version ordering and omitted defaults. New scalar fields are emitted from the
schema automatically; unsupported field types fail generation rather than
silently disappearing. This is a generator for the owned subset, not a general
XSD serializer or validator. Serializer discovery follows the XSD declarations;
there are no parallel lists of component and nested types to maintain.
Unsupported Component.Node input is excluded from the type and rejected at
runtime rather than silently dropped. The separate graphics-panel parameter
Node is typed and constructed by buildGraphicGraph. Binary values use
explicit text nodes, including empty payloads required by Premiere. Sequence,
media, and component construction remain in the existing project builder.
The workspace patches @abapify/[email protected] with the property-name quoting fix
from upstream PR #192
(commit b292c639b09c5d63336ef325fc0329bbf5de19b2). This lets the XSD and typed
builders use Adobe's literal dotted names without aliases. Remove the Bun patch
when upgrading to an upstream release containing that fix.
buildMediaMotionParameters owns both inspected motion profiles; their differing
bounds, controls, and numeric formatting are intentional. Shared parameter class
IDs and static keyframe encoding live in parameter-wire.ts. Animated karaoke
keyframes retain clip-local timing.
Tests participate in TypeScript checking. Full empty-project fixtures preserve exact XML bytes at integer and fractional frame rates, including attribute order and explicit empty text. A populated graphics fixture also preserves static text, backplates, and later-page karaoke. Native open/render verification remains a separate gate. The probes apply sequence framing to their existing DOM; the public byte-oriented framing API retains compressed and uncompressed support.
Regenerate the interfaces and component serializers after editing the XSD:
bun run generate