@contractspec/lib.content-gen 3.7.6 → 3.7.7
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.
- package/README.md +63 -32
- package/dist/browser/generators/blog.js +132 -132
- package/dist/browser/generators/email.js +132 -132
- package/dist/browser/generators/index.js +132 -132
- package/dist/browser/generators/landing-page.js +132 -132
- package/dist/browser/generators/social.js +132 -132
- package/dist/browser/i18n/catalogs/index.js +112 -112
- package/dist/browser/i18n/index.js +132 -132
- package/dist/browser/i18n/locale.js +2 -2
- package/dist/browser/i18n/messages.js +112 -112
- package/dist/browser/index.js +132 -132
- package/dist/browser/seo/index.js +132 -132
- package/dist/browser/seo/optimizer.js +132 -132
- package/dist/generators/blog.js +132 -132
- package/dist/generators/email.js +132 -132
- package/dist/generators/index.d.ts +1 -1
- package/dist/generators/index.js +132 -132
- package/dist/generators/landing-page.d.ts +1 -1
- package/dist/generators/landing-page.js +132 -132
- package/dist/generators/social.js +132 -132
- package/dist/i18n/catalogs/index.d.ts +1 -1
- package/dist/i18n/catalogs/index.js +112 -112
- package/dist/i18n/index.d.ts +7 -7
- package/dist/i18n/index.js +132 -132
- package/dist/i18n/locale.d.ts +1 -1
- package/dist/i18n/locale.js +2 -2
- package/dist/i18n/messages.js +112 -112
- package/dist/index.d.ts +1 -1
- package/dist/index.js +132 -132
- package/dist/node/generators/blog.js +132 -132
- package/dist/node/generators/email.js +132 -132
- package/dist/node/generators/index.js +132 -132
- package/dist/node/generators/landing-page.js +132 -132
- package/dist/node/generators/social.js +132 -132
- package/dist/node/i18n/catalogs/index.js +112 -112
- package/dist/node/i18n/index.js +132 -132
- package/dist/node/i18n/locale.js +2 -2
- package/dist/node/i18n/messages.js +112 -112
- package/dist/node/index.js +132 -132
- package/dist/node/seo/index.js +132 -132
- package/dist/node/seo/optimizer.js +132 -132
- package/dist/seo/index.js +132 -132
- package/dist/seo/optimizer.d.ts +1 -1
- package/dist/seo/optimizer.js +132 -132
- package/dist/types.d.ts +1 -1
- package/package.json +5 -5
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
|
-
|
|
7
|
+
## What It Provides
|
|
7
8
|
|
|
8
|
-
|
|
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
|
-
|
|
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
|
-
|
|
16
|
+
`npm install @contractspec/lib.content-gen`
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
or
|
|
19
19
|
|
|
20
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|