@contractspec/lib.image-gen
v1.7.29
Published
AI-powered image generation for hero, social, thumbnail, OG, and illustration
Maintainers
Readme
@contractspec/lib.image-gen
Website: https://contractspec.io
AI-powered image generation for hero, social, thumbnail, OG, and illustration.
What It Provides
- Layer: lib.
- Consumers: video-gen, bundles.
src/docs/contains docblocks and documentation-facing exports.- Related ContractSpec packages include
@contractspec/lib.content-gen,@contractspec/lib.contracts-integrations,@contractspec/lib.contracts-spec,@contractspec/tool.bun,@contractspec/tool.typescript. src/docs/contains docblocks and documentation-facing exports.
Installation
npm install @contractspec/lib.image-gen
or
bun add @contractspec/lib.image-gen
Usage
Import the root entrypoint from @contractspec/lib.image-gen, or choose a documented subpath when you only need one part of the package surface.
Architecture
src/docs/contains docblocks and documentation-facing exports.src/generatorsis part of the package's public or composition surface.src/i18nis part of the package's public or composition surface.src/index.tsis the root public barrel and package entrypoint.src/presetsis part of the package's public or composition surface.src/types.tsis shared public type definitions.
Public Entry Points
- Export
.resolves through./src/index.ts. - Export
./docs/generators.docblockresolves through./src/docs/generators.docblock.ts. - Export
./docs/image-gen.docblockresolves through./src/docs/image-gen.docblock.ts. - Export
./generatorsresolves through./src/generators/index.ts. - Export
./generators/image-generatorresolves through./src/generators/image-generator.ts. - Export
./generators/prompt-builderresolves through./src/generators/prompt-builder.ts. - Export
./generators/style-resolverresolves through./src/generators/style-resolver.ts. - Export
./i18nresolves through./src/i18n/index.ts. - Export
./i18n/catalogsresolves through./src/i18n/catalogs/index.ts. - Export
./i18n/catalogs/enresolves through./src/i18n/catalogs/en.ts. - The package publishes 20 total export subpaths; keep docs aligned with
package.json.
Local Commands
bun run dev— contractspec-bun-build devbun run build— bun run prebuild && bun run build:bundle && bun run build:typesbun run test— bun test --pass-with-no-testsbun run lint— bun lint:fixbun run lint:check— biome check .bun run lint:fix— biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .bun run typecheck— tsc --noEmitbun run publish:pkg— bun publish --tolerate-republish --ignore-scripts --verbosebun run publish:pkg:canary— bun publish:pkg --tag canarybun run clean— rimraf dist .turbobun run build:bundle— contractspec-bun-build transpilebun run build:types— contractspec-bun-build typesbun run prebuild— contractspec-bun-build prebuild
Recent Updates
- Replace eslint+prettier by biomejs to optimize speed.
- Add @contractspec/lib.image-gen package with full test suite.
Notes
- Generator interface is shared with the content-gen pattern; keep the adapter shape consistent.
- Preset schemas affect all generated images; field changes require validation across consumers.
- Do not hardcode locale-specific strings outside the i18n subpath.
