@plasius/video
v0.1.23
Published
Standalone npm package for video generation components and helpers for the Plasius ecosystem
Maintainers
Readme
@plasius/video
Video generation components and helpers for the Plasius ecosystem.
Apache-2.0. ESM + CJS builds. TypeScript types included.
Install
npm install @plasius/videoUsage
import {
AIVideoGenerationScreen,
createAIVideoGenerationDemoModel,
aiVideoGenerationTokens,
aiVideoStageFlow,
videoTranslations,
videoPackageInfo,
} from "@plasius/video";
console.log(videoPackageInfo.name, videoPackageInfo.version);
console.log(aiVideoGenerationTokens.color.background);
console.log(aiVideoStageFlow.map((stage) => stage.stage));
console.log(Object.keys(videoTranslations));
const model = createAIVideoGenerationDemoModel("imageSelection");
void AIVideoGenerationScreen;
void model;Node.js Version
This project uses Node.js 24 by default. The version is pinned in the .nvmrc file.
If you use nvm, run:
nvm usePackage Scope
@plasius/video is intended to host reusable video generation interfaces and shared view-model logic used across Plasius applications.
AI Video Generation Visual Styling Pieces
This package now includes a design-system aligned screen scaffold for:
- Prompt entry
- Image generation and selection
- Video generation and motion editing
- Playback controls
- Voiceover panel
- Export state
Primary exports:
AIVideoGenerationScreenAIVideoGenerationStudioDemocreateAIVideoGenerationDemoModelaiVideoGenerationTokensaiVideoStageFlowgetTranslatedAIVideoStageFlowvideoTranslationsAI_VIDEO_GENERATION_SCREEN_STYLES
Translations
AI video generation demo labels, stage metadata, screen controls, and accessibility labels are packaged as en-GB defaults and resolved through @plasius/translations.
React components keep English fallback defaults when the host translator has not loaded the dictionary, and host applications can load or override the same keys.
import { getTranslator } from "@plasius/translations";
import { videoTranslations } from "@plasius/video";
const i18n = getTranslator();
for (const [language, dictionary] of Object.entries(videoTranslations)) {
i18n.loadTranslations(language, dictionary);
}Reference design document:
State Flow Summary
The staged flow aligns to the screen design sequence:
idlegeneratingImagesimageSelectiongeneratingVideoplaybackvoiceoverexport
Development
npm install
npm run lint
npm run typecheck
npm run build
npm run test:coverage
npm run demo:runQuality Gates
- CI enforces
lint,typecheck, runtime dependency audit (npm audit --omit=dev --audit-level=high), build, and test coverage. - Coverage thresholds are enforced in Vitest (
lines/functions/statements >= 80,branches >= 70).
Demo Sanity Check
npm run demo:runPublishing
This package is published via GitHub CD only.
- Configure npm Trusted Publishing for this repository's
cd.ymlworkflow and GitHubproductionenvironment. - Run
.github/workflows/cd.ymlvia Actions -> CD (Publish to npm) -> Run workflow. - Select the version bump (
patch,minor,major, ornone) and optional pre-release id.
Contributing
We welcome contributions. See:
License
Licensed under the Apache-2.0 License.
Release integrity
CI keeps the administrative contributor registry outside Git and npm package
artifacts using exact, case-normalised path checks. Reviewed CI runs on explicit
GitHub-hosted runners with package-manager caching disabled; fork PR code is
denied. Publication uses the GitHub-hosted production job with Node 24 and
pinned npm 11.6.2. It is token-free and proceeds only while the prepared SHA
is the exact main head after successful push-triggered CI. Do not dispatch CD
until the npm trusted-publisher binding is verified.
