create-ailk 0.6.1 → 0.7.0
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 +43 -4
- package/component-catalog.json +146 -21
- package/component-catalog.md +9 -6
- package/dist/add-module-core.d.ts +22 -0
- package/dist/add-module-core.js +50 -0
- package/dist/add-module.d.ts +89 -0
- package/dist/add-module.js +334 -0
- package/dist/category-profile.d.ts +126 -0
- package/dist/category-profile.js +262 -0
- package/dist/cli.js +73 -11
- package/dist/index.d.ts +4 -2
- package/dist/index.js +6 -1
- package/dist/lib/extract-module-bundle.d.ts +56 -1
- package/dist/lib/extract-module-bundle.js +165 -13
- package/dist/lib/license-key-files.d.ts +15 -0
- package/dist/lib/license-key-files.js +102 -0
- package/dist/lib/pro-callout.d.ts +16 -10
- package/dist/lib/pro-callout.js +26 -3
- package/dist/license-set.d.ts +34 -0
- package/dist/license-set.js +194 -0
- package/dist/module-architecture.d.ts +20 -0
- package/dist/module-architecture.js +77 -19
- package/dist/modules/commerce/0.6.1.tar.gz +0 -0
- package/dist/modules/docs-blog/0.6.1.tar.gz +0 -0
- package/dist/modules/marketing-site/0.6.1.tar.gz +0 -0
- package/dist/modules/minimalism-site/0.6.1.tar.gz +0 -0
- package/dist/modules/multi-tenant/0.6.1.tar.gz +0 -0
- package/dist/modules/saas-product/0.6.1.tar.gz +0 -0
- package/dist/modules/scheduling/0.6.1.tar.gz +0 -0
- package/dist/modules/signal-collectors/0.6.1.tar.gz +0 -0
- package/dist/modules/simple-service/0.6.1.tar.gz +0 -0
- package/dist/modules/workspace/0.6.1.tar.gz +0 -0
- package/dist/parse-args.d.ts +7 -0
- package/dist/parse-args.js +23 -1
- package/dist/programmatic.d.ts +46 -0
- package/dist/programmatic.js +130 -9
- package/dist/site-chrome.d.ts +18 -7
- package/dist/site-chrome.js +32 -14
- package/dist/site-roster.d.ts +127 -0
- package/dist/site-roster.js +494 -0
- package/dist/surfaces.d.ts +20 -7
- package/dist/surfaces.js +149 -28
- package/dist/sync-routes.d.ts +9 -0
- package/dist/sync-routes.js +2 -2
- package/dist/template-manifest.d.ts +58 -2
- package/dist/template-manifest.js +196 -69
- package/package.json +6 -4
- package/site-templates/_base/content/en/BookCall/book-call.mdx +53 -0
- package/site-templates/_base/content/en/GlossaryList/glossary.mdx +66 -0
- package/site-templates/_base/content/en/NewsletterSignup/newsletter.mdx +68 -0
- package/site-templates/_base/content/en/Pricing/pricing.mdx +71 -62
- package/site-templates/_base/content/en/PrivacyPage/privacy.mdx +2 -3
- package/site-templates/_base/content/en/TermsPage/terms.mdx +2 -3
- package/site-templates/_base/content/en/UseCase/first-use-case.mdx +23 -0
- package/site-templates/_base/content/en/UseCase/second-use-case.mdx +23 -0
- package/site-templates/_base/content/en/UseCase/third-use-case.mdx +23 -0
- package/site-templates/designs/minimalism/DESIGN.md +162 -0
- package/site-templates/designs/standard/DESIGN.md +162 -0
- package/site-templates/marketing-site/DESIGN.md +55 -41
- package/site-templates/marketing-site/TEMPLATE-MANIFEST.json +312 -57
- package/site-templates/marketing-site/TEMPLATE-MANIFEST.md +209 -90
- package/site-templates/marketing-site/ailk-template.json +1 -0
- package/site-templates/marketing-site-free/DESIGN.md +55 -41
- package/site-templates/marketing-site-free/TEMPLATE-MANIFEST.json +260 -66
- package/site-templates/marketing-site-free/TEMPLATE-MANIFEST.md +294 -114
- package/site-templates/marketing-site-free/ailk-template.json +3 -2
- package/site-templates/minimalism-site/DESIGN.md +54 -40
- package/site-templates/minimalism-site/TEMPLATE-MANIFEST.json +246 -19
- package/site-templates/minimalism-site/TEMPLATE-MANIFEST.md +185 -51
- package/site-templates/minimalism-site/ailk-template.json +3 -2
- package/site-templates/minimalism-site/content/en/BookCall/book-call.mdx +53 -0
- package/site-templates/minimalism-site/content/en/ContactPage/contact.mdx +3 -37
- package/site-templates/minimalism-site/content/en/PurchasePolicyPage/purchase-policy.mdx +124 -0
- package/site-templates/saas-product/DESIGN.md +55 -41
- package/site-templates/simple-service/DESIGN.md +55 -41
- package/site-templates/simple-service/TEMPLATE-MANIFEST.json +135 -26
- package/site-templates/simple-service/TEMPLATE-MANIFEST.md +114 -59
- package/site-templates/simple-service/ailk-template.json +4 -3
- package/site-templates/simple-service/content/en/BookCall/book-call.mdx +53 -0
- package/site-templates/simple-service/content/en/ContactPage/contact.mdx +1 -36
- package/site-templates/simple-service/content/en/PurchasePolicyPage/purchase-policy.mdx +124 -0
- package/templates/.claude/settings.json +15 -0
- package/templates/.claude/skills/README.md +8 -8
- package/templates/.claude/skills/{scaffold-auth → add-auth}/SKILL.md +7 -7
- package/templates/.claude/skills/{scaffold-auth → add-auth}/references/env-vars.md +2 -2
- package/templates/.claude/skills/{scaffold-auth → add-auth}/references/oauth-app-setup.md +3 -3
- package/templates/.claude/skills/{scaffold-page → add-page}/SKILL.md +76 -62
- package/templates/.claude/skills/add-page/references/page-types.md +111 -0
- package/templates/.claude/skills/{scaffold-page → add-page}/templates/content.mdx.tmpl +4 -4
- package/templates/.claude/skills/{scaffold-page → add-page}/templates/route.tsx.tmpl +1 -1
- package/templates/.claude/skills/{audit-site → check-site}/SKILL.md +16 -17
- package/templates/.claude/skills/{audit-site → check-site}/references/common-errors.md +3 -3
- package/templates/.claude/skills/{audit-site → check-site}/references/findings-glossary.md +16 -14
- package/templates/.claude/skills/{audit-site → check-site}/references/severity-levels.md +1 -1
- package/templates/.claude/skills/fill-page/SKILL.md +180 -0
- package/templates/.claude/skills/fill-page/profiles/plumbing.yaml +80 -0
- package/templates/.claude/skills/fill-page/references/section-sources.md +41 -0
- package/templates/.claude/skills/{provision-config → setup-deploy}/SKILL.md +8 -8
- package/templates/.claude/skills/{provision-config → setup-deploy}/references/env-vars-template.md +2 -2
- package/templates/.claude/skills/{provision-config → setup-deploy}/references/runbook-template.md +8 -8
- package/templates/.claude/skills/{provision-config → setup-deploy}/references/vercel-json-template.md +1 -1
- package/templates/.claude/skills/upgrade-plan/SKILL.md +117 -0
- package/templates/.claude/skills/upgrade-plan/references/options.md +24 -0
- package/templates/.claude/skills/upgrade-plan/scripts/upgrade-plan.ts +527 -0
- package/templates/.github/workflows/ci.yml +5 -0
- package/templates/CLAUDE.md +8 -2
- package/templates/DESIGN.md +52 -45
- package/templates/README.md +108 -46
- package/templates/apps/api/.env.example +2 -1
- package/templates/apps/api/package.json +1 -1
- package/templates/apps/api/src/config/__tests__/index.test.ts +37 -2
- package/templates/apps/api/src/config/index.ts +19 -6
- package/templates/apps/api/src/lib/license-key-store.ts +45 -0
- package/templates/apps/api/src/lib/site.ts +5 -3
- package/templates/apps/api/src/middleware/__tests__/auth.database-not-configured.test.ts +97 -0
- package/templates/apps/api/src/middleware/auth.ts +9 -0
- package/templates/apps/api/src/routes/content/__tests__/get-page.test.ts +127 -5
- package/templates/apps/api/src/routes/content/get-page.ts +86 -2
- package/templates/apps/api/src/server.ts +6 -0
- package/templates/apps/mcp/__tests__/audit-single-page.test.ts +75 -1
- package/templates/apps/mcp/__tests__/lib/audit-single-page-readiness-scan.test.ts +57 -9
- package/templates/apps/mcp/package.json +2 -1
- package/templates/apps/mcp/src/index.ts +7 -0
- package/templates/apps/mcp/src/lib/audit-single-page.ts +36 -10
- package/templates/apps/mcp/src/lib/license-key-store.ts +45 -0
- package/templates/apps/web/__tests__/setup.ts +18 -0
- package/templates/apps/web/app/[locale]/(auth)/forgot-password/forgot-password-card.tsx +10 -2
- package/templates/apps/web/app/[locale]/(auth)/layout.tsx +2 -2
- package/templates/apps/web/app/[locale]/(auth)/reset-password/reset-password-card.tsx +10 -4
- package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-card.tsx +22 -14
- package/templates/apps/web/app/[locale]/(auth)/sign-up/sign-up-card.tsx +26 -18
- package/templates/apps/web/app/[locale]/(authed)/account/page.tsx +12 -4
- package/templates/apps/web/app/[locale]/[slug]/__tests__/page.test.tsx +35 -4
- package/templates/apps/web/app/[locale]/[slug]/page.tsx +49 -9
- package/templates/apps/web/app/[locale]/book-a-call/page.tsx +50 -0
- package/templates/apps/web/app/[locale]/careers/__tests__/page-renderer-migration.test.tsx +3 -3
- package/templates/apps/web/app/[locale]/case-studies/__tests__/page-renderer-migration.test.tsx +3 -3
- package/templates/apps/web/app/[locale]/clients/__tests__/page-renderer-migration.test.tsx +3 -4
- package/templates/apps/web/app/[locale]/contact/ContactForm.tsx +94 -33
- package/templates/apps/web/app/[locale]/contact/ConversationalIntakeWrapper.tsx +53 -23
- package/templates/apps/web/app/[locale]/contact/__tests__/ContactForm.test.tsx +96 -0
- package/templates/apps/web/app/[locale]/contact/__tests__/ConversationalIntakeWrapper.test.tsx +84 -2
- package/templates/apps/web/app/[locale]/contact/__tests__/page-renderer-migration.test.tsx +5 -6
- package/templates/apps/web/app/[locale]/contact/page.tsx +25 -7
- package/templates/apps/web/app/[locale]/courses/__tests__/page-renderer-migration.test.tsx +3 -3
- package/templates/apps/web/app/[locale]/downloads/__tests__/page-renderer-migration.test.tsx +3 -4
- package/templates/apps/web/app/[locale]/events/__tests__/page-renderer-migration.test.tsx +4 -5
- package/templates/apps/web/app/[locale]/glossary/page.tsx +50 -0
- package/templates/apps/web/app/[locale]/how-to/__tests__/page-renderer-migration.test.tsx +1 -1
- package/templates/apps/web/app/[locale]/how-to/page.tsx +25 -15
- package/templates/apps/web/app/[locale]/integrations/__tests__/page-renderer-migration.test.tsx +3 -3
- package/templates/apps/web/app/[locale]/layout.tsx +113 -51
- package/templates/apps/web/app/[locale]/newsletter/page.tsx +50 -0
- package/templates/apps/web/app/[locale]/partners/__tests__/page-renderer-migration.test.tsx +3 -3
- package/templates/apps/web/app/[locale]/products/__tests__/page-renderer-migration.test.tsx +3 -3
- package/templates/apps/web/app/[locale]/projects/__tests__/page-renderer-migration.test.tsx +4 -5
- package/templates/apps/web/app/[locale]/{shipping → purchase-policy}/page.tsx +15 -10
- package/templates/apps/web/app/[locale]/resources/__tests__/page-renderer-migration.test.tsx +4 -5
- package/templates/apps/web/app/[locale]/services/__tests__/page-renderer-migration.test.tsx +3 -3
- package/templates/apps/web/app/[locale]/software/[slug]/page.tsx +14 -1
- package/templates/apps/web/app/[locale]/software/__tests__/page-renderer-migration.test.tsx +1 -1
- package/templates/apps/web/app/[locale]/software/page.tsx +25 -15
- package/templates/apps/web/app/[locale]/tech-articles/__tests__/page-renderer-migration.test.tsx +1 -1
- package/templates/apps/web/app/[locale]/tech-articles/page.tsx +25 -15
- package/templates/apps/web/app/[locale]/testimonials/__tests__/page-renderer-migration.test.tsx +3 -4
- package/templates/apps/web/app/[locale]/use-cases/[slug]/page.tsx +48 -0
- package/templates/apps/web/app/[locale]/use-cases/__tests__/page-renderer-migration.test.tsx +3 -4
- package/templates/apps/web/app/[locale]/use-cases/page.tsx +15 -2
- package/templates/apps/web/app/[locale]/whitepapers/__tests__/page-renderer-migration.test.tsx +1 -1
- package/templates/apps/web/app/[locale]/whitepapers/page.tsx +25 -15
- package/templates/apps/web/app/error-fallback.tsx +17 -45
- package/templates/apps/web/app/not-found.tsx +14 -38
- package/templates/apps/web/app/og/route.tsx +6 -0
- package/templates/apps/web/eslint.config.mjs +3 -0
- package/templates/apps/web/instrumentation.ts +14 -0
- package/templates/apps/web/lib/__tests__/structured-data.test.tsx +38 -0
- package/templates/apps/web/lib/license-key-store.ts +52 -0
- package/templates/apps/web/lib/nav-config.ts +64 -12
- package/templates/apps/web/lib/prisma-for-auth.ts +9 -6
- package/templates/apps/web/lib/site-brand.tsx +1 -1
- package/templates/apps/web/lib/site-chrome.ts +3 -3
- package/templates/apps/web/lib/site-identity.ts +134 -0
- package/templates/apps/web/lib/site-theme.ts +11 -0
- package/templates/apps/web/messages/en.json +52 -37
- package/templates/apps/web/public/android-chrome-192x192.png +0 -0
- package/templates/apps/web/public/android-chrome-512x512.png +0 -0
- package/templates/apps/web/public/apple-touch-icon.png +0 -0
- package/templates/apps/web/public/favicon-16x16.png +0 -0
- package/templates/apps/web/public/favicon-32x32.png +0 -0
- package/templates/apps/web/public/favicon.ico +0 -0
- package/templates/apps/web/public/favicon.svg +3 -3
- package/templates/apps/web/public/logomark.svg +6 -3
- package/templates/apps/web/public/logos/ai-launch-kit-light.svg +4 -0
- package/templates/apps/web/public/logos/ai-launch-kit.svg +4 -0
- package/templates/apps/web/public/logos/atomic-agent-light.svg +4 -0
- package/templates/apps/web/public/logos/atomic-agent.svg +4 -0
- package/templates/apps/web/public/logos/salessmyth-light.svg +4 -0
- package/templates/apps/web/public/logos/salessmyth.svg +4 -0
- package/templates/apps/web/public/site.webmanifest +4 -4
- package/templates/apps/web/public/wordmark-light.svg +4 -0
- package/templates/apps/web/public/wordmark.svg +3 -3
- package/templates/apps/web/security-headers.config.ts +5 -1
- package/templates/content/_site.mdx +23 -0
- package/templates/content/en/AboutPage/about.mdx +150 -144
- package/templates/content/en/BlogList/blog.mdx +105 -0
- package/templates/content/en/ContactPage/contact.mdx +44 -85
- package/templates/content/en/FAQPage/faq.mdx +86 -57
- package/templates/content/en/HomePage/home.mdx +276 -217
- package/templates/content/en/PurchasePolicyPage/purchase-policy.mdx +182 -0
- package/templates/content/en/SoftwareProduct/product.mdx +175 -0
- package/templates/content/en/UseCasesList/use-cases.mdx +170 -0
- package/templates/database/CHANGELOG.md +7 -0
- package/templates/database/package.json +1 -1
- package/templates/package.json +3 -1
- package/templates/tools/lint-architecture.ts +315 -0
- package/templates/tools/tsconfig.json +14 -0
- package/versions.json +33 -33
- package/templates/.claude/skills/add-schema/SKILL.md +0 -277
- package/templates/.claude/skills/add-schema/references/conflict-handling.md +0 -200
- package/templates/.claude/skills/add-schema/references/file-finding.md +0 -123
- package/templates/.claude/skills/add-schema/references/schema-types.md +0 -234
- package/templates/.claude/skills/scaffold-page/references/page-types.md +0 -169
- package/templates/.claude/skills/suggest-site-pages/SKILL.md +0 -242
- package/templates/.claude/skills/suggest-site-pages/references/categories.md +0 -287
- package/templates/apps/web/app/[locale]/cancellation/page.tsx +0 -44
- package/templates/apps/web/app/[locale]/returns/page.tsx +0 -44
- package/templates/content/en/CancellationPolicyPage/cancellation.mdx +0 -108
- package/templates/content/en/LandingPage/blog.mdx +0 -83
- package/templates/content/en/LandingPage/features.mdx +0 -103
- package/templates/content/en/LandingPage/how-it-works.mdx +0 -143
- package/templates/content/en/ReturnsPolicyPage/returns.mdx +0 -108
- package/templates/content/en/ShippingPolicyPage/shipping.mdx +0 -108
package/README.md
CHANGED
|
@@ -27,11 +27,50 @@ Every recognized module except `marketing` is a paid module, delivered under a
|
|
|
27
27
|
license key rather than shipped inside this package — see
|
|
28
28
|
[Paid modules require `AILK_LICENSE_KEY`](#paid-modules-require-ailk_license_key).
|
|
29
29
|
|
|
30
|
+
### Add a purchased module to an existing site
|
|
31
|
+
|
|
32
|
+
A site scaffolded without a paid module (a Free site whose owner then buys
|
|
33
|
+
Pro, say) gets it with `add-module` — alias `upgrade` — run against the site
|
|
34
|
+
itself, with `AILK_LICENSE_KEY` covering the module:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# in an already-scaffolded repo (default target: cwd)
|
|
38
|
+
AILK_LICENSE_KEY=<key> create-ailk add-module docs-blog
|
|
39
|
+
# or point at the repo explicitly
|
|
40
|
+
AILK_LICENSE_KEY=<key> create-ailk upgrade docs-blog ./my-site
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
It fetches the module's bundle through the same licence gate a scaffold uses
|
|
44
|
+
(no key, or a key that does not cover the module, is refused with the same
|
|
45
|
+
message, before anything is written) and merges it **without overwriting
|
|
46
|
+
anything the site has**:
|
|
47
|
+
|
|
48
|
+
- a file the site lacks is written;
|
|
49
|
+
- a file the site already has is left as-is — if its content differs from the
|
|
50
|
+
module's, the report lists it under _Needs manual review_ with the exact
|
|
51
|
+
change the module wanted, for you to apply by hand;
|
|
52
|
+
- the only edits to existing files are the module's config patches, and only
|
|
53
|
+
to `package.json` dependency and script keys, `next.config.*` and
|
|
54
|
+
`jest.config.*` — each reported with its diff.
|
|
55
|
+
|
|
56
|
+
It then copies in the module's route directories, together with any other
|
|
57
|
+
template route the site is missing (the same set `sync-routes --apply` copies,
|
|
58
|
+
so a core route you deleted comes back and is listed in the report), regenerates `architecture.yaml`
|
|
59
|
+
for the site's modules plus this one, and regenerates the site nav unless you
|
|
60
|
+
have edited it. On a site scaffolded from a template, it also appends the
|
|
61
|
+
module's pages to the site's roster (`TEMPLATE-MANIFEST.json`) — replacing a
|
|
62
|
+
template placeholder page the module takes over, such as the Free `/blog`
|
|
63
|
+
teaser, whose seed is removed only if you have not edited it — and prints the
|
|
64
|
+
result of the roster check (`Page roster check: clean`). Running it again
|
|
65
|
+
changes nothing and reports nothing to add.
|
|
66
|
+
Run `pnpm install` afterwards.
|
|
67
|
+
|
|
30
68
|
### Sync `architecture.yaml` after adding a module
|
|
31
69
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
modules are the same set as
|
|
70
|
+
`add-module` above regenerates `architecture.yaml` itself. To regenerate it by
|
|
71
|
+
hand for a module set — after changing modules some other way — use
|
|
72
|
+
`--sync-architecture <csv>` (recognized modules are the same set as
|
|
73
|
+
`--modules`):
|
|
35
74
|
|
|
36
75
|
```bash
|
|
37
76
|
# in an already-scaffolded repo (default target: cwd)
|
|
@@ -86,7 +125,7 @@ this is the marketing core." A gateable surface's routes (`blog`, `docs`,
|
|
|
86
125
|
`flows`, …) are checked only when the site carries that surface; a surface
|
|
87
126
|
gated off at scaffold time is listed as skipped, not missing — its absence is
|
|
88
127
|
deliberate, not drift. Add a surface with `--sync-architecture` and the
|
|
89
|
-
`
|
|
128
|
+
`add-page` skill, not with `sync-routes`.
|
|
90
129
|
|
|
91
130
|
**The lib-and-messages dependency contract (#5014).** Some routes import
|
|
92
131
|
files OUTSIDE their own route directory — `sign-in/page.tsx` imports
|
package/component-catalog.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"importPath": "@working-theory/ui/blocks",
|
|
18
18
|
"rootBarrel": "@working-theory/ui",
|
|
19
19
|
"sourceRoot": "packages/ui/src/blocks",
|
|
20
|
-
"count":
|
|
20
|
+
"count": 97
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"name": "chrome",
|
|
@@ -958,6 +958,17 @@
|
|
|
958
958
|
"descriptionGrade": "strong",
|
|
959
959
|
"sectionType": null
|
|
960
960
|
},
|
|
961
|
+
{
|
|
962
|
+
"name": "ConsentSettingsButton",
|
|
963
|
+
"tier": "blocks",
|
|
964
|
+
"sourcePath": "packages/ui/src/blocks/ConsentSettingsButton.tsx",
|
|
965
|
+
"importPath": "@working-theory/ui/blocks",
|
|
966
|
+
"exported": false,
|
|
967
|
+
"description": "Footer \"Cookie settings\" control. Lets a visitor who already accepted/declined change their mind later, from the footer, without reloading the page. Lives at the BLOCKS tier (not chrome) so `FooterBottomBar` (a block) can render it without an upward import; `BannerConsentIsland` (chrome) imports the exported event constant DOWNWARD, per the component tier hierarchy.",
|
|
968
|
+
"descriptionSource": "doc-comment",
|
|
969
|
+
"descriptionGrade": "strong",
|
|
970
|
+
"sectionType": null
|
|
971
|
+
},
|
|
961
972
|
{
|
|
962
973
|
"name": "ConsentStatement",
|
|
963
974
|
"tier": "blocks",
|
|
@@ -1398,6 +1409,17 @@
|
|
|
1398
1409
|
"descriptionGrade": "strong",
|
|
1399
1410
|
"sectionType": null
|
|
1400
1411
|
},
|
|
1412
|
+
{
|
|
1413
|
+
"name": "PostCard",
|
|
1414
|
+
"tier": "blocks",
|
|
1415
|
+
"sourcePath": "packages/ui/src/blocks/PostCard.tsx",
|
|
1416
|
+
"importPath": "@working-theory/ui/blocks",
|
|
1417
|
+
"exported": true,
|
|
1418
|
+
"description": "Same props as PostRow, a vertical arrangement. A single linked blog-index card (cover · date · reading time · title · excerpt · \"Read more\"). Tier 3 block; composes MediaFigure + primitives. RSC default.",
|
|
1419
|
+
"descriptionSource": "doc-comment",
|
|
1420
|
+
"descriptionGrade": "weak",
|
|
1421
|
+
"sectionType": null
|
|
1422
|
+
},
|
|
1401
1423
|
{
|
|
1402
1424
|
"name": "PostRow",
|
|
1403
1425
|
"tier": "blocks",
|
|
@@ -3650,6 +3672,13 @@
|
|
|
3650
3672
|
"tight"
|
|
3651
3673
|
]
|
|
3652
3674
|
},
|
|
3675
|
+
"measure": {
|
|
3676
|
+
"type": "string",
|
|
3677
|
+
"enum": [
|
|
3678
|
+
"full",
|
|
3679
|
+
"narrow"
|
|
3680
|
+
]
|
|
3681
|
+
},
|
|
3653
3682
|
"lightboxCta": {
|
|
3654
3683
|
"type": "object",
|
|
3655
3684
|
"properties": {
|
|
@@ -4640,7 +4669,8 @@
|
|
|
4640
4669
|
"default",
|
|
4641
4670
|
"mockup",
|
|
4642
4671
|
"alternating",
|
|
4643
|
-
"split-grid"
|
|
4672
|
+
"split-grid",
|
|
4673
|
+
"steps"
|
|
4644
4674
|
]
|
|
4645
4675
|
},
|
|
4646
4676
|
"eyebrow": {
|
|
@@ -4691,6 +4721,20 @@
|
|
|
4691
4721
|
"landscape"
|
|
4692
4722
|
]
|
|
4693
4723
|
},
|
|
4724
|
+
"itemStyle": {
|
|
4725
|
+
"type": "string",
|
|
4726
|
+
"enum": [
|
|
4727
|
+
"card",
|
|
4728
|
+
"plain"
|
|
4729
|
+
]
|
|
4730
|
+
},
|
|
4731
|
+
"actionsPosition": {
|
|
4732
|
+
"type": "string",
|
|
4733
|
+
"enum": [
|
|
4734
|
+
"header",
|
|
4735
|
+
"below"
|
|
4736
|
+
]
|
|
4737
|
+
},
|
|
4694
4738
|
"features": {
|
|
4695
4739
|
"type": "array",
|
|
4696
4740
|
"items": {
|
|
@@ -5043,6 +5087,9 @@
|
|
|
5043
5087
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
5044
5088
|
"type": "object",
|
|
5045
5089
|
"properties": {
|
|
5090
|
+
"imagerySlot": {
|
|
5091
|
+
"type": "boolean"
|
|
5092
|
+
},
|
|
5046
5093
|
"variant": {
|
|
5047
5094
|
"type": "string",
|
|
5048
5095
|
"enum": [
|
|
@@ -5936,7 +5983,8 @@
|
|
|
5936
5983
|
"grid",
|
|
5937
5984
|
"static",
|
|
5938
5985
|
"featured",
|
|
5939
|
-
"bylined"
|
|
5986
|
+
"bylined",
|
|
5987
|
+
"quote"
|
|
5940
5988
|
]
|
|
5941
5989
|
},
|
|
5942
5990
|
"headline": {
|
|
@@ -6159,6 +6207,20 @@
|
|
|
6159
6207
|
"included-dots"
|
|
6160
6208
|
]
|
|
6161
6209
|
},
|
|
6210
|
+
"cardLayout": {
|
|
6211
|
+
"type": "string",
|
|
6212
|
+
"enum": [
|
|
6213
|
+
"default",
|
|
6214
|
+
"centered"
|
|
6215
|
+
]
|
|
6216
|
+
},
|
|
6217
|
+
"toggleStyle": {
|
|
6218
|
+
"type": "string",
|
|
6219
|
+
"enum": [
|
|
6220
|
+
"soft",
|
|
6221
|
+
"solid"
|
|
6222
|
+
]
|
|
6223
|
+
},
|
|
6162
6224
|
"addonLayout": {
|
|
6163
6225
|
"type": "string",
|
|
6164
6226
|
"enum": [
|
|
@@ -6889,6 +6951,17 @@
|
|
|
6889
6951
|
},
|
|
6890
6952
|
"closingLine": {
|
|
6891
6953
|
"type": "string"
|
|
6954
|
+
},
|
|
6955
|
+
"checklist": {
|
|
6956
|
+
"minItems": 1,
|
|
6957
|
+
"maxItems": 5,
|
|
6958
|
+
"type": "array",
|
|
6959
|
+
"items": {
|
|
6960
|
+
"type": "string"
|
|
6961
|
+
}
|
|
6962
|
+
},
|
|
6963
|
+
"imagerySlot": {
|
|
6964
|
+
"type": "boolean"
|
|
6892
6965
|
}
|
|
6893
6966
|
},
|
|
6894
6967
|
"required": [
|
|
@@ -6909,6 +6982,13 @@
|
|
|
6909
6982
|
"headline": {
|
|
6910
6983
|
"type": "string"
|
|
6911
6984
|
},
|
|
6985
|
+
"headlineStyle": {
|
|
6986
|
+
"type": "string",
|
|
6987
|
+
"enum": [
|
|
6988
|
+
"heading",
|
|
6989
|
+
"label"
|
|
6990
|
+
]
|
|
6991
|
+
},
|
|
6912
6992
|
"logos": {
|
|
6913
6993
|
"type": "array",
|
|
6914
6994
|
"items": {
|
|
@@ -7837,7 +7917,8 @@
|
|
|
7837
7917
|
"type": "string",
|
|
7838
7918
|
"enum": [
|
|
7839
7919
|
"with-small-images",
|
|
7840
|
-
"with-large-images"
|
|
7920
|
+
"with-large-images",
|
|
7921
|
+
"with-side-images"
|
|
7841
7922
|
]
|
|
7842
7923
|
},
|
|
7843
7924
|
"avatarSize": {
|
|
@@ -8713,6 +8794,13 @@
|
|
|
8713
8794
|
"totalPages",
|
|
8714
8795
|
"baseUrl"
|
|
8715
8796
|
]
|
|
8797
|
+
},
|
|
8798
|
+
"variant": {
|
|
8799
|
+
"type": "string",
|
|
8800
|
+
"enum": [
|
|
8801
|
+
"list",
|
|
8802
|
+
"grid"
|
|
8803
|
+
]
|
|
8716
8804
|
}
|
|
8717
8805
|
},
|
|
8718
8806
|
"required": [
|
|
@@ -9539,6 +9627,12 @@
|
|
|
9539
9627
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
9540
9628
|
"type": "object",
|
|
9541
9629
|
"properties": {
|
|
9630
|
+
"eyebrow": {
|
|
9631
|
+
"type": "string"
|
|
9632
|
+
},
|
|
9633
|
+
"imagerySlot": {
|
|
9634
|
+
"type": "boolean"
|
|
9635
|
+
},
|
|
9542
9636
|
"headline": {
|
|
9543
9637
|
"type": "string"
|
|
9544
9638
|
},
|
|
@@ -9995,6 +10089,16 @@
|
|
|
9995
10089
|
"navGroupLabel": {
|
|
9996
10090
|
"type": "string"
|
|
9997
10091
|
},
|
|
10092
|
+
"layout": {
|
|
10093
|
+
"type": "string",
|
|
10094
|
+
"enum": [
|
|
10095
|
+
"rail",
|
|
10096
|
+
"article"
|
|
10097
|
+
]
|
|
10098
|
+
},
|
|
10099
|
+
"updated": {
|
|
10100
|
+
"type": "string"
|
|
10101
|
+
},
|
|
9998
10102
|
"stats": {
|
|
9999
10103
|
"minItems": 2,
|
|
10000
10104
|
"maxItems": 4,
|
|
@@ -11441,22 +11545,22 @@
|
|
|
11441
11545
|
{
|
|
11442
11546
|
"path": "typography.display.fontSize",
|
|
11443
11547
|
"type": "string",
|
|
11444
|
-
"value": "3.
|
|
11548
|
+
"value": "3.5rem"
|
|
11445
11549
|
},
|
|
11446
11550
|
{
|
|
11447
11551
|
"path": "typography.display.lineHeight",
|
|
11448
11552
|
"type": "string",
|
|
11449
|
-
"value": "1"
|
|
11553
|
+
"value": "1.1"
|
|
11450
11554
|
},
|
|
11451
11555
|
{
|
|
11452
11556
|
"path": "typography.display.fontWeight",
|
|
11453
11557
|
"type": "string",
|
|
11454
|
-
"value": "
|
|
11558
|
+
"value": "700"
|
|
11455
11559
|
},
|
|
11456
11560
|
{
|
|
11457
11561
|
"path": "typography.display.letterSpacing",
|
|
11458
11562
|
"type": "string",
|
|
11459
|
-
"value": "
|
|
11563
|
+
"value": "0"
|
|
11460
11564
|
},
|
|
11461
11565
|
{
|
|
11462
11566
|
"path": "typography.display-sm.fontSize",
|
|
@@ -11466,42 +11570,42 @@
|
|
|
11466
11570
|
{
|
|
11467
11571
|
"path": "typography.display-sm.lineHeight",
|
|
11468
11572
|
"type": "string",
|
|
11469
|
-
"value": "1.
|
|
11573
|
+
"value": "1.1"
|
|
11470
11574
|
},
|
|
11471
11575
|
{
|
|
11472
11576
|
"path": "typography.display-sm.fontWeight",
|
|
11473
11577
|
"type": "string",
|
|
11474
|
-
"value": "
|
|
11578
|
+
"value": "700"
|
|
11475
11579
|
},
|
|
11476
11580
|
{
|
|
11477
11581
|
"path": "typography.display-sm.letterSpacing",
|
|
11478
11582
|
"type": "string",
|
|
11479
|
-
"value": "
|
|
11583
|
+
"value": "0"
|
|
11480
11584
|
},
|
|
11481
11585
|
{
|
|
11482
11586
|
"path": "typography.display-lg.fontSize",
|
|
11483
11587
|
"type": "string",
|
|
11484
|
-
"value": "
|
|
11588
|
+
"value": "3.5rem"
|
|
11485
11589
|
},
|
|
11486
11590
|
{
|
|
11487
11591
|
"path": "typography.display-lg.lineHeight",
|
|
11488
11592
|
"type": "string",
|
|
11489
|
-
"value": "1"
|
|
11593
|
+
"value": "1.1"
|
|
11490
11594
|
},
|
|
11491
11595
|
{
|
|
11492
11596
|
"path": "typography.display-lg.fontWeight",
|
|
11493
11597
|
"type": "string",
|
|
11494
|
-
"value": "
|
|
11598
|
+
"value": "700"
|
|
11495
11599
|
},
|
|
11496
11600
|
{
|
|
11497
11601
|
"path": "typography.display-lg.letterSpacing",
|
|
11498
11602
|
"type": "string",
|
|
11499
|
-
"value": "
|
|
11603
|
+
"value": "0"
|
|
11500
11604
|
},
|
|
11501
11605
|
{
|
|
11502
11606
|
"path": "typography.display-mobile.fontSize",
|
|
11503
11607
|
"type": "string",
|
|
11504
|
-
"value": "
|
|
11608
|
+
"value": "2.5rem"
|
|
11505
11609
|
},
|
|
11506
11610
|
{
|
|
11507
11611
|
"path": "typography.display-mobile.lineHeight",
|
|
@@ -11511,12 +11615,12 @@
|
|
|
11511
11615
|
{
|
|
11512
11616
|
"path": "typography.display-mobile.fontWeight",
|
|
11513
11617
|
"type": "string",
|
|
11514
|
-
"value": "
|
|
11618
|
+
"value": "700"
|
|
11515
11619
|
},
|
|
11516
11620
|
{
|
|
11517
11621
|
"path": "typography.display-mobile.letterSpacing",
|
|
11518
11622
|
"type": "string",
|
|
11519
|
-
"value": "
|
|
11623
|
+
"value": "0"
|
|
11520
11624
|
},
|
|
11521
11625
|
{
|
|
11522
11626
|
"path": "typography.subhead-mobile.fontSize",
|
|
@@ -11591,7 +11695,7 @@
|
|
|
11591
11695
|
{
|
|
11592
11696
|
"path": "typography.heading-3.fontWeight",
|
|
11593
11697
|
"type": "string",
|
|
11594
|
-
"value": "
|
|
11698
|
+
"value": "700"
|
|
11595
11699
|
},
|
|
11596
11700
|
{
|
|
11597
11701
|
"path": "typography.heading-3.letterSpacing",
|
|
@@ -11760,6 +11864,17 @@
|
|
|
11760
11864
|
}
|
|
11761
11865
|
]
|
|
11762
11866
|
},
|
|
11867
|
+
{
|
|
11868
|
+
"name": "typographyLg",
|
|
11869
|
+
"leafCount": 1,
|
|
11870
|
+
"leaves": [
|
|
11871
|
+
{
|
|
11872
|
+
"path": "typographyLg.heading-3.fontSize",
|
|
11873
|
+
"type": "string",
|
|
11874
|
+
"value": "2rem"
|
|
11875
|
+
}
|
|
11876
|
+
]
|
|
11877
|
+
},
|
|
11763
11878
|
{
|
|
11764
11879
|
"name": "displayOpticalOffset",
|
|
11765
11880
|
"leafCount": 1,
|
|
@@ -11887,7 +12002,7 @@
|
|
|
11887
12002
|
},
|
|
11888
12003
|
{
|
|
11889
12004
|
"name": "spacing",
|
|
11890
|
-
"leafCount":
|
|
12005
|
+
"leafCount": 13,
|
|
11891
12006
|
"leaves": [
|
|
11892
12007
|
{
|
|
11893
12008
|
"path": "spacing.controlX",
|
|
@@ -11914,6 +12029,11 @@
|
|
|
11914
12029
|
"type": "string",
|
|
11915
12030
|
"value": "4rem"
|
|
11916
12031
|
},
|
|
12032
|
+
{
|
|
12033
|
+
"path": "spacing.sectionLg",
|
|
12034
|
+
"type": "string",
|
|
12035
|
+
"value": "7rem"
|
|
12036
|
+
},
|
|
11917
12037
|
{
|
|
11918
12038
|
"path": "spacing.sectionCompact",
|
|
11919
12039
|
"type": "string",
|
|
@@ -12000,7 +12120,7 @@
|
|
|
12000
12120
|
},
|
|
12001
12121
|
{
|
|
12002
12122
|
"name": "container",
|
|
12003
|
-
"leafCount":
|
|
12123
|
+
"leafCount": 5,
|
|
12004
12124
|
"leaves": [
|
|
12005
12125
|
{
|
|
12006
12126
|
"path": "container.sm",
|
|
@@ -12021,6 +12141,11 @@
|
|
|
12021
12141
|
"path": "container.xl",
|
|
12022
12142
|
"type": "string",
|
|
12023
12143
|
"value": "1280px"
|
|
12144
|
+
},
|
|
12145
|
+
{
|
|
12146
|
+
"path": "container.measure",
|
|
12147
|
+
"type": "string",
|
|
12148
|
+
"value": "36rem"
|
|
12024
12149
|
}
|
|
12025
12150
|
]
|
|
12026
12151
|
},
|
package/component-catalog.md
CHANGED
|
@@ -15,13 +15,13 @@ The component inventory of `@working-theory/ui` and the shells of `@working-theo
|
|
|
15
15
|
3. Check the Primitives, Panels and Shells tables too — a low-level control, a collapsible layout container, or a route-level frame lives there, not under Sections or Blocks.
|
|
16
16
|
4. Only then build. If you do build, you are declaring the capability is genuinely absent.
|
|
17
17
|
|
|
18
|
-
Inventory: **
|
|
18
|
+
Inventory: **300 component files** across 16 tiers — 54 sections, 97 blocks, 18 chrome, 79 primitives, 6 panels, 5 shells, 5 docs-blog-blocks, 1 docs-blog-chrome, 2 docs-blog-shells, 2 scheduling-sections, 5 scheduling-blocks, 3 signal-collectors-sections, 8 signal-collectors-blocks, 2 commerce-sections, 12 commerce-blocks, 1 commerce-panels. 297 distinct names: `SchedulerEmbed`, `Separator`, `Tabs` exist in more than one tier as genuinely different components, listed once per tier with its own source path.
|
|
19
19
|
|
|
20
|
-
Description coverage: **
|
|
20
|
+
Description coverage: **296/300** components carry a capability description derived from source — 43 from the section registry's hand-authored when-to-use text, 222 from the component's own doc-comment header, 31 from its tier barrel's roster line. **4** have none; they are listed under [Undescribed components](#undescribed-components) rather than given a sentence invented from their name.
|
|
21
21
|
|
|
22
|
-
Of those, **
|
|
22
|
+
Of those, **265** are *strong* — a capability sentence you could match a requirement against — and **31** are *weak*: either one short clause, or a long one that spends itself on wiring (client boundaries, class names, which primitives it composes) instead of on what the thing is for. Weak rows are marked `(weak)` and listed in full under [Weak descriptions](#weak-descriptions). Coverage is 99%, but **findable-without-luck coverage is 88%**.
|
|
23
23
|
|
|
24
|
-
Per tier, strong out of total: **Sections** 53/54 · **Blocks**
|
|
24
|
+
Per tier, strong out of total: **Sections** 53/54 · **Blocks** 91/97 · **Chrome** 10/18 · **Primitives** 64/79 (4 undescribed) · **Panels** 5/6 · **Shells** 4/5 · **Docs + Blog Blocks** 5/5 · **Docs + Blog Chrome** 1/1 · **Docs + Blog Shells** 0/2 · **Scheduling Sections** 2/2 · **Scheduling Blocks** 5/5 · **Signal-Collectors Sections** 3/3 · **Signal-Collectors Blocks** 7/8 · **Commerce Sections** 2/2 · **Commerce Blocks** 12/12 · **Commerce Panels** 1/1. A tier low on this line is a tier where a capability search is most likely to come up empty on something that exists.
|
|
25
25
|
|
|
26
26
|
That grade is **mechanical**. It counts what it can measure — how much a description adds beyond the component's own name, how much of it is spent on wiring, whether the extraction came out damaged — and it cannot tell a fluent paragraph about the wrong subject from a useful one. A person reading these tables will find more rows unusable than the weak count admits. Treat it as a floor on the problem, not a measurement of it, and read the source before concluding a capability is absent.
|
|
27
27
|
|
|
@@ -118,7 +118,7 @@ Import: `import { X } from "@working-theory/ui/sections";` (or from the `@workin
|
|
|
118
118
|
|
|
119
119
|
---
|
|
120
120
|
|
|
121
|
-
## Blocks (
|
|
121
|
+
## Blocks (97)
|
|
122
122
|
|
|
123
123
|
Intermediate composition tiles — the pieces sections are built from. Compose primitives and panels; never import a section.
|
|
124
124
|
|
|
@@ -147,6 +147,7 @@ Import: `import { X } from "@working-theory/ui/blocks";` (or from the `@working-
|
|
|
147
147
|
| `ComparisonMatrix` | Full feature × tier comparison matrix for the Pricing 'with-comparison-table' variant. Renders N collapsible ComparisonGroups, each containing M feature rows with per-tier values. | `import { ComparisonMatrix } from "@working-theory/ui/blocks"` |
|
|
148
148
|
| `Composer` | The chat input, per the ploy.ai capture contract. | `import { Composer } from "@working-theory/ui/blocks"` |
|
|
149
149
|
| `ConsentGroup` | The composite control for the `consent` field kind: one real checkbox per consent purpose, each with its statement and inline policy links, inside one fieldset. | `import { ConsentGroup } from "@working-theory/ui/blocks"` |
|
|
150
|
+
| `ConsentSettingsButton` | Footer "Cookie settings" control. Lets a visitor who already accepted/declined change their mind later, from the footer, without reloading the page. Lives at the BLOCKS tier (not chrome) so `FooterBottomBar` (a block) can render it without an upward import; `BannerConsentIsland` (chrome) imports the exported event constant DOWNWARD, per the component tier hierarchy. | internal — compose from `packages/ui/src/blocks/ConsentSettingsButton.tsx` |
|
|
150
151
|
| `ConsentStatement` | The sentence a person agrees to, with its policy links inline. | `import { ConsentStatement } from "@working-theory/ui/blocks"` |
|
|
151
152
|
| `ContactChannelItem` | Renders one support channel entry: colored icon square + headline + description paragraph + CTA link (with trailing arrow icon). | `import { ContactChannelItem } from "@working-theory/ui/blocks"` |
|
|
152
153
|
| `ContactFormFields` | Renders the form field grid (Input / Textarea / Select primitives) + submit Button + optional consent text footer. | `import { ContactFormFields } from "@working-theory/ui/blocks"` |
|
|
@@ -188,6 +189,7 @@ Import: `import { X } from "@working-theory/ui/blocks";` (or from the `@working-
|
|
|
188
189
|
| `PageHeaderSwitcher` | Header-owned context-switcher island (DropdownMenu-backed). Header-owned segment switcher rendered inside PageHeader's `switcher` slot. Composes DropdownMenu (Radix-backed — positioning, click-outside, Escape, focus management, and roving keyboard nav all come for free). | `import { PageHeaderSwitcher } from "@working-theory/ui/blocks"` |
|
|
189
190
|
| `PairingCard` | Quiet card naming a matched WaitlistRecommendation pairing: both resolved offer names + the resolved reason, joined against a caller-supplied offers[] by key. | `import { PairingCard } from "@working-theory/ui/blocks"` |
|
|
190
191
|
| `PhoneNumberField` | Single-box combo phone input for the "tel" field kind (supersedes the two-segment country-Select + number-Input layout). | `import { PhoneNumberField } from "@working-theory/ui/blocks"` |
|
|
192
|
+
| `PostCard` | Same props as PostRow, a vertical arrangement. A single linked blog-index card (cover · date · reading time · title · excerpt · "Read more"). Tier 3 block; composes MediaFigure + primitives. RSC default. *(weak)* | `import { PostCard } from "@working-theory/ui/blocks"` |
|
|
191
193
|
| `PostRow` | A single horizontal row in the two-column blog index: a landscape cover thumbnail (left) followed by the post's title · excerpt · author+date meta · tag list. The WHOLE row is one link (aria-labelled by the title, so screen readers announce the post title rather than the concatenated row content). | `import { PostRow } from "@working-theory/ui/blocks"` |
|
|
192
194
|
| `PricingExtraTierRow` | Compact horizontal extra-tier row for the Pricing 'two-tiers-with-extra-tier' variant. Renders plan name + description on the left and a CTA on the right. Structurally different from PricingTierCard (no price display in this variant). | `import { PricingExtraTierRow } from "@working-theory/ui/blocks"` |
|
|
193
195
|
| `PricingTierCard` | Single pricing tier card (all 4 Pricing variants). Renders a single pricing tier: plan name + optional badge, description, price display, CTA button, and feature checklist. | `import { PricingTierCard } from "@working-theory/ui/blocks"` |
|
|
@@ -529,13 +531,14 @@ Import: `import { X } from "@working-theory/ui-commerce";` (or from the `@workin
|
|
|
529
531
|
|
|
530
532
|
## Weak descriptions
|
|
531
533
|
|
|
532
|
-
These
|
|
534
|
+
These 31 components have a description that is accurate but does not do the job well: too short to match against, or long but spent on implementation. A capability search reaches them only if the searcher's word happens to be in it, so they are the most likely place for this catalog to repeat the failure it was built to fix. Read the source before concluding the capability is absent — and if you own one of these components, its header is the fix.
|
|
533
535
|
|
|
534
536
|
| Component | Tier | What the source gives us |
|
|
535
537
|
| --- | --- | --- |
|
|
536
538
|
| `DocumentViewerClient` | sections | The interactive shell for DocumentViewer. Split out of DocumentViewer.tsx (which stays RSC) for the same reason AlertSection composes AlertSectionDismissIsland: interactivity is contained to one client island. |
|
|
537
539
|
| `AgentContextCard` | blocks | Capability-bearing block that renders agent provenance. RSC note: no hooks or browser APIs — server-renderable by default. |
|
|
538
540
|
| `PageHeader` | blocks | RSC. Page-level header composing the Breadcrumb primitive for the left-side wayfinding trail, a generic right-side `actions` slot, and an optional `switcher` slot for header-owned segment switching. Fills AppShell's `header` slot (AdminShell and similar). No accent bar. No tab API. No named action props — the caller assembles whatever button/menu nodes it needs and passes them as `actions`. |
|
|
541
|
+
| `PostCard` | blocks | Same props as PostRow, a vertical arrangement. A single linked blog-index card (cover · date · reading time · title · excerpt · "Read more"). Tier 3 block; composes MediaFigure + primitives. RSC default. |
|
|
539
542
|
| `PricingTierCardSeatControl` | blocks | Seat-count range picker for the Team tier card. Renders a Select primitive that lets the user choose an "Up to N seats" option from a caller-supplied list of numbers. The parent PricingTierCard stays a pure RSC; only this tiny island is hydrated. Pattern mirrors PageHeaderSwitcher.tsx: small "use client" island imported by an otherwise-server-rendered parent, keeping the client bundle minimal. |
|
|
540
543
|
| `SinglePriceCard` | blocks | 2-column split card for the Pricing 'single-price-with-details' variant. |
|
|
541
544
|
| `SocialIcons` | blocks | Horizontal row of social icon links. Renders brand icons (via Icon primitive + simple-icons paths) inside accessible Link primitives. Each platform link gets an aria-label. Shared by company-mission, simple-centered, and newsletter-below footer variants, and composed by TeamMemberCard for member social links. |
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ModuleName } from "./parse-args.js";
|
|
2
|
+
/**
|
|
3
|
+
* A refusal the CLI exits 2 on — a request this command will not carry out
|
|
4
|
+
* as asked (a bundle patching outside the allowlist, an `architecture.yaml`
|
|
5
|
+
* it cannot read the module set from, a free module), as distinct from a
|
|
6
|
+
* failure. Thrown before anything is written.
|
|
7
|
+
*/
|
|
8
|
+
export declare class AddModuleRefusedError extends Error {
|
|
9
|
+
readonly exitCode = 2;
|
|
10
|
+
constructor(message: string);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The site's current module set and declared surfaces, read back off the
|
|
14
|
+
* generated `architecture.yaml` header (`deriveArchitecture`'s `# Modules:` /
|
|
15
|
+
* `# Surfaces:` lines). Refuses rather than guesses when either line is
|
|
16
|
+
* absent or names an unknown module — regenerating from the added module
|
|
17
|
+
* alone would silently drop every other module's boundaries.
|
|
18
|
+
*/
|
|
19
|
+
export declare function readArchitectureHeader(archYaml: string): {
|
|
20
|
+
modules: ModuleName[];
|
|
21
|
+
surfaces: string[];
|
|
22
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two `add-module` symbols `site-roster.ts` needs as well (#6682 D1):
|
|
3
|
+
* the refusal type and the `architecture.yaml` header reader. They live
|
|
4
|
+
* here rather than in `add-module.ts` because `add-module.ts` imports
|
|
5
|
+
* `site-roster.ts` — reading them from `add-module.ts` would close an import
|
|
6
|
+
* cycle (`import/no-cycle`). `add-module.ts` re-exports both, so every
|
|
7
|
+
* existing import of them from `add-module.js` is unchanged.
|
|
8
|
+
*/
|
|
9
|
+
import { normalizeModules } from "./module-architecture.js";
|
|
10
|
+
/**
|
|
11
|
+
* A refusal the CLI exits 2 on — a request this command will not carry out
|
|
12
|
+
* as asked (a bundle patching outside the allowlist, an `architecture.yaml`
|
|
13
|
+
* it cannot read the module set from, a free module), as distinct from a
|
|
14
|
+
* failure. Thrown before anything is written.
|
|
15
|
+
*/
|
|
16
|
+
export class AddModuleRefusedError extends Error {
|
|
17
|
+
exitCode = 2;
|
|
18
|
+
constructor(message) {
|
|
19
|
+
super(message);
|
|
20
|
+
this.name = "AddModuleRefusedError";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The site's current module set and declared surfaces, read back off the
|
|
25
|
+
* generated `architecture.yaml` header (`deriveArchitecture`'s `# Modules:` /
|
|
26
|
+
* `# Surfaces:` lines). Refuses rather than guesses when either line is
|
|
27
|
+
* absent or names an unknown module — regenerating from the added module
|
|
28
|
+
* alone would silently drop every other module's boundaries.
|
|
29
|
+
*/
|
|
30
|
+
export function readArchitectureHeader(archYaml) {
|
|
31
|
+
const modulesLine = /^# Modules: (.+)$/m.exec(archYaml)?.[1];
|
|
32
|
+
const surfacesLine = /^# Surfaces: (.+)$/m.exec(archYaml)?.[1];
|
|
33
|
+
if (modulesLine === undefined || surfacesLine === undefined) {
|
|
34
|
+
throw new AddModuleRefusedError("architecture.yaml has no `# Modules:` / `# Surfaces:` header, so the site's current module set is unknown. Regenerate it with `create-ailk --sync-architecture <modules>` first.");
|
|
35
|
+
}
|
|
36
|
+
let modules;
|
|
37
|
+
try {
|
|
38
|
+
modules = normalizeModules(modulesLine.split(","));
|
|
39
|
+
}
|
|
40
|
+
catch (err) {
|
|
41
|
+
throw new AddModuleRefusedError(`architecture.yaml's \`# Modules:\` header is not a module list: ${err.message}`);
|
|
42
|
+
}
|
|
43
|
+
const surfaces = surfacesLine.trim() === "core only"
|
|
44
|
+
? []
|
|
45
|
+
: surfacesLine
|
|
46
|
+
.split(",")
|
|
47
|
+
.map((s) => s.trim())
|
|
48
|
+
.filter(Boolean);
|
|
49
|
+
return { modules, surfaces };
|
|
50
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { AddModuleRefusedError, readArchitectureHeader } from "./add-module-core.js";
|
|
2
|
+
import { type InstallReportRow } from "./lib/extract-module-bundle.js";
|
|
3
|
+
import { type ModulePatch } from "./module-architecture.js";
|
|
4
|
+
import { type ModuleName } from "./parse-args.js";
|
|
5
|
+
import type { MarkerMap, WorkspaceVersionMap } from "./substitute.js";
|
|
6
|
+
import { type SyncRoutesResult } from "./sync-routes.js";
|
|
7
|
+
export { AddModuleRefusedError, readArchitectureHeader };
|
|
8
|
+
/**
|
|
9
|
+
* One report row: a bundle file written, patched or skipped, or a seed the
|
|
10
|
+
* roster append removed (a superseded template row's untouched seed, #6682 D4).
|
|
11
|
+
*/
|
|
12
|
+
export type AddModuleReportRow = InstallReportRow | {
|
|
13
|
+
path: string;
|
|
14
|
+
action: "removed";
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Refuse a bundle whose `patches` reach past the plus-config allowlist
|
|
18
|
+
* (#6653 D3), matched on the target's basename so any depth qualifies:
|
|
19
|
+
* `package.json` (only `merge-keys`/`append-unique` on a dependency or script
|
|
20
|
+
* key), `next.config.*`, `jest.config.*`. Runs inside `installBundleTree`
|
|
21
|
+
* after the patches validate and before any is computed or written.
|
|
22
|
+
*/
|
|
23
|
+
export declare function checkPlusConfigPatches(patches: readonly ModulePatch[]): void;
|
|
24
|
+
export interface ApplyModuleOptions {
|
|
25
|
+
/** The already-scaffolded site (validated by the caller). */
|
|
26
|
+
targetDir: string;
|
|
27
|
+
moduleName: ModuleName;
|
|
28
|
+
/** The module's fetched bundle — this function never fetches. */
|
|
29
|
+
bundleBytes: Uint8Array;
|
|
30
|
+
/** Workspace version map, for `workspace:*` in patch targets and route copies. */
|
|
31
|
+
versions: WorkspaceVersionMap;
|
|
32
|
+
/** The scaffold's marker map (`buildScaffoldMarkers`). */
|
|
33
|
+
markers: MarkerMap;
|
|
34
|
+
/** The package's `templates/` dir, for the route sync and the roster check. */
|
|
35
|
+
templatesDir: string;
|
|
36
|
+
/** The package's `site-templates/` dir — the shipped manifests the roster rows are read from. */
|
|
37
|
+
siteTemplatesDir: string;
|
|
38
|
+
}
|
|
39
|
+
export interface AddModuleResult {
|
|
40
|
+
/** Resolved absolute path to the site. */
|
|
41
|
+
targetDir: string;
|
|
42
|
+
/** The module set `architecture.yaml` now declares. */
|
|
43
|
+
modules: ModuleName[];
|
|
44
|
+
/** One row per file written, patched, skipped or removed — empty when nothing changed. */
|
|
45
|
+
report: AddModuleReportRow[];
|
|
46
|
+
/** The route sync run over the module's surfaces. */
|
|
47
|
+
routes: SyncRoutesResult;
|
|
48
|
+
/** The page-roster append (#6682). `none` = the site has no `.ailk-site-manifest.json` (nor a pre-#6658 root `TEMPLATE-MANIFEST.json`). */
|
|
49
|
+
roster: {
|
|
50
|
+
state: "appended" | "unchanged" | "none";
|
|
51
|
+
/** Routes appended to the roster. */
|
|
52
|
+
appended: string[];
|
|
53
|
+
/** Superseded seeds removed. */
|
|
54
|
+
removed: string[];
|
|
55
|
+
/** `siteRosterProblems` after the append — empty means clean. */
|
|
56
|
+
problems: string[];
|
|
57
|
+
/**
|
|
58
|
+
* The site-relative roster file read and written — `SITE_ROSTER_PATH`, or
|
|
59
|
+
* a pre-#6658 site's root `TEMPLATE-MANIFEST.json`.
|
|
60
|
+
*/
|
|
61
|
+
path: string;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Merge one module's bundle onto an existing site, sync its routes,
|
|
66
|
+
* regenerate `architecture.yaml` and the nav, then append the module's pages
|
|
67
|
+
* to the site's roster. Every refusal — an unreadable header or roster, a
|
|
68
|
+
* module row no shipped manifest carries, a patch outside the allowlist, a
|
|
69
|
+
* patch conflict, an unsafe bundle — throws before the first write (the header
|
|
70
|
+
* and roster are read first; `extractModuleBundle` validates and computes
|
|
71
|
+
* everything before it copies).
|
|
72
|
+
*/
|
|
73
|
+
export declare function applyModuleToScaffold(opts: ApplyModuleOptions): Promise<AddModuleResult>;
|
|
74
|
+
/** The report `add-module` prints. */
|
|
75
|
+
export declare function formatAddModuleReport(result: AddModuleResult, moduleName: string): string;
|
|
76
|
+
export interface AddModuleArgs {
|
|
77
|
+
/** The module to add; undefined only with `help`. */
|
|
78
|
+
module: ModuleName | undefined;
|
|
79
|
+
/** Positional target directory; undefined = the caller's cwd. */
|
|
80
|
+
target: string | undefined;
|
|
81
|
+
help: boolean;
|
|
82
|
+
}
|
|
83
|
+
export declare const ADD_MODULE_HELP = "create-ailk add-module \u2014 add a purchased module to an existing site.\n\nUsage:\n create-ailk add-module <module> [<target-dir>]\n create-ailk upgrade <module> [<target-dir>]\n\nArguments:\n <module> One paid module, e.g. docs-blog. Needs\n AILK_LICENSE_KEY covering it.\n <target-dir> An already-scaffolded repo (contains\n architecture.yaml). Defaults to the current dir.\n\nOptions:\n --help, -h Print this message.\n\nWrites the module's files the site lacks and never overwrites one it has: a\nfile whose content differs is left as-is and listed for manual review with the\nchange the module wanted. Only package.json dependency/script keys,\nnext.config.* and jest.config.* are patched. Then copies the module's routes\nand regenerates architecture.yaml. Running it again changes nothing.\n";
|
|
84
|
+
/**
|
|
85
|
+
* Parse the argv AFTER the `add-module` / `upgrade` word. Strict
|
|
86
|
+
* `node:util` parseArgs, like `parseSyncRoutesArgs`; the module is validated
|
|
87
|
+
* the same way one `--modules` entry is.
|
|
88
|
+
*/
|
|
89
|
+
export declare function parseAddModuleArgs(argv: string[]): AddModuleArgs;
|