@shoplifter/presentation-contract
v0.3.3
Published
Shared Shoplifter presentation validation, fixtures and authoring contracts
Readme
Shoplifter presentation contract
Shared validation, types, fixtures, image/source policies and declarative migrations for portable Shoplifter Astro presentations. Requires Node 24. Use the SDK and CLI with the same release version. Public installation does not authorize platform access.
Version 0.3.0 adds shared YouTube URL/thumbnail/embed helpers (also available through
/youtube) and validates explicit SDK external images. YouTube output requires the
exact HTTPS i.ytimg.com/vi/{11-character-video-id}/hqdefault.jpg URL and matching
marker ID. External image output requires a credential-free absolute HTTPS URL,
alt and positive dimensions. Conflicting image markers, responsive alternatives and
picture wrappers are rejected for these components. Existing Picture asset ownership
checks still run in trusted platform validation.
imageMarkupWarnings returns a non-blocking, URL-free warning for ExternalImage
usage; its use constitutes consent to third-party image requests. YouTube thumbnails
do not emit this warning. Raw source images and external CSS images stay restricted.
The root export provides project/definition/content validation, deterministic fixtures,
type generation, data requirements, image policy, source admission and migrations.
/editor exposes the editor configuration helpers. Project files are authoritative;
unsupported data sources, executable migrations and unsafe paths are rejected.
The upload policy admits project contract files, supported files under src/,
declared raster assets and decorative SVG/font assets. It excludes environment files,
credential stores, private keys, generated fixtures, caches and unrelated trees.
The CLI applies .gitignore and .shoplifterignore; required excluded files cause
an explicit error. Mandatory exclusions cannot be reversed by ignore negations.
Backend admission independently enforces the same policy.
This is validation and developer tooling, not an authorization boundary. Services must authenticate users, enforce channel ownership and validate build output themselves. Retained revisions keep their original source and exact runtime dependencies.
Shoplifter-owned code in this package is Apache-2.0. Third-party code retains its
original license. Read LICENSE, NOTICE, THIRD_PARTY_NOTICES and the generated
dist/THIRD_PARTY_NOTICES. Only these package files are licensed for public release;
the surrounding monorepo and backend remain private.
