Skip to content

v0.3.0 — public initialisers

Choose a tag to compare

@SteliyanH SteliyanH released this 28 Aug 11:37
· 19 commits to main since this release
c33fd89

Swift synthesises a memberwise initialiser for a public struct, but that initialiser is internal. So all 27 mirror types in this package were readable from outside the module and impossible to construct.

A document format whose types only its own package can build is half a format. A migration tool, a test fixture in a host app, or anything writing a project without going through a Video hits the same wall — which is where this was found: a list-row test in kadr-reels-studio that needed a PresetData.

let document = KadrDocument(video: VideoData(
    clips: [.transition(TransitionData(kind: "fade", duration: half, direction: nil))],
    audioTracks: [], preset: PresetData(kind: "tiktok", ...), overlays: [],
    crop: nil, quality: QualityData(kind: "automatic", ...), captions: []
))

62 tests.