@contractspec/lib.content-gen 3.7.6 → 3.7.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +63 -32
  2. package/dist/browser/generators/blog.js +132 -132
  3. package/dist/browser/generators/email.js +132 -132
  4. package/dist/browser/generators/index.js +132 -132
  5. package/dist/browser/generators/landing-page.js +132 -132
  6. package/dist/browser/generators/social.js +132 -132
  7. package/dist/browser/i18n/catalogs/index.js +112 -112
  8. package/dist/browser/i18n/index.js +132 -132
  9. package/dist/browser/i18n/locale.js +2 -2
  10. package/dist/browser/i18n/messages.js +112 -112
  11. package/dist/browser/index.js +132 -132
  12. package/dist/browser/seo/index.js +132 -132
  13. package/dist/browser/seo/optimizer.js +132 -132
  14. package/dist/generators/blog.js +132 -132
  15. package/dist/generators/email.js +132 -132
  16. package/dist/generators/index.d.ts +1 -1
  17. package/dist/generators/index.js +132 -132
  18. package/dist/generators/landing-page.d.ts +1 -1
  19. package/dist/generators/landing-page.js +132 -132
  20. package/dist/generators/social.js +132 -132
  21. package/dist/i18n/catalogs/index.d.ts +1 -1
  22. package/dist/i18n/catalogs/index.js +112 -112
  23. package/dist/i18n/index.d.ts +7 -7
  24. package/dist/i18n/index.js +132 -132
  25. package/dist/i18n/locale.d.ts +1 -1
  26. package/dist/i18n/locale.js +2 -2
  27. package/dist/i18n/messages.js +112 -112
  28. package/dist/index.d.ts +1 -1
  29. package/dist/index.js +132 -132
  30. package/dist/node/generators/blog.js +132 -132
  31. package/dist/node/generators/email.js +132 -132
  32. package/dist/node/generators/index.js +132 -132
  33. package/dist/node/generators/landing-page.js +132 -132
  34. package/dist/node/generators/social.js +132 -132
  35. package/dist/node/i18n/catalogs/index.js +112 -112
  36. package/dist/node/i18n/index.js +132 -132
  37. package/dist/node/i18n/locale.js +2 -2
  38. package/dist/node/i18n/messages.js +112 -112
  39. package/dist/node/index.js +132 -132
  40. package/dist/node/seo/index.js +132 -132
  41. package/dist/node/seo/optimizer.js +132 -132
  42. package/dist/seo/index.js +132 -132
  43. package/dist/seo/optimizer.d.ts +1 -1
  44. package/dist/seo/optimizer.js +132 -132
  45. package/dist/types.d.ts +1 -1
  46. package/package.json +8 -8
package/README.md CHANGED
@@ -1,44 +1,75 @@
1
1
  # @contractspec/lib.content-gen
2
2
 
3
- Website: https://contractspec.io/
3
+ Website: https://contractspec.io
4
4
 
5
+ **AI-powered content generation for blog, email, and social.**
5
6
 
6
- Composable generators that turn ContractSpec briefs, specs, and telemetry into publish-ready marketing artifacts: blogs, landing pages, SEO metadata, email drips, and social posts.
7
+ ## What It Provides
7
8
 
8
- ## Modules
9
+ - **Layer**: lib.
10
+ - **Consumers**: image-gen, voice, video-gen, bundles.
11
+ - Related ContractSpec packages include `@contractspec/lib.ai-providers`, `@contractspec/lib.contracts-integrations`, `@contractspec/lib.contracts-spec`, `@contractspec/tool.bun`, `@contractspec/tool.typescript`.
12
+ - Related ContractSpec packages include `@contractspec/lib.ai-providers`, `@contractspec/lib.contracts-integrations`, `@contractspec/lib.contracts-spec`, `@contractspec/tool.bun`, `@contractspec/tool.typescript`.
9
13
 
10
- - `BlogGenerator` – creates narrative posts from feature briefs and spec metadata.
11
- - `LandingPageGenerator` – builds hero copy, feature bullets, proof points, and CTAs.
12
- - `EmailCampaignGenerator` – drafts onboarding, announcement, and nurture emails.
13
- - `SocialPostGenerator` – outputs multi-channel snippets with hashtags and CTAs.
14
- - `SeoOptimizer` – extracts keywords, meta tags, slugs, and Schema.org markup.
14
+ ## Installation
15
15
 
16
- Each generator accepts a `ContentBrief` that captures audience, value props, proof points, and compliance notes. If an `LLMProvider` is supplied, outputs blend AI creativity with deterministic templates; otherwise a deterministic fallback ensures consistent copy.
16
+ `npm install @contractspec/lib.content-gen`
17
17
 
18
- ## Quickstart
18
+ or
19
19
 
20
- ```ts
21
- import {
22
- BlogGenerator,
23
- LandingPageGenerator,
24
- EmailCampaignGenerator,
25
- SocialPostGenerator,
26
- } from '@contractspec/lib.content-gen/generators';
27
- import { SeoOptimizer } from '@contractspec/lib.content-gen/seo';
20
+ `bun add @contractspec/lib.content-gen`
28
21
 
29
- const brief = {
30
- title: 'Policy-safe Workflow Automation',
31
- summary: 'Automatically compiles intents into auditable workflows.',
32
- problems: ['Manual reviews slow compliance', 'Engineers rebuild flows for every tenant'],
33
- solutions: ['Spec-first workflows', 'Policy enforcement', 'Multi-tenant guardrails'],
34
- audience: { role: 'COO', industry: 'Fintech', maturity: 'scaleup' },
35
- };
22
+ ## Usage
36
23
 
37
- const blog = await new BlogGenerator().generate(brief);
38
- const landing = await new LandingPageGenerator().generate(brief);
39
- const email = await new EmailCampaignGenerator().generate({ brief, variant: 'announcement' });
40
- const social = await new SocialPostGenerator().generate(brief);
41
- const seo = new SeoOptimizer().optimize(brief);
42
- ```
24
+ Import the root entrypoint from `@contractspec/lib.content-gen`, or choose a documented subpath when you only need one part of the package surface.
43
25
 
44
- Outputs return structured blocks that can be rendered directly in the marketing site or exported to CMS tools.
26
+ ## Architecture
27
+
28
+ - `src/generators` is part of the package's public or composition surface.
29
+ - `src/i18n` is part of the package's public or composition surface.
30
+ - `src/index.ts` is the root public barrel and package entrypoint.
31
+ - `src/seo` is part of the package's public or composition surface.
32
+ - `src/types.ts` is shared public type definitions.
33
+
34
+ ## Public Entry Points
35
+
36
+ - Export `.` resolves through `./src/index.ts`.
37
+ - Export `./generators` resolves through `./src/generators/index.ts`.
38
+ - Export `./generators/blog` resolves through `./src/generators/blog.ts`.
39
+ - Export `./generators/email` resolves through `./src/generators/email.ts`.
40
+ - Export `./generators/landing-page` resolves through `./src/generators/landing-page.ts`.
41
+ - Export `./generators/social` resolves through `./src/generators/social.ts`.
42
+ - Export `./i18n` resolves through `./src/i18n/index.ts`.
43
+ - Export `./i18n/catalogs` resolves through `./src/i18n/catalogs/index.ts`.
44
+ - Export `./i18n/catalogs/en` resolves through `./src/i18n/catalogs/en.ts`.
45
+ - Export `./i18n/catalogs/es` resolves through `./src/i18n/catalogs/es.ts`.
46
+ - The package publishes 17 total export subpaths; keep docs aligned with `package.json`.
47
+
48
+ ## Local Commands
49
+
50
+ - `bun run dev` — contractspec-bun-build dev
51
+ - `bun run build` — bun run prebuild && bun run build:bundle && bun run build:types
52
+ - `bun run test` — bun test --pass-with-no-tests
53
+ - `bun run lint` — bun lint:fix
54
+ - `bun run lint:check` — biome check .
55
+ - `bun run lint:fix` — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
56
+ - `bun run typecheck` — tsc --noEmit
57
+ - `bun run publish:pkg` — bun publish --tolerate-republish --ignore-scripts --verbose
58
+ - `bun run publish:pkg:canary` — bun publish:pkg --tag canary
59
+ - `bun run clean` — rimraf dist .turbo
60
+ - `bun run build:bundle` — contractspec-bun-build transpile
61
+ - `bun run build:types` — contractspec-bun-build types
62
+ - `bun run prebuild` — contractspec-bun-build prebuild
63
+
64
+ ## Recent Updates
65
+
66
+ - Replace eslint+prettier by biomejs to optimize speed.
67
+ - Resolve lint, build, and test failures across voice, workspace, library, and composio.
68
+ - Add first-class transport, auth, versioning, and BYOK support across all integrations.
69
+ - Add AI provider ranking system with ranking-driven model selection.
70
+ - Add full i18n support across all 10 packages (en/fr/es, 460 keys).
71
+
72
+ ## Notes
73
+
74
+ - Generator interface is shared across media libs (image-gen, voice, video-gen); keep it stable.
75
+ - i18n keys must stay in sync with consuming packages.