Repository navigation
feat(media): the @dcmjs-org/media bundle - #586
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds the
@dcmjs-org/mediabundle package — one dependency for all three bulk-data surfaces. The dicomdir, pdfs, and video waves each landed as their own scoped package on this staging branch; this package ties them together so a consumer who wants "the media stuff" installs one thing and gets the namespace shapes dcmjs v2 consumers already know:media(the DICOMDIR builder),encapsulated(PDF and video wrapping, both directions), andimage(codec-free image instances plus the JPEG/MP4 header readers).createVideoEventSource, the streaming MP4 → events source, rides along as a top-level named export since v2 never gave it a namespace.The namespace shapes come from v2's
src/index.js— themedia,encapsulated, andimageobject literals there are reproduced name for name — but every import here comes from the three workspace packages (@dcmjs-org/dicomdir,@dcmjs-org/pdfs,@dcmjs-org/video, allworkspace:*), not from v2 source paths. The bundle adds no behavior of its own: every export is the same function object as the underlying package's export.Everything in this PR is hand-written, and it is small on purpose: a package.json, a ~68-line index that is almost entirely import/export lists, a README, and a smoke test. The test is the real contract: it asserts identity (
toBe, not shape) between every re-exported name and the underlying package's export, so a future refactor that silently swaps in a wrapper or a copy fails the suite. One test also drives a real PDF round trip through the bundle (encapsulated.encapsulatePdf→encapsulated.extractEncapsulatedPdf, byte-identical) to prove the re-exports are wired to working code, not just truthy objects.5 new tests. Full suite on this branch: 935 passing (947 total, 12 skipped), build green.
🤖 Generated with Claude Code